@zapier/zapier-sdk 0.36.0 → 0.38.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 (82) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/CLAUDE.md +50 -0
  3. package/README.md +147 -81
  4. package/dist/index.cjs +417 -166
  5. package/dist/index.d.mts +99 -13
  6. package/dist/index.d.ts +3 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +5 -0
  9. package/dist/index.mjs +413 -167
  10. package/dist/plugins/apps/index.d.ts.map +1 -1
  11. package/dist/plugins/apps/index.js +61 -24
  12. package/dist/plugins/apps/schemas.d.ts +4 -1
  13. package/dist/plugins/apps/schemas.d.ts.map +1 -1
  14. package/dist/plugins/apps/schemas.js +4 -2
  15. package/dist/plugins/capabilities/index.d.ts +22 -0
  16. package/dist/plugins/capabilities/index.d.ts.map +1 -0
  17. package/dist/plugins/capabilities/index.js +76 -0
  18. package/dist/plugins/connections/index.d.ts +11 -0
  19. package/dist/plugins/connections/index.d.ts.map +1 -0
  20. package/dist/plugins/connections/index.js +21 -0
  21. package/dist/plugins/fetch/index.d.ts +4 -1
  22. package/dist/plugins/fetch/index.d.ts.map +1 -1
  23. package/dist/plugins/fetch/index.js +9 -3
  24. package/dist/plugins/fetch/schemas.d.ts +1 -0
  25. package/dist/plugins/fetch/schemas.d.ts.map +1 -1
  26. package/dist/plugins/fetch/schemas.js +2 -1
  27. package/dist/plugins/findFirstConnection/schemas.d.ts +1 -0
  28. package/dist/plugins/findFirstConnection/schemas.d.ts.map +1 -1
  29. package/dist/plugins/findUniqueConnection/schemas.d.ts +1 -0
  30. package/dist/plugins/findUniqueConnection/schemas.d.ts.map +1 -1
  31. package/dist/plugins/listConnections/index.d.ts +2 -1
  32. package/dist/plugins/listConnections/index.d.ts.map +1 -1
  33. package/dist/plugins/listConnections/index.js +10 -3
  34. package/dist/plugins/listConnections/schemas.d.ts +1 -0
  35. package/dist/plugins/listConnections/schemas.d.ts.map +1 -1
  36. package/dist/plugins/listConnections/schemas.js +5 -0
  37. package/dist/plugins/manifest/index.d.ts +3 -0
  38. package/dist/plugins/manifest/index.d.ts.map +1 -1
  39. package/dist/plugins/manifest/index.js +15 -6
  40. package/dist/plugins/manifest/schemas.d.ts +36 -7
  41. package/dist/plugins/manifest/schemas.d.ts.map +1 -1
  42. package/dist/plugins/manifest/schemas.js +17 -10
  43. package/dist/plugins/runAction/index.d.ts +2 -1
  44. package/dist/plugins/runAction/index.d.ts.map +1 -1
  45. package/dist/plugins/runAction/index.js +8 -3
  46. package/dist/plugins/runAction/schemas.d.ts +1 -0
  47. package/dist/plugins/runAction/schemas.d.ts.map +1 -1
  48. package/dist/plugins/runAction/schemas.js +2 -1
  49. package/dist/plugins/tables/deleteTable/index.d.ts +2 -1
  50. package/dist/plugins/tables/deleteTable/index.d.ts.map +1 -1
  51. package/dist/plugins/tables/deleteTable/index.js +1 -0
  52. package/dist/plugins/tables/listTables/index.d.ts +2 -1
  53. package/dist/plugins/tables/listTables/index.d.ts.map +1 -1
  54. package/dist/plugins/tables/listTables/index.js +14 -6
  55. package/dist/plugins/tables/listTables/schemas.d.ts +1 -0
  56. package/dist/plugins/tables/listTables/schemas.d.ts.map +1 -1
  57. package/dist/plugins/tables/listTables/schemas.js +5 -1
  58. package/dist/resolvers/connectionId.d.ts.map +1 -1
  59. package/dist/resolvers/connectionId.js +13 -23
  60. package/dist/resolvers/tableId.d.ts.map +1 -1
  61. package/dist/resolvers/tableId.js +17 -6
  62. package/dist/sdk.d.ts +6 -1
  63. package/dist/sdk.d.ts.map +1 -1
  64. package/dist/sdk.js +6 -0
  65. package/dist/types/connections.d.ts +19 -0
  66. package/dist/types/connections.d.ts.map +1 -0
  67. package/dist/types/connections.js +18 -0
  68. package/dist/types/properties.d.ts +2 -0
  69. package/dist/types/properties.d.ts.map +1 -1
  70. package/dist/types/properties.js +3 -0
  71. package/dist/types/sdk.d.ts +3 -0
  72. package/dist/types/sdk.d.ts.map +1 -1
  73. package/dist/types/sdk.js +9 -0
  74. package/dist/utils/domain-utils.d.ts +15 -0
  75. package/dist/utils/domain-utils.d.ts.map +1 -1
  76. package/dist/utils/domain-utils.js +30 -0
  77. package/dist/utils/pagination-utils.d.ts +6 -0
  78. package/dist/utils/pagination-utils.d.ts.map +1 -1
  79. package/dist/utils/pagination-utils.js +8 -0
  80. package/dist/utils/schema-utils.d.ts +6 -1
  81. package/dist/utils/schema-utils.d.ts.map +1 -1
  82. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/apps/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAEZ,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGlE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,CAAC;CACnB;AAsKD,eAAO,MAAM,UAAU,EAAE,MAAM,CAC7B,UAAU,CAAC,mBAAmB,GAAG,uBAAuB,CAAC,EAAE,oCAAoC;AAC/F,EAAE,EAAE,0BAA0B;AAC9B,kBAAkB,CA2BnB,CAAC;AAGF,YAAY,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAI7D,MAAM,WAAW,aAAa;CAAG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/apps/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAEZ,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGlE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,CAAC;CACnB;AAyOD,eAAO,MAAM,UAAU,EAAE,MAAM,CAC7B,UAAU,CAAC,mBAAmB,GAAG,uBAAuB,CAAC,EAAE,oCAAoC;AAC/F,EAAE,EAAE,0BAA0B;AAC9B,kBAAkB,CA2BnB,CAAC;AAGF,YAAY,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAI7D,MAAM,WAAW,aAAa;CAAG"}
@@ -1,57 +1,91 @@
1
1
  import { ActionExecutionInputSchema, AppFactoryInputSchema } from "./schemas";
2
2
  import { ZapierValidationError } from "../../types/errors";
3
3
  import { ActionResultItemSchema } from "../../schemas/Run";
4
- function createActionFunction(appKey, actionType, actionKey, options, pinnedAuthId) {
4
+ /**
5
+ * Resolves which connection params to forward, choosing per-call values over pinned (factory) values.
6
+ * Validates mutual exclusivity and that at least one connection is specified.
7
+ */
8
+ function resolveProxyConnection({ providedConnectionId, providedConnection, providedAuthenticationId, pinnedAuthId, pinnedConnection, errorContext, }) {
9
+ const hasDirectId = providedConnectionId != null || providedAuthenticationId != null;
10
+ if (hasDirectId && providedConnection != null) {
11
+ throw new ZapierValidationError("Cannot specify both connectionId/authenticationId and connection. Use connectionId for a direct ID, or connection for an alias or numeric ID.");
12
+ }
13
+ const hasPerCall = providedConnectionId != null ||
14
+ providedConnection != null ||
15
+ providedAuthenticationId != null;
16
+ let finalConnectionId;
17
+ let finalConnection;
18
+ if (hasPerCall) {
19
+ finalConnectionId = providedConnectionId ?? providedAuthenticationId;
20
+ finalConnection =
21
+ finalConnectionId != null ? undefined : providedConnection;
22
+ }
23
+ else {
24
+ finalConnectionId = pinnedAuthId;
25
+ finalConnection = pinnedAuthId != null ? undefined : pinnedConnection;
26
+ }
27
+ if (finalConnectionId == null && finalConnection == null) {
28
+ throw new ZapierValidationError(errorContext);
29
+ }
30
+ return { connectionId: finalConnectionId, connection: finalConnection };
31
+ }
32
+ function createActionFunction(appKey, actionType, actionKey, options, pinnedAuthId, pinnedConnection) {
5
33
  return (actionOptions = {}) => {
6
34
  const { sdk } = options;
7
- const { inputs, connectionId: providedConnectionId, authenticationId: providedAuthenticationId, timeoutMs, } = actionOptions;
8
- // Use pinned auth ID first, then provided connectionId, then deprecated authenticationId
9
- const resolvedConnectionId = pinnedAuthId ?? providedConnectionId ?? providedAuthenticationId;
10
- if (!resolvedConnectionId) {
11
- throw new ZapierValidationError(`Connection ID is required. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }) or provide connectionId in the action call.`);
12
- }
13
- // Call sdk.runAction with the resolved parameters
35
+ const { inputs, connectionId: providedConnectionId, connection: providedConnection, authenticationId: providedAuthenticationId, timeoutMs, } = actionOptions;
36
+ const { connectionId, connection } = resolveProxyConnection({
37
+ providedConnectionId,
38
+ providedConnection,
39
+ providedAuthenticationId,
40
+ pinnedAuthId,
41
+ pinnedConnection,
42
+ errorContext: `Connection is required. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }) or sdk.apps.${appKey}({ connection: "name" }), or provide connectionId/connection in the action call.`,
43
+ });
14
44
  return sdk.runAction({
15
45
  appKey,
16
46
  actionType: actionType,
17
47
  actionKey,
18
48
  inputs,
19
- connectionId: resolvedConnectionId,
49
+ connectionId,
50
+ connection,
20
51
  timeoutMs,
21
52
  });
22
53
  };
23
54
  }
24
- function createActionTypeProxy(appKey, actionType, options, pinnedAuthId) {
55
+ function createActionTypeProxy(appKey, actionType, options, pinnedAuthId, pinnedConnection) {
25
56
  // Special handling for "fetch" action type
26
57
  if (actionType === "fetch") {
27
58
  return async (url, init) => {
28
59
  const { sdk } = options;
29
- // Use pinned auth ID first, then provided connectionId, then deprecated authenticationId
30
- const resolvedConnectionId = pinnedAuthId ?? init?.connectionId ?? init?.authenticationId;
31
- if (!resolvedConnectionId) {
32
- throw new ZapierValidationError(`Connection ID is required for fetch. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }).fetch(...) or provide connectionId in the fetch call.`);
33
- }
34
- // Call sdk.fetch with the resolved connectionId
60
+ const { connectionId, connection } = resolveProxyConnection({
61
+ providedConnectionId: init?.connectionId,
62
+ providedConnection: init?.connection,
63
+ providedAuthenticationId: init?.authenticationId,
64
+ pinnedAuthId,
65
+ pinnedConnection,
66
+ errorContext: `Connection is required for fetch. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }).fetch(...) or provide connectionId/connection in the fetch call.`,
67
+ });
35
68
  return sdk.fetch(url, {
36
69
  ...init,
37
- connectionId: resolvedConnectionId,
70
+ connectionId,
71
+ connection,
38
72
  });
39
73
  };
40
74
  }
41
75
  return new Proxy({}, {
42
76
  get(_, actionKey) {
43
77
  if (typeof actionKey === "string") {
44
- return createActionFunction(appKey, actionType, actionKey, options, pinnedAuthId);
78
+ return createActionFunction(appKey, actionType, actionKey, options, pinnedAuthId, pinnedConnection);
45
79
  }
46
80
  return undefined;
47
81
  },
48
82
  });
49
83
  }
50
- function createPinnedAppProxy(appKey, options, pinnedAuthId) {
84
+ function createPinnedAppProxy(appKey, options, pinnedAuthId, pinnedConnection) {
51
85
  return new Proxy({}, {
52
86
  get(_, actionType) {
53
87
  if (typeof actionType === "string") {
54
- return createActionTypeProxy(appKey, actionType, options, pinnedAuthId);
88
+ return createActionTypeProxy(appKey, actionType, options, pinnedAuthId, pinnedConnection);
55
89
  }
56
90
  return undefined;
57
91
  },
@@ -60,12 +94,15 @@ function createPinnedAppProxy(appKey, options, pinnedAuthId) {
60
94
  function createAppProxy(appKey, options) {
61
95
  // Create the factory function that returns a pinned version
62
96
  const appFactory = (factoryOptions) => {
63
- // Support both connectionId (new) and authenticationId (deprecated)
64
97
  const resolvedConnectionId = factoryOptions.connectionId ?? factoryOptions.authenticationId;
65
- if (!resolvedConnectionId) {
66
- throw new ZapierValidationError(`Connection ID is required. Use sdk.apps.${appKey}({ connectionId: "..." })`);
98
+ const resolvedConnection = factoryOptions.connection;
99
+ if (resolvedConnectionId != null && resolvedConnection != null) {
100
+ throw new ZapierValidationError("Cannot specify both connectionId/authenticationId and connection. Use connectionId for a direct ID, or connection for an alias or numeric ID.");
101
+ }
102
+ if (resolvedConnectionId == null && resolvedConnection == null) {
103
+ throw new ZapierValidationError(`Connection is required. Use sdk.apps.${appKey}({ connectionId: "..." }) or sdk.apps.${appKey}({ connection: "name" })`);
67
104
  }
68
- return createPinnedAppProxy(appKey, options, resolvedConnectionId);
105
+ return createPinnedAppProxy(appKey, options, resolvedConnectionId, resolvedConnection);
69
106
  };
70
107
  // Add properties for direct usage (backward compatibility)
71
108
  return new Proxy(appFactory, {
@@ -1,14 +1,16 @@
1
1
  import { z } from "zod";
2
- import { type ConnectionIdProperty, type AuthenticationIdProperty } from "../../types/properties";
2
+ import { type ConnectionIdProperty, type ConnectionProperty, type AuthenticationIdProperty } from "../../types/properties";
3
3
  export declare const ActionExecutionInputSchema: z.ZodObject<{
4
4
  inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5
5
  connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
6
+ connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
6
7
  authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
7
8
  timeoutMs: z.ZodOptional<z.ZodNumber>;
8
9
  }, z.core.$strip>;
9
10
  export type ActionExecutionOptions = z.infer<typeof ActionExecutionInputSchema>;
10
11
  export declare const AppFactoryInputSchema: z.ZodObject<{
11
12
  connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
13
+ connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
12
14
  authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
13
15
  }, z.core.$strip>;
14
16
  export type AppFactoryInput = z.infer<typeof AppFactoryInputSchema>;
@@ -26,6 +28,7 @@ interface BaseActionTypeProxy {
26
28
  type ActionTypeProxy = BaseActionTypeProxy;
27
29
  type AppFetchFn = (url: string | URL, init?: RequestInit & {
28
30
  connectionId?: ConnectionIdProperty;
31
+ connection?: ConnectionProperty;
29
32
  /** @deprecated Use connectionId instead */
30
33
  authenticationId?: AuthenticationIdProperty;
31
34
  callbackUrl?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/apps/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,0BAA0B;;;;;iBAUpC,CAAC;AAGJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEhF,eAAO,MAAM,qBAAqB;;;iBAMW,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,UAAU,mBAAmB;IAC3B,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC,EAAE,sBAAsB,KAAK,OAAO,CAAC;QAC9D,IAAI,EAAE,GAAG,EAAE,CAAC;QACZ,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QACpD,KAAK,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;KAC7B,CAAC;CACL;AAGD,KAAK,eAAe,GAAG,mBAAmB,CAAC;AAG3C,KAAK,U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ACZ,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QACpD,KAAK,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;KAC7B,CAAC;CACL;AAGD,KAAK,eAAe,GAAG,mBAAmB,CAAC;AAG3C,KAAK,UAAU,GAAG,CAChB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,CAAC,EAAE,WAAW,GAAG;IACnB,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,KACE,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvB,KAAK,QAAQ,GAAG;IACd,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC;CACjC,GAAG;IACF,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,UAAU,UAAU;IAClB,CAAC,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC;CACtC;AAGD,KAAK,mBAAmB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEjD,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAAC;CACpC"}
@@ -1,9 +1,10 @@
1
1
  import { z } from "zod";
2
- import { ConnectionIdPropertySchema, AuthenticationIdPropertySchema, ActionTimeoutMsPropertySchema, } from "../../types/properties";
2
+ import { ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdPropertySchema, ActionTimeoutMsPropertySchema, } from "../../types/properties";
3
3
  export const ActionExecutionInputSchema = z
4
4
  .object({
5
5
  inputs: z.record(z.string(), z.unknown()).optional(),
6
6
  connectionId: ConnectionIdPropertySchema.optional(),
7
+ connection: ConnectionPropertySchema.optional(),
7
8
  /** @deprecated Use connectionId instead */
8
9
  authenticationId: AuthenticationIdPropertySchema.optional(),
9
10
  timeoutMs: ActionTimeoutMsPropertySchema,
@@ -12,8 +13,9 @@ export const ActionExecutionInputSchema = z
12
13
  export const AppFactoryInputSchema = z
13
14
  .object({
14
15
  connectionId: ConnectionIdPropertySchema.optional(),
16
+ connection: ConnectionPropertySchema.optional(),
15
17
  /** @deprecated Use connectionId instead */
16
18
  authenticationId: AuthenticationIdPropertySchema.optional(),
17
19
  })
18
- .describe("Bind a connection ID to an app");
20
+ .describe("Bind a connection alias or numeric connectionId to an app");
19
21
  // Note: AppsPluginSdkExtension removed - now using AppsPluginProvides in index.ts
@@ -0,0 +1,22 @@
1
+ import type { Plugin } from "../../types/plugin";
2
+ import type { Manifest } from "../manifest/schemas";
3
+ export declare function buildCapabilityMessage(key: string): string;
4
+ declare const GATED_FLAGS: readonly ["canIncludeSharedConnections", "canIncludeSharedTables", "canDeleteTables"];
5
+ export type GatedFlag = (typeof GATED_FLAGS)[number];
6
+ export interface CapabilitiesContext {
7
+ checkCapability: (key: GatedFlag) => Promise<void>;
8
+ hasCapability: (key: GatedFlag) => Promise<boolean>;
9
+ }
10
+ export interface CapabilitiesPluginProvides {
11
+ context: CapabilitiesContext;
12
+ }
13
+ export declare const capabilitiesPlugin: Plugin<{}, {
14
+ options?: {
15
+ canIncludeSharedConnections?: boolean;
16
+ canIncludeSharedTables?: boolean;
17
+ canDeleteTables?: boolean;
18
+ };
19
+ getResolvedManifest: () => Promise<Manifest | null>;
20
+ }, CapabilitiesPluginProvides>;
21
+ export {};
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/capabilities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAqBpD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM1D;AAED,QAAA,MAAM,WAAW,uFAIP,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAWrD,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,aAAa,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,EAAE,EACF;IACE,OAAO,CAAC,EAAE;QACR,2BAA2B,CAAC,EAAE,OAAO,CAAC;QACtC,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;IACF,mBAAmB,EAAE,MAAM,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;CACrD,EACD,0BAA0B,CA8C3B,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { ZapierConfigurationError } from "../../types/errors";
2
+ function toDescription(key) {
3
+ // "canDeleteTables" -> "To delete tables"
4
+ const words = key
5
+ .replace(/^can/, "")
6
+ .replace(/([A-Z])/g, " $1")
7
+ .trim()
8
+ .toLowerCase();
9
+ return `To ${words}`;
10
+ }
11
+ function toEnvVar(key) {
12
+ return "ZAPIER_" + key.replace(/([A-Z])/g, "_$1").toUpperCase();
13
+ }
14
+ function toCliFlag(key) {
15
+ return "--" + key.replace(/([A-Z])/g, "-$1").toLowerCase();
16
+ }
17
+ export function buildCapabilityMessage(key) {
18
+ return [
19
+ `${toDescription(key)}, use ${toCliFlag(key)} in the CLI,`,
20
+ `set ${key}: true in SDK options or .zapierrc,`,
21
+ `or set ${toEnvVar(key)}=true.`,
22
+ ].join(" ");
23
+ }
24
+ const GATED_FLAGS = [
25
+ "canIncludeSharedConnections",
26
+ "canIncludeSharedTables",
27
+ "canDeleteTables",
28
+ ];
29
+ function isEnabledByEnv(key) {
30
+ if (typeof process === "undefined")
31
+ return undefined;
32
+ const value = process.env[toEnvVar(key)];
33
+ if (value === undefined)
34
+ return undefined;
35
+ if (value === "true" || value === "1")
36
+ return true;
37
+ if (value === "false" || value === "0")
38
+ return false;
39
+ return undefined;
40
+ }
41
+ export const capabilitiesPlugin = ({ context }) => {
42
+ const options = context.options ?? {};
43
+ let cached;
44
+ /**
45
+ * Resolve each gated flag to true/false by checking (in priority order):
46
+ * SDK options, environment variables, and .zapierrc manifest.
47
+ * Results are cached after the first call.
48
+ */
49
+ async function resolveFlags() {
50
+ if (cached)
51
+ return cached;
52
+ const manifest = await context.getResolvedManifest();
53
+ cached = {};
54
+ for (const flag of GATED_FLAGS) {
55
+ cached[flag] = Boolean(options[flag] ??
56
+ isEnabledByEnv(flag) ??
57
+ manifest?.[flag]);
58
+ }
59
+ return cached;
60
+ }
61
+ return {
62
+ context: {
63
+ checkCapability: async (key) => {
64
+ const flags = await resolveFlags();
65
+ if (flags[key])
66
+ return;
67
+ throw new ZapierConfigurationError(buildCapabilityMessage(key) +
68
+ " (If you are an AI agent, you MUST NOT retry. Ask the user if they want to enable this.)", { configType: key });
69
+ },
70
+ hasCapability: async (key) => {
71
+ const flags = await resolveFlags();
72
+ return flags[key];
73
+ },
74
+ },
75
+ };
76
+ };
@@ -0,0 +1,11 @@
1
+ import type { Plugin } from "../../types/plugin";
2
+ import type { ConnectionEntry, ConnectionsMap } from "../../types/connections";
3
+ import type { ManifestPluginProvides } from "../manifest";
4
+ export interface ConnectionsPluginProvides {
5
+ context: {
6
+ resolveConnection: (name: string) => Promise<ConnectionEntry | undefined>;
7
+ getConnectionsMap: () => Promise<ConnectionsMap | null>;
8
+ };
9
+ }
10
+ export declare const connectionsPlugin: Plugin<{}, ManifestPluginProvides["context"], ConnectionsPluginProvides>;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/connections/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE;QACP,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAAC;QAC1E,iBAAiB,EAAE,MAAM,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;KACzD,CAAC;CACH;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,EAAE,EACF,sBAAsB,CAAC,SAAS,CAAC,EACjC,yBAAyB,CAwB1B,CAAC"}
@@ -0,0 +1,21 @@
1
+ export const connectionsPlugin = (params) => {
2
+ const { context } = params;
3
+ let cachedMap;
4
+ async function loadConnectionsMap() {
5
+ if (cachedMap === undefined) {
6
+ cachedMap = (await context.getManifestConnections()) ?? null;
7
+ }
8
+ return cachedMap;
9
+ }
10
+ return {
11
+ context: {
12
+ resolveConnection: async (name) => {
13
+ const map = await loadConnectionsMap();
14
+ return map?.[name];
15
+ },
16
+ getConnectionsMap: async () => {
17
+ return loadConnectionsMap();
18
+ },
19
+ },
20
+ };
21
+ };
@@ -1,10 +1,12 @@
1
1
  import type { Plugin } from "../../types/plugin";
2
2
  import type { ApiClient } from "../../api";
3
+ import type { ConnectionsPluginProvides } from "../connections";
3
4
  import type { z } from "zod";
4
5
  import type { EventEmissionContext } from "../eventEmission";
5
6
  export interface FetchPluginProvides {
6
7
  fetch: (url: string | URL, init?: RequestInit & {
7
8
  connectionId?: string | number;
9
+ connection?: string | number;
8
10
  /** @deprecated Use connectionId instead */
9
11
  authenticationId?: string | number;
10
12
  callbackUrl?: string;
@@ -32,10 +34,11 @@ export declare const fetchPlugin: Plugin<{}, // no SDK dependencies
32
34
  // no SDK dependencies
33
35
  {
34
36
  api: ApiClient;
35
- } & EventEmissionContext, // requires api + eventEmission in context
37
+ } & ConnectionsPluginProvides["context"] & EventEmissionContext, // requires api, connections, and eventEmission in context
36
38
  FetchPluginProvides>;
37
39
  export type ZapierFetchInitOptions = RequestInit & {
38
40
  connectionId?: string | number;
41
+ connection?: string | number;
39
42
  /** @deprecated Use connectionId instead */
40
43
  authenticationId?: string | number;
41
44
  callbackUrl?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAoE7D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,CACL,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,CAAC,EAAE,WAAW,GAAG;QACnB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAC/B,2CAA2C;QAC3C,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACnC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,KACE,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,WAAW,EAAE,MAAM,CAAC;gBACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;gBACnB,UAAU,EAAE,MAAM,EAAE,CAAC;gBACrB,UAA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,CAAC;QACnC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,KACE,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,WAAW,EAAE,MAAM,CAAC;gBACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;gBACnB,UAAU,EAAE,MAAM,EAAE,CAAC;gBACrB,UAAU,EAAE,MAAM,CAAC;gBACnB,eAAe,EAAE,KAAK,CAAC;oBAAE,IAAI,EAAE,MAAM,CAAC;oBAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAA;iBAAE,CAAC,CAAC;aAC/D,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAC9B,EAAE,EAAE,sBAAsB;AAC1B,AADI,sBAAsB;AAC1B;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,yBAAyB,CAAC,SAAS,CAAC,GACvD,oBAAoB,EAAE,0DAA0D;AAClF,mBAAmB,CAoIpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG;IACjD,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { ZapierRelayError } from "../../types/errors";
2
2
  import { FetchUrlSchema, FetchInitSchema } from "./schemas";
3
+ import { resolveConnectionId } from "../../utils/domain-utils";
3
4
  import { coerceToNumericId } from "../../utils/id-utils";
4
5
  import { isPlainObject } from "../../utils/type-guard-utils";
5
6
  // fetch() doesn't use createFunction/createPaginatedFunction (its signature
@@ -65,9 +66,14 @@ export const fetchPlugin = ({ context }) => {
65
66
  const startTime = Date.now();
66
67
  const isNested = isTelemetryNested();
67
68
  try {
68
- const { connectionId, authenticationId, callbackUrl, ...fetchInit } = init || {};
69
- // Support both connectionId (new) and authenticationId (deprecated)
70
- const resolvedConnectionId = connectionId ?? authenticationId;
69
+ const { connectionId, connection, authenticationId, callbackUrl, ...fetchInit } = init || {};
70
+ const resolvedConnectionId = await resolveConnectionId({
71
+ connectionId,
72
+ connection,
73
+ authenticationId,
74
+ resolveConnection: context.resolveConnection,
75
+ label: "fetch",
76
+ });
71
77
  const relayPath = transformUrlToRelayPath(url);
72
78
  const headers = normalizeHeaders(fetchInit.headers);
73
79
  const hasContentType = Object.keys(headers).some((k) => k.toLowerCase() === "content-type");
@@ -13,6 +13,7 @@ export declare const FetchInitSchema: z.ZodOptional<z.ZodObject<{
13
13
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
14
14
  body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<FormData, FormData>, z.ZodCustom<URLSearchParams, URLSearchParams>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
15
15
  connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
16
+ connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
16
17
  authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
17
18
  callbackUrl: z.ZodOptional<z.ZodString>;
18
19
  }, z.core.$strip>>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,cAAc,2DAIxB,CAAC;AAEJ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;kBAgCzB,CAAC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,cAAc,2DAIxB,CAAC;AAEJ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;kBAiCzB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { ConnectionIdPropertySchema, AuthenticationIdPropertySchema, } from "../../types/properties";
2
+ import { ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdPropertySchema, } from "../../types/properties";
3
3
  // Schemas for fetch function parameters
4
4
  export const FetchUrlSchema = z
5
5
  .union([z.string(), z.instanceof(URL)])
@@ -24,6 +24,7 @@ export const FetchInitSchema = z
24
24
  .optional()
25
25
  .describe("Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly"),
26
26
  connectionId: ConnectionIdPropertySchema.optional(),
27
+ connection: ConnectionPropertySchema.optional(),
27
28
  /** @deprecated Use connectionId instead */
28
29
  authenticationId: AuthenticationIdPropertySchema.optional(),
29
30
  callbackUrl: z
@@ -10,6 +10,7 @@ export declare const FindFirstConnectionSchema: z.ZodObject<{
10
10
  owner: z.ZodOptional<z.ZodString>;
11
11
  authenticationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
12
  accountId: z.ZodOptional<z.ZodString>;
13
+ includeShared: z.ZodOptional<z.ZodBoolean>;
13
14
  isExpired: z.ZodOptional<z.ZodBoolean>;
14
15
  }, z.core.$strip>;
15
16
  export type FindFirstConnectionOptions = z.infer<typeof FindFirstConnectionSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,yBAAyB;;;;;;;;;;iBAKwB,CAAC;AAG/D,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,yBAAyB,CACjC,CAAC;AAGF,MAAM,MAAM,wBAAwB,GAChC,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,8BAA8B;IAC7C,mBAAmB,EAAE,CACnB,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CAC/C"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,yBAAyB;;;;;;;;;;;iBAKwB,CAAC;AAG/D,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,yBAAyB,CACjC,CAAC;AAGF,MAAM,MAAM,wBAAwB,GAChC,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,8BAA8B;IAC7C,mBAAmB,EAAE,CACnB,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CAC/C"}
@@ -10,6 +10,7 @@ export declare const FindUniqueConnectionSchema: z.ZodObject<{
10
10
  owner: z.ZodOptional<z.ZodString>;
11
11
  authenticationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
12
  accountId: z.ZodOptional<z.ZodString>;
13
+ includeShared: z.ZodOptional<z.ZodBoolean>;
13
14
  isExpired: z.ZodOptional<z.ZodBoolean>;
14
15
  }, z.core.$strip>;
15
16
  export type FindUniqueConnectionOptions = z.infer<typeof FindUniqueConnectionSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,2BAA2B,EAC3B,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,0BAA0B;;;;;;;;;;iBAKsB,CAAC;AAG9D,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,0BAA0B,CAClC,CAAC;AAGF,MAAM,MAAM,yBAAyB,GACjC,yBAAyB,GACzB,cAAc,GACd,2BAA2B,GAC3B,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,+BAA+B;IAC9C,oBAAoB,EAAE,CACpB,OAAO,CAAC,EAAE,2BAA2B,KAClC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;CACxC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,2BAA2B,EAC3B,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,0BAA0B;;;;;;;;;;;iBAKsB,CAAC;AAG9D,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,0BAA0B,CAClC,CAAC;AAGF,MAAM,MAAM,yBAAyB,GACjC,yBAAyB,GACzB,cAAc,GACd,2BAA2B,GAC3B,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,+BAA+B;IAC9C,oBAAoB,EAAE,CACpB,OAAO,CAAC,EAAE,2BAA2B,KAClC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;CACxC"}
@@ -5,6 +5,7 @@ import { ListConnectionsQuerySchema, type ListConnectionsOptions, type ListConne
5
5
  import type { GetVersionedImplementationId } from "../manifest/schemas";
6
6
  import type { ManifestPluginProvides } from "../manifest";
7
7
  import type { EventEmissionContext } from "../eventEmission";
8
+ import type { CapabilitiesContext } from "../capabilities";
8
9
  export interface ListConnectionsPluginProvides {
9
10
  listConnections: (options?: ListConnectionsOptions) => Promise<ListConnectionsPage> & AsyncIterable<ListConnectionsPage> & {
10
11
  items(): AsyncIterable<ConnectionItem>;
@@ -20,5 +21,5 @@ export interface ListConnectionsPluginProvides {
20
21
  export declare const listConnectionsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, {
21
22
  api: ApiClient;
22
23
  getVersionedImplementationId: GetVersionedImplementationId;
23
- } & EventEmissionContext, ListConnectionsPluginProvides>;
24
+ } & EventEmissionContext & CapabilitiesContext, ListConnectionsPluginProvides>;
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listConnections/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM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ACxE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAQ7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,CACf,OAAO,CAAC,EAAE,sBAAsB,KAC7B,OAAO,CAAC,mBAAmB,CAAC,GAC/B,aAAa,CAAC,mBAAmB,CAAC,GAAG;QACnC,KAAK,IAAI,aAAa,CAAC,cAAc,CAAC,CAAC;KACxC,CAAC;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,eAAe,EAAE;gBACf,WAAW,EAAE,OAAO,0BAA0B,CAAC;aAChD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,qBAAqB,EAAE,MAAM,CACxC,UAAU,CAAC,sBAAsB,CAAC,EAClC;IACE,GAAG,EAAE,SAAS,CAAC;IACf,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,GAAG,oBAAoB,GACtB,mBAAmB,EACrB,6BAA6B,CAwH9B,CAAC"}
@@ -6,10 +6,13 @@ import { appKeyResolver } from "../../resolvers";
6
6
  import { ConnectionItemSchema } from "../../schemas/Connection";
7
7
  import { createTelemetryCallback } from "../../utils/telemetry-utils";
8
8
  import { stripPageSuffix } from "../../utils/string-utils";
9
- import { ZapierAuthenticationError } from "../../types/errors";
9
+ import { ZapierAuthenticationError, ZapierValidationError, } from "../../types/errors";
10
10
  import { setMethodMetadata } from "../../utils/telemetry-context";
11
11
  export const listConnectionsPlugin = ({ context }) => {
12
12
  async function listConnectionsPage(options) {
13
+ if (options.includeShared) {
14
+ await context.checkCapability("canIncludeSharedConnections");
15
+ }
13
16
  const { api, getVersionedImplementationId } = context;
14
17
  const searchParams = {};
15
18
  if (options.pageSize !== undefined) {
@@ -44,8 +47,12 @@ export const listConnectionsPlugin = ({ context }) => {
44
47
  if (options.accountId) {
45
48
  searchParams.account_id = options.accountId;
46
49
  }
47
- if (options.owner) {
48
- searchParams.owner = options.owner;
50
+ if (options.owner && options.owner !== "me" && !options.includeShared) {
51
+ throw new ZapierValidationError('The "owner" option requires "includeShared" to be true. Without includeShared, only your own connections are returned.');
52
+ }
53
+ const owner = options.includeShared ? options.owner : "me";
54
+ if (owner) {
55
+ searchParams.owner = owner;
49
56
  }
50
57
  if (options.isExpired !== undefined) {
51
58
  searchParams.is_expired = options.isExpired.toString();
@@ -12,6 +12,7 @@ export declare const ListConnectionsQuerySchema: z.ZodObject<{
12
12
  connectionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
13
  authenticationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
14
  accountId: z.ZodOptional<z.ZodString>;
15
+ includeShared: z.ZodOptional<z.ZodBoolean>;
15
16
  isExpired: z.ZodOptional<z.ZodBoolean>;
16
17
  pageSize: z.ZodOptional<z.ZodNumber>;
17
18
  maxItems: z.ZodOptional<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listConnections/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAErF,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;iBA6C0B,CAAC;AAGlE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAGhF,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,oBAAoB,GAC5B,yBAAyB,GACzB,cAAc,GACd,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,oBAAoB,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC;CAC/E"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listConnections/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAErF,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;iBAoD0B,CAAC;AAGlE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAGhF,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,oBAAoB,GAC5B,yBAAyB,GACzB,cAAc,GACd,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,oBAAoB,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC;CAC/E"}
@@ -25,6 +25,11 @@ export const ListConnectionsQuerySchema = ListConnectionsQueryBase.omit({
25
25
  .describe("List of authentication IDs to filter by (deprecated, use connectionIds)"),
26
26
  // camelCase account ID
27
27
  accountId: z.string().optional().describe("Account ID to filter by"),
28
+ // Include shared connections (overrides default owner=me filter)
29
+ includeShared: z
30
+ .boolean()
31
+ .optional()
32
+ .describe("Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections."),
28
33
  // camelCase isExpired
29
34
  isExpired: z.boolean().optional().describe("Filter by expired status"),
30
35
  // Override pageSize to make optional
@@ -1,4 +1,5 @@
1
1
  import type { GetVersionedImplementationId, Manifest, ManifestEntry, ManifestPluginOptionsSchema, ResolveAppKeys, ActionEntry } from "./schemas";
2
+ import type { ConnectionsMap } from "../../types/connections";
2
3
  import type { Plugin } from "../../types/plugin";
3
4
  import type { z } from "zod";
4
5
  import type { ApiClient } from "../../api";
@@ -29,8 +30,10 @@ export interface AddActionEntryResult {
29
30
  }
30
31
  export interface ManifestPluginProvides {
31
32
  context: {
33
+ getResolvedManifest: () => Promise<Manifest | null>;
32
34
  getVersionedImplementationId: GetVersionedImplementationId;
33
35
  resolveAppKeys: ResolveAppKeys;
36
+ getManifestConnections: () => Promise<ConnectionsMap | null>;
34
37
  updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
35
38
  addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
36
39
  findActionEntry: (options: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/manifest/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,4BAA4B,EAC5B,QAAQ,EACR,aAAa,EACb,2BAA2B,EAC3B,cAAc,EACd,WAAW,EACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAgB3C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAA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