@zapier/zapier-sdk-cli 0.18.3 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +31 -28
  3. package/dist/cli.cjs +2 -2
  4. package/dist/cli.mjs +2 -2
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.mjs +1 -1
  7. package/package.json +4 -4
  8. package/dist/package.json +0 -78
  9. package/dist/src/cli.d.ts +0 -2
  10. package/dist/src/cli.js +0 -105
  11. package/dist/src/generators/ast-generator.d.ts +0 -41
  12. package/dist/src/generators/ast-generator.js +0 -409
  13. package/dist/src/index.d.ts +0 -4
  14. package/dist/src/index.js +0 -4
  15. package/dist/src/plugins/add/index.d.ts +0 -15
  16. package/dist/src/plugins/add/index.js +0 -103
  17. package/dist/src/plugins/add/schemas.d.ts +0 -8
  18. package/dist/src/plugins/add/schemas.js +0 -22
  19. package/dist/src/plugins/buildManifest/index.d.ts +0 -13
  20. package/dist/src/plugins/buildManifest/index.js +0 -81
  21. package/dist/src/plugins/buildManifest/schemas.d.ts +0 -44
  22. package/dist/src/plugins/buildManifest/schemas.js +0 -17
  23. package/dist/src/plugins/bundleCode/index.d.ts +0 -15
  24. package/dist/src/plugins/bundleCode/index.js +0 -80
  25. package/dist/src/plugins/bundleCode/schemas.d.ts +0 -10
  26. package/dist/src/plugins/bundleCode/schemas.js +0 -19
  27. package/dist/src/plugins/generateAppTypes/index.d.ts +0 -13
  28. package/dist/src/plugins/generateAppTypes/index.js +0 -157
  29. package/dist/src/plugins/generateAppTypes/schemas.d.ts +0 -58
  30. package/dist/src/plugins/generateAppTypes/schemas.js +0 -21
  31. package/dist/src/plugins/getLoginConfigPath/index.d.ts +0 -15
  32. package/dist/src/plugins/getLoginConfigPath/index.js +0 -19
  33. package/dist/src/plugins/getLoginConfigPath/schemas.d.ts +0 -3
  34. package/dist/src/plugins/getLoginConfigPath/schemas.js +0 -5
  35. package/dist/src/plugins/index.d.ts +0 -8
  36. package/dist/src/plugins/index.js +0 -8
  37. package/dist/src/plugins/login/index.d.ts +0 -23
  38. package/dist/src/plugins/login/index.js +0 -95
  39. package/dist/src/plugins/login/schemas.d.ts +0 -5
  40. package/dist/src/plugins/login/schemas.js +0 -10
  41. package/dist/src/plugins/logout/index.d.ts +0 -15
  42. package/dist/src/plugins/logout/index.js +0 -18
  43. package/dist/src/plugins/logout/schemas.d.ts +0 -3
  44. package/dist/src/plugins/logout/schemas.js +0 -5
  45. package/dist/src/plugins/mcp/index.d.ts +0 -15
  46. package/dist/src/plugins/mcp/index.js +0 -24
  47. package/dist/src/plugins/mcp/schemas.d.ts +0 -5
  48. package/dist/src/plugins/mcp/schemas.js +0 -10
  49. package/dist/src/sdk.d.ts +0 -9
  50. package/dist/src/sdk.js +0 -24
  51. package/dist/src/telemetry/builders.d.ts +0 -42
  52. package/dist/src/telemetry/builders.js +0 -55
  53. package/dist/src/telemetry/events.d.ts +0 -37
  54. package/dist/src/telemetry/events.js +0 -4
  55. package/dist/src/types/sdk.d.ts +0 -5
  56. package/dist/src/types/sdk.js +0 -1
  57. package/dist/src/utils/api/client.d.ts +0 -15
  58. package/dist/src/utils/api/client.js +0 -27
  59. package/dist/src/utils/auth/login.d.ts +0 -7
  60. package/dist/src/utils/auth/login.js +0 -154
  61. package/dist/src/utils/cli-generator-utils.d.ts +0 -14
  62. package/dist/src/utils/cli-generator-utils.js +0 -122
  63. package/dist/src/utils/cli-generator.d.ts +0 -3
  64. package/dist/src/utils/cli-generator.js +0 -555
  65. package/dist/src/utils/constants.d.ts +0 -3
  66. package/dist/src/utils/constants.js +0 -5
  67. package/dist/src/utils/directory-detection.d.ts +0 -5
  68. package/dist/src/utils/directory-detection.js +0 -21
  69. package/dist/src/utils/errors.d.ts +0 -16
  70. package/dist/src/utils/errors.js +0 -19
  71. package/dist/src/utils/getCallablePromise.d.ts +0 -6
  72. package/dist/src/utils/getCallablePromise.js +0 -14
  73. package/dist/src/utils/log.d.ts +0 -8
  74. package/dist/src/utils/log.js +0 -21
  75. package/dist/src/utils/manifest-helpers.d.ts +0 -10
  76. package/dist/src/utils/manifest-helpers.js +0 -19
  77. package/dist/src/utils/package-manager-detector.d.ts +0 -16
  78. package/dist/src/utils/package-manager-detector.js +0 -77
  79. package/dist/src/utils/parameter-resolver.d.ts +0 -42
  80. package/dist/src/utils/parameter-resolver.js +0 -699
  81. package/dist/src/utils/schema-formatter.d.ts +0 -6
  82. package/dist/src/utils/schema-formatter.js +0 -115
  83. package/dist/src/utils/serializeAsync.d.ts +0 -2
  84. package/dist/src/utils/serializeAsync.js +0 -16
  85. package/dist/src/utils/spinner.d.ts +0 -1
  86. package/dist/src/utils/spinner.js +0 -21
  87. package/dist/src/utils/version-checker.d.ts +0 -17
  88. package/dist/src/utils/version-checker.js +0 -156
  89. package/dist/tsconfig.tsbuildinfo +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @zapier/zapier-sdk-cli
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4dd27eb: Add isExpired parameter to listAuthentications for filtering authentications by expiration status.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [4dd27eb]
12
+ - @zapier/zapier-sdk@1.1.0
13
+ - @zapier/zapier-sdk-mcp@0.4.15
14
+
3
15
  ## 0.18.3
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -287,18 +287,19 @@ Find the first authentication matching the criteria
287
287
 
288
288
  **Options:**
289
289
 
290
- | Option | Type | Required | Default | Possible Values | Description |
291
- | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------- |
292
- | `--app-key` | `string` | ❌ | — | — | App key of authentication to find (e.g., 'SlackCLIAPI' or slug like 'github') |
293
- | `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
294
- | `--title` | `string` | ❌ | — | — | Filter authentications by exact title match |
295
- | `--account-id` | `string` | ❌ | — | — | Filter by account ID |
296
- | `--owner` | `string` | ❌ | — | — | Filter by owner |
290
+ | Option | Type | Required | Default | Possible Values | Description |
291
+ | -------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
292
+ | `--app-key` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
293
+ | `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
294
+ | `--title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
295
+ | `--account-id` | `string` | ❌ | — | — | Filter authentications by account ID |
296
+ | `--owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
297
+ | `--is-expired` | `boolean` | ❌ | — | — | Filter by expired status (true = expired only, false = non-expired only) |
297
298
 
298
299
  **Usage:**
299
300
 
300
301
  ```bash
301
- npx zapier-sdk find-first-authentication [--app-key] [--search] [--title] [--account-id] [--owner]
302
+ npx zapier-sdk find-first-authentication [--app-key] [--search] [--title] [--account-id] [--owner] [--is-expired]
302
303
  ```
303
304
 
304
305
  #### `find-unique-authentication`
@@ -307,18 +308,19 @@ Find a unique authentication matching the criteria
307
308
 
308
309
  **Options:**
309
310
 
310
- | Option | Type | Required | Default | Possible Values | Description |
311
- | -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------- |
312
- | `--app-key` | `string` | ❌ | — | — | App key of authentication to find (e.g., 'SlackCLIAPI' or slug like 'github') |
313
- | `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
314
- | `--title` | `string` | ❌ | — | — | Filter authentications by exact title match |
315
- | `--account-id` | `string` | ❌ | — | — | Filter by account ID |
316
- | `--owner` | `string` | ❌ | — | — | Filter by owner |
311
+ | Option | Type | Required | Default | Possible Values | Description |
312
+ | -------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
313
+ | `--app-key` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
314
+ | `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
315
+ | `--title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
316
+ | `--account-id` | `string` | ❌ | — | — | Filter authentications by account ID |
317
+ | `--owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
318
+ | `--is-expired` | `boolean` | ❌ | — | — | Filter by expired status (true = expired only, false = non-expired only) |
317
319
 
318
320
  **Usage:**
319
321
 
320
322
  ```bash
321
- npx zapier-sdk find-unique-authentication [--app-key] [--search] [--title] [--account-id] [--owner]
323
+ npx zapier-sdk find-unique-authentication [--app-key] [--search] [--title] [--account-id] [--owner] [--is-expired]
322
324
  ```
323
325
 
324
326
  #### `get-authentication`
@@ -343,22 +345,23 @@ List available authentications with optional filtering
343
345
 
344
346
  **Options:**
345
347
 
346
- | Option | Type | Required | Default | Possible Values | Description |
347
- | ---------------------- | -------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
348
- | `--app-key` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
349
- | `--authentication-ids` | `array` | ❌ | — | — | List of authentication IDs to filter by |
350
- | `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
351
- | `--title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
352
- | `--account-id` | `string` | ❌ | — | — | Filter authentications by account ID |
353
- | `--owner` | `string` | ❌ | — | — | Filter by owner - 'me' for your own authentications or a specific user ID |
354
- | `--page-size` | `number` | ❌ | — | — | Number of authentications per page |
355
- | `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
356
- | `--cursor` | `string` | ❌ | — | — | Cursor to start from |
348
+ | Option | Type | Required | Default | Possible Values | Description |
349
+ | ---------------------- | --------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------- |
350
+ | `--app-key` | `string` | ❌ | — | — | App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github') |
351
+ | `--authentication-ids` | `array` | ❌ | — | — | List of authentication IDs to filter by |
352
+ | `--search` | `string` | ❌ | — | — | Search term to filter authentications by title |
353
+ | `--title` | `string` | ❌ | — | — | Filter authentications by exact title match (searches first, then filters locally) |
354
+ | `--account-id` | `string` | ❌ | — | — | Filter authentications by account ID |
355
+ | `--owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own authentications or a specific user ID |
356
+ | `--is-expired` | `boolean` | ❌ | — | — | Filter by expired status (true = expired only, false = non-expired only) |
357
+ | `--page-size` | `number` | ❌ | — | — | Number of authentications per page |
358
+ | `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
359
+ | `--cursor` | `string` | ❌ | — | — | Cursor to start from |
357
360
 
358
361
  **Usage:**
359
362
 
360
363
  ```bash
361
- npx zapier-sdk list-authentications [--app-key] [--authentication-ids] [--search] [--title] [--account-id] [--owner] [--page-size] [--max-items] [--cursor]
364
+ npx zapier-sdk list-authentications [--app-key] [--authentication-ids] [--search] [--title] [--account-id] [--owner] [--is-expired] [--page-size] [--max-items] [--cursor]
362
365
  ```
363
366
 
364
367
  ### HTTP Requests
package/dist/cli.cjs CHANGED
@@ -1656,7 +1656,7 @@ var LoginSchema = zod.z.object({
1656
1656
 
1657
1657
  // package.json
1658
1658
  var package_default = {
1659
- version: "0.18.3"};
1659
+ version: "0.20.0"};
1660
1660
 
1661
1661
  // src/telemetry/builders.ts
1662
1662
  function createCliBaseEvent(context = {}) {
@@ -2937,7 +2937,7 @@ function createZapierCliSdk(options = {}) {
2937
2937
  // package.json with { type: 'json' }
2938
2938
  var package_default2 = {
2939
2939
  name: "@zapier/zapier-sdk-cli",
2940
- version: "0.18.3"};
2940
+ version: "0.20.0"};
2941
2941
  function detectPackageManager(cwd = process.cwd()) {
2942
2942
  const ua = process.env.npm_config_user_agent;
2943
2943
  if (ua) {
package/dist/cli.mjs CHANGED
@@ -1620,7 +1620,7 @@ var LoginSchema = z.object({
1620
1620
 
1621
1621
  // package.json
1622
1622
  var package_default = {
1623
- version: "0.18.3"};
1623
+ version: "0.20.0"};
1624
1624
 
1625
1625
  // src/telemetry/builders.ts
1626
1626
  function createCliBaseEvent(context = {}) {
@@ -2901,7 +2901,7 @@ function createZapierCliSdk(options = {}) {
2901
2901
  // package.json with { type: 'json' }
2902
2902
  var package_default2 = {
2903
2903
  name: "@zapier/zapier-sdk-cli",
2904
- version: "0.18.3"};
2904
+ version: "0.20.0"};
2905
2905
  function detectPackageManager(cwd = process.cwd()) {
2906
2906
  const ua = process.env.npm_config_user_agent;
2907
2907
  if (ua) {
package/dist/index.cjs CHANGED
@@ -302,7 +302,7 @@ var LoginSchema = zod.z.object({
302
302
 
303
303
  // package.json
304
304
  var package_default = {
305
- version: "0.18.3"};
305
+ version: "0.20.0"};
306
306
 
307
307
  // src/telemetry/builders.ts
308
308
  function createCliBaseEvent(context = {}) {
package/dist/index.mjs CHANGED
@@ -271,7 +271,7 @@ var LoginSchema = z.object({
271
271
 
272
272
  // package.json
273
273
  var package_default = {
274
- version: "0.18.3"};
274
+ version: "0.20.0"};
275
275
 
276
276
  // src/telemetry/builders.ts
277
277
  function createCliBaseEvent(context = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-cli",
3
- "version": "0.18.3",
3
+ "version": "0.21.0",
4
4
  "description": "Command line interface for Zapier SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -53,9 +53,9 @@
53
53
  "semver": "^7.7.3",
54
54
  "typescript": "^5.8.3",
55
55
  "zod": "4.2.1",
56
- "@zapier/zapier-sdk": "1.0.3",
57
- "@zapier/zapier-sdk-mcp": "0.4.14",
58
- "@zapier/zapier-sdk-cli-login": "0.4.0"
56
+ "@zapier/zapier-sdk": "0.20.0",
57
+ "@zapier/zapier-sdk-cli-login": "0.5.0",
58
+ "@zapier/zapier-sdk-mcp": "0.5.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/express": "^5.0.3",
package/dist/package.json DELETED
@@ -1,78 +0,0 @@
1
- {
2
- "name": "@zapier/zapier-sdk-cli",
3
- "version": "0.18.3",
4
- "description": "Command line interface for Zapier SDK",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "require": {
11
- "types": "./dist/index.d.ts",
12
- "default": "./dist/index.cjs"
13
- },
14
- "import": {
15
- "types": "./dist/index.d.mts",
16
- "default": "./dist/index.mjs"
17
- }
18
- }
19
- },
20
- "bin": {
21
- "zapier-sdk": "./bin/zapier-sdk.mjs"
22
- },
23
- "scripts": {
24
- "test": "vitest",
25
- "build": "tsup",
26
- "clean": "rm -rf dist",
27
- "rebuild": "pnpm clean && pnpm build",
28
- "dev": "tsx src/cli.ts",
29
- "typecheck": "tsc --project tsconfig.build.json --noEmit",
30
- "prepublishOnly": "node ../../scripts/check-version.js"
31
- },
32
- "keywords": [
33
- "zapier",
34
- "cli",
35
- "sdk"
36
- ],
37
- "author": "",
38
- "license": "SEE LICENSE IN LICENSE",
39
- "files": [
40
- "dist",
41
- "bin",
42
- "README.md",
43
- "CHANGELOG.md"
44
- ],
45
- "publishConfig": {
46
- "access": "public"
47
- },
48
- "dependencies": {
49
- "@zapier/zapier-sdk": "workspace:*",
50
- "@zapier/zapier-sdk-cli-login": "workspace:*",
51
- "@zapier/zapier-sdk-mcp": "workspace:*",
52
- "chalk": "^5.3.0",
53
- "cli-table3": "^0.6.5",
54
- "commander": "^12.0.0",
55
- "conf": "^14.0.0",
56
- "esbuild": "^0.25.5",
57
- "express": "^5.1.0",
58
- "inquirer": "^12.6.3",
59
- "is-installed-globally": "^1.0.0",
60
- "jsonwebtoken": "^9.0.2",
61
- "open": "^10.2.0",
62
- "ora": "^8.2.0",
63
- "package-json": "^10.0.1",
64
- "pkce-challenge": "^5.0.0",
65
- "semver": "^7.7.3",
66
- "typescript": "^5.8.3",
67
- "zod": "4.2.1"
68
- },
69
- "devDependencies": {
70
- "@types/express": "^5.0.3",
71
- "@types/inquirer": "^9.0.8",
72
- "@types/jsonwebtoken": "^9.0.10",
73
- "@types/node": "^24.0.1",
74
- "@types/semver": "^7.7.1",
75
- "tsup": "^8.5.0",
76
- "vitest": "^3.2.3"
77
- }
78
- }
package/dist/src/cli.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/dist/src/cli.js DELETED
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env node
2
- import { Command, CommanderError } from "commander";
3
- import { generateCliCommands } from "./utils/cli-generator";
4
- import { createZapierCliSdk } from "./sdk";
5
- import packageJson from "../package.json" with { type: "json" };
6
- import { ZapierCliError } from "./utils/errors";
7
- import { checkAndNotifyUpdates } from "./utils/version-checker";
8
- const program = new Command();
9
- program
10
- .name("zapier-sdk")
11
- .description("CLI for Zapier SDK")
12
- .version(packageJson.version, "-v, --version", "display version number")
13
- .option("--debug", "Enable debug logging")
14
- .option("--base-url <url>", "Base URL for Zapier API endpoints")
15
- .option("--credentials <token>", "Authentication token")
16
- .option("--credentials-client-id <id>", "OAuth client ID for authentication")
17
- .option("--credentials-client-secret <secret>", "OAuth client secret for authentication")
18
- .option("--credentials-base-url <url>", "Base URL for authentication endpoints")
19
- .option("--tracking-base-url <url>", "Base URL for Zapier tracking endpoints");
20
- // Check for debug flag early (support both flag and env var)
21
- const isDebugMode = process.env.DEBUG === "true" || process.argv.includes("--debug");
22
- // Helper to get flag value from argv
23
- function getFlagValue(flagName) {
24
- const index = process.argv.indexOf(flagName);
25
- return index !== -1 ? process.argv[index + 1] : undefined;
26
- }
27
- // Extract options from process.argv for early SDK creation
28
- // We need to create the SDK before parsing to generate commands from schemas
29
- const baseUrl = getFlagValue("--base-url");
30
- const credentialsToken = getFlagValue("--credentials");
31
- const credentialsClientId = getFlagValue("--credentials-client-id");
32
- const credentialsClientSecret = getFlagValue("--credentials-client-secret");
33
- const credentialsBaseUrl = getFlagValue("--credentials-base-url");
34
- const trackingBaseUrl = getFlagValue("--tracking-base-url");
35
- // Build credentials object from flags
36
- function buildCredentialsFromFlags() {
37
- // If a direct token is provided, use it
38
- if (credentialsToken) {
39
- return credentialsToken;
40
- }
41
- // If client ID is provided, build a credentials object
42
- if (credentialsClientId) {
43
- if (credentialsClientSecret) {
44
- // Client credentials flow
45
- return {
46
- type: "client_credentials",
47
- clientId: credentialsClientId,
48
- clientSecret: credentialsClientSecret,
49
- baseUrl: credentialsBaseUrl,
50
- };
51
- }
52
- else {
53
- // PKCE flow (no secret)
54
- return {
55
- type: "pkce",
56
- clientId: credentialsClientId,
57
- baseUrl: credentialsBaseUrl,
58
- };
59
- }
60
- }
61
- // No credentials from flags - will fall back to env vars or stored login
62
- return undefined;
63
- }
64
- const credentials = buildCredentialsFromFlags();
65
- // Create CLI SDK instance with all plugins and URL options
66
- const sdk = createZapierCliSdk({
67
- debug: isDebugMode,
68
- credentials,
69
- baseUrl,
70
- trackingBaseUrl,
71
- });
72
- // Auth commands now handled by plugins
73
- // Generate CLI commands from SDK schemas (including CLI plugins)
74
- generateCliCommands(program, sdk);
75
- // MCP command now handled by plugin
76
- // Override Commander's default exit behavior to handle our custom errors
77
- program.exitOverride();
78
- (async () => {
79
- let exitCode = 0;
80
- // Start version checking non-blocking
81
- const versionCheckPromise = checkAndNotifyUpdates({
82
- packageName: packageJson.name,
83
- currentVersion: packageJson.version,
84
- });
85
- try {
86
- await program.parseAsync();
87
- }
88
- catch (error) {
89
- if (error instanceof ZapierCliError) {
90
- exitCode = error.exitCode;
91
- }
92
- else if (error instanceof CommanderError) {
93
- exitCode = error.exitCode;
94
- }
95
- else {
96
- // For any other unexpected errors, exit with code 1
97
- console.error("Unexpected error:", error);
98
- exitCode = 1;
99
- }
100
- }
101
- // Wait for version checking to complete
102
- await versionCheckPromise;
103
- // Use exitCode instead of exit() to allow stdout to flush when piped
104
- process.exitCode = exitCode;
105
- })();
@@ -1,41 +0,0 @@
1
- import type { GetSdkType, ListActionsPluginProvides, ListInputFieldsPluginProvides, ManifestPluginProvides, AppItem } from "@zapier/zapier-sdk";
2
- interface GenerateTypesOptions {
3
- app: AppItem;
4
- authenticationId?: string | number;
5
- }
6
- /**
7
- * AST-based TypeScript type generator using the TypeScript Compiler API
8
- */
9
- export declare class AstTypeGenerator {
10
- private readonly factory;
11
- private readonly printer;
12
- /**
13
- * Generate TypeScript types using AST for a specific app
14
- */
15
- generateTypes(options: GenerateTypesOptions & {
16
- sdk: GetSdkType<ListActionsPluginProvides & ListInputFieldsPluginProvides & ManifestPluginProvides>;
17
- }): Promise<string>;
18
- private createSourceFile;
19
- private createImportStatement;
20
- private createTypeImportStatement;
21
- private groupActionsByType;
22
- private createInputInterface;
23
- private createActionInterface;
24
- private createAppProxyInterface;
25
- private createFetchMethodProperty;
26
- private createAppFactoryInterface;
27
- private createAppWithFactoryType;
28
- private createModuleAugmentation;
29
- private mapFieldTypeToTypeNode;
30
- private capitalize;
31
- private sanitizeActionName;
32
- private sanitizeFieldName;
33
- private escapeComment;
34
- private createPropertyName;
35
- private isValidIdentifier;
36
- private getPreferredProgrammaticKey;
37
- private getPreferredAppName;
38
- private sanitizeToIdentifier;
39
- private getAllKeys;
40
- }
41
- export {};