@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.
- package/CHANGELOG.md +12 -0
- package/CLAUDE.md +12 -14
- package/README.md +186 -192
- package/dist/api/schemas.d.ts +2 -2
- package/dist/api/schemas.js +3 -3
- package/dist/formatters/tableRecord.js +1 -1
- package/dist/index.cjs +652 -377
- package/dist/index.d.mts +468 -53
- package/dist/index.mjs +643 -378
- package/dist/plugins/apps/index.d.ts +1 -1
- package/dist/plugins/apps/index.d.ts.map +1 -1
- package/dist/plugins/apps/index.js +4 -8
- package/dist/plugins/apps/schemas.d.ts +2 -1
- package/dist/plugins/apps/schemas.d.ts.map +1 -1
- package/dist/plugins/apps/schemas.js +24 -8
- package/dist/plugins/fetch/index.d.ts +4 -2
- package/dist/plugins/fetch/index.d.ts.map +1 -1
- package/dist/plugins/fetch/index.js +1 -3
- package/dist/plugins/fetch/schemas.d.ts.map +1 -1
- package/dist/plugins/fetch/schemas.js +11 -4
- package/dist/plugins/findFirstConnection/index.d.ts.map +1 -1
- package/dist/plugins/findFirstConnection/index.js +0 -1
- package/dist/plugins/findFirstConnection/schemas.d.ts +4 -1
- package/dist/plugins/findFirstConnection/schemas.d.ts.map +1 -1
- package/dist/plugins/findFirstConnection/schemas.js +2 -0
- package/dist/plugins/findUniqueConnection/index.d.ts.map +1 -1
- package/dist/plugins/findUniqueConnection/index.js +0 -1
- package/dist/plugins/findUniqueConnection/schemas.d.ts +4 -1
- package/dist/plugins/findUniqueConnection/schemas.d.ts.map +1 -1
- package/dist/plugins/findUniqueConnection/schemas.js +2 -0
- package/dist/plugins/getAction/index.d.ts.map +1 -1
- package/dist/plugins/getAction/index.js +8 -6
- package/dist/plugins/getAction/schemas.d.ts +58 -1
- package/dist/plugins/getAction/schemas.d.ts.map +1 -1
- package/dist/plugins/getAction/schemas.js +16 -4
- package/dist/plugins/getApp/index.d.ts.map +1 -1
- package/dist/plugins/getApp/index.js +6 -5
- package/dist/plugins/getApp/schemas.d.ts +19 -1
- package/dist/plugins/getApp/schemas.d.ts.map +1 -1
- package/dist/plugins/getApp/schemas.js +14 -4
- package/dist/plugins/getConnection/index.d.ts.map +1 -1
- package/dist/plugins/getConnection/index.js +3 -5
- package/dist/plugins/getConnection/schemas.d.ts +1 -0
- package/dist/plugins/getConnection/schemas.d.ts.map +1 -1
- package/dist/plugins/getConnection/schemas.js +11 -5
- package/dist/plugins/getInputFieldsSchema/index.d.ts +2 -1
- package/dist/plugins/getInputFieldsSchema/index.d.ts.map +1 -1
- package/dist/plugins/getInputFieldsSchema/index.js +18 -12
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts +71 -1
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +1 -1
- package/dist/plugins/getInputFieldsSchema/schemas.js +39 -10
- package/dist/plugins/listActions/index.d.ts.map +1 -1
- package/dist/plugins/listActions/index.js +5 -4
- package/dist/plugins/listActions/schemas.d.ts +58 -1
- package/dist/plugins/listActions/schemas.d.ts.map +1 -1
- package/dist/plugins/listActions/schemas.js +25 -12
- package/dist/plugins/listApps/index.js +1 -1
- package/dist/plugins/listApps/schemas.d.ts +1 -0
- package/dist/plugins/listApps/schemas.d.ts.map +1 -1
- package/dist/plugins/listApps/schemas.js +6 -1
- package/dist/plugins/listConnections/index.d.ts +2 -1
- package/dist/plugins/listConnections/index.d.ts.map +1 -1
- package/dist/plugins/listConnections/index.js +27 -14
- package/dist/plugins/listConnections/schemas.d.ts +5 -0
- package/dist/plugins/listConnections/schemas.d.ts.map +1 -1
- package/dist/plugins/listConnections/schemas.js +22 -9
- package/dist/plugins/listInputFieldChoices/index.d.ts +2 -2
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/index.js +21 -15
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +92 -1
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/schemas.js +47 -23
- package/dist/plugins/listInputFields/index.d.ts +2 -1
- package/dist/plugins/listInputFields/index.d.ts.map +1 -1
- package/dist/plugins/listInputFields/index.js +18 -13
- package/dist/plugins/listInputFields/schemas.d.ts +80 -1
- package/dist/plugins/listInputFields/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFields/schemas.js +40 -11
- package/dist/plugins/manifest/schemas.d.ts.map +1 -1
- package/dist/plugins/manifest/schemas.js +4 -2
- package/dist/plugins/registry/index.d.ts.map +1 -1
- package/dist/plugins/registry/index.js +0 -1
- package/dist/plugins/request/index.d.ts.map +1 -1
- package/dist/plugins/request/index.js +2 -5
- package/dist/plugins/request/schemas.d.ts +2 -0
- package/dist/plugins/request/schemas.d.ts.map +1 -1
- package/dist/plugins/request/schemas.js +13 -5
- package/dist/plugins/runAction/index.d.ts.map +1 -1
- package/dist/plugins/runAction/index.js +17 -15
- package/dist/plugins/runAction/schemas.d.ts +83 -2
- package/dist/plugins/runAction/schemas.d.ts.map +1 -1
- package/dist/plugins/runAction/schemas.js +41 -17
- package/dist/plugins/tables/createTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableFields/index.js +5 -4
- package/dist/plugins/tables/createTableFields/schemas.d.ts +128 -2
- package/dist/plugins/tables/createTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/createTableFields/schemas.js +23 -7
- package/dist/plugins/tables/createTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/index.js +7 -6
- package/dist/plugins/tables/createTableRecords/schemas.d.ts +38 -2
- package/dist/plugins/tables/createTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/schemas.js +23 -7
- package/dist/plugins/tables/deleteTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTable/index.js +5 -4
- package/dist/plugins/tables/deleteTable/schemas.d.ts +17 -1
- package/dist/plugins/tables/deleteTable/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTable/schemas.js +14 -2
- package/dist/plugins/tables/deleteTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableFields/index.js +9 -7
- package/dist/plugins/tables/deleteTableFields/schemas.d.ts +22 -1
- package/dist/plugins/tables/deleteTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableFields/schemas.js +18 -2
- package/dist/plugins/tables/deleteTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableRecords/index.js +7 -5
- package/dist/plugins/tables/deleteTableRecords/schemas.d.ts +22 -1
- package/dist/plugins/tables/deleteTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableRecords/schemas.js +18 -2
- package/dist/plugins/tables/getTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/getTable/index.js +6 -5
- package/dist/plugins/tables/getTable/schemas.d.ts +16 -1
- package/dist/plugins/tables/getTable/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/getTable/schemas.js +14 -2
- package/dist/plugins/tables/getTableRecord/index.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/index.js +9 -7
- package/dist/plugins/tables/getTableRecord/schemas.d.ts +39 -2
- package/dist/plugins/tables/getTableRecord/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/schemas.js +20 -5
- package/dist/plugins/tables/listTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableFields/index.js +10 -8
- package/dist/plugins/tables/listTableFields/schemas.d.ts +27 -2
- package/dist/plugins/tables/listTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTableFields/schemas.js +24 -8
- package/dist/plugins/tables/listTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableRecords/index.js +7 -6
- package/dist/plugins/tables/listTableRecords/schemas.d.ts +119 -2
- package/dist/plugins/tables/listTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTableRecords/schemas.js +23 -7
- package/dist/plugins/tables/listTables/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTables/index.js +3 -2
- package/dist/plugins/tables/listTables/schemas.d.ts +5 -1
- package/dist/plugins/tables/listTables/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTables/schemas.js +4 -1
- package/dist/plugins/tables/updateTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/updateTableRecords/index.js +7 -6
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts +41 -2
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/updateTableRecords/schemas.js +23 -7
- package/dist/resolvers/actionKey.d.ts +1 -1
- package/dist/resolvers/actionKey.d.ts.map +1 -1
- package/dist/resolvers/actionKey.js +3 -3
- package/dist/resolvers/actionType.d.ts +1 -1
- package/dist/resolvers/actionType.d.ts.map +1 -1
- package/dist/resolvers/actionType.js +2 -2
- package/dist/resolvers/connectionId.d.ts +1 -1
- package/dist/resolvers/connectionId.d.ts.map +1 -1
- package/dist/resolvers/connectionId.js +9 -9
- package/dist/resolvers/inputFieldKey.d.ts +3 -3
- package/dist/resolvers/inputFieldKey.d.ts.map +1 -1
- package/dist/resolvers/inputFieldKey.js +6 -6
- package/dist/resolvers/inputs.d.ts +3 -3
- package/dist/resolvers/inputs.d.ts.map +1 -1
- package/dist/resolvers/inputs.js +8 -8
- package/dist/resolvers/tableFieldIds.d.ts +1 -1
- package/dist/resolvers/tableFieldIds.d.ts.map +1 -1
- package/dist/resolvers/tableFieldIds.js +3 -3
- package/dist/resolvers/tableFilters.d.ts +1 -1
- package/dist/resolvers/tableFilters.d.ts.map +1 -1
- package/dist/resolvers/tableFilters.js +4 -4
- package/dist/resolvers/tableId.js +1 -1
- package/dist/resolvers/tableRecordId.d.ts +2 -2
- package/dist/resolvers/tableRecordId.d.ts.map +1 -1
- package/dist/resolvers/tableRecordId.js +5 -5
- package/dist/resolvers/tableRecords.d.ts +2 -2
- package/dist/resolvers/tableRecords.d.ts.map +1 -1
- package/dist/resolvers/tableRecords.js +6 -6
- package/dist/resolvers/tableSort.d.ts +1 -1
- package/dist/resolvers/tableSort.d.ts.map +1 -1
- package/dist/resolvers/tableSort.js +2 -2
- package/dist/services/implementations.d.ts.map +1 -1
- package/dist/services/implementations.js +2 -3
- package/dist/types/properties.d.ts +30 -0
- package/dist/types/properties.d.ts.map +1 -1
- package/dist/types/properties.js +34 -1
- package/dist/types/sdk.d.ts +0 -2
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/utils/domain-utils.d.ts +5 -0
- package/dist/utils/domain-utils.d.ts.map +1 -1
- package/dist/utils/domain-utils.js +17 -3
- package/dist/utils/id-utils.d.ts +2 -0
- package/dist/utils/id-utils.d.ts.map +1 -1
- package/dist/utils/id-utils.js +2 -0
- package/package.json +1 -1
|
@@ -3,6 +3,31 @@ import type { RootFieldItem } from "../../types/domain";
|
|
|
3
3
|
import type { PaginatedSdkFunction } from "../../types/functions";
|
|
4
4
|
import type { ZapierConfigurationError, ZapierApiError, ZapierAuthenticationError, ZapierAppNotFoundError, ZapierValidationError, ZapierUnknownError } from "../../types/errors";
|
|
5
5
|
export declare const ListInputFieldsSchema: z.ZodObject<{
|
|
6
|
+
app: z.ZodString & {
|
|
7
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
8
|
+
};
|
|
9
|
+
actionType: 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
|
+
action: z.ZodString & {
|
|
20
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
21
|
+
};
|
|
22
|
+
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
23
|
+
connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
24
|
+
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
25
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
26
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
declare const ListInputFieldsSchemaDeprecated: z.ZodObject<{
|
|
6
31
|
appKey: z.ZodString & {
|
|
7
32
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
8
33
|
};
|
|
@@ -17,6 +42,7 @@ export declare const ListInputFieldsSchema: z.ZodObject<{
|
|
|
17
42
|
write: "write";
|
|
18
43
|
}>;
|
|
19
44
|
actionKey: z.ZodString;
|
|
45
|
+
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
20
46
|
connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
21
47
|
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
22
48
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -24,7 +50,59 @@ export declare const ListInputFieldsSchema: z.ZodObject<{
|
|
|
24
50
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
25
51
|
cursor: z.ZodOptional<z.ZodString>;
|
|
26
52
|
}, z.core.$strip>;
|
|
27
|
-
export
|
|
53
|
+
export declare const ListInputFieldsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
54
|
+
app: z.ZodString & {
|
|
55
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
56
|
+
};
|
|
57
|
+
actionType: z.ZodEnum<{
|
|
58
|
+
search: "search";
|
|
59
|
+
filter: "filter";
|
|
60
|
+
read: "read";
|
|
61
|
+
read_bulk: "read_bulk";
|
|
62
|
+
run: "run";
|
|
63
|
+
search_and_write: "search_and_write";
|
|
64
|
+
search_or_write: "search_or_write";
|
|
65
|
+
write: "write";
|
|
66
|
+
}>;
|
|
67
|
+
action: z.ZodString & {
|
|
68
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
69
|
+
};
|
|
70
|
+
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
71
|
+
connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
72
|
+
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
73
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
74
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
+
appKey: z.ZodString & {
|
|
79
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
80
|
+
};
|
|
81
|
+
actionType: z.ZodEnum<{
|
|
82
|
+
search: "search";
|
|
83
|
+
filter: "filter";
|
|
84
|
+
read: "read";
|
|
85
|
+
read_bulk: "read_bulk";
|
|
86
|
+
run: "run";
|
|
87
|
+
search_and_write: "search_and_write";
|
|
88
|
+
search_or_write: "search_or_write";
|
|
89
|
+
write: "write";
|
|
90
|
+
}>;
|
|
91
|
+
actionKey: z.ZodString;
|
|
92
|
+
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
93
|
+
connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
94
|
+
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
95
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
96
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>]>;
|
|
100
|
+
export type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema> | (Omit<z.infer<typeof ListInputFieldsSchemaDeprecated>, "appKey" | "actionKey"> & {
|
|
101
|
+
/** @deprecated Use `app` instead. */
|
|
102
|
+
appKey: z.infer<typeof ListInputFieldsSchemaDeprecated>["appKey"];
|
|
103
|
+
/** @deprecated Use `action` instead. */
|
|
104
|
+
actionKey: z.infer<typeof ListInputFieldsSchemaDeprecated>["actionKey"];
|
|
105
|
+
});
|
|
28
106
|
export type ListInputFieldsError = ZapierConfigurationError | ZapierApiError | ZapierAuthenticationError | ZapierAppNotFoundError | ZapierValidationError | ZapierUnknownError;
|
|
29
107
|
export interface ListInputFieldsPage {
|
|
30
108
|
data: RootFieldItem[];
|
|
@@ -33,4 +111,5 @@ export interface ListInputFieldsPage {
|
|
|
33
111
|
export interface ListInputFieldsSdkFunction {
|
|
34
112
|
listInputFields: PaginatedSdkFunction<ListInputFieldsOptions, RootFieldItem[]>;
|
|
35
113
|
}
|
|
114
|
+
export {};
|
|
36
115
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listInputFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAqC5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;iBAe9B,CAAC;AAGL,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;iBAMF,CAAC;AAGpC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAEA,CAAC;AAGxC,MAAM,MAAM,sBAAsB,GAC9B,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,GACrC,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,EAC/C,QAAQ,GAAG,WAAW,CACvB,GAAG;IACF,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC,QAAQ,CAAC,CAAC;IAClE,wCAAwC;IACxC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC,WAAW,CAAC,CAAC;CACzE,CAAC,CAAC;AAGP,MAAM,MAAM,oBAAoB,GAC5B,wBAAwB,GACxB,cAAc,GACd,yBAAyB,GACzB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,oBAAoB,CACnC,sBAAsB,EACtB,aAAa,EAAE,CAChB,CAAC;CACH"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { AppKeyPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ConnectionIdPropertySchema, AuthenticationIdPropertySchema, InputsPropertySchema, } from "../../types/properties";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
actionType: ActionTypePropertySchema,
|
|
8
|
-
actionKey: ActionKeyPropertySchema,
|
|
2
|
+
import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ActionPropertySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdPropertySchema, InputsPropertySchema, } from "../../types/properties";
|
|
3
|
+
const ListInputFieldsDescription = "Get the input fields required for a specific action";
|
|
4
|
+
// Base schema for shared (optional) properties
|
|
5
|
+
const ListInputFieldsBaseSchema = 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."),
|
|
9
7
|
connectionId: ConnectionIdPropertySchema.nullable()
|
|
10
8
|
.optional()
|
|
11
|
-
.describe("Connection ID to use when listing input fields. Required if the action needs a connection to determine available fields.")
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
.describe("Connection ID to use when listing input fields. Required if the action needs a connection to determine available fields.")
|
|
10
|
+
.meta({ deprecated: true }),
|
|
11
|
+
/** @deprecated Use connection instead */
|
|
12
|
+
authenticationId: AuthenticationIdPropertySchema.nullable()
|
|
13
|
+
.optional()
|
|
14
|
+
.meta({ deprecated: true }),
|
|
14
15
|
inputs: InputsPropertySchema.optional().describe("Current input values that may affect available fields"),
|
|
15
16
|
pageSize: z
|
|
16
17
|
.number()
|
|
@@ -23,5 +24,33 @@ export const ListInputFieldsSchema = z
|
|
|
23
24
|
.optional()
|
|
24
25
|
.describe("Maximum total items to return across all pages"),
|
|
25
26
|
cursor: z.string().optional().describe("Cursor to start from"),
|
|
27
|
+
});
|
|
28
|
+
// Schema for docs/registry (new param names only)
|
|
29
|
+
export const ListInputFieldsSchema = z
|
|
30
|
+
.object({
|
|
31
|
+
app: AppPropertySchema,
|
|
32
|
+
actionType: ActionTypePropertySchema,
|
|
33
|
+
action: ActionPropertySchema,
|
|
34
|
+
})
|
|
35
|
+
.merge(ListInputFieldsBaseSchema)
|
|
36
|
+
.describe(ListInputFieldsDescription)
|
|
37
|
+
.meta({
|
|
38
|
+
aliases: {
|
|
39
|
+
appKey: "app",
|
|
40
|
+
actionKey: "action",
|
|
41
|
+
connectionId: "connection",
|
|
42
|
+
authenticationId: "connection",
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
// Deprecated schema (backward compat)
|
|
46
|
+
const ListInputFieldsSchemaDeprecated = z
|
|
47
|
+
.object({
|
|
48
|
+
appKey: AppKeyPropertySchema,
|
|
49
|
+
actionType: ActionTypePropertySchema,
|
|
50
|
+
actionKey: ActionKeyPropertySchema,
|
|
26
51
|
})
|
|
27
|
-
.
|
|
52
|
+
.merge(ListInputFieldsBaseSchema);
|
|
53
|
+
// Union for runtime validation (accepts either new or old names)
|
|
54
|
+
export const ListInputFieldsInputSchema = z
|
|
55
|
+
.union([ListInputFieldsSchema, ListInputFieldsSchemaDeprecated])
|
|
56
|
+
.describe(ListInputFieldsDescription);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/manifest/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,mBAAmB,EAAG,WAAoB,CAAC;AAExD,MAAM,MAAM,aAAa,GAAG;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,CACzC,MAAM,EAAE,MAAM,KACX,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/manifest/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,mBAAmB,EAAG,WAAoB,CAAC;AAExD,MAAM,MAAM,aAAa,GAAG;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,CACzC,MAAM,EAAE,MAAM,KACX,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;iBAqB5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACtC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,cAAc,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,EAC5B,OAAO,GACR,EAAE;IACD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,KAAK,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;iBAkCxB,CAAC;AAEJ,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;iBAGtC,CAAC"}
|
|
@@ -13,8 +13,10 @@ export const ActionEntrySchema = z.object({
|
|
|
13
13
|
.string()
|
|
14
14
|
.describe("Action type (e.g., 'read', 'write', 'search')"),
|
|
15
15
|
connectionId: ConnectionIdPropertySchema.nullable().optional(),
|
|
16
|
-
/** @deprecated Use
|
|
17
|
-
authenticationId: AuthenticationIdPropertySchema.nullable()
|
|
16
|
+
/** @deprecated Use connection instead */
|
|
17
|
+
authenticationId: AuthenticationIdPropertySchema.nullable()
|
|
18
|
+
.optional()
|
|
19
|
+
.meta({ deprecated: true }),
|
|
18
20
|
inputs: z
|
|
19
21
|
.record(z.string(), z.unknown())
|
|
20
22
|
.optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,6BAA6B;CAAG;AAEjD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK;QAC/C,SAAS,EAAE,qBAAqB,EAAE,CAAC;QACnC,UAAU,EAAE;YACV,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,SAAS,EAAE,MAAM,EAAE,CAAC;SACrB,EAAE,CAAC;KACL,CAAC;CACH;AAGD,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,EAAE,EAAE,wBAAwB;AAC5B,EAAE,EAAE,sBAAsB;AAC1B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,6BAA6B;CAAG;AAEjD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK;QAC/C,SAAS,EAAE,qBAAqB,EAAE,CAAC;QACnC,UAAU,EAAE;YACV,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,SAAS,EAAE,MAAM,EAAE,CAAC;SACrB,EAAE,CAAC;KACL,CAAC;CACH;AAGD,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,EAAE,EAAE,wBAAwB;AAC5B,EAAE,EAAE,sBAAsB;AAC1B,sBAAsB,CAyJvB,CAAC"}
|
|
@@ -64,7 +64,6 @@ export const registryPlugin = ({ sdk, context }) => {
|
|
|
64
64
|
// Auto-infer confirm: "delete" from type: "delete" (all deletes should confirm)
|
|
65
65
|
confirm: meta.confirm ?? (meta.type === "delete" ? "delete" : undefined),
|
|
66
66
|
deprecation: meta.deprecation,
|
|
67
|
-
deprecatedParameters: meta.deprecatedParameters,
|
|
68
67
|
aliases: meta.aliases,
|
|
69
68
|
supportsJsonOutput: meta.supportsJsonOutput ?? true,
|
|
70
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/request/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAGpD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7D,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,WAAW,EAAE,OAAO,kBAAkB,CAAC;aACxC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAChC,UAAU,CAAC,mBAAmB,CAAC,EAAE,wBAAwB;AACzD,oBAAoB,EAAE,+CAA+C;AACrE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/request/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAGpD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7D,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,WAAW,EAAE,OAAO,kBAAkB,CAAC;aACxC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAChC,UAAU,CAAC,mBAAmB,CAAC,EAAE,wBAAwB;AACzD,oBAAoB,EAAE,+CAA+C;AACrE,qBAAqB,CA+CtB,CAAC"}
|
|
@@ -9,14 +9,12 @@ import { logDeprecation } from "../../utils/logging";
|
|
|
9
9
|
export const requestPlugin = ({ sdk, context }) => {
|
|
10
10
|
async function request(options) {
|
|
11
11
|
logDeprecation("request() is deprecated. Use fetch() instead.");
|
|
12
|
-
const { url, method, body, headers, connectionId, authenticationId, callbackUrl, } = options;
|
|
13
|
-
// Support both connectionId (new) and authenticationId (deprecated)
|
|
14
|
-
const resolvedConnectionId = connectionId ?? authenticationId;
|
|
12
|
+
const { url, method, body, headers, connection, connectionId, authenticationId, callbackUrl, } = options;
|
|
15
13
|
return sdk.fetch(url, {
|
|
16
14
|
method,
|
|
17
15
|
body: body,
|
|
18
16
|
headers: headers,
|
|
19
|
-
|
|
17
|
+
connection: connection ?? connectionId ?? authenticationId,
|
|
20
18
|
callbackUrl,
|
|
21
19
|
});
|
|
22
20
|
}
|
|
@@ -30,7 +28,6 @@ export const requestPlugin = ({ sdk, context }) => {
|
|
|
30
28
|
categories: ["http", "deprecated"],
|
|
31
29
|
returnType: "Response",
|
|
32
30
|
inputSchema: RelayRequestSchema,
|
|
33
|
-
deprecatedParameters: ["authenticationId"],
|
|
34
31
|
},
|
|
35
32
|
},
|
|
36
33
|
},
|
|
@@ -12,6 +12,7 @@ export declare const RelayRequestSchema: z.ZodObject<{
|
|
|
12
12
|
OPTIONS: "OPTIONS";
|
|
13
13
|
}>>;
|
|
14
14
|
body: z.ZodOptional<z.ZodAny>;
|
|
15
|
+
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
15
16
|
connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
16
17
|
authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
17
18
|
callbackUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -34,6 +35,7 @@ export declare const RelayFetchSchema: z.ZodObject<{
|
|
|
34
35
|
OPTIONS: "OPTIONS";
|
|
35
36
|
}>>;
|
|
36
37
|
body: z.ZodOptional<z.ZodAny>;
|
|
38
|
+
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
37
39
|
connectionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
38
40
|
authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
39
41
|
callbackUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/request/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/request/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAQ5B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;iBAoC3B,CAAC;AAGL,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAGrE,MAAM,MAAM,iBAAiB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC9D;AAGD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;iBAAqB,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AACpD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC1D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { ConnectionIdPropertySchema, AuthenticationIdPropertySchema, } from "../../types/properties";
|
|
2
|
+
import { ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdPropertySchema, } from "../../types/properties";
|
|
3
3
|
// Pure Zod schema for the request function
|
|
4
4
|
export const RelayRequestSchema = z
|
|
5
5
|
.object({
|
|
@@ -12,9 +12,14 @@ export const RelayRequestSchema = z
|
|
|
12
12
|
.optional()
|
|
13
13
|
.describe("HTTP method"),
|
|
14
14
|
body: z.any().optional().describe("Request body as a string"),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
connection: ConnectionPropertySchema.optional(),
|
|
16
|
+
connectionId: ConnectionIdPropertySchema.optional().meta({
|
|
17
|
+
deprecated: true,
|
|
18
|
+
}),
|
|
19
|
+
/** @deprecated Use connection instead */
|
|
20
|
+
authenticationId: AuthenticationIdPropertySchema.optional().meta({
|
|
21
|
+
deprecated: true,
|
|
22
|
+
}),
|
|
18
23
|
callbackUrl: z
|
|
19
24
|
.string()
|
|
20
25
|
.url()
|
|
@@ -29,6 +34,9 @@ export const RelayRequestSchema = z
|
|
|
29
34
|
.optional()
|
|
30
35
|
.describe("Request headers"),
|
|
31
36
|
})
|
|
32
|
-
.describe("Make authenticated HTTP requests through Zapier's Relay service")
|
|
37
|
+
.describe("Make authenticated HTTP requests through Zapier's Relay service")
|
|
38
|
+
.meta({
|
|
39
|
+
aliases: { connectionId: "connection", authenticationId: "connection" },
|
|
40
|
+
});
|
|
33
41
|
// Legacy exports for compatibility
|
|
34
42
|
export const RelayFetchSchema = RelayRequestSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/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,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/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,eAAe,EAEf,KAAK,gBAAgB,EAEtB,MAAM,WAAW,CAAC;AAQnB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAQtD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAO7D,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,gBAAgB,KAAK,OAAO,CAAC;QACjD,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;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,SAAS,EAAE;gBACT,WAAW,EAAE,OAAO,eAAe,CAAC;aACrC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAqFD,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAC3C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,UAAU,CAAC,uBAAuB,GAAG,oBAAoB,CAAC,EAAE,uCAAuC;AACnG,AAD4D,uCAAuC;AACnG;IACE,GAAG,EAAE,SAAS,CAAC;IACf,4BAA4B,EAAE,4BAA4B,CAAC;CAC5D,GAAG,yBAAyB,CAAC,SAAS,CAAC,GACtC,oBAAoB,EAAE,0DAA0D;AAClF,uBAAuB,CAsMxB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RunActionSchema, } from "./schemas";
|
|
1
|
+
import { RunActionSchema, RunActionInputSchema, } from "./schemas";
|
|
2
2
|
import { ActionResultItemSchema } from "../../schemas/Run";
|
|
3
3
|
import { ZapierValidationError, ZapierConfigurationError, ZapierActionError, } from "../../types/errors";
|
|
4
4
|
import { createPaginatedFunction } from "../../utils/function-utils";
|
|
@@ -18,8 +18,7 @@ async function executeAction(actionOptions) {
|
|
|
18
18
|
action_type: actionType,
|
|
19
19
|
inputs: executionOptions.inputs || {},
|
|
20
20
|
};
|
|
21
|
-
//
|
|
22
|
-
// Note: API still expects authentication_id, we just renamed the user-facing param to connectionId
|
|
21
|
+
// Note: API still expects authentication_id, we just renamed the user-facing param
|
|
23
22
|
if (connectionId !== null && connectionId !== undefined) {
|
|
24
23
|
runRequestData.authentication_id = connectionId;
|
|
25
24
|
}
|
|
@@ -78,8 +77,6 @@ export const runActionPlugin = ({ sdk, context }) => {
|
|
|
78
77
|
return cached.promise;
|
|
79
78
|
}
|
|
80
79
|
const pendingContext = resolveRunActionContext(options).catch((error) => {
|
|
81
|
-
// Only delete our own entry — a later interleaved call for the same key
|
|
82
|
-
// may have already replaced it with a fresh promise.
|
|
83
80
|
const current = runActionContextCache.get(contextKey);
|
|
84
81
|
if (current?.promise === pendingContext) {
|
|
85
82
|
runActionContextCache.delete(contextKey);
|
|
@@ -101,9 +98,9 @@ export const runActionPlugin = ({ sdk, context }) => {
|
|
|
101
98
|
}
|
|
102
99
|
// Validate that the action exists using the getAction plugin
|
|
103
100
|
const actionData = await sdk.getAction({
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
actionType
|
|
101
|
+
app: appKey,
|
|
102
|
+
action: actionKey,
|
|
103
|
+
actionType,
|
|
107
104
|
});
|
|
108
105
|
// Validate action type matches
|
|
109
106
|
if (actionData.data.action_type !== actionType) {
|
|
@@ -113,14 +110,20 @@ export const runActionPlugin = ({ sdk, context }) => {
|
|
|
113
110
|
}
|
|
114
111
|
async function runActionPage(options) {
|
|
115
112
|
const { api } = context;
|
|
116
|
-
const
|
|
113
|
+
const appKey = "app" in options ? options.app : options.appKey;
|
|
114
|
+
const actionKey = "action" in options ? options.action : options.actionKey;
|
|
115
|
+
const { actionType, connectionId, connection, authenticationId, inputs = {}, cursor, timeoutMs, } = options;
|
|
117
116
|
const resolvedConnectionId = await resolveConnectionId({
|
|
118
117
|
connectionId,
|
|
119
118
|
connection,
|
|
120
119
|
authenticationId,
|
|
121
120
|
resolveConnection: context.resolveConnection,
|
|
122
121
|
});
|
|
123
|
-
const { selectedApi, actionId } = await getRunActionContext(
|
|
122
|
+
const { selectedApi, actionId } = await getRunActionContext({
|
|
123
|
+
appKey,
|
|
124
|
+
actionKey,
|
|
125
|
+
actionType,
|
|
126
|
+
});
|
|
124
127
|
setMethodMetadata({
|
|
125
128
|
selectedApi,
|
|
126
129
|
operationType: actionType,
|
|
@@ -159,7 +162,7 @@ export const runActionPlugin = ({ sdk, context }) => {
|
|
|
159
162
|
// No defaultPageSize — we leave the default to the Actions API rather than
|
|
160
163
|
// eagerly running more actions than the user intends to
|
|
161
164
|
// (and avoid potentially hitting app rate limits).
|
|
162
|
-
const runActionDefinition = createPaginatedFunction(runActionPage,
|
|
165
|
+
const runActionDefinition = createPaginatedFunction(runActionPage, RunActionInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, methodName), methodName);
|
|
163
166
|
return {
|
|
164
167
|
runAction: runActionDefinition,
|
|
165
168
|
context: {
|
|
@@ -171,13 +174,12 @@ export const runActionPlugin = ({ sdk, context }) => {
|
|
|
171
174
|
inputSchema: RunActionSchema,
|
|
172
175
|
outputSchema: ActionResultItemSchema,
|
|
173
176
|
resolvers: {
|
|
174
|
-
|
|
177
|
+
app: appKeyResolver,
|
|
175
178
|
actionType: actionTypeResolver,
|
|
176
|
-
|
|
177
|
-
|
|
179
|
+
action: actionKeyResolver,
|
|
180
|
+
connection: connectionIdResolver,
|
|
178
181
|
inputs: inputsResolver,
|
|
179
182
|
},
|
|
180
|
-
deprecatedParameters: ["authenticationId"],
|
|
181
183
|
},
|
|
182
184
|
},
|
|
183
185
|
},
|
|
@@ -2,6 +2,32 @@ import { z } from "zod";
|
|
|
2
2
|
import type { PaginatedSdkFunction } from "../../types/functions";
|
|
3
3
|
import type { ZapierActionError, ZapierValidationError, ZapierConfigurationError, ZapierUnknownError } from "../../types/errors";
|
|
4
4
|
export declare const RunActionSchema: 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
|
+
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
22
|
+
connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
23
|
+
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
24
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
25
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
declare const RunActionSchemaDeprecated: z.ZodObject<{
|
|
5
31
|
appKey: z.ZodString & {
|
|
6
32
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
7
33
|
};
|
|
@@ -16,8 +42,8 @@ export declare const RunActionSchema: z.ZodObject<{
|
|
|
16
42
|
write: "write";
|
|
17
43
|
}>;
|
|
18
44
|
actionKey: z.ZodString;
|
|
19
|
-
connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
20
45
|
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
46
|
+
connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
21
47
|
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
22
48
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
23
49
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -25,7 +51,61 @@ export declare const RunActionSchema: z.ZodObject<{
|
|
|
25
51
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
26
52
|
cursor: z.ZodOptional<z.ZodString>;
|
|
27
53
|
}, z.core.$strip>;
|
|
28
|
-
export
|
|
54
|
+
export declare const RunActionInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
55
|
+
app: z.ZodString & {
|
|
56
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
57
|
+
};
|
|
58
|
+
actionType: z.ZodEnum<{
|
|
59
|
+
search: "search";
|
|
60
|
+
filter: "filter";
|
|
61
|
+
read: "read";
|
|
62
|
+
read_bulk: "read_bulk";
|
|
63
|
+
run: "run";
|
|
64
|
+
search_and_write: "search_and_write";
|
|
65
|
+
search_or_write: "search_or_write";
|
|
66
|
+
write: "write";
|
|
67
|
+
}>;
|
|
68
|
+
action: z.ZodString & {
|
|
69
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
70
|
+
};
|
|
71
|
+
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
72
|
+
connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
73
|
+
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
74
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
75
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
79
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
+
appKey: z.ZodString & {
|
|
81
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
82
|
+
};
|
|
83
|
+
actionType: z.ZodEnum<{
|
|
84
|
+
search: "search";
|
|
85
|
+
filter: "filter";
|
|
86
|
+
read: "read";
|
|
87
|
+
read_bulk: "read_bulk";
|
|
88
|
+
run: "run";
|
|
89
|
+
search_and_write: "search_and_write";
|
|
90
|
+
search_or_write: "search_or_write";
|
|
91
|
+
write: "write";
|
|
92
|
+
}>;
|
|
93
|
+
actionKey: z.ZodString;
|
|
94
|
+
connection: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
95
|
+
connectionId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
96
|
+
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
97
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
98
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>]>;
|
|
103
|
+
export type RunActionOptions = z.infer<typeof RunActionSchema> | (Omit<z.infer<typeof RunActionSchemaDeprecated>, "appKey" | "actionKey"> & {
|
|
104
|
+
/** @deprecated Use `app` instead. */
|
|
105
|
+
appKey: z.infer<typeof RunActionSchemaDeprecated>["appKey"];
|
|
106
|
+
/** @deprecated Use `action` instead. */
|
|
107
|
+
actionKey: z.infer<typeof RunActionSchemaDeprecated>["actionKey"];
|
|
108
|
+
});
|
|
29
109
|
export interface RunActionPage {
|
|
30
110
|
data: unknown[];
|
|
31
111
|
nextCursor?: string;
|
|
@@ -34,4 +114,5 @@ export type RunActionError = ZapierActionError | ZapierValidationError | ZapierC
|
|
|
34
114
|
export interface RunActionSdkFunction {
|
|
35
115
|
runAction: PaginatedSdkFunction<RunActionOptions, unknown>;
|
|
36
116
|
}
|
|
117
|
+
export {};
|
|
37
118
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAiC5B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;iBAexB,CAAC;AAGL,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;iBAMF,CAAC;AAG9B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAEA,CAAC;AAGlC,MAAM,MAAM,gBAAgB,GACxB,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,GAC/B,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC,GAAG;IACzE,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC5D,wCAAwC;IACxC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC,WAAW,CAAC,CAAC;CACnE,CAAC,CAAC;AAGP,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,cAAc,GACtB,iBAAiB,GACjB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,oBAAoB,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;CAC5D"}
|
|
@@ -1,29 +1,53 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { AppKeyPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, InputsPropertySchema, ActionTimeoutMsPropertySchema, } from "../../types/properties";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
actionType: ActionTypePropertySchema,
|
|
8
|
-
actionKey: ActionKeyPropertySchema,
|
|
2
|
+
import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ActionPropertySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdPropertySchema, InputsPropertySchema, ActionTimeoutMsPropertySchema, } from "../../types/properties";
|
|
3
|
+
const RunActionDescription = "Execute an action with the given inputs";
|
|
4
|
+
// Base schema for shared properties
|
|
5
|
+
const RunActionBaseSchema = 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."),
|
|
9
7
|
connectionId: ConnectionIdPropertySchema.nullable()
|
|
10
8
|
.optional()
|
|
11
|
-
.describe("Connection ID to use when running the action. Required if the action needs a connection to authenticate and interact with the service.")
|
|
12
|
-
|
|
13
|
-
/** @deprecated Use
|
|
14
|
-
authenticationId:
|
|
9
|
+
.describe("Connection ID to use when running the action. Required if the action needs a connection to authenticate and interact with the service.")
|
|
10
|
+
.meta({ deprecated: true }),
|
|
11
|
+
/** @deprecated Use connection instead */
|
|
12
|
+
authenticationId: AuthenticationIdPropertySchema.nullable()
|
|
13
|
+
.optional()
|
|
14
|
+
.meta({ deprecated: true }),
|
|
15
15
|
inputs: InputsPropertySchema.optional().describe("Input parameters for the action"),
|
|
16
16
|
timeoutMs: ActionTimeoutMsPropertySchema,
|
|
17
|
-
pageSize: z
|
|
18
|
-
.number()
|
|
19
|
-
.min(1)
|
|
20
|
-
.optional()
|
|
21
|
-
.describe("Number of results per page"),
|
|
17
|
+
pageSize: z.number().min(1).optional().describe("Number of results per page"),
|
|
22
18
|
maxItems: z
|
|
23
19
|
.number()
|
|
24
20
|
.min(1)
|
|
25
21
|
.optional()
|
|
26
22
|
.describe("Maximum total items to return across all pages"),
|
|
27
23
|
cursor: z.string().optional().describe("Cursor to start from"),
|
|
24
|
+
});
|
|
25
|
+
// Schema for docs/registry (new param names only)
|
|
26
|
+
export const RunActionSchema = z
|
|
27
|
+
.object({
|
|
28
|
+
app: AppPropertySchema,
|
|
29
|
+
actionType: ActionTypePropertySchema,
|
|
30
|
+
action: ActionPropertySchema,
|
|
31
|
+
})
|
|
32
|
+
.merge(RunActionBaseSchema)
|
|
33
|
+
.describe(RunActionDescription)
|
|
34
|
+
.meta({
|
|
35
|
+
aliases: {
|
|
36
|
+
appKey: "app",
|
|
37
|
+
actionKey: "action",
|
|
38
|
+
connectionId: "connection",
|
|
39
|
+
authenticationId: "connection",
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
// Deprecated schema (backward compat)
|
|
43
|
+
const RunActionSchemaDeprecated = z
|
|
44
|
+
.object({
|
|
45
|
+
appKey: AppKeyPropertySchema,
|
|
46
|
+
actionType: ActionTypePropertySchema,
|
|
47
|
+
actionKey: ActionKeyPropertySchema,
|
|
28
48
|
})
|
|
29
|
-
.
|
|
49
|
+
.merge(RunActionBaseSchema);
|
|
50
|
+
// Union for runtime validation (accepts either new or old names)
|
|
51
|
+
export const RunActionInputSchema = z
|
|
52
|
+
.union([RunActionSchema, RunActionSchemaDeprecated])
|
|
53
|
+
.describe(RunActionDescription);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableFields/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EACL,8BAA8B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableFields/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EACL,8BAA8B,EAI9B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAMhE,MAAM,WAAW,+BAA+B;IAC9C,iBAAiB,EAAE,CACjB,OAAO,EAAE,wBAAwB,KAC9B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,iBAAiB,EAAE;gBACjB,WAAW,EAAE,OAAO,8BAA8B,CAAC;aACpD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,EAAE,EACF;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,oBAAoB,EACzC,+BAA+B,CAoEhC,CAAC"}
|