@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
|
@@ -8,7 +8,7 @@ export interface AppsPluginProvides {
|
|
|
8
8
|
export declare const appsPlugin: Plugin<GetSdkType<FetchPluginProvides & RunActionPluginProvides>, // requires fetch + runAction in SDK
|
|
9
9
|
{}, // no context requirements
|
|
10
10
|
AppsPluginProvides>;
|
|
11
|
-
export type { ActionExecutionOptions } from "./schemas";
|
|
11
|
+
export type { ActionExecutionOptions, AppFactoryInput } from "./schemas";
|
|
12
12
|
export type { ActionExecutionResult } from "../../api/types";
|
|
13
13
|
export interface ZapierSdkApps {
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/apps/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAEZ,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGlE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/apps/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAEZ,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGlE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,WAAW,CAAC;CACnB;AAuOD,eAAO,MAAM,UAAU,EAAE,MAAM,CAC7B,UAAU,CAAC,mBAAmB,GAAG,uBAAuB,CAAC,EAAE,oCAAoC;AAC/F,EAAE,EAAE,0BAA0B;AAC9B,kBAAkB,CAyBnB,CAAC;AAGF,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACzE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAI7D,MAAM,WAAW,aAAa;CAAG"}
|
|
@@ -42,12 +42,11 @@ function createActionFunction(appKey, actionType, actionKey, options, pinnedAuth
|
|
|
42
42
|
errorContext: `Connection is required. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }) or sdk.apps.${appKey}({ connection: "name" }), or provide connectionId/connection in the action call.`,
|
|
43
43
|
});
|
|
44
44
|
return sdk.runAction({
|
|
45
|
-
appKey,
|
|
45
|
+
app: appKey,
|
|
46
46
|
actionType: actionType,
|
|
47
|
-
actionKey,
|
|
47
|
+
action: actionKey,
|
|
48
48
|
inputs,
|
|
49
|
-
connectionId,
|
|
50
|
-
connection,
|
|
49
|
+
connection: connectionId ?? connection,
|
|
51
50
|
timeoutMs,
|
|
52
51
|
});
|
|
53
52
|
};
|
|
@@ -67,8 +66,7 @@ function createActionTypeProxy(appKey, actionType, options, pinnedAuthId, pinned
|
|
|
67
66
|
});
|
|
68
67
|
return sdk.fetch(url, {
|
|
69
68
|
...init,
|
|
70
|
-
connectionId,
|
|
71
|
-
connection,
|
|
69
|
+
connection: connectionId ?? connection,
|
|
72
70
|
});
|
|
73
71
|
};
|
|
74
72
|
}
|
|
@@ -140,7 +138,6 @@ export const appsPlugin = ({ sdk }) => {
|
|
|
140
138
|
type: "function",
|
|
141
139
|
inputSchema: AppFactoryInputSchema,
|
|
142
140
|
returnType: "AppProxy",
|
|
143
|
-
deprecatedParameters: ["authenticationId"],
|
|
144
141
|
},
|
|
145
142
|
"apps.{appKey}.{actionType}.{actionKey}": {
|
|
146
143
|
categories: ["app"],
|
|
@@ -149,7 +146,6 @@ export const appsPlugin = ({ sdk }) => {
|
|
|
149
146
|
inputSchema: ActionExecutionInputSchema,
|
|
150
147
|
itemType: "ActionResult",
|
|
151
148
|
outputSchema: ActionResultItemSchema,
|
|
152
|
-
deprecatedParameters: ["authenticationId"],
|
|
153
149
|
},
|
|
154
150
|
},
|
|
155
151
|
},
|
|
@@ -27,9 +27,10 @@ interface BaseActionTypeProxy {
|
|
|
27
27
|
}
|
|
28
28
|
type ActionTypeProxy = BaseActionTypeProxy;
|
|
29
29
|
type AppFetchFn = (url: string | URL, init?: RequestInit & {
|
|
30
|
+
/** @deprecated Use `connection` instead. */
|
|
30
31
|
connectionId?: ConnectionIdProperty;
|
|
31
32
|
connection?: ConnectionProperty;
|
|
32
|
-
/** @deprecated Use
|
|
33
|
+
/** @deprecated Use `connection` instead. */
|
|
33
34
|
authenticationId?: AuthenticationIdProperty;
|
|
34
35
|
callbackUrl?: string;
|
|
35
36
|
}) => Promise<Response>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/apps/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,0BAA0B;;;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/apps/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,0BAA0B;;;;;;iBAmBnC,CAAC;AAGL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEhF,eAAO,MAAM,qBAAqB;;;;iBAe9B,CAAC;AAEL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,UAAU,mBAAmB;IAC3B,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC,EAAE,sBAAsB,KAAK,OAAO,CAAC;QAC9D,IAAI,EAAE,GAAG,EAAE,CAAC;QACZ,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QACpD,KAAK,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;KAC7B,CAAC;CACL;AAGD,KAAK,eAAe,GAAG,mBAAmB,CAAC;AAG3C,KAAK,UAAU,GAAG,CAChB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,CAAC,EAAE,WAAW,GAAG;IACnB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,KACE,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvB,KAAK,QAAQ,GAAG;IACd,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC;CACjC,GAAG;IACF,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,UAAU,UAAU;IAClB,CAAC,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC;CACtC;AAGD,KAAK,mBAAmB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEjD,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAAC;CACpC"}
|
|
@@ -3,19 +3,35 @@ import { ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdP
|
|
|
3
3
|
export const ActionExecutionInputSchema = z
|
|
4
4
|
.object({
|
|
5
5
|
inputs: z.record(z.string(), z.unknown()).optional(),
|
|
6
|
-
|
|
6
|
+
/** @deprecated Use `connection` instead. */
|
|
7
|
+
connectionId: ConnectionIdPropertySchema.optional().meta({
|
|
8
|
+
deprecated: true,
|
|
9
|
+
}),
|
|
7
10
|
connection: ConnectionPropertySchema.optional(),
|
|
8
|
-
/** @deprecated Use
|
|
9
|
-
authenticationId: AuthenticationIdPropertySchema.optional()
|
|
11
|
+
/** @deprecated Use connection instead */
|
|
12
|
+
authenticationId: AuthenticationIdPropertySchema.optional().meta({
|
|
13
|
+
deprecated: true,
|
|
14
|
+
}),
|
|
10
15
|
timeoutMs: ActionTimeoutMsPropertySchema,
|
|
11
16
|
})
|
|
12
|
-
.describe("Execute an action with the given inputs for the bound app, as an alternative to runAction")
|
|
17
|
+
.describe("Execute an action with the given inputs for the bound app, as an alternative to runAction")
|
|
18
|
+
.meta({
|
|
19
|
+
aliases: { connectionId: "connection", authenticationId: "connection" },
|
|
20
|
+
});
|
|
13
21
|
export const AppFactoryInputSchema = z
|
|
14
22
|
.object({
|
|
15
|
-
|
|
23
|
+
/** @deprecated Use `connection` instead. */
|
|
24
|
+
connectionId: ConnectionIdPropertySchema.optional().meta({
|
|
25
|
+
deprecated: true,
|
|
26
|
+
}),
|
|
16
27
|
connection: ConnectionPropertySchema.optional(),
|
|
17
|
-
/** @deprecated Use
|
|
18
|
-
authenticationId: AuthenticationIdPropertySchema.optional()
|
|
28
|
+
/** @deprecated Use connection instead */
|
|
29
|
+
authenticationId: AuthenticationIdPropertySchema.optional().meta({
|
|
30
|
+
deprecated: true,
|
|
31
|
+
}),
|
|
19
32
|
})
|
|
20
|
-
.describe("Bind a connection alias or numeric connectionId to an app")
|
|
33
|
+
.describe("Bind a connection alias or numeric connectionId to an app")
|
|
34
|
+
.meta({
|
|
35
|
+
aliases: { connectionId: "connection", authenticationId: "connection" },
|
|
36
|
+
});
|
|
21
37
|
// Note: AppsPluginSdkExtension removed - now using AppsPluginProvides in index.ts
|
|
@@ -5,9 +5,10 @@ import type { z } from "zod";
|
|
|
5
5
|
import type { EventEmissionContext } from "../eventEmission";
|
|
6
6
|
export interface FetchPluginProvides {
|
|
7
7
|
fetch: (url: string | URL, init?: RequestInit & {
|
|
8
|
+
/** @deprecated Use `connection` instead. */
|
|
8
9
|
connectionId?: string | number;
|
|
9
10
|
connection?: string | number;
|
|
10
|
-
/** @deprecated Use
|
|
11
|
+
/** @deprecated Use `connection` instead. */
|
|
11
12
|
authenticationId?: string | number;
|
|
12
13
|
callbackUrl?: string;
|
|
13
14
|
}) => Promise<Response>;
|
|
@@ -37,9 +38,10 @@ export declare const fetchPlugin: Plugin<{}, // no SDK dependencies
|
|
|
37
38
|
} & ConnectionsPluginProvides["context"] & EventEmissionContext, // requires api, connections, and eventEmission in context
|
|
38
39
|
FetchPluginProvides>;
|
|
39
40
|
export type ZapierFetchInitOptions = RequestInit & {
|
|
41
|
+
/** @deprecated Use `connection` instead. */
|
|
40
42
|
connectionId?: string | number;
|
|
41
43
|
connection?: string | number;
|
|
42
|
-
/** @deprecated Use
|
|
44
|
+
/** @deprecated Use `connection` instead. */
|
|
43
45
|
authenticationId?: string | number;
|
|
44
46
|
callbackUrl?: string;
|
|
45
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAoE7D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,CACL,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,CAAC,EAAE,WAAW,GAAG;QACnB,4CAA4C;QAC5C,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAC7B,4CAA4C;QAC5C,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACnC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,KACE,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,WAAW,EAAE,MAAM,CAAC;gBACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;gBACnB,UAAU,EAAE,MAAM,EAAE,CAAC;gBACrB,UAAU,EAAE,MAAM,CAAC;gBACnB,eAAe,EAAE,KAAK,CAAC;oBAAE,IAAI,EAAE,MAAM,CAAC;oBAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAA;iBAAE,CAAC,CAAC;aAC/D,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAC9B,EAAE,EAAE,sBAAsB;AAC1B,AADI,sBAAsB;AAC1B;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,yBAAyB,CAAC,SAAS,CAAC,GACvD,oBAAoB,EAAE,0DAA0D;AAClF,mBAAmB,CAiIpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG;IACjD,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ZapierRelayError } from "../../types/errors";
|
|
2
2
|
import { FetchUrlSchema, FetchInitSchema } from "./schemas";
|
|
3
3
|
import { resolveConnectionId } from "../../utils/domain-utils";
|
|
4
|
-
import { coerceToNumericId } from "../../utils/id-utils";
|
|
5
4
|
import { isPlainObject } from "../../utils/type-guard-utils";
|
|
6
5
|
// fetch() doesn't use createFunction/createPaginatedFunction (its signature
|
|
7
6
|
// doesn't fit the single-options-object pattern), so we wire up telemetry
|
|
@@ -84,7 +83,7 @@ export const fetchPlugin = ({ context }) => {
|
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
if (resolvedConnectionId) {
|
|
87
|
-
headers["X-Relay-Authentication-Id"] =
|
|
86
|
+
headers["X-Relay-Authentication-Id"] = String(resolvedConnectionId);
|
|
88
87
|
}
|
|
89
88
|
if (callbackUrl) {
|
|
90
89
|
headers["X-Relay-Callback-Url"] = callbackUrl;
|
|
@@ -146,7 +145,6 @@ export const fetchPlugin = ({ context }) => {
|
|
|
146
145
|
{ name: "url", schema: FetchUrlSchema },
|
|
147
146
|
{ name: "init", schema: FetchInitSchema },
|
|
148
147
|
],
|
|
149
|
-
deprecatedParameters: ["authenticationId"],
|
|
150
148
|
},
|
|
151
149
|
},
|
|
152
150
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,cAAc,2DAIxB,CAAC;AAEJ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,cAAc,2DAIxB,CAAC;AAEJ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;kBAwCxB,CAAC"}
|
|
@@ -23,14 +23,21 @@ export const FetchInitSchema = z
|
|
|
23
23
|
])
|
|
24
24
|
.optional()
|
|
25
25
|
.describe("Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly"),
|
|
26
|
-
connectionId: ConnectionIdPropertySchema.optional()
|
|
26
|
+
connectionId: ConnectionIdPropertySchema.optional().meta({
|
|
27
|
+
deprecated: true,
|
|
28
|
+
}),
|
|
27
29
|
connection: ConnectionPropertySchema.optional(),
|
|
28
|
-
/** @deprecated Use
|
|
29
|
-
authenticationId: AuthenticationIdPropertySchema.optional()
|
|
30
|
+
/** @deprecated Use connection instead */
|
|
31
|
+
authenticationId: AuthenticationIdPropertySchema.optional().meta({
|
|
32
|
+
deprecated: true,
|
|
33
|
+
}),
|
|
30
34
|
callbackUrl: z
|
|
31
35
|
.string()
|
|
32
36
|
.optional()
|
|
33
37
|
.describe("URL to send async response to (makes request async)"),
|
|
34
38
|
})
|
|
35
39
|
.optional()
|
|
36
|
-
.describe("Request options including method, headers, body, and authentication")
|
|
40
|
+
.describe("Request options including method, headers, body, and authentication")
|
|
41
|
+
.meta({
|
|
42
|
+
aliases: { connectionId: "connection", authenticationId: "connection" },
|
|
43
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,yBAAyB,EACzB,KAAK,0BAA0B,EAChC,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,CACnB,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;IACvC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,mBAAmB,EAAE;gBACnB,WAAW,EAAE,OAAO,yBAAyB,CAAC;aAC/C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,UAAU,CAAC,6BAA6B,CAAC,EAAE,kCAAkC;AAC7E,oBAAoB,EAAE,oCAAoC;AAC1D,iCAAiC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,yBAAyB,EACzB,KAAK,0BAA0B,EAChC,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,CACnB,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;IACvC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,mBAAmB,EAAE;gBACnB,WAAW,EAAE,OAAO,yBAAyB,CAAC;aAC/C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,UAAU,CAAC,6BAA6B,CAAC,EAAE,kCAAkC;AAC7E,oBAAoB,EAAE,oCAAoC;AAC1D,iCAAiC,CA4ClC,CAAC"}
|
|
@@ -7,8 +7,11 @@ export declare const FindFirstConnectionSchema: z.ZodObject<{
|
|
|
7
7
|
appKey: z.ZodOptional<z.ZodString & {
|
|
8
8
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
9
9
|
}>;
|
|
10
|
+
app: z.ZodOptional<z.ZodString & {
|
|
11
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
12
|
+
}>;
|
|
10
13
|
owner: z.ZodOptional<z.ZodString>;
|
|
11
|
-
|
|
14
|
+
account: z.ZodOptional<z.ZodString>;
|
|
12
15
|
accountId: z.ZodOptional<z.ZodString>;
|
|
13
16
|
includeShared: z.ZodOptional<z.ZodBoolean>;
|
|
14
17
|
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findFirstConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;iBAOwB,CAAC;AAG/D,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,yBAAyB,CACjC,CAAC;AAGF,MAAM,MAAM,wBAAwB,GAChC,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,8BAA8B;IAC7C,mBAAmB,EAAE,CACnB,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CAC/C"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ListConnectionsQuerySchema } from "../listConnections/schemas";
|
|
2
2
|
export const FindFirstConnectionSchema = ListConnectionsQuerySchema.omit({
|
|
3
|
+
connections: true,
|
|
3
4
|
connectionIds: true,
|
|
5
|
+
authenticationIds: true,
|
|
4
6
|
pageSize: true,
|
|
5
7
|
maxItems: true,
|
|
6
8
|
cursor: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAC;AAMnB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,WAAW,kCAAkC;IACjD,oBAAoB,EAAE,CACpB,OAAO,CAAC,EAAE,2BAA2B,KAClC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;IACvC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,oBAAoB,EAAE;gBACpB,WAAW,EAAE,OAAO,0BAA0B,CAAC;aAChD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,UAAU,CAAC,6BAA6B,CAAC,EAAE,kCAAkC;AAC7E,oBAAoB,EAAE,oCAAoC;AAC1D,kCAAkC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,0BAA0B,EAC1B,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAC;AAMnB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,WAAW,kCAAkC;IACjD,oBAAoB,EAAE,CACpB,OAAO,CAAC,EAAE,2BAA2B,KAClC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;IACvC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,oBAAoB,EAAE;gBACpB,WAAW,EAAE,OAAO,0BAA0B,CAAC;aAChD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,UAAU,CAAC,6BAA6B,CAAC,EAAE,kCAAkC;AAC7E,oBAAoB,EAAE,oCAAoC;AAC1D,kCAAkC,CAoDnC,CAAC"}
|
|
@@ -7,8 +7,11 @@ export declare const FindUniqueConnectionSchema: z.ZodObject<{
|
|
|
7
7
|
appKey: z.ZodOptional<z.ZodString & {
|
|
8
8
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
9
9
|
}>;
|
|
10
|
+
app: z.ZodOptional<z.ZodString & {
|
|
11
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
12
|
+
}>;
|
|
10
13
|
owner: z.ZodOptional<z.ZodString>;
|
|
11
|
-
|
|
14
|
+
account: z.ZodOptional<z.ZodString>;
|
|
12
15
|
accountId: z.ZodOptional<z.ZodString>;
|
|
13
16
|
includeShared: z.ZodOptional<z.ZodBoolean>;
|
|
14
17
|
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,2BAA2B,EAC3B,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/findUniqueConnection/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,2BAA2B,EAC3B,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;iBAOsB,CAAC;AAG9D,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,0BAA0B,CAClC,CAAC;AAGF,MAAM,MAAM,yBAAyB,GACjC,yBAAyB,GACzB,cAAc,GACd,2BAA2B,GAC3B,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,+BAA+B;IAC9C,oBAAoB,EAAE,CACpB,OAAO,CAAC,EAAE,2BAA2B,KAClC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;CACxC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ListConnectionsQuerySchema } from "../listConnections/schemas";
|
|
2
2
|
export const FindUniqueConnectionSchema = ListConnectionsQuerySchema.omit({
|
|
3
|
+
connections: true,
|
|
3
4
|
connectionIds: true,
|
|
5
|
+
authenticationIds: true,
|
|
4
6
|
pageSize: true,
|
|
5
7
|
maxItems: true,
|
|
6
8
|
cursor: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getAction/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getAction/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,eAAe,EAEf,KAAK,gBAAgB,EACtB,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAOhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;IACxE,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,SAAS,EAAE;gBACT,WAAW,EAAE,OAAO,eAAe,CAAC;aACrC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,UAAU,CAAC,yBAAyB,CAAC,EAAE,8BAA8B;AACrE,AADuC,8BAA8B;AACrE;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,oBAAoB,EAAE,0BAA0B;AACrE,uBAAuB,CA2DxB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetActionSchema } from "./schemas";
|
|
1
|
+
import { GetActionSchema, GetActionInputSchema, } from "./schemas";
|
|
2
2
|
import { ZapierResourceNotFoundError } from "../../types/errors";
|
|
3
3
|
import { createFunction } from "../../utils/function-utils";
|
|
4
4
|
import { appKeyResolver, actionTypeResolver, actionKeyResolver, } from "../../resolvers";
|
|
@@ -7,7 +7,9 @@ import { createTelemetryCallback } from "../../utils/telemetry-utils";
|
|
|
7
7
|
import { setMethodMetadata } from "../../utils/telemetry-context";
|
|
8
8
|
export const getActionPlugin = ({ sdk, context }) => {
|
|
9
9
|
async function getAction(options) {
|
|
10
|
-
const
|
|
10
|
+
const appKey = "app" in options ? options.app : options.appKey;
|
|
11
|
+
const actionKey = "action" in options ? options.action : options.actionKey;
|
|
12
|
+
const { actionType } = options;
|
|
11
13
|
// selectedApi is intentionally omitted — getAction doesn't resolve a versioned
|
|
12
14
|
// implementation ID; it delegates to sdk.listActions, which sets selectedApi in its own scope.
|
|
13
15
|
setMethodMetadata({
|
|
@@ -15,7 +17,7 @@ export const getActionPlugin = ({ sdk, context }) => {
|
|
|
15
17
|
operationKey: actionKey,
|
|
16
18
|
});
|
|
17
19
|
// Use the listActions function from the SDK to search for the specific action across all pages
|
|
18
|
-
for await (const action of sdk.listActions({ appKey }).items()) {
|
|
20
|
+
for await (const action of sdk.listActions({ app: appKey }).items()) {
|
|
19
21
|
if ((action.key === actionKey || action.id === actionKey) &&
|
|
20
22
|
action.action_type === actionType) {
|
|
21
23
|
return { data: action };
|
|
@@ -24,7 +26,7 @@ export const getActionPlugin = ({ sdk, context }) => {
|
|
|
24
26
|
// If we get here, action was not found
|
|
25
27
|
throw new ZapierResourceNotFoundError(`Action not found: ${actionKey} with type ${actionType}`, { resourceType: "Action", resourceId: `${actionKey} (${actionType})` });
|
|
26
28
|
}
|
|
27
|
-
const getActionDefinition = createFunction(getAction,
|
|
29
|
+
const getActionDefinition = createFunction(getAction, GetActionInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getAction.name));
|
|
28
30
|
return {
|
|
29
31
|
getAction: getActionDefinition,
|
|
30
32
|
context: {
|
|
@@ -36,9 +38,9 @@ export const getActionPlugin = ({ sdk, context }) => {
|
|
|
36
38
|
inputSchema: GetActionSchema,
|
|
37
39
|
outputSchema: ActionItemSchema,
|
|
38
40
|
resolvers: {
|
|
39
|
-
|
|
41
|
+
app: appKeyResolver,
|
|
40
42
|
actionType: actionTypeResolver,
|
|
41
|
-
|
|
43
|
+
action: actionKeyResolver,
|
|
42
44
|
},
|
|
43
45
|
},
|
|
44
46
|
},
|
|
@@ -2,6 +2,24 @@ import { z } from "zod";
|
|
|
2
2
|
import type { ActionItem } from "../../types/domain";
|
|
3
3
|
import type { ZapierAuthenticationError, ZapierApiError, ZapierAppNotFoundError, ZapierValidationError, ZapierResourceNotFoundError, ZapierUnknownError } from "../../types/errors";
|
|
4
4
|
export declare const GetActionSchema: z.ZodObject<{
|
|
5
|
+
app: z.ZodString & {
|
|
6
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
7
|
+
};
|
|
8
|
+
actionType: z.ZodEnum<{
|
|
9
|
+
search: "search";
|
|
10
|
+
filter: "filter";
|
|
11
|
+
read: "read";
|
|
12
|
+
read_bulk: "read_bulk";
|
|
13
|
+
run: "run";
|
|
14
|
+
search_and_write: "search_and_write";
|
|
15
|
+
search_or_write: "search_or_write";
|
|
16
|
+
write: "write";
|
|
17
|
+
}>;
|
|
18
|
+
action: z.ZodString & {
|
|
19
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
20
|
+
};
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
declare const GetActionSchemaDeprecated: z.ZodObject<{
|
|
5
23
|
appKey: z.ZodString & {
|
|
6
24
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
7
25
|
};
|
|
@@ -17,11 +35,50 @@ export declare const GetActionSchema: z.ZodObject<{
|
|
|
17
35
|
}>;
|
|
18
36
|
actionKey: z.ZodString;
|
|
19
37
|
}, z.core.$strip>;
|
|
20
|
-
export
|
|
38
|
+
export declare const GetActionInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
39
|
+
app: z.ZodString & {
|
|
40
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
41
|
+
};
|
|
42
|
+
actionType: z.ZodEnum<{
|
|
43
|
+
search: "search";
|
|
44
|
+
filter: "filter";
|
|
45
|
+
read: "read";
|
|
46
|
+
read_bulk: "read_bulk";
|
|
47
|
+
run: "run";
|
|
48
|
+
search_and_write: "search_and_write";
|
|
49
|
+
search_or_write: "search_or_write";
|
|
50
|
+
write: "write";
|
|
51
|
+
}>;
|
|
52
|
+
action: z.ZodString & {
|
|
53
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
54
|
+
};
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
appKey: z.ZodString & {
|
|
57
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
58
|
+
};
|
|
59
|
+
actionType: z.ZodEnum<{
|
|
60
|
+
search: "search";
|
|
61
|
+
filter: "filter";
|
|
62
|
+
read: "read";
|
|
63
|
+
read_bulk: "read_bulk";
|
|
64
|
+
run: "run";
|
|
65
|
+
search_and_write: "search_and_write";
|
|
66
|
+
search_or_write: "search_or_write";
|
|
67
|
+
write: "write";
|
|
68
|
+
}>;
|
|
69
|
+
actionKey: z.ZodString;
|
|
70
|
+
}, z.core.$strip>]>;
|
|
71
|
+
export type GetActionOptions = z.infer<typeof GetActionSchema> | (Omit<z.infer<typeof GetActionSchemaDeprecated>, "appKey" | "actionKey"> & {
|
|
72
|
+
/** @deprecated Use `app` instead. */
|
|
73
|
+
appKey: z.infer<typeof GetActionSchemaDeprecated>["appKey"];
|
|
74
|
+
/** @deprecated Use `action` instead. */
|
|
75
|
+
actionKey: z.infer<typeof GetActionSchemaDeprecated>["actionKey"];
|
|
76
|
+
});
|
|
21
77
|
export type GetActionError = ZapierAuthenticationError | ZapierApiError | ZapierAppNotFoundError | ZapierValidationError | ZapierResourceNotFoundError | ZapierUnknownError;
|
|
22
78
|
export interface GetActionSdkFunction {
|
|
23
79
|
getAction: (options: GetActionOptions) => Promise<{
|
|
24
80
|
data: ActionItem;
|
|
25
81
|
}>;
|
|
26
82
|
}
|
|
83
|
+
export {};
|
|
27
84
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAK5B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;iBAOgC,CAAC;AAG7D,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;iBAI7B,CAAC;AAGH,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,MAAM,cAAc,GACtB,yBAAyB,GACzB,cAAc,GACd,sBAAsB,GACtB,qBAAqB,GACrB,2BAA2B,GAC3B,kBAAkB,CAAC;AAGvB,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;CACzE"}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { AppKeyPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, } from "../../types/properties";
|
|
3
|
-
|
|
2
|
+
import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ActionPropertySchema, } from "../../types/properties";
|
|
3
|
+
const GetActionDescription = "Get detailed information about a specific action";
|
|
4
|
+
// Schema for docs/registry (new param names only)
|
|
4
5
|
export const GetActionSchema = z
|
|
5
6
|
.object({
|
|
7
|
+
app: AppPropertySchema,
|
|
8
|
+
actionType: ActionTypePropertySchema,
|
|
9
|
+
action: ActionPropertySchema,
|
|
10
|
+
})
|
|
11
|
+
.describe(GetActionDescription)
|
|
12
|
+
.meta({ aliases: { appKey: "app", actionKey: "action" } });
|
|
13
|
+
// Deprecated schema (backward compat)
|
|
14
|
+
const GetActionSchemaDeprecated = z.object({
|
|
6
15
|
appKey: AppKeyPropertySchema,
|
|
7
16
|
actionType: ActionTypePropertySchema,
|
|
8
17
|
actionKey: ActionKeyPropertySchema,
|
|
9
|
-
})
|
|
10
|
-
|
|
18
|
+
});
|
|
19
|
+
// Union for runtime validation (accepts either new or old names)
|
|
20
|
+
export const GetActionInputSchema = z
|
|
21
|
+
.union([GetActionSchema, GetActionSchemaDeprecated])
|
|
22
|
+
.describe(GetActionDescription);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getApp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getApp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAqB,MAAM,WAAW,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC/D,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,WAAW,EAAE,OAAO,YAAY,CAAC;aAClC,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAGD,eAAO,MAAM,YAAY,EAAE,MAAM,CAC/B,UAAU,CAAC,sBAAsB,CAAC,EAClC,oBAAoB,EACpB,oBAAoB,CA+CrB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createFunction } from "../../utils/function-utils";
|
|
2
|
-
import { GetAppSchema } from "./schemas";
|
|
2
|
+
import { GetAppSchema, GetAppInputSchema } from "./schemas";
|
|
3
3
|
import { AppItemSchema } from "../../schemas/App";
|
|
4
4
|
import { ZapierAppNotFoundError } from "../../types/errors";
|
|
5
5
|
import { appKeyResolver } from "../../resolvers";
|
|
@@ -7,9 +7,10 @@ import { createTelemetryCallback } from "../../utils/telemetry-utils";
|
|
|
7
7
|
// GetApp plugin depends on listApps SDK function
|
|
8
8
|
export const getAppPlugin = ({ sdk, context }) => {
|
|
9
9
|
async function getApp(options) {
|
|
10
|
+
const appKey = "app" in options ? options.app : options.appKey;
|
|
10
11
|
const appsIterable = sdk
|
|
11
12
|
.listApps({
|
|
12
|
-
appKeys: [
|
|
13
|
+
appKeys: [appKey],
|
|
13
14
|
})
|
|
14
15
|
.items();
|
|
15
16
|
for await (const app of appsIterable) {
|
|
@@ -18,10 +19,10 @@ export const getAppPlugin = ({ sdk, context }) => {
|
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
throw new ZapierAppNotFoundError("App not found", {
|
|
21
|
-
appKey
|
|
22
|
+
appKey,
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
|
-
const getAppDefinition = createFunction(getApp,
|
|
25
|
+
const getAppDefinition = createFunction(getApp, GetAppInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getApp.name));
|
|
25
26
|
// Return flat structure - getApp goes directly to SDK
|
|
26
27
|
return {
|
|
27
28
|
getApp: getAppDefinition,
|
|
@@ -34,7 +35,7 @@ export const getAppPlugin = ({ sdk, context }) => {
|
|
|
34
35
|
inputSchema: GetAppSchema,
|
|
35
36
|
outputSchema: AppItemSchema,
|
|
36
37
|
resolvers: {
|
|
37
|
-
|
|
38
|
+
app: appKeyResolver,
|
|
38
39
|
},
|
|
39
40
|
},
|
|
40
41
|
},
|
|
@@ -3,14 +3,32 @@ import type { AppItem } from "../../types/domain";
|
|
|
3
3
|
import type { ZapierApiError, ZapierAppNotFoundError, ZapierValidationError } from "../../types/errors";
|
|
4
4
|
export type GetAppError = ZapierAppNotFoundError | ZapierApiError | ZapierValidationError;
|
|
5
5
|
export declare const GetAppSchema: z.ZodObject<{
|
|
6
|
+
app: z.ZodString & {
|
|
7
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
8
|
+
};
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
declare const GetAppSchemaDeprecated: z.ZodObject<{
|
|
6
11
|
appKey: z.ZodString & {
|
|
7
12
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
8
13
|
};
|
|
9
14
|
}, z.core.$strip>;
|
|
10
|
-
export
|
|
15
|
+
export declare const GetAppInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
16
|
+
app: z.ZodString & {
|
|
17
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
18
|
+
};
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
+
appKey: z.ZodString & {
|
|
21
|
+
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
22
|
+
};
|
|
23
|
+
}, z.core.$strip>]>;
|
|
24
|
+
export type GetAppOptions = z.infer<typeof GetAppSchema> | (Omit<z.infer<typeof GetAppSchemaDeprecated>, "appKey"> & {
|
|
25
|
+
/** @deprecated Use `app` instead. */
|
|
26
|
+
appKey: z.infer<typeof GetAppSchemaDeprecated>["appKey"];
|
|
27
|
+
});
|
|
11
28
|
export interface GetAppSdkFunction {
|
|
12
29
|
getApp: (options: GetAppOptions) => Promise<{
|
|
13
30
|
data: AppItem;
|
|
14
31
|
}>;
|
|
15
32
|
}
|
|
33
|
+
export {};
|
|
16
34
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getApp/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getApp/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,WAAW,GACnB,sBAAsB,GACtB,cAAc,GACd,qBAAqB,CAAC;AAK1B,eAAO,MAAM,YAAY;;;;iBAKc,CAAC;AAGxC,QAAA,MAAM,sBAAsB;;;;iBAE1B,CAAC;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;mBAEA,CAAC;AAG/B,MAAM,MAAM,aAAa,GACrB,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,GAC5B,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,EAAE,QAAQ,CAAC,GAAG;IACxD,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC1D,CAAC,CAAC;AAGP,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAChE"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { AppKeyPropertySchema } from "../../types/properties";
|
|
3
|
-
|
|
2
|
+
import { AppKeyPropertySchema, AppPropertySchema, } from "../../types/properties";
|
|
3
|
+
const GetAppDescription = "Get detailed information about a specific app";
|
|
4
|
+
// Schema for docs/registry (new param names only)
|
|
4
5
|
export const GetAppSchema = z
|
|
5
6
|
.object({
|
|
6
|
-
|
|
7
|
+
app: AppPropertySchema,
|
|
7
8
|
})
|
|
8
|
-
.describe(
|
|
9
|
+
.describe(GetAppDescription)
|
|
10
|
+
.meta({ aliases: { appKey: "app" } });
|
|
11
|
+
// Deprecated schema (backward compat)
|
|
12
|
+
const GetAppSchemaDeprecated = z.object({
|
|
13
|
+
appKey: AppKeyPropertySchema,
|
|
14
|
+
});
|
|
15
|
+
// Union for runtime validation (accepts either new or old names)
|
|
16
|
+
export const GetAppInputSchema = z
|
|
17
|
+
.union([GetAppSchema, GetAppSchemaDeprecated])
|
|
18
|
+
.describe(GetAppDescription);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE9E,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,CACb,OAAO,EAAE,kBAAkB,KACxB,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACpC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,aAAa,EAAE;gBACb,WAAW,EAAE,OAAO,wBAAwB,CAAC;aAC9C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,EAAE,EAAE,sBAAsB;AAC1B,AADI,sBAAsB;AAC1B;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,oBAAoB,EAAE,0BAA0B;AACrE,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/getConnection/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE9E,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,CACb,OAAO,EAAE,kBAAkB,KACxB,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACpC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,aAAa,EAAE;gBACb,WAAW,EAAE,OAAO,wBAAwB,CAAC;aAC9C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,EAAE,EAAE,sBAAsB;AAC1B,AADI,sBAAsB;AAC1B;IAAE,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,oBAAoB,EAAE,0BAA0B;AACrE,2BAA2B,CA2C5B,CAAC"}
|