@zapier/zapier-sdk-core 0.3.0 → 0.5.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 +14 -0
- package/dist/index.cjs +162 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +124 -0
- package/dist/index.js.map +1 -0
- package/dist/v0/common/responses.cjs +139 -0
- package/dist/v0/common/responses.cjs.map +1 -0
- package/dist/v0/common/responses.d.cts +157 -0
- package/dist/v0/common/responses.d.ts +157 -0
- package/dist/v0/common/responses.js +112 -0
- package/dist/v0/common/responses.js.map +1 -0
- package/dist/v0/config/metadata.cjs +79 -0
- package/dist/v0/config/metadata.cjs.map +1 -0
- package/dist/v0/config/metadata.d.cts +70 -0
- package/dist/v0/config/metadata.d.ts +70 -0
- package/dist/v0/config/metadata.js +50 -0
- package/dist/v0/config/metadata.js.map +1 -0
- 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/apps.cjs +130 -0
- package/dist/v0/schemas/apps.cjs.map +1 -0
- package/dist/v0/schemas/apps.d.cts +139 -0
- package/dist/v0/schemas/apps.d.ts +139 -0
- package/dist/v0/schemas/apps.js +103 -0
- package/dist/v0/schemas/apps.js.map +1 -0
- package/dist/v0/schemas/authentications.cjs +87 -0
- package/dist/v0/schemas/authentications.cjs.map +1 -0
- package/dist/v0/schemas/authentications.d.cts +112 -0
- package/dist/v0/schemas/authentications.d.ts +112 -0
- package/dist/v0/schemas/authentications.js +59 -0
- package/dist/v0/schemas/authentications.js.map +1 -0
- package/dist/v0/schemas/errors.cjs +77 -0
- package/dist/v0/schemas/errors.cjs.map +1 -0
- package/dist/v0/schemas/errors.d.cts +64 -0
- package/dist/v0/schemas/errors.d.ts +64 -0
- package/dist/v0/schemas/errors.js +49 -0
- package/dist/v0/schemas/errors.js.map +1 -0
- package/dist/v0/schemas/implementations.cjs +93 -0
- package/dist/v0/schemas/implementations.cjs.map +1 -0
- package/dist/v0/schemas/implementations.d.cts +121 -0
- package/dist/v0/schemas/implementations.d.ts +121 -0
- package/dist/v0/schemas/implementations.js +67 -0
- package/dist/v0/schemas/implementations.js.map +1 -0
- package/openapi.yaml +392 -2
- package/package.json +16 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// src/v0/config/metadata.ts
|
|
2
|
+
var apiInfo = {
|
|
3
|
+
title: "Zapier SDK API",
|
|
4
|
+
version: "1.0.0",
|
|
5
|
+
contact: {
|
|
6
|
+
email: "engineering@zapier.com"
|
|
7
|
+
},
|
|
8
|
+
description: "The Zapier SDK API serves as a backend for the Zapier SDK."
|
|
9
|
+
};
|
|
10
|
+
var servers = [];
|
|
11
|
+
var tags = [
|
|
12
|
+
{
|
|
13
|
+
name: "Actions",
|
|
14
|
+
description: "Action-related routes"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "Apps",
|
|
18
|
+
description: "App-related routes"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "Authentications",
|
|
22
|
+
description: "Authentication-related routes"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "Documentation",
|
|
26
|
+
description: "Documentation-related routes"
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
var securitySchemes = {
|
|
30
|
+
userJwt: {
|
|
31
|
+
type: "apiKey",
|
|
32
|
+
in: "header",
|
|
33
|
+
name: "Authorization",
|
|
34
|
+
description: "Format should be `JWT <your-jwt>` (you must ensure that the JWT prefix is included in your requests).\\n\\nExample: `Authorization: JWT your.jwt.value.here`"
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var openApiMetadata = {
|
|
38
|
+
openapi: "3.1.0",
|
|
39
|
+
info: apiInfo,
|
|
40
|
+
servers,
|
|
41
|
+
tags
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
apiInfo,
|
|
45
|
+
openApiMetadata,
|
|
46
|
+
securitySchemes,
|
|
47
|
+
servers,
|
|
48
|
+
tags
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/v0/config/metadata.ts"],"sourcesContent":["/**\n * OpenAPI specification metadata\n *\n * This file contains all the base metadata for the OpenAPI specification\n * that was previously stored in openapi-base.yaml.\n *\n * Note on 'as const' usage:\n * - We use 'as const' on literal values that should be treated as enums\n * (e.g., \"apiKey\", \"header\", \"3.1.0\") to get precise literal types\n * - We avoid 'as const' on top-level configuration objects to prevent\n * deep readonly types that can cause compatibility issues with libraries\n * expecting mutable types (like zod-to-openapi)\n * - If you encounter readonly type errors, check whether the consuming\n * library expects mutable types and remove 'as const' accordingly\n */\n\nexport const apiInfo = {\n title: \"Zapier SDK API\",\n version: \"1.0.0\",\n contact: {\n email: \"engineering@zapier.com\",\n },\n description: \"The Zapier SDK API serves as a backend for the Zapier SDK.\",\n};\n\nexport const servers: Array<{ url: string; description: string }> = [];\n\nexport const tags = [\n {\n name: \"Actions\",\n description: \"Action-related routes\",\n },\n {\n name: \"Apps\",\n description: \"App-related routes\",\n },\n {\n name: \"Authentications\",\n description: \"Authentication-related routes\",\n },\n {\n name: \"Documentation\",\n description: \"Documentation-related routes\",\n },\n];\n\n/**\n * Security schemes for OpenAPI specification\n *\n * Note: 'as const' is used on enum-like literal values (\"apiKey\", \"header\")\n * to ensure TypeScript treats them as literal types rather than generic strings.\n * This provides better type safety when the OpenAPI generator validates these values.\n */\nexport const securitySchemes = {\n userJwt: {\n type: \"apiKey\" as const,\n in: \"header\" as const,\n name: \"Authorization\",\n description:\n \"Format should be `JWT <your-jwt>` (you must ensure that the JWT prefix \" +\n \"is included in your requests).\\\\n\\\\n\" +\n \"Example: `Authorization: JWT your.jwt.value.here`\",\n },\n} as const;\n\n/**\n * Complete OpenAPI metadata for document generation\n */\nexport const openApiMetadata = {\n openapi: \"3.1.0\" as const,\n info: apiInfo,\n servers,\n tags,\n};\n"],"mappings":";AAgBO,IAAM,UAAU;AAAA,EACrB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,aAAa;AACf;AAEO,IAAM,UAAuD,CAAC;AAE9D,IAAM,OAAO;AAAA,EAClB;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AACF;AASO,IAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,IACP,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aACE;AAAA,EAGJ;AACF;AAKO,IAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,EACT,MAAM;AAAA,EACN;AAAA,EACA;AACF;","names":[]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/v0/schemas/actions.ts
|
|
21
|
+
var actions_exports = {};
|
|
22
|
+
__export(actions_exports, {
|
|
23
|
+
ActionItemSchema: () => ActionItemSchema,
|
|
24
|
+
ActionSchema: () => ActionSchema,
|
|
25
|
+
ActionTypeSchema: () => ActionTypeSchema,
|
|
26
|
+
ImplementationWithActionsSchema: () => ImplementationWithActionsSchema,
|
|
27
|
+
ImplementationsWithActionsResponseSchema: () => ImplementationsWithActionsResponseSchema
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(actions_exports);
|
|
30
|
+
var import_zod = require("zod");
|
|
31
|
+
var ActionTypeSchema = import_zod.z.enum([
|
|
32
|
+
"filter",
|
|
33
|
+
"read",
|
|
34
|
+
"read_bulk",
|
|
35
|
+
"run",
|
|
36
|
+
"search",
|
|
37
|
+
"search_and_write",
|
|
38
|
+
"search_or_write",
|
|
39
|
+
"write"
|
|
40
|
+
]);
|
|
41
|
+
var ActionSchema = import_zod.z.object({
|
|
42
|
+
id: import_zod.z.string().optional().describe("Unique identifier for the action"),
|
|
43
|
+
type: ActionTypeSchema.describe("The type of action"),
|
|
44
|
+
key: import_zod.z.string().describe("Unique key identifier for the action"),
|
|
45
|
+
name: import_zod.z.string().describe("Display name of the action"),
|
|
46
|
+
description: import_zod.z.string().describe("Description of what the action does"),
|
|
47
|
+
is_important: import_zod.z.boolean().optional().describe("Whether this action is marked as important"),
|
|
48
|
+
is_hidden: import_zod.z.boolean().optional().describe("Whether this action is hidden from listings"),
|
|
49
|
+
selected_api: import_zod.z.string().optional().describe("The implementation ID this action belongs to")
|
|
50
|
+
});
|
|
51
|
+
var ActionItemSchema = import_zod.z.object({
|
|
52
|
+
id: import_zod.z.string().optional().describe("Unique identifier for the action"),
|
|
53
|
+
key: import_zod.z.string().describe("Unique key identifier for the action"),
|
|
54
|
+
description: import_zod.z.string().describe("Description of what the action does"),
|
|
55
|
+
is_important: import_zod.z.boolean().optional().describe("Whether this action is marked as important"),
|
|
56
|
+
is_hidden: import_zod.z.boolean().optional().describe("Whether this action is hidden from listings"),
|
|
57
|
+
app_key: import_zod.z.string().describe("App key extracted from implementation ID (without version)"),
|
|
58
|
+
app_version: import_zod.z.string().optional().describe("App version extracted from implementation ID"),
|
|
59
|
+
action_type: ActionTypeSchema.describe("The type of action"),
|
|
60
|
+
title: import_zod.z.string().describe("Display name of the action (mapped from name)"),
|
|
61
|
+
type: import_zod.z.literal("action").describe("Type identifier for this item")
|
|
62
|
+
}).describe("Normalized action item returned by list actions endpoint");
|
|
63
|
+
var ImplementationWithActionsSchema = import_zod.z.object({
|
|
64
|
+
selected_api: import_zod.z.string().describe("The implementation ID"),
|
|
65
|
+
app_id: import_zod.z.number().optional().describe("Numeric app ID"),
|
|
66
|
+
auth_type: import_zod.z.string().optional().describe("Authentication type"),
|
|
67
|
+
actions: import_zod.z.array(ActionSchema).optional().describe("Array of actions for this implementation"),
|
|
68
|
+
is_deprecated: import_zod.z.boolean().optional().describe("Whether the implementation is deprecated"),
|
|
69
|
+
is_private_only: import_zod.z.boolean().optional().describe("Whether the implementation is private only"),
|
|
70
|
+
is_invite_only: import_zod.z.boolean().optional().describe("Whether the implementation is invite only"),
|
|
71
|
+
is_beta: import_zod.z.boolean().optional().default(false).describe("Whether the implementation is in beta"),
|
|
72
|
+
is_premium: import_zod.z.boolean().optional().default(false).describe("Whether the implementation requires premium"),
|
|
73
|
+
name: import_zod.z.string().optional().describe("Name of the implementation"),
|
|
74
|
+
slug: import_zod.z.string().optional().describe("URL-friendly slug")
|
|
75
|
+
});
|
|
76
|
+
var ImplementationsWithActionsResponseSchema = import_zod.z.object({
|
|
77
|
+
count: import_zod.z.number().describe("Total number of results"),
|
|
78
|
+
next: import_zod.z.string().nullable().optional().describe("URL for the next page of results"),
|
|
79
|
+
previous: import_zod.z.string().nullable().optional().describe("URL for the previous page of results"),
|
|
80
|
+
results: import_zod.z.array(ImplementationWithActionsSchema).describe("Array of implementations with their actions")
|
|
81
|
+
});
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
84
|
+
ActionItemSchema,
|
|
85
|
+
ActionSchema,
|
|
86
|
+
ActionTypeSchema,
|
|
87
|
+
ImplementationWithActionsSchema,
|
|
88
|
+
ImplementationsWithActionsResponseSchema
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=actions.cjs.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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAKX,IAAM,mBAAmB,aAAE,KAAK;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAOM,IAAM,eAAe,aAAE,OAAO;AAAA,EACnC,IAAI,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,kCAAkC;AAAA,EACrE,MAAM,iBAAiB,SAAS,oBAAoB;AAAA,EACpD,KAAK,aAAE,OAAO,EAAE,SAAS,sCAAsC;AAAA,EAC/D,MAAM,aAAE,OAAO,EAAE,SAAS,4BAA4B;AAAA,EACtD,aAAa,aAAE,OAAO,EAAE,SAAS,qCAAqC;AAAA,EACtE,cAAc,aACX,QAAQ,EACR,SAAS,EACT,SAAS,4CAA4C;AAAA,EACxD,WAAW,aACR,QAAQ,EACR,SAAS,EACT,SAAS,6CAA6C;AAAA,EACzD,cAAc,aACX,OAAO,EACP,SAAS,EACT,SAAS,8CAA8C;AAC5D,CAAC;AAiBM,IAAM,mBAAmB,aAC7B,OAAO;AAAA,EACN,IAAI,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,kCAAkC;AAAA,EACrE,KAAK,aAAE,OAAO,EAAE,SAAS,sCA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,IAAM,2CAA2C,aAAE,OAAO;AAAA,EAC/D,OAAO,aAAE,OAAO,EAAE,SAAS,yBAAyB;AAAA,EACpD,MAAM,aACH,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,kCAAkC;AAAA,EAC9C,UAAU,aACP,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,sCAAsC;AAAA,EAClD,SAAS,aACN,MAAM,+BAA+B,EACrC,SAAS,6CAA6C;AAC3D,CAAC;","names":[]}
|
|
@@ -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
|
+
filter: "filter";
|
|
8
|
+
read: "read";
|
|
9
|
+
read_bulk: "read_bulk";
|
|
10
|
+
run: "run";
|
|
11
|
+
search: "search";
|
|
12
|
+
search_and_write: "search_and_write";
|
|
13
|
+
search_or_write: "search_or_write";
|
|
14
|
+
write: "write";
|
|
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
|
+
filter: "filter";
|
|
24
|
+
read: "read";
|
|
25
|
+
read_bulk: "read_bulk";
|
|
26
|
+
run: "run";
|
|
27
|
+
search: "search";
|
|
28
|
+
search_and_write: "search_and_write";
|
|
29
|
+
search_or_write: "search_or_write";
|
|
30
|
+
write: "write";
|
|
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
|
+
filter: "filter";
|
|
63
|
+
read: "read";
|
|
64
|
+
read_bulk: "read_bulk";
|
|
65
|
+
run: "run";
|
|
66
|
+
search: "search";
|
|
67
|
+
search_and_write: "search_and_write";
|
|
68
|
+
search_or_write: "search_or_write";
|
|
69
|
+
write: "write";
|
|
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
|
+
filter: "filter";
|
|
86
|
+
read: "read";
|
|
87
|
+
read_bulk: "read_bulk";
|
|
88
|
+
run: "run";
|
|
89
|
+
search: "search";
|
|
90
|
+
search_and_write: "search_and_write";
|
|
91
|
+
search_or_write: "search_or_write";
|
|
92
|
+
write: "write";
|
|
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
|
+
filter: "filter";
|
|
125
|
+
read: "read";
|
|
126
|
+
read_bulk: "read_bulk";
|
|
127
|
+
run: "run";
|
|
128
|
+
search: "search";
|
|
129
|
+
search_and_write: "search_and_write";
|
|
130
|
+
search_or_write: "search_or_write";
|
|
131
|
+
write: "write";
|
|
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,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
|
+
filter: "filter";
|
|
8
|
+
read: "read";
|
|
9
|
+
read_bulk: "read_bulk";
|
|
10
|
+
run: "run";
|
|
11
|
+
search: "search";
|
|
12
|
+
search_and_write: "search_and_write";
|
|
13
|
+
search_or_write: "search_or_write";
|
|
14
|
+
write: "write";
|
|
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
|
+
filter: "filter";
|
|
24
|
+
read: "read";
|
|
25
|
+
read_bulk: "read_bulk";
|
|
26
|
+
run: "run";
|
|
27
|
+
search: "search";
|
|
28
|
+
search_and_write: "search_and_write";
|
|
29
|
+
search_or_write: "search_or_write";
|
|
30
|
+
write: "write";
|
|
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
|
+
filter: "filter";
|
|
63
|
+
read: "read";
|
|
64
|
+
read_bulk: "read_bulk";
|
|
65
|
+
run: "run";
|
|
66
|
+
search: "search";
|
|
67
|
+
search_and_write: "search_and_write";
|
|
68
|
+
search_or_write: "search_or_write";
|
|
69
|
+
write: "write";
|
|
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
|
+
filter: "filter";
|
|
86
|
+
read: "read";
|
|
87
|
+
read_bulk: "read_bulk";
|
|
88
|
+
run: "run";
|
|
89
|
+
search: "search";
|
|
90
|
+
search_and_write: "search_and_write";
|
|
91
|
+
search_or_write: "search_or_write";
|
|
92
|
+
write: "write";
|
|
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
|
+
filter: "filter";
|
|
125
|
+
read: "read";
|
|
126
|
+
read_bulk: "read_bulk";
|
|
127
|
+
run: "run";
|
|
128
|
+
search: "search";
|
|
129
|
+
search_and_write: "search_and_write";
|
|
130
|
+
search_or_write: "search_or_write";
|
|
131
|
+
write: "write";
|
|
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,OAA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