@zapier/zapier-sdk-core 0.9.2 → 0.11.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,17 @@
1
1
  # @zapier/zapier-sdk-core
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - eb026a9: Add `GET /api/v0/approvals/{approvalId}` polling endpoint. The SDK uses this to poll approval status. On resolution, sdkapi invalidates the token-exchange cache so the next request re-fetches a fresh JWT with the updated `policy_urn`.
8
+
9
+ ## 0.10.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 55b8587: Allow optional `policy` passthrough on create-client-credentials request. sdkapi forwards the field to Identity, which owns validation.
14
+
3
15
  ## 0.9.2
4
16
 
5
17
  ### Patch Changes
@@ -64,6 +64,10 @@ var tags = [
64
64
  {
65
65
  name: "Documentation",
66
66
  description: "Documentation-related routes"
67
+ },
68
+ {
69
+ name: "Approvals",
70
+ description: "Approval request management routes"
67
71
  }
68
72
  ];
69
73
  var securitySchemes = {
@@ -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 (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":[]}
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 name: \"Approvals\",\n description: \"Approval request management 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;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":[]}
@@ -36,6 +36,10 @@ var tags = [
36
36
  {
37
37
  name: "Documentation",
38
38
  description: "Documentation-related routes"
39
+ },
40
+ {
41
+ name: "Approvals",
42
+ description: "Approval request management routes"
39
43
  }
40
44
  ];
41
45
  var securitySchemes = {
@@ -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 (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":[]}
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 name: \"Approvals\",\n description: \"Approval request management 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;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":[]}
@@ -4,14 +4,14 @@ import { z } from 'zod';
4
4
  * Action type enum matching the internal Zapier API
5
5
  */
6
6
  declare const ActionTypeSchema: z.ZodEnum<{
7
+ filter: "filter";
7
8
  read: "read";
8
9
  read_bulk: "read_bulk";
9
- write: "write";
10
+ run: "run";
10
11
  search: "search";
11
- search_or_write: "search_or_write";
12
12
  search_and_write: "search_and_write";
13
- filter: "filter";
14
- run: "run";
13
+ search_or_write: "search_or_write";
14
+ write: "write";
15
15
  }>;
16
16
  type ActionType = z.infer<typeof ActionTypeSchema>;
17
17
  /**
@@ -20,14 +20,14 @@ type ActionType = z.infer<typeof ActionTypeSchema>;
20
20
  declare const ActionSchema: z.ZodObject<{
21
21
  id: z.ZodOptional<z.ZodString>;
22
22
  type: z.ZodEnum<{
23
+ filter: "filter";
23
24
  read: "read";
24
25
  read_bulk: "read_bulk";
25
- write: "write";
26
+ run: "run";
26
27
  search: "search";
27
- search_or_write: "search_or_write";
28
28
  search_and_write: "search_and_write";
29
- filter: "filter";
30
- run: "run";
29
+ search_or_write: "search_or_write";
30
+ write: "write";
31
31
  }>;
32
32
  key: z.ZodString;
33
33
  name: z.ZodString;
@@ -59,14 +59,14 @@ declare const ActionItemSchema: z.ZodObject<{
59
59
  app_key: z.ZodString;
60
60
  app_version: z.ZodOptional<z.ZodString>;
61
61
  action_type: z.ZodEnum<{
62
+ filter: "filter";
62
63
  read: "read";
63
64
  read_bulk: "read_bulk";
64
- write: "write";
65
+ run: "run";
65
66
  search: "search";
66
- search_or_write: "search_or_write";
67
67
  search_and_write: "search_and_write";
68
- filter: "filter";
69
- run: "run";
68
+ search_or_write: "search_or_write";
69
+ write: "write";
70
70
  }>;
71
71
  title: z.ZodString;
72
72
  type: z.ZodLiteral<"action">;
@@ -82,14 +82,14 @@ declare const ImplementationWithActionsSchema: z.ZodObject<{
82
82
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
83
83
  id: z.ZodOptional<z.ZodString>;
84
84
  type: z.ZodEnum<{
85
+ filter: "filter";
85
86
  read: "read";
86
87
  read_bulk: "read_bulk";
87
- write: "write";
88
+ run: "run";
88
89
  search: "search";
89
- search_or_write: "search_or_write";
90
90
  search_and_write: "search_and_write";
91
- filter: "filter";
92
- run: "run";
91
+ search_or_write: "search_or_write";
92
+ write: "write";
93
93
  }>;
94
94
  key: z.ZodString;
95
95
  name: z.ZodString;
@@ -121,14 +121,14 @@ declare const ImplementationsWithActionsResponseSchema: z.ZodObject<{
121
121
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
122
122
  id: z.ZodOptional<z.ZodString>;
123
123
  type: z.ZodEnum<{
124
+ filter: "filter";
124
125
  read: "read";
125
126
  read_bulk: "read_bulk";
126
- write: "write";
127
+ run: "run";
127
128
  search: "search";
128
- search_or_write: "search_or_write";
129
129
  search_and_write: "search_and_write";
130
- filter: "filter";
131
- run: "run";
130
+ search_or_write: "search_or_write";
131
+ write: "write";
132
132
  }>;
133
133
  key: z.ZodString;
134
134
  name: z.ZodString;
@@ -154,24 +154,24 @@ declare const ListActionsQuerySchema: z.ZodObject<{
154
154
  appKey: z.ZodOptional<z.ZodString>;
155
155
  app_key: z.ZodOptional<z.ZodString>;
156
156
  actionType: z.ZodOptional<z.ZodEnum<{
157
+ filter: "filter";
157
158
  read: "read";
158
159
  read_bulk: "read_bulk";
159
- write: "write";
160
+ run: "run";
160
161
  search: "search";
161
- search_or_write: "search_or_write";
162
162
  search_and_write: "search_and_write";
163
- filter: "filter";
164
- run: "run";
163
+ search_or_write: "search_or_write";
164
+ write: "write";
165
165
  }>>;
166
166
  action_type: z.ZodOptional<z.ZodEnum<{
167
+ filter: "filter";
167
168
  read: "read";
168
169
  read_bulk: "read_bulk";
169
- write: "write";
170
+ run: "run";
170
171
  search: "search";
171
- search_or_write: "search_or_write";
172
172
  search_and_write: "search_and_write";
173
- filter: "filter";
174
- run: "run";
173
+ search_or_write: "search_or_write";
174
+ write: "write";
175
175
  }>>;
176
176
  }, z.core.$strip>;
177
177
  /**
@@ -187,14 +187,14 @@ declare const ListActionsResponseSchema: z.ZodObject<{
187
187
  app_key: z.ZodString;
188
188
  app_version: z.ZodOptional<z.ZodString>;
189
189
  action_type: z.ZodEnum<{
190
+ filter: "filter";
190
191
  read: "read";
191
192
  read_bulk: "read_bulk";
192
- write: "write";
193
+ run: "run";
193
194
  search: "search";
194
- search_or_write: "search_or_write";
195
195
  search_and_write: "search_and_write";
196
- filter: "filter";
197
- run: "run";
196
+ search_or_write: "search_or_write";
197
+ write: "write";
198
198
  }>;
199
199
  title: z.ZodString;
200
200
  type: z.ZodLiteral<"action">;
@@ -4,14 +4,14 @@ import { z } from 'zod';
4
4
  * Action type enum matching the internal Zapier API
5
5
  */
6
6
  declare const ActionTypeSchema: z.ZodEnum<{
7
+ filter: "filter";
7
8
  read: "read";
8
9
  read_bulk: "read_bulk";
9
- write: "write";
10
+ run: "run";
10
11
  search: "search";
11
- search_or_write: "search_or_write";
12
12
  search_and_write: "search_and_write";
13
- filter: "filter";
14
- run: "run";
13
+ search_or_write: "search_or_write";
14
+ write: "write";
15
15
  }>;
16
16
  type ActionType = z.infer<typeof ActionTypeSchema>;
17
17
  /**
@@ -20,14 +20,14 @@ type ActionType = z.infer<typeof ActionTypeSchema>;
20
20
  declare const ActionSchema: z.ZodObject<{
21
21
  id: z.ZodOptional<z.ZodString>;
22
22
  type: z.ZodEnum<{
23
+ filter: "filter";
23
24
  read: "read";
24
25
  read_bulk: "read_bulk";
25
- write: "write";
26
+ run: "run";
26
27
  search: "search";
27
- search_or_write: "search_or_write";
28
28
  search_and_write: "search_and_write";
29
- filter: "filter";
30
- run: "run";
29
+ search_or_write: "search_or_write";
30
+ write: "write";
31
31
  }>;
32
32
  key: z.ZodString;
33
33
  name: z.ZodString;
@@ -59,14 +59,14 @@ declare const ActionItemSchema: z.ZodObject<{
59
59
  app_key: z.ZodString;
60
60
  app_version: z.ZodOptional<z.ZodString>;
61
61
  action_type: z.ZodEnum<{
62
+ filter: "filter";
62
63
  read: "read";
63
64
  read_bulk: "read_bulk";
64
- write: "write";
65
+ run: "run";
65
66
  search: "search";
66
- search_or_write: "search_or_write";
67
67
  search_and_write: "search_and_write";
68
- filter: "filter";
69
- run: "run";
68
+ search_or_write: "search_or_write";
69
+ write: "write";
70
70
  }>;
71
71
  title: z.ZodString;
72
72
  type: z.ZodLiteral<"action">;
@@ -82,14 +82,14 @@ declare const ImplementationWithActionsSchema: z.ZodObject<{
82
82
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
83
83
  id: z.ZodOptional<z.ZodString>;
84
84
  type: z.ZodEnum<{
85
+ filter: "filter";
85
86
  read: "read";
86
87
  read_bulk: "read_bulk";
87
- write: "write";
88
+ run: "run";
88
89
  search: "search";
89
- search_or_write: "search_or_write";
90
90
  search_and_write: "search_and_write";
91
- filter: "filter";
92
- run: "run";
91
+ search_or_write: "search_or_write";
92
+ write: "write";
93
93
  }>;
94
94
  key: z.ZodString;
95
95
  name: z.ZodString;
@@ -121,14 +121,14 @@ declare const ImplementationsWithActionsResponseSchema: z.ZodObject<{
121
121
  actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
122
122
  id: z.ZodOptional<z.ZodString>;
123
123
  type: z.ZodEnum<{
124
+ filter: "filter";
124
125
  read: "read";
125
126
  read_bulk: "read_bulk";
126
- write: "write";
127
+ run: "run";
127
128
  search: "search";
128
- search_or_write: "search_or_write";
129
129
  search_and_write: "search_and_write";
130
- filter: "filter";
131
- run: "run";
130
+ search_or_write: "search_or_write";
131
+ write: "write";
132
132
  }>;
133
133
  key: z.ZodString;
134
134
  name: z.ZodString;
@@ -154,24 +154,24 @@ declare const ListActionsQuerySchema: z.ZodObject<{
154
154
  appKey: z.ZodOptional<z.ZodString>;
155
155
  app_key: z.ZodOptional<z.ZodString>;
156
156
  actionType: z.ZodOptional<z.ZodEnum<{
157
+ filter: "filter";
157
158
  read: "read";
158
159
  read_bulk: "read_bulk";
159
- write: "write";
160
+ run: "run";
160
161
  search: "search";
161
- search_or_write: "search_or_write";
162
162
  search_and_write: "search_and_write";
163
- filter: "filter";
164
- run: "run";
163
+ search_or_write: "search_or_write";
164
+ write: "write";
165
165
  }>>;
166
166
  action_type: z.ZodOptional<z.ZodEnum<{
167
+ filter: "filter";
167
168
  read: "read";
168
169
  read_bulk: "read_bulk";
169
- write: "write";
170
+ run: "run";
170
171
  search: "search";
171
- search_or_write: "search_or_write";
172
172
  search_and_write: "search_and_write";
173
- filter: "filter";
174
- run: "run";
173
+ search_or_write: "search_or_write";
174
+ write: "write";
175
175
  }>>;
176
176
  }, z.core.$strip>;
177
177
  /**
@@ -187,14 +187,14 @@ declare const ListActionsResponseSchema: z.ZodObject<{
187
187
  app_key: z.ZodString;
188
188
  app_version: z.ZodOptional<z.ZodString>;
189
189
  action_type: z.ZodEnum<{
190
+ filter: "filter";
190
191
  read: "read";
191
192
  read_bulk: "read_bulk";
192
- write: "write";
193
+ run: "run";
193
194
  search: "search";
194
- search_or_write: "search_or_write";
195
195
  search_and_write: "search_and_write";
196
- filter: "filter";
197
- run: "run";
196
+ search_or_write: "search_or_write";
197
+ write: "write";
198
198
  }>;
199
199
  title: z.ZodString;
200
200
  type: z.ZodLiteral<"action">;
@@ -0,0 +1,45 @@
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/approvals.ts
21
+ var approvals_exports = {};
22
+ __export(approvals_exports, {
23
+ ApprovalResponseSchema: () => ApprovalResponseSchema,
24
+ ApprovalStatusSchema: () => ApprovalStatusSchema,
25
+ GetApprovalParamSchema: () => GetApprovalParamSchema
26
+ });
27
+ module.exports = __toCommonJS(approvals_exports);
28
+ var import_zod = require("zod");
29
+ var ApprovalStatusSchema = import_zod.z.enum(["pending_approval", "approved", "denied"]).describe("The current status of the approval request");
30
+ var ApprovalResponseSchema = import_zod.z.object({
31
+ status: ApprovalStatusSchema,
32
+ approval_id: import_zod.z.string().describe("Unique identifier for the approval request"),
33
+ approval_url: import_zod.z.string().optional().describe("URL for the user to visit and approve/deny the request"),
34
+ poll_url: import_zod.z.string().optional().describe("URL for the SDK to poll for status changes")
35
+ });
36
+ var GetApprovalParamSchema = import_zod.z.object({
37
+ approvalId: import_zod.z.string().describe("The unique identifier of the approval request")
38
+ });
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ ApprovalResponseSchema,
42
+ ApprovalStatusSchema,
43
+ GetApprovalParamSchema
44
+ });
45
+ //# sourceMappingURL=approvals.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/v0/schemas/approvals.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Shared approval schemas used by both route definitions and core models.\n */\n\n/**\n * Approval status enum\n */\nexport const ApprovalStatusSchema = z\n .enum([\"pending_approval\", \"approved\", \"denied\"])\n .describe(\"The current status of the approval request\");\n\n/**\n * Approval response shape returned by both the poll endpoint and the 202 proxy response.\n */\nexport const ApprovalResponseSchema = z.object({\n status: ApprovalStatusSchema,\n approval_id: z\n .string()\n .describe(\"Unique identifier for the approval request\"),\n approval_url: z\n .string()\n .optional()\n .describe(\"URL for the user to visit and approve/deny the request\"),\n poll_url: z\n .string()\n .optional()\n .describe(\"URL for the SDK to poll for status changes\"),\n});\n\nexport type ApprovalStatus = z.infer<typeof ApprovalStatusSchema>;\nexport type ApprovalResponse = z.infer<typeof ApprovalResponseSchema>;\n\n/**\n * Path parameters for get approval\n */\nexport const GetApprovalParamSchema = z.object({\n approvalId: z\n .string()\n .describe(\"The unique identifier of the approval request\"),\n});\n\nexport type GetApprovalParam = z.infer<typeof GetApprovalParamSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AASX,IAAM,uBAAuB,aACjC,KAAK,CAAC,oBAAoB,YAAY,QAAQ,CAAC,EAC/C,SAAS,4CAA4C;AAKjD,IAAM,yBAAyB,aAAE,OAAO;AAAA,EAC7C,QAAQ;AAAA,EACR,aAAa,aACV,OAAO,EACP,SAAS,4CAA4C;AAAA,EACxD,cAAc,aACX,OAAO,EACP,SAAS,EACT,SAAS,wDAAwD;AAAA,EACpE,UAAU,aACP,OAAO,EACP,SAAS,EACT,SAAS,4CAA4C;AAC1D,CAAC;AAQM,IAAM,yBAAyB,aAAE,OAAO;AAAA,EAC7C,YAAY,aACT,OAAO,EACP,SAAS,+CAA+C;AAC7D,CAAC;","names":[]}
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Shared approval schemas used by both route definitions and core models.
5
+ */
6
+ /**
7
+ * Approval status enum
8
+ */
9
+ declare const ApprovalStatusSchema: z.ZodEnum<{
10
+ pending_approval: "pending_approval";
11
+ approved: "approved";
12
+ denied: "denied";
13
+ }>;
14
+ /**
15
+ * Approval response shape returned by both the poll endpoint and the 202 proxy response.
16
+ */
17
+ declare const ApprovalResponseSchema: z.ZodObject<{
18
+ status: z.ZodEnum<{
19
+ pending_approval: "pending_approval";
20
+ approved: "approved";
21
+ denied: "denied";
22
+ }>;
23
+ approval_id: z.ZodString;
24
+ approval_url: z.ZodOptional<z.ZodString>;
25
+ poll_url: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>;
27
+ type ApprovalStatus = z.infer<typeof ApprovalStatusSchema>;
28
+ type ApprovalResponse = z.infer<typeof ApprovalResponseSchema>;
29
+ /**
30
+ * Path parameters for get approval
31
+ */
32
+ declare const GetApprovalParamSchema: z.ZodObject<{
33
+ approvalId: z.ZodString;
34
+ }, z.core.$strip>;
35
+ type GetApprovalParam = z.infer<typeof GetApprovalParamSchema>;
36
+
37
+ export { type ApprovalResponse, ApprovalResponseSchema, type ApprovalStatus, ApprovalStatusSchema, type GetApprovalParam, GetApprovalParamSchema };
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Shared approval schemas used by both route definitions and core models.
5
+ */
6
+ /**
7
+ * Approval status enum
8
+ */
9
+ declare const ApprovalStatusSchema: z.ZodEnum<{
10
+ pending_approval: "pending_approval";
11
+ approved: "approved";
12
+ denied: "denied";
13
+ }>;
14
+ /**
15
+ * Approval response shape returned by both the poll endpoint and the 202 proxy response.
16
+ */
17
+ declare const ApprovalResponseSchema: z.ZodObject<{
18
+ status: z.ZodEnum<{
19
+ pending_approval: "pending_approval";
20
+ approved: "approved";
21
+ denied: "denied";
22
+ }>;
23
+ approval_id: z.ZodString;
24
+ approval_url: z.ZodOptional<z.ZodString>;
25
+ poll_url: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>;
27
+ type ApprovalStatus = z.infer<typeof ApprovalStatusSchema>;
28
+ type ApprovalResponse = z.infer<typeof ApprovalResponseSchema>;
29
+ /**
30
+ * Path parameters for get approval
31
+ */
32
+ declare const GetApprovalParamSchema: z.ZodObject<{
33
+ approvalId: z.ZodString;
34
+ }, z.core.$strip>;
35
+ type GetApprovalParam = z.infer<typeof GetApprovalParamSchema>;
36
+
37
+ export { type ApprovalResponse, ApprovalResponseSchema, type ApprovalStatus, ApprovalStatusSchema, type GetApprovalParam, GetApprovalParamSchema };
@@ -0,0 +1,18 @@
1
+ // src/v0/schemas/approvals.ts
2
+ import { z } from "zod";
3
+ var ApprovalStatusSchema = z.enum(["pending_approval", "approved", "denied"]).describe("The current status of the approval request");
4
+ var ApprovalResponseSchema = z.object({
5
+ status: ApprovalStatusSchema,
6
+ approval_id: z.string().describe("Unique identifier for the approval request"),
7
+ approval_url: z.string().optional().describe("URL for the user to visit and approve/deny the request"),
8
+ poll_url: z.string().optional().describe("URL for the SDK to poll for status changes")
9
+ });
10
+ var GetApprovalParamSchema = z.object({
11
+ approvalId: z.string().describe("The unique identifier of the approval request")
12
+ });
13
+ export {
14
+ ApprovalResponseSchema,
15
+ ApprovalStatusSchema,
16
+ GetApprovalParamSchema
17
+ };
18
+ //# sourceMappingURL=approvals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/v0/schemas/approvals.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Shared approval schemas used by both route definitions and core models.\n */\n\n/**\n * Approval status enum\n */\nexport const ApprovalStatusSchema = z\n .enum([\"pending_approval\", \"approved\", \"denied\"])\n .describe(\"The current status of the approval request\");\n\n/**\n * Approval response shape returned by both the poll endpoint and the 202 proxy response.\n */\nexport const ApprovalResponseSchema = z.object({\n status: ApprovalStatusSchema,\n approval_id: z\n .string()\n .describe(\"Unique identifier for the approval request\"),\n approval_url: z\n .string()\n .optional()\n .describe(\"URL for the user to visit and approve/deny the request\"),\n poll_url: z\n .string()\n .optional()\n .describe(\"URL for the SDK to poll for status changes\"),\n});\n\nexport type ApprovalStatus = z.infer<typeof ApprovalStatusSchema>;\nexport type ApprovalResponse = z.infer<typeof ApprovalResponseSchema>;\n\n/**\n * Path parameters for get approval\n */\nexport const GetApprovalParamSchema = z.object({\n approvalId: z\n .string()\n .describe(\"The unique identifier of the approval request\"),\n});\n\nexport type GetApprovalParam = z.infer<typeof GetApprovalParamSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AASX,IAAM,uBAAuB,EACjC,KAAK,CAAC,oBAAoB,YAAY,QAAQ,CAAC,EAC/C,SAAS,4CAA4C;AAKjD,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,QAAQ;AAAA,EACR,aAAa,EACV,OAAO,EACP,SAAS,4CAA4C;AAAA,EACxD,cAAc,EACX,OAAO,EACP,SAAS,EACT,SAAS,wDAAwD;AAAA,EACpE,UAAU,EACP,OAAO,EACP,SAAS,EACT,SAAS,4CAA4C;AAC1D,CAAC;AAQM,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,YAAY,EACT,OAAO,EACP,SAAS,+CAA+C;AAC7D,CAAC;","names":[]}
@@ -5,9 +5,23 @@ import { z } from 'zod';
5
5
  * This extends ImplementationMetaSchema with transformed fields (title, key, implementation_id).
6
6
  */
7
7
  declare const AppItemSchema: z.ZodObject<{
8
+ description: z.ZodOptional<z.ZodString>;
9
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
10
+ auth_type: z.ZodOptional<z.ZodString>;
11
+ actions: z.ZodOptional<z.ZodObject<{
12
+ read: z.ZodOptional<z.ZodNumber>;
13
+ read_bulk: z.ZodOptional<z.ZodNumber>;
14
+ write: z.ZodOptional<z.ZodNumber>;
15
+ search: z.ZodOptional<z.ZodNumber>;
16
+ search_or_write: z.ZodOptional<z.ZodNumber>;
17
+ search_and_write: z.ZodOptional<z.ZodNumber>;
18
+ filter: z.ZodOptional<z.ZodNumber>;
19
+ }, z.core.$strip>>;
20
+ is_deprecated: z.ZodOptional<z.ZodBoolean>;
21
+ is_beta: z.ZodOptional<z.ZodBoolean>;
22
+ is_premium: z.ZodOptional<z.ZodBoolean>;
8
23
  slug: z.ZodString;
9
24
  age_in_days: z.ZodOptional<z.ZodNumber>;
10
- auth_type: z.ZodOptional<z.ZodString>;
11
25
  banner: z.ZodOptional<z.ZodString>;
12
26
  categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
13
27
  id: z.ZodNumber;
@@ -27,26 +41,12 @@ declare const AppItemSchema: z.ZodObject<{
27
41
  has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
28
42
  has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
29
43
  has_writes: z.ZodOptional<z.ZodBoolean>;
30
- is_beta: z.ZodOptional<z.ZodBoolean>;
31
44
  is_built_in: z.ZodOptional<z.ZodBoolean>;
32
- is_deprecated: z.ZodOptional<z.ZodBoolean>;
33
45
  is_featured: z.ZodOptional<z.ZodBoolean>;
34
- is_hidden: z.ZodOptional<z.ZodBoolean>;
35
46
  is_invite: z.ZodOptional<z.ZodBoolean>;
36
- is_premium: z.ZodOptional<z.ZodBoolean>;
37
47
  is_public: z.ZodOptional<z.ZodBoolean>;
38
48
  is_upcoming: z.ZodOptional<z.ZodBoolean>;
39
49
  visibility: z.ZodOptional<z.ZodString>;
40
- actions: z.ZodOptional<z.ZodObject<{
41
- read: z.ZodOptional<z.ZodNumber>;
42
- read_bulk: z.ZodOptional<z.ZodNumber>;
43
- write: z.ZodOptional<z.ZodNumber>;
44
- search: z.ZodOptional<z.ZodNumber>;
45
- search_or_write: z.ZodOptional<z.ZodNumber>;
46
- search_and_write: z.ZodOptional<z.ZodNumber>;
47
- filter: z.ZodOptional<z.ZodNumber>;
48
- }, z.core.$strip>>;
49
- description: z.ZodOptional<z.ZodString>;
50
50
  primary_color: z.ZodOptional<z.ZodString>;
51
51
  secondary_color: z.ZodOptional<z.ZodString>;
52
52
  classification: z.ZodOptional<z.ZodString>;
@@ -74,9 +74,23 @@ declare const ListAppsQuerySchema: z.ZodObject<{
74
74
  */
75
75
  declare const ListAppsResponseSchema: z.ZodObject<{
76
76
  data: z.ZodArray<z.ZodObject<{
77
+ description: z.ZodOptional<z.ZodString>;
78
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
79
+ auth_type: z.ZodOptional<z.ZodString>;
80
+ actions: z.ZodOptional<z.ZodObject<{
81
+ read: z.ZodOptional<z.ZodNumber>;
82
+ read_bulk: z.ZodOptional<z.ZodNumber>;
83
+ write: z.ZodOptional<z.ZodNumber>;
84
+ search: z.ZodOptional<z.ZodNumber>;
85
+ search_or_write: z.ZodOptional<z.ZodNumber>;
86
+ search_and_write: z.ZodOptional<z.ZodNumber>;
87
+ filter: z.ZodOptional<z.ZodNumber>;
88
+ }, z.core.$strip>>;
89
+ is_deprecated: z.ZodOptional<z.ZodBoolean>;
90
+ is_beta: z.ZodOptional<z.ZodBoolean>;
91
+ is_premium: z.ZodOptional<z.ZodBoolean>;
77
92
  slug: z.ZodString;
78
93
  age_in_days: z.ZodOptional<z.ZodNumber>;
79
- auth_type: z.ZodOptional<z.ZodString>;
80
94
  banner: z.ZodOptional<z.ZodString>;
81
95
  categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
82
96
  id: z.ZodNumber;
@@ -96,26 +110,12 @@ declare const ListAppsResponseSchema: z.ZodObject<{
96
110
  has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
97
111
  has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
98
112
  has_writes: z.ZodOptional<z.ZodBoolean>;
99
- is_beta: z.ZodOptional<z.ZodBoolean>;
100
113
  is_built_in: z.ZodOptional<z.ZodBoolean>;
101
- is_deprecated: z.ZodOptional<z.ZodBoolean>;
102
114
  is_featured: z.ZodOptional<z.ZodBoolean>;
103
- is_hidden: z.ZodOptional<z.ZodBoolean>;
104
115
  is_invite: z.ZodOptional<z.ZodBoolean>;
105
- is_premium: z.ZodOptional<z.ZodBoolean>;
106
116
  is_public: z.ZodOptional<z.ZodBoolean>;
107
117
  is_upcoming: z.ZodOptional<z.ZodBoolean>;
108
118
  visibility: z.ZodOptional<z.ZodString>;
109
- actions: z.ZodOptional<z.ZodObject<{
110
- read: z.ZodOptional<z.ZodNumber>;
111
- read_bulk: z.ZodOptional<z.ZodNumber>;
112
- write: z.ZodOptional<z.ZodNumber>;
113
- search: z.ZodOptional<z.ZodNumber>;
114
- search_or_write: z.ZodOptional<z.ZodNumber>;
115
- search_and_write: z.ZodOptional<z.ZodNumber>;
116
- filter: z.ZodOptional<z.ZodNumber>;
117
- }, z.core.$strip>>;
118
- description: z.ZodOptional<z.ZodString>;
119
119
  primary_color: z.ZodOptional<z.ZodString>;
120
120
  secondary_color: z.ZodOptional<z.ZodString>;
121
121
  classification: z.ZodOptional<z.ZodString>;
@@ -5,9 +5,23 @@ import { z } from 'zod';
5
5
  * This extends ImplementationMetaSchema with transformed fields (title, key, implementation_id).
6
6
  */
7
7
  declare const AppItemSchema: z.ZodObject<{
8
+ description: z.ZodOptional<z.ZodString>;
9
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
10
+ auth_type: z.ZodOptional<z.ZodString>;
11
+ actions: z.ZodOptional<z.ZodObject<{
12
+ read: z.ZodOptional<z.ZodNumber>;
13
+ read_bulk: z.ZodOptional<z.ZodNumber>;
14
+ write: z.ZodOptional<z.ZodNumber>;
15
+ search: z.ZodOptional<z.ZodNumber>;
16
+ search_or_write: z.ZodOptional<z.ZodNumber>;
17
+ search_and_write: z.ZodOptional<z.ZodNumber>;
18
+ filter: z.ZodOptional<z.ZodNumber>;
19
+ }, z.core.$strip>>;
20
+ is_deprecated: z.ZodOptional<z.ZodBoolean>;
21
+ is_beta: z.ZodOptional<z.ZodBoolean>;
22
+ is_premium: z.ZodOptional<z.ZodBoolean>;
8
23
  slug: z.ZodString;
9
24
  age_in_days: z.ZodOptional<z.ZodNumber>;
10
- auth_type: z.ZodOptional<z.ZodString>;
11
25
  banner: z.ZodOptional<z.ZodString>;
12
26
  categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
13
27
  id: z.ZodNumber;
@@ -27,26 +41,12 @@ declare const AppItemSchema: z.ZodObject<{
27
41
  has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
28
42
  has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
29
43
  has_writes: z.ZodOptional<z.ZodBoolean>;
30
- is_beta: z.ZodOptional<z.ZodBoolean>;
31
44
  is_built_in: z.ZodOptional<z.ZodBoolean>;
32
- is_deprecated: z.ZodOptional<z.ZodBoolean>;
33
45
  is_featured: z.ZodOptional<z.ZodBoolean>;
34
- is_hidden: z.ZodOptional<z.ZodBoolean>;
35
46
  is_invite: z.ZodOptional<z.ZodBoolean>;
36
- is_premium: z.ZodOptional<z.ZodBoolean>;
37
47
  is_public: z.ZodOptional<z.ZodBoolean>;
38
48
  is_upcoming: z.ZodOptional<z.ZodBoolean>;
39
49
  visibility: z.ZodOptional<z.ZodString>;
40
- actions: z.ZodOptional<z.ZodObject<{
41
- read: z.ZodOptional<z.ZodNumber>;
42
- read_bulk: z.ZodOptional<z.ZodNumber>;
43
- write: z.ZodOptional<z.ZodNumber>;
44
- search: z.ZodOptional<z.ZodNumber>;
45
- search_or_write: z.ZodOptional<z.ZodNumber>;
46
- search_and_write: z.ZodOptional<z.ZodNumber>;
47
- filter: z.ZodOptional<z.ZodNumber>;
48
- }, z.core.$strip>>;
49
- description: z.ZodOptional<z.ZodString>;
50
50
  primary_color: z.ZodOptional<z.ZodString>;
51
51
  secondary_color: z.ZodOptional<z.ZodString>;
52
52
  classification: z.ZodOptional<z.ZodString>;
@@ -74,9 +74,23 @@ declare const ListAppsQuerySchema: z.ZodObject<{
74
74
  */
75
75
  declare const ListAppsResponseSchema: z.ZodObject<{
76
76
  data: z.ZodArray<z.ZodObject<{
77
+ description: z.ZodOptional<z.ZodString>;
78
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
79
+ auth_type: z.ZodOptional<z.ZodString>;
80
+ actions: z.ZodOptional<z.ZodObject<{
81
+ read: z.ZodOptional<z.ZodNumber>;
82
+ read_bulk: z.ZodOptional<z.ZodNumber>;
83
+ write: z.ZodOptional<z.ZodNumber>;
84
+ search: z.ZodOptional<z.ZodNumber>;
85
+ search_or_write: z.ZodOptional<z.ZodNumber>;
86
+ search_and_write: z.ZodOptional<z.ZodNumber>;
87
+ filter: z.ZodOptional<z.ZodNumber>;
88
+ }, z.core.$strip>>;
89
+ is_deprecated: z.ZodOptional<z.ZodBoolean>;
90
+ is_beta: z.ZodOptional<z.ZodBoolean>;
91
+ is_premium: z.ZodOptional<z.ZodBoolean>;
77
92
  slug: z.ZodString;
78
93
  age_in_days: z.ZodOptional<z.ZodNumber>;
79
- auth_type: z.ZodOptional<z.ZodString>;
80
94
  banner: z.ZodOptional<z.ZodString>;
81
95
  categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
82
96
  id: z.ZodNumber;
@@ -96,26 +110,12 @@ declare const ListAppsResponseSchema: z.ZodObject<{
96
110
  has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
97
111
  has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
98
112
  has_writes: z.ZodOptional<z.ZodBoolean>;
99
- is_beta: z.ZodOptional<z.ZodBoolean>;
100
113
  is_built_in: z.ZodOptional<z.ZodBoolean>;
101
- is_deprecated: z.ZodOptional<z.ZodBoolean>;
102
114
  is_featured: z.ZodOptional<z.ZodBoolean>;
103
- is_hidden: z.ZodOptional<z.ZodBoolean>;
104
115
  is_invite: z.ZodOptional<z.ZodBoolean>;
105
- is_premium: z.ZodOptional<z.ZodBoolean>;
106
116
  is_public: z.ZodOptional<z.ZodBoolean>;
107
117
  is_upcoming: z.ZodOptional<z.ZodBoolean>;
108
118
  visibility: z.ZodOptional<z.ZodString>;
109
- actions: z.ZodOptional<z.ZodObject<{
110
- read: z.ZodOptional<z.ZodNumber>;
111
- read_bulk: z.ZodOptional<z.ZodNumber>;
112
- write: z.ZodOptional<z.ZodNumber>;
113
- search: z.ZodOptional<z.ZodNumber>;
114
- search_or_write: z.ZodOptional<z.ZodNumber>;
115
- search_and_write: z.ZodOptional<z.ZodNumber>;
116
- filter: z.ZodOptional<z.ZodNumber>;
117
- }, z.core.$strip>>;
118
- description: z.ZodOptional<z.ZodString>;
119
119
  primary_color: z.ZodOptional<z.ZodString>;
120
120
  secondary_color: z.ZodOptional<z.ZodString>;
121
121
  classification: z.ZodOptional<z.ZodString>;
@@ -90,7 +90,9 @@ var CreateClientCredentialsRequestSchema = import_zod.z.object({
90
90
  name: import_zod.z.string().min(1).max(255).describe("Human-readable name for the client credentials"),
91
91
  allowed_scopes: import_zod.z.array(ClientCredentialsScopeSchema).min(1).describe(
92
92
  "List of OAuth scopes that this application will be allowed to request"
93
- )
93
+ ),
94
+ // Policy validation is performed by Identity — sdkapi passes it through as-is.
95
+ policy: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Policy document to attach to the credentials")
94
96
  }).describe("Request body for creating client credentials");
95
97
  var CreateClientCredentialsResponseSchema = import_zod.z.object({
96
98
  data: ClientCredentialsCreatedItemSchema.describe(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/v0/schemas/client-credentials.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Allowed scopes for client credentials\n */\nexport const ClientCredentialsScopeSchema = z.enum([\"credentials\", \"external\"]);\n\nexport type ClientCredentialsScope = z.infer<\n typeof ClientCredentialsScopeSchema\n>;\n\n// ============================================================================\n// Identity API Schemas (source of truth for upstream responses)\n// These use Identity API field names: created/updated (not created_at/updated_at)\n// ============================================================================\n\n/**\n * Base fields shared across Identity API client credentials responses\n */\nconst IdentityClientCredentialsBaseSchema = z.object({\n client_id: z.string(),\n name: z.string(),\n});\n\n/**\n * Identity API response for listing client credentials\n */\nexport const IdentityClientCredentialsItemSchema =\n IdentityClientCredentialsBaseSchema.extend({\n allowed_scopes: z.array(z.string()).nullable().optional(),\n created: z.string().datetime().nullable().optional(),\n updated: z.string().datetime().optional(),\n });\n\n/**\n * Identity API response for creating client credentials\n * Only returns client_id, client_secret, and name\n */\nexport const IdentityClientCredentialsCreatedItemSchema =\n IdentityClientCredentialsBaseSchema.extend({\n client_secret: z.string(),\n });\n\n/**\n * Identity API paginated response for listing\n */\nexport const IdentityClientCredentialsListResponseSchema = z.object({\n count: z.number(),\n next: z.string().nullable().optional(),\n previous: z.string().nullable().optional(),\n results: z.array(IdentityClientCredentialsItemSchema),\n});\n\nexport type IdentityClientCredentialsItem = z.infer<\n typeof IdentityClientCredentialsItemSchema\n>;\nexport type IdentityClientCredentialsCreatedItem = z.infer<\n typeof IdentityClientCredentialsCreatedItemSchema\n>;\nexport type IdentityClientCredentialsListResponse = z.infer<\n typeof IdentityClientCredentialsListResponseSchema\n>;\n\n// ============================================================================\n// SDK API Schemas (for OpenAPI documentation and response types)\n// These use SDK API field names: created_at/updated_at\n// ============================================================================\n\n/**\n * Base fields shared across SDK API client credentials responses\n */\nconst ClientCredentialsBaseSchema = z.object({\n client_id: z\n .string()\n .describe(\"The public identifier (Client ID) of the OAuth application\"),\n name: z.string().describe(\"Human-readable name of the OAuth application\"),\n});\n\n/**\n * Client credentials item returned in list responses\n * Note: client_secret is NOT included in list responses for security\n */\nexport const ClientCredentialsItemSchema = ClientCredentialsBaseSchema.extend({\n allowed_scopes: z\n .array(ClientCredentialsScopeSchema)\n .describe(\n \"List of OAuth scopes that this application is allowed to request\",\n ),\n created_at: z\n .string()\n .datetime()\n .nullable()\n .optional()\n .describe(\"When the application was created (ISO 8601)\"),\n updated_at: z\n .string()\n .datetime()\n .optional()\n .describe(\"When the application was last updated (ISO 8601)\"),\n});\n\n/**\n * Client credentials item returned when creating (includes client_secret)\n * The client_secret is only shown once on creation\n */\nexport const ClientCredentialsCreatedItemSchema =\n ClientCredentialsBaseSchema.extend({\n client_secret: z\n .string()\n .describe(\"The client secret (only shown once on creation)\"),\n });\n\nexport type ClientCredentialsItem = z.infer<typeof ClientCredentialsItemSchema>;\nexport type ClientCredentialsCreatedItem = z.infer<\n typeof ClientCredentialsCreatedItemSchema\n>;\n\n/**\n * Query parameters for listing client credentials\n */\nexport const ListClientCredentialsQuerySchema = z\n .object({\n /** @deprecated Use page_size instead */\n pageSize: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\n \"Deprecated: Use page_size instead. Number of items per page (default: 100, max: 100)\",\n ),\n page_size: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\"Number of items per page (default: 100, max: 100)\"),\n offset: z.coerce\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Pagination offset\"),\n })\n .describe(\"Query parameters for listing client credentials\");\n\n/**\n * Response schema for listClientCredentials\n */\nexport const ListClientCredentialsResponseSchema = z\n .object({\n data: z\n .array(ClientCredentialsItemSchema)\n .describe(\"Array of client credentials\"),\n links: z\n .object({\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\"URL for the next page of results (if available)\"),\n })\n .describe(\"Pagination links\"),\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(\"Pagination metadata\"),\n })\n .describe(\"Response for listing client credentials\");\n\nexport type ListClientCredentialsQuery = z.infer<\n typeof ListClientCredentialsQuerySchema\n>;\nexport type ListClientCredentialsResponse = z.infer<\n typeof ListClientCredentialsResponseSchema\n>;\n\n/**\n * Request body for creating client credentials\n */\nexport const CreateClientCredentialsRequestSchema = z\n .object({\n name: z\n .string()\n .min(1)\n .max(255)\n .describe(\"Human-readable name for the client credentials\"),\n allowed_scopes: z\n .array(ClientCredentialsScopeSchema)\n .min(1)\n .describe(\n \"List of OAuth scopes that this application will be allowed to request\",\n ),\n })\n .describe(\"Request body for creating client credentials\");\n\n/**\n * Response schema for createClientCredentials\n */\nexport const CreateClientCredentialsResponseSchema = z\n .object({\n data: ClientCredentialsCreatedItemSchema.describe(\n \"The created client credentials (includes client_secret)\",\n ),\n })\n .describe(\"Response for creating client credentials\");\n\nexport type CreateClientCredentialsRequest = z.infer<\n typeof CreateClientCredentialsRequestSchema\n>;\nexport type CreateClientCredentialsResponse = z.infer<\n typeof CreateClientCredentialsResponseSchema\n>;\n\n/**\n * Path parameters for deleting client credentials\n */\nexport const DeleteClientCredentialsParamSchema = z.object({\n clientId: z.string().describe(\"The client ID of the credentials to delete\"),\n});\n\nexport type DeleteClientCredentialsParam = z.infer<\n typeof DeleteClientCredentialsParamSchema\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAKX,IAAM,+BAA+B,aAAE,KAAK,CAAC,eAAe,UAAU,CAAC;AAc9E,IAAM,sCAAsC,aAAE,OAAO;AAAA,EACnD,WAAW,aAAE,OAAO;AAAA,EACpB,MAAM,aAAE,OAAO;AACjB,CAAC;AAKM,IAAM,sCACX,oCAAoC,OAAO;AAAA,EACzC,gBAAgB,aAAE,MAAM,aAAE,OAAO,CAAC,EAAE,SAAS,EAAE,SAAS;AAAA,EACxD,SAAS,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,SAAS,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAC1C,CAAC;AAMI,IAAM,6CACX,oCAAoC,OAAO;AAAA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ACjC,SAAS,6BAA6B;AAAA,EACzC,OAAO,aACJ,OAAO;AAAA,IACN,MAAM,aACH,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,iDAAiD;AAAA,EAC/D,CAAC,EACA,SAAS,kBAAkB;AAAA,EAC9B,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,qBAAqB;AACnC,CAAC,EACA,SAAS,yCAAyC;AAY9C,IAAM,uCAAuC,aACjD,OAAO;AAAA,EACN,MAAM,aACH,OAAO,EACP,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS,gDAAgD;AAAA,EAC5D,gBAAgB,aACb,MAAM,4BAA4B,EAClC,IAAI,CAAC,EACL;AAAA,IACC;AAAA,EACF;AACJ,CAAC,EACA,SAAS,8CAA8C;AAKnD,IAAM,wCAAwC,aAClD,OAAO;AAAA,EACN,MAAM,mCAAmC;AAAA,IACvC;AAAA,EACF;AACF,CAAC,EACA,SAAS,0CAA0C;AAY/C,IAAM,qCAAqC,aAAE,OAAO;AAAA,EACzD,UAAU,aAAE,OAAO,EAAE,SAAS,4CAA4C;AAC5E,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/v0/schemas/client-credentials.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Allowed scopes for client credentials\n */\nexport const ClientCredentialsScopeSchema = z.enum([\"credentials\", \"external\"]);\n\nexport type ClientCredentialsScope = z.infer<\n typeof ClientCredentialsScopeSchema\n>;\n\n// ============================================================================\n// Identity API Schemas (source of truth for upstream responses)\n// These use Identity API field names: created/updated (not created_at/updated_at)\n// ============================================================================\n\n/**\n * Base fields shared across Identity API client credentials responses\n */\nconst IdentityClientCredentialsBaseSchema = z.object({\n client_id: z.string(),\n name: z.string(),\n});\n\n/**\n * Identity API response for listing client credentials\n */\nexport const IdentityClientCredentialsItemSchema =\n IdentityClientCredentialsBaseSchema.extend({\n allowed_scopes: z.array(z.string()).nullable().optional(),\n created: z.string().datetime().nullable().optional(),\n updated: z.string().datetime().optional(),\n });\n\n/**\n * Identity API response for creating client credentials\n * Only returns client_id, client_secret, and name\n */\nexport const IdentityClientCredentialsCreatedItemSchema =\n IdentityClientCredentialsBaseSchema.extend({\n client_secret: z.string(),\n });\n\n/**\n * Identity API paginated response for listing\n */\nexport const IdentityClientCredentialsListResponseSchema = z.object({\n count: z.number(),\n next: z.string().nullable().optional(),\n previous: z.string().nullable().optional(),\n results: z.array(IdentityClientCredentialsItemSchema),\n});\n\nexport type IdentityClientCredentialsItem = z.infer<\n typeof IdentityClientCredentialsItemSchema\n>;\nexport type IdentityClientCredentialsCreatedItem = z.infer<\n typeof IdentityClientCredentialsCreatedItemSchema\n>;\nexport type IdentityClientCredentialsListResponse = z.infer<\n typeof IdentityClientCredentialsListResponseSchema\n>;\n\n// ============================================================================\n// SDK API Schemas (for OpenAPI documentation and response types)\n// These use SDK API field names: created_at/updated_at\n// ============================================================================\n\n/**\n * Base fields shared across SDK API client credentials responses\n */\nconst ClientCredentialsBaseSchema = z.object({\n client_id: z\n .string()\n .describe(\"The public identifier (Client ID) of the OAuth application\"),\n name: z.string().describe(\"Human-readable name of the OAuth application\"),\n});\n\n/**\n * Client credentials item returned in list responses\n * Note: client_secret is NOT included in list responses for security\n */\nexport const ClientCredentialsItemSchema = ClientCredentialsBaseSchema.extend({\n allowed_scopes: z\n .array(ClientCredentialsScopeSchema)\n .describe(\n \"List of OAuth scopes that this application is allowed to request\",\n ),\n created_at: z\n .string()\n .datetime()\n .nullable()\n .optional()\n .describe(\"When the application was created (ISO 8601)\"),\n updated_at: z\n .string()\n .datetime()\n .optional()\n .describe(\"When the application was last updated (ISO 8601)\"),\n});\n\n/**\n * Client credentials item returned when creating (includes client_secret)\n * The client_secret is only shown once on creation\n */\nexport const ClientCredentialsCreatedItemSchema =\n ClientCredentialsBaseSchema.extend({\n client_secret: z\n .string()\n .describe(\"The client secret (only shown once on creation)\"),\n });\n\nexport type ClientCredentialsItem = z.infer<typeof ClientCredentialsItemSchema>;\nexport type ClientCredentialsCreatedItem = z.infer<\n typeof ClientCredentialsCreatedItemSchema\n>;\n\n/**\n * Query parameters for listing client credentials\n */\nexport const ListClientCredentialsQuerySchema = z\n .object({\n /** @deprecated Use page_size instead */\n pageSize: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\n \"Deprecated: Use page_size instead. Number of items per page (default: 100, max: 100)\",\n ),\n page_size: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\"Number of items per page (default: 100, max: 100)\"),\n offset: z.coerce\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Pagination offset\"),\n })\n .describe(\"Query parameters for listing client credentials\");\n\n/**\n * Response schema for listClientCredentials\n */\nexport const ListClientCredentialsResponseSchema = z\n .object({\n data: z\n .array(ClientCredentialsItemSchema)\n .describe(\"Array of client credentials\"),\n links: z\n .object({\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\"URL for the next page of results (if available)\"),\n })\n .describe(\"Pagination links\"),\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(\"Pagination metadata\"),\n })\n .describe(\"Response for listing client credentials\");\n\nexport type ListClientCredentialsQuery = z.infer<\n typeof ListClientCredentialsQuerySchema\n>;\nexport type ListClientCredentialsResponse = z.infer<\n typeof ListClientCredentialsResponseSchema\n>;\n\n/**\n * Request body for creating client credentials\n */\nexport const CreateClientCredentialsRequestSchema = z\n .object({\n name: z\n .string()\n .min(1)\n .max(255)\n .describe(\"Human-readable name for the client credentials\"),\n allowed_scopes: z\n .array(ClientCredentialsScopeSchema)\n .min(1)\n .describe(\n \"List of OAuth scopes that this application will be allowed to request\",\n ),\n // Policy validation is performed by Identity — sdkapi passes it through as-is.\n policy: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\"Policy document to attach to the credentials\"),\n })\n .describe(\"Request body for creating client credentials\");\n\n/**\n * Response schema for createClientCredentials\n */\nexport const CreateClientCredentialsResponseSchema = z\n .object({\n data: ClientCredentialsCreatedItemSchema.describe(\n \"The created client credentials (includes client_secret)\",\n ),\n })\n .describe(\"Response for creating client credentials\");\n\nexport type CreateClientCredentialsRequest = z.infer<\n typeof CreateClientCredentialsRequestSchema\n>;\nexport type CreateClientCredentialsResponse = z.infer<\n typeof CreateClientCredentialsResponseSchema\n>;\n\n/**\n * Path parameters for deleting client credentials\n */\nexport const DeleteClientCredentialsParamSchema = z.object({\n clientId: z.string().describe(\"The client ID of the credentials to delete\"),\n});\n\nexport type DeleteClientCredentialsParam = z.infer<\n typeof DeleteClientCredentialsParamSchema\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAKX,IAAM,+BAA+B,aAAE,KAAK,CAAC,eAAe,UAAU,CAAC;AAc9E,IAAM,sCAAsC,aAAE,OAAO;AAAA,EACnD,WAAW,aAAE,OAAO;AAAA,EACpB,MAAM,aAAE,OAAO;AACjB,CAAC;AAKM,IAAM,sCACX,oCAAoC,OAAO;AAAA,EACzC,gBAAgB,aAAE,MAAM,aAAE,OAAO,CAAC,EAAE,SAAS,EAAE,SAAS;AAAA,EACxD,SAAS,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,SAAS,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAC1C,CAAC;AAMI,IAAM,6CACX,oCAAoC,OAAO;AAAA,EACzC,eAAe,aAAE,OAAO;AAC1B,CAAC;AAKI,IAAM,8CAA8C,aAAE,OAAO;AAAA,EAClE,OAAO,a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T,SAAS,EACT,SAAS,iDAAiD;AAAA,EAC/D,CAAC,EACA,SAAS,kBAAkB;AAAA,EAC9B,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,qBAAqB;AACnC,CAAC,EACA,SAAS,yCAAyC;AAY9C,IAAM,uCAAuC,aACjD,OAAO;AAAA,EACN,MAAM,aACH,OAAO,EACP,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS,gDAAgD;AAAA,EAC5D,gBAAgB,aACb,MAAM,4BAA4B,EAClC,IAAI,CAAC,EACL;AAAA,IACC;AAAA,EACF;AAAA;AAAA,EAEF,QAAQ,aACL,OAAO,aAAE,OAAO,GAAG,aAAE,QAAQ,CAAC,EAC9B,SAAS,EACT,SAAS,8CAA8C;AAC5D,CAAC,EACA,SAAS,8CAA8C;AAKnD,IAAM,wCAAwC,aAClD,OAAO;AAAA,EACN,MAAM,mCAAmC;AAAA,IACvC;AAAA,EACF;AACF,CAAC,EACA,SAAS,0CAA0C;AAY/C,IAAM,qCAAqC,aAAE,OAAO;AAAA,EACzD,UAAU,aAAE,OAAO,EAAE,SAAS,4CAA4C;AAC5E,CAAC;","names":[]}
@@ -112,6 +112,7 @@ declare const CreateClientCredentialsRequestSchema: z.ZodObject<{
112
112
  credentials: "credentials";
113
113
  external: "external";
114
114
  }>>;
115
+ policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
115
116
  }, z.core.$strip>;
116
117
  /**
117
118
  * Response schema for createClientCredentials
@@ -112,6 +112,7 @@ declare const CreateClientCredentialsRequestSchema: z.ZodObject<{
112
112
  credentials: "credentials";
113
113
  external: "external";
114
114
  }>>;
115
+ policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
115
116
  }, z.core.$strip>;
116
117
  /**
117
118
  * Response schema for createClientCredentials
@@ -56,7 +56,9 @@ var CreateClientCredentialsRequestSchema = z.object({
56
56
  name: z.string().min(1).max(255).describe("Human-readable name for the client credentials"),
57
57
  allowed_scopes: z.array(ClientCredentialsScopeSchema).min(1).describe(
58
58
  "List of OAuth scopes that this application will be allowed to request"
59
- )
59
+ ),
60
+ // Policy validation is performed by Identity — sdkapi passes it through as-is.
61
+ policy: z.record(z.string(), z.unknown()).optional().describe("Policy document to attach to the credentials")
60
62
  }).describe("Request body for creating client credentials");
61
63
  var CreateClientCredentialsResponseSchema = z.object({
62
64
  data: ClientCredentialsCreatedItemSchema.describe(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/v0/schemas/client-credentials.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Allowed scopes for client credentials\n */\nexport const ClientCredentialsScopeSchema = z.enum([\"credentials\", \"external\"]);\n\nexport type ClientCredentialsScope = z.infer<\n typeof ClientCredentialsScopeSchema\n>;\n\n// ============================================================================\n// Identity API Schemas (source of truth for upstream responses)\n// These use Identity API field names: created/updated (not created_at/updated_at)\n// ============================================================================\n\n/**\n * Base fields shared across Identity API client credentials responses\n */\nconst IdentityClientCredentialsBaseSchema = z.object({\n client_id: z.string(),\n name: z.string(),\n});\n\n/**\n * Identity API response for listing client credentials\n */\nexport const IdentityClientCredentialsItemSchema =\n IdentityClientCredentialsBaseSchema.extend({\n allowed_scopes: z.array(z.string()).nullable().optional(),\n created: z.string().datetime().nullable().optional(),\n updated: z.string().datetime().optional(),\n });\n\n/**\n * Identity API response for creating client credentials\n * Only returns client_id, client_secret, and name\n */\nexport const IdentityClientCredentialsCreatedItemSchema =\n IdentityClientCredentialsBaseSchema.extend({\n client_secret: z.string(),\n });\n\n/**\n * Identity API paginated response for listing\n */\nexport const IdentityClientCredentialsListResponseSchema = z.object({\n count: z.number(),\n next: z.string().nullable().optional(),\n previous: z.string().nullable().optional(),\n results: z.array(IdentityClientCredentialsItemSchema),\n});\n\nexport type IdentityClientCredentialsItem = z.infer<\n typeof IdentityClientCredentialsItemSchema\n>;\nexport type IdentityClientCredentialsCreatedItem = z.infer<\n typeof IdentityClientCredentialsCreatedItemSchema\n>;\nexport type IdentityClientCredentialsListResponse = z.infer<\n typeof IdentityClientCredentialsListResponseSchema\n>;\n\n// ============================================================================\n// SDK API Schemas (for OpenAPI documentation and response types)\n// These use SDK API field names: created_at/updated_at\n// ============================================================================\n\n/**\n * Base fields shared across SDK API client credentials responses\n */\nconst ClientCredentialsBaseSchema = z.object({\n client_id: z\n .string()\n .describe(\"The public identifier (Client ID) of the OAuth application\"),\n name: z.string().describe(\"Human-readable name of the OAuth application\"),\n});\n\n/**\n * Client credentials item returned in list responses\n * Note: client_secret is NOT included in list responses for security\n */\nexport const ClientCredentialsItemSchema = ClientCredentialsBaseSchema.extend({\n allowed_scopes: z\n .array(ClientCredentialsScopeSchema)\n .describe(\n \"List of OAuth scopes that this application is allowed to request\",\n ),\n created_at: z\n .string()\n .datetime()\n .nullable()\n .optional()\n .describe(\"When the application was created (ISO 8601)\"),\n updated_at: z\n .string()\n .datetime()\n .optional()\n .describe(\"When the application was last updated (ISO 8601)\"),\n});\n\n/**\n * Client credentials item returned when creating (includes client_secret)\n * The client_secret is only shown once on creation\n */\nexport const ClientCredentialsCreatedItemSchema =\n ClientCredentialsBaseSchema.extend({\n client_secret: z\n .string()\n .describe(\"The client secret (only shown once on creation)\"),\n });\n\nexport type ClientCredentialsItem = z.infer<typeof ClientCredentialsItemSchema>;\nexport type ClientCredentialsCreatedItem = z.infer<\n typeof ClientCredentialsCreatedItemSchema\n>;\n\n/**\n * Query parameters for listing client credentials\n */\nexport const ListClientCredentialsQuerySchema = z\n .object({\n /** @deprecated Use page_size instead */\n pageSize: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\n \"Deprecated: Use page_size instead. Number of items per page (default: 100, max: 100)\",\n ),\n page_size: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\"Number of items per page (default: 100, max: 100)\"),\n offset: z.coerce\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Pagination offset\"),\n })\n .describe(\"Query parameters for listing client credentials\");\n\n/**\n * Response schema for listClientCredentials\n */\nexport const ListClientCredentialsResponseSchema = z\n .object({\n data: z\n .array(ClientCredentialsItemSchema)\n .describe(\"Array of client credentials\"),\n links: z\n .object({\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\"URL for the next page of results (if available)\"),\n })\n .describe(\"Pagination links\"),\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(\"Pagination metadata\"),\n })\n .describe(\"Response for listing client credentials\");\n\nexport type ListClientCredentialsQuery = z.infer<\n typeof ListClientCredentialsQuerySchema\n>;\nexport type ListClientCredentialsResponse = z.infer<\n typeof ListClientCredentialsResponseSchema\n>;\n\n/**\n * Request body for creating client credentials\n */\nexport const CreateClientCredentialsRequestSchema = z\n .object({\n name: z\n .string()\n .min(1)\n .max(255)\n .describe(\"Human-readable name for the client credentials\"),\n allowed_scopes: z\n .array(ClientCredentialsScopeSchema)\n .min(1)\n .describe(\n \"List of OAuth scopes that this application will be allowed to request\",\n ),\n })\n .describe(\"Request body for creating client credentials\");\n\n/**\n * Response schema for createClientCredentials\n */\nexport const CreateClientCredentialsResponseSchema = z\n .object({\n data: ClientCredentialsCreatedItemSchema.describe(\n \"The created client credentials (includes client_secret)\",\n ),\n })\n .describe(\"Response for creating client credentials\");\n\nexport type CreateClientCredentialsRequest = z.infer<\n typeof CreateClientCredentialsRequestSchema\n>;\nexport type CreateClientCredentialsResponse = z.infer<\n typeof CreateClientCredentialsResponseSchema\n>;\n\n/**\n * Path parameters for deleting client credentials\n */\nexport const DeleteClientCredentialsParamSchema = z.object({\n clientId: z.string().describe(\"The client ID of the credentials to delete\"),\n});\n\nexport type DeleteCl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,EACF;AACF,CAAC,EACA,SAAS,0CAA0C;AAY/C,IAAM,qCAAqC,EAAE,OAAO;AAAA,EACzD,UAAU,EAAE,OAAO,EAAE,SAAS,4CAA4C;AAC5E,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/v0/schemas/client-credentials.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Allowed scopes for client credentials\n */\nexport const ClientCredentialsScopeSchema = z.enum([\"credentials\", \"external\"]);\n\nexport type ClientCredentialsScope = z.infer<\n typeof ClientCredentialsScopeSchema\n>;\n\n// ============================================================================\n// Identity API Schemas (source of truth for upstream responses)\n// These use Identity API field names: created/updated (not created_at/updated_at)\n// ============================================================================\n\n/**\n * Base fields shared across Identity API client credentials responses\n */\nconst IdentityClientCredentialsBaseSchema = z.object({\n client_id: z.string(),\n name: z.string(),\n});\n\n/**\n * Identity API response for listing client credentials\n */\nexport const IdentityClientCredentialsItemSchema =\n IdentityClientCredentialsBaseSchema.extend({\n allowed_scopes: z.array(z.string()).nullable().optional(),\n created: z.string().datetime().nullable().optional(),\n updated: z.string().datetime().optional(),\n });\n\n/**\n * Identity API response for creating client credentials\n * Only returns client_id, client_secret, and name\n */\nexport const IdentityClientCredentialsCreatedItemSchema =\n IdentityClientCredentialsBaseSchema.extend({\n client_secret: z.string(),\n });\n\n/**\n * Identity API paginated response for listing\n */\nexport const IdentityClientCredentialsListResponseSchema = z.object({\n count: z.number(),\n next: z.string().nullable().optional(),\n previous: z.string().nullable().optional(),\n results: z.array(IdentityClientCredentialsItemSchema),\n});\n\nexport type IdentityClientCredentialsItem = z.infer<\n typeof IdentityClientCredentialsItemSchema\n>;\nexport type IdentityClientCredentialsCreatedItem = z.infer<\n typeof IdentityClientCredentialsCreatedItemSchema\n>;\nexport type IdentityClientCredentialsListResponse = z.infer<\n typeof IdentityClientCredentialsListResponseSchema\n>;\n\n// ============================================================================\n// SDK API Schemas (for OpenAPI documentation and response types)\n// These use SDK API field names: created_at/updated_at\n// ============================================================================\n\n/**\n * Base fields shared across SDK API client credentials responses\n */\nconst ClientCredentialsBaseSchema = z.object({\n client_id: z\n .string()\n .describe(\"The public identifier (Client ID) of the OAuth application\"),\n name: z.string().describe(\"Human-readable name of the OAuth application\"),\n});\n\n/**\n * Client credentials item returned in list responses\n * Note: client_secret is NOT included in list responses for security\n */\nexport const ClientCredentialsItemSchema = ClientCredentialsBaseSchema.extend({\n allowed_scopes: z\n .array(ClientCredentialsScopeSchema)\n .describe(\n \"List of OAuth scopes that this application is allowed to request\",\n ),\n created_at: z\n .string()\n .datetime()\n .nullable()\n .optional()\n .describe(\"When the application was created (ISO 8601)\"),\n updated_at: z\n .string()\n .datetime()\n .optional()\n .describe(\"When the application was last updated (ISO 8601)\"),\n});\n\n/**\n * Client credentials item returned when creating (includes client_secret)\n * The client_secret is only shown once on creation\n */\nexport const ClientCredentialsCreatedItemSchema =\n ClientCredentialsBaseSchema.extend({\n client_secret: z\n .string()\n .describe(\"The client secret (only shown once on creation)\"),\n });\n\nexport type ClientCredentialsItem = z.infer<typeof ClientCredentialsItemSchema>;\nexport type ClientCredentialsCreatedItem = z.infer<\n typeof ClientCredentialsCreatedItemSchema\n>;\n\n/**\n * Query parameters for listing client credentials\n */\nexport const ListClientCredentialsQuerySchema = z\n .object({\n /** @deprecated Use page_size instead */\n pageSize: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\n \"Deprecated: Use page_size instead. Number of items per page (default: 100, max: 100)\",\n ),\n page_size: z.coerce\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\"Number of items per page (default: 100, max: 100)\"),\n offset: z.coerce\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Pagination offset\"),\n })\n .describe(\"Query parameters for listing client credentials\");\n\n/**\n * Response schema for listClientCredentials\n */\nexport const ListClientCredentialsResponseSchema = z\n .object({\n data: z\n .array(ClientCredentialsItemSchema)\n .describe(\"Array of client credentials\"),\n links: z\n .object({\n next: z\n .string()\n .nullable()\n .optional()\n .describe(\"URL for the next page of results (if available)\"),\n })\n .describe(\"Pagination links\"),\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(\"Pagination metadata\"),\n })\n .describe(\"Response for listing client credentials\");\n\nexport type ListClientCredentialsQuery = z.infer<\n typeof ListClientCredentialsQuerySchema\n>;\nexport type ListClientCredentialsResponse = z.infer<\n typeof ListClientCredentialsResponseSchema\n>;\n\n/**\n * Request body for creating client credentials\n */\nexport const CreateClientCredentialsRequestSchema = z\n .object({\n name: z\n .string()\n .min(1)\n .max(255)\n .describe(\"Human-readable name for the client credentials\"),\n allowed_scopes: z\n .array(ClientCredentialsScopeSchema)\n .min(1)\n .describe(\n \"List of OAuth scopes that this application will be allowed to request\",\n ),\n // Policy validation is performed by Identity — sdkapi passes it through as-is.\n policy: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\"Policy document to attach to the credentials\"),\n })\n .describe(\"Request body for creating client credentials\");\n\n/**\n * Response schema for createClientCredentials\n */\nexport const CreateClientCredentialsResponseSchema = z\n .object({\n data: ClientCredentialsCreatedItemSchema.describe(\n \"The created client credentials (includes client_secret)\",\n ),\n })\n .describe(\"Response for creating client credentials\");\n\nexport type CreateClientCredentialsRequest = z.infer<\n typeof CreateClientCredentialsRequestSchema\n>;\nexport type CreateClientCredentialsResponse = z.infer<\n typeof CreateClientCredentialsResponseSchema\n>;\n\n/**\n * Path parameters for deleting client credentials\n */\nexport const DeleteClientCredentialsParamSchema = z.object({\n clientId: z.string().describe(\"The client ID of the credentials to delete\"),\n});\n\nexport type DeleteClientCredentialsParam = z.infer<\n typeof DeleteClientCredentialsParamSchema\n>;\n"],"mappings":";AAAA,SAAS,SAAS;AAKX,IAAM,+BAA+B,EAAE,KAAK,CAAC,eAAe,UAAU,CAAC;AAc9E,IAAM,sCAAsC,EAAE,OAAO;AAAA,EACnD,WAAW,EAAE,OAAO;AA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,OAAO,EAAE,SAAS,4CAA4C;AAC5E,CAAC;","names":[]}
@@ -43,8 +43,8 @@ declare const ConnectionSchema: z.ZodObject<{
43
43
  * - app_version: Extracted from selected_api (e.g., "SlackCLIAPI@1.0.0" → "1.0.0")
44
44
  */
45
45
  declare const ConnectionItemSchema: z.ZodObject<{
46
- date: z.ZodString;
47
46
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ date: z.ZodString;
48
48
  is_invite_only: z.ZodBoolean;
49
49
  lastchanged: z.ZodOptional<z.ZodString>;
50
50
  destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -137,8 +137,8 @@ declare const ListConnectionsQuerySchema: z.ZodObject<{
137
137
  */
138
138
  declare const ListConnectionsResponseSchema: z.ZodObject<{
139
139
  data: z.ZodArray<z.ZodObject<{
140
- date: z.ZodString;
141
140
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
+ date: z.ZodString;
142
142
  is_invite_only: z.ZodBoolean;
143
143
  lastchanged: z.ZodOptional<z.ZodString>;
144
144
  destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -43,8 +43,8 @@ declare const ConnectionSchema: z.ZodObject<{
43
43
  * - app_version: Extracted from selected_api (e.g., "SlackCLIAPI@1.0.0" → "1.0.0")
44
44
  */
45
45
  declare const ConnectionItemSchema: z.ZodObject<{
46
- date: z.ZodString;
47
46
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ date: z.ZodString;
48
48
  is_invite_only: z.ZodBoolean;
49
49
  lastchanged: z.ZodOptional<z.ZodString>;
50
50
  destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -137,8 +137,8 @@ declare const ListConnectionsQuerySchema: z.ZodObject<{
137
137
  */
138
138
  declare const ListConnectionsResponseSchema: z.ZodObject<{
139
139
  data: z.ZodArray<z.ZodObject<{
140
- date: z.ZodString;
141
140
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
+ date: z.ZodString;
142
142
  is_invite_only: z.ZodBoolean;
143
143
  lastchanged: z.ZodOptional<z.ZodString>;
144
144
  destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
package/openapi.yaml CHANGED
@@ -25,6 +25,8 @@ tags:
25
25
  description: Deduplication-related routes
26
26
  - name: Documentation
27
27
  description: Documentation-related routes
28
+ - name: Approvals
29
+ description: Approval request management routes
28
30
  components:
29
31
  schemas:
30
32
  ErrorCode:
@@ -241,10 +243,36 @@ components:
241
243
  - external
242
244
  minItems: 1
243
245
  description: List of OAuth scopes that this application will be allowed to request
246
+ policy:
247
+ type: object
248
+ additionalProperties: {}
249
+ description: Policy document to attach to the credentials
244
250
  required:
245
251
  - name
246
252
  - allowed_scopes
247
253
  description: Request body for creating client credentials
254
+ ApprovalResponse:
255
+ type: object
256
+ properties:
257
+ status:
258
+ type: string
259
+ enum:
260
+ - pending_approval
261
+ - approved
262
+ - denied
263
+ description: The current status of the approval request
264
+ approval_id:
265
+ type: string
266
+ description: Unique identifier for the approval request
267
+ approval_url:
268
+ type: string
269
+ description: URL for the user to visit and approve/deny the request
270
+ poll_url:
271
+ type: string
272
+ description: URL for the SDK to poll for status changes
273
+ required:
274
+ - status
275
+ - approval_id
248
276
  AuthenticationItem:
249
277
  type: object
250
278
  properties:
@@ -1451,6 +1479,58 @@ paths:
1451
1479
  headers: *a6
1452
1480
  content:
1453
1481
  application/json: *a7
1482
+ /api/v0/approvals/{approvalId}:
1483
+ get:
1484
+ summary: Get approval status
1485
+ description: Returns the current status of an approval request. Used by the SDK to poll for approval resolution.
1486
+ tags:
1487
+ - Approvals
1488
+ operationId: v0_get_approval
1489
+ security:
1490
+ - userJwt: []
1491
+ parameters:
1492
+ - schema:
1493
+ type: string
1494
+ description: The unique identifier of the approval request
1495
+ required: true
1496
+ description: The unique identifier of the approval request
1497
+ name: approvalId
1498
+ in: path
1499
+ responses:
1500
+ "200":
1501
+ description: Success
1502
+ content:
1503
+ application/json:
1504
+ schema:
1505
+ $ref: "#/components/schemas/ApprovalResponse"
1506
+ "400":
1507
+ description: Bad Request
1508
+ content:
1509
+ application/json: *a1
1510
+ "401":
1511
+ description: Unauthorized
1512
+ content:
1513
+ application/json: *a2
1514
+ "404":
1515
+ description: Approval not found
1516
+ content:
1517
+ application/json:
1518
+ schema:
1519
+ $ref: "#/components/schemas/ErrorsResponse"
1520
+ "429":
1521
+ description: Too Many Requests
1522
+ headers: *a3
1523
+ content:
1524
+ application/json: *a4
1525
+ "500":
1526
+ description: Server Error
1527
+ content:
1528
+ application/json: *a5
1529
+ "503":
1530
+ description: Service Unavailable
1531
+ headers: *a6
1532
+ content:
1533
+ application/json: *a7
1454
1534
  /api/v0/authentications/{authenticationId}:
1455
1535
  get:
1456
1536
  summary: Get an authentication
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-core",
3
- "version": "0.9.2",
3
+ "version": "0.11.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.",
@@ -61,6 +61,11 @@
61
61
  "import": "./dist/v0/schemas/client-credentials.js",
62
62
  "require": "./dist/v0/schemas/client-credentials.cjs"
63
63
  },
64
+ "./v0/schemas/approvals": {
65
+ "types": "./dist/v0/schemas/approvals.d.ts",
66
+ "import": "./dist/v0/schemas/approvals.js",
67
+ "require": "./dist/v0/schemas/approvals.cjs"
68
+ },
64
69
  "./v0/common/responses": {
65
70
  "types": "./dist/v0/common/responses.d.ts",
66
71
  "import": "./dist/v0/common/responses.js",