@zapier/zapier-sdk 0.39.0 → 0.40.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 (192) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/CLAUDE.md +12 -14
  3. package/README.md +186 -192
  4. package/dist/api/schemas.d.ts +2 -2
  5. package/dist/api/schemas.js +3 -3
  6. package/dist/formatters/tableRecord.js +1 -1
  7. package/dist/index.cjs +652 -377
  8. package/dist/index.d.mts +468 -53
  9. package/dist/index.mjs +643 -378
  10. package/dist/plugins/apps/index.d.ts +1 -1
  11. package/dist/plugins/apps/index.d.ts.map +1 -1
  12. package/dist/plugins/apps/index.js +4 -8
  13. package/dist/plugins/apps/schemas.d.ts +2 -1
  14. package/dist/plugins/apps/schemas.d.ts.map +1 -1
  15. package/dist/plugins/apps/schemas.js +24 -8
  16. package/dist/plugins/fetch/index.d.ts +4 -2
  17. package/dist/plugins/fetch/index.d.ts.map +1 -1
  18. package/dist/plugins/fetch/index.js +1 -3
  19. package/dist/plugins/fetch/schemas.d.ts.map +1 -1
  20. package/dist/plugins/fetch/schemas.js +11 -4
  21. package/dist/plugins/findFirstConnection/index.d.ts.map +1 -1
  22. package/dist/plugins/findFirstConnection/index.js +0 -1
  23. package/dist/plugins/findFirstConnection/schemas.d.ts +4 -1
  24. package/dist/plugins/findFirstConnection/schemas.d.ts.map +1 -1
  25. package/dist/plugins/findFirstConnection/schemas.js +2 -0
  26. package/dist/plugins/findUniqueConnection/index.d.ts.map +1 -1
  27. package/dist/plugins/findUniqueConnection/index.js +0 -1
  28. package/dist/plugins/findUniqueConnection/schemas.d.ts +4 -1
  29. package/dist/plugins/findUniqueConnection/schemas.d.ts.map +1 -1
  30. package/dist/plugins/findUniqueConnection/schemas.js +2 -0
  31. package/dist/plugins/getAction/index.d.ts.map +1 -1
  32. package/dist/plugins/getAction/index.js +8 -6
  33. package/dist/plugins/getAction/schemas.d.ts +58 -1
  34. package/dist/plugins/getAction/schemas.d.ts.map +1 -1
  35. package/dist/plugins/getAction/schemas.js +16 -4
  36. package/dist/plugins/getApp/index.d.ts.map +1 -1
  37. package/dist/plugins/getApp/index.js +6 -5
  38. package/dist/plugins/getApp/schemas.d.ts +19 -1
  39. package/dist/plugins/getApp/schemas.d.ts.map +1 -1
  40. package/dist/plugins/getApp/schemas.js +14 -4
  41. package/dist/plugins/getConnection/index.d.ts.map +1 -1
  42. package/dist/plugins/getConnection/index.js +3 -5
  43. package/dist/plugins/getConnection/schemas.d.ts +1 -0
  44. package/dist/plugins/getConnection/schemas.d.ts.map +1 -1
  45. package/dist/plugins/getConnection/schemas.js +11 -5
  46. package/dist/plugins/getInputFieldsSchema/index.d.ts +2 -1
  47. package/dist/plugins/getInputFieldsSchema/index.d.ts.map +1 -1
  48. package/dist/plugins/getInputFieldsSchema/index.js +18 -12
  49. package/dist/plugins/getInputFieldsSchema/schemas.d.ts +71 -1
  50. package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +1 -1
  51. package/dist/plugins/getInputFieldsSchema/schemas.js +39 -10
  52. package/dist/plugins/listActions/index.d.ts.map +1 -1
  53. package/dist/plugins/listActions/index.js +5 -4
  54. package/dist/plugins/listActions/schemas.d.ts +58 -1
  55. package/dist/plugins/listActions/schemas.d.ts.map +1 -1
  56. package/dist/plugins/listActions/schemas.js +25 -12
  57. package/dist/plugins/listApps/index.js +1 -1
  58. package/dist/plugins/listApps/schemas.d.ts +1 -0
  59. package/dist/plugins/listApps/schemas.d.ts.map +1 -1
  60. package/dist/plugins/listApps/schemas.js +6 -1
  61. package/dist/plugins/listConnections/index.d.ts +2 -1
  62. package/dist/plugins/listConnections/index.d.ts.map +1 -1
  63. package/dist/plugins/listConnections/index.js +27 -14
  64. package/dist/plugins/listConnections/schemas.d.ts +5 -0
  65. package/dist/plugins/listConnections/schemas.d.ts.map +1 -1
  66. package/dist/plugins/listConnections/schemas.js +22 -9
  67. package/dist/plugins/listInputFieldChoices/index.d.ts +2 -2
  68. package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -1
  69. package/dist/plugins/listInputFieldChoices/index.js +21 -15
  70. package/dist/plugins/listInputFieldChoices/schemas.d.ts +92 -1
  71. package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +1 -1
  72. package/dist/plugins/listInputFieldChoices/schemas.js +47 -23
  73. package/dist/plugins/listInputFields/index.d.ts +2 -1
  74. package/dist/plugins/listInputFields/index.d.ts.map +1 -1
  75. package/dist/plugins/listInputFields/index.js +18 -13
  76. package/dist/plugins/listInputFields/schemas.d.ts +80 -1
  77. package/dist/plugins/listInputFields/schemas.d.ts.map +1 -1
  78. package/dist/plugins/listInputFields/schemas.js +40 -11
  79. package/dist/plugins/manifest/schemas.d.ts.map +1 -1
  80. package/dist/plugins/manifest/schemas.js +4 -2
  81. package/dist/plugins/registry/index.d.ts.map +1 -1
  82. package/dist/plugins/registry/index.js +0 -1
  83. package/dist/plugins/request/index.d.ts.map +1 -1
  84. package/dist/plugins/request/index.js +2 -5
  85. package/dist/plugins/request/schemas.d.ts +2 -0
  86. package/dist/plugins/request/schemas.d.ts.map +1 -1
  87. package/dist/plugins/request/schemas.js +13 -5
  88. package/dist/plugins/runAction/index.d.ts.map +1 -1
  89. package/dist/plugins/runAction/index.js +17 -15
  90. package/dist/plugins/runAction/schemas.d.ts +83 -2
  91. package/dist/plugins/runAction/schemas.d.ts.map +1 -1
  92. package/dist/plugins/runAction/schemas.js +41 -17
  93. package/dist/plugins/tables/createTableFields/index.d.ts.map +1 -1
  94. package/dist/plugins/tables/createTableFields/index.js +5 -4
  95. package/dist/plugins/tables/createTableFields/schemas.d.ts +128 -2
  96. package/dist/plugins/tables/createTableFields/schemas.d.ts.map +1 -1
  97. package/dist/plugins/tables/createTableFields/schemas.js +23 -7
  98. package/dist/plugins/tables/createTableRecords/index.d.ts.map +1 -1
  99. package/dist/plugins/tables/createTableRecords/index.js +7 -6
  100. package/dist/plugins/tables/createTableRecords/schemas.d.ts +38 -2
  101. package/dist/plugins/tables/createTableRecords/schemas.d.ts.map +1 -1
  102. package/dist/plugins/tables/createTableRecords/schemas.js +23 -7
  103. package/dist/plugins/tables/deleteTable/index.d.ts.map +1 -1
  104. package/dist/plugins/tables/deleteTable/index.js +5 -4
  105. package/dist/plugins/tables/deleteTable/schemas.d.ts +17 -1
  106. package/dist/plugins/tables/deleteTable/schemas.d.ts.map +1 -1
  107. package/dist/plugins/tables/deleteTable/schemas.js +14 -2
  108. package/dist/plugins/tables/deleteTableFields/index.d.ts.map +1 -1
  109. package/dist/plugins/tables/deleteTableFields/index.js +9 -7
  110. package/dist/plugins/tables/deleteTableFields/schemas.d.ts +22 -1
  111. package/dist/plugins/tables/deleteTableFields/schemas.d.ts.map +1 -1
  112. package/dist/plugins/tables/deleteTableFields/schemas.js +18 -2
  113. package/dist/plugins/tables/deleteTableRecords/index.d.ts.map +1 -1
  114. package/dist/plugins/tables/deleteTableRecords/index.js +7 -5
  115. package/dist/plugins/tables/deleteTableRecords/schemas.d.ts +22 -1
  116. package/dist/plugins/tables/deleteTableRecords/schemas.d.ts.map +1 -1
  117. package/dist/plugins/tables/deleteTableRecords/schemas.js +18 -2
  118. package/dist/plugins/tables/getTable/index.d.ts.map +1 -1
  119. package/dist/plugins/tables/getTable/index.js +6 -5
  120. package/dist/plugins/tables/getTable/schemas.d.ts +16 -1
  121. package/dist/plugins/tables/getTable/schemas.d.ts.map +1 -1
  122. package/dist/plugins/tables/getTable/schemas.js +14 -2
  123. package/dist/plugins/tables/getTableRecord/index.d.ts.map +1 -1
  124. package/dist/plugins/tables/getTableRecord/index.js +9 -7
  125. package/dist/plugins/tables/getTableRecord/schemas.d.ts +39 -2
  126. package/dist/plugins/tables/getTableRecord/schemas.d.ts.map +1 -1
  127. package/dist/plugins/tables/getTableRecord/schemas.js +20 -5
  128. package/dist/plugins/tables/listTableFields/index.d.ts.map +1 -1
  129. package/dist/plugins/tables/listTableFields/index.js +10 -8
  130. package/dist/plugins/tables/listTableFields/schemas.d.ts +27 -2
  131. package/dist/plugins/tables/listTableFields/schemas.d.ts.map +1 -1
  132. package/dist/plugins/tables/listTableFields/schemas.js +24 -8
  133. package/dist/plugins/tables/listTableRecords/index.d.ts.map +1 -1
  134. package/dist/plugins/tables/listTableRecords/index.js +7 -6
  135. package/dist/plugins/tables/listTableRecords/schemas.d.ts +119 -2
  136. package/dist/plugins/tables/listTableRecords/schemas.d.ts.map +1 -1
  137. package/dist/plugins/tables/listTableRecords/schemas.js +23 -7
  138. package/dist/plugins/tables/listTables/index.d.ts.map +1 -1
  139. package/dist/plugins/tables/listTables/index.js +3 -2
  140. package/dist/plugins/tables/listTables/schemas.d.ts +5 -1
  141. package/dist/plugins/tables/listTables/schemas.d.ts.map +1 -1
  142. package/dist/plugins/tables/listTables/schemas.js +4 -1
  143. package/dist/plugins/tables/updateTableRecords/index.d.ts.map +1 -1
  144. package/dist/plugins/tables/updateTableRecords/index.js +7 -6
  145. package/dist/plugins/tables/updateTableRecords/schemas.d.ts +41 -2
  146. package/dist/plugins/tables/updateTableRecords/schemas.d.ts.map +1 -1
  147. package/dist/plugins/tables/updateTableRecords/schemas.js +23 -7
  148. package/dist/resolvers/actionKey.d.ts +1 -1
  149. package/dist/resolvers/actionKey.d.ts.map +1 -1
  150. package/dist/resolvers/actionKey.js +3 -3
  151. package/dist/resolvers/actionType.d.ts +1 -1
  152. package/dist/resolvers/actionType.d.ts.map +1 -1
  153. package/dist/resolvers/actionType.js +2 -2
  154. package/dist/resolvers/connectionId.d.ts +1 -1
  155. package/dist/resolvers/connectionId.d.ts.map +1 -1
  156. package/dist/resolvers/connectionId.js +9 -9
  157. package/dist/resolvers/inputFieldKey.d.ts +3 -3
  158. package/dist/resolvers/inputFieldKey.d.ts.map +1 -1
  159. package/dist/resolvers/inputFieldKey.js +6 -6
  160. package/dist/resolvers/inputs.d.ts +3 -3
  161. package/dist/resolvers/inputs.d.ts.map +1 -1
  162. package/dist/resolvers/inputs.js +8 -8
  163. package/dist/resolvers/tableFieldIds.d.ts +1 -1
  164. package/dist/resolvers/tableFieldIds.d.ts.map +1 -1
  165. package/dist/resolvers/tableFieldIds.js +3 -3
  166. package/dist/resolvers/tableFilters.d.ts +1 -1
  167. package/dist/resolvers/tableFilters.d.ts.map +1 -1
  168. package/dist/resolvers/tableFilters.js +4 -4
  169. package/dist/resolvers/tableId.js +1 -1
  170. package/dist/resolvers/tableRecordId.d.ts +2 -2
  171. package/dist/resolvers/tableRecordId.d.ts.map +1 -1
  172. package/dist/resolvers/tableRecordId.js +5 -5
  173. package/dist/resolvers/tableRecords.d.ts +2 -2
  174. package/dist/resolvers/tableRecords.d.ts.map +1 -1
  175. package/dist/resolvers/tableRecords.js +6 -6
  176. package/dist/resolvers/tableSort.d.ts +1 -1
  177. package/dist/resolvers/tableSort.d.ts.map +1 -1
  178. package/dist/resolvers/tableSort.js +2 -2
  179. package/dist/services/implementations.d.ts.map +1 -1
  180. package/dist/services/implementations.js +2 -3
  181. package/dist/types/properties.d.ts +30 -0
  182. package/dist/types/properties.d.ts.map +1 -1
  183. package/dist/types/properties.js +34 -1
  184. package/dist/types/sdk.d.ts +0 -2
  185. package/dist/types/sdk.d.ts.map +1 -1
  186. package/dist/utils/domain-utils.d.ts +5 -0
  187. package/dist/utils/domain-utils.d.ts.map +1 -1
  188. package/dist/utils/domain-utils.js +17 -3
  189. package/dist/utils/id-utils.d.ts +2 -0
  190. package/dist/utils/id-utils.d.ts.map +1 -1
  191. package/dist/utils/id-utils.js +2 -0
  192. package/package.json +1 -1
@@ -8,7 +8,7 @@ export interface AppsPluginProvides {
8
8
  export declare const appsPlugin: Plugin<GetSdkType<FetchPluginProvides & RunActionPluginProvides>, // requires fetch + runAction in SDK
9
9
  {}, // no context requirements
10
10
  AppsPluginProvides>;
11
- export type { ActionExecutionOptions } from "./schemas";
11
+ export type { ActionExecutionOptions, AppFactoryInput } from "./schemas";
12
12
  export type { ActionExecutionResult } from "../../api/types";
13
13
  export interface ZapierSdkApps {
14
14
  }
@@ -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;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
+ {"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;AAuOD,eAAO,MAAM,UAAU,EAAE,MAAM,CAC7B,UAAU,CAAC,mBAAmB,GAAG,uBAAuB,CAAC,EAAE,oCAAoC;AAC/F,EAAE,EAAE,0BAA0B;AAC9B,kBAAkB,CAyBnB,CAAC;AAGF,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACzE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAI7D,MAAM,WAAW,aAAa;CAAG"}
@@ -42,12 +42,11 @@ function createActionFunction(appKey, actionType, actionKey, options, pinnedAuth
42
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
43
  });
44
44
  return sdk.runAction({
45
- appKey,
45
+ app: appKey,
46
46
  actionType: actionType,
47
- actionKey,
47
+ action: actionKey,
48
48
  inputs,
49
- connectionId,
50
- connection,
49
+ connection: connectionId ?? connection,
51
50
  timeoutMs,
52
51
  });
53
52
  };
@@ -67,8 +66,7 @@ function createActionTypeProxy(appKey, actionType, options, pinnedAuthId, pinned
67
66
  });
68
67
  return sdk.fetch(url, {
69
68
  ...init,
70
- connectionId,
71
- connection,
69
+ connection: connectionId ?? connection,
72
70
  });
73
71
  };
74
72
  }
@@ -140,7 +138,6 @@ export const appsPlugin = ({ sdk }) => {
140
138
  type: "function",
141
139
  inputSchema: AppFactoryInputSchema,
142
140
  returnType: "AppProxy",
143
- deprecatedParameters: ["authenticationId"],
144
141
  },
145
142
  "apps.{appKey}.{actionType}.{actionKey}": {
146
143
  categories: ["app"],
@@ -149,7 +146,6 @@ export const appsPlugin = ({ sdk }) => {
149
146
  inputSchema: ActionExecutionInputSchema,
150
147
  itemType: "ActionResult",
151
148
  outputSchema: ActionResultItemSchema,
152
- deprecatedParameters: ["authenticationId"],
153
149
  },
154
150
  },
155
151
  },
@@ -27,9 +27,10 @@ interface BaseActionTypeProxy {
27
27
  }
28
28
  type ActionTypeProxy = BaseActionTypeProxy;
29
29
  type AppFetchFn = (url: string | URL, init?: RequestInit & {
30
+ /** @deprecated Use `connection` instead. */
30
31
  connectionId?: ConnectionIdProperty;
31
32
  connection?: ConnectionProperty;
32
- /** @deprecated Use connectionId instead */
33
+ /** @deprecated Use `connection` instead. */
33
34
  authenticationId?: AuthenticationIdProperty;
34
35
  callbackUrl?: string;
35
36
  }) => Promise<Response>;
@@ -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,EAKL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,0BAA0B;;;;;;iBAWpC,CAAC;AAGJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEhF,eAAO,MAAM,qBAAqB;;;;iBAOsC,CAAC;AAEzE,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,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,EA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AAK,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,4CAA4C;IAC5C,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,4CAA4C;IAC5C,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"}
@@ -3,19 +3,35 @@ import { ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdP
3
3
  export const ActionExecutionInputSchema = z
4
4
  .object({
5
5
  inputs: z.record(z.string(), z.unknown()).optional(),
6
- connectionId: ConnectionIdPropertySchema.optional(),
6
+ /** @deprecated Use `connection` instead. */
7
+ connectionId: ConnectionIdPropertySchema.optional().meta({
8
+ deprecated: true,
9
+ }),
7
10
  connection: ConnectionPropertySchema.optional(),
8
- /** @deprecated Use connectionId instead */
9
- authenticationId: AuthenticationIdPropertySchema.optional(),
11
+ /** @deprecated Use connection instead */
12
+ authenticationId: AuthenticationIdPropertySchema.optional().meta({
13
+ deprecated: true,
14
+ }),
10
15
  timeoutMs: ActionTimeoutMsPropertySchema,
11
16
  })
12
- .describe("Execute an action with the given inputs for the bound app, as an alternative to runAction");
17
+ .describe("Execute an action with the given inputs for the bound app, as an alternative to runAction")
18
+ .meta({
19
+ aliases: { connectionId: "connection", authenticationId: "connection" },
20
+ });
13
21
  export const AppFactoryInputSchema = z
14
22
  .object({
15
- connectionId: ConnectionIdPropertySchema.optional(),
23
+ /** @deprecated Use `connection` instead. */
24
+ connectionId: ConnectionIdPropertySchema.optional().meta({
25
+ deprecated: true,
26
+ }),
16
27
  connection: ConnectionPropertySchema.optional(),
17
- /** @deprecated Use connectionId instead */
18
- authenticationId: AuthenticationIdPropertySchema.optional(),
28
+ /** @deprecated Use connection instead */
29
+ authenticationId: AuthenticationIdPropertySchema.optional().meta({
30
+ deprecated: true,
31
+ }),
19
32
  })
20
- .describe("Bind a connection alias or numeric connectionId to an app");
33
+ .describe("Bind a connection alias or numeric connectionId to an app")
34
+ .meta({
35
+ aliases: { connectionId: "connection", authenticationId: "connection" },
36
+ });
21
37
  // Note: AppsPluginSdkExtension removed - now using AppsPluginProvides in index.ts
@@ -5,9 +5,10 @@ import type { z } from "zod";
5
5
  import type { EventEmissionContext } from "../eventEmission";
6
6
  export interface FetchPluginProvides {
7
7
  fetch: (url: string | URL, init?: RequestInit & {
8
+ /** @deprecated Use `connection` instead. */
8
9
  connectionId?: string | number;
9
10
  connection?: string | number;
10
- /** @deprecated Use connectionId instead */
11
+ /** @deprecated Use `connection` instead. */
11
12
  authenticationId?: string | number;
12
13
  callbackUrl?: string;
13
14
  }) => Promise<Response>;
@@ -37,9 +38,10 @@ export declare const fetchPlugin: Plugin<{}, // no SDK dependencies
37
38
  } & ConnectionsPluginProvides["context"] & EventEmissionContext, // requires api, connections, and eventEmission in context
38
39
  FetchPluginProvides>;
39
40
  export type ZapierFetchInitOptions = RequestInit & {
41
+ /** @deprecated Use `connection` instead. */
40
42
  connectionId?: string | number;
41
43
  connection?: string | number;
42
- /** @deprecated Use connectionId instead */
44
+ /** @deprecated Use `connection` instead. */
43
45
  authenticationId?: string | number;
44
46
  callbackUrl?: string;
45
47
  };
@@ -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;AAE3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAqE7D,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,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAC7B,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,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;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AAE,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,CAiIpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG;IACjD,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { ZapierRelayError } from "../../types/errors";
2
2
  import { FetchUrlSchema, FetchInitSchema } from "./schemas";
3
3
  import { resolveConnectionId } from "../../utils/domain-utils";
4
- import { coerceToNumericId } from "../../utils/id-utils";
5
4
  import { isPlainObject } from "../../utils/type-guard-utils";
6
5
  // fetch() doesn't use createFunction/createPaginatedFunction (its signature
7
6
  // doesn't fit the single-options-object pattern), so we wire up telemetry
@@ -84,7 +83,7 @@ export const fetchPlugin = ({ context }) => {
84
83
  }
85
84
  }
86
85
  if (resolvedConnectionId) {
87
- headers["X-Relay-Authentication-Id"] = coerceToNumericId("connectionId", resolvedConnectionId).toString();
86
+ headers["X-Relay-Authentication-Id"] = String(resolvedConnectionId);
88
87
  }
89
88
  if (callbackUrl) {
90
89
  headers["X-Relay-Callback-Url"] = callbackUrl;
@@ -146,7 +145,6 @@ export const fetchPlugin = ({ context }) => {
146
145
  { name: "url", schema: FetchUrlSchema },
147
146
  { name: "init", schema: FetchInitSchema },
148
147
  ],
149
- deprecatedParameters: ["authenticationId"],
150
148
  },
151
149
  },
152
150
  },
@@ -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;AAQxB,eAAO,MAAM,cAAc,2DAIxB,CAAC;AAEJ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;kBAiCzB,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;;;;;;;;;;;;;;;;kBAwCxB,CAAC"}
@@ -23,14 +23,21 @@ export const FetchInitSchema = z
23
23
  ])
24
24
  .optional()
25
25
  .describe("Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly"),
26
- connectionId: ConnectionIdPropertySchema.optional(),
26
+ connectionId: ConnectionIdPropertySchema.optional().meta({
27
+ deprecated: true,
28
+ }),
27
29
  connection: ConnectionPropertySchema.optional(),
28
- /** @deprecated Use connectionId instead */
29
- authenticationId: AuthenticationIdPropertySchema.optional(),
30
+ /** @deprecated Use connection instead */
31
+ authenticationId: AuthenticationIdPropertySchema.optional().meta({
32
+ deprecated: true,
33
+ }),
30
34
  callbackUrl: z
31
35
  .string()
32
36
  .optional()
33
37
  .describe("URL to send async response to (makes request async)"),
34
38
  })
35
39
  .optional()
36
- .describe("Request options including method, headers, body, and authentication");
40
+ .describe("Request options including method, headers, body, and authentication")
41
+ .meta({
42
+ aliases: { connectionId: "connection", authenticationId: "connection" },
43
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,yBAAyB,EACzB,KAAK,0BAA0B,EAChC,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,CACnB,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;IACvC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,mBAAmB,EAAE;gBACnB,WAAW,EAAE,OAAO,yBAAyB,CAAC;aAC/C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,UAAU,CAAC,6BAA6B,CAAC,EAAE,kCAAkC;AAC7E,oBAAoB,EAAE,oCAAoC;AAC1D,iCAAiC,CA6ClC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,yBAAyB,EACzB,KAAK,0BAA0B,EAChC,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,CACnB,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;IACvC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,mBAAmB,EAAE;gBACnB,WAAW,EAAE,OAAO,yBAAyB,CAAC;aAC/C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,UAAU,CAAC,6BAA6B,CAAC,EAAE,kCAAkC;AAC7E,oBAAoB,EAAE,oCAAoC;AAC1D,iCAAiC,CA4ClC,CAAC"}
@@ -28,7 +28,6 @@ export const findFirstConnectionPlugin = ({ sdk, context }) => {
28
28
  itemType: "Connection",
29
29
  inputSchema: FindFirstConnectionSchema,
30
30
  outputSchema: ConnectionItemSchema,
31
- deprecatedParameters: ["authenticationIds"],
32
31
  },
33
32
  },
34
33
  },
@@ -7,8 +7,11 @@ export declare const FindFirstConnectionSchema: z.ZodObject<{
7
7
  appKey: z.ZodOptional<z.ZodString & {
8
8
  _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
9
9
  }>;
10
+ app: z.ZodOptional<z.ZodString & {
11
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
12
+ }>;
10
13
  owner: z.ZodOptional<z.ZodString>;
11
- authenticationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
+ account: z.ZodOptional<z.ZodString>;
12
15
  accountId: z.ZodOptional<z.ZodString>;
13
16
  includeShared: z.ZodOptional<z.ZodBoolean>;
14
17
  isExpired: z.ZodOptional<z.ZodBoolean>;
@@ -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,KA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E,CAAC,CAAC;CAC/C"}
@@ -1,6 +1,8 @@
1
1
  import { ListConnectionsQuerySchema } from "../listConnections/schemas";
2
2
  export const FindFirstConnectionSchema = ListConnectionsQuerySchema.omit({
3
+ connections: true,
3
4
  connectionIds: true,
5
+ authenticationIds: true,
4
6
  pageSize: true,
5
7
  maxItems: true,
6
8
  cursor: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAC;AAMnB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,WAAW,kCAAkC;IACjD,oBAAoB,EAAE,CACpB,OAAO,CAAC,EAAE,2BAA2B,KAClC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;IACvC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,oBAAoB,EAAE;gBACpB,WAAW,EAAE,OAAO,0BAA0B,CAAC;aAChD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,UAAU,CAAC,6BAA6B,CAAC,EAAE,kCAAkC;AAC7E,oBAAoB,EAAE,oCAAoC;AAC1D,kCAAkC,CAqDnC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAC;AAMnB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,WAAW,kCAAkC;IACjD,oBAAoB,EAAE,CACpB,OAAO,CAAC,EAAE,2BAA2B,KAClC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;IACvC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,oBAAoB,EAAE;gBACpB,WAAW,EAAE,OAAO,0BAA0B,CAAC;aAChD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,UAAU,CAAC,6BAA6B,CAAC,EAAE,kCAAkC;AAC7E,oBAAoB,EAAE,oCAAoC;AAC1D,kCAAkC,CAoDnC,CAAC"}
@@ -31,7 +31,6 @@ export const findUniqueConnectionPlugin = ({ sdk, context }) => {
31
31
  itemType: "Connection",
32
32
  inputSchema: FindUniqueConnectionSchema,
33
33
  outputSchema: ConnectionItemSchema,
34
- deprecatedParameters: ["authenticationIds"],
35
34
  },
36
35
  },
37
36
  },
@@ -7,8 +7,11 @@ export declare const FindUniqueConnectionSchema: z.ZodObject<{
7
7
  appKey: z.ZodOptional<z.ZodString & {
8
8
  _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
9
9
  }>;
10
+ app: z.ZodOptional<z.ZodString & {
11
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
12
+ }>;
10
13
  owner: z.ZodOptional<z.ZodString>;
11
- authenticationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
+ account: z.ZodOptional<z.ZodString>;
12
15
  accountId: z.ZodOptional<z.ZodString>;
13
16
  includeShared: z.ZodOptional<z.ZodBoolean>;
14
17
  isExpired: z.ZodOptional<z.ZodBoolean>;
@@ -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;;;;;;;;;;;;;;iBAOsB,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,6 +1,8 @@
1
1
  import { ListConnectionsQuerySchema } from "../listConnections/schemas";
2
2
  export const FindUniqueConnectionSchema = ListConnectionsQuerySchema.omit({
3
+ connections: true,
3
4
  connectionIds: true,
5
+ authenticationIds: true,
4
6
  pageSize: true,
5
7
  maxItems: true,
6
8
  cursor: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getAction/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,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAGnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAOhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;IACxE,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,SAAS,EAAE;gBACT,WAAW,EAAE,OAAO,eAAe,CAAC;aACrC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,UAAU,CAAC,yBAAyB,CAAC,EAAE,8BAA8B;AACrE,AADuC,8BAA8B;AACrE;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,oBAAoB,EAAE,0BAA0B;AACrE,uBAAuB,CAyDxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getAction/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,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,eAAe,EAEf,KAAK,gBAAgB,EACtB,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAOhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;IACxE,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,SAAS,EAAE;gBACT,WAAW,EAAE,OAAO,eAAe,CAAC;aACrC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,UAAU,CAAC,yBAAyB,CAAC,EAAE,8BAA8B;AACrE,AADuC,8BAA8B;AACrE;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,oBAAoB,EAAE,0BAA0B;AACrE,uBAAuB,CA2DxB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { GetActionSchema } from "./schemas";
1
+ import { GetActionSchema, GetActionInputSchema, } from "./schemas";
2
2
  import { ZapierResourceNotFoundError } from "../../types/errors";
3
3
  import { createFunction } from "../../utils/function-utils";
4
4
  import { appKeyResolver, actionTypeResolver, actionKeyResolver, } from "../../resolvers";
@@ -7,7 +7,9 @@ import { createTelemetryCallback } from "../../utils/telemetry-utils";
7
7
  import { setMethodMetadata } from "../../utils/telemetry-context";
8
8
  export const getActionPlugin = ({ sdk, context }) => {
9
9
  async function getAction(options) {
10
- const { actionKey, actionType, appKey } = options;
10
+ const appKey = "app" in options ? options.app : options.appKey;
11
+ const actionKey = "action" in options ? options.action : options.actionKey;
12
+ const { actionType } = options;
11
13
  // selectedApi is intentionally omitted — getAction doesn't resolve a versioned
12
14
  // implementation ID; it delegates to sdk.listActions, which sets selectedApi in its own scope.
13
15
  setMethodMetadata({
@@ -15,7 +17,7 @@ export const getActionPlugin = ({ sdk, context }) => {
15
17
  operationKey: actionKey,
16
18
  });
17
19
  // Use the listActions function from the SDK to search for the specific action across all pages
18
- for await (const action of sdk.listActions({ appKey }).items()) {
20
+ for await (const action of sdk.listActions({ app: appKey }).items()) {
19
21
  if ((action.key === actionKey || action.id === actionKey) &&
20
22
  action.action_type === actionType) {
21
23
  return { data: action };
@@ -24,7 +26,7 @@ export const getActionPlugin = ({ sdk, context }) => {
24
26
  // If we get here, action was not found
25
27
  throw new ZapierResourceNotFoundError(`Action not found: ${actionKey} with type ${actionType}`, { resourceType: "Action", resourceId: `${actionKey} (${actionType})` });
26
28
  }
27
- const getActionDefinition = createFunction(getAction, GetActionSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getAction.name));
29
+ const getActionDefinition = createFunction(getAction, GetActionInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getAction.name));
28
30
  return {
29
31
  getAction: getActionDefinition,
30
32
  context: {
@@ -36,9 +38,9 @@ export const getActionPlugin = ({ sdk, context }) => {
36
38
  inputSchema: GetActionSchema,
37
39
  outputSchema: ActionItemSchema,
38
40
  resolvers: {
39
- appKey: appKeyResolver,
41
+ app: appKeyResolver,
40
42
  actionType: actionTypeResolver,
41
- actionKey: actionKeyResolver,
43
+ action: actionKeyResolver,
42
44
  },
43
45
  },
44
46
  },
@@ -2,6 +2,24 @@ import { z } from "zod";
2
2
  import type { ActionItem } from "../../types/domain";
3
3
  import type { ZapierAuthenticationError, ZapierApiError, ZapierAppNotFoundError, ZapierValidationError, ZapierResourceNotFoundError, ZapierUnknownError } from "../../types/errors";
4
4
  export declare const GetActionSchema: z.ZodObject<{
5
+ app: z.ZodString & {
6
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
7
+ };
8
+ actionType: z.ZodEnum<{
9
+ search: "search";
10
+ filter: "filter";
11
+ read: "read";
12
+ read_bulk: "read_bulk";
13
+ run: "run";
14
+ search_and_write: "search_and_write";
15
+ search_or_write: "search_or_write";
16
+ write: "write";
17
+ }>;
18
+ action: z.ZodString & {
19
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
20
+ };
21
+ }, z.core.$strip>;
22
+ declare const GetActionSchemaDeprecated: z.ZodObject<{
5
23
  appKey: z.ZodString & {
6
24
  _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
7
25
  };
@@ -17,11 +35,50 @@ export declare const GetActionSchema: z.ZodObject<{
17
35
  }>;
18
36
  actionKey: z.ZodString;
19
37
  }, z.core.$strip>;
20
- export type GetActionOptions = z.infer<typeof GetActionSchema>;
38
+ export declare const GetActionInputSchema: z.ZodUnion<readonly [z.ZodObject<{
39
+ app: z.ZodString & {
40
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
41
+ };
42
+ actionType: z.ZodEnum<{
43
+ search: "search";
44
+ filter: "filter";
45
+ read: "read";
46
+ read_bulk: "read_bulk";
47
+ run: "run";
48
+ search_and_write: "search_and_write";
49
+ search_or_write: "search_or_write";
50
+ write: "write";
51
+ }>;
52
+ action: z.ZodString & {
53
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
54
+ };
55
+ }, z.core.$strip>, z.ZodObject<{
56
+ appKey: z.ZodString & {
57
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
58
+ };
59
+ actionType: z.ZodEnum<{
60
+ search: "search";
61
+ filter: "filter";
62
+ read: "read";
63
+ read_bulk: "read_bulk";
64
+ run: "run";
65
+ search_and_write: "search_and_write";
66
+ search_or_write: "search_or_write";
67
+ write: "write";
68
+ }>;
69
+ actionKey: z.ZodString;
70
+ }, z.core.$strip>]>;
71
+ export type GetActionOptions = z.infer<typeof GetActionSchema> | (Omit<z.infer<typeof GetActionSchemaDeprecated>, "appKey" | "actionKey"> & {
72
+ /** @deprecated Use `app` instead. */
73
+ appKey: z.infer<typeof GetActionSchemaDeprecated>["appKey"];
74
+ /** @deprecated Use `action` instead. */
75
+ actionKey: z.infer<typeof GetActionSchemaDeprecated>["actionKey"];
76
+ });
21
77
  export type GetActionError = ZapierAuthenticationError | ZapierApiError | ZapierAppNotFoundError | ZapierValidationError | ZapierResourceNotFoundError | ZapierUnknownError;
22
78
  export interface GetActionSdkFunction {
23
79
  getAction: (options: GetActionOptions) => Promise<{
24
80
  data: ActionItem;
25
81
  }>;
26
82
  }
83
+ export {};
27
84
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;iBAMmC,CAAC;AAGhE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAG/D,MAAM,MAAM,cAAc,GACtB,yBAAyB,GACzB,cAAc,GACd,sBAAsB,GACtB,qBAAqB,GACrB,2BAA2B,GAC3B,kBAAkB,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C,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;CACzE"}
@@ -1,10 +1,22 @@
1
1
  import { z } from "zod";
2
- import { AppKeyPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, } from "../../types/properties";
3
- // Pure Zod schema - no resolver metadata!
2
+ import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ActionPropertySchema, } from "../../types/properties";
3
+ const GetActionDescription = "Get detailed information about a specific action";
4
+ // Schema for docs/registry (new param names only)
4
5
  export const GetActionSchema = z
5
6
  .object({
7
+ app: AppPropertySchema,
8
+ actionType: ActionTypePropertySchema,
9
+ action: ActionPropertySchema,
10
+ })
11
+ .describe(GetActionDescription)
12
+ .meta({ aliases: { appKey: "app", actionKey: "action" } });
13
+ // Deprecated schema (backward compat)
14
+ const GetActionSchemaDeprecated = z.object({
6
15
  appKey: AppKeyPropertySchema,
7
16
  actionType: ActionTypePropertySchema,
8
17
  actionKey: ActionKeyPropertySchema,
9
- })
10
- .describe("Get detailed information about a specific action");
18
+ });
19
+ // Union for runtime validation (accepts either new or old names)
20
+ export const GetActionInputSchema = z
21
+ .union([GetActionSchema, GetActionSchemaDeprecated])
22
+ .describe(GetActionDescription);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getApp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC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,sBAAsB,CAAC,EAClC,oBAAoB,EACpB,oBAAoB,CA+CrB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { createFunction } from "../../utils/function-utils";
2
- import { GetAppSchema } from "./schemas";
2
+ import { GetAppSchema, GetAppInputSchema } from "./schemas";
3
3
  import { AppItemSchema } from "../../schemas/App";
4
4
  import { ZapierAppNotFoundError } from "../../types/errors";
5
5
  import { appKeyResolver } from "../../resolvers";
@@ -7,9 +7,10 @@ import { createTelemetryCallback } from "../../utils/telemetry-utils";
7
7
  // GetApp plugin depends on listApps SDK function
8
8
  export const getAppPlugin = ({ sdk, context }) => {
9
9
  async function getApp(options) {
10
+ const appKey = "app" in options ? options.app : options.appKey;
10
11
  const appsIterable = sdk
11
12
  .listApps({
12
- appKeys: [options.appKey],
13
+ appKeys: [appKey],
13
14
  })
14
15
  .items();
15
16
  for await (const app of appsIterable) {
@@ -18,10 +19,10 @@ export const getAppPlugin = ({ sdk, context }) => {
18
19
  };
19
20
  }
20
21
  throw new ZapierAppNotFoundError("App not found", {
21
- appKey: options.appKey,
22
+ appKey,
22
23
  });
23
24
  }
24
- const getAppDefinition = createFunction(getApp, GetAppSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getApp.name));
25
+ const getAppDefinition = createFunction(getApp, GetAppInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getApp.name));
25
26
  // Return flat structure - getApp goes directly to SDK
26
27
  return {
27
28
  getApp: getAppDefinition,
@@ -34,7 +35,7 @@ export const getAppPlugin = ({ sdk, context }) => {
34
35
  inputSchema: GetAppSchema,
35
36
  outputSchema: AppItemSchema,
36
37
  resolvers: {
37
- appKey: appKeyResolver,
38
+ app: appKeyResolver,
38
39
  },
39
40
  },
40
41
  },
@@ -3,14 +3,32 @@ import type { AppItem } from "../../types/domain";
3
3
  import type { ZapierApiError, ZapierAppNotFoundError, ZapierValidationError } from "../../types/errors";
4
4
  export type GetAppError = ZapierAppNotFoundError | ZapierApiError | ZapierValidationError;
5
5
  export declare const GetAppSchema: z.ZodObject<{
6
+ app: z.ZodString & {
7
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
8
+ };
9
+ }, z.core.$strip>;
10
+ declare const GetAppSchemaDeprecated: z.ZodObject<{
6
11
  appKey: z.ZodString & {
7
12
  _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
8
13
  };
9
14
  }, z.core.$strip>;
10
- export type GetAppOptions = z.infer<typeof GetAppSchema>;
15
+ export declare const GetAppInputSchema: z.ZodUnion<readonly [z.ZodObject<{
16
+ app: z.ZodString & {
17
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
18
+ };
19
+ }, z.core.$strip>, z.ZodObject<{
20
+ appKey: z.ZodString & {
21
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
22
+ };
23
+ }, z.core.$strip>]>;
24
+ export type GetAppOptions = z.infer<typeof GetAppSchema> | (Omit<z.infer<typeof GetAppSchemaDeprecated>, "appKey"> & {
25
+ /** @deprecated Use `app` instead. */
26
+ appKey: z.infer<typeof GetAppSchemaDeprecated>["appKey"];
27
+ });
11
28
  export interface GetAppSdkFunction {
12
29
  getApp: (options: GetAppOptions) => Promise<{
13
30
  data: AppItem;
14
31
  }>;
15
32
  }
33
+ export {};
16
34
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getApp/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAK5B,MAAM,MAAM,WAAW,GACnB,sBAAsB,GACtB,cAAc,GACd,qBAAqB,CAAC;AAG1B,eAAO,MAAM,YAAY;;;;iBAMmC,CAAC;AAG7D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAGzD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAChE"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getApp/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,WAAW,GACnB,sBAAsB,GACtB,cAAc,GACd,qBAAqB,CAAC;AAK1B,eAAO,MAAM,YAAY;;;;iBAKc,CAAC;AAGxC,QAAA,MAAM,sBAAsB;;;;iBAE1B,CAAC;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;mBAEA,CAAC;AAG/B,MAAM,MAAM,aAAa,GACrB,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,GAC5B,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,EAAE,QAAQ,CAAC,GAAG;IACxD,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC1D,CAAC,CAAC;AAGP,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAChE"}
@@ -1,8 +1,18 @@
1
1
  import { z } from "zod";
2
- import { AppKeyPropertySchema } from "../../types/properties";
3
- // Pure Zod schema - no resolver metadata!
2
+ import { AppKeyPropertySchema, AppPropertySchema, } from "../../types/properties";
3
+ const GetAppDescription = "Get detailed information about a specific app";
4
+ // Schema for docs/registry (new param names only)
4
5
  export const GetAppSchema = z
5
6
  .object({
6
- appKey: AppKeyPropertySchema.describe("App key of app to fetch (e.g., 'SlackCLIAPI' or slug like 'github')"),
7
+ app: AppPropertySchema,
7
8
  })
8
- .describe("Get detailed information about a specific app");
9
+ .describe(GetAppDescription)
10
+ .meta({ aliases: { appKey: "app" } });
11
+ // Deprecated schema (backward compat)
12
+ const GetAppSchemaDeprecated = z.object({
13
+ appKey: AppKeyPropertySchema,
14
+ });
15
+ // Union for runtime validation (accepts either new or old names)
16
+ export const GetAppInputSchema = z
17
+ .union([GetAppSchema, GetAppSchemaDeprecated])
18
+ .describe(GetAppDescription);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE9E,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,CACb,OAAO,EAAE,kBAAkB,KACxB,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACpC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,aAAa,EAAE;gBACb,WAAW,EAAE,OAAO,wBAAwB,CAAC;aAC9C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,EAAE,EAAE,sBAAsB;AAC1B,AADI,sBAAsB;AAC1B;IAAE,GAAG,EAAE,SAAS,CA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