Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/skills/connection-setup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Remove-Item $tempFile -ErrorAction SilentlyContinue

### Step 2: Create Connection

Supported SDK connector names: `kusto`, `office365`, `sharepointonline`, `teams` (and any `Microsoft.Web/connections` connector name).
Supported SDK connector names: `azuremonitorlogs`, `docusign`, `github`, `jira`, `kusto`, `microsoftforms`, `office365`, `powerbi`, `salesforce`, `sharepointonline`, `shifts`, `slack`, `teams`, `todo` (and any `Microsoft.Web/connections` connector name).

```powershell
$connectorName = "<connector-name>" # e.g., "office365", "sharepointonline", "teams"
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.0-preview] - 2026-07-13

### Added

- Generated 9 additional connector clients in `src/generated/`: DocuSign,
GitHub, Jira, Microsoft Forms, Power BI, Salesforce, Shifts for Microsoft
Teams, Slack, and Microsoft To Do Business.
- Added detailed connector-specific Jest suites for all 9 new connectors:
`tests/docusignClient.test.ts`, `tests/githubClient.test.ts`,
`tests/jiraClient.test.ts`, `tests/microsoftformsClient.test.ts`,
`tests/powerbiClient.test.ts`, `tests/salesforceClient.test.ts`,
`tests/shiftsClient.test.ts`, `tests/slackClient.test.ts`, and
`tests/todoClient.test.ts`.
- Added ESM/CJS TypeScript sample programs for all 9 new connectors under
`samples/esm/typescript/` and `samples/cjs/typescript/`.

### Changed

- Updated generated connector registries (`connectorNames.ts`,
`ManagedConnectors.ts`, `index.ts`) to include all 21 generated connectors.
- Corrected Teams definition type naming from `NewMeetingRespone` to
`NewMeetingResponse` in generated output.
- Updated generator-side TypeScript definition type normalization so
swagger typo corrections are applied consistently during generation.
- Validation baseline now includes 29 passing test suites and 318 passing tests.

## [0.2.0-preview] - 2026-05-21

### Changed (BREAKING)
Expand Down
42 changes: 30 additions & 12 deletions GENERATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ The **CodefulSdkGenerator** tool generates typed TypeScript clients from managed

### Tools Required

1. **ARMClient** - For authenticated Azure Resource Manager API calls
- Install via Chocolatey: `choco install armclient`
- Install via WinGet: `winget install projectkudu.ARMClient`
- The generator defaults to `C:\ProgramData\chocolatey\bin\ARMClient.exe`
- **If ARMClient is installed elsewhere** (e.g., via WinGet), set the `ARMCLIENT_PATH` environment variable
1. **Azure Subscription** - Access to an Azure subscription with Logic Apps Standard

2. **Azure Subscription** - Access to an Azure subscription with Logic Apps Standard
2. **Azure authentication (DefaultAzureCredential)**
- Sign in with an identity that can read managed connector metadata in your target subscription.
- Typical local setup: run `az login` (and optionally `az account set --subscription <subscription-id>`).

3. **.NET 8 SDK** - For building and running the generator

Expand All @@ -40,29 +38,49 @@ dotnet build .\src\tools\CodefulSdkGenerator\LogicAppsCompiler.Cli\LogicAppsComp

```powershell
# Generate all connectors
LogicAppsCompiler.exe <output-directory> unused --directClientTypeScript
LogicAppsCompiler.exe <output-directory> unused --directClient --language=typescript

# Generate specific connectors only
LogicAppsCompiler.exe <output-directory> unused --directClientTypeScript --connectors=office365
LogicAppsCompiler.exe <output-directory> unused --directClient --language=typescript --connectors=office365
Comment thread
swapnil-nagar marked this conversation as resolved.

# Example: Generate to this SDK repo's generated folder
LogicAppsCompiler.exe "<path-to-Connectors-NodeJS-SDK>/src/generated" unused --directClientTypeScript --connectors=office365
LogicAppsCompiler.exe "<path-to-Connectors-NodeJS-SDK>/src/generated" unused --directClient --language=typescript --connectors=office365
```

**Output structure per connector:**

- `{Connector}Client.ts` - Combined types and client in one file
- `{Connector}Extensions.ts` - Combined typed models and client methods for a connector

### Output files

| File | Purpose |
|------|---------|
| `office365Client.ts` | Generated typed client for a connector |
| `connectors.ts` | Navigator module listing all generated connectors |
| `Office365Extensions.ts` | Generated typed client + models for a connector |
| `ManagedConnectors.ts` | Registry of available connector API names |
| `connectorNames.ts` | String constants for connector names |
| `index.ts` | Barrel exports for generated connectors |

## Rules

- **Never hand-edit generated files.** Fix bugs in the generator, not in generated output.
- Generated files are in `src/generated/` and marked with a "Do not edit" header.
- Runtime infrastructure files in `src/azureConnectors/` are hand-written.

## Important Notes

- Regeneration updates shared generated registry files (`ManagedConnectors.ts`,
`connectorNames.ts`, and `index.ts`). If you generate with a filtered
connector set, those registries will reflect only that subset.
- For release-ready updates in this repo, run generation with the complete
intended connector set to avoid unintentionally dropping existing connectors.

## Post-Generation Validation

Run these checks from the `Connectors-NodeJS-SDK` repo root:

```powershell
npm run build
npm run typecheck
npm test
npm run typecheck:samples
```
37 changes: 32 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,17 @@ The following connectors have been generated and validated with comprehensive te
| **SharePoint Online** | `@azure/connectors/generated/SharepointonlineExtensions` | ✅ Complete | 12 tests |
| **SMTP** | `@azure/connectors/generated/SmtpExtensions` | ✅ Complete | 9 tests |
| **Microsoft Teams** | `@azure/connectors/generated/TeamsExtensions` | ✅ Complete | 14 tests |

**Total:** 188 tests (all passing) across 19 test suites
| **DocuSign** | `@azure/connectors/generated/DocusignExtensions` | ✅ Complete | 6 tests |
| **GitHub** | `@azure/connectors/generated/GithubExtensions` | ✅ Complete | 6 tests |
| **Jira** | `@azure/connectors/generated/JiraExtensions` | ✅ Complete | 6 tests |
| **Microsoft Forms** | `@azure/connectors/generated/MicrosoftformsExtensions` | ✅ Complete | 6 tests |
| **Power BI** | `@azure/connectors/generated/PowerbiExtensions` | ✅ Complete | 6 tests |
| **Salesforce** | `@azure/connectors/generated/SalesforceExtensions` | ✅ Complete | 6 tests |
| **Shifts for Microsoft Teams** | `@azure/connectors/generated/ShiftsExtensions` | ✅ Complete | 6 tests |
| **Slack** | `@azure/connectors/generated/SlackExtensions` | ✅ Complete | 6 tests |
| **Microsoft To Do Business** | `@azure/connectors/generated/TodoExtensions` | ✅ Complete | 6 tests |

**Total:** 318 tests (all passing) across 29 test suites and 21 generated connectors

## Authentication

Expand Down Expand Up @@ -364,16 +373,26 @@ try {
│ ├── ArmExtensions.ts # Azure Resource Manager client
│ ├── AzureblobExtensions.ts # Azure Blob Storage client
│ ├── AzuremonitorlogsExtensions.ts # Azure Monitor Logs client
│ ├── DocusignExtensions.ts # DocuSign client
│ ├── GithubExtensions.ts # GitHub client
│ ├── JiraExtensions.ts # Jira client
│ ├── KustoExtensions.ts # Azure Data Explorer client
│ ├── MicrosoftformsExtensions.ts # Microsoft Forms client
│ ├── MqExtensions.ts # IBM MQ client
│ ├── MsgraphgroupsanduserExtensions.ts # MS Graph Groups & Users client
│ ├── Office365Extensions.ts # Office 365 Outlook client
│ ├── Office365usersExtensions.ts # Office 365 Users client
│ ├── OnedriveforbusinessExtensions.ts # OneDrive for Business client
│ ├── PowerbiExtensions.ts # Power BI client
│ ├── SalesforceExtensions.ts # Salesforce client
│ ├── SharepointonlineExtensions.ts # SharePoint Online client
│ ├── ShiftsExtensions.ts # Shifts for Microsoft Teams client
│ ├── SlackExtensions.ts # Slack client
│ ├── SmtpExtensions.ts # SMTP client
│ ├── TeamsExtensions.ts # Microsoft Teams client
│ ├── TodoExtensions.ts # Microsoft To Do Business client
│ ├── connectorNames.ts # Connector name constants
│ ├── index.ts # Generated export barrel
│ └── ManagedConnectors.ts # Connector registry
├── tests/ # Jest test suite
├── samples/ # Usage examples (ESM/CJS, TS/JS)
Expand All @@ -391,26 +410,34 @@ samples/
│ │ ├── arm.ts
│ │ ├── azureblob.ts
│ │ ├── azuremonitorlogs.ts
│ │ ├── docusign.ts
│ │ ├── github.ts
│ │ ├── jira.ts
│ │ ├── kusto.ts
│ │ ├── microsoftforms.ts
│ │ ├── mq.ts
│ │ ├── msgraphgroupsanduser.ts
│ │ ├── office365.ts
│ │ ├── office365users.ts
│ │ ├── onedriveforbusiness.ts
│ │ ├── powerbi.ts
│ │ ├── salesforce.ts
│ │ ├── sharepoint.ts
│ │ ├── shifts.ts
│ │ ├── slack.ts
│ │ ├── smtp.ts
│ │ └── teams.ts
│ └── javascript/ # JavaScript ESM samples (.mjs)
│ ├── arm.mjs
│ ├── azureblob.mjs
│ └── ... (12 connectors)
│ └── ... (21 connectors)
└── cjs/
├── typescript/ # TypeScript CJS samples
│ ├── arm.ts
│ └── ... (12 connectors)
│ └── ... (21 connectors)
└── javascript/ # JavaScript CJS samples (.cjs)
├── arm.cjs
└── ... (12 connectors)
└── ... (21 connectors)
```

See [docs/connection-setup.md](docs/connection-setup.md) for instructions on creating the Azure connections required to run the samples.
Expand Down
11 changes: 11 additions & 0 deletions config/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ module.exports = {
rootDir: '..',
roots: ['<rootDir>/src', '<rootDir>/tests'],
testMatch: ['**/*.test.ts'],
collectCoverageFrom: [
'<rootDir>/src/azureConnectors/**/*.ts',
],
coverageThreshold: {
global: {
statements: 95,
branches: 95,
functions: 95,
lines: 95,
},
},
transform: {
'^.+\\.ts$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
},
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure/connectors",
"version": "0.2.0-preview",
"version": "0.3.0-preview",
"description": "Azure Logic Apps Connector SDK for TypeScript / Node.js",
"type": "module",
"main": "dist/cjs/azureConnectors/index.js",
Expand Down Expand Up @@ -62,7 +62,7 @@
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/node": "^26.0.0",
"@types/node": "^26.1.0",
"eslint": "^10.2.1",
"jest": "^30.3.0",
"markdownlint-cli2": "^0.23.0",
Expand Down
35 changes: 35 additions & 0 deletions samples/cjs/typescript/docusign.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) Microsoft Corporation. All rights reserved.

/**
* Docusign Connector SDK Sample - CJS TypeScript
*/

import { ManagedIdentityTokenProvider, ConnectorException } from "@azure/connectors";
import { DocusignClient, EnvelopeResendResponse } from "@azure/connectors/generated/DocusignExtensions";

const CONNECTION_URL = process.env.DOCUSIGN_CONNECTION_URL ?? "";
const DOCUSIGN_ENVELOPE_ID = process.env.DOCUSIGN_ENVELOPE_ID ?? "replace-with-envelope-id";

if (!CONNECTION_URL) {
console.error("Error: DOCUSIGN_CONNECTION_URL environment variable is not set.");
process.exit(1);
}

async function main(): Promise<void> {
const tokenProvider = new ManagedIdentityTokenProvider();
const client = new DocusignClient(CONNECTION_URL, tokenProvider);

try {
const result: EnvelopeResendResponse = await client.resendEnvelopeAsync(DOCUSIGN_ENVELOPE_ID);
console.log(`Resend result keys: ${Object.keys(result as Record<string, unknown>).join(", ")}`);
} catch (error) {
if (error instanceof ConnectorException) {
console.log(`Connector error (${error.statusCode}): ${error.message}`);
return;
}

throw error;
}
}

main().catch(console.error);
35 changes: 35 additions & 0 deletions samples/cjs/typescript/github.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) Microsoft Corporation. All rights reserved.

/**
* GitHub Connector SDK Sample - CJS TypeScript
*/

import { ManagedIdentityTokenProvider, ConnectorException } from "@azure/connectors";
import { GithubClient, RepositoryDetails } from "@azure/connectors/generated/GithubExtensions";

const CONNECTION_URL = process.env.GITHUB_CONNECTION_URL ?? "";
const GITHUB_REPOSITORY_ID = process.env.GITHUB_REPOSITORY_ID ?? "1";

if (!CONNECTION_URL) {
console.error("Error: GITHUB_CONNECTION_URL environment variable is not set.");
process.exit(1);
}

async function main(): Promise<void> {
const tokenProvider = new ManagedIdentityTokenProvider();
const client = new GithubClient(CONNECTION_URL, tokenProvider);

try {
const result: RepositoryDetails = await client.getRepositoryByIdAsync(GITHUB_REPOSITORY_ID);
console.log(`Repository id: ${String(result.id ?? "unknown")}`);
} catch (error) {
if (error instanceof ConnectorException) {
console.log(`Connector error (${error.statusCode}): ${error.message}`);
return;
}

throw error;
}
}

main().catch(console.error);
34 changes: 34 additions & 0 deletions samples/cjs/typescript/jira.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation. All rights reserved.

/**
* Jira Connector SDK Sample - CJS TypeScript
*/

import { ManagedIdentityTokenProvider, ConnectorException } from "@azure/connectors";
import { JiraClient } from "@azure/connectors/generated/JiraExtensions";

const CONNECTION_URL = process.env.JIRA_CONNECTION_URL ?? "";

if (!CONNECTION_URL) {
console.error("Error: JIRA_CONNECTION_URL environment variable is not set.");
process.exit(1);
}

async function main(): Promise<void> {
const tokenProvider = new ManagedIdentityTokenProvider();
const client = new JiraClient(CONNECTION_URL, tokenProvider);

try {
const result: Array<Record<string, unknown>> = await client.listResourcesAsync();
console.log(`Resources found: ${result.length}`);
} catch (error) {
if (error instanceof ConnectorException) {
console.log(`Connector error (${error.statusCode}): ${error.message}`);
return;
}

throw error;
}
}

main().catch(console.error);
Loading