@zapier/zapier-sdk-core 0.7.2 → 0.8.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @zapier/zapier-sdk-core
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e0588b7: Add new connections endpoint.
8
+
3
9
  ## 0.7.2
4
10
 
5
11
  ### Patch Changes
@@ -47,12 +47,16 @@ var tags = [
47
47
  },
48
48
  {
49
49
  name: "Authentications",
50
- description: "Authentication-related routes"
50
+ description: "Authentication-related routes (deprecated, use Connections)"
51
51
  },
52
52
  {
53
53
  name: "Client Credentials",
54
54
  description: "Client credentials management routes"
55
55
  },
56
+ {
57
+ name: "Connections",
58
+ description: "Connection-related routes"
59
+ },
56
60
  {
57
61
  name: "Deduplication",
58
62
  description: "Deduplication-related routes"
@@ -1 +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: \"Client Credentials\",\n description: \"Client credentials management routes\",\n },\n {\n name: \"Deduplication\",\n description: \"Deduplication-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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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;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":[]}
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 (deprecated, use Connections)\",\n },\n {\n name: \"Client Credentials\",\n description: \"Client credentials management routes\",\n },\n {\n name: \"Connections\",\n description: \"Connection-related routes\",\n },\n {\n name: \"Deduplication\",\n description: \"Deduplication-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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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;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":[]}
@@ -19,12 +19,16 @@ var tags = [
19
19
  },
20
20
  {
21
21
  name: "Authentications",
22
- description: "Authentication-related routes"
22
+ description: "Authentication-related routes (deprecated, use Connections)"
23
23
  },
24
24
  {
25
25
  name: "Client Credentials",
26
26
  description: "Client credentials management routes"
27
27
  },
28
+ {
29
+ name: "Connections",
30
+ description: "Connection-related routes"
31
+ },
28
32
  {
29
33
  name: "Deduplication",
30
34
  description: "Deduplication-related routes"
@@ -1 +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: \"Client Credentials\",\n description: \"Client credentials management routes\",\n },\n {\n name: \"Deduplication\",\n description: \"Deduplication-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;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":[]}
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 (deprecated, use Connections)\",\n },\n {\n name: \"Client Credentials\",\n description: \"Client credentials management routes\",\n },\n {\n name: \"Connections\",\n description: \"Connection-related routes\",\n },\n {\n name: \"Deduplication\",\n description: \"Deduplication-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;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,123 @@
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/connections.ts
21
+ var connections_exports = {};
22
+ __export(connections_exports, {
23
+ ConnectionItemSchema: () => ConnectionItemSchema,
24
+ ConnectionSchema: () => ConnectionSchema,
25
+ ConnectionsResponseSchema: () => ConnectionsResponseSchema,
26
+ GetConnectionParamSchema: () => GetConnectionParamSchema,
27
+ ListConnectionsQuerySchema: () => ListConnectionsQuerySchema,
28
+ ListConnectionsResponseSchema: () => ListConnectionsResponseSchema
29
+ });
30
+ module.exports = __toCommonJS(connections_exports);
31
+ var import_zod = require("zod");
32
+ var ConnectionSchema = import_zod.z.object({
33
+ id: import_zod.z.number().describe("Unique identifier for the connection"),
34
+ date: import_zod.z.string().describe("Date created"),
35
+ lastchanged: import_zod.z.string().optional().describe("Date last changed"),
36
+ account_id: import_zod.z.number().describe("Account ID associated with this connection"),
37
+ customuser_id: import_zod.z.number().optional().describe("Custom user ID (if applicable)"),
38
+ selected_api: import_zod.z.string().describe("Selected API key (internal identifier)"),
39
+ destination_selected_api: import_zod.z.string().nullable().optional().describe("Destination API key (if applicable)"),
40
+ is_invite_only: import_zod.z.boolean().describe("Whether the connection is invite-only"),
41
+ is_private: import_zod.z.boolean().describe("Whether the connection is private"),
42
+ shared_with_all: import_zod.z.boolean().describe("Whether the connection is shared with all users"),
43
+ is_stale: import_zod.z.string().optional().describe("Stale status string"),
44
+ is_shared: import_zod.z.string().optional().describe("Shared status string"),
45
+ marked_stale_at: import_zod.z.string().nullable().optional().describe("Date when marked stale"),
46
+ label: import_zod.z.string().nullable().optional().describe("User label for the connection"),
47
+ identifier: import_zod.z.string().nullable().optional().describe("Identifier"),
48
+ title: import_zod.z.string().nullable().optional().describe("Title of the connection"),
49
+ url: import_zod.z.string().optional().describe("URL to the connection resource"),
50
+ groups: import_zod.z.array(
51
+ import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).describe("Groups associated with the connection")
52
+ ).optional().describe("Array of groups associated with the connection"),
53
+ members: import_zod.z.string().optional().describe("Members associated with the connection"),
54
+ permissions: import_zod.z.record(import_zod.z.string(), import_zod.z.boolean()).optional().describe("Permissions for the connection")
55
+ });
56
+ var ConnectionItemSchema = ConnectionSchema.omit({
57
+ selected_api: true,
58
+ customuser_id: true
59
+ }).extend({
60
+ // Override numeric IDs with string versions (converted by normalizeConnectionItem)
61
+ id: import_zod.z.string().describe("Unique identifier for the connection"),
62
+ account_id: import_zod.z.string().describe("Account ID associated with this connection"),
63
+ // Renamed fields
64
+ implementation_id: import_zod.z.string().optional().describe("Implementation ID (was selected_api)"),
65
+ profile_id: import_zod.z.string().optional().describe("Profile ID (was customuser_id)"),
66
+ // Mapped fields (originals preserved in ...restOfAuth)
67
+ is_expired: import_zod.z.string().optional().describe("Whether the connection is expired (mapped from is_stale)"),
68
+ expired_at: import_zod.z.string().nullable().optional().describe("Date when connection expired (mapped from marked_stale_at)"),
69
+ // Computed fields
70
+ app_key: import_zod.z.string().optional().describe("App Key extracted from implementation_id"),
71
+ app_version: import_zod.z.string().optional().describe("App Version extracted from implementation_id")
72
+ });
73
+ var ConnectionsResponseSchema = import_zod.z.object({
74
+ count: import_zod.z.number().describe("Total number of items"),
75
+ next: import_zod.z.string().nullable().optional().describe("Cursor for the next page of results (if available)"),
76
+ previous: import_zod.z.string().nullable().optional().describe("Cursor for the previous page of results (if available)"),
77
+ results: import_zod.z.array(ConnectionSchema).describe("Array of connection items")
78
+ });
79
+ var GetConnectionParamSchema = import_zod.z.object({
80
+ connectionId: import_zod.z.string().describe("Connection ID to retrieve")
81
+ }).describe("Get a specific connection by ID");
82
+ var ListConnectionsQuerySchema = import_zod.z.object({
83
+ app_key: import_zod.z.string().optional().describe(
84
+ "Filter connections by app key (e.g., 'SlackCLIAPI' or slug like 'github')"
85
+ ),
86
+ connection_ids: import_zod.z.string().optional().describe("Comma-separated list of connection IDs to filter by"),
87
+ search: import_zod.z.string().optional().describe("Search term to filter connections by title"),
88
+ title: import_zod.z.string().optional().describe(
89
+ "Filter connections by exact title match (searches first, then filters locally)"
90
+ ),
91
+ account_id: import_zod.z.string().optional().describe("Filter connections by account ID"),
92
+ owner: import_zod.z.string().optional().describe(
93
+ "Filter by owner, 'me' for your own connections or a specific user ID"
94
+ ),
95
+ is_expired: import_zod.z.boolean().optional().describe(
96
+ "Filter by expired status (true = expired only, false = non-expired only)"
97
+ ),
98
+ page_size: import_zod.z.number().min(1).optional().describe("Number of connections per page"),
99
+ offset: import_zod.z.string().optional().describe("Pagination offset from previous response")
100
+ }).describe("Query parameters for listing connections");
101
+ var ListConnectionsResponseSchema = import_zod.z.object({
102
+ data: import_zod.z.array(ConnectionItemSchema).describe("Array of connection items"),
103
+ links: import_zod.z.object({
104
+ next: import_zod.z.string().nullable().optional().describe(
105
+ "Fully qualified URL for the next page of results (if available), e.g. https://sdkapi.zapier.com/api/v0/connections?offset=100&page_size=50"
106
+ )
107
+ }).describe("Pagination links for navigating through results"),
108
+ meta: import_zod.z.object({
109
+ count: import_zod.z.number().describe("Total number of items"),
110
+ limit: import_zod.z.number().describe("Number of items per page"),
111
+ offset: import_zod.z.number().describe("Offset of the current page")
112
+ }).describe("Metadata for the paginated result set")
113
+ }).describe("Response schema for listing connections");
114
+ // Annotate the CommonJS export names for ESM import in node:
115
+ 0 && (module.exports = {
116
+ ConnectionItemSchema,
117
+ ConnectionSchema,
118
+ ConnectionsResponseSchema,
119
+ GetConnectionParamSchema,
120
+ ListConnectionsQuerySchema,
121
+ ListConnectionsResponseSchema
122
+ });
123
+ //# sourceMappingURL=connections.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/v0/schemas/connections.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Base Connection schema matching the API response\n * (internally uses the same v4 authentications API)\n */\nexport const ConnectionSchema = z.object({\n id: z.number().describe(\"Unique identifier for the connection\"),\n date: z.string().describe(\"Date created\"),\n lastchanged: z.string().optional().describe(\"Date last changed\"),\n account_id: z.number().describe(\"Account ID associated with this connection\"),\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.boolean().describe(\"Whether the connection is invite-only\"),\n is_private: z.boolean().describe(\"Whether the connection is private\"),\n shared_with_all: z\n .boolean()\n .describe(\"Whether the connection 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 connection\"),\n identifier: z.string().nullable().optional().describe(\"Identifier\"),\n title: z.string().nullable().optional().describe(\"Title of the connection\"),\n url: z.string().optional().describe(\"URL to the connection resource\"),\n groups: z\n .array(\n z\n .record(z.string(), z.unknown())\n .describe(\"Groups associated with the connection\"),\n )\n .optional()\n .describe(\"Array of groups associated with the connection\"),\n members: z\n .string()\n .optional()\n .describe(\"Members associated with the connection\"),\n permissions: z\n .record(z.string(), z.boolean())\n .optional()\n .describe(\"Permissions for the connection\"),\n});\n\n/**\n * Normalized connection item returned by getConnection 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 ConnectionItemSchema = ConnectionSchema.omit({\n selected_api: true,\n customuser_id: true,\n}).extend({\n // Override numeric IDs with string versions (converted by normalizeConnectionItem)\n id: z.string().describe(\"Unique identifier for the connection\"),\n account_id: z.string().describe(\"Account ID associated with this connection\"),\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 connection is expired (mapped from is_stale)\"),\n expired_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when connection 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 ConnectionsResponseSchema = 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.array(ConnectionSchema).describe(\"Array of connection items\"),\n});\n\nexport type Connection = z.infer<typeof ConnectionSchema>;\nexport type ConnectionItem = z.infer<typeof ConnectionItemSchema>;\nexport type ConnectionsResponse = z.infer<typeof ConnectionsResponseSchema>;\n\n/**\n * Path parameters schema for getConnection endpoint.\n */\nexport const GetConnectionParamSchema = z\n .object({\n connectionId: z.string().describe(\"Connection ID to retrieve\"),\n })\n .describe(\"Get a specific connection by ID\");\n\nexport type GetConnectionParam = z.infer<typeof GetConnectionParamSchema>;\n\n/**\n * Response type for getConnection endpoint.\n * Wraps ConnectionItem in the standard API response envelope.\n */\nexport type GetConnectionResponse = { data: ConnectionItem };\n\n/**\n * Query parameters for listing connections\n */\nexport const ListConnectionsQuerySchema = z\n .object({\n app_key: z\n .string()\n .optional()\n .describe(\n \"Filter connections by app key (e.g., 'SlackCLIAPI' or slug like 'github')\",\n ),\n connection_ids: z\n .string()\n .optional()\n .describe(\"Comma-separated list of connection IDs to filter by\"),\n search: z\n .string()\n .optional()\n .describe(\"Search term to filter connections by title\"),\n title: z\n .string()\n .optional()\n .describe(\n \"Filter connections by exact title match (searches first, then filters locally)\",\n ),\n account_id: z\n .string()\n .optional()\n .describe(\"Filter connections by account ID\"),\n owner: z\n .string()\n .optional()\n .describe(\n \"Filter by owner, 'me' for your own connections or a specific user ID\",\n ),\n is_expired: z\n .boolean()\n .optional()\n .describe(\n \"Filter by expired status (true = expired only, false = non-expired only)\",\n ),\n page_size: z\n .number()\n .min(1)\n .optional()\n .describe(\"Number of connections per page\"),\n offset: z\n .string()\n .optional()\n .describe(\"Pagination offset from previous response\"),\n })\n .describe(\"Query parameters for listing connections\");\n\n/**\n * Response schema for listConnections\n */\nexport const ListConnectionsResponseSchema = z\n .object({\n data: z.array(ConnectionItemSchema).describe(\"Array of connection 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/connections?offset=100&page_size=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 connections\");\n\n/**\n * TypeScript types for request and response\n */\nexport type ListConnectionsQuery = z.infer<typeof ListConnectionsQuerySchema>;\nexport type ListConnectionsResponse = z.infer<\n typeof ListConnectionsResponseSchema\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAMX,IAAM,mBAAmB,aAAE,OAAO;AAAA,EACvC,IAAI,aAAE,OAAO,EAAE,SAAS,sCAAsC;AAAA,EAC9D,MAAM,aAAE,OAAO,EAAE,SAAS,cAAc;AAAA,EACxC,aAAa,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,mBAAmB;AAAA,EAC/D,YAAY,aAAE,OAAO,EAAE,SAAS,4CAA4C;AAAA,EAC5E,eAAe,aACZ,OAAO,EACP,SAAS,EACT,SAAS,gCAAgC;AAAA,EAC5C,cAAc,aAAE,OAAO,EAAE,SAAS,wCAAwC;AAAA,EAC1E,0BAA0B,aACvB,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,qCAAqC;AAAA,EACjD,gBAAgB,aAAE,QAAQ,EAAE,SAAS,uCAAuC;AAAA,EAC5E,YAAY,aAAE,QAAQ,EAAE,SAAS,mCAAmC;AAAA,EACpE,iBAAiB,aACd,QAAQ,EACR,SAAS,iDAAiD;AAAA,EAC7D,UAAU,aA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1C,OAAO;AAAA,EACN,MAAM,aAAE,MAAM,oBAAoB,EAAE,SAAS,2BAA2B;AAAA,EACxE,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,yCAAyC;","names":[]}
@@ -0,0 +1,171 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Base Connection schema matching the API response
5
+ * (internally uses the same v4 authentications API)
6
+ */
7
+ declare const ConnectionSchema: z.ZodObject<{
8
+ id: z.ZodNumber;
9
+ date: z.ZodString;
10
+ lastchanged: z.ZodOptional<z.ZodString>;
11
+ account_id: z.ZodNumber;
12
+ customuser_id: z.ZodOptional<z.ZodNumber>;
13
+ selected_api: z.ZodString;
14
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ is_invite_only: z.ZodBoolean;
16
+ is_private: z.ZodBoolean;
17
+ shared_with_all: z.ZodBoolean;
18
+ is_stale: z.ZodOptional<z.ZodString>;
19
+ is_shared: z.ZodOptional<z.ZodString>;
20
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ url: z.ZodOptional<z.ZodString>;
25
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
26
+ members: z.ZodOptional<z.ZodString>;
27
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
28
+ }, z.core.$strip>;
29
+ /**
30
+ * Normalized connection item returned by getConnection handler
31
+ *
32
+ * Transforms API response fields:
33
+ * - selected_api → implementation_id
34
+ * - customuser_id → profile_id
35
+ * - is_stale → is_expired (preserved as is_stale too)
36
+ * - marked_stale_at → expired_at (preserved as marked_stale_at too)
37
+ *
38
+ * Adds computed fields:
39
+ * - app_key: Extracted from selected_api (e.g., "SlackCLIAPI@1.0.0" → "SlackCLIAPI")
40
+ * - app_version: Extracted from selected_api (e.g., "SlackCLIAPI@1.0.0" → "1.0.0")
41
+ */
42
+ declare const ConnectionItemSchema: z.ZodObject<{
43
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ date: z.ZodString;
45
+ is_invite_only: z.ZodBoolean;
46
+ lastchanged: z.ZodOptional<z.ZodString>;
47
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ is_private: z.ZodBoolean;
49
+ shared_with_all: z.ZodBoolean;
50
+ is_stale: z.ZodOptional<z.ZodString>;
51
+ is_shared: z.ZodOptional<z.ZodString>;
52
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
+ url: z.ZodOptional<z.ZodString>;
56
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
57
+ members: z.ZodOptional<z.ZodString>;
58
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
59
+ id: z.ZodString;
60
+ account_id: z.ZodString;
61
+ implementation_id: z.ZodOptional<z.ZodString>;
62
+ profile_id: z.ZodOptional<z.ZodString>;
63
+ is_expired: z.ZodOptional<z.ZodString>;
64
+ expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
+ app_key: z.ZodOptional<z.ZodString>;
66
+ app_version: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strip>;
68
+ declare const ConnectionsResponseSchema: z.ZodObject<{
69
+ count: z.ZodNumber;
70
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
+ previous: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ results: z.ZodArray<z.ZodObject<{
73
+ id: z.ZodNumber;
74
+ date: z.ZodString;
75
+ lastchanged: z.ZodOptional<z.ZodString>;
76
+ account_id: z.ZodNumber;
77
+ customuser_id: z.ZodOptional<z.ZodNumber>;
78
+ selected_api: z.ZodString;
79
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ is_invite_only: z.ZodBoolean;
81
+ is_private: z.ZodBoolean;
82
+ shared_with_all: z.ZodBoolean;
83
+ is_stale: z.ZodOptional<z.ZodString>;
84
+ is_shared: z.ZodOptional<z.ZodString>;
85
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
+ url: z.ZodOptional<z.ZodString>;
90
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
91
+ members: z.ZodOptional<z.ZodString>;
92
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
93
+ }, z.core.$strip>>;
94
+ }, z.core.$strip>;
95
+ type Connection = z.infer<typeof ConnectionSchema>;
96
+ type ConnectionItem = z.infer<typeof ConnectionItemSchema>;
97
+ type ConnectionsResponse = z.infer<typeof ConnectionsResponseSchema>;
98
+ /**
99
+ * Path parameters schema for getConnection endpoint.
100
+ */
101
+ declare const GetConnectionParamSchema: z.ZodObject<{
102
+ connectionId: z.ZodString;
103
+ }, z.core.$strip>;
104
+ type GetConnectionParam = z.infer<typeof GetConnectionParamSchema>;
105
+ /**
106
+ * Response type for getConnection endpoint.
107
+ * Wraps ConnectionItem in the standard API response envelope.
108
+ */
109
+ type GetConnectionResponse = {
110
+ data: ConnectionItem;
111
+ };
112
+ /**
113
+ * Query parameters for listing connections
114
+ */
115
+ declare const ListConnectionsQuerySchema: z.ZodObject<{
116
+ app_key: z.ZodOptional<z.ZodString>;
117
+ connection_ids: z.ZodOptional<z.ZodString>;
118
+ search: z.ZodOptional<z.ZodString>;
119
+ title: z.ZodOptional<z.ZodString>;
120
+ account_id: z.ZodOptional<z.ZodString>;
121
+ owner: z.ZodOptional<z.ZodString>;
122
+ is_expired: z.ZodOptional<z.ZodBoolean>;
123
+ page_size: z.ZodOptional<z.ZodNumber>;
124
+ offset: z.ZodOptional<z.ZodString>;
125
+ }, z.core.$strip>;
126
+ /**
127
+ * Response schema for listConnections
128
+ */
129
+ declare const ListConnectionsResponseSchema: z.ZodObject<{
130
+ data: z.ZodArray<z.ZodObject<{
131
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ date: z.ZodString;
133
+ is_invite_only: z.ZodBoolean;
134
+ lastchanged: z.ZodOptional<z.ZodString>;
135
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
+ is_private: z.ZodBoolean;
137
+ shared_with_all: z.ZodBoolean;
138
+ is_stale: z.ZodOptional<z.ZodString>;
139
+ is_shared: z.ZodOptional<z.ZodString>;
140
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
143
+ url: z.ZodOptional<z.ZodString>;
144
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
145
+ members: z.ZodOptional<z.ZodString>;
146
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
147
+ id: z.ZodString;
148
+ account_id: z.ZodString;
149
+ implementation_id: z.ZodOptional<z.ZodString>;
150
+ profile_id: z.ZodOptional<z.ZodString>;
151
+ is_expired: z.ZodOptional<z.ZodString>;
152
+ expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
153
+ app_key: z.ZodOptional<z.ZodString>;
154
+ app_version: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strip>>;
156
+ links: z.ZodObject<{
157
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
+ }, z.core.$strip>;
159
+ meta: z.ZodObject<{
160
+ count: z.ZodNumber;
161
+ limit: z.ZodNumber;
162
+ offset: z.ZodNumber;
163
+ }, z.core.$strip>;
164
+ }, z.core.$strip>;
165
+ /**
166
+ * TypeScript types for request and response
167
+ */
168
+ type ListConnectionsQuery = z.infer<typeof ListConnectionsQuerySchema>;
169
+ type ListConnectionsResponse = z.infer<typeof ListConnectionsResponseSchema>;
170
+
171
+ export { type Connection, type ConnectionItem, ConnectionItemSchema, ConnectionSchema, type ConnectionsResponse, ConnectionsResponseSchema, type GetConnectionParam, GetConnectionParamSchema, type GetConnectionResponse, type ListConnectionsQuery, ListConnectionsQuerySchema, type ListConnectionsResponse, ListConnectionsResponseSchema };
@@ -0,0 +1,171 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Base Connection schema matching the API response
5
+ * (internally uses the same v4 authentications API)
6
+ */
7
+ declare const ConnectionSchema: z.ZodObject<{
8
+ id: z.ZodNumber;
9
+ date: z.ZodString;
10
+ lastchanged: z.ZodOptional<z.ZodString>;
11
+ account_id: z.ZodNumber;
12
+ customuser_id: z.ZodOptional<z.ZodNumber>;
13
+ selected_api: z.ZodString;
14
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ is_invite_only: z.ZodBoolean;
16
+ is_private: z.ZodBoolean;
17
+ shared_with_all: z.ZodBoolean;
18
+ is_stale: z.ZodOptional<z.ZodString>;
19
+ is_shared: z.ZodOptional<z.ZodString>;
20
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ url: z.ZodOptional<z.ZodString>;
25
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
26
+ members: z.ZodOptional<z.ZodString>;
27
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
28
+ }, z.core.$strip>;
29
+ /**
30
+ * Normalized connection item returned by getConnection handler
31
+ *
32
+ * Transforms API response fields:
33
+ * - selected_api → implementation_id
34
+ * - customuser_id → profile_id
35
+ * - is_stale → is_expired (preserved as is_stale too)
36
+ * - marked_stale_at → expired_at (preserved as marked_stale_at too)
37
+ *
38
+ * Adds computed fields:
39
+ * - app_key: Extracted from selected_api (e.g., "SlackCLIAPI@1.0.0" → "SlackCLIAPI")
40
+ * - app_version: Extracted from selected_api (e.g., "SlackCLIAPI@1.0.0" → "1.0.0")
41
+ */
42
+ declare const ConnectionItemSchema: z.ZodObject<{
43
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ date: z.ZodString;
45
+ is_invite_only: z.ZodBoolean;
46
+ lastchanged: z.ZodOptional<z.ZodString>;
47
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ is_private: z.ZodBoolean;
49
+ shared_with_all: z.ZodBoolean;
50
+ is_stale: z.ZodOptional<z.ZodString>;
51
+ is_shared: z.ZodOptional<z.ZodString>;
52
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
+ url: z.ZodOptional<z.ZodString>;
56
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
57
+ members: z.ZodOptional<z.ZodString>;
58
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
59
+ id: z.ZodString;
60
+ account_id: z.ZodString;
61
+ implementation_id: z.ZodOptional<z.ZodString>;
62
+ profile_id: z.ZodOptional<z.ZodString>;
63
+ is_expired: z.ZodOptional<z.ZodString>;
64
+ expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
+ app_key: z.ZodOptional<z.ZodString>;
66
+ app_version: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strip>;
68
+ declare const ConnectionsResponseSchema: z.ZodObject<{
69
+ count: z.ZodNumber;
70
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
+ previous: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ results: z.ZodArray<z.ZodObject<{
73
+ id: z.ZodNumber;
74
+ date: z.ZodString;
75
+ lastchanged: z.ZodOptional<z.ZodString>;
76
+ account_id: z.ZodNumber;
77
+ customuser_id: z.ZodOptional<z.ZodNumber>;
78
+ selected_api: z.ZodString;
79
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ is_invite_only: z.ZodBoolean;
81
+ is_private: z.ZodBoolean;
82
+ shared_with_all: z.ZodBoolean;
83
+ is_stale: z.ZodOptional<z.ZodString>;
84
+ is_shared: z.ZodOptional<z.ZodString>;
85
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
+ url: z.ZodOptional<z.ZodString>;
90
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
91
+ members: z.ZodOptional<z.ZodString>;
92
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
93
+ }, z.core.$strip>>;
94
+ }, z.core.$strip>;
95
+ type Connection = z.infer<typeof ConnectionSchema>;
96
+ type ConnectionItem = z.infer<typeof ConnectionItemSchema>;
97
+ type ConnectionsResponse = z.infer<typeof ConnectionsResponseSchema>;
98
+ /**
99
+ * Path parameters schema for getConnection endpoint.
100
+ */
101
+ declare const GetConnectionParamSchema: z.ZodObject<{
102
+ connectionId: z.ZodString;
103
+ }, z.core.$strip>;
104
+ type GetConnectionParam = z.infer<typeof GetConnectionParamSchema>;
105
+ /**
106
+ * Response type for getConnection endpoint.
107
+ * Wraps ConnectionItem in the standard API response envelope.
108
+ */
109
+ type GetConnectionResponse = {
110
+ data: ConnectionItem;
111
+ };
112
+ /**
113
+ * Query parameters for listing connections
114
+ */
115
+ declare const ListConnectionsQuerySchema: z.ZodObject<{
116
+ app_key: z.ZodOptional<z.ZodString>;
117
+ connection_ids: z.ZodOptional<z.ZodString>;
118
+ search: z.ZodOptional<z.ZodString>;
119
+ title: z.ZodOptional<z.ZodString>;
120
+ account_id: z.ZodOptional<z.ZodString>;
121
+ owner: z.ZodOptional<z.ZodString>;
122
+ is_expired: z.ZodOptional<z.ZodBoolean>;
123
+ page_size: z.ZodOptional<z.ZodNumber>;
124
+ offset: z.ZodOptional<z.ZodString>;
125
+ }, z.core.$strip>;
126
+ /**
127
+ * Response schema for listConnections
128
+ */
129
+ declare const ListConnectionsResponseSchema: z.ZodObject<{
130
+ data: z.ZodArray<z.ZodObject<{
131
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ date: z.ZodString;
133
+ is_invite_only: z.ZodBoolean;
134
+ lastchanged: z.ZodOptional<z.ZodString>;
135
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
+ is_private: z.ZodBoolean;
137
+ shared_with_all: z.ZodBoolean;
138
+ is_stale: z.ZodOptional<z.ZodString>;
139
+ is_shared: z.ZodOptional<z.ZodString>;
140
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
143
+ url: z.ZodOptional<z.ZodString>;
144
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
145
+ members: z.ZodOptional<z.ZodString>;
146
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
147
+ id: z.ZodString;
148
+ account_id: z.ZodString;
149
+ implementation_id: z.ZodOptional<z.ZodString>;
150
+ profile_id: z.ZodOptional<z.ZodString>;
151
+ is_expired: z.ZodOptional<z.ZodString>;
152
+ expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
153
+ app_key: z.ZodOptional<z.ZodString>;
154
+ app_version: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strip>>;
156
+ links: z.ZodObject<{
157
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
+ }, z.core.$strip>;
159
+ meta: z.ZodObject<{
160
+ count: z.ZodNumber;
161
+ limit: z.ZodNumber;
162
+ offset: z.ZodNumber;
163
+ }, z.core.$strip>;
164
+ }, z.core.$strip>;
165
+ /**
166
+ * TypeScript types for request and response
167
+ */
168
+ type ListConnectionsQuery = z.infer<typeof ListConnectionsQuerySchema>;
169
+ type ListConnectionsResponse = z.infer<typeof ListConnectionsResponseSchema>;
170
+
171
+ export { type Connection, type ConnectionItem, ConnectionItemSchema, ConnectionSchema, type ConnectionsResponse, ConnectionsResponseSchema, type GetConnectionParam, GetConnectionParamSchema, type GetConnectionResponse, type ListConnectionsQuery, ListConnectionsQuerySchema, type ListConnectionsResponse, ListConnectionsResponseSchema };
@@ -0,0 +1,93 @@
1
+ // src/v0/schemas/connections.ts
2
+ import { z } from "zod";
3
+ var ConnectionSchema = z.object({
4
+ id: z.number().describe("Unique identifier for the connection"),
5
+ date: z.string().describe("Date created"),
6
+ lastchanged: z.string().optional().describe("Date last changed"),
7
+ account_id: z.number().describe("Account ID associated with this connection"),
8
+ customuser_id: z.number().optional().describe("Custom user ID (if applicable)"),
9
+ selected_api: z.string().describe("Selected API key (internal identifier)"),
10
+ destination_selected_api: z.string().nullable().optional().describe("Destination API key (if applicable)"),
11
+ is_invite_only: z.boolean().describe("Whether the connection is invite-only"),
12
+ is_private: z.boolean().describe("Whether the connection is private"),
13
+ shared_with_all: z.boolean().describe("Whether the connection is shared with all users"),
14
+ is_stale: z.string().optional().describe("Stale status string"),
15
+ is_shared: z.string().optional().describe("Shared status string"),
16
+ marked_stale_at: z.string().nullable().optional().describe("Date when marked stale"),
17
+ label: z.string().nullable().optional().describe("User label for the connection"),
18
+ identifier: z.string().nullable().optional().describe("Identifier"),
19
+ title: z.string().nullable().optional().describe("Title of the connection"),
20
+ url: z.string().optional().describe("URL to the connection resource"),
21
+ groups: z.array(
22
+ z.record(z.string(), z.unknown()).describe("Groups associated with the connection")
23
+ ).optional().describe("Array of groups associated with the connection"),
24
+ members: z.string().optional().describe("Members associated with the connection"),
25
+ permissions: z.record(z.string(), z.boolean()).optional().describe("Permissions for the connection")
26
+ });
27
+ var ConnectionItemSchema = ConnectionSchema.omit({
28
+ selected_api: true,
29
+ customuser_id: true
30
+ }).extend({
31
+ // Override numeric IDs with string versions (converted by normalizeConnectionItem)
32
+ id: z.string().describe("Unique identifier for the connection"),
33
+ account_id: z.string().describe("Account ID associated with this connection"),
34
+ // Renamed fields
35
+ implementation_id: z.string().optional().describe("Implementation ID (was selected_api)"),
36
+ profile_id: z.string().optional().describe("Profile ID (was customuser_id)"),
37
+ // Mapped fields (originals preserved in ...restOfAuth)
38
+ is_expired: z.string().optional().describe("Whether the connection is expired (mapped from is_stale)"),
39
+ expired_at: z.string().nullable().optional().describe("Date when connection expired (mapped from marked_stale_at)"),
40
+ // Computed fields
41
+ app_key: z.string().optional().describe("App Key extracted from implementation_id"),
42
+ app_version: z.string().optional().describe("App Version extracted from implementation_id")
43
+ });
44
+ var ConnectionsResponseSchema = z.object({
45
+ count: z.number().describe("Total number of items"),
46
+ next: z.string().nullable().optional().describe("Cursor for the next page of results (if available)"),
47
+ previous: z.string().nullable().optional().describe("Cursor for the previous page of results (if available)"),
48
+ results: z.array(ConnectionSchema).describe("Array of connection items")
49
+ });
50
+ var GetConnectionParamSchema = z.object({
51
+ connectionId: z.string().describe("Connection ID to retrieve")
52
+ }).describe("Get a specific connection by ID");
53
+ var ListConnectionsQuerySchema = z.object({
54
+ app_key: z.string().optional().describe(
55
+ "Filter connections by app key (e.g., 'SlackCLIAPI' or slug like 'github')"
56
+ ),
57
+ connection_ids: z.string().optional().describe("Comma-separated list of connection IDs to filter by"),
58
+ search: z.string().optional().describe("Search term to filter connections by title"),
59
+ title: z.string().optional().describe(
60
+ "Filter connections by exact title match (searches first, then filters locally)"
61
+ ),
62
+ account_id: z.string().optional().describe("Filter connections by account ID"),
63
+ owner: z.string().optional().describe(
64
+ "Filter by owner, 'me' for your own connections or a specific user ID"
65
+ ),
66
+ is_expired: z.boolean().optional().describe(
67
+ "Filter by expired status (true = expired only, false = non-expired only)"
68
+ ),
69
+ page_size: z.number().min(1).optional().describe("Number of connections per page"),
70
+ offset: z.string().optional().describe("Pagination offset from previous response")
71
+ }).describe("Query parameters for listing connections");
72
+ var ListConnectionsResponseSchema = z.object({
73
+ data: z.array(ConnectionItemSchema).describe("Array of connection items"),
74
+ links: z.object({
75
+ next: z.string().nullable().optional().describe(
76
+ "Fully qualified URL for the next page of results (if available), e.g. https://sdkapi.zapier.com/api/v0/connections?offset=100&page_size=50"
77
+ )
78
+ }).describe("Pagination links for navigating through results"),
79
+ meta: z.object({
80
+ count: z.number().describe("Total number of items"),
81
+ limit: z.number().describe("Number of items per page"),
82
+ offset: z.number().describe("Offset of the current page")
83
+ }).describe("Metadata for the paginated result set")
84
+ }).describe("Response schema for listing connections");
85
+ export {
86
+ ConnectionItemSchema,
87
+ ConnectionSchema,
88
+ ConnectionsResponseSchema,
89
+ GetConnectionParamSchema,
90
+ ListConnectionsQuerySchema,
91
+ ListConnectionsResponseSchema
92
+ };
93
+ //# sourceMappingURL=connections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/v0/schemas/connections.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Base Connection schema matching the API response\n * (internally uses the same v4 authentications API)\n */\nexport const ConnectionSchema = z.object({\n id: z.number().describe(\"Unique identifier for the connection\"),\n date: z.string().describe(\"Date created\"),\n lastchanged: z.string().optional().describe(\"Date last changed\"),\n account_id: z.number().describe(\"Account ID associated with this connection\"),\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.boolean().describe(\"Whether the connection is invite-only\"),\n is_private: z.boolean().describe(\"Whether the connection is private\"),\n shared_with_all: z\n .boolean()\n .describe(\"Whether the connection 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 connection\"),\n identifier: z.string().nullable().optional().describe(\"Identifier\"),\n title: z.string().nullable().optional().describe(\"Title of the connection\"),\n url: z.string().optional().describe(\"URL to the connection resource\"),\n groups: z\n .array(\n z\n .record(z.string(), z.unknown())\n .describe(\"Groups associated with the connection\"),\n )\n .optional()\n .describe(\"Array of groups associated with the connection\"),\n members: z\n .string()\n .optional()\n .describe(\"Members associated with the connection\"),\n permissions: z\n .record(z.string(), z.boolean())\n .optional()\n .describe(\"Permissions for the connection\"),\n});\n\n/**\n * Normalized connection item returned by getConnection 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 ConnectionItemSchema = ConnectionSchema.omit({\n selected_api: true,\n customuser_id: true,\n}).extend({\n // Override numeric IDs with string versions (converted by normalizeConnectionItem)\n id: z.string().describe(\"Unique identifier for the connection\"),\n account_id: z.string().describe(\"Account ID associated with this connection\"),\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 connection is expired (mapped from is_stale)\"),\n expired_at: z\n .string()\n .nullable()\n .optional()\n .describe(\"Date when connection 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 ConnectionsResponseSchema = 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.array(ConnectionSchema).describe(\"Array of connection items\"),\n});\n\nexport type Connection = z.infer<typeof ConnectionSchema>;\nexport type ConnectionItem = z.infer<typeof ConnectionItemSchema>;\nexport type ConnectionsResponse = z.infer<typeof ConnectionsResponseSchema>;\n\n/**\n * Path parameters schema for getConnection endpoint.\n */\nexport const GetConnectionParamSchema = z\n .object({\n connectionId: z.string().describe(\"Connection ID to retrieve\"),\n })\n .describe(\"Get a specific connection by ID\");\n\nexport type GetConnectionParam = z.infer<typeof GetConnectionParamSchema>;\n\n/**\n * Response type for getConnection endpoint.\n * Wraps ConnectionItem in the standard API response envelope.\n */\nexport type GetConnectionResponse = { data: ConnectionItem };\n\n/**\n * Query parameters for listing connections\n */\nexport const ListConnectionsQuerySchema = z\n .object({\n app_key: z\n .string()\n .optional()\n .describe(\n \"Filter connections by app key (e.g., 'SlackCLIAPI' or slug like 'github')\",\n ),\n connection_ids: z\n .string()\n .optional()\n .describe(\"Comma-separated list of connection IDs to filter by\"),\n search: z\n .string()\n .optional()\n .describe(\"Search term to filter connections by title\"),\n title: z\n .string()\n .optional()\n .describe(\n \"Filter connections by exact title match (searches first, then filters locally)\",\n ),\n account_id: z\n .string()\n .optional()\n .describe(\"Filter connections by account ID\"),\n owner: z\n .string()\n .optional()\n .describe(\n \"Filter by owner, 'me' for your own connections or a specific user ID\",\n ),\n is_expired: z\n .boolean()\n .optional()\n .describe(\n \"Filter by expired status (true = expired only, false = non-expired only)\",\n ),\n page_size: z\n .number()\n .min(1)\n .optional()\n .describe(\"Number of connections per page\"),\n offset: z\n .string()\n .optional()\n .describe(\"Pagination offset from previous response\"),\n })\n .describe(\"Query parameters for listing connections\");\n\n/**\n * Response schema for listConnections\n */\nexport const ListConnectionsResponseSchema = z\n .object({\n data: z.array(ConnectionItemSchema).describe(\"Array of connection 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/connections?offset=100&page_size=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 connections\");\n\n/**\n * TypeScript types for request and response\n */\nexport type ListConnectionsQuery = z.infer<typeof ListConnectionsQuerySchema>;\nexport type ListConnectionsResponse = z.infer<\n typeof ListConnectionsResponseSchema\n>;\n"],"mappings":";AAAA,SAAS,SAAS;AAMX,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,IAAI,EA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gBAAgB,EACb,OAAO,EACP,SAAS,EACT,SAAS,qDAAqD;AAAA,EACjE,QAAQ,EACL,OAAO,EACP,SAAS,EACT,SAAS,4CAA4C;AAAA,EACxD,OAAO,EACJ,OAAO,EACP,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,YAAY,EACT,OAAO,EACP,SAAS,EACT,SAAS,kCAAkC;AAAA,EAC9C,OAAO,EACJ,OAAO,EACP,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,YAAY,EACT,QAAQ,EACR,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,WAAW,EACR,OAAO,EACP,IAAI,CAAC,EACL,SAAS,EACT,SAAS,gCAAgC;AAAA,EAC5C,QAAQ,EACL,OAAO,EACP,SAAS,EACT,SAAS,0CAA0C;AACxD,CAAC,EACA,SAAS,0CAA0C;AAK/C,IAAM,gCAAgC,EAC1C,OAAO;AAAA,EACN,MAAM,EAAE,MAAM,oBAAoB,EAAE,SAAS,2BAA2B;AAAA,EACxE,OAAO,EACJ,OAAO;AAAA,IACN,MAAM,EACH,OAAO,EACP,SAAS,EACT,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,EACJ,CAAC,EACA,SAAS,iDAAiD;AAAA,EAC7D,MAAM,EACH,OAAO;AAAA,IACN,OAAO,EAAE,OAAO,EAAE,SAAS,uBAAuB;AAAA,IAClD,OAAO,EAAE,OAAO,EAAE,SAAS,0BAA0B;AAAA,IACrD,QAAQ,EAAE,OAAO,EAAE,SAAS,4BAA4B;AAAA,EAC1D,CAAC,EACA,SAAS,uCAAuC;AACrD,CAAC,EACA,SAAS,yCAAyC;","names":[]}
package/openapi.yaml CHANGED
@@ -16,9 +16,11 @@ tags:
16
16
  - name: Apps
17
17
  description: App-related routes
18
18
  - name: Authentications
19
- description: Authentication-related routes
19
+ description: Authentication-related routes (deprecated, use Connections)
20
20
  - name: Client Credentials
21
21
  description: Client credentials management routes
22
+ - name: Connections
23
+ description: Connection-related routes
22
24
  - name: Deduplication
23
25
  description: Deduplication-related routes
24
26
  - name: Documentation
@@ -378,6 +380,141 @@ components:
378
380
  $ref: "#/components/schemas/AuthenticationItem"
379
381
  required:
380
382
  - data
383
+ ConnectionItem:
384
+ type: object
385
+ properties:
386
+ id:
387
+ type: string
388
+ description: Unique identifier for the connection
389
+ date:
390
+ type: string
391
+ description: Date created
392
+ lastchanged:
393
+ type: string
394
+ description: Date last changed
395
+ account_id:
396
+ type: string
397
+ description: Account ID associated with this connection
398
+ destination_selected_api:
399
+ type:
400
+ - string
401
+ - "null"
402
+ description: Destination API key (if applicable)
403
+ is_invite_only:
404
+ type: boolean
405
+ description: Whether the connection is invite-only
406
+ is_private:
407
+ type: boolean
408
+ description: Whether the connection is private
409
+ shared_with_all:
410
+ type: boolean
411
+ description: Whether the connection is shared with all users
412
+ is_stale:
413
+ type: string
414
+ description: Stale status string
415
+ is_shared:
416
+ type: string
417
+ description: Shared status string
418
+ marked_stale_at:
419
+ type:
420
+ - string
421
+ - "null"
422
+ description: Date when marked stale
423
+ label:
424
+ type:
425
+ - string
426
+ - "null"
427
+ description: User label for the connection
428
+ identifier:
429
+ type:
430
+ - string
431
+ - "null"
432
+ description: Identifier
433
+ title:
434
+ type:
435
+ - string
436
+ - "null"
437
+ description: Title of the connection
438
+ url:
439
+ type: string
440
+ description: URL to the connection resource
441
+ groups:
442
+ type: array
443
+ items:
444
+ type: object
445
+ additionalProperties: {}
446
+ description: Groups associated with the connection
447
+ description: Array of groups associated with the connection
448
+ members:
449
+ type: string
450
+ description: Members associated with the connection
451
+ permissions:
452
+ type: object
453
+ additionalProperties:
454
+ type: boolean
455
+ description: Permissions for the connection
456
+ implementation_id:
457
+ type: string
458
+ description: Implementation ID (was selected_api)
459
+ profile_id:
460
+ type: string
461
+ description: Profile ID (was customuser_id)
462
+ is_expired:
463
+ type: string
464
+ description: Whether the connection is expired (mapped from is_stale)
465
+ expired_at:
466
+ type:
467
+ - string
468
+ - "null"
469
+ description: Date when connection expired (mapped from marked_stale_at)
470
+ app_key:
471
+ type: string
472
+ description: App Key extracted from implementation_id
473
+ app_version:
474
+ type: string
475
+ description: App Version extracted from implementation_id
476
+ required:
477
+ - id
478
+ - date
479
+ - account_id
480
+ - is_invite_only
481
+ - is_private
482
+ - shared_with_all
483
+ description: Normalized connection item returned by getConnection handler
484
+ example:
485
+ id: "12345"
486
+ date: 2023-01-15T10:30:00Z
487
+ lastchanged: 2023-06-20T14:45:00Z
488
+ account_id: "98765"
489
+ destination_selected_api: null
490
+ is_invite_only: false
491
+ is_private: true
492
+ shared_with_all: false
493
+ is_stale: "false"
494
+ is_shared: "false"
495
+ marked_stale_at: null
496
+ label: My Slack Account
497
+ identifier: user@example.com
498
+ title: Slack - Personal Workspace
499
+ url: /api/v0/connections/12345
500
+ groups: []
501
+ members: ""
502
+ permissions:
503
+ can_view: true
504
+ can_delete: true
505
+ implementation_id: SlackCLIAPI@1.0.0
506
+ profile_id: "54321"
507
+ is_expired: "false"
508
+ expired_at: null
509
+ app_key: SlackCLIAPI
510
+ app_version: 1.0.0
511
+ GetConnectionResponse:
512
+ type: object
513
+ properties:
514
+ data:
515
+ $ref: "#/components/schemas/ConnectionItem"
516
+ required:
517
+ - data
381
518
  ListActionsResponse:
382
519
  type: object
383
520
  properties:
@@ -841,6 +978,143 @@ components:
841
978
  - links
842
979
  - meta
843
980
  description: Response for listing client credentials
981
+ ListConnectionsResponse:
982
+ type: object
983
+ properties:
984
+ data:
985
+ type: array
986
+ items:
987
+ type: object
988
+ properties:
989
+ id:
990
+ type: string
991
+ description: Unique identifier for the connection
992
+ date:
993
+ type: string
994
+ description: Date created
995
+ lastchanged:
996
+ type: string
997
+ description: Date last changed
998
+ account_id:
999
+ type: string
1000
+ description: Account ID associated with this connection
1001
+ destination_selected_api:
1002
+ type:
1003
+ - string
1004
+ - "null"
1005
+ description: Destination API key (if applicable)
1006
+ is_invite_only:
1007
+ type: boolean
1008
+ description: Whether the connection is invite-only
1009
+ is_private:
1010
+ type: boolean
1011
+ description: Whether the connection is private
1012
+ shared_with_all:
1013
+ type: boolean
1014
+ description: Whether the connection is shared with all users
1015
+ is_stale:
1016
+ type: string
1017
+ description: Stale status string
1018
+ is_shared:
1019
+ type: string
1020
+ description: Shared status string
1021
+ marked_stale_at:
1022
+ type:
1023
+ - string
1024
+ - "null"
1025
+ description: Date when marked stale
1026
+ label:
1027
+ type:
1028
+ - string
1029
+ - "null"
1030
+ description: User label for the connection
1031
+ identifier:
1032
+ type:
1033
+ - string
1034
+ - "null"
1035
+ description: Identifier
1036
+ title:
1037
+ type:
1038
+ - string
1039
+ - "null"
1040
+ description: Title of the connection
1041
+ url:
1042
+ type: string
1043
+ description: URL to the connection resource
1044
+ groups:
1045
+ type: array
1046
+ items:
1047
+ type: object
1048
+ additionalProperties: {}
1049
+ description: Groups associated with the connection
1050
+ description: Array of groups associated with the connection
1051
+ members:
1052
+ type: string
1053
+ description: Members associated with the connection
1054
+ permissions:
1055
+ type: object
1056
+ additionalProperties:
1057
+ type: boolean
1058
+ description: Permissions for the connection
1059
+ implementation_id:
1060
+ type: string
1061
+ description: Implementation ID (was selected_api)
1062
+ profile_id:
1063
+ type: string
1064
+ description: Profile ID (was customuser_id)
1065
+ is_expired:
1066
+ type: string
1067
+ description: Whether the connection is expired (mapped from is_stale)
1068
+ expired_at:
1069
+ type:
1070
+ - string
1071
+ - "null"
1072
+ description: Date when connection expired (mapped from marked_stale_at)
1073
+ app_key:
1074
+ type: string
1075
+ description: App Key extracted from implementation_id
1076
+ app_version:
1077
+ type: string
1078
+ description: App Version extracted from implementation_id
1079
+ required:
1080
+ - id
1081
+ - date
1082
+ - account_id
1083
+ - is_invite_only
1084
+ - is_private
1085
+ - shared_with_all
1086
+ description: Array of connection items
1087
+ links:
1088
+ type: object
1089
+ properties:
1090
+ next:
1091
+ type:
1092
+ - string
1093
+ - "null"
1094
+ description: Fully qualified URL for the next page of results (if available), e.g. https://sdkapi.zapier.com/api/v0/connections?offset=100&page_size=50
1095
+ description: Pagination links for navigating through results
1096
+ meta:
1097
+ type: object
1098
+ properties:
1099
+ count:
1100
+ type: number
1101
+ description: Total number of items
1102
+ limit:
1103
+ type: number
1104
+ description: Number of items per page
1105
+ offset:
1106
+ type: number
1107
+ description: Offset of the current page
1108
+ required:
1109
+ - count
1110
+ - limit
1111
+ - offset
1112
+ description: Metadata for the paginated result set
1113
+ required:
1114
+ - data
1115
+ - links
1116
+ - meta
1117
+ description: Response schema for listing connections
844
1118
  parameters: {}
845
1119
  securitySchemes:
846
1120
  userJwt:
@@ -1135,7 +1409,8 @@ paths:
1135
1409
  /api/v0/authentications/{authenticationId}:
1136
1410
  get:
1137
1411
  summary: Get an authentication
1138
- description: Returns a single authentication by ID.
1412
+ description: "Returns a single authentication by ID. Deprecated: Use /api/v0/connections/{connectionId} instead."
1413
+ deprecated: true
1139
1414
  tags:
1140
1415
  - Authentications
1141
1416
  operationId: v0_get_authentication
@@ -1178,6 +1453,52 @@ paths:
1178
1453
  headers: *a6
1179
1454
  content:
1180
1455
  application/json: *a7
1456
+ /api/v0/connections/{connectionId}:
1457
+ get:
1458
+ summary: Get a connection
1459
+ description: Returns a single connection by ID.
1460
+ tags:
1461
+ - Connections
1462
+ operationId: v0_get_connection
1463
+ security:
1464
+ - userJwt: []
1465
+ parameters:
1466
+ - schema:
1467
+ type: string
1468
+ description: Connection ID to retrieve
1469
+ required: true
1470
+ description: Connection ID to retrieve
1471
+ name: connectionId
1472
+ in: path
1473
+ responses:
1474
+ "200":
1475
+ description: Success
1476
+ content:
1477
+ application/json:
1478
+ schema:
1479
+ $ref: "#/components/schemas/GetConnectionResponse"
1480
+ "400":
1481
+ description: Bad Request
1482
+ content:
1483
+ application/json: *a1
1484
+ "401":
1485
+ description: Unauthorized
1486
+ content:
1487
+ application/json: *a2
1488
+ "429":
1489
+ description: Too Many Requests
1490
+ headers: *a3
1491
+ content:
1492
+ application/json: *a4
1493
+ "500":
1494
+ description: Server Error
1495
+ content:
1496
+ application/json: *a5
1497
+ "503":
1498
+ description: Service Unavailable
1499
+ headers: *a6
1500
+ content:
1501
+ application/json: *a7
1181
1502
  /api/v0/actions:
1182
1503
  get:
1183
1504
  summary: List actions
@@ -1311,7 +1632,8 @@ paths:
1311
1632
  /api/v0/authentications:
1312
1633
  get:
1313
1634
  summary: List authentications
1314
- description: Returns a paginated list of authentications with optional filtering by app, search term, owner, etc.
1635
+ description: "Returns a paginated list of authentications with optional filtering by app, search term, owner, etc. Deprecated: Use /api/v0/connections instead."
1636
+ deprecated: true
1315
1637
  tags:
1316
1638
  - Authentications
1317
1639
  operationId: v0_list_authentications
@@ -1411,4 +1733,107 @@ paths:
1411
1733
  headers: *a6
1412
1734
  content:
1413
1735
  application/json: *a7
1736
+ /api/v0/connections:
1737
+ get:
1738
+ summary: List connections
1739
+ description: Returns a paginated list of connections with optional filtering by app, search term, owner, etc.
1740
+ tags:
1741
+ - Connections
1742
+ operationId: v0_list_connections
1743
+ security:
1744
+ - userJwt: []
1745
+ parameters:
1746
+ - schema:
1747
+ type: string
1748
+ description: Filter connections by app key (e.g., 'SlackCLIAPI' or slug like 'github')
1749
+ required: false
1750
+ description: Filter connections by app key (e.g., 'SlackCLIAPI' or slug like 'github')
1751
+ name: app_key
1752
+ in: query
1753
+ - schema:
1754
+ type: string
1755
+ description: Comma-separated list of connection IDs to filter by
1756
+ required: false
1757
+ description: Comma-separated list of connection IDs to filter by
1758
+ name: connection_ids
1759
+ in: query
1760
+ - schema:
1761
+ type: string
1762
+ description: Search term to filter connections by title
1763
+ required: false
1764
+ description: Search term to filter connections by title
1765
+ name: search
1766
+ in: query
1767
+ - schema:
1768
+ type: string
1769
+ description: Filter connections by exact title match (searches first, then filters locally)
1770
+ required: false
1771
+ description: Filter connections by exact title match (searches first, then filters locally)
1772
+ name: title
1773
+ in: query
1774
+ - schema:
1775
+ type: string
1776
+ description: Filter connections by account ID
1777
+ required: false
1778
+ description: Filter connections by account ID
1779
+ name: account_id
1780
+ in: query
1781
+ - schema:
1782
+ type: string
1783
+ description: Filter by owner, 'me' for your own connections or a specific user ID
1784
+ required: false
1785
+ description: Filter by owner, 'me' for your own connections or a specific user ID
1786
+ name: owner
1787
+ in: query
1788
+ - schema:
1789
+ type: boolean
1790
+ description: Filter by expired status (true = expired only, false = non-expired only)
1791
+ required: false
1792
+ description: Filter by expired status (true = expired only, false = non-expired only)
1793
+ name: is_expired
1794
+ in: query
1795
+ - schema:
1796
+ type: number
1797
+ minimum: 1
1798
+ description: Number of connections per page
1799
+ required: false
1800
+ description: Number of connections per page
1801
+ name: page_size
1802
+ in: query
1803
+ - schema:
1804
+ type: string
1805
+ description: Pagination offset from previous response
1806
+ required: false
1807
+ description: Pagination offset from previous response
1808
+ name: offset
1809
+ in: query
1810
+ responses:
1811
+ "200":
1812
+ description: Successfully retrieved connections list
1813
+ content:
1814
+ application/json:
1815
+ schema:
1816
+ $ref: "#/components/schemas/ListConnectionsResponse"
1817
+ "400":
1818
+ description: Bad Request
1819
+ content:
1820
+ application/json: *a1
1821
+ "401":
1822
+ description: Unauthorized
1823
+ content:
1824
+ application/json: *a2
1825
+ "429":
1826
+ description: Too Many Requests
1827
+ headers: *a3
1828
+ content:
1829
+ application/json: *a4
1830
+ "500":
1831
+ description: Server Error
1832
+ content:
1833
+ application/json: *a5
1834
+ "503":
1835
+ description: Service Unavailable
1836
+ headers: *a6
1837
+ content:
1838
+ application/json: *a7
1414
1839
  webhooks: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-core",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "Core schemas and TypeScript types for the Zapier SDK API",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Zapier, Inc.",
@@ -31,6 +31,11 @@
31
31
  "import": "./dist/v0/schemas/authentications.js",
32
32
  "require": "./dist/v0/schemas/authentications.cjs"
33
33
  },
34
+ "./v0/schemas/connections": {
35
+ "types": "./dist/v0/schemas/connections.d.ts",
36
+ "import": "./dist/v0/schemas/connections.js",
37
+ "require": "./dist/v0/schemas/connections.cjs"
38
+ },
34
39
  "./v0/schemas/apps": {
35
40
  "types": "./dist/v0/schemas/apps.d.ts",
36
41
  "import": "./dist/v0/schemas/apps.js",