@zapier/zapier-sdk 0.48.1 → 0.49.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 +6 -0
- package/README.md +818 -70
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +10 -1
- package/dist/api/polling.d.ts +7 -0
- package/dist/api/polling.d.ts.map +1 -1
- package/dist/api/polling.js +29 -4
- package/dist/api/types.d.ts +7 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/experimental.cjs +10389 -0
- package/dist/experimental.d.mts +2292 -0
- package/dist/experimental.d.ts +2308 -0
- package/dist/experimental.d.ts.map +1 -0
- package/dist/experimental.js +155 -0
- package/dist/experimental.mjs +10207 -0
- package/dist/index-C2vsvjgN.d.mts +9539 -0
- package/dist/index-C2vsvjgN.d.ts +9539 -0
- package/dist/index.cjs +813 -602
- package/dist/index.d.mts +6 -8562
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.mjs +801 -602
- package/dist/plugins/apps/index.d.ts +1 -1
- package/dist/plugins/deprecated/inputFields.d.ts +468 -0
- package/dist/plugins/deprecated/inputFields.d.ts.map +1 -0
- package/dist/plugins/deprecated/inputFields.js +73 -0
- package/dist/plugins/fetch/index.d.ts +1 -1
- package/dist/plugins/fetch/schemas.d.ts +1 -1
- package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/index.d.ts +4 -4
- package/dist/plugins/getActionInputFieldsSchema/index.d.ts.map +1 -0
- package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/index.js +4 -4
- package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/schemas.d.ts +8 -8
- package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts.map +1 -0
- package/dist/plugins/{getInputFieldsSchema → getActionInputFieldsSchema}/schemas.js +13 -10
- package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/index.d.ts +4 -4
- package/dist/plugins/listActionInputFieldChoices/index.d.ts.map +1 -0
- package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/index.js +4 -4
- package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/schemas.d.ts +10 -10
- package/dist/plugins/listActionInputFieldChoices/schemas.d.ts.map +1 -0
- package/dist/plugins/{listInputFieldChoices → listActionInputFieldChoices}/schemas.js +13 -10
- package/dist/plugins/{listInputFields → listActionInputFields}/index.d.ts +4 -4
- package/dist/plugins/listActionInputFields/index.d.ts.map +1 -0
- package/dist/plugins/{listInputFields → listActionInputFields}/index.js +4 -4
- package/dist/plugins/{listInputFields → listActionInputFields}/schemas.d.ts +9 -9
- package/dist/plugins/listActionInputFields/schemas.d.ts.map +1 -0
- package/dist/plugins/{listInputFields → listActionInputFields}/schemas.js +7 -7
- package/dist/plugins/request/index.d.ts +2 -2
- package/dist/plugins/request/schemas.d.ts +2 -2
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts +51 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts.map +1 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/index.js +35 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts +34 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.js +17 -0
- package/dist/plugins/triggers/createTriggerInbox/index.d.ts +62 -0
- package/dist/plugins/triggers/createTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/createTriggerInbox/index.js +54 -0
- package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts +20 -0
- package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/createTriggerInbox/schemas.js +20 -0
- package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts +50 -0
- package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/deleteTriggerInbox/index.js +27 -0
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts +14 -0
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/deleteTriggerInbox/schemas.js +9 -0
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +213 -0
- package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/drainTriggerInbox/index.js +227 -0
- package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts +56 -0
- package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts.map +1 -0
- package/dist/plugins/triggers/drainTriggerInbox/pipeline.js +225 -0
- package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts +104 -0
- package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/drainTriggerInbox/schemas.js +102 -0
- package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts +63 -0
- package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/ensureTriggerInbox/index.js +77 -0
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts +21 -0
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/ensureTriggerInbox/schemas.js +21 -0
- package/dist/plugins/triggers/getTriggerInbox/index.d.ts +50 -0
- package/dist/plugins/triggers/getTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/getTriggerInbox/index.js +26 -0
- package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts +14 -0
- package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/getTriggerInbox/schemas.js +9 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts +48 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts.map +1 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.js +23 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts +13 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.js +10 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts +58 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts.map +1 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/index.js +70 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts +57 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.js +25 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts +51 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/index.js +48 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts +37 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInboxMessages/schemas.js +27 -0
- package/dist/plugins/triggers/listTriggerInboxes/index.d.ts +56 -0
- package/dist/plugins/triggers/listTriggerInboxes/index.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInboxes/index.js +51 -0
- package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts +58 -0
- package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInboxes/schemas.js +35 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts +77 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/index.js +30 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts +20 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.js +28 -0
- package/dist/plugins/triggers/listTriggerInputFields/index.d.ts +101 -0
- package/dist/plugins/triggers/listTriggerInputFields/index.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInputFields/index.js +33 -0
- package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts +16 -0
- package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/listTriggerInputFields/schemas.js +21 -0
- package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts +50 -0
- package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/pauseTriggerInbox/index.js +26 -0
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts +14 -0
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/pauseTriggerInbox/schemas.js +9 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts +51 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts.map +1 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/index.js +37 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts +34 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.js +17 -0
- package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts +50 -0
- package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/resumeTriggerInbox/index.js +26 -0
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts +14 -0
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/resumeTriggerInbox/schemas.js +9 -0
- package/dist/plugins/triggers/shared.d.ts +17 -0
- package/dist/plugins/triggers/shared.d.ts.map +1 -0
- package/dist/plugins/triggers/shared.js +16 -0
- package/dist/plugins/triggers/updateTriggerInbox/index.d.ts +51 -0
- package/dist/plugins/triggers/updateTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/updateTriggerInbox/index.js +30 -0
- package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts +15 -0
- package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts.map +1 -0
- package/dist/plugins/triggers/updateTriggerInbox/schemas.js +15 -0
- package/dist/plugins/triggers/utils.d.ts +17 -0
- package/dist/plugins/triggers/utils.d.ts.map +1 -0
- package/dist/plugins/triggers/utils.js +28 -0
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +163 -0
- package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +1 -0
- package/dist/plugins/triggers/watchTriggerInbox/index.js +111 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +2 -0
- package/dist/resolvers/actionKey.d.ts +1 -0
- package/dist/resolvers/actionKey.d.ts.map +1 -1
- package/dist/resolvers/actionKey.js +1 -1
- package/dist/resolvers/index.d.ts +2 -2
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +2 -2
- package/dist/resolvers/triggerInbox.d.ts +4 -0
- package/dist/resolvers/triggerInbox.d.ts.map +1 -0
- package/dist/resolvers/triggerInbox.js +18 -0
- package/dist/schemas/TriggerInbox.d.ts +59 -0
- package/dist/schemas/TriggerInbox.d.ts.map +1 -0
- package/dist/schemas/TriggerInbox.js +81 -0
- package/dist/schemas/TriggerMessage.d.ts +48 -0
- package/dist/schemas/TriggerMessage.d.ts.map +1 -0
- package/dist/schemas/TriggerMessage.js +79 -0
- package/dist/sdk.d.ts +621 -17
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +26 -9
- package/dist/types/errors.d.ts +13 -0
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +16 -0
- package/dist/types/plugin.d.ts +12 -1
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/properties.d.ts +12 -0
- package/dist/types/properties.d.ts.map +1 -1
- package/dist/types/properties.js +25 -0
- package/dist/types/registry.d.ts +5 -0
- package/dist/types/registry.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +2 -2
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/signals.d.ts +20 -0
- package/dist/types/signals.d.ts.map +1 -0
- package/dist/types/signals.js +21 -0
- package/dist/utils/abort-utils.d.ts +13 -0
- package/dist/utils/abort-utils.d.ts.map +1 -1
- package/dist/utils/abort-utils.js +15 -0
- package/dist/utils/retry-utils.d.ts +6 -2
- package/dist/utils/retry-utils.d.ts.map +1 -1
- package/dist/utils/retry-utils.js +22 -3
- package/dist/utils/schema-utils.d.ts +19 -1
- package/dist/utils/schema-utils.d.ts.map +1 -1
- package/package.json +12 -1
- package/dist/plugins/getInputFieldsSchema/index.d.ts.map +0 -1
- package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +0 -1
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +0 -1
- package/dist/plugins/listInputFields/index.d.ts.map +0 -1
- package/dist/plugins/listInputFields/schemas.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const GetActionInputFieldsSchemaSchema: z.ZodObject<{
|
|
3
3
|
app: z.ZodString & {
|
|
4
4
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
5
5
|
};
|
|
@@ -21,7 +21,7 @@ export declare const GetInputFieldsSchemaSchema: z.ZodObject<{
|
|
|
21
21
|
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
22
22
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
23
23
|
}, z.core.$strip>;
|
|
24
|
-
declare const
|
|
24
|
+
declare const GetActionInputFieldsSchemaSchemaDeprecated: z.ZodObject<{
|
|
25
25
|
appKey: z.ZodString & {
|
|
26
26
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
27
27
|
};
|
|
@@ -41,7 +41,7 @@ declare const GetInputFieldsSchemaSchemaDeprecated: z.ZodObject<{
|
|
|
41
41
|
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
42
42
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
43
43
|
}, z.core.$strip>;
|
|
44
|
-
export declare const
|
|
44
|
+
export declare const GetActionInputFieldsSchemaInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
45
45
|
app: z.ZodString & {
|
|
46
46
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
47
47
|
};
|
|
@@ -82,14 +82,14 @@ export declare const GetInputFieldsSchemaInputSchema: z.ZodUnion<readonly [z.Zod
|
|
|
82
82
|
authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
83
83
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
84
84
|
}, z.core.$strip>]>;
|
|
85
|
-
export type
|
|
85
|
+
export type GetActionInputFieldsSchemaOptions = z.infer<typeof GetActionInputFieldsSchemaSchema> | (Omit<z.infer<typeof GetActionInputFieldsSchemaSchemaDeprecated>, "appKey" | "actionKey"> & {
|
|
86
86
|
/** @deprecated Use `app` instead. */
|
|
87
|
-
appKey: z.infer<typeof
|
|
87
|
+
appKey: z.infer<typeof GetActionInputFieldsSchemaSchemaDeprecated>["appKey"];
|
|
88
88
|
/** @deprecated Use `action` instead. */
|
|
89
|
-
actionKey: z.infer<typeof
|
|
89
|
+
actionKey: z.infer<typeof GetActionInputFieldsSchemaSchemaDeprecated>["actionKey"];
|
|
90
90
|
});
|
|
91
|
-
export interface
|
|
92
|
-
|
|
91
|
+
export interface GetActionInputFieldsSchemaSdkFunction {
|
|
92
|
+
getActionInputFieldsSchema: (options: GetActionInputFieldsSchemaOptions) => Promise<{
|
|
93
93
|
data: Record<string, unknown>;
|
|
94
94
|
}>;
|
|
95
95
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/getActionInputFieldsSchema/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwCxB,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;iBAqBzC,CAAC;AAGL,QAAA,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;iBAYF,CAAC;AAG/C,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAKA,CAAC;AAGnD,MAAM,MAAM,iCAAiC,GACzC,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,GAChD,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,EAC1D,QAAQ,GAAG,WAAW,CACvB,GAAG;IACF,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,OAAO,0CAA0C,CAClD,CAAC,QAAQ,CAAC,CAAC;IACZ,wCAAwC;IACxC,SAAS,EAAE,CAAC,CAAC,KAAK,CAChB,OAAO,0CAA0C,CAClD,CAAC,WAAW,CAAC,CAAC;CAChB,CAAC,CAAC;AAEP,MAAM,WAAW,qCAAqC;IACpD,0BAA0B,EAAE,CAC1B,OAAO,EAAE,iCAAiC,KACvC,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CACjD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ActionPropertySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdPropertySchema, InputsPropertySchema, } from "../../types/properties";
|
|
3
|
-
const
|
|
3
|
+
const GetActionInputFieldsSchemaDescription = "Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action's input parameters.";
|
|
4
4
|
// Base schema for shared (optional) properties
|
|
5
|
-
const
|
|
5
|
+
const GetActionInputFieldsSchemaBaseSchema = z.object({
|
|
6
6
|
connection: ConnectionPropertySchema.optional().describe("Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."),
|
|
7
7
|
connectionId: ConnectionIdPropertySchema.nullable()
|
|
8
8
|
.optional()
|
|
@@ -16,14 +16,14 @@ const GetInputFieldsSchemaBaseSchema = z.object({
|
|
|
16
16
|
inputs: InputsPropertySchema.optional().describe("Current input values that may affect the schema (e.g., when fields depend on other field values)"),
|
|
17
17
|
});
|
|
18
18
|
// Schema for docs/registry (new param names only)
|
|
19
|
-
export const
|
|
19
|
+
export const GetActionInputFieldsSchemaSchema = z
|
|
20
20
|
.object({
|
|
21
21
|
app: AppPropertySchema.describe("App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for"),
|
|
22
22
|
actionType: ActionTypePropertySchema.describe("Action type that matches the action's defined type"),
|
|
23
23
|
action: ActionPropertySchema.describe("Action key to get the input schema for"),
|
|
24
24
|
})
|
|
25
|
-
.merge(
|
|
26
|
-
.describe(
|
|
25
|
+
.merge(GetActionInputFieldsSchemaBaseSchema)
|
|
26
|
+
.describe(GetActionInputFieldsSchemaDescription)
|
|
27
27
|
.meta({
|
|
28
28
|
aliases: {
|
|
29
29
|
appKey: "app",
|
|
@@ -33,14 +33,17 @@ export const GetInputFieldsSchemaSchema = z
|
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
35
|
// Deprecated schema (backward compat)
|
|
36
|
-
const
|
|
36
|
+
const GetActionInputFieldsSchemaSchemaDeprecated = z
|
|
37
37
|
.object({
|
|
38
38
|
appKey: AppKeyPropertySchema.describe("App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for"),
|
|
39
39
|
actionType: ActionTypePropertySchema.describe("Action type that matches the action's defined type"),
|
|
40
40
|
actionKey: ActionKeyPropertySchema.describe("Action key to get the input schema for"),
|
|
41
41
|
})
|
|
42
|
-
.merge(
|
|
42
|
+
.merge(GetActionInputFieldsSchemaBaseSchema);
|
|
43
43
|
// Union for runtime validation (accepts either new or old names)
|
|
44
|
-
export const
|
|
45
|
-
.union([
|
|
46
|
-
|
|
44
|
+
export const GetActionInputFieldsSchemaInputSchema = z
|
|
45
|
+
.union([
|
|
46
|
+
GetActionInputFieldsSchemaSchema,
|
|
47
|
+
GetActionInputFieldsSchemaSchemaDeprecated,
|
|
48
|
+
])
|
|
49
|
+
.describe(GetActionInputFieldsSchemaDescription);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ApiClient } from "../../api";
|
|
2
2
|
import type { GetVersionedImplementationId } from "../manifest/schemas";
|
|
3
3
|
import type { ConnectionsPluginProvides } from "../connections";
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const listActionInputFieldChoicesPlugin: (sdk: {
|
|
5
5
|
getAction: (options?: {
|
|
6
6
|
app: string;
|
|
7
7
|
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
@@ -42,7 +42,7 @@ export declare const listInputFieldChoicesPlugin: (sdk: {
|
|
|
42
42
|
meta: Record<string, import("../..").PluginMeta>;
|
|
43
43
|
};
|
|
44
44
|
}) => {
|
|
45
|
-
|
|
45
|
+
listActionInputFieldChoices: (options?: (({
|
|
46
46
|
app: string;
|
|
47
47
|
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
48
48
|
action: string;
|
|
@@ -81,9 +81,9 @@ export declare const listInputFieldChoicesPlugin: (sdk: {
|
|
|
81
81
|
} & {
|
|
82
82
|
context: {
|
|
83
83
|
meta: {
|
|
84
|
-
|
|
84
|
+
listActionInputFieldChoices: import("../..").PluginMeta;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
|
-
export type
|
|
88
|
+
export type ListActionInputFieldChoicesPluginProvides = ReturnType<typeof listActionInputFieldChoicesPlugin>;
|
|
89
89
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listActionInputFieldChoices/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAU3C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAcxE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAehE,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAG/B;QACP,GAAG,EAAE,SAAS,CAAC;QACf,4BAA4B,EAAE,4BAA4B,CAAC;KAC5D,GAAG,yBAAyB,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8H7C,CAAC;AAEF,MAAM,MAAM,yCAAyC,GAAG,UAAU,CAChE,OAAO,iCAAiC,CACzC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { definePlugin } from "../../utils/plugin-utils";
|
|
2
2
|
import { createPaginatedPluginMethod } from "../../utils/plugin-utils";
|
|
3
|
-
import {
|
|
3
|
+
import { ListActionInputFieldChoicesInputSchema, InputFieldChoiceItemSchema, } from "./schemas";
|
|
4
4
|
import { ZapierApiError, ZapierConfigurationError } from "../../types/errors";
|
|
5
5
|
import { DEFAULT_PAGE_SIZE } from "../../constants";
|
|
6
6
|
import { appKeyResolver, actionTypeResolver, actionKeyResolver, connectionIdResolver, inputFieldKeyResolver, inputsAllOptionalResolver, } from "../../resolvers";
|
|
@@ -15,12 +15,12 @@ function transformNeedChoicesToInputFieldChoiceItem(choice) {
|
|
|
15
15
|
value: choice.value,
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
export const
|
|
19
|
-
name: "
|
|
18
|
+
export const listActionInputFieldChoicesPlugin = definePlugin((sdk) => createPaginatedPluginMethod(sdk, {
|
|
19
|
+
name: "listActionInputFieldChoices",
|
|
20
20
|
categories: ["action"],
|
|
21
21
|
type: "list",
|
|
22
22
|
itemType: "InputFieldChoice",
|
|
23
|
-
inputSchema:
|
|
23
|
+
inputSchema: ListActionInputFieldChoicesInputSchema,
|
|
24
24
|
outputSchema: InputFieldChoiceItemSchema,
|
|
25
25
|
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
26
26
|
resolvers: {
|
|
@@ -7,7 +7,7 @@ export declare const InputFieldChoiceItemSchema: z.ZodObject<{
|
|
|
7
7
|
value: z.ZodOptional<z.ZodString>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
9
|
export type InputFieldChoiceItem = z.infer<typeof InputFieldChoiceItemSchema>;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const ListActionInputFieldChoicesSchema: z.ZodObject<{
|
|
11
11
|
app: z.ZodString & {
|
|
12
12
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
13
13
|
};
|
|
@@ -36,7 +36,7 @@ export declare const ListInputFieldChoicesSchema: z.ZodObject<{
|
|
|
36
36
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
37
37
|
cursor: z.ZodOptional<z.ZodString>;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
|
-
declare const
|
|
39
|
+
declare const ListActionInputFieldChoicesSchemaDeprecated: z.ZodObject<{
|
|
40
40
|
appKey: z.ZodString & {
|
|
41
41
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
42
42
|
};
|
|
@@ -61,7 +61,7 @@ declare const ListInputFieldChoicesSchemaDeprecated: z.ZodObject<{
|
|
|
61
61
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
62
62
|
cursor: z.ZodOptional<z.ZodString>;
|
|
63
63
|
}, z.core.$strip>;
|
|
64
|
-
export declare const
|
|
64
|
+
export declare const ListActionInputFieldChoicesInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
65
65
|
app: z.ZodString & {
|
|
66
66
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
67
67
|
};
|
|
@@ -114,20 +114,20 @@ export declare const ListInputFieldChoicesInputSchema: z.ZodUnion<readonly [z.Zo
|
|
|
114
114
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
115
115
|
cursor: z.ZodOptional<z.ZodString>;
|
|
116
116
|
}, z.core.$strip>]>;
|
|
117
|
-
export type
|
|
117
|
+
export type ListActionInputFieldChoicesOptions = z.infer<typeof ListActionInputFieldChoicesSchema> | (Omit<z.infer<typeof ListActionInputFieldChoicesSchemaDeprecated>, "appKey" | "actionKey" | "inputFieldKey"> & {
|
|
118
118
|
/** @deprecated Use `app` instead. */
|
|
119
|
-
appKey: z.infer<typeof
|
|
119
|
+
appKey: z.infer<typeof ListActionInputFieldChoicesSchemaDeprecated>["appKey"];
|
|
120
120
|
/** @deprecated Use `action` instead. */
|
|
121
|
-
actionKey: z.infer<typeof
|
|
121
|
+
actionKey: z.infer<typeof ListActionInputFieldChoicesSchemaDeprecated>["actionKey"];
|
|
122
122
|
/** @deprecated Use `inputField` instead. */
|
|
123
|
-
inputFieldKey: z.infer<typeof
|
|
123
|
+
inputFieldKey: z.infer<typeof ListActionInputFieldChoicesSchemaDeprecated>["inputFieldKey"];
|
|
124
124
|
});
|
|
125
|
-
export interface
|
|
125
|
+
export interface ListActionInputFieldChoicesPage {
|
|
126
126
|
data: InputFieldChoiceItem[];
|
|
127
127
|
nextCursor?: string;
|
|
128
128
|
}
|
|
129
|
-
export interface
|
|
130
|
-
|
|
129
|
+
export interface ListActionInputFieldChoicesSdkFunction {
|
|
130
|
+
listActionInputFieldChoices: PaginatedSdkFunction<ListActionInputFieldChoicesOptions, InputFieldChoiceItem>;
|
|
131
131
|
}
|
|
132
132
|
export {};
|
|
133
133
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listActionInputFieldChoices/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAMlE,eAAO,MAAM,0BAA0B;;;;;iBA0BrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AA2C9E,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB1C,CAAC;AAGL,QAAA,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;iBAUF,CAAC;AAGhD,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAKA,CAAC;AAGpD,MAAM,MAAM,kCAAkC,GAC1C,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,GACjD,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,EAC3D,QAAQ,GAAG,WAAW,GAAG,eAAe,CACzC,GAAG;IACF,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,OAAO,2CAA2C,CACnD,CAAC,QAAQ,CAAC,CAAC;IACZ,wCAAwC;IACxC,SAAS,EAAE,CAAC,CAAC,KAAK,CAChB,OAAO,2CAA2C,CACnD,CAAC,WAAW,CAAC,CAAC;IACf,4CAA4C;IAC5C,aAAa,EAAE,CAAC,CAAC,KAAK,CACpB,OAAO,2CAA2C,CACnD,CAAC,eAAe,CAAC,CAAC;CACpB,CAAC,CAAC;AAGP,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,sCAAsC;IACrD,2BAA2B,EAAE,oBAAoB,CAC/C,kCAAkC,EAClC,oBAAoB,CACrB,CAAC;CACH"}
|
|
@@ -29,9 +29,9 @@ export const InputFieldChoiceItemSchema = withFormatter(NeedChoicesSchema, {
|
|
|
29
29
|
// ============================================================================
|
|
30
30
|
// Plugin Schema Definition
|
|
31
31
|
// ============================================================================
|
|
32
|
-
const
|
|
32
|
+
const ListActionInputFieldChoicesDescription = "Get the available choices for a dynamic dropdown input field";
|
|
33
33
|
// Base schema for shared (optional) properties
|
|
34
|
-
const
|
|
34
|
+
const ListActionInputFieldChoicesBaseSchema = z.object({
|
|
35
35
|
connection: ConnectionPropertySchema.optional().describe("Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."),
|
|
36
36
|
connectionId: ConnectionIdPropertySchema.nullable()
|
|
37
37
|
.optional()
|
|
@@ -57,15 +57,15 @@ const ListInputFieldChoicesBaseSchema = z.object({
|
|
|
57
57
|
cursor: z.string().optional().describe("Cursor to start from"),
|
|
58
58
|
});
|
|
59
59
|
// Schema for docs/registry (new param names only)
|
|
60
|
-
export const
|
|
60
|
+
export const ListActionInputFieldChoicesSchema = z
|
|
61
61
|
.object({
|
|
62
62
|
app: AppPropertySchema,
|
|
63
63
|
actionType: ActionTypePropertySchema,
|
|
64
64
|
action: ActionPropertySchema,
|
|
65
65
|
inputField: InputFieldPropertySchema,
|
|
66
66
|
})
|
|
67
|
-
.merge(
|
|
68
|
-
.describe(
|
|
67
|
+
.merge(ListActionInputFieldChoicesBaseSchema)
|
|
68
|
+
.describe(ListActionInputFieldChoicesDescription)
|
|
69
69
|
.meta({
|
|
70
70
|
aliases: {
|
|
71
71
|
appKey: "app",
|
|
@@ -76,7 +76,7 @@ export const ListInputFieldChoicesSchema = z
|
|
|
76
76
|
},
|
|
77
77
|
});
|
|
78
78
|
// Deprecated schema (backward compat)
|
|
79
|
-
const
|
|
79
|
+
const ListActionInputFieldChoicesSchemaDeprecated = z
|
|
80
80
|
.object({
|
|
81
81
|
appKey: AppKeyPropertySchema,
|
|
82
82
|
actionType: ActionTypePropertySchema,
|
|
@@ -86,8 +86,11 @@ const ListInputFieldChoicesSchemaDeprecated = z
|
|
|
86
86
|
.min(1)
|
|
87
87
|
.describe("Input field key to get choices for."),
|
|
88
88
|
})
|
|
89
|
-
.merge(
|
|
89
|
+
.merge(ListActionInputFieldChoicesBaseSchema);
|
|
90
90
|
// Union for runtime validation (accepts either new or old names)
|
|
91
|
-
export const
|
|
92
|
-
.union([
|
|
93
|
-
|
|
91
|
+
export const ListActionInputFieldChoicesInputSchema = z
|
|
92
|
+
.union([
|
|
93
|
+
ListActionInputFieldChoicesSchema,
|
|
94
|
+
ListActionInputFieldChoicesSchemaDeprecated,
|
|
95
|
+
])
|
|
96
|
+
.describe(ListActionInputFieldChoicesDescription);
|
|
@@ -2,7 +2,7 @@ import type { ApiClient } from "../../api";
|
|
|
2
2
|
import type { FieldsetItem } from "../../types/domain";
|
|
3
3
|
import type { GetVersionedImplementationId } from "../manifest/schemas";
|
|
4
4
|
import type { ConnectionsPluginProvides } from "../connections";
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const listActionInputFieldsPlugin: (sdk: {
|
|
6
6
|
getApp: (options?: {
|
|
7
7
|
app: string;
|
|
8
8
|
} | {
|
|
@@ -109,7 +109,7 @@ export declare const listInputFieldsPlugin: (sdk: {
|
|
|
109
109
|
meta: Record<string, import("../..").PluginMeta>;
|
|
110
110
|
};
|
|
111
111
|
}) => {
|
|
112
|
-
|
|
112
|
+
listActionInputFields: (options?: (({
|
|
113
113
|
app: string;
|
|
114
114
|
actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
|
|
115
115
|
action: string;
|
|
@@ -159,9 +159,9 @@ export declare const listInputFieldsPlugin: (sdk: {
|
|
|
159
159
|
} & {
|
|
160
160
|
context: {
|
|
161
161
|
meta: {
|
|
162
|
-
|
|
162
|
+
listActionInputFields: import("../..").PluginMeta;
|
|
163
163
|
};
|
|
164
164
|
};
|
|
165
165
|
};
|
|
166
|
-
export type
|
|
166
|
+
export type ListActionInputFieldsPluginProvides = ReturnType<typeof listActionInputFieldsPlugin>;
|
|
167
167
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/listActionInputFields/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAGV,YAAY,EAEb,MAAM,oBAAoB,CAAC;AAM5B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAYxE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AA4JhE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAIvB;QACP,GAAG,EAAE,SAAS,CAAC;QACf,4BAA4B,EAAE,4BAA4B,CAAC;KAC5D,GAAG,yBAAyB,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+E/C,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG,UAAU,CAC1D,OAAO,2BAA2B,CACnC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { definePlugin } from "../../utils/plugin-utils";
|
|
2
2
|
import { createPaginatedPluginMethod } from "../../utils/plugin-utils";
|
|
3
|
-
import {
|
|
3
|
+
import { ListActionInputFieldsInputSchema } from "./schemas";
|
|
4
4
|
import { ZapierConfigurationError } from "../../types/errors";
|
|
5
5
|
import { DEFAULT_PAGE_SIZE } from "../../constants";
|
|
6
6
|
import { appKeyResolver, actionTypeResolver, actionKeyResolver, connectionIdResolver, inputsAllOptionalResolver, } from "../../resolvers";
|
|
@@ -147,12 +147,12 @@ function transformNeedsToFields(needs) {
|
|
|
147
147
|
}
|
|
148
148
|
return rootFields;
|
|
149
149
|
}
|
|
150
|
-
export const
|
|
151
|
-
name: "
|
|
150
|
+
export const listActionInputFieldsPlugin = definePlugin((sdk) => createPaginatedPluginMethod(sdk, {
|
|
151
|
+
name: "listActionInputFields",
|
|
152
152
|
categories: ["action"],
|
|
153
153
|
type: "list",
|
|
154
154
|
itemType: "RootField",
|
|
155
|
-
inputSchema:
|
|
155
|
+
inputSchema: ListActionInputFieldsInputSchema,
|
|
156
156
|
outputSchema: RootFieldItemSchema,
|
|
157
157
|
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
158
158
|
resolvers: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { RootFieldItem } from "../../types/domain";
|
|
3
3
|
import type { PaginatedSdkFunction } from "../../types/functions";
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const ListActionInputFieldsSchema: z.ZodObject<{
|
|
5
5
|
app: z.ZodString & {
|
|
6
6
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
7
7
|
};
|
|
@@ -26,7 +26,7 @@ export declare const ListInputFieldsSchema: z.ZodObject<{
|
|
|
26
26
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
27
27
|
cursor: z.ZodOptional<z.ZodString>;
|
|
28
28
|
}, z.core.$strip>;
|
|
29
|
-
declare const
|
|
29
|
+
declare const ListActionInputFieldsSchemaDeprecated: z.ZodObject<{
|
|
30
30
|
appKey: z.ZodString & {
|
|
31
31
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
32
32
|
};
|
|
@@ -49,7 +49,7 @@ declare const ListInputFieldsSchemaDeprecated: z.ZodObject<{
|
|
|
49
49
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
50
50
|
cursor: z.ZodOptional<z.ZodString>;
|
|
51
51
|
}, z.core.$strip>;
|
|
52
|
-
export declare const
|
|
52
|
+
export declare const ListActionInputFieldsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
53
53
|
app: z.ZodString & {
|
|
54
54
|
_def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
|
|
55
55
|
};
|
|
@@ -96,18 +96,18 @@ export declare const ListInputFieldsInputSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
96
96
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
97
97
|
cursor: z.ZodOptional<z.ZodString>;
|
|
98
98
|
}, z.core.$strip>]>;
|
|
99
|
-
export type
|
|
99
|
+
export type ListActionInputFieldsOptions = z.infer<typeof ListActionInputFieldsSchema> | (Omit<z.infer<typeof ListActionInputFieldsSchemaDeprecated>, "appKey" | "actionKey"> & {
|
|
100
100
|
/** @deprecated Use `app` instead. */
|
|
101
|
-
appKey: z.infer<typeof
|
|
101
|
+
appKey: z.infer<typeof ListActionInputFieldsSchemaDeprecated>["appKey"];
|
|
102
102
|
/** @deprecated Use `action` instead. */
|
|
103
|
-
actionKey: z.infer<typeof
|
|
103
|
+
actionKey: z.infer<typeof ListActionInputFieldsSchemaDeprecated>["actionKey"];
|
|
104
104
|
});
|
|
105
|
-
export interface
|
|
105
|
+
export interface ListActionInputFieldsPage {
|
|
106
106
|
data: RootFieldItem[];
|
|
107
107
|
nextCursor?: string;
|
|
108
108
|
}
|
|
109
|
-
export interface
|
|
110
|
-
|
|
109
|
+
export interface ListActionInputFieldsSdkFunction {
|
|
110
|
+
listActionInputFields: PaginatedSdkFunction<ListActionInputFieldsOptions, RootFieldItem[]>;
|
|
111
111
|
}
|
|
112
112
|
export {};
|
|
113
113
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listActionInputFields/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;AAqClE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;iBAepC,CAAC;AAGL,QAAA,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;iBAMF,CAAC;AAG1C,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAEN,CAAC;AAGxC,MAAM,MAAM,4BAA4B,GACpC,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,GAC3C,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,EACrD,QAAQ,GAAG,WAAW,CACvB,GAAG;IACF,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACxE,wCAAwC;IACxC,SAAS,EAAE,CAAC,CAAC,KAAK,CAChB,OAAO,qCAAqC,CAC7C,CAAC,WAAW,CAAC,CAAC;CAChB,CAAC,CAAC;AAGP,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB,EAAE,oBAAoB,CACzC,4BAA4B,EAC5B,aAAa,EAAE,CAChB,CAAC;CACH"}
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, ActionKeyPropertySchema, ActionPropertySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, AuthenticationIdPropertySchema, InputsPropertySchema, } from "../../types/properties";
|
|
3
3
|
const ListInputFieldsDescription = "Get the input fields required for a specific action";
|
|
4
4
|
// Base schema for shared (optional) properties
|
|
5
|
-
const
|
|
5
|
+
const ListActionInputFieldsBaseSchema = z.object({
|
|
6
6
|
connection: ConnectionPropertySchema.optional().describe("Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."),
|
|
7
7
|
connectionId: ConnectionIdPropertySchema.nullable()
|
|
8
8
|
.optional()
|
|
@@ -26,13 +26,13 @@ const ListInputFieldsBaseSchema = z.object({
|
|
|
26
26
|
cursor: z.string().optional().describe("Cursor to start from"),
|
|
27
27
|
});
|
|
28
28
|
// Schema for docs/registry (new param names only)
|
|
29
|
-
export const
|
|
29
|
+
export const ListActionInputFieldsSchema = z
|
|
30
30
|
.object({
|
|
31
31
|
app: AppPropertySchema,
|
|
32
32
|
actionType: ActionTypePropertySchema,
|
|
33
33
|
action: ActionPropertySchema,
|
|
34
34
|
})
|
|
35
|
-
.merge(
|
|
35
|
+
.merge(ListActionInputFieldsBaseSchema)
|
|
36
36
|
.describe(ListInputFieldsDescription)
|
|
37
37
|
.meta({
|
|
38
38
|
aliases: {
|
|
@@ -43,14 +43,14 @@ export const ListInputFieldsSchema = z
|
|
|
43
43
|
},
|
|
44
44
|
});
|
|
45
45
|
// Deprecated schema (backward compat)
|
|
46
|
-
const
|
|
46
|
+
const ListActionInputFieldsSchemaDeprecated = z
|
|
47
47
|
.object({
|
|
48
48
|
appKey: AppKeyPropertySchema,
|
|
49
49
|
actionType: ActionTypePropertySchema,
|
|
50
50
|
actionKey: ActionKeyPropertySchema,
|
|
51
51
|
})
|
|
52
|
-
.merge(
|
|
52
|
+
.merge(ListActionInputFieldsBaseSchema);
|
|
53
53
|
// Union for runtime validation (accepts either new or old names)
|
|
54
|
-
export const
|
|
55
|
-
.union([
|
|
54
|
+
export const ListActionInputFieldsInputSchema = z
|
|
55
|
+
.union([ListActionInputFieldsSchema, ListActionInputFieldsSchemaDeprecated])
|
|
56
56
|
.describe(ListInputFieldsDescription);
|
|
@@ -21,8 +21,8 @@ export declare const requestPlugin: (sdk: {
|
|
|
21
21
|
method: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
22
22
|
POST: "POST";
|
|
23
23
|
GET: "GET";
|
|
24
|
-
DELETE: "DELETE";
|
|
25
24
|
PUT: "PUT";
|
|
25
|
+
DELETE: "DELETE";
|
|
26
26
|
PATCH: "PATCH";
|
|
27
27
|
HEAD: "HEAD";
|
|
28
28
|
OPTIONS: "OPTIONS";
|
|
@@ -48,7 +48,7 @@ export declare const requestPlugin: (sdk: {
|
|
|
48
48
|
}) => {
|
|
49
49
|
request: (options?: {
|
|
50
50
|
url: string;
|
|
51
|
-
method?: "POST" | "GET" | "
|
|
51
|
+
method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
|
|
52
52
|
body?: any;
|
|
53
53
|
connection?: string | number | undefined;
|
|
54
54
|
connectionId?: string | number | undefined;
|
|
@@ -4,8 +4,8 @@ export declare const RelayRequestSchema: z.ZodObject<{
|
|
|
4
4
|
method: z.ZodOptional<z.ZodEnum<{
|
|
5
5
|
POST: "POST";
|
|
6
6
|
GET: "GET";
|
|
7
|
-
DELETE: "DELETE";
|
|
8
7
|
PUT: "PUT";
|
|
8
|
+
DELETE: "DELETE";
|
|
9
9
|
PATCH: "PATCH";
|
|
10
10
|
HEAD: "HEAD";
|
|
11
11
|
OPTIONS: "OPTIONS";
|
|
@@ -26,8 +26,8 @@ export declare const RelayFetchSchema: z.ZodObject<{
|
|
|
26
26
|
method: z.ZodOptional<z.ZodEnum<{
|
|
27
27
|
POST: "POST";
|
|
28
28
|
GET: "GET";
|
|
29
|
-
DELETE: "DELETE";
|
|
30
29
|
PUT: "PUT";
|
|
30
|
+
DELETE: "DELETE";
|
|
31
31
|
PATCH: "PATCH";
|
|
32
32
|
HEAD: "HEAD";
|
|
33
33
|
OPTIONS: "OPTIONS";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const ackTriggerInboxMessagesPlugin: (sdk: {
|
|
2
|
+
context: {
|
|
3
|
+
api: import("../../..").ApiClient;
|
|
4
|
+
resolveCredentials: () => Promise<string | {
|
|
5
|
+
clientId: string;
|
|
6
|
+
clientSecret: string;
|
|
7
|
+
type?: "client_credentials" | undefined;
|
|
8
|
+
baseUrl?: string | undefined;
|
|
9
|
+
scope?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
clientId: string;
|
|
12
|
+
type?: "pkce" | undefined;
|
|
13
|
+
baseUrl?: string | undefined;
|
|
14
|
+
scope?: string | undefined;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
};
|
|
17
|
+
} & {
|
|
18
|
+
context: import("../../eventEmission").EventEmissionContext;
|
|
19
|
+
} & {
|
|
20
|
+
context: {
|
|
21
|
+
meta: Record<string, import("../../..").PluginMeta>;
|
|
22
|
+
};
|
|
23
|
+
}) => {
|
|
24
|
+
ackTriggerInboxMessages: (options?: {
|
|
25
|
+
inbox: string;
|
|
26
|
+
lease: string;
|
|
27
|
+
messages?: string[] | undefined;
|
|
28
|
+
} | undefined) => Promise<{
|
|
29
|
+
data: {
|
|
30
|
+
acked_id: string | null;
|
|
31
|
+
results: {
|
|
32
|
+
id: string;
|
|
33
|
+
created_at: string;
|
|
34
|
+
status: string;
|
|
35
|
+
message_attributes: {
|
|
36
|
+
lease_count: number;
|
|
37
|
+
error_message: string | null;
|
|
38
|
+
possible_duplicate_data: boolean;
|
|
39
|
+
};
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
}>;
|
|
43
|
+
} & {
|
|
44
|
+
context: {
|
|
45
|
+
meta: {
|
|
46
|
+
ackTriggerInboxMessages: import("../../..").PluginMeta;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export type AckTriggerInboxMessagesPluginProvides = ReturnType<typeof ackTriggerInboxMessagesPlugin>;
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/triggers/ackTriggerInboxMessages/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCzC,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG,UAAU,CAC5D,OAAO,6BAA6B,CACrC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { definePlugin, createPluginMethod } from "../../../utils/plugin-utils";
|
|
2
|
+
import { AckTriggerInboxMessagesSchema, AckTriggerInboxMessagesItemSchema, } from "./schemas";
|
|
3
|
+
import { triggerInboxResolver } from "../../../resolvers";
|
|
4
|
+
import { resolveTriggerInboxId } from "../utils";
|
|
5
|
+
import { triggersDefaults } from "../shared";
|
|
6
|
+
export const ackTriggerInboxMessagesPlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
7
|
+
...triggersDefaults,
|
|
8
|
+
name: "ackTriggerInboxMessages",
|
|
9
|
+
type: "create",
|
|
10
|
+
itemType: "TriggerInboxAck",
|
|
11
|
+
inputSchema: AckTriggerInboxMessagesSchema,
|
|
12
|
+
outputSchema: AckTriggerInboxMessagesItemSchema,
|
|
13
|
+
resolvers: {
|
|
14
|
+
inbox: triggerInboxResolver,
|
|
15
|
+
// No way to look up a lease — leases are short-lived, only the
|
|
16
|
+
// most recent leaseTriggerInboxMessages caller knows the ID.
|
|
17
|
+
// Static resolver prompts for free-text input.
|
|
18
|
+
lease: { type: "static", inputType: "text" },
|
|
19
|
+
},
|
|
20
|
+
handler: async ({ sdk, options }) => {
|
|
21
|
+
const { inbox, lease, messages } = options;
|
|
22
|
+
const inboxId = await resolveTriggerInboxId({
|
|
23
|
+
api: sdk.context.api,
|
|
24
|
+
inbox,
|
|
25
|
+
});
|
|
26
|
+
const requestBody = {
|
|
27
|
+
lease_id: lease,
|
|
28
|
+
};
|
|
29
|
+
if (messages !== undefined) {
|
|
30
|
+
requestBody.message_ids = messages;
|
|
31
|
+
}
|
|
32
|
+
const rawResponse = await sdk.context.api.post(`/trigger-inbox/api/v1/inboxes/${encodeURIComponent(inboxId)}/messages/ack`, requestBody, { authRequired: true });
|
|
33
|
+
return { data: AckTriggerInboxMessagesItemSchema.parse(rawResponse) };
|
|
34
|
+
},
|
|
35
|
+
}));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type TriggerMessageItem } from "../../../schemas/TriggerMessage";
|
|
3
|
+
export declare const AckTriggerInboxMessagesSchema: z.ZodObject<{
|
|
4
|
+
inbox: z.ZodString & {
|
|
5
|
+
_def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
|
|
6
|
+
};
|
|
7
|
+
lease: z.ZodString;
|
|
8
|
+
messages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type AckTriggerInboxMessagesOptions = z.infer<typeof AckTriggerInboxMessagesSchema>;
|
|
11
|
+
export declare const AckTriggerInboxMessagesItemSchema: z.ZodObject<{
|
|
12
|
+
acked_id: z.ZodNullable<z.ZodString>;
|
|
13
|
+
results: z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
created_at: z.ZodString;
|
|
16
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
17
|
+
available: "available";
|
|
18
|
+
leased: "leased";
|
|
19
|
+
acked: "acked";
|
|
20
|
+
quarantined: "quarantined";
|
|
21
|
+
}>, z.ZodString]>;
|
|
22
|
+
message_attributes: z.ZodObject<{
|
|
23
|
+
lease_count: z.ZodNumber;
|
|
24
|
+
error_message: z.ZodNullable<z.ZodString>;
|
|
25
|
+
possible_duplicate_data: z.ZodBoolean;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type AckTriggerInboxMessagesItem = z.infer<typeof AckTriggerInboxMessagesItemSchema>;
|
|
30
|
+
export interface AckTriggerInboxMessagesResult {
|
|
31
|
+
data: AckTriggerInboxMessagesItem;
|
|
32
|
+
}
|
|
33
|
+
export type AckedMessage = TriggerMessageItem;
|
|
34
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/triggers/ackTriggerInboxMessages/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,6BAA6B;;;;;;iBAavC,CAAC;AAEJ,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;iBAG5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AAEF,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,2BAA2B,CAAC;CACnC;AAED,MAAM,MAAM,YAAY,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { TriggerInboxPropertySchema, LeasePropertySchema, } from "../../../types/properties";
|
|
3
|
+
import { TriggerMessageItemSchema, } from "../../../schemas/TriggerMessage";
|
|
4
|
+
export const AckTriggerInboxMessagesSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
inbox: TriggerInboxPropertySchema,
|
|
7
|
+
lease: LeasePropertySchema,
|
|
8
|
+
messages: z
|
|
9
|
+
.array(z.string().min(1))
|
|
10
|
+
.optional()
|
|
11
|
+
.describe("Specific message IDs to ack. Omit to ack every message in the lease."),
|
|
12
|
+
})
|
|
13
|
+
.describe("Acknowledge messages from a lease. Acked messages are removed from the inbox; unacked ones return to the available pool when the lease expires.");
|
|
14
|
+
export const AckTriggerInboxMessagesItemSchema = z.object({
|
|
15
|
+
acked_id: z.string().nullable(),
|
|
16
|
+
results: z.array(TriggerMessageItemSchema),
|
|
17
|
+
});
|