@zapier/zapier-sdk-cli 0.52.10 → 0.52.12

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 (51) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +19 -1
  3. package/dist/cli.cjs +80 -82
  4. package/dist/cli.mjs +81 -83
  5. package/dist/experimental.cjs +17 -26
  6. package/dist/experimental.d.mts +1 -1
  7. package/dist/experimental.d.ts +1 -1
  8. package/dist/experimental.mjs +16 -25
  9. package/dist/index.cjs +18 -27
  10. package/dist/index.d.mts +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.mjs +16 -25
  13. package/dist/login.cjs +8 -10
  14. package/dist/login.d.mts +2 -10
  15. package/dist/login.d.ts +2 -10
  16. package/dist/login.mjs +5 -9
  17. package/dist/package.json +1 -1
  18. package/dist/{sdk-B3nKAZdN.d.mts → sdk-Sa1HjzUj.d.mts} +14 -14
  19. package/dist/{sdk-B3nKAZdN.d.ts → sdk-Sa1HjzUj.d.ts} +14 -14
  20. package/dist/src/experimental.js +29 -27
  21. package/dist/src/login/index.d.ts +1 -9
  22. package/dist/src/login/index.js +12 -14
  23. package/dist/src/plugins/add/index.d.ts +15 -15
  24. package/dist/src/plugins/add/index.js +1 -1
  25. package/dist/src/plugins/buildManifest/index.d.ts +2 -2
  26. package/dist/src/plugins/bundleCode/index.d.ts +1 -1
  27. package/dist/src/plugins/bundleCode/index.js +2 -1
  28. package/dist/src/plugins/cliOverrides/index.d.ts +5 -10
  29. package/dist/src/plugins/cliOverrides/index.js +2 -6
  30. package/dist/src/plugins/curl/index.d.ts +2 -2
  31. package/dist/src/plugins/curl/schemas.d.ts +2 -2
  32. package/dist/src/plugins/feedback/index.d.ts +1 -1
  33. package/dist/src/plugins/generateAppTypes/index.d.ts +11 -11
  34. package/dist/src/plugins/getLoginConfigPath/index.d.ts +1 -1
  35. package/dist/src/plugins/index.d.ts +1 -1
  36. package/dist/src/plugins/index.js +1 -1
  37. package/dist/src/plugins/init/index.d.ts +1 -1
  38. package/dist/src/plugins/login/index.d.ts +1 -1
  39. package/dist/src/plugins/logout/index.d.ts +1 -1
  40. package/dist/src/plugins/mcp/index.d.ts +1 -1
  41. package/dist/src/sdk.js +31 -20
  42. package/dist/src/utils/cli-generator.js +14 -7
  43. package/dist/src/utils/cli-renderer.d.ts +13 -3
  44. package/dist/src/utils/cli-renderer.js +27 -20
  45. package/dist/src/utils/log.js +9 -4
  46. package/dist/src/utils/parameter-resolver.js +3 -1
  47. package/dist/src/utils/schema-formatter.d.ts +2 -2
  48. package/dist/src/utils/schema-formatter.js +4 -30
  49. package/dist/src/utils/version-checker.js +8 -3
  50. package/dist/tsconfig.tsbuildinfo +1 -1
  51. package/package.json +3 -3
@@ -113,7 +113,7 @@ declare const buildManifestPlugin: (sdk: {
113
113
  } & {
114
114
  context: {
115
115
  meta: {
116
- listApps: _zapier_zapier_sdk.PluginMeta;
116
+ listApps: _zapier_zapier_sdk.PluginMeta<unknown>;
117
117
  };
118
118
  };
119
119
  } & {
@@ -158,7 +158,7 @@ declare const buildManifestPlugin: (sdk: {
158
158
  } & {
159
159
  context: {
160
160
  meta: {
161
- buildManifest: _zapier_zapier_sdk.PluginMeta;
161
+ buildManifest: _zapier_zapier_sdk.PluginMeta<unknown>;
162
162
  };
163
163
  };
164
164
  };
@@ -183,7 +183,7 @@ declare const feedbackPlugin: (sdk: {
183
183
  } & {
184
184
  context: {
185
185
  meta: {
186
- feedback: _zapier_zapier_sdk.PluginMeta;
186
+ feedback: _zapier_zapier_sdk.PluginMeta<unknown>;
187
187
  };
188
188
  };
189
189
  };
@@ -314,19 +314,19 @@ declare const generateAppTypesPlugin: (sdk: {
314
314
  } & {
315
315
  context: {
316
316
  meta: {
317
- listApps: _zapier_zapier_sdk.PluginMeta;
317
+ listApps: _zapier_zapier_sdk.PluginMeta<unknown>;
318
318
  };
319
319
  };
320
320
  } & {
321
321
  listActions: (options?: (({
322
322
  app: string;
323
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
323
+ actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
324
324
  pageSize?: number | undefined;
325
325
  maxItems?: number | undefined;
326
326
  cursor?: string | undefined;
327
327
  } | {
328
328
  appKey: string;
329
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
329
+ actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
330
330
  pageSize?: number | undefined;
331
331
  maxItems?: number | undefined;
332
332
  cursor?: string | undefined;
@@ -338,24 +338,24 @@ declare const generateAppTypesPlugin: (sdk: {
338
338
  description: string;
339
339
  key: string;
340
340
  app_key: string;
341
- action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
341
+ action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
342
342
  title: string;
343
343
  type: "action";
344
+ is_hidden?: boolean | undefined;
344
345
  id?: string | undefined;
345
346
  is_important?: boolean | undefined;
346
- is_hidden?: boolean | undefined;
347
347
  app_version?: string | undefined;
348
348
  }>;
349
349
  } & {
350
350
  context: {
351
351
  meta: {
352
- listActions: _zapier_zapier_sdk.PluginMeta;
352
+ listActions: _zapier_zapier_sdk.PluginMeta<unknown>;
353
353
  };
354
354
  };
355
355
  } & {
356
356
  listActionInputFields: (options?: (({
357
357
  app: string;
358
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
358
+ actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
359
359
  action: string;
360
360
  connection?: string | number | undefined;
361
361
  connectionId?: string | number | null | undefined;
@@ -366,7 +366,7 @@ declare const generateAppTypesPlugin: (sdk: {
366
366
  cursor?: string | undefined;
367
367
  } | {
368
368
  appKey: string;
369
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
369
+ actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
370
370
  actionKey: string;
371
371
  connection?: string | number | undefined;
372
372
  connectionId?: string | number | null | undefined;
@@ -403,7 +403,7 @@ declare const generateAppTypesPlugin: (sdk: {
403
403
  } & {
404
404
  context: {
405
405
  meta: {
406
- listActionInputFields: _zapier_zapier_sdk.PluginMeta;
406
+ listActionInputFields: _zapier_zapier_sdk.PluginMeta<unknown>;
407
407
  };
408
408
  };
409
409
  } & {
@@ -460,7 +460,7 @@ declare const generateAppTypesPlugin: (sdk: {
460
460
  } & {
461
461
  context: {
462
462
  meta: {
463
- listConnections: _zapier_zapier_sdk.PluginMeta;
463
+ listConnections: _zapier_zapier_sdk.PluginMeta<unknown>;
464
464
  };
465
465
  };
466
466
  } & {
@@ -505,7 +505,7 @@ declare const generateAppTypesPlugin: (sdk: {
505
505
  } & {
506
506
  context: {
507
507
  meta: {
508
- generateAppTypes: _zapier_zapier_sdk.PluginMeta;
508
+ generateAppTypes: _zapier_zapier_sdk.PluginMeta<unknown>;
509
509
  };
510
510
  };
511
511
  };
@@ -113,7 +113,7 @@ declare const buildManifestPlugin: (sdk: {
113
113
  } & {
114
114
  context: {
115
115
  meta: {
116
- listApps: _zapier_zapier_sdk.PluginMeta;
116
+ listApps: _zapier_zapier_sdk.PluginMeta<unknown>;
117
117
  };
118
118
  };
119
119
  } & {
@@ -158,7 +158,7 @@ declare const buildManifestPlugin: (sdk: {
158
158
  } & {
159
159
  context: {
160
160
  meta: {
161
- buildManifest: _zapier_zapier_sdk.PluginMeta;
161
+ buildManifest: _zapier_zapier_sdk.PluginMeta<unknown>;
162
162
  };
163
163
  };
164
164
  };
@@ -183,7 +183,7 @@ declare const feedbackPlugin: (sdk: {
183
183
  } & {
184
184
  context: {
185
185
  meta: {
186
- feedback: _zapier_zapier_sdk.PluginMeta;
186
+ feedback: _zapier_zapier_sdk.PluginMeta<unknown>;
187
187
  };
188
188
  };
189
189
  };
@@ -314,19 +314,19 @@ declare const generateAppTypesPlugin: (sdk: {
314
314
  } & {
315
315
  context: {
316
316
  meta: {
317
- listApps: _zapier_zapier_sdk.PluginMeta;
317
+ listApps: _zapier_zapier_sdk.PluginMeta<unknown>;
318
318
  };
319
319
  };
320
320
  } & {
321
321
  listActions: (options?: (({
322
322
  app: string;
323
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
323
+ actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
324
324
  pageSize?: number | undefined;
325
325
  maxItems?: number | undefined;
326
326
  cursor?: string | undefined;
327
327
  } | {
328
328
  appKey: string;
329
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
329
+ actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
330
330
  pageSize?: number | undefined;
331
331
  maxItems?: number | undefined;
332
332
  cursor?: string | undefined;
@@ -338,24 +338,24 @@ declare const generateAppTypesPlugin: (sdk: {
338
338
  description: string;
339
339
  key: string;
340
340
  app_key: string;
341
- action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
341
+ action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
342
342
  title: string;
343
343
  type: "action";
344
+ is_hidden?: boolean | undefined;
344
345
  id?: string | undefined;
345
346
  is_important?: boolean | undefined;
346
- is_hidden?: boolean | undefined;
347
347
  app_version?: string | undefined;
348
348
  }>;
349
349
  } & {
350
350
  context: {
351
351
  meta: {
352
- listActions: _zapier_zapier_sdk.PluginMeta;
352
+ listActions: _zapier_zapier_sdk.PluginMeta<unknown>;
353
353
  };
354
354
  };
355
355
  } & {
356
356
  listActionInputFields: (options?: (({
357
357
  app: string;
358
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
358
+ actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
359
359
  action: string;
360
360
  connection?: string | number | undefined;
361
361
  connectionId?: string | number | null | undefined;
@@ -366,7 +366,7 @@ declare const generateAppTypesPlugin: (sdk: {
366
366
  cursor?: string | undefined;
367
367
  } | {
368
368
  appKey: string;
369
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
369
+ actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
370
370
  actionKey: string;
371
371
  connection?: string | number | undefined;
372
372
  connectionId?: string | number | null | undefined;
@@ -403,7 +403,7 @@ declare const generateAppTypesPlugin: (sdk: {
403
403
  } & {
404
404
  context: {
405
405
  meta: {
406
- listActionInputFields: _zapier_zapier_sdk.PluginMeta;
406
+ listActionInputFields: _zapier_zapier_sdk.PluginMeta<unknown>;
407
407
  };
408
408
  };
409
409
  } & {
@@ -460,7 +460,7 @@ declare const generateAppTypesPlugin: (sdk: {
460
460
  } & {
461
461
  context: {
462
462
  meta: {
463
- listConnections: _zapier_zapier_sdk.PluginMeta;
463
+ listConnections: _zapier_zapier_sdk.PluginMeta<unknown>;
464
464
  };
465
465
  };
466
466
  } & {
@@ -505,7 +505,7 @@ declare const generateAppTypesPlugin: (sdk: {
505
505
  } & {
506
506
  context: {
507
507
  meta: {
508
- generateAppTypes: _zapier_zapier_sdk.PluginMeta;
508
+ generateAppTypes: _zapier_zapier_sdk.PluginMeta<unknown>;
509
509
  };
510
510
  };
511
511
  };
@@ -14,8 +14,8 @@
14
14
  * factories are kept in sync by shape tests.
15
15
  */
16
16
  import * as cliLogin from "./login";
17
- import { createZapierSdk, injectCliLogin, } from "@zapier/zapier-sdk/experimental";
18
- import { loginPlugin, logoutPlugin, mcpPlugin, bundleCodePlugin, getLoginConfigPathPlugin, addPlugin, generateAppTypesPlugin, buildManifestPlugin, feedbackPlugin, curlPlugin, cliOverridesPlugin, initPlugin, drainTriggerInboxCliPlugin, watchTriggerInboxCliPlugin, } from "./plugins/index";
17
+ import { addPlugin, createZapierSdkStack, injectCliLogin, } from "@zapier/zapier-sdk/experimental";
18
+ import { loginPlugin, logoutPlugin, mcpPlugin, bundleCodePlugin, getLoginConfigPathPlugin, addAppsPlugin, generateAppTypesPlugin, buildManifestPlugin, feedbackPlugin, curlPlugin, cliOverridesPlugin, initPlugin, drainTriggerInboxCliPlugin, watchTriggerInboxCliPlugin, } from "./plugins/index";
19
19
  import packageJson from "../package.json" with { type: "json" };
20
20
  injectCliLogin(cliLogin);
21
21
  /**
@@ -38,46 +38,48 @@ export function createZapierCliSdk(options = {}) {
38
38
  const experimentalContextPlugin = () => ({
39
39
  context: { experimental: true },
40
40
  });
41
- let chain = createZapierSdk({
41
+ const sdk = createZapierSdkStack({
42
42
  ...sdkOptions,
43
43
  eventEmission: { ...sdkOptions.eventEmission, callContext: "cli" },
44
44
  callerPackage: { name: packageJson.name, version: packageJson.version },
45
45
  })
46
- .addPlugin(extensionsContextPlugin)
47
- .addPlugin(experimentalContextPlugin)
48
- .addPlugin(generateAppTypesPlugin)
49
- .addPlugin(buildManifestPlugin)
50
- .addPlugin(bundleCodePlugin)
51
- .addPlugin(getLoginConfigPathPlugin)
52
- .addPlugin(addPlugin)
53
- .addPlugin(feedbackPlugin)
54
- .addPlugin(curlPlugin)
55
- .addPlugin(initPlugin)
46
+ .use(extensionsContextPlugin)
47
+ .use(experimentalContextPlugin)
48
+ .use(generateAppTypesPlugin)
49
+ .use(buildManifestPlugin)
50
+ .use(bundleCodePlugin)
51
+ .use(getLoginConfigPathPlugin)
52
+ .use(addAppsPlugin)
53
+ .use(feedbackPlugin)
54
+ .use(curlPlugin)
55
+ .use(initPlugin)
56
56
  // Trigger inbox commands: the SDK's `drainTriggerInbox` and
57
57
  // `watchTriggerInbox` are eager, callback-driven methods. Both CLI
58
58
  // plugins override them to layer presentation flags (`--json`,
59
59
  // interactive prompt, `--exec-shell` wrapping) around the same
60
60
  // `onMessage` callback. `override: true` is the documented opt-in
61
61
  // for intentional same-name replacement.
62
- .addPlugin(drainTriggerInboxCliPlugin, { override: true })
63
- .addPlugin(watchTriggerInboxCliPlugin, { override: true })
64
- .addPlugin(mcpPlugin)
65
- .addPlugin(loginPlugin)
66
- .addPlugin(logoutPlugin)
67
- .addPlugin(cliOverridesPlugin);
68
- // Construct extensions defensively. The loader (`utils/extensions.ts`)
69
- // already isolates *load*-time failures (failed dynamic imports);
70
- // here we cover the second failure mode — a successfully-imported
71
- // plugin that throws during construction (bad context lookup, schema
72
- // build error, composePlugins collision, etc.). Honors the
73
- // design-doc promise that "a broken extension does not kill the CLI."
62
+ .use(drainTriggerInboxCliPlugin, { override: true })
63
+ .use(watchTriggerInboxCliPlugin, { override: true })
64
+ .use(mcpPlugin)
65
+ .use(loginPlugin)
66
+ .use(logoutPlugin)
67
+ // cliOverridesPlugin patches existing meta entries (e.g. flags `fetch`
68
+ // as deprecated) without re-registering the method. `.use` throws on
69
+ // meta-key collisions by default, so the intent has to be explicit.
70
+ .use(cliOverridesPlugin, { override: true })
71
+ .toSdk();
72
+ // Construct extensions defensively. See `./sdk.ts` for the rationale;
73
+ // `addPlugin` mutates the sdk in place, atomically (validate-then-
74
+ // apply), so a failed extension leaves the sdk in its prior state
75
+ // and skipping is safe.
74
76
  for (const ext of extensions) {
75
77
  try {
76
- chain = chain.addPlugin(ext);
78
+ addPlugin(sdk, ext);
77
79
  }
78
80
  catch (err) {
79
81
  console.warn(`Extension plugin failed to construct: ${err.message}; skipping.`);
80
82
  }
81
83
  }
82
- return chain;
84
+ return sdk;
83
85
  }
@@ -6,15 +6,7 @@
6
6
  */
7
7
  export { DEFAULT_AUTH_BASE_URL, getConfig } from "./config";
8
8
  export { createCache } from "./filesystem-cache";
9
- /**
10
- * Authentication error for token refresh failures.
11
- * This is a standalone clone of ZapierAuthenticationError from the SDK.
12
- * We can't import from SDK because cli-login must remain a standalone package
13
- * with no SDK dependencies. The SDK recognizes this error by name.
14
- */
15
- export declare class ZapierAuthenticationError extends Error {
16
- constructor(message: string);
17
- }
9
+ export { ZapierAuthenticationError } from "@zapier/zapier-sdk";
18
10
  export interface PkceCredentials {
19
11
  type: "pkce";
20
12
  clientId: string;
@@ -10,18 +10,14 @@ import { clearLegacyJwtConfigKeys } from "./legacy-jwt";
10
10
  import { getConfig, resetConfig, DEFAULT_AUTH_BASE_URL } from "./config";
11
11
  export { DEFAULT_AUTH_BASE_URL, getConfig } from "./config";
12
12
  export { createCache } from "./filesystem-cache";
13
- /**
14
- * Authentication error for token refresh failures.
15
- * This is a standalone clone of ZapierAuthenticationError from the SDK.
16
- * We can't import from SDK because cli-login must remain a standalone package
17
- * with no SDK dependencies. The SDK recognizes this error by name.
18
- */
19
- export class ZapierAuthenticationError extends Error {
20
- constructor(message) {
21
- super(message);
22
- this.name = "ZapierAuthenticationError";
23
- }
24
- }
13
+ // Authentication error for token refresh failures. Re-exported from
14
+ // `@zapier/zapier-sdk` so existing cli-login callers (and tests) can
15
+ // import it from here without reaching into the SDK directly. Sharing
16
+ // one class identity across packages keeps `instanceof
17
+ // ZapierAuthenticationError` working when the SDK catches errors
18
+ // thrown by cli-login's refresh flow.
19
+ export { ZapierAuthenticationError } from "@zapier/zapier-sdk";
20
+ import { ZapierAuthenticationError } from "@zapier/zapier-sdk";
25
21
  // Default OAuth client ID
26
22
  const DEFAULT_AUTH_CLIENT_ID = "grwWZD5hUWGvb4V8ODBuOtXer3h0DBEZ2HR8aay6";
27
23
  // Buffer time before token expiration to trigger refresh (5 minutes)
@@ -35,11 +31,13 @@ function createDebugLog(enabled) {
35
31
  return () => { };
36
32
  }
37
33
  return (message, data) => {
34
+ // stderr keeps debug output out of stdout so it never breaks callers
35
+ // that pipe CLI output through jq, > redirect, or JSON.parse.
38
36
  if (data === undefined) {
39
- console.log(`[Zapier SDK CLI Login] ${message}`);
37
+ console.error(`[Zapier SDK CLI Login] ${message}`);
40
38
  }
41
39
  else {
42
- console.log(`[Zapier SDK CLI Login] ${message}`, data);
40
+ console.error(`[Zapier SDK CLI Login] ${message}`, data);
43
41
  }
44
42
  };
45
43
  }
@@ -1,4 +1,4 @@
1
- export declare const addPlugin: (sdk: {
1
+ export declare const addAppsPlugin: (sdk: {
2
2
  listApps: (options?: ({
3
3
  search?: string | undefined;
4
4
  apps?: string[] | undefined;
@@ -66,19 +66,19 @@ export declare const addPlugin: (sdk: {
66
66
  } & {
67
67
  context: {
68
68
  meta: {
69
- listApps: import("@zapier/zapier-sdk").PluginMeta;
69
+ listApps: import("@zapier/zapier-sdk").PluginMeta<unknown>;
70
70
  };
71
71
  };
72
72
  } & {
73
73
  listActions: (options?: (({
74
74
  app: string;
75
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
75
+ actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
76
76
  pageSize?: number | undefined;
77
77
  maxItems?: number | undefined;
78
78
  cursor?: string | undefined;
79
79
  } | {
80
80
  appKey: string;
81
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
81
+ actionType?: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run" | undefined;
82
82
  pageSize?: number | undefined;
83
83
  maxItems?: number | undefined;
84
84
  cursor?: string | undefined;
@@ -90,24 +90,24 @@ export declare const addPlugin: (sdk: {
90
90
  description: string;
91
91
  key: string;
92
92
  app_key: string;
93
- action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
93
+ action_type: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
94
94
  title: string;
95
95
  type: "action";
96
+ is_hidden?: boolean | undefined;
96
97
  id?: string | undefined;
97
98
  is_important?: boolean | undefined;
98
- is_hidden?: boolean | undefined;
99
99
  app_version?: string | undefined;
100
100
  }>;
101
101
  } & {
102
102
  context: {
103
103
  meta: {
104
- listActions: import("@zapier/zapier-sdk").PluginMeta;
104
+ listActions: import("@zapier/zapier-sdk").PluginMeta<unknown>;
105
105
  };
106
106
  };
107
107
  } & {
108
108
  listActionInputFields: (options?: (({
109
109
  app: string;
110
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
110
+ actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
111
111
  action: string;
112
112
  connection?: string | number | undefined;
113
113
  connectionId?: string | number | null | undefined;
@@ -118,7 +118,7 @@ export declare const addPlugin: (sdk: {
118
118
  cursor?: string | undefined;
119
119
  } | {
120
120
  appKey: string;
121
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
121
+ actionType: "read" | "read_bulk" | "write" | "search" | "search_or_write" | "search_and_write" | "filter" | "run";
122
122
  actionKey: string;
123
123
  connection?: string | number | undefined;
124
124
  connectionId?: string | number | null | undefined;
@@ -155,7 +155,7 @@ export declare const addPlugin: (sdk: {
155
155
  } & {
156
156
  context: {
157
157
  meta: {
158
- listActionInputFields: import("@zapier/zapier-sdk").PluginMeta;
158
+ listActionInputFields: import("@zapier/zapier-sdk").PluginMeta<unknown>;
159
159
  };
160
160
  };
161
161
  } & {
@@ -212,7 +212,7 @@ export declare const addPlugin: (sdk: {
212
212
  } & {
213
213
  context: {
214
214
  meta: {
215
- listConnections: import("@zapier/zapier-sdk").PluginMeta;
215
+ listConnections: import("@zapier/zapier-sdk").PluginMeta<unknown>;
216
216
  };
217
217
  };
218
218
  } & {
@@ -220,7 +220,7 @@ export declare const addPlugin: (sdk: {
220
220
  } & {
221
221
  context: {
222
222
  meta: {
223
- buildManifest: import("@zapier/zapier-sdk").PluginMeta;
223
+ buildManifest: import("@zapier/zapier-sdk").PluginMeta<unknown>;
224
224
  };
225
225
  };
226
226
  } & {
@@ -228,7 +228,7 @@ export declare const addPlugin: (sdk: {
228
228
  } & {
229
229
  context: {
230
230
  meta: {
231
- generateAppTypes: import("@zapier/zapier-sdk").PluginMeta;
231
+ generateAppTypes: import("@zapier/zapier-sdk").PluginMeta<unknown>;
232
232
  };
233
233
  };
234
234
  } & {
@@ -247,8 +247,8 @@ export declare const addPlugin: (sdk: {
247
247
  } & {
248
248
  context: {
249
249
  meta: {
250
- add: import("@zapier/zapier-sdk").PluginMeta;
250
+ add: import("@zapier/zapier-sdk").PluginMeta<unknown>;
251
251
  };
252
252
  };
253
253
  };
254
- export type AddPluginProvides = ReturnType<typeof addPlugin>;
254
+ export type AddAppsPluginProvides = ReturnType<typeof addAppsPlugin>;
@@ -2,7 +2,7 @@ import { createPluginMethod, definePlugin } from "@zapier/zapier-sdk";
2
2
  import { AddSchema } from "./schemas";
3
3
  import { detectTypesOutputDirectory } from "../../utils/directory-detection";
4
4
  import { resolve } from "path";
5
- export const addPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
5
+ export const addAppsPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
6
6
  name: "add",
7
7
  categories: ["utility"],
8
8
  inputSchema: AddSchema,
@@ -68,7 +68,7 @@ export declare const buildManifestPlugin: (sdk: {
68
68
  } & {
69
69
  context: {
70
70
  meta: {
71
- listApps: import("@zapier/zapier-sdk").PluginMeta;
71
+ listApps: import("@zapier/zapier-sdk").PluginMeta<unknown>;
72
72
  };
73
73
  };
74
74
  } & {
@@ -113,7 +113,7 @@ export declare const buildManifestPlugin: (sdk: {
113
113
  } & {
114
114
  context: {
115
115
  meta: {
116
- buildManifest: import("@zapier/zapier-sdk").PluginMeta;
116
+ buildManifest: import("@zapier/zapier-sdk").PluginMeta<unknown>;
117
117
  };
118
118
  };
119
119
  };
@@ -16,7 +16,7 @@ export declare const bundleCodePlugin: (sdk: {
16
16
  } & {
17
17
  context: {
18
18
  meta: {
19
- bundleCode: import("@zapier/zapier-sdk").PluginMeta;
19
+ bundleCode: import("@zapier/zapier-sdk").PluginMeta<unknown>;
20
20
  };
21
21
  };
22
22
  };
@@ -5,7 +5,8 @@ import * as fs from "fs";
5
5
  import * as path from "path";
6
6
  export const bundleCodePlugin = definePlugin((sdk) => createPluginMethod(sdk, {
7
7
  name: "bundleCode",
8
- categories: ["utility", "deprecated"],
8
+ categories: ["utility"],
9
+ deprecation: { message: "bundleCode is no longer maintained." },
9
10
  inputSchema: BundleCodeSchema,
10
11
  handler: async ({ options }) => bundleCode(options),
11
12
  }));
@@ -1,16 +1,12 @@
1
- import type { FunctionDeprecation, PluginMeta } from "@zapier/zapier-sdk";
2
- interface FetchMeta {
3
- categories?: string[];
4
- deprecation?: FunctionDeprecation;
5
- }
1
+ import type { PluginMeta } from "@zapier/zapier-sdk";
6
2
  /**
7
- * CLI-specific metadata overrides.
8
- * Adds "deprecated" category to fetch so it's hidden from CLI help.
3
+ * CLI-specific metadata overrides. Tags `fetch` with a deprecation so the
4
+ * CLI help hides it and a deprecation warning fires when it's invoked.
9
5
  */
10
6
  export declare const cliOverridesPlugin: (sdk: {
11
7
  context: {
12
8
  meta: {
13
- fetch?: FetchMeta;
9
+ fetch?: PluginMeta;
14
10
  };
15
11
  };
16
12
  } & {
@@ -19,8 +15,7 @@ export declare const cliOverridesPlugin: (sdk: {
19
15
  };
20
16
  }) => {
21
17
  context: {
22
- meta: Record<string, PluginMeta>;
18
+ meta: Record<string, PluginMeta<unknown>>;
23
19
  };
24
20
  };
25
21
  export type CliOverridesProvides = ReturnType<typeof cliOverridesPlugin>;
26
- export {};
@@ -1,17 +1,13 @@
1
1
  import { definePlugin } from "@zapier/zapier-sdk";
2
2
  /**
3
- * CLI-specific metadata overrides.
4
- * Adds "deprecated" category to fetch so it's hidden from CLI help.
3
+ * CLI-specific metadata overrides. Tags `fetch` with a deprecation so the
4
+ * CLI help hides it and a deprecation warning fires when it's invoked.
5
5
  */
6
6
  export const cliOverridesPlugin = definePlugin((sdk) => {
7
7
  const meta = {};
8
8
  if (sdk.context.meta.fetch) {
9
9
  meta.fetch = {
10
10
  ...sdk.context.meta.fetch,
11
- categories: [
12
- ...(sdk.context.meta.fetch.categories || []),
13
- "deprecated",
14
- ],
15
11
  deprecation: {
16
12
  message: "This command is deprecated and will be removed soon. Use `curl` instead. Learn more: https://docs.zapier.com/sdk/cli-reference#curl",
17
13
  },
@@ -15,10 +15,10 @@ export declare const curlPlugin: (sdk: {
15
15
  inputSchema: import("zod").ZodObject<{
16
16
  url: import("zod").ZodString;
17
17
  request: import("zod").ZodOptional<import("zod").ZodEnum<{
18
- POST: "POST";
19
18
  GET: "GET";
20
- PUT: "PUT";
19
+ POST: "POST";
21
20
  DELETE: "DELETE";
21
+ PUT: "PUT";
22
22
  PATCH: "PATCH";
23
23
  HEAD: "HEAD";
24
24
  OPTIONS: "OPTIONS";
@@ -2,10 +2,10 @@ import { z } from "zod";
2
2
  export declare const CurlSchema: z.ZodObject<{
3
3
  url: z.ZodString;
4
4
  request: z.ZodOptional<z.ZodEnum<{
5
- POST: "POST";
6
5
  GET: "GET";
7
- PUT: "PUT";
6
+ POST: "POST";
8
7
  DELETE: "DELETE";
8
+ PUT: "PUT";
9
9
  PATCH: "PATCH";
10
10
  HEAD: "HEAD";
11
11
  OPTIONS: "OPTIONS";
@@ -17,7 +17,7 @@ export declare const feedbackPlugin: (sdk: {
17
17
  } & {
18
18
  context: {
19
19
  meta: {
20
- feedback: import("@zapier/zapier-sdk").PluginMeta;
20
+ feedback: import("@zapier/zapier-sdk").PluginMeta<unknown>;
21
21
  };
22
22
  };
23
23
  };