@zapier/zapier-sdk-core 0.4.0 → 0.5.1
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 +13 -0
- package/dist/index.cjs +30 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -1
- package/dist/index.js.map +1 -1
- package/dist/v0/config/metadata.cjs +4 -0
- package/dist/v0/config/metadata.cjs.map +1 -1
- package/dist/v0/config/metadata.js +4 -0
- package/dist/v0/config/metadata.js.map +1 -1
- package/dist/v0/schemas/actions.cjs +90 -0
- package/dist/v0/schemas/actions.cjs.map +1 -0
- package/dist/v0/schemas/actions.d.cts +151 -0
- package/dist/v0/schemas/actions.d.ts +151 -0
- package/dist/v0/schemas/actions.js +61 -0
- package/dist/v0/schemas/actions.js.map +1 -0
- package/dist/v0/schemas/authentications.cjs +36 -3
- package/dist/v0/schemas/authentications.cjs.map +1 -1
- package/dist/v0/schemas/authentications.d.cts +59 -2
- package/dist/v0/schemas/authentications.d.ts +59 -2
- package/dist/v0/schemas/authentications.js +33 -2
- package/dist/v0/schemas/authentications.js.map +1 -1
- package/openapi.yaml +126 -2
- package/package.json +6 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Action type enum matching the internal Zapier API
|
|
5
|
+
*/
|
|
6
|
+
declare const ActionTypeSchema: z.ZodEnum<{
|
|
7
|
+
read: "read";
|
|
8
|
+
read_bulk: "read_bulk";
|
|
9
|
+
write: "write";
|
|
10
|
+
search: "search";
|
|
11
|
+
search_or_write: "search_or_write";
|
|
12
|
+
search_and_write: "search_and_write";
|
|
13
|
+
filter: "filter";
|
|
14
|
+
run: "run";
|
|
15
|
+
}>;
|
|
16
|
+
type ActionType = z.infer<typeof ActionTypeSchema>;
|
|
17
|
+
/**
|
|
18
|
+
* Base Action schema matching the internal API response from /api/v4/implementations/
|
|
19
|
+
*/
|
|
20
|
+
declare const ActionSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodOptional<z.ZodString>;
|
|
22
|
+
type: z.ZodEnum<{
|
|
23
|
+
read: "read";
|
|
24
|
+
read_bulk: "read_bulk";
|
|
25
|
+
write: "write";
|
|
26
|
+
search: "search";
|
|
27
|
+
search_or_write: "search_or_write";
|
|
28
|
+
search_and_write: "search_and_write";
|
|
29
|
+
filter: "filter";
|
|
30
|
+
run: "run";
|
|
31
|
+
}>;
|
|
32
|
+
key: z.ZodString;
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
description: z.ZodString;
|
|
35
|
+
is_important: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
selected_api: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
type Action = z.infer<typeof ActionSchema>;
|
|
40
|
+
/**
|
|
41
|
+
* Normalized action item returned by the list actions endpoint
|
|
42
|
+
*
|
|
43
|
+
* Transforms API response fields:
|
|
44
|
+
* - name → title
|
|
45
|
+
* - type → action_type
|
|
46
|
+
* - selected_api → app_key + app_version (parsed)
|
|
47
|
+
*
|
|
48
|
+
* Adds computed fields:
|
|
49
|
+
* - type: "action" (literal type identifier)
|
|
50
|
+
* - app_key: Extracted from selected_api (e.g., "SlackCLIAPI@1.0.0" → "SlackCLIAPI")
|
|
51
|
+
* - app_version: Extracted from selected_api (e.g., "SlackCLIAPI@1.0.0" → "1.0.0")
|
|
52
|
+
*/
|
|
53
|
+
declare const ActionItemSchema: z.ZodObject<{
|
|
54
|
+
id: z.ZodOptional<z.ZodString>;
|
|
55
|
+
key: z.ZodString;
|
|
56
|
+
description: z.ZodString;
|
|
57
|
+
is_important: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
app_key: z.ZodString;
|
|
60
|
+
app_version: z.ZodOptional<z.ZodString>;
|
|
61
|
+
action_type: z.ZodEnum<{
|
|
62
|
+
read: "read";
|
|
63
|
+
read_bulk: "read_bulk";
|
|
64
|
+
write: "write";
|
|
65
|
+
search: "search";
|
|
66
|
+
search_or_write: "search_or_write";
|
|
67
|
+
search_and_write: "search_and_write";
|
|
68
|
+
filter: "filter";
|
|
69
|
+
run: "run";
|
|
70
|
+
}>;
|
|
71
|
+
title: z.ZodString;
|
|
72
|
+
type: z.ZodLiteral<"action">;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
type ActionItem = z.infer<typeof ActionItemSchema>;
|
|
75
|
+
/**
|
|
76
|
+
* Implementation schema with actions array for the /api/v4/implementations/ response
|
|
77
|
+
*/
|
|
78
|
+
declare const ImplementationWithActionsSchema: z.ZodObject<{
|
|
79
|
+
selected_api: z.ZodString;
|
|
80
|
+
app_id: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
auth_type: z.ZodOptional<z.ZodString>;
|
|
82
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
83
|
+
id: z.ZodOptional<z.ZodString>;
|
|
84
|
+
type: z.ZodEnum<{
|
|
85
|
+
read: "read";
|
|
86
|
+
read_bulk: "read_bulk";
|
|
87
|
+
write: "write";
|
|
88
|
+
search: "search";
|
|
89
|
+
search_or_write: "search_or_write";
|
|
90
|
+
search_and_write: "search_and_write";
|
|
91
|
+
filter: "filter";
|
|
92
|
+
run: "run";
|
|
93
|
+
}>;
|
|
94
|
+
key: z.ZodString;
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
description: z.ZodString;
|
|
97
|
+
is_important: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
selected_api: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strip>>>;
|
|
101
|
+
is_deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
is_private_only: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
is_invite_only: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
is_beta: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
105
|
+
is_premium: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
106
|
+
name: z.ZodOptional<z.ZodString>;
|
|
107
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
type ImplementationWithActions = z.infer<typeof ImplementationWithActionsSchema>;
|
|
110
|
+
/**
|
|
111
|
+
* Response schema for the /api/v4/implementations/ endpoint
|
|
112
|
+
*/
|
|
113
|
+
declare const ImplementationsWithActionsResponseSchema: z.ZodObject<{
|
|
114
|
+
count: z.ZodNumber;
|
|
115
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
|
+
previous: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
+
results: z.ZodArray<z.ZodObject<{
|
|
118
|
+
selected_api: z.ZodString;
|
|
119
|
+
app_id: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
auth_type: z.ZodOptional<z.ZodString>;
|
|
121
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
122
|
+
id: z.ZodOptional<z.ZodString>;
|
|
123
|
+
type: z.ZodEnum<{
|
|
124
|
+
read: "read";
|
|
125
|
+
read_bulk: "read_bulk";
|
|
126
|
+
write: "write";
|
|
127
|
+
search: "search";
|
|
128
|
+
search_or_write: "search_or_write";
|
|
129
|
+
search_and_write: "search_and_write";
|
|
130
|
+
filter: "filter";
|
|
131
|
+
run: "run";
|
|
132
|
+
}>;
|
|
133
|
+
key: z.ZodString;
|
|
134
|
+
name: z.ZodString;
|
|
135
|
+
description: z.ZodString;
|
|
136
|
+
is_important: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
selected_api: z.ZodOptional<z.ZodString>;
|
|
139
|
+
}, z.core.$strip>>>;
|
|
140
|
+
is_deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
+
is_private_only: z.ZodOptional<z.ZodBoolean>;
|
|
142
|
+
is_invite_only: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
is_beta: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
144
|
+
is_premium: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
145
|
+
name: z.ZodOptional<z.ZodString>;
|
|
146
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
type ImplementationsWithActionsResponse = z.infer<typeof ImplementationsWithActionsResponseSchema>;
|
|
150
|
+
|
|
151
|
+
export { type Action, type ActionItem, ActionItemSchema, ActionSchema, type ActionType, ActionTypeSchema, type ImplementationWithActions, ImplementationWithActionsSchema, type ImplementationsWithActionsResponse, ImplementationsWithActionsResponseSchema };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// src/v0/schemas/actions.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var ActionTypeSchema = z.enum([
|
|
4
|
+
"filter",
|
|
5
|
+
"read",
|
|
6
|
+
"read_bulk",
|
|
7
|
+
"run",
|
|
8
|
+
"search",
|
|
9
|
+
"search_and_write",
|
|
10
|
+
"search_or_write",
|
|
11
|
+
"write"
|
|
12
|
+
]);
|
|
13
|
+
var ActionSchema = z.object({
|
|
14
|
+
id: z.string().optional().describe("Unique identifier for the action"),
|
|
15
|
+
type: ActionTypeSchema.describe("The type of action"),
|
|
16
|
+
key: z.string().describe("Unique key identifier for the action"),
|
|
17
|
+
name: z.string().describe("Display name of the action"),
|
|
18
|
+
description: z.string().describe("Description of what the action does"),
|
|
19
|
+
is_important: z.boolean().optional().describe("Whether this action is marked as important"),
|
|
20
|
+
is_hidden: z.boolean().optional().describe("Whether this action is hidden from listings"),
|
|
21
|
+
selected_api: z.string().optional().describe("The implementation ID this action belongs to")
|
|
22
|
+
});
|
|
23
|
+
var ActionItemSchema = z.object({
|
|
24
|
+
id: z.string().optional().describe("Unique identifier for the action"),
|
|
25
|
+
key: z.string().describe("Unique key identifier for the action"),
|
|
26
|
+
description: z.string().describe("Description of what the action does"),
|
|
27
|
+
is_important: z.boolean().optional().describe("Whether this action is marked as important"),
|
|
28
|
+
is_hidden: z.boolean().optional().describe("Whether this action is hidden from listings"),
|
|
29
|
+
app_key: z.string().describe("App key extracted from implementation ID (without version)"),
|
|
30
|
+
app_version: z.string().optional().describe("App version extracted from implementation ID"),
|
|
31
|
+
action_type: ActionTypeSchema.describe("The type of action"),
|
|
32
|
+
title: z.string().describe("Display name of the action (mapped from name)"),
|
|
33
|
+
type: z.literal("action").describe("Type identifier for this item")
|
|
34
|
+
}).describe("Normalized action item returned by list actions endpoint");
|
|
35
|
+
var ImplementationWithActionsSchema = z.object({
|
|
36
|
+
selected_api: z.string().describe("The implementation ID"),
|
|
37
|
+
app_id: z.number().optional().describe("Numeric app ID"),
|
|
38
|
+
auth_type: z.string().optional().describe("Authentication type"),
|
|
39
|
+
actions: z.array(ActionSchema).optional().describe("Array of actions for this implementation"),
|
|
40
|
+
is_deprecated: z.boolean().optional().describe("Whether the implementation is deprecated"),
|
|
41
|
+
is_private_only: z.boolean().optional().describe("Whether the implementation is private only"),
|
|
42
|
+
is_invite_only: z.boolean().optional().describe("Whether the implementation is invite only"),
|
|
43
|
+
is_beta: z.boolean().optional().default(false).describe("Whether the implementation is in beta"),
|
|
44
|
+
is_premium: z.boolean().optional().default(false).describe("Whether the implementation requires premium"),
|
|
45
|
+
name: z.string().optional().describe("Name of the implementation"),
|
|
46
|
+
slug: z.string().optional().describe("URL-friendly slug")
|
|
47
|
+
});
|
|
48
|
+
var ImplementationsWithActionsResponseSchema = z.object({
|
|
49
|
+
count: z.number().describe("Total number of results"),
|
|
50
|
+
next: z.string().nullable().optional().describe("URL for the next page of results"),
|
|
51
|
+
previous: z.string().nullable().optional().describe("URL for the previous page of results"),
|
|
52
|
+
results: z.array(ImplementationWithActionsSchema).describe("Array of implementations with their actions")
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
ActionItemSchema,
|
|
56
|
+
ActionSchema,
|
|
57
|
+
ActionTypeSchema,
|
|
58
|
+
ImplementationWithActionsSchema,
|
|
59
|
+
ImplementationsWithActionsResponseSchema
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/v0/schemas/actions.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Action type enum matching the internal Zapier API\n */\nexport const ActionTypeSchema = z.enum([\n \"filter\",\n \"read\",\n \"read_bulk\",\n \"run\",\n \"search\",\n \"search_and_write\",\n \"search_or_write\",\n \"write\",\n]);\n\nexport type ActionType = z.infer<typeof ActionTypeSchema>;\n\n/**\n * Base Action schema matching the internal API response from /api/v4/implementations/\n */\nexport const ActionSchema = z.object({\n id: z.string().optional().describe(\"Unique identifier for the action\"),\n type: ActionTypeSchema.describe(\"The type of action\"),\n key: z.string().describe(\"Unique key identifier for the action\"),\n name: z.string().describe(\"Display name of the action\"),\n description: z.string().describe(\"Description of what the action does\"),\n is_important: z\n .boolean()\n .optional()\n .describe(\"Whether this action is marked as important\"),\n is_hidden: z\n .boolean()\n .optional()\n .describe(\"Whether this action is hidden from listings\"),\n selected_api: z\n .string()\n .optional()\n .describe(\"The implementation ID this action belongs to\"),\n});\n\nexport type Action = z.infer<typeof ActionSchema>;\n\n/**\n * Normalized action item returned by the list actions endpoint\n *\n * Transforms API response fields:\n * - name → title\n * - type → action_type\n * - selected_api → app_key + app_version (parsed)\n *\n * Adds computed fields:\n * - type: \"action\" (literal type identifier)\n * - app_key: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"SlackCLIAPI\")\n * - app_version: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"1.0.0\")\n */\nexport const ActionItemSchema = z\n .object({\n id: z.string().optional().describe(\"Unique identifier for the action\"),\n key: z.string().describe(\"Unique key identifier for the action\"),\n description: z.string().describe(\"Description of what the action does\"),\n is_important: z\n .boolean()\n .optional()\n .describe(\"Whether this action is marked as important\"),\n is_hidden: z\n .boolean()\n .optional()\n .describe(\"Whether this action is hidden from listings\"),\n app_key: z\n .string()\n .describe(\"App key extracted from implementation ID (without version)\"),\n app_version: z\n .string()\n .optional()\n .describe(\"App version extracted from implementation ID\"),\n action_type: ActionTypeSchema.describe(\"The type of action\"),\n title: z.string().describe(\"Display name of the action (mapped from name)\"),\n type: z.literal(\"action\").describe(\"Type identifier for this item\"),\n })\n .describe(\"Normalized action item returned by list actions endpoint\");\n\nexport type ActionItem = z.infer<typeof ActionItemSchema>;\n\n/**\n * Implementation schema with actions array for the /api/v4/implementations/ response\n */\nexport const ImplementationWithActionsSchema = z.object({\n selected_api: z.string().describe(\"The implementation ID\"),\n app_id: z.number().optional().describe(\"Numeric app ID\"),\n auth_type: z.string().optional().describe(\"Authentication type\"),\n actions: z\n .array(ActionSchema)\n .optional()\n .describe(\"Array of actions for this implementation\"),\n is_deprecated: z\n .boolean()\n .optional()\n .describe(\"Whether the implementation is deprecated\"),\n is_private_only: z\n .boolean()\n .optional()\n .describe(\"Whether the implementation is private only\"),\n is_invite_only: z\n .boolean()\n .optional()\n .describe(\"Whether the implementation is invite only\"),\n is_beta: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether the implementation is in beta\"),\n is_premium: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether the implementation requires premium\"),\n name: z.string().optional().describe(\"Name of the implementation\"),\n slug: z.string().optional().describe(\"URL-friendly slug\"),\n});\n\nexport type ImplementationWithActions = z.infer<\n typeof ImplementationWithActionsSchema\n>;\n\n/**\n * Response schema for the /api/v4/implementations/ endpoint\n */\nexport const ImplementationsWithActionsResponseSchema = z.object({\n count: z.number().describe(\"Total number of results\"),\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\"URL for the next page of results\"),\n previous: z\n .string()\n .nullable()\n .optional()\n .describe(\"URL for the previous page of results\"),\n results: z\n .array(ImplementationWithActionsSchema)\n .describe(\"Array of implementations with their actions\"),\n});\n\nexport type ImplementationsWithActionsResponse = z.infer<\n typeof ImplementationsWithActionsResponseSchema\n>;\n"],"mappings":";AAAA,SAAS,SAAS;AAKX,IAAM,mBAAmB,EAAE,KAAK;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAOM,IAAM,eAAe,EAAE,OAAO;AAAA,EACnC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,kCAAkC;AAAA,EACrE,MAAM,iBAAiB,SAAS,oBAAoB;AAAA,EACpD,KAAK,EAAE,OAAO,EAAE,SAAS,sCAAsC;AAAA,EAC/D,MAAM,EAAE,OAAO,EAAE,SAAS,4BAA4B;AAAA,EACtD,aAAa,EAAE,OAAO,EAAE,SAAS,qCAAqC;AAAA,EACtE,cAAc,EACX,QAAQ,EACR,SAAS,EACT,SAAS,4CAA4C;AAAA,EACxD,WAAW,EACR,QAAQ,EACR,SAAS,EACT,SAAS,6CAA6C;AAAA,EACzD,cAAc,EACX,OAAO,EACP,SAAS,EACT,SAAS,8CAA8C;AAC5D,CAAC;AAiBM,IAAM,mBAAmB,EAC7B,OAAO;AAAA,EACN,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,kCAAkC;AAAA,EACrE,KAAK,EAAE,OAAO,EAAE,SAAS,sCAAsC;AAAA,EAC/D,aAAa,EAAE,OAAO,EAAE,SAAS,qCAAqC;AAAA,EACtE,cAAc,EACX,QAAQ,EACR,SAAS,EACT,SAAS,4CAA4C;AAAA,EACxD,WAAW,EACR,QAAQ,EACR,SAAS,EACT,SAAS,6CAA6C;AAAA,EACzD,SAAS,EACN,OAAO,EACP,SAAS,4DAA4D;AAAA,EACxE,aAAa,EACV,OAAO,EACP,SAAS,EACT,SA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AA6C;AAC3D,CAAC;","names":[]}
|
|
@@ -23,7 +23,9 @@ __export(authentications_exports, {
|
|
|
23
23
|
AuthenticationItemSchema: () => AuthenticationItemSchema,
|
|
24
24
|
AuthenticationSchema: () => AuthenticationSchema,
|
|
25
25
|
AuthenticationsResponseSchema: () => AuthenticationsResponseSchema,
|
|
26
|
-
GetAuthenticationParamSchema: () => GetAuthenticationParamSchema
|
|
26
|
+
GetAuthenticationParamSchema: () => GetAuthenticationParamSchema,
|
|
27
|
+
ListAuthenticationsQuerySchema: () => ListAuthenticationsQuerySchema,
|
|
28
|
+
ListAuthenticationsResponseSchema: () => ListAuthenticationsResponseSchema
|
|
27
29
|
});
|
|
28
30
|
module.exports = __toCommonJS(authentications_exports);
|
|
29
31
|
var import_zod = require("zod");
|
|
@@ -75,13 +77,44 @@ var AuthenticationsResponseSchema = import_zod.z.object({
|
|
|
75
77
|
results: import_zod.z.array(AuthenticationSchema).describe("Array of authentication items")
|
|
76
78
|
});
|
|
77
79
|
var GetAuthenticationParamSchema = import_zod.z.object({
|
|
78
|
-
authenticationId: import_zod.z.
|
|
80
|
+
authenticationId: import_zod.z.string().describe("Authentication ID to retrieve")
|
|
79
81
|
}).describe("Get a specific authentication by ID");
|
|
82
|
+
var ListAuthenticationsQuerySchema = import_zod.z.object({
|
|
83
|
+
appKey: import_zod.z.string().optional().describe(
|
|
84
|
+
"Filter authentications by app key (e.g., 'SlackCLIAPI' or slug like 'github')"
|
|
85
|
+
),
|
|
86
|
+
authenticationIds: import_zod.z.string().optional().describe("Comma-separated list of authentication IDs to filter by"),
|
|
87
|
+
search: import_zod.z.string().optional().describe("Search term to filter authentications by title"),
|
|
88
|
+
title: import_zod.z.string().optional().describe(
|
|
89
|
+
"Filter authentications by exact title match (searches first, then filters locally)"
|
|
90
|
+
),
|
|
91
|
+
accountId: import_zod.z.string().optional().describe("Filter authentications by account ID"),
|
|
92
|
+
owner: import_zod.z.string().optional().describe(
|
|
93
|
+
"Filter by owner - 'me' for your own authentications or a specific user ID"
|
|
94
|
+
),
|
|
95
|
+
pageSize: import_zod.z.coerce.number().int().min(1).max(100).default(50).describe("Number of authentications per page (1-100)"),
|
|
96
|
+
offset: import_zod.z.string().optional().describe("Pagination offset from previous response")
|
|
97
|
+
}).describe("Query parameters for listing authentications");
|
|
98
|
+
var ListAuthenticationsResponseSchema = import_zod.z.object({
|
|
99
|
+
data: import_zod.z.array(AuthenticationItemSchema).describe("Array of authentication items"),
|
|
100
|
+
links: import_zod.z.object({
|
|
101
|
+
next: import_zod.z.string().nullable().optional().describe(
|
|
102
|
+
"Fully qualified URL for the next page of results (if available), e.g. https://sdkapi.zapier.com/api/v0/authentications?offset=100&pageSize=50"
|
|
103
|
+
)
|
|
104
|
+
}).describe("Pagination links for navigating through results"),
|
|
105
|
+
meta: import_zod.z.object({
|
|
106
|
+
count: import_zod.z.number().describe("Total number of items"),
|
|
107
|
+
limit: import_zod.z.number().describe("Number of items per page"),
|
|
108
|
+
offset: import_zod.z.number().describe("Offset of the current page")
|
|
109
|
+
}).describe("Metadata for the paginated result set")
|
|
110
|
+
}).describe("Response schema for listing authentications");
|
|
80
111
|
// Annotate the CommonJS export names for ESM import in node:
|
|
81
112
|
0 && (module.exports = {
|
|
82
113
|
AuthenticationItemSchema,
|
|
83
114
|
AuthenticationSchema,
|
|
84
115
|
AuthenticationsResponseSchema,
|
|
85
|
-
GetAuthenticationParamSchema
|
|
116
|
+
GetAuthenticationParamSchema,
|
|
117
|
+
ListAuthenticationsQuerySchema,
|
|
118
|
+
ListAuthenticationsResponseSchema
|
|
86
119
|
});
|
|
87
120
|
//# sourceMappingURL=authentications.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/v0/schemas/authentications.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Base Authentication schema matching the API response\n */\nexport const AuthenticationSchema = z.object({\n id: z.number().describe(\"Unique identifier for the authentication\"),\n date: z.string().describe(\"Date created\"),\n lastchanged: z.string().optional().describe(\"Date last changed\"),\n account_id: z\n .number()\n .describe(\"Account ID associated with this authentication\"),\n customuser_id: z\n .number()\n .optional()\n .describe(\"Custom user ID (if applicable)\"),\n selected_api: z.string().describe(\"Selected API key (internal identifier)\"),\n destination_selected_api: z\n .string()\n .nullable()\n .optional()\n .describe(\"Destination API key (if applicable)\"),\n is_invite_only: z\n .boolean()\n .describe(\"Whether the authentication is invite-only\"),\n is_private: z.boolean().describe(\"Whether the authentication is private\"),\n shared_with_all: z\n .boolean()\n .describe(\"Whether the authentication is shared with all users\"),\n is_stale: z.string().optional().describe(\"Stale status string\"),\n is_shared: z.string().optional().describe(\"Shared status string\"),\n marked_stale_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when marked stale\"),\n label: z\n .string()\n .nullable()\n .optional()\n .describe(\"User label for the authentication\"),\n identifier: z.string().nullable().optional().describe(\"Identifier\"),\n title: z\n .string()\n .nullable()\n .optional()\n .describe(\"Title of the authentication\"),\n url: z.string().optional().describe(\"URL to the authentication resource\"),\n groups: z\n .array(\n z\n .record(z.string(), z.unknown())\n .describe(\"Groups associated with the authentication\"),\n )\n .optional()\n .describe(\"Array of groups associated with the authentication\"),\n members: z\n .string()\n .optional()\n .describe(\"Members associated with the authentication\"),\n permissions: z\n .record(z.string(), z.boolean())\n .optional()\n .describe(\"Permissions for the authentication\"),\n});\n\n/**\n * Normalized authentication item returned by getAuthentication handler\n *\n * Transforms API response fields:\n * - selected_api → implementation_id\n * - customuser_id → profile_id\n * - is_stale → is_expired (preserved as is_stale too)\n * - marked_stale_at → expired_at (preserved as marked_stale_at too)\n *\n * Adds computed fields:\n * - app_key: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"SlackCLIAPI\")\n * - app_version: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"1.0.0\")\n */\nexport const AuthenticationItemSchema = AuthenticationSchema.omit({\n selected_api: true,\n customuser_id: true,\n}).extend({\n // Override numeric IDs with string versions (converted by normalizeAuthenticationItem)\n id: z.string().describe(\"Unique identifier for the authentication\"),\n account_id: z\n .string()\n .describe(\"Account ID associated with this authentication\"),\n\n // Renamed fields\n implementation_id: z\n .string()\n .optional()\n .describe(\"Implementation ID (was selected_api)\"),\n profile_id: z.string().optional().describe(\"Profile ID (was customuser_id)\"),\n\n // Mapped fields (originals preserved in ...restOfAuth)\n is_expired: z\n .string()\n .optional()\n .describe(\"Whether the authentication is expired (mapped from is_stale)\"),\n expired_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when authentication expired (mapped from marked_stale_at)\"),\n\n // Computed fields\n app_key: z\n .string()\n .optional()\n .describe(\"App Key extracted from implementation_id\"),\n app_version: z\n .string()\n .optional()\n .describe(\"App Version extracted from implementation_id\"),\n});\n\nexport const AuthenticationsResponseSchema = z.object({\n count: z.number().describe(\"Total number of items\"),\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\"Cursor for the next page of results (if available)\"),\n previous: z\n .string()\n .nullable()\n .optional()\n .describe(\"Cursor for the previous page of results (if available)\"),\n results: z\n .array(AuthenticationSchema)\n .describe(\"Array of authentication items\"),\n});\n\nexport type Authentication = z.infer<typeof AuthenticationSchema>;\nexport type AuthenticationItem = z.infer<typeof AuthenticationItemSchema>;\nexport type AuthenticationsResponse = z.infer<\n typeof AuthenticationsResponseSchema\n>;\n\n/**\n * Path parameters schema for getAuthentication endpoint.\n */\nexport const GetAuthenticationParamSchema = z\n .object({\n authenticationId: z\n .number()\n .int()\n .positive()\n .describe(\"Authentication ID to retrieve\"),\n })\n .describe(\"Get a specific authentication by ID\");\n\nexport type GetAuthenticationParam = z.infer<\n typeof GetAuthenticationParamSchema\n>;\n\n/**\n * Response type for getAuthentication endpoint.\n * Wraps AuthenticationItem in the standard API response envelope.\n */\nexport type GetAuthenticationResponse = { data: AuthenticationItem };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAKX,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ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Base Authentication schema matching the API response\n */\nexport const AuthenticationSchema = z.object({\n id: z.number().describe(\"Unique identifier for the authentication\"),\n date: z.string().describe(\"Date created\"),\n lastchanged: z.string().optional().describe(\"Date last changed\"),\n account_id: z\n .number()\n .describe(\"Account ID associated with this authentication\"),\n customuser_id: z\n .number()\n .optional()\n .describe(\"Custom user ID (if applicable)\"),\n selected_api: z.string().describe(\"Selected API key (internal identifier)\"),\n destination_selected_api: z\n .string()\n .nullable()\n .optional()\n .describe(\"Destination API key (if applicable)\"),\n is_invite_only: z\n .boolean()\n .describe(\"Whether the authentication is invite-only\"),\n is_private: z.boolean().describe(\"Whether the authentication is private\"),\n shared_with_all: z\n .boolean()\n .describe(\"Whether the authentication is shared with all users\"),\n is_stale: z.string().optional().describe(\"Stale status string\"),\n is_shared: z.string().optional().describe(\"Shared status string\"),\n marked_stale_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when marked stale\"),\n label: z\n .string()\n .nullable()\n .optional()\n .describe(\"User label for the authentication\"),\n identifier: z.string().nullable().optional().describe(\"Identifier\"),\n title: z\n .string()\n .nullable()\n .optional()\n .describe(\"Title of the authentication\"),\n url: z.string().optional().describe(\"URL to the authentication resource\"),\n groups: z\n .array(\n z\n .record(z.string(), z.unknown())\n .describe(\"Groups associated with the authentication\"),\n )\n .optional()\n .describe(\"Array of groups associated with the authentication\"),\n members: z\n .string()\n .optional()\n .describe(\"Members associated with the authentication\"),\n permissions: z\n .record(z.string(), z.boolean())\n .optional()\n .describe(\"Permissions for the authentication\"),\n});\n\n/**\n * Normalized authentication item returned by getAuthentication handler\n *\n * Transforms API response fields:\n * - selected_api → implementation_id\n * - customuser_id → profile_id\n * - is_stale → is_expired (preserved as is_stale too)\n * - marked_stale_at → expired_at (preserved as marked_stale_at too)\n *\n * Adds computed fields:\n * - app_key: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"SlackCLIAPI\")\n * - app_version: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"1.0.0\")\n */\nexport const AuthenticationItemSchema = AuthenticationSchema.omit({\n selected_api: true,\n customuser_id: true,\n}).extend({\n // Override numeric IDs with string versions (converted by normalizeAuthenticationItem)\n id: z.string().describe(\"Unique identifier for the authentication\"),\n account_id: z\n .string()\n .describe(\"Account ID associated with this authentication\"),\n\n // Renamed fields\n implementation_id: z\n .string()\n .optional()\n .describe(\"Implementation ID (was selected_api)\"),\n profile_id: z.string().optional().describe(\"Profile ID (was customuser_id)\"),\n\n // Mapped fields (originals preserved in ...restOfAuth)\n is_expired: z\n .string()\n .optional()\n .describe(\"Whether the authentication is expired (mapped from is_stale)\"),\n expired_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when authentication expired (mapped from marked_stale_at)\"),\n\n // Computed fields\n app_key: z\n .string()\n .optional()\n .describe(\"App Key extracted from implementation_id\"),\n app_version: z\n .string()\n .optional()\n .describe(\"App Version extracted from implementation_id\"),\n});\n\nexport const AuthenticationsResponseSchema = z.object({\n count: z.number().describe(\"Total number of items\"),\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\"Cursor for the next page of results (if available)\"),\n previous: z\n .string()\n .nullable()\n .optional()\n .describe(\"Cursor for the previous page of results (if available)\"),\n results: z\n .array(AuthenticationSchema)\n .describe(\"Array of authentication items\"),\n});\n\nexport type Authentication = z.infer<typeof AuthenticationSchema>;\nexport type AuthenticationItem = z.infer<typeof AuthenticationItemSchema>;\nexport type AuthenticationsResponse = z.infer<\n typeof AuthenticationsResponseSchema\n>;\n\n/**\n * Path parameters schema for getAuthentication endpoint.\n */\nexport const GetAuthenticationParamSchema = z\n .object({\n authenticationId: z.string().describe(\"Authentication ID to retrieve\"),\n })\n .describe(\"Get a specific authentication by ID\");\n\nexport type GetAuthenticationParam = z.infer<\n typeof GetAuthenticationParamSchema\n>;\n\n/**\n * Response type for getAuthentication endpoint.\n * Wraps AuthenticationItem in the standard API response envelope.\n */\nexport type GetAuthenticationResponse = { data: AuthenticationItem };\n\n/**\n * Query parameters for listing authentications\n */\nexport const ListAuthenticationsQuerySchema = z\n .object({\n appKey: z\n .string()\n .optional()\n .describe(\n \"Filter authentications by app key (e.g., 'SlackCLIAPI' or slug like 'github')\",\n ),\n authenticationIds: z\n .string()\n .optional()\n .describe(\"Comma-separated list of authentication IDs to filter by\"),\n search: z\n .string()\n .optional()\n .describe(\"Search term to filter authentications by title\"),\n title: z\n .string()\n .optional()\n .describe(\n \"Filter authentications by exact title match (searches first, then filters locally)\",\n ),\n accountId: z\n .string()\n .optional()\n .describe(\"Filter authentications by account ID\"),\n owner: z\n .string()\n .optional()\n .describe(\n \"Filter by owner - 'me' for your own authentications or a specific user ID\",\n ),\n pageSize: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .default(50)\n .describe(\"Number of authentications per page (1-100)\"),\n offset: z\n .string()\n .optional()\n .describe(\"Pagination offset from previous response\"),\n })\n .describe(\"Query parameters for listing authentications\");\n\n/**\n * Response schema for listAuthentications\n */\nexport const ListAuthenticationsResponseSchema = z\n .object({\n data: z\n .array(AuthenticationItemSchema)\n .describe(\"Array of authentication items\"),\n links: z\n .object({\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\n \"Fully qualified URL for the next page of results (if available), e.g. https://sdkapi.zapier.com/api/v0/authentications?offset=100&pageSize=50\",\n ),\n })\n .describe(\"Pagination links for navigating through results\"),\n meta: z\n .object({\n count: z.number().describe(\"Total number of items\"),\n limit: z.number().describe(\"Number of items per page\"),\n offset: z.number().describe(\"Offset of the current page\"),\n })\n .describe(\"Metadata for the paginated result set\"),\n })\n .describe(\"Response schema for listing authentications\");\n\n/**\n * TypeScript types for request and response\n */\nexport type ListAuthenticationsQuery = z.infer<\n typeof ListAuthenticationsQuerySchema\n>;\nexport type ListAuthenticationsResponse = z.infer<\n typeof ListAuthenticationsResponseSchema\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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C3C,OAAO;AAAA,EACN,QAAQ,aACL,OAAO,EACP,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,mBAAmB,aAChB,OAAO,EACP,SAAS,EACT,SAAS,yDAAyD;AAAA,EACrE,QAAQ,aACL,OAAO,EACP,SAAS,EACT,SAAS,gDAAgD;AAAA,EAC5D,OAAO,aACJ,OAAO,EACP,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,WAAW,aACR,OAAO,EACP,SAAS,EACT,SAAS,sCAAsC;AAAA,EAClD,OAAO,aACJ,OAAO,EACP,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,UAAU,aAAE,OACT,OAAO,EACP,IAAI,EACJ,IAAI,CAAC,EACL,IAAI,GAAG,EACP,QAAQ,EAAE,EACV,SAAS,4CAA4C;AAAA,EACxD,QAAQ,aACL,OAAO,EACP,SAAS,EACT,SAAS,0CAA0C;AACxD,CAAC,EACA,SAAS,8CAA8C;AAKnD,IAAM,oCAAoC,aAC9C,OAAO;AAAA,EACN,MAAM,aACH,MAAM,wBAAwB,EAC9B,SAAS,+BAA+B;AAAA,EAC3C,OAAO,aACJ,OAAO;AAAA,IACN,MAAM,aACH,OAAO,EACP,SAAS,EACT,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,EACJ,CAAC,EACA,SAAS,iDAAiD;AAAA,EAC7D,MAAM,aACH,OAAO;AAAA,IACN,OAAO,aAAE,OAAO,EAAE,SAAS,uBAAuB;AAAA,IAClD,OAAO,aAAE,OAAO,EAAE,SAAS,0BAA0B;AAAA,IACrD,QAAQ,aAAE,OAAO,EAAE,SAAS,4BAA4B;AAAA,EAC1D,CAAC,EACA,SAAS,uCAAuC;AACrD,CAAC,EACA,SAAS,6CAA6C;","names":[]}
|
|
@@ -98,7 +98,7 @@ type AuthenticationsResponse = z.infer<typeof AuthenticationsResponseSchema>;
|
|
|
98
98
|
* Path parameters schema for getAuthentication endpoint.
|
|
99
99
|
*/
|
|
100
100
|
declare const GetAuthenticationParamSchema: z.ZodObject<{
|
|
101
|
-
authenticationId: z.
|
|
101
|
+
authenticationId: z.ZodString;
|
|
102
102
|
}, z.core.$strip>;
|
|
103
103
|
type GetAuthenticationParam = z.infer<typeof GetAuthenticationParamSchema>;
|
|
104
104
|
/**
|
|
@@ -108,5 +108,62 @@ type GetAuthenticationParam = z.infer<typeof GetAuthenticationParamSchema>;
|
|
|
108
108
|
type GetAuthenticationResponse = {
|
|
109
109
|
data: AuthenticationItem;
|
|
110
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* Query parameters for listing authentications
|
|
113
|
+
*/
|
|
114
|
+
declare const ListAuthenticationsQuerySchema: z.ZodObject<{
|
|
115
|
+
appKey: z.ZodOptional<z.ZodString>;
|
|
116
|
+
authenticationIds: z.ZodOptional<z.ZodString>;
|
|
117
|
+
search: z.ZodOptional<z.ZodString>;
|
|
118
|
+
title: z.ZodOptional<z.ZodString>;
|
|
119
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
121
|
+
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
122
|
+
offset: z.ZodOptional<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
/**
|
|
125
|
+
* Response schema for listAuthentications
|
|
126
|
+
*/
|
|
127
|
+
declare const ListAuthenticationsResponseSchema: z.ZodObject<{
|
|
128
|
+
data: z.ZodArray<z.ZodObject<{
|
|
129
|
+
date: z.ZodString;
|
|
130
|
+
lastchanged: z.ZodOptional<z.ZodString>;
|
|
131
|
+
destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
|
+
is_invite_only: z.ZodBoolean;
|
|
133
|
+
is_private: z.ZodBoolean;
|
|
134
|
+
shared_with_all: z.ZodBoolean;
|
|
135
|
+
is_stale: z.ZodOptional<z.ZodString>;
|
|
136
|
+
is_shared: z.ZodOptional<z.ZodString>;
|
|
137
|
+
marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
|
+
identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
url: z.ZodOptional<z.ZodString>;
|
|
142
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
143
|
+
members: z.ZodOptional<z.ZodString>;
|
|
144
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
145
|
+
id: z.ZodString;
|
|
146
|
+
account_id: z.ZodString;
|
|
147
|
+
implementation_id: z.ZodOptional<z.ZodString>;
|
|
148
|
+
profile_id: z.ZodOptional<z.ZodString>;
|
|
149
|
+
is_expired: z.ZodOptional<z.ZodString>;
|
|
150
|
+
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
151
|
+
app_key: z.ZodOptional<z.ZodString>;
|
|
152
|
+
app_version: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
links: z.ZodObject<{
|
|
155
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
meta: z.ZodObject<{
|
|
158
|
+
count: z.ZodNumber;
|
|
159
|
+
limit: z.ZodNumber;
|
|
160
|
+
offset: z.ZodNumber;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
/**
|
|
164
|
+
* TypeScript types for request and response
|
|
165
|
+
*/
|
|
166
|
+
type ListAuthenticationsQuery = z.infer<typeof ListAuthenticationsQuerySchema>;
|
|
167
|
+
type ListAuthenticationsResponse = z.infer<typeof ListAuthenticationsResponseSchema>;
|
|
111
168
|
|
|
112
|
-
export { type Authentication, type AuthenticationItem, AuthenticationItemSchema, AuthenticationSchema, type AuthenticationsResponse, AuthenticationsResponseSchema, type GetAuthenticationParam, GetAuthenticationParamSchema, type GetAuthenticationResponse };
|
|
169
|
+
export { type Authentication, type AuthenticationItem, AuthenticationItemSchema, AuthenticationSchema, type AuthenticationsResponse, AuthenticationsResponseSchema, type GetAuthenticationParam, GetAuthenticationParamSchema, type GetAuthenticationResponse, type ListAuthenticationsQuery, ListAuthenticationsQuerySchema, type ListAuthenticationsResponse, ListAuthenticationsResponseSchema };
|
|
@@ -98,7 +98,7 @@ type AuthenticationsResponse = z.infer<typeof AuthenticationsResponseSchema>;
|
|
|
98
98
|
* Path parameters schema for getAuthentication endpoint.
|
|
99
99
|
*/
|
|
100
100
|
declare const GetAuthenticationParamSchema: z.ZodObject<{
|
|
101
|
-
authenticationId: z.
|
|
101
|
+
authenticationId: z.ZodString;
|
|
102
102
|
}, z.core.$strip>;
|
|
103
103
|
type GetAuthenticationParam = z.infer<typeof GetAuthenticationParamSchema>;
|
|
104
104
|
/**
|
|
@@ -108,5 +108,62 @@ type GetAuthenticationParam = z.infer<typeof GetAuthenticationParamSchema>;
|
|
|
108
108
|
type GetAuthenticationResponse = {
|
|
109
109
|
data: AuthenticationItem;
|
|
110
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* Query parameters for listing authentications
|
|
113
|
+
*/
|
|
114
|
+
declare const ListAuthenticationsQuerySchema: z.ZodObject<{
|
|
115
|
+
appKey: z.ZodOptional<z.ZodString>;
|
|
116
|
+
authenticationIds: z.ZodOptional<z.ZodString>;
|
|
117
|
+
search: z.ZodOptional<z.ZodString>;
|
|
118
|
+
title: z.ZodOptional<z.ZodString>;
|
|
119
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
121
|
+
pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
122
|
+
offset: z.ZodOptional<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
/**
|
|
125
|
+
* Response schema for listAuthentications
|
|
126
|
+
*/
|
|
127
|
+
declare const ListAuthenticationsResponseSchema: z.ZodObject<{
|
|
128
|
+
data: z.ZodArray<z.ZodObject<{
|
|
129
|
+
date: z.ZodString;
|
|
130
|
+
lastchanged: z.ZodOptional<z.ZodString>;
|
|
131
|
+
destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
|
+
is_invite_only: z.ZodBoolean;
|
|
133
|
+
is_private: z.ZodBoolean;
|
|
134
|
+
shared_with_all: z.ZodBoolean;
|
|
135
|
+
is_stale: z.ZodOptional<z.ZodString>;
|
|
136
|
+
is_shared: z.ZodOptional<z.ZodString>;
|
|
137
|
+
marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
|
+
identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
url: z.ZodOptional<z.ZodString>;
|
|
142
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
143
|
+
members: z.ZodOptional<z.ZodString>;
|
|
144
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
145
|
+
id: z.ZodString;
|
|
146
|
+
account_id: z.ZodString;
|
|
147
|
+
implementation_id: z.ZodOptional<z.ZodString>;
|
|
148
|
+
profile_id: z.ZodOptional<z.ZodString>;
|
|
149
|
+
is_expired: z.ZodOptional<z.ZodString>;
|
|
150
|
+
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
151
|
+
app_key: z.ZodOptional<z.ZodString>;
|
|
152
|
+
app_version: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
links: z.ZodObject<{
|
|
155
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
meta: z.ZodObject<{
|
|
158
|
+
count: z.ZodNumber;
|
|
159
|
+
limit: z.ZodNumber;
|
|
160
|
+
offset: z.ZodNumber;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
/**
|
|
164
|
+
* TypeScript types for request and response
|
|
165
|
+
*/
|
|
166
|
+
type ListAuthenticationsQuery = z.infer<typeof ListAuthenticationsQuerySchema>;
|
|
167
|
+
type ListAuthenticationsResponse = z.infer<typeof ListAuthenticationsResponseSchema>;
|
|
111
168
|
|
|
112
|
-
export { type Authentication, type AuthenticationItem, AuthenticationItemSchema, AuthenticationSchema, type AuthenticationsResponse, AuthenticationsResponseSchema, type GetAuthenticationParam, GetAuthenticationParamSchema, type GetAuthenticationResponse };
|
|
169
|
+
export { type Authentication, type AuthenticationItem, AuthenticationItemSchema, AuthenticationSchema, type AuthenticationsResponse, AuthenticationsResponseSchema, type GetAuthenticationParam, GetAuthenticationParamSchema, type GetAuthenticationResponse, type ListAuthenticationsQuery, ListAuthenticationsQuerySchema, type ListAuthenticationsResponse, ListAuthenticationsResponseSchema };
|
|
@@ -48,12 +48,43 @@ var AuthenticationsResponseSchema = z.object({
|
|
|
48
48
|
results: z.array(AuthenticationSchema).describe("Array of authentication items")
|
|
49
49
|
});
|
|
50
50
|
var GetAuthenticationParamSchema = z.object({
|
|
51
|
-
authenticationId: z.
|
|
51
|
+
authenticationId: z.string().describe("Authentication ID to retrieve")
|
|
52
52
|
}).describe("Get a specific authentication by ID");
|
|
53
|
+
var ListAuthenticationsQuerySchema = z.object({
|
|
54
|
+
appKey: z.string().optional().describe(
|
|
55
|
+
"Filter authentications by app key (e.g., 'SlackCLIAPI' or slug like 'github')"
|
|
56
|
+
),
|
|
57
|
+
authenticationIds: z.string().optional().describe("Comma-separated list of authentication IDs to filter by"),
|
|
58
|
+
search: z.string().optional().describe("Search term to filter authentications by title"),
|
|
59
|
+
title: z.string().optional().describe(
|
|
60
|
+
"Filter authentications by exact title match (searches first, then filters locally)"
|
|
61
|
+
),
|
|
62
|
+
accountId: z.string().optional().describe("Filter authentications by account ID"),
|
|
63
|
+
owner: z.string().optional().describe(
|
|
64
|
+
"Filter by owner - 'me' for your own authentications or a specific user ID"
|
|
65
|
+
),
|
|
66
|
+
pageSize: z.coerce.number().int().min(1).max(100).default(50).describe("Number of authentications per page (1-100)"),
|
|
67
|
+
offset: z.string().optional().describe("Pagination offset from previous response")
|
|
68
|
+
}).describe("Query parameters for listing authentications");
|
|
69
|
+
var ListAuthenticationsResponseSchema = z.object({
|
|
70
|
+
data: z.array(AuthenticationItemSchema).describe("Array of authentication items"),
|
|
71
|
+
links: z.object({
|
|
72
|
+
next: z.string().nullable().optional().describe(
|
|
73
|
+
"Fully qualified URL for the next page of results (if available), e.g. https://sdkapi.zapier.com/api/v0/authentications?offset=100&pageSize=50"
|
|
74
|
+
)
|
|
75
|
+
}).describe("Pagination links for navigating through results"),
|
|
76
|
+
meta: z.object({
|
|
77
|
+
count: z.number().describe("Total number of items"),
|
|
78
|
+
limit: z.number().describe("Number of items per page"),
|
|
79
|
+
offset: z.number().describe("Offset of the current page")
|
|
80
|
+
}).describe("Metadata for the paginated result set")
|
|
81
|
+
}).describe("Response schema for listing authentications");
|
|
53
82
|
export {
|
|
54
83
|
AuthenticationItemSchema,
|
|
55
84
|
AuthenticationSchema,
|
|
56
85
|
AuthenticationsResponseSchema,
|
|
57
|
-
GetAuthenticationParamSchema
|
|
86
|
+
GetAuthenticationParamSchema,
|
|
87
|
+
ListAuthenticationsQuerySchema,
|
|
88
|
+
ListAuthenticationsResponseSchema
|
|
58
89
|
};
|
|
59
90
|
//# sourceMappingURL=authentications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/v0/schemas/authentications.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Base Authentication schema matching the API response\n */\nexport const AuthenticationSchema = z.object({\n id: z.number().describe(\"Unique identifier for the authentication\"),\n date: z.string().describe(\"Date created\"),\n lastchanged: z.string().optional().describe(\"Date last changed\"),\n account_id: z\n .number()\n .describe(\"Account ID associated with this authentication\"),\n customuser_id: z\n .number()\n .optional()\n .describe(\"Custom user ID (if applicable)\"),\n selected_api: z.string().describe(\"Selected API key (internal identifier)\"),\n destination_selected_api: z\n .string()\n .nullable()\n .optional()\n .describe(\"Destination API key (if applicable)\"),\n is_invite_only: z\n .boolean()\n .describe(\"Whether the authentication is invite-only\"),\n is_private: z.boolean().describe(\"Whether the authentication is private\"),\n shared_with_all: z\n .boolean()\n .describe(\"Whether the authentication is shared with all users\"),\n is_stale: z.string().optional().describe(\"Stale status string\"),\n is_shared: z.string().optional().describe(\"Shared status string\"),\n marked_stale_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when marked stale\"),\n label: z\n .string()\n .nullable()\n .optional()\n .describe(\"User label for the authentication\"),\n identifier: z.string().nullable().optional().describe(\"Identifier\"),\n title: z\n .string()\n .nullable()\n .optional()\n .describe(\"Title of the authentication\"),\n url: z.string().optional().describe(\"URL to the authentication resource\"),\n groups: z\n .array(\n z\n .record(z.string(), z.unknown())\n .describe(\"Groups associated with the authentication\"),\n )\n .optional()\n .describe(\"Array of groups associated with the authentication\"),\n members: z\n .string()\n .optional()\n .describe(\"Members associated with the authentication\"),\n permissions: z\n .record(z.string(), z.boolean())\n .optional()\n .describe(\"Permissions for the authentication\"),\n});\n\n/**\n * Normalized authentication item returned by getAuthentication handler\n *\n * Transforms API response fields:\n * - selected_api → implementation_id\n * - customuser_id → profile_id\n * - is_stale → is_expired (preserved as is_stale too)\n * - marked_stale_at → expired_at (preserved as marked_stale_at too)\n *\n * Adds computed fields:\n * - app_key: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"SlackCLIAPI\")\n * - app_version: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"1.0.0\")\n */\nexport const AuthenticationItemSchema = AuthenticationSchema.omit({\n selected_api: true,\n customuser_id: true,\n}).extend({\n // Override numeric IDs with string versions (converted by normalizeAuthenticationItem)\n id: z.string().describe(\"Unique identifier for the authentication\"),\n account_id: z\n .string()\n .describe(\"Account ID associated with this authentication\"),\n\n // Renamed fields\n implementation_id: z\n .string()\n .optional()\n .describe(\"Implementation ID (was selected_api)\"),\n profile_id: z.string().optional().describe(\"Profile ID (was customuser_id)\"),\n\n // Mapped fields (originals preserved in ...restOfAuth)\n is_expired: z\n .string()\n .optional()\n .describe(\"Whether the authentication is expired (mapped from is_stale)\"),\n expired_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when authentication expired (mapped from marked_stale_at)\"),\n\n // Computed fields\n app_key: z\n .string()\n .optional()\n .describe(\"App Key extracted from implementation_id\"),\n app_version: z\n .string()\n .optional()\n .describe(\"App Version extracted from implementation_id\"),\n});\n\nexport const AuthenticationsResponseSchema = z.object({\n count: z.number().describe(\"Total number of items\"),\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\"Cursor for the next page of results (if available)\"),\n previous: z\n .string()\n .nullable()\n .optional()\n .describe(\"Cursor for the previous page of results (if available)\"),\n results: z\n .array(AuthenticationSchema)\n .describe(\"Array of authentication items\"),\n});\n\nexport type Authentication = z.infer<typeof AuthenticationSchema>;\nexport type AuthenticationItem = z.infer<typeof AuthenticationItemSchema>;\nexport type AuthenticationsResponse = z.infer<\n typeof AuthenticationsResponseSchema\n>;\n\n/**\n * Path parameters schema for getAuthentication endpoint.\n */\nexport const GetAuthenticationParamSchema = z\n .object({\n authenticationId: z\n .number()\n .int()\n .positive()\n .describe(\"Authentication ID to retrieve\"),\n })\n .describe(\"Get a specific authentication by ID\");\n\nexport type GetAuthenticationParam = z.infer<\n typeof GetAuthenticationParamSchema\n>;\n\n/**\n * Response type for getAuthentication endpoint.\n * Wraps AuthenticationItem in the standard API response envelope.\n */\nexport type GetAuthenticationResponse = { data: AuthenticationItem };\n"],"mappings":";AAAA,SAAS,SAAS;AAKX,IAAM,uBAAuB,EAAE,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S,4CAA4C;AAAA,EACxD,aAAa,EACV,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,EAC9B,SAAS,EACT,SAAS,oCAAoC;AAClD,CAAC;AAeM,IAAM,2BAA2B,qBAAqB,KAAK;AAAA,EAChE,cAAc;AAAA,EACd,eAAe;AACjB,CAAC,EAAE,OAAO;AAAA;AAAA,EAER,IAAI,EAAE,OAAO,EAAE,SAAS,0CAA0C;AAAA,EAClE,YAAY,EACT,OAAO,EACP,SAAS,gDAAgD;AAAA;AAAA,EAG5D,mBAAmB,EAChB,OAAO,EACP,SAAS,EACT,SAAS,sCAAsC;AAAA,EAClD,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,gCAAgC;AAAA;AAAA,EAG3E,YAAY,EACT,OAAO,EACP,SAAS,EACT,SAAS,8DAA8D;AAAA,EAC1E,YAAY,EACT,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,gEAAgE;AAAA;AAAA,EAG5E,SAAS,EACN,OAAO,EACP,SAAS,EACT,SAAS,0CAA0C;AAAA,EACtD,aAAa,EACV,OAAO,EACP,SAAS,EACT,SAAS,8CAA8C;AAC5D,CAAC;AAEM,IAAM,gCAAgC,EAAE,OAAO;AAAA,EACpD,OAAO,EAAE,OAAO,EAAE,SAAS,uBAAuB;AAAA,EAClD,MAAM,EACH,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,oDAAoD;AAAA,EAChE,UAAU,EACP,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,wDAAwD;AAAA,EACpE,SAAS,EACN,MAAM,oBAAoB,EAC1B,SAAS,+BAA+B;AAC7C,CAAC;AAWM,IAAM,+BAA+B,EACzC,OAAO;AAAA,EACN,kBAAkB,EACf,OAAO,EACP,IAAI,EACJ,SAAS,EACT,SAAS,+BAA+B;AAC7C,CAAC,EACA,SAAS,qCAAqC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/v0/schemas/authentications.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Base Authentication schema matching the API response\n */\nexport const AuthenticationSchema = z.object({\n id: z.number().describe(\"Unique identifier for the authentication\"),\n date: z.string().describe(\"Date created\"),\n lastchanged: z.string().optional().describe(\"Date last changed\"),\n account_id: z\n .number()\n .describe(\"Account ID associated with this authentication\"),\n customuser_id: z\n .number()\n .optional()\n .describe(\"Custom user ID (if applicable)\"),\n selected_api: z.string().describe(\"Selected API key (internal identifier)\"),\n destination_selected_api: z\n .string()\n .nullable()\n .optional()\n .describe(\"Destination API key (if applicable)\"),\n is_invite_only: z\n .boolean()\n .describe(\"Whether the authentication is invite-only\"),\n is_private: z.boolean().describe(\"Whether the authentication is private\"),\n shared_with_all: z\n .boolean()\n .describe(\"Whether the authentication is shared with all users\"),\n is_stale: z.string().optional().describe(\"Stale status string\"),\n is_shared: z.string().optional().describe(\"Shared status string\"),\n marked_stale_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when marked stale\"),\n label: z\n .string()\n .nullable()\n .optional()\n .describe(\"User label for the authentication\"),\n identifier: z.string().nullable().optional().describe(\"Identifier\"),\n title: z\n .string()\n .nullable()\n .optional()\n .describe(\"Title of the authentication\"),\n url: z.string().optional().describe(\"URL to the authentication resource\"),\n groups: z\n .array(\n z\n .record(z.string(), z.unknown())\n .describe(\"Groups associated with the authentication\"),\n )\n .optional()\n .describe(\"Array of groups associated with the authentication\"),\n members: z\n .string()\n .optional()\n .describe(\"Members associated with the authentication\"),\n permissions: z\n .record(z.string(), z.boolean())\n .optional()\n .describe(\"Permissions for the authentication\"),\n});\n\n/**\n * Normalized authentication item returned by getAuthentication handler\n *\n * Transforms API response fields:\n * - selected_api → implementation_id\n * - customuser_id → profile_id\n * - is_stale → is_expired (preserved as is_stale too)\n * - marked_stale_at → expired_at (preserved as marked_stale_at too)\n *\n * Adds computed fields:\n * - app_key: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"SlackCLIAPI\")\n * - app_version: Extracted from selected_api (e.g., \"SlackCLIAPI@1.0.0\" → \"1.0.0\")\n */\nexport const AuthenticationItemSchema = AuthenticationSchema.omit({\n selected_api: true,\n customuser_id: true,\n}).extend({\n // Override numeric IDs with string versions (converted by normalizeAuthenticationItem)\n id: z.string().describe(\"Unique identifier for the authentication\"),\n account_id: z\n .string()\n .describe(\"Account ID associated with this authentication\"),\n\n // Renamed fields\n implementation_id: z\n .string()\n .optional()\n .describe(\"Implementation ID (was selected_api)\"),\n profile_id: z.string().optional().describe(\"Profile ID (was customuser_id)\"),\n\n // Mapped fields (originals preserved in ...restOfAuth)\n is_expired: z\n .string()\n .optional()\n .describe(\"Whether the authentication is expired (mapped from is_stale)\"),\n expired_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when authentication expired (mapped from marked_stale_at)\"),\n\n // Computed fields\n app_key: z\n .string()\n .optional()\n .describe(\"App Key extracted from implementation_id\"),\n app_version: z\n .string()\n .optional()\n .describe(\"App Version extracted from implementation_id\"),\n});\n\nexport const AuthenticationsResponseSchema = z.object({\n count: z.number().describe(\"Total number of items\"),\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\"Cursor for the next page of results (if available)\"),\n previous: z\n .string()\n .nullable()\n .optional()\n .describe(\"Cursor for the previous page of results (if available)\"),\n results: z\n .array(AuthenticationSchema)\n .describe(\"Array of authentication items\"),\n});\n\nexport type Authentication = z.infer<typeof AuthenticationSchema>;\nexport type AuthenticationItem = z.infer<typeof AuthenticationItemSchema>;\nexport type AuthenticationsResponse = z.infer<\n typeof AuthenticationsResponseSchema\n>;\n\n/**\n * Path parameters schema for getAuthentication endpoint.\n */\nexport const GetAuthenticationParamSchema = z\n .object({\n authenticationId: z.string().describe(\"Authentication ID to retrieve\"),\n })\n .describe(\"Get a specific authentication by ID\");\n\nexport type GetAuthenticationParam = z.infer<\n typeof GetAuthenticationParamSchema\n>;\n\n/**\n * Response type for getAuthentication endpoint.\n * Wraps AuthenticationItem in the standard API response envelope.\n */\nexport type GetAuthenticationResponse = { data: AuthenticationItem };\n\n/**\n * Query parameters for listing authentications\n */\nexport const ListAuthenticationsQuerySchema = z\n .object({\n appKey: z\n .string()\n .optional()\n .describe(\n \"Filter authentications by app key (e.g., 'SlackCLIAPI' or slug like 'github')\",\n ),\n authenticationIds: z\n .string()\n .optional()\n .describe(\"Comma-separated list of authentication IDs to filter by\"),\n search: z\n .string()\n .optional()\n .describe(\"Search term to filter authentications by title\"),\n title: z\n .string()\n .optional()\n .describe(\n \"Filter authentications by exact title match (searches first, then filters locally)\",\n ),\n accountId: z\n .string()\n .optional()\n .describe(\"Filter authentications by account ID\"),\n owner: z\n .string()\n .optional()\n .describe(\n \"Filter by owner - 'me' for your own authentications or a specific user ID\",\n ),\n pageSize: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .default(50)\n .describe(\"Number of authentications per page (1-100)\"),\n offset: z\n .string()\n .optional()\n .describe(\"Pagination offset from previous response\"),\n })\n .describe(\"Query parameters for listing authentications\");\n\n/**\n * Response schema for listAuthentications\n */\nexport const ListAuthenticationsResponseSchema = z\n .object({\n data: z\n .array(AuthenticationItemSchema)\n .describe(\"Array of authentication items\"),\n links: z\n .object({\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\n \"Fully qualified URL for the next page of results (if available), e.g. https://sdkapi.zapier.com/api/v0/authentications?offset=100&pageSize=50\",\n ),\n })\n .describe(\"Pagination links for navigating through results\"),\n meta: z\n .object({\n count: z.number().describe(\"Total number of items\"),\n limit: z.number().describe(\"Number of items per page\"),\n offset: z.number().describe(\"Offset of the current page\"),\n })\n .describe(\"Metadata for the paginated result set\"),\n })\n .describe(\"Response schema for listing authentications\");\n\n/**\n * TypeScript types for request and response\n */\nexport type ListAuthenticationsQuery = z.infer<\n typeof ListAuthenticationsQuerySchema\n>;\nexport type ListAuthenticationsResponse = z.infer<\n typeof ListAuthenticationsResponseSchema\n>;\n"],"mappings":";AAAA,SAAS,SAAS;AAKX,IAAM,uBAAuB,EAAE,OAAO;AAAA,EAC3C,IAAI,EAA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