@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
@@ -6,10 +6,9 @@ import { GetConnectionParamSchema } from "./schemas";
6
6
  export const getConnectionPlugin = ({ context }) => {
7
7
  async function getConnection(options) {
8
8
  const { api } = context;
9
- // Support both connectionId (new) and authenticationId (deprecated)
10
- const resolvedConnectionId = options.connectionId ?? options.authenticationId;
9
+ const resolvedConnectionId = options.connection ?? options.connectionId ?? options.authenticationId;
11
10
  if (!resolvedConnectionId) {
12
- throw new Error("connectionId is required");
11
+ throw new Error("connection is required");
13
12
  }
14
13
  return await api.get(`/api/v0/connections/${encodeURIComponent(String(resolvedConnectionId))}`);
15
14
  }
@@ -25,9 +24,8 @@ export const getConnectionPlugin = ({ context }) => {
25
24
  inputSchema: GetConnectionParamSchema,
26
25
  outputSchema: ConnectionItemSchema,
27
26
  resolvers: {
28
- connectionId: connectionIdGenericResolver,
27
+ connection: connectionIdGenericResolver,
29
28
  },
30
- deprecatedParameters: ["authenticationId"],
31
29
  },
32
30
  },
33
31
  },
@@ -2,6 +2,7 @@ import type { GetConnectionResponse } from "@zapier/zapier-sdk-core/v0/schemas/c
2
2
  import { z } from "zod";
3
3
  import type { ZapierAuthenticationError, ZapierResourceNotFoundError, ZapierApiError, ZapierValidationError, ZapierUnknownError } from "../../types/errors";
4
4
  export declare const GetConnectionParamSchema: z.ZodObject<{
5
+ connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
5
6
  connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
6
7
  authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
7
8
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAC5F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,wBAAwB;;;iBAInC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAG1E,MAAM,MAAM,kBAAkB,GAC1B,yBAAyB,GACzB,2BAA2B,GAC3B,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,CACb,OAAO,EAAE,kBAAkB,KACxB,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACrC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAC5F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,wBAAwB;;;;iBAUnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAG1E,MAAM,MAAM,kBAAkB,GAC1B,yBAAyB,GACzB,2BAA2B,GAC3B,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,CACb,OAAO,EAAE,kBAAkB,KACxB,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACrC"}
@@ -1,8 +1,14 @@
1
1
  import { z } from "zod";
2
- import { ConnectionIdPropertySchema } from "../../types/properties";
3
- // Schema that supports both connectionId (new) and authenticationId (deprecated)
2
+ import { ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdPropertySchema, } from "../../types/properties";
3
+ // Schema that supports connection (new), connectionId (deprecated), and authenticationId (deprecated)
4
4
  export const GetConnectionParamSchema = z.object({
5
- connectionId: ConnectionIdPropertySchema.optional(),
6
- /** @deprecated Use connectionId instead */
7
- authenticationId: ConnectionIdPropertySchema.optional(),
5
+ connection: ConnectionPropertySchema.optional(),
6
+ /** @deprecated Use connection instead */
7
+ connectionId: ConnectionIdPropertySchema.optional().meta({
8
+ deprecated: true,
9
+ }),
10
+ /** @deprecated Use connection instead */
11
+ authenticationId: AuthenticationIdPropertySchema.optional().meta({
12
+ deprecated: true,
13
+ }),
8
14
  });
@@ -4,6 +4,7 @@ import { GetInputFieldsSchemaSchema, type GetInputFieldsSchemaOptions as GetInpu
4
4
  import type { GetActionPluginProvides } from "../getAction";
5
5
  import type { GetVersionedImplementationId } from "../manifest/schemas";
6
6
  import type { EventEmissionContext } from "../eventEmission";
7
+ import type { ConnectionsPluginProvides } from "../connections";
7
8
  export interface GetInputFieldsSchemaPluginProvides {
8
9
  getInputFieldsSchema: (options: GetInputFieldsSchemaOptions) => Promise<{
9
10
  data: Record<string, unknown>;
@@ -19,5 +20,5 @@ export interface GetInputFieldsSchemaPluginProvides {
19
20
  export declare const getInputFieldsSchemaPlugin: Plugin<GetSdkType<GetActionPluginProvides>, {
20
21
  api: ApiClient;
21
22
  getVersionedImplementationId: GetVersionedImplementationId;
22
- } & EventEmissionContext, GetInputFieldsSchemaPluginProvides>;
23
+ } & EventEmissionContext & ConnectionsPluginProvides["context"], GetInputFieldsSchemaPluginProvides>;
23
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getInputFieldsSchema/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,EACL,0BAA0B,EAC1B,KAAK,2BAA2B,IAAI,2BAA2B,EAChE,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAUxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,WAA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B,EAAE;gBACpB,WAAW,EAAE,OAAO,0BAA0B,CAAC;aAChD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,UAAU,CAAC,uBAAuB,CAAC,EACnC;IACE,GAAG,EAAE,SAAS,CAAC;IACf,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,GAAG,oBAAoB,GACtB,yBAAyB,CAAC,SAAS,CAAC,EACtC,kCAAkC,CAmFnC,CAAC"}
@@ -1,16 +1,23 @@
1
- import { GetInputFieldsSchemaSchema, } from "./schemas";
1
+ import { GetInputFieldsSchemaSchema, GetInputFieldsSchemaInputSchema, } from "./schemas";
2
2
  import { ZapierConfigurationError } from "../../types/errors";
3
3
  import { createFunction } from "../../utils/function-utils";
4
4
  import { appKeyResolver, actionTypeResolver, actionKeyResolver, connectionIdResolver, inputsAllOptionalResolver, } from "../../resolvers";
5
5
  import { fetchImplementationNeeds } from "../../services/implementations";
6
6
  import { createTelemetryCallback } from "../../utils/telemetry-utils";
7
+ import { resolveConnectionId } from "../../utils/domain-utils";
7
8
  import { setMethodMetadata } from "../../utils/telemetry-context";
8
9
  export const getInputFieldsSchemaPlugin = ({ sdk, context }) => {
9
10
  async function getInputFieldsSchema(options) {
10
11
  const { api, getVersionedImplementationId } = context;
11
- const { appKey, actionKey, actionType, connectionId, authenticationId, inputs, } = options;
12
- // Support both connectionId (new) and authenticationId (deprecated)
13
- const resolvedConnectionId = connectionId ?? authenticationId ?? null;
12
+ const appKey = "app" in options ? options.app : options.appKey;
13
+ const actionKey = "action" in options ? options.action : options.actionKey;
14
+ const { actionType, connection, connectionId, authenticationId, inputs } = options;
15
+ const resolvedConnectionId = await resolveConnectionId({
16
+ connection,
17
+ connectionId,
18
+ authenticationId,
19
+ resolveConnection: context.resolveConnection,
20
+ });
14
21
  const selectedApi = await getVersionedImplementationId(appKey);
15
22
  if (!selectedApi) {
16
23
  throw new ZapierConfigurationError("No current_implementation_id found for app", { configType: "current_implementation_id" });
@@ -21,23 +28,23 @@ export const getInputFieldsSchemaPlugin = ({ sdk, context }) => {
21
28
  operationKey: actionKey,
22
29
  });
23
30
  const { data: action } = await sdk.getAction({
24
- appKey,
31
+ app: appKey,
25
32
  actionType,
26
- actionKey,
33
+ action: actionKey,
27
34
  });
28
35
  const needsData = await fetchImplementationNeeds({
29
36
  api,
30
37
  selectedApi,
31
38
  action: action.key,
32
39
  actionType,
33
- connectionId: resolvedConnectionId,
40
+ connectionId: resolvedConnectionId ?? null,
34
41
  inputs,
35
42
  });
36
43
  return {
37
44
  data: needsData.schema || {},
38
45
  };
39
46
  }
40
- const getInputFieldsSchemaDefinition = createFunction(getInputFieldsSchema, GetInputFieldsSchemaSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getInputFieldsSchema.name));
47
+ const getInputFieldsSchemaDefinition = createFunction(getInputFieldsSchema, GetInputFieldsSchemaInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getInputFieldsSchema.name));
41
48
  return {
42
49
  getInputFieldsSchema: getInputFieldsSchemaDefinition,
43
50
  context: {
@@ -48,13 +55,12 @@ export const getInputFieldsSchemaPlugin = ({ sdk, context }) => {
48
55
  itemType: "InputSchema",
49
56
  inputSchema: GetInputFieldsSchemaSchema,
50
57
  resolvers: {
51
- appKey: appKeyResolver,
58
+ app: appKeyResolver,
52
59
  actionType: actionTypeResolver,
53
- actionKey: actionKeyResolver,
54
- connectionId: connectionIdResolver,
60
+ action: actionKeyResolver,
61
+ connection: connectionIdResolver,
55
62
  inputs: inputsAllOptionalResolver,
56
63
  },
57
- deprecatedParameters: ["authenticationId"],
58
64
  },
59
65
  },
60
66
  },
@@ -1,6 +1,28 @@
1
1
  import { z } from "zod";
2
2
  import type { ZapierConfigurationError, ZapierApiError, ZapierAuthenticationError, ZapierAppNotFoundError, ZapierValidationError, ZapierUnknownError } from "../../types/errors";
3
3
  export declare const GetInputFieldsSchemaSchema: z.ZodObject<{
4
+ app: z.ZodString & {
5
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
6
+ };
7
+ actionType: z.ZodEnum<{
8
+ search: "search";
9
+ filter: "filter";
10
+ read: "read";
11
+ read_bulk: "read_bulk";
12
+ run: "run";
13
+ search_and_write: "search_and_write";
14
+ search_or_write: "search_or_write";
15
+ write: "write";
16
+ }>;
17
+ action: z.ZodString & {
18
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
19
+ };
20
+ connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
21
+ connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
22
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
23
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
24
+ }, z.core.$strip>;
25
+ declare const GetInputFieldsSchemaSchemaDeprecated: z.ZodObject<{
4
26
  appKey: z.ZodString & {
5
27
  _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
6
28
  };
@@ -15,15 +37,63 @@ export declare const GetInputFieldsSchemaSchema: z.ZodObject<{
15
37
  write: "write";
16
38
  }>;
17
39
  actionKey: z.ZodString;
40
+ connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
18
41
  connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
19
42
  authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
20
43
  inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
21
44
  }, z.core.$strip>;
22
- export type GetInputFieldsSchemaOptions = z.infer<typeof GetInputFieldsSchemaSchema>;
45
+ export declare const GetInputFieldsSchemaInputSchema: z.ZodUnion<readonly [z.ZodObject<{
46
+ app: z.ZodString & {
47
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
48
+ };
49
+ actionType: z.ZodEnum<{
50
+ search: "search";
51
+ filter: "filter";
52
+ read: "read";
53
+ read_bulk: "read_bulk";
54
+ run: "run";
55
+ search_and_write: "search_and_write";
56
+ search_or_write: "search_or_write";
57
+ write: "write";
58
+ }>;
59
+ action: z.ZodString & {
60
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
61
+ };
62
+ connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
63
+ connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
64
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
65
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
66
+ }, z.core.$strip>, z.ZodObject<{
67
+ appKey: z.ZodString & {
68
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
69
+ };
70
+ actionType: z.ZodEnum<{
71
+ search: "search";
72
+ filter: "filter";
73
+ read: "read";
74
+ read_bulk: "read_bulk";
75
+ run: "run";
76
+ search_and_write: "search_and_write";
77
+ search_or_write: "search_or_write";
78
+ write: "write";
79
+ }>;
80
+ actionKey: z.ZodString;
81
+ connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
82
+ connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
83
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
84
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
85
+ }, z.core.$strip>]>;
86
+ export type GetInputFieldsSchemaOptions = z.infer<typeof GetInputFieldsSchemaSchema> | (Omit<z.infer<typeof GetInputFieldsSchemaSchemaDeprecated>, "appKey" | "actionKey"> & {
87
+ /** @deprecated Use `app` instead. */
88
+ appKey: z.infer<typeof GetInputFieldsSchemaSchemaDeprecated>["appKey"];
89
+ /** @deprecated Use `action` instead. */
90
+ actionKey: z.infer<typeof GetInputFieldsSchemaSchemaDeprecated>["actionKey"];
91
+ });
23
92
  export type GetInputFieldsSchemaError = ZapierConfigurationError | ZapierApiError | ZapierAuthenticationError | ZapierAppNotFoundError | ZapierValidationError | ZapierUnknownError;
24
93
  export interface GetInputFieldsSchemaSdkFunction {
25
94
  getInputFieldsSchema: (options: GetInputFieldsSchemaOptions) => Promise<{
26
95
  data: Record<string, unknown>;
27
96
  }>;
28
97
  }
98
+ export {};
29
99
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getInputFieldsSchema/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;iBA4BpC,CAAC;AAEJ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,0BAA0B,CAClC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GACjC,wBAAwB,GACxB,cAAc,GACd,yBAAyB,GACzB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,+BAA+B;IAC9C,oBAAoB,EAAE,CACpB,OAAO,EAAE,2BAA2B,KACjC,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CACjD"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getInputFieldsSchema/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AA6B5B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;iBAqBnC,CAAC;AAGL,QAAA,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;iBAYF,CAAC;AAGzC,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAEA,CAAC;AAG7C,MAAM,MAAM,2BAA2B,GACnC,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,GAC1C,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,EACpD,QAAQ,GAAG,WAAW,CACvB,GAAG;IACF,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACvE,wCAAwC;IACxC,SAAS,EAAE,CAAC,CAAC,KAAK,CAChB,OAAO,oCAAoC,CAC5C,CAAC,WAAW,CAAC,CAAC;CAChB,CAAC,CAAC;AAEP,MAAM,MAAM,yBAAyB,GACjC,wBAAwB,GACxB,cAAc,GACd,yBAAyB,GACzB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,+BAA+B;IAC9C,oBAAoB,EAAE,CACpB,OAAO,EAAE,2BAA2B,KACjC,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CACjD"}
@@ -1,17 +1,46 @@
1
1
  import { z } from "zod";
2
- import { AppKeyPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ConnectionIdPropertySchema, AuthenticationIdPropertySchema, InputsPropertySchema, } from "../../types/properties";
3
- export const GetInputFieldsSchemaSchema = z
4
- .object({
5
- appKey: AppKeyPropertySchema.describe("App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for"),
6
- actionType: ActionTypePropertySchema.describe("Action type that matches the action's defined type"),
7
- actionKey: ActionKeyPropertySchema.describe("Action key to get the input schema for"),
2
+ import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ActionPropertySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdPropertySchema, InputsPropertySchema, } from "../../types/properties";
3
+ const GetInputFieldsSchemaDescription = "Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action's input parameters.";
4
+ // Base schema for shared (optional) properties
5
+ const GetInputFieldsSchemaBaseSchema = z.object({
6
+ connection: ConnectionPropertySchema.optional().describe("Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."),
8
7
  connectionId: ConnectionIdPropertySchema.nullable()
9
8
  .optional()
10
- .describe("Connection ID to use when fetching the schema. Required if the action needs a connection to determine available fields."),
11
- /** @deprecated Use connectionId instead */
9
+ .describe("Connection ID to use when fetching the schema. Required if the action needs a connection to determine available fields.")
10
+ .meta({ deprecated: true }),
11
+ /** @deprecated Use connection instead */
12
12
  authenticationId: AuthenticationIdPropertySchema.nullable()
13
13
  .optional()
14
- .describe("Authentication ID to use when fetching the schema. Required if the action needs a connection to determine available fields."),
14
+ .describe("Authentication ID to use when fetching the schema. Required if the action needs a connection to determine available fields.")
15
+ .meta({ deprecated: true }),
15
16
  inputs: InputsPropertySchema.optional().describe("Current input values that may affect the schema (e.g., when fields depend on other field values)"),
17
+ });
18
+ // Schema for docs/registry (new param names only)
19
+ export const GetInputFieldsSchemaSchema = z
20
+ .object({
21
+ app: AppPropertySchema.describe("App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for"),
22
+ actionType: ActionTypePropertySchema.describe("Action type that matches the action's defined type"),
23
+ action: ActionPropertySchema.describe("Action key to get the input schema for"),
24
+ })
25
+ .merge(GetInputFieldsSchemaBaseSchema)
26
+ .describe(GetInputFieldsSchemaDescription)
27
+ .meta({
28
+ aliases: {
29
+ appKey: "app",
30
+ actionKey: "action",
31
+ connectionId: "connection",
32
+ authenticationId: "connection",
33
+ },
34
+ });
35
+ // Deprecated schema (backward compat)
36
+ const GetInputFieldsSchemaSchemaDeprecated = z
37
+ .object({
38
+ appKey: AppKeyPropertySchema.describe("App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for"),
39
+ actionType: ActionTypePropertySchema.describe("Action type that matches the action's defined type"),
40
+ actionKey: ActionKeyPropertySchema.describe("Action key to get the input schema for"),
16
41
  })
17
- .describe("Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action's input parameters.");
42
+ .merge(GetInputFieldsSchemaBaseSchema);
43
+ // Union for runtime validation (accepts either new or old names)
44
+ export const GetInputFieldsSchemaInputSchema = z
45
+ .union([GetInputFieldsSchemaSchema, GetInputFieldsSchemaSchemaDeprecated])
46
+ .describe(GetInputFieldsSchemaDescription);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listActions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,WAAW,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,iBAAiB,EACjB,KAAK,kBAAkB,EAExB,MAAM,WAAW,CAAC;AAQnB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAK7D,MAAM,WAAW,yBAAyB;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K,OAAO,CAAC;QACrD,IAAI,EAAE,UAAU,EAAE,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAC3D,KAAK,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;KACpC,CAAC;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,WAAW,EAAE,OAAO,iBAAiB,CAAC;aACvC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,UAAU,CAAC,sBAAsB,CAAC,EAClC;IACE,GAAG,EAAE,SAAS,CAAC;IACf,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,GAAG,oBAAoB,EACxB,yBAAyB,CA6G1B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { normalizeActionItem } from "../../utils/domain-utils";
2
- import { ListActionsSchema, } from "./schemas";
2
+ import { ListActionsSchema, ListActionsInputSchema, } from "./schemas";
3
3
  import { ActionItemSchema } from "../../schemas/Action";
4
4
  import { ZapierConfigurationError, ZapierAuthenticationError, } from "../../types/errors";
5
5
  import { createPaginatedFunction } from "../../utils/function-utils";
@@ -16,14 +16,15 @@ export const listActionsPlugin = ({ context }) => {
16
16
  inputSchema: ListActionsSchema,
17
17
  outputSchema: ActionItemSchema,
18
18
  resolvers: {
19
- appKey: appKeyResolver,
19
+ app: appKeyResolver,
20
20
  actionType: actionTypeResolver,
21
21
  },
22
22
  };
23
23
  async function listActionsPage(options) {
24
24
  const { api, getVersionedImplementationId } = context;
25
+ const appKey = "app" in options ? options.app : options.appKey;
25
26
  // Use getVersionedImplementationId (optimized to check manifest first)
26
- const selectedApi = await getVersionedImplementationId(options.appKey);
27
+ const selectedApi = await getVersionedImplementationId(appKey);
27
28
  if (!selectedApi) {
28
29
  throw new ZapierConfigurationError("No current_implementation_id found for app", { configType: "current_implementation_id" });
29
30
  }
@@ -70,7 +71,7 @@ export const listActionsPlugin = ({ context }) => {
70
71
  };
71
72
  }
72
73
  const methodName = stripPageSuffix(listActionsPage.name);
73
- const listActionsDefinition = createPaginatedFunction(listActionsPage, ListActionsSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, methodName), methodName, DEFAULT_PAGE_SIZE);
74
+ const listActionsDefinition = createPaginatedFunction(listActionsPage, ListActionsInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, methodName), methodName, DEFAULT_PAGE_SIZE);
74
75
  return {
75
76
  listActions: listActionsDefinition,
76
77
  context: {
@@ -3,6 +3,24 @@ import type { ActionItem } from "../../types/domain";
3
3
  import type { PaginatedSdkFunction } from "../../types/functions";
4
4
  import type { ZapierAuthenticationError, ZapierValidationError, ZapierUnknownError } from "../../types/errors";
5
5
  export declare const ListActionsSchema: z.ZodObject<{
6
+ app: z.ZodString & {
7
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
8
+ };
9
+ actionType: z.ZodOptional<z.ZodEnum<{
10
+ search: "search";
11
+ filter: "filter";
12
+ read: "read";
13
+ read_bulk: "read_bulk";
14
+ run: "run";
15
+ search_and_write: "search_and_write";
16
+ search_or_write: "search_or_write";
17
+ write: "write";
18
+ }>>;
19
+ pageSize: z.ZodOptional<z.ZodNumber>;
20
+ maxItems: z.ZodOptional<z.ZodNumber>;
21
+ cursor: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$strip>;
23
+ declare const ListActionsSchemaDeprecated: z.ZodObject<{
6
24
  appKey: z.ZodString & {
7
25
  _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
8
26
  };
@@ -20,7 +38,45 @@ export declare const ListActionsSchema: z.ZodObject<{
20
38
  maxItems: z.ZodOptional<z.ZodNumber>;
21
39
  cursor: z.ZodOptional<z.ZodString>;
22
40
  }, z.core.$strip>;
23
- export type ListActionsOptions = z.infer<typeof ListActionsSchema>;
41
+ export declare const ListActionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
42
+ app: z.ZodString & {
43
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
44
+ };
45
+ actionType: z.ZodOptional<z.ZodEnum<{
46
+ search: "search";
47
+ filter: "filter";
48
+ read: "read";
49
+ read_bulk: "read_bulk";
50
+ run: "run";
51
+ search_and_write: "search_and_write";
52
+ search_or_write: "search_or_write";
53
+ write: "write";
54
+ }>>;
55
+ pageSize: z.ZodOptional<z.ZodNumber>;
56
+ maxItems: z.ZodOptional<z.ZodNumber>;
57
+ cursor: z.ZodOptional<z.ZodString>;
58
+ }, z.core.$strip>, z.ZodObject<{
59
+ appKey: z.ZodString & {
60
+ _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
61
+ };
62
+ actionType: z.ZodOptional<z.ZodEnum<{
63
+ search: "search";
64
+ filter: "filter";
65
+ read: "read";
66
+ read_bulk: "read_bulk";
67
+ run: "run";
68
+ search_and_write: "search_and_write";
69
+ search_or_write: "search_or_write";
70
+ write: "write";
71
+ }>>;
72
+ pageSize: z.ZodOptional<z.ZodNumber>;
73
+ maxItems: z.ZodOptional<z.ZodNumber>;
74
+ cursor: z.ZodOptional<z.ZodString>;
75
+ }, z.core.$strip>]>;
76
+ export type ListActionsOptions = z.infer<typeof ListActionsSchema> | (Omit<z.infer<typeof ListActionsSchemaDeprecated>, "appKey"> & {
77
+ /** @deprecated Use `app` instead. */
78
+ appKey: z.infer<typeof ListActionsSchemaDeprecated>["appKey"];
79
+ });
24
80
  export interface ListActionsPage {
25
81
  data: ActionItem[];
26
82
  nextCursor?: string;
@@ -29,4 +85,5 @@ export type ListActionsError = ZapierAuthenticationError | ZapierValidationError
29
85
  export interface ListActionsSdkFunction {
30
86
  listActions: PaginatedSdkFunction<ListActionsOptions, ActionItem>;
31
87
  }
88
+ export {};
32
89
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listActions/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;iBAoBoB,CAAC;AAGnD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAGnE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,gBAAgB,GACxB,yBAAyB,GACzB,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,oBAAoB,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;CACnE"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listActions/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAgB5B,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;iBAWS,CAAC;AAGxC,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;iBASF,CAAC;AAGhC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAEA,CAAC;AAGpC,MAAM,MAAM,kBAAkB,GAC1B,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,GACjC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,EAAE,QAAQ,CAAC,GAAG;IAC7D,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC/D,CAAC,CAAC;AAGP,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,gBAAgB,GACxB,yBAAyB,GACzB,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,oBAAoB,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;CACnE"}
@@ -1,20 +1,33 @@
1
1
  import { z } from "zod";
2
- import { AppKeyPropertySchema, ActionTypePropertySchema, } from "../../types/properties";
3
- // Pure Zod schema - no resolver metadata!
4
- export const ListActionsSchema = z
5
- .object({
6
- appKey: AppKeyPropertySchema.describe("App key of actions to list (e.g., 'SlackCLIAPI' or slug like 'github')"),
7
- actionType: ActionTypePropertySchema.optional().describe("Filter actions by type"),
8
- pageSize: z
9
- .number()
10
- .min(1)
11
- .optional()
12
- .describe("Number of actions per page"),
2
+ import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, } from "../../types/properties";
3
+ const ListActionsDescription = "List all actions for a specific app";
4
+ // Base schema for shared optional properties
5
+ const ListActionsBaseSchema = z.object({
6
+ pageSize: z.number().min(1).optional().describe("Number of actions per page"),
13
7
  maxItems: z
14
8
  .number()
15
9
  .min(1)
16
10
  .optional()
17
11
  .describe("Maximum total items to return across all pages"),
18
12
  cursor: z.string().optional().describe("Cursor to start from"),
13
+ });
14
+ // Schema for docs/registry (new param names only)
15
+ export const ListActionsSchema = z
16
+ .object({
17
+ app: AppPropertySchema.describe("App key of actions to list (e.g., 'SlackCLIAPI' or slug like 'github')"),
18
+ actionType: ActionTypePropertySchema.optional().describe("Filter actions by type"),
19
+ })
20
+ .merge(ListActionsBaseSchema)
21
+ .describe(ListActionsDescription)
22
+ .meta({ aliases: { appKey: "app" } });
23
+ // Deprecated schema (backward compat)
24
+ const ListActionsSchemaDeprecated = z
25
+ .object({
26
+ appKey: AppKeyPropertySchema.describe("App key of actions to list (e.g., 'SlackCLIAPI' or slug like 'github')"),
27
+ actionType: ActionTypePropertySchema.optional().describe("Filter actions by type"),
19
28
  })
20
- .describe("List all actions for a specific app");
29
+ .merge(ListActionsBaseSchema);
30
+ // Union for runtime validation (accepts either new or old names)
31
+ export const ListActionsInputSchema = z
32
+ .union([ListActionsSchema, ListActionsSchemaDeprecated])
33
+ .describe(ListActionsDescription);
@@ -7,7 +7,7 @@ import { stripPageSuffix } from "../../utils/string-utils";
7
7
  export const listAppsPlugin = ({ context }) => {
8
8
  async function listAppsPage(options) {
9
9
  const { api, resolveAppKeys } = context;
10
- const appKeys = options.appKeys ?? [];
10
+ const appKeys = options.apps ?? options.appKeys ?? [];
11
11
  const appLocators = await resolveAppKeys({
12
12
  appKeys: [...appKeys],
13
13
  });
@@ -27,6 +27,7 @@ export type { AppItem, ListAppsResponse };
27
27
  */
28
28
  export declare const ListAppsSchema: z.ZodObject<{
29
29
  search: z.ZodOptional<z.ZodString>;
30
+ apps: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
31
  appKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
32
  pageSize: z.ZodOptional<z.ZodNumber>;
32
33
  maxItems: z.ZodOptional<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listApps/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,E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ACZ,KAAK,gBAAgB,EACtB,MAAM,yCAAyC,CAAC;AAGjD,OAAO,EAAE,iBAAiB,IAAI,aAAa,EAAE,CAAC;AAC9C,OAAO,EAAE,0BAA0B,IAAI,sBAAsB,EAAE,CAAC;AAChE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;iBA4BmC,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAG7D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,qBAAqB,CAAC;AAGnE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,oBAAoB,CAAC,eAAe,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;CACtE"}
@@ -11,6 +11,7 @@
11
11
  * - The plugin transforms between these formats
12
12
  */
13
13
  import { z } from "zod";
14
+ import { AppsPropertySchema } from "../../types/properties";
14
15
  // Import schemas and types from @zapier/zapier-sdk-core (sdkapi)
15
16
  import { AppItemSchema as AppItemSchemaBase, ListAppsResponseSchema as ListAppsResponseSchemaBase, ListAppsQuerySchema as ListAppsQueryBase, } from "@zapier/zapier-sdk-core/v0/schemas/apps";
16
17
  // Re-export for consumers
@@ -28,11 +29,15 @@ export const ListAppsSchema = ListAppsQueryBase.omit({
28
29
  offset: true,
29
30
  })
30
31
  .extend({
32
+ // New name for appKeys
33
+ apps: AppsPropertySchema.optional().describe("Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github')"),
31
34
  // Override appKeys to be an array instead of comma-separated string
35
+ /** @deprecated Use `apps` instead. */
32
36
  appKeys: z
33
37
  .array(z.string())
34
38
  .optional()
35
- .describe("Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github')"),
39
+ .describe("Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github')")
40
+ .meta({ deprecated: true }),
36
41
  // Override pageSize to make optional (base has default value)
37
42
  pageSize: z.number().min(1).optional().describe("Number of apps per page"),
38
43
  // SDK specific property for pagination/iterable helpers
@@ -6,6 +6,7 @@ import type { GetVersionedImplementationId } from "../manifest/schemas";
6
6
  import type { ManifestPluginProvides } from "../manifest";
7
7
  import type { EventEmissionContext } from "../eventEmission";
8
8
  import type { CapabilitiesContext } from "../capabilities";
9
+ import type { ConnectionsPluginProvides } from "../connections";
9
10
  export interface ListConnectionsPluginProvides {
10
11
  listConnections: (options?: ListConnectionsOptions) => Promise<ListConnectionsPage> & AsyncIterable<ListConnectionsPage> & {
11
12
  items(): AsyncIterable<ConnectionItem>;
@@ -21,5 +22,5 @@ export interface ListConnectionsPluginProvides {
21
22
  export declare const listConnectionsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, {
22
23
  api: ApiClient;
23
24
  getVersionedImplementationId: GetVersionedImplementationId;
24
- } & EventEmissionContext & CapabilitiesContext, ListConnectionsPluginProvides>;
25
+ } & EventEmissionContext & CapabilitiesContext & ConnectionsPluginProvides["context"], ListConnectionsPluginProvides>;
25
26
  //# 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,gDAAgD,CAAC;AACrF,OAAO,EACL,0BAA0B,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,WAAW,CAAC;AAKnB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE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