@zapier/zapier-sdk-core 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/v0/config/metadata.cjs +8 -0
- package/dist/v0/config/metadata.cjs.map +1 -1
- package/dist/v0/config/metadata.js +8 -0
- package/dist/v0/config/metadata.js.map +1 -1
- package/dist/v0/schemas/client-credentials.cjs +113 -0
- package/dist/v0/schemas/client-credentials.cjs.map +1 -0
- package/dist/v0/schemas/client-credentials.d.cts +135 -0
- package/dist/v0/schemas/client-credentials.d.ts +135 -0
- package/dist/v0/schemas/client-credentials.js +78 -0
- package/dist/v0/schemas/client-credentials.js.map +1 -0
- package/openapi.yaml +383 -11
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-core
|
|
2
2
|
|
|
3
|
+
## 0.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c740422: Add dedupe method to zapier-sdk-core
|
|
8
|
+
|
|
9
|
+
## 0.7.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 1184ce7: Adds new endpoints for client crendentials.
|
|
14
|
+
|
|
3
15
|
## 0.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -49,6 +49,14 @@ var tags = [
|
|
|
49
49
|
name: "Authentications",
|
|
50
50
|
description: "Authentication-related routes"
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
name: "Client Credentials",
|
|
54
|
+
description: "Client credentials management routes"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "Deduplication",
|
|
58
|
+
description: "Deduplication-related routes"
|
|
59
|
+
},
|
|
52
60
|
{
|
|
53
61
|
name: "Documentation",
|
|
54
62
|
description: "Documentation-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: \"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;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\",\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":[]}
|
|
@@ -21,6 +21,14 @@ var tags = [
|
|
|
21
21
|
name: "Authentications",
|
|
22
22
|
description: "Authentication-related routes"
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
name: "Client Credentials",
|
|
26
|
+
description: "Client credentials management routes"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "Deduplication",
|
|
30
|
+
description: "Deduplication-related routes"
|
|
31
|
+
},
|
|
24
32
|
{
|
|
25
33
|
name: "Documentation",
|
|
26
34
|
description: "Documentation-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: \"Documentation\",\n description: \"Documentation-related routes\",\n },\n];\n\n/**\n * Security schemes for OpenAPI specification\n *\n * Note: 'as const' is used on enum-like literal values (\"apiKey\", \"header\")\n * to ensure TypeScript treats them as literal types rather than generic strings.\n * This provides better type safety when the OpenAPI generator validates these values.\n */\nexport const securitySchemes = {\n userJwt: {\n type: \"apiKey\" as const,\n in: \"header\" as const,\n name: \"Authorization\",\n description:\n \"Format should be `JWT <your-jwt>` (you must ensure that the JWT prefix \" +\n \"is included in your requests).\\\\n\\\\n\" +\n \"Example: `Authorization: JWT your.jwt.value.here`\",\n },\n} as const;\n\n/**\n * Complete OpenAPI metadata for document generation\n */\nexport const openApiMetadata = {\n openapi: \"3.1.0\" as const,\n info: apiInfo,\n servers,\n tags,\n};\n"],"mappings":";AAgBO,IAAM,UAAU;AAAA,EACrB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,aAAa;AACf;AAEO,IAAM,UAAuD,CAAC;AAE9D,IAAM,OAAO;AAAA,EAClB;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AACF;AASO,IAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,IACP,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aACE;AAAA,EAGJ;AACF;AAKO,IAAM,kBAAkB;AAAA,EAC7B,SAAS;AAAA,EACT,MAAM;AAAA,EACN;AAAA,EACA;AACF;","names":[]}
|
|
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":[]}
|
|
@@ -0,0 +1,113 @@
|
|
|
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/client-credentials.ts
|
|
21
|
+
var client_credentials_exports = {};
|
|
22
|
+
__export(client_credentials_exports, {
|
|
23
|
+
ClientCredentialsCreatedItemSchema: () => ClientCredentialsCreatedItemSchema,
|
|
24
|
+
ClientCredentialsItemSchema: () => ClientCredentialsItemSchema,
|
|
25
|
+
ClientCredentialsScopeSchema: () => ClientCredentialsScopeSchema,
|
|
26
|
+
CreateClientCredentialsRequestSchema: () => CreateClientCredentialsRequestSchema,
|
|
27
|
+
CreateClientCredentialsResponseSchema: () => CreateClientCredentialsResponseSchema,
|
|
28
|
+
DeleteClientCredentialsParamSchema: () => DeleteClientCredentialsParamSchema,
|
|
29
|
+
IdentityClientCredentialsCreatedItemSchema: () => IdentityClientCredentialsCreatedItemSchema,
|
|
30
|
+
IdentityClientCredentialsItemSchema: () => IdentityClientCredentialsItemSchema,
|
|
31
|
+
IdentityClientCredentialsListResponseSchema: () => IdentityClientCredentialsListResponseSchema,
|
|
32
|
+
ListClientCredentialsQuerySchema: () => ListClientCredentialsQuerySchema,
|
|
33
|
+
ListClientCredentialsResponseSchema: () => ListClientCredentialsResponseSchema
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(client_credentials_exports);
|
|
36
|
+
var import_zod = require("zod");
|
|
37
|
+
var ClientCredentialsScopeSchema = import_zod.z.enum(["credentials", "external"]);
|
|
38
|
+
var IdentityClientCredentialsBaseSchema = import_zod.z.object({
|
|
39
|
+
client_id: import_zod.z.string(),
|
|
40
|
+
name: import_zod.z.string()
|
|
41
|
+
});
|
|
42
|
+
var IdentityClientCredentialsItemSchema = IdentityClientCredentialsBaseSchema.extend({
|
|
43
|
+
allowed_scopes: import_zod.z.array(import_zod.z.string()).nullable().optional(),
|
|
44
|
+
created: import_zod.z.string().datetime().nullable().optional(),
|
|
45
|
+
updated: import_zod.z.string().datetime().optional()
|
|
46
|
+
});
|
|
47
|
+
var IdentityClientCredentialsCreatedItemSchema = IdentityClientCredentialsBaseSchema.extend({
|
|
48
|
+
client_secret: import_zod.z.string()
|
|
49
|
+
});
|
|
50
|
+
var IdentityClientCredentialsListResponseSchema = import_zod.z.object({
|
|
51
|
+
count: import_zod.z.number(),
|
|
52
|
+
next: import_zod.z.string().nullable().optional(),
|
|
53
|
+
previous: import_zod.z.string().nullable().optional(),
|
|
54
|
+
results: import_zod.z.array(IdentityClientCredentialsItemSchema)
|
|
55
|
+
});
|
|
56
|
+
var ClientCredentialsBaseSchema = import_zod.z.object({
|
|
57
|
+
client_id: import_zod.z.string().describe("The public identifier (Client ID) of the OAuth application"),
|
|
58
|
+
name: import_zod.z.string().describe("Human-readable name of the OAuth application")
|
|
59
|
+
});
|
|
60
|
+
var ClientCredentialsItemSchema = ClientCredentialsBaseSchema.extend({
|
|
61
|
+
allowed_scopes: import_zod.z.array(ClientCredentialsScopeSchema).describe(
|
|
62
|
+
"List of OAuth scopes that this application is allowed to request"
|
|
63
|
+
),
|
|
64
|
+
created_at: import_zod.z.string().datetime().nullable().optional().describe("When the application was created (ISO 8601)"),
|
|
65
|
+
updated_at: import_zod.z.string().datetime().optional().describe("When the application was last updated (ISO 8601)")
|
|
66
|
+
});
|
|
67
|
+
var ClientCredentialsCreatedItemSchema = ClientCredentialsBaseSchema.extend({
|
|
68
|
+
client_secret: import_zod.z.string().describe("The client secret (only shown once on creation)")
|
|
69
|
+
});
|
|
70
|
+
var ListClientCredentialsQuerySchema = import_zod.z.object({
|
|
71
|
+
pageSize: import_zod.z.coerce.number().int().min(1).max(100).optional().describe("Number of items per page (default: 100, max: 100)"),
|
|
72
|
+
offset: import_zod.z.coerce.number().int().min(0).optional().describe("Pagination offset")
|
|
73
|
+
}).describe("Query parameters for listing client credentials");
|
|
74
|
+
var ListClientCredentialsResponseSchema = import_zod.z.object({
|
|
75
|
+
data: import_zod.z.array(ClientCredentialsItemSchema).describe("Array of client credentials"),
|
|
76
|
+
links: import_zod.z.object({
|
|
77
|
+
next: import_zod.z.string().nullable().optional().describe("URL for the next page of results (if available)")
|
|
78
|
+
}).describe("Pagination links"),
|
|
79
|
+
meta: import_zod.z.object({
|
|
80
|
+
count: import_zod.z.number().describe("Total number of items"),
|
|
81
|
+
limit: import_zod.z.number().describe("Number of items per page"),
|
|
82
|
+
offset: import_zod.z.number().describe("Offset of the current page")
|
|
83
|
+
}).describe("Pagination metadata")
|
|
84
|
+
}).describe("Response for listing client credentials");
|
|
85
|
+
var CreateClientCredentialsRequestSchema = import_zod.z.object({
|
|
86
|
+
name: import_zod.z.string().min(1).max(255).describe("Human-readable name for the client credentials"),
|
|
87
|
+
allowed_scopes: import_zod.z.array(ClientCredentialsScopeSchema).min(1).describe(
|
|
88
|
+
"List of OAuth scopes that this application will be allowed to request"
|
|
89
|
+
)
|
|
90
|
+
}).describe("Request body for creating client credentials");
|
|
91
|
+
var CreateClientCredentialsResponseSchema = import_zod.z.object({
|
|
92
|
+
data: ClientCredentialsCreatedItemSchema.describe(
|
|
93
|
+
"The created client credentials (includes client_secret)"
|
|
94
|
+
)
|
|
95
|
+
}).describe("Response for creating client credentials");
|
|
96
|
+
var DeleteClientCredentialsParamSchema = import_zod.z.object({
|
|
97
|
+
clientId: import_zod.z.string().describe("The client ID of the credentials to delete")
|
|
98
|
+
});
|
|
99
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
100
|
+
0 && (module.exports = {
|
|
101
|
+
ClientCredentialsCreatedItemSchema,
|
|
102
|
+
ClientCredentialsItemSchema,
|
|
103
|
+
ClientCredentialsScopeSchema,
|
|
104
|
+
CreateClientCredentialsRequestSchema,
|
|
105
|
+
CreateClientCredentialsResponseSchema,
|
|
106
|
+
DeleteClientCredentialsParamSchema,
|
|
107
|
+
IdentityClientCredentialsCreatedItemSchema,
|
|
108
|
+
IdentityClientCredentialsItemSchema,
|
|
109
|
+
IdentityClientCredentialsListResponseSchema,
|
|
110
|
+
ListClientCredentialsQuerySchema,
|
|
111
|
+
ListClientCredentialsResponseSchema
|
|
112
|
+
});
|
|
113
|
+
//# sourceMappingURL=client-credentials.cjs.map
|
|
@@ -0,0 +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 pageSize: 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":"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","names":[]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Allowed scopes for client credentials
|
|
5
|
+
*/
|
|
6
|
+
declare const ClientCredentialsScopeSchema: z.ZodEnum<{
|
|
7
|
+
credentials: "credentials";
|
|
8
|
+
external: "external";
|
|
9
|
+
}>;
|
|
10
|
+
type ClientCredentialsScope = z.infer<typeof ClientCredentialsScopeSchema>;
|
|
11
|
+
/**
|
|
12
|
+
* Identity API response for listing client credentials
|
|
13
|
+
*/
|
|
14
|
+
declare const IdentityClientCredentialsItemSchema: z.ZodObject<{
|
|
15
|
+
client_id: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
allowed_scopes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
18
|
+
created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
+
updated: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
/**
|
|
22
|
+
* Identity API response for creating client credentials
|
|
23
|
+
* Only returns client_id, client_secret, and name
|
|
24
|
+
*/
|
|
25
|
+
declare const IdentityClientCredentialsCreatedItemSchema: z.ZodObject<{
|
|
26
|
+
client_id: z.ZodString;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
client_secret: z.ZodString;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
/**
|
|
31
|
+
* Identity API paginated response for listing
|
|
32
|
+
*/
|
|
33
|
+
declare const IdentityClientCredentialsListResponseSchema: z.ZodObject<{
|
|
34
|
+
count: z.ZodNumber;
|
|
35
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
previous: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
results: z.ZodArray<z.ZodObject<{
|
|
38
|
+
client_id: z.ZodString;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
allowed_scopes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
41
|
+
created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
+
updated: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
type IdentityClientCredentialsItem = z.infer<typeof IdentityClientCredentialsItemSchema>;
|
|
46
|
+
type IdentityClientCredentialsCreatedItem = z.infer<typeof IdentityClientCredentialsCreatedItemSchema>;
|
|
47
|
+
type IdentityClientCredentialsListResponse = z.infer<typeof IdentityClientCredentialsListResponseSchema>;
|
|
48
|
+
/**
|
|
49
|
+
* Client credentials item returned in list responses
|
|
50
|
+
* Note: client_secret is NOT included in list responses for security
|
|
51
|
+
*/
|
|
52
|
+
declare const ClientCredentialsItemSchema: z.ZodObject<{
|
|
53
|
+
client_id: z.ZodString;
|
|
54
|
+
name: z.ZodString;
|
|
55
|
+
allowed_scopes: z.ZodArray<z.ZodEnum<{
|
|
56
|
+
credentials: "credentials";
|
|
57
|
+
external: "external";
|
|
58
|
+
}>>;
|
|
59
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
/**
|
|
63
|
+
* Client credentials item returned when creating (includes client_secret)
|
|
64
|
+
* The client_secret is only shown once on creation
|
|
65
|
+
*/
|
|
66
|
+
declare const ClientCredentialsCreatedItemSchema: z.ZodObject<{
|
|
67
|
+
client_id: z.ZodString;
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
client_secret: z.ZodString;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
type ClientCredentialsItem = z.infer<typeof ClientCredentialsItemSchema>;
|
|
72
|
+
type ClientCredentialsCreatedItem = z.infer<typeof ClientCredentialsCreatedItemSchema>;
|
|
73
|
+
/**
|
|
74
|
+
* Query parameters for listing client credentials
|
|
75
|
+
*/
|
|
76
|
+
declare const ListClientCredentialsQuerySchema: z.ZodObject<{
|
|
77
|
+
pageSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
78
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
/**
|
|
81
|
+
* Response schema for listClientCredentials
|
|
82
|
+
*/
|
|
83
|
+
declare const ListClientCredentialsResponseSchema: z.ZodObject<{
|
|
84
|
+
data: z.ZodArray<z.ZodObject<{
|
|
85
|
+
client_id: z.ZodString;
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
allowed_scopes: z.ZodArray<z.ZodEnum<{
|
|
88
|
+
credentials: "credentials";
|
|
89
|
+
external: "external";
|
|
90
|
+
}>>;
|
|
91
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
links: z.ZodObject<{
|
|
95
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
meta: z.ZodObject<{
|
|
98
|
+
count: z.ZodNumber;
|
|
99
|
+
limit: z.ZodNumber;
|
|
100
|
+
offset: z.ZodNumber;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
type ListClientCredentialsQuery = z.infer<typeof ListClientCredentialsQuerySchema>;
|
|
104
|
+
type ListClientCredentialsResponse = z.infer<typeof ListClientCredentialsResponseSchema>;
|
|
105
|
+
/**
|
|
106
|
+
* Request body for creating client credentials
|
|
107
|
+
*/
|
|
108
|
+
declare const CreateClientCredentialsRequestSchema: z.ZodObject<{
|
|
109
|
+
name: z.ZodString;
|
|
110
|
+
allowed_scopes: z.ZodArray<z.ZodEnum<{
|
|
111
|
+
credentials: "credentials";
|
|
112
|
+
external: "external";
|
|
113
|
+
}>>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
/**
|
|
116
|
+
* Response schema for createClientCredentials
|
|
117
|
+
*/
|
|
118
|
+
declare const CreateClientCredentialsResponseSchema: z.ZodObject<{
|
|
119
|
+
data: z.ZodObject<{
|
|
120
|
+
client_id: z.ZodString;
|
|
121
|
+
name: z.ZodString;
|
|
122
|
+
client_secret: z.ZodString;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
type CreateClientCredentialsRequest = z.infer<typeof CreateClientCredentialsRequestSchema>;
|
|
126
|
+
type CreateClientCredentialsResponse = z.infer<typeof CreateClientCredentialsResponseSchema>;
|
|
127
|
+
/**
|
|
128
|
+
* Path parameters for deleting client credentials
|
|
129
|
+
*/
|
|
130
|
+
declare const DeleteClientCredentialsParamSchema: z.ZodObject<{
|
|
131
|
+
clientId: z.ZodString;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
type DeleteClientCredentialsParam = z.infer<typeof DeleteClientCredentialsParamSchema>;
|
|
134
|
+
|
|
135
|
+
export { type ClientCredentialsCreatedItem, ClientCredentialsCreatedItemSchema, type ClientCredentialsItem, ClientCredentialsItemSchema, type ClientCredentialsScope, ClientCredentialsScopeSchema, type CreateClientCredentialsRequest, CreateClientCredentialsRequestSchema, type CreateClientCredentialsResponse, CreateClientCredentialsResponseSchema, type DeleteClientCredentialsParam, DeleteClientCredentialsParamSchema, type IdentityClientCredentialsCreatedItem, IdentityClientCredentialsCreatedItemSchema, type IdentityClientCredentialsItem, IdentityClientCredentialsItemSchema, type IdentityClientCredentialsListResponse, IdentityClientCredentialsListResponseSchema, type ListClientCredentialsQuery, ListClientCredentialsQuerySchema, type ListClientCredentialsResponse, ListClientCredentialsResponseSchema };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Allowed scopes for client credentials
|
|
5
|
+
*/
|
|
6
|
+
declare const ClientCredentialsScopeSchema: z.ZodEnum<{
|
|
7
|
+
credentials: "credentials";
|
|
8
|
+
external: "external";
|
|
9
|
+
}>;
|
|
10
|
+
type ClientCredentialsScope = z.infer<typeof ClientCredentialsScopeSchema>;
|
|
11
|
+
/**
|
|
12
|
+
* Identity API response for listing client credentials
|
|
13
|
+
*/
|
|
14
|
+
declare const IdentityClientCredentialsItemSchema: z.ZodObject<{
|
|
15
|
+
client_id: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
allowed_scopes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
18
|
+
created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
+
updated: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
/**
|
|
22
|
+
* Identity API response for creating client credentials
|
|
23
|
+
* Only returns client_id, client_secret, and name
|
|
24
|
+
*/
|
|
25
|
+
declare const IdentityClientCredentialsCreatedItemSchema: z.ZodObject<{
|
|
26
|
+
client_id: z.ZodString;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
client_secret: z.ZodString;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
/**
|
|
31
|
+
* Identity API paginated response for listing
|
|
32
|
+
*/
|
|
33
|
+
declare const IdentityClientCredentialsListResponseSchema: z.ZodObject<{
|
|
34
|
+
count: z.ZodNumber;
|
|
35
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
previous: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
results: z.ZodArray<z.ZodObject<{
|
|
38
|
+
client_id: z.ZodString;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
allowed_scopes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
41
|
+
created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
+
updated: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
type IdentityClientCredentialsItem = z.infer<typeof IdentityClientCredentialsItemSchema>;
|
|
46
|
+
type IdentityClientCredentialsCreatedItem = z.infer<typeof IdentityClientCredentialsCreatedItemSchema>;
|
|
47
|
+
type IdentityClientCredentialsListResponse = z.infer<typeof IdentityClientCredentialsListResponseSchema>;
|
|
48
|
+
/**
|
|
49
|
+
* Client credentials item returned in list responses
|
|
50
|
+
* Note: client_secret is NOT included in list responses for security
|
|
51
|
+
*/
|
|
52
|
+
declare const ClientCredentialsItemSchema: z.ZodObject<{
|
|
53
|
+
client_id: z.ZodString;
|
|
54
|
+
name: z.ZodString;
|
|
55
|
+
allowed_scopes: z.ZodArray<z.ZodEnum<{
|
|
56
|
+
credentials: "credentials";
|
|
57
|
+
external: "external";
|
|
58
|
+
}>>;
|
|
59
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
/**
|
|
63
|
+
* Client credentials item returned when creating (includes client_secret)
|
|
64
|
+
* The client_secret is only shown once on creation
|
|
65
|
+
*/
|
|
66
|
+
declare const ClientCredentialsCreatedItemSchema: z.ZodObject<{
|
|
67
|
+
client_id: z.ZodString;
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
client_secret: z.ZodString;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
type ClientCredentialsItem = z.infer<typeof ClientCredentialsItemSchema>;
|
|
72
|
+
type ClientCredentialsCreatedItem = z.infer<typeof ClientCredentialsCreatedItemSchema>;
|
|
73
|
+
/**
|
|
74
|
+
* Query parameters for listing client credentials
|
|
75
|
+
*/
|
|
76
|
+
declare const ListClientCredentialsQuerySchema: z.ZodObject<{
|
|
77
|
+
pageSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
78
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
/**
|
|
81
|
+
* Response schema for listClientCredentials
|
|
82
|
+
*/
|
|
83
|
+
declare const ListClientCredentialsResponseSchema: z.ZodObject<{
|
|
84
|
+
data: z.ZodArray<z.ZodObject<{
|
|
85
|
+
client_id: z.ZodString;
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
allowed_scopes: z.ZodArray<z.ZodEnum<{
|
|
88
|
+
credentials: "credentials";
|
|
89
|
+
external: "external";
|
|
90
|
+
}>>;
|
|
91
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
links: z.ZodObject<{
|
|
95
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
meta: z.ZodObject<{
|
|
98
|
+
count: z.ZodNumber;
|
|
99
|
+
limit: z.ZodNumber;
|
|
100
|
+
offset: z.ZodNumber;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
type ListClientCredentialsQuery = z.infer<typeof ListClientCredentialsQuerySchema>;
|
|
104
|
+
type ListClientCredentialsResponse = z.infer<typeof ListClientCredentialsResponseSchema>;
|
|
105
|
+
/**
|
|
106
|
+
* Request body for creating client credentials
|
|
107
|
+
*/
|
|
108
|
+
declare const CreateClientCredentialsRequestSchema: z.ZodObject<{
|
|
109
|
+
name: z.ZodString;
|
|
110
|
+
allowed_scopes: z.ZodArray<z.ZodEnum<{
|
|
111
|
+
credentials: "credentials";
|
|
112
|
+
external: "external";
|
|
113
|
+
}>>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
/**
|
|
116
|
+
* Response schema for createClientCredentials
|
|
117
|
+
*/
|
|
118
|
+
declare const CreateClientCredentialsResponseSchema: z.ZodObject<{
|
|
119
|
+
data: z.ZodObject<{
|
|
120
|
+
client_id: z.ZodString;
|
|
121
|
+
name: z.ZodString;
|
|
122
|
+
client_secret: z.ZodString;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
type CreateClientCredentialsRequest = z.infer<typeof CreateClientCredentialsRequestSchema>;
|
|
126
|
+
type CreateClientCredentialsResponse = z.infer<typeof CreateClientCredentialsResponseSchema>;
|
|
127
|
+
/**
|
|
128
|
+
* Path parameters for deleting client credentials
|
|
129
|
+
*/
|
|
130
|
+
declare const DeleteClientCredentialsParamSchema: z.ZodObject<{
|
|
131
|
+
clientId: z.ZodString;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
type DeleteClientCredentialsParam = z.infer<typeof DeleteClientCredentialsParamSchema>;
|
|
134
|
+
|
|
135
|
+
export { type ClientCredentialsCreatedItem, ClientCredentialsCreatedItemSchema, type ClientCredentialsItem, ClientCredentialsItemSchema, type ClientCredentialsScope, ClientCredentialsScopeSchema, type CreateClientCredentialsRequest, CreateClientCredentialsRequestSchema, type CreateClientCredentialsResponse, CreateClientCredentialsResponseSchema, type DeleteClientCredentialsParam, DeleteClientCredentialsParamSchema, type IdentityClientCredentialsCreatedItem, IdentityClientCredentialsCreatedItemSchema, type IdentityClientCredentialsItem, IdentityClientCredentialsItemSchema, type IdentityClientCredentialsListResponse, IdentityClientCredentialsListResponseSchema, type ListClientCredentialsQuery, ListClientCredentialsQuerySchema, type ListClientCredentialsResponse, ListClientCredentialsResponseSchema };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// src/v0/schemas/client-credentials.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var ClientCredentialsScopeSchema = z.enum(["credentials", "external"]);
|
|
4
|
+
var IdentityClientCredentialsBaseSchema = z.object({
|
|
5
|
+
client_id: z.string(),
|
|
6
|
+
name: z.string()
|
|
7
|
+
});
|
|
8
|
+
var IdentityClientCredentialsItemSchema = IdentityClientCredentialsBaseSchema.extend({
|
|
9
|
+
allowed_scopes: z.array(z.string()).nullable().optional(),
|
|
10
|
+
created: z.string().datetime().nullable().optional(),
|
|
11
|
+
updated: z.string().datetime().optional()
|
|
12
|
+
});
|
|
13
|
+
var IdentityClientCredentialsCreatedItemSchema = IdentityClientCredentialsBaseSchema.extend({
|
|
14
|
+
client_secret: z.string()
|
|
15
|
+
});
|
|
16
|
+
var IdentityClientCredentialsListResponseSchema = z.object({
|
|
17
|
+
count: z.number(),
|
|
18
|
+
next: z.string().nullable().optional(),
|
|
19
|
+
previous: z.string().nullable().optional(),
|
|
20
|
+
results: z.array(IdentityClientCredentialsItemSchema)
|
|
21
|
+
});
|
|
22
|
+
var ClientCredentialsBaseSchema = z.object({
|
|
23
|
+
client_id: z.string().describe("The public identifier (Client ID) of the OAuth application"),
|
|
24
|
+
name: z.string().describe("Human-readable name of the OAuth application")
|
|
25
|
+
});
|
|
26
|
+
var ClientCredentialsItemSchema = ClientCredentialsBaseSchema.extend({
|
|
27
|
+
allowed_scopes: z.array(ClientCredentialsScopeSchema).describe(
|
|
28
|
+
"List of OAuth scopes that this application is allowed to request"
|
|
29
|
+
),
|
|
30
|
+
created_at: z.string().datetime().nullable().optional().describe("When the application was created (ISO 8601)"),
|
|
31
|
+
updated_at: z.string().datetime().optional().describe("When the application was last updated (ISO 8601)")
|
|
32
|
+
});
|
|
33
|
+
var ClientCredentialsCreatedItemSchema = ClientCredentialsBaseSchema.extend({
|
|
34
|
+
client_secret: z.string().describe("The client secret (only shown once on creation)")
|
|
35
|
+
});
|
|
36
|
+
var ListClientCredentialsQuerySchema = z.object({
|
|
37
|
+
pageSize: z.coerce.number().int().min(1).max(100).optional().describe("Number of items per page (default: 100, max: 100)"),
|
|
38
|
+
offset: z.coerce.number().int().min(0).optional().describe("Pagination offset")
|
|
39
|
+
}).describe("Query parameters for listing client credentials");
|
|
40
|
+
var ListClientCredentialsResponseSchema = z.object({
|
|
41
|
+
data: z.array(ClientCredentialsItemSchema).describe("Array of client credentials"),
|
|
42
|
+
links: z.object({
|
|
43
|
+
next: z.string().nullable().optional().describe("URL for the next page of results (if available)")
|
|
44
|
+
}).describe("Pagination links"),
|
|
45
|
+
meta: z.object({
|
|
46
|
+
count: z.number().describe("Total number of items"),
|
|
47
|
+
limit: z.number().describe("Number of items per page"),
|
|
48
|
+
offset: z.number().describe("Offset of the current page")
|
|
49
|
+
}).describe("Pagination metadata")
|
|
50
|
+
}).describe("Response for listing client credentials");
|
|
51
|
+
var CreateClientCredentialsRequestSchema = z.object({
|
|
52
|
+
name: z.string().min(1).max(255).describe("Human-readable name for the client credentials"),
|
|
53
|
+
allowed_scopes: z.array(ClientCredentialsScopeSchema).min(1).describe(
|
|
54
|
+
"List of OAuth scopes that this application will be allowed to request"
|
|
55
|
+
)
|
|
56
|
+
}).describe("Request body for creating client credentials");
|
|
57
|
+
var CreateClientCredentialsResponseSchema = z.object({
|
|
58
|
+
data: ClientCredentialsCreatedItemSchema.describe(
|
|
59
|
+
"The created client credentials (includes client_secret)"
|
|
60
|
+
)
|
|
61
|
+
}).describe("Response for creating client credentials");
|
|
62
|
+
var DeleteClientCredentialsParamSchema = z.object({
|
|
63
|
+
clientId: z.string().describe("The client ID of the credentials to delete")
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
ClientCredentialsCreatedItemSchema,
|
|
67
|
+
ClientCredentialsItemSchema,
|
|
68
|
+
ClientCredentialsScopeSchema,
|
|
69
|
+
CreateClientCredentialsRequestSchema,
|
|
70
|
+
CreateClientCredentialsResponseSchema,
|
|
71
|
+
DeleteClientCredentialsParamSchema,
|
|
72
|
+
IdentityClientCredentialsCreatedItemSchema,
|
|
73
|
+
IdentityClientCredentialsItemSchema,
|
|
74
|
+
IdentityClientCredentialsListResponseSchema,
|
|
75
|
+
ListClientCredentialsQuerySchema,
|
|
76
|
+
ListClientCredentialsResponseSchema
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=client-credentials.js.map
|
|
@@ -0,0 +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 pageSize: 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":"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","names":[]}
|
package/openapi.yaml
CHANGED
|
@@ -17,6 +17,10 @@ tags:
|
|
|
17
17
|
description: App-related routes
|
|
18
18
|
- name: Authentications
|
|
19
19
|
description: Authentication-related routes
|
|
20
|
+
- name: Client Credentials
|
|
21
|
+
description: Client credentials management routes
|
|
22
|
+
- name: Deduplication
|
|
23
|
+
description: Deduplication-related routes
|
|
20
24
|
- name: Documentation
|
|
21
25
|
description: Documentation-related routes
|
|
22
26
|
components:
|
|
@@ -151,6 +155,94 @@ components:
|
|
|
151
155
|
required:
|
|
152
156
|
- errors
|
|
153
157
|
description: A JSON:API error response document containing an array of error objects.
|
|
158
|
+
CheckDedupeResponse:
|
|
159
|
+
type: object
|
|
160
|
+
properties:
|
|
161
|
+
data:
|
|
162
|
+
type: object
|
|
163
|
+
properties:
|
|
164
|
+
is_duplicate:
|
|
165
|
+
type: boolean
|
|
166
|
+
description: Whether this combination of dedupe_key and parameters has been seen before
|
|
167
|
+
dedupe_id:
|
|
168
|
+
type: string
|
|
169
|
+
format: uuid
|
|
170
|
+
description: Unique identifier for this dedupe record
|
|
171
|
+
created_at:
|
|
172
|
+
type: string
|
|
173
|
+
format: date-time
|
|
174
|
+
description: ISO 8601 timestamp when the record was created
|
|
175
|
+
expires_at:
|
|
176
|
+
type: string
|
|
177
|
+
format: date-time
|
|
178
|
+
description: ISO 8601 timestamp when the record will expire
|
|
179
|
+
required:
|
|
180
|
+
- is_duplicate
|
|
181
|
+
- dedupe_id
|
|
182
|
+
- created_at
|
|
183
|
+
- expires_at
|
|
184
|
+
description: The dedupe check result
|
|
185
|
+
required:
|
|
186
|
+
- data
|
|
187
|
+
CheckDedupeRequest:
|
|
188
|
+
type: object
|
|
189
|
+
properties:
|
|
190
|
+
dedupe_key:
|
|
191
|
+
type: string
|
|
192
|
+
minLength: 1
|
|
193
|
+
maxLength: 255
|
|
194
|
+
description: A key to namespace the deduplication check
|
|
195
|
+
parameters:
|
|
196
|
+
type: object
|
|
197
|
+
additionalProperties: {}
|
|
198
|
+
description: Parameters object to check for duplicates. The hash is computed from this object.
|
|
199
|
+
required:
|
|
200
|
+
- dedupe_key
|
|
201
|
+
- parameters
|
|
202
|
+
CreateClientCredentialsResponse:
|
|
203
|
+
type: object
|
|
204
|
+
properties:
|
|
205
|
+
data:
|
|
206
|
+
type: object
|
|
207
|
+
properties:
|
|
208
|
+
client_id:
|
|
209
|
+
type: string
|
|
210
|
+
description: The public identifier (Client ID) of the OAuth application
|
|
211
|
+
name:
|
|
212
|
+
type: string
|
|
213
|
+
description: Human-readable name of the OAuth application
|
|
214
|
+
client_secret:
|
|
215
|
+
type: string
|
|
216
|
+
description: The client secret (only shown once on creation)
|
|
217
|
+
required:
|
|
218
|
+
- client_id
|
|
219
|
+
- name
|
|
220
|
+
- client_secret
|
|
221
|
+
description: The created client credentials (includes client_secret)
|
|
222
|
+
required:
|
|
223
|
+
- data
|
|
224
|
+
description: Response for creating client credentials
|
|
225
|
+
CreateClientCredentialsRequest:
|
|
226
|
+
type: object
|
|
227
|
+
properties:
|
|
228
|
+
name:
|
|
229
|
+
type: string
|
|
230
|
+
minLength: 1
|
|
231
|
+
maxLength: 255
|
|
232
|
+
description: Human-readable name for the client credentials
|
|
233
|
+
allowed_scopes:
|
|
234
|
+
type: array
|
|
235
|
+
items:
|
|
236
|
+
type: string
|
|
237
|
+
enum:
|
|
238
|
+
- credentials
|
|
239
|
+
- external
|
|
240
|
+
minItems: 1
|
|
241
|
+
description: List of OAuth scopes that this application will be allowed to request
|
|
242
|
+
required:
|
|
243
|
+
- name
|
|
244
|
+
- allowed_scopes
|
|
245
|
+
description: Request body for creating client credentials
|
|
154
246
|
AuthenticationItem:
|
|
155
247
|
type: object
|
|
156
248
|
properties:
|
|
@@ -681,6 +773,74 @@ components:
|
|
|
681
773
|
- links
|
|
682
774
|
- meta
|
|
683
775
|
description: Response schema for listing authentications
|
|
776
|
+
ListClientCredentialsResponse:
|
|
777
|
+
type: object
|
|
778
|
+
properties:
|
|
779
|
+
data:
|
|
780
|
+
type: array
|
|
781
|
+
items:
|
|
782
|
+
type: object
|
|
783
|
+
properties:
|
|
784
|
+
client_id:
|
|
785
|
+
type: string
|
|
786
|
+
description: The public identifier (Client ID) of the OAuth application
|
|
787
|
+
name:
|
|
788
|
+
type: string
|
|
789
|
+
description: Human-readable name of the OAuth application
|
|
790
|
+
allowed_scopes:
|
|
791
|
+
type: array
|
|
792
|
+
items:
|
|
793
|
+
type: string
|
|
794
|
+
enum:
|
|
795
|
+
- credentials
|
|
796
|
+
- external
|
|
797
|
+
description: List of OAuth scopes that this application is allowed to request
|
|
798
|
+
created_at:
|
|
799
|
+
type:
|
|
800
|
+
- string
|
|
801
|
+
- "null"
|
|
802
|
+
format: date-time
|
|
803
|
+
description: When the application was created (ISO 8601)
|
|
804
|
+
updated_at:
|
|
805
|
+
type: string
|
|
806
|
+
format: date-time
|
|
807
|
+
description: When the application was last updated (ISO 8601)
|
|
808
|
+
required:
|
|
809
|
+
- client_id
|
|
810
|
+
- name
|
|
811
|
+
- allowed_scopes
|
|
812
|
+
description: Array of client credentials
|
|
813
|
+
links:
|
|
814
|
+
type: object
|
|
815
|
+
properties:
|
|
816
|
+
next:
|
|
817
|
+
type:
|
|
818
|
+
- string
|
|
819
|
+
- "null"
|
|
820
|
+
description: URL for the next page of results (if available)
|
|
821
|
+
description: Pagination links
|
|
822
|
+
meta:
|
|
823
|
+
type: object
|
|
824
|
+
properties:
|
|
825
|
+
count:
|
|
826
|
+
type: number
|
|
827
|
+
description: Total number of items
|
|
828
|
+
limit:
|
|
829
|
+
type: number
|
|
830
|
+
description: Number of items per page
|
|
831
|
+
offset:
|
|
832
|
+
type: number
|
|
833
|
+
description: Offset of the current page
|
|
834
|
+
required:
|
|
835
|
+
- count
|
|
836
|
+
- limit
|
|
837
|
+
- offset
|
|
838
|
+
description: Pagination metadata
|
|
839
|
+
required:
|
|
840
|
+
- data
|
|
841
|
+
- links
|
|
842
|
+
- meta
|
|
843
|
+
description: Response for listing client credentials
|
|
684
844
|
parameters: {}
|
|
685
845
|
securitySchemes:
|
|
686
846
|
userJwt:
|
|
@@ -689,22 +849,35 @@ components:
|
|
|
689
849
|
name: Authorization
|
|
690
850
|
description: "Format should be `JWT <your-jwt>` (you must ensure that the JWT prefix is included in your requests).\\n\\nExample: `Authorization: JWT your.jwt.value.here`"
|
|
691
851
|
paths:
|
|
692
|
-
/api/v0/
|
|
693
|
-
|
|
694
|
-
summary:
|
|
695
|
-
description:
|
|
852
|
+
/api/v0/dedupe/check:
|
|
853
|
+
post:
|
|
854
|
+
summary: Check for duplicate
|
|
855
|
+
description: Checks if a combination of dedupe_key and parameters has been seen before. If new, stores the hash and returns is_duplicate=false. If exists, returns is_duplicate=true. Records automatically expire after 7 days.
|
|
696
856
|
tags:
|
|
697
|
-
-
|
|
698
|
-
operationId:
|
|
699
|
-
security:
|
|
857
|
+
- Deduplication
|
|
858
|
+
operationId: v0_check_dedupe
|
|
859
|
+
security:
|
|
860
|
+
- userJwt: []
|
|
861
|
+
requestBody:
|
|
862
|
+
content:
|
|
863
|
+
application/json:
|
|
864
|
+
schema:
|
|
865
|
+
$ref: "#/components/schemas/CheckDedupeRequest"
|
|
866
|
+
examples:
|
|
867
|
+
default:
|
|
868
|
+
summary: Check for duplicate email send
|
|
869
|
+
value:
|
|
870
|
+
dedupe_key: email-campaign-123
|
|
871
|
+
parameters:
|
|
872
|
+
email: user@example.com
|
|
873
|
+
template_id: welcome-email
|
|
700
874
|
responses:
|
|
701
875
|
"200":
|
|
702
|
-
description:
|
|
876
|
+
description: Dedupe check completed successfully
|
|
703
877
|
content:
|
|
704
|
-
|
|
878
|
+
application/json:
|
|
705
879
|
schema:
|
|
706
|
-
|
|
707
|
-
description: OpenAPI specification in YAML format
|
|
880
|
+
$ref: "#/components/schemas/CheckDedupeResponse"
|
|
708
881
|
"400":
|
|
709
882
|
description: Bad Request
|
|
710
883
|
content:
|
|
@@ -757,6 +930,205 @@ paths:
|
|
|
757
930
|
application/json: &a7
|
|
758
931
|
schema:
|
|
759
932
|
$ref: "#/components/schemas/ErrorsResponse"
|
|
933
|
+
/api/v0/client-credentials:
|
|
934
|
+
post:
|
|
935
|
+
summary: Create client credentials
|
|
936
|
+
description: Creates new client credentials for the authenticated user. The client_secret is only returned once in this response and cannot be retrieved again.
|
|
937
|
+
tags:
|
|
938
|
+
- Client Credentials
|
|
939
|
+
operationId: v0_create_client_credentials
|
|
940
|
+
security:
|
|
941
|
+
- userJwt: []
|
|
942
|
+
x-required-scopes:
|
|
943
|
+
- credentials
|
|
944
|
+
requestBody:
|
|
945
|
+
content:
|
|
946
|
+
application/json:
|
|
947
|
+
schema:
|
|
948
|
+
$ref: "#/components/schemas/CreateClientCredentialsRequest"
|
|
949
|
+
examples:
|
|
950
|
+
default:
|
|
951
|
+
summary: Create credentials with external scope
|
|
952
|
+
value:
|
|
953
|
+
name: My App Credentials
|
|
954
|
+
allowed_scopes:
|
|
955
|
+
- external
|
|
956
|
+
responses:
|
|
957
|
+
"201":
|
|
958
|
+
description: Client credentials created successfully
|
|
959
|
+
content:
|
|
960
|
+
application/json:
|
|
961
|
+
schema:
|
|
962
|
+
$ref: "#/components/schemas/CreateClientCredentialsResponse"
|
|
963
|
+
"400":
|
|
964
|
+
description: Bad Request
|
|
965
|
+
content:
|
|
966
|
+
application/json: *a1
|
|
967
|
+
"401":
|
|
968
|
+
description: Unauthorized
|
|
969
|
+
content:
|
|
970
|
+
application/json: *a2
|
|
971
|
+
"429":
|
|
972
|
+
description: Too Many Requests
|
|
973
|
+
headers: *a3
|
|
974
|
+
content:
|
|
975
|
+
application/json: *a4
|
|
976
|
+
"500":
|
|
977
|
+
description: Server Error
|
|
978
|
+
content:
|
|
979
|
+
application/json: *a5
|
|
980
|
+
"503":
|
|
981
|
+
description: Service Unavailable
|
|
982
|
+
headers: *a6
|
|
983
|
+
content:
|
|
984
|
+
application/json: *a7
|
|
985
|
+
get:
|
|
986
|
+
summary: List client credentials
|
|
987
|
+
description: Returns a paginated list of client credentials for the authenticated user.
|
|
988
|
+
tags:
|
|
989
|
+
- Client Credentials
|
|
990
|
+
operationId: v0_list_client_credentials
|
|
991
|
+
security:
|
|
992
|
+
- userJwt: []
|
|
993
|
+
x-required-scopes:
|
|
994
|
+
- credentials
|
|
995
|
+
parameters:
|
|
996
|
+
- schema:
|
|
997
|
+
type: integer
|
|
998
|
+
minimum: 1
|
|
999
|
+
maximum: 100
|
|
1000
|
+
description: "Number of items per page (default: 100, max: 100)"
|
|
1001
|
+
required: false
|
|
1002
|
+
description: "Number of items per page (default: 100, max: 100)"
|
|
1003
|
+
name: pageSize
|
|
1004
|
+
in: query
|
|
1005
|
+
- schema:
|
|
1006
|
+
type:
|
|
1007
|
+
- integer
|
|
1008
|
+
- "null"
|
|
1009
|
+
minimum: 0
|
|
1010
|
+
description: Pagination offset
|
|
1011
|
+
required: false
|
|
1012
|
+
description: Pagination offset
|
|
1013
|
+
name: offset
|
|
1014
|
+
in: query
|
|
1015
|
+
responses:
|
|
1016
|
+
"200":
|
|
1017
|
+
description: Successfully retrieved client credentials list
|
|
1018
|
+
content:
|
|
1019
|
+
application/json:
|
|
1020
|
+
schema:
|
|
1021
|
+
$ref: "#/components/schemas/ListClientCredentialsResponse"
|
|
1022
|
+
"400":
|
|
1023
|
+
description: Bad Request
|
|
1024
|
+
content:
|
|
1025
|
+
application/json: *a1
|
|
1026
|
+
"401":
|
|
1027
|
+
description: Unauthorized
|
|
1028
|
+
content:
|
|
1029
|
+
application/json: *a2
|
|
1030
|
+
"429":
|
|
1031
|
+
description: Too Many Requests
|
|
1032
|
+
headers: *a3
|
|
1033
|
+
content:
|
|
1034
|
+
application/json: *a4
|
|
1035
|
+
"500":
|
|
1036
|
+
description: Server Error
|
|
1037
|
+
content:
|
|
1038
|
+
application/json: *a5
|
|
1039
|
+
"503":
|
|
1040
|
+
description: Service Unavailable
|
|
1041
|
+
headers: *a6
|
|
1042
|
+
content:
|
|
1043
|
+
application/json: *a7
|
|
1044
|
+
/api/v0/client-credentials/{clientId}:
|
|
1045
|
+
delete:
|
|
1046
|
+
summary: Delete client credentials
|
|
1047
|
+
description: Deletes client credentials by client ID. Returns 404 if the credentials do not exist or are not owned by the authenticated user.
|
|
1048
|
+
tags:
|
|
1049
|
+
- Client Credentials
|
|
1050
|
+
operationId: v0_delete_client_credentials
|
|
1051
|
+
security:
|
|
1052
|
+
- userJwt: []
|
|
1053
|
+
x-required-scopes:
|
|
1054
|
+
- credentials
|
|
1055
|
+
parameters:
|
|
1056
|
+
- schema:
|
|
1057
|
+
type: string
|
|
1058
|
+
description: The client ID of the credentials to delete
|
|
1059
|
+
required: true
|
|
1060
|
+
description: The client ID of the credentials to delete
|
|
1061
|
+
name: clientId
|
|
1062
|
+
in: path
|
|
1063
|
+
responses:
|
|
1064
|
+
"204":
|
|
1065
|
+
description: Client credentials deleted successfully
|
|
1066
|
+
"400":
|
|
1067
|
+
description: Bad Request
|
|
1068
|
+
content:
|
|
1069
|
+
application/json: *a1
|
|
1070
|
+
"401":
|
|
1071
|
+
description: Unauthorized
|
|
1072
|
+
content:
|
|
1073
|
+
application/json: *a2
|
|
1074
|
+
"404":
|
|
1075
|
+
description: Client credentials not found
|
|
1076
|
+
content:
|
|
1077
|
+
application/json:
|
|
1078
|
+
schema:
|
|
1079
|
+
$ref: "#/components/schemas/ErrorsResponse"
|
|
1080
|
+
"429":
|
|
1081
|
+
description: Too Many Requests
|
|
1082
|
+
headers: *a3
|
|
1083
|
+
content:
|
|
1084
|
+
application/json: *a4
|
|
1085
|
+
"500":
|
|
1086
|
+
description: Server Error
|
|
1087
|
+
content:
|
|
1088
|
+
application/json: *a5
|
|
1089
|
+
"503":
|
|
1090
|
+
description: Service Unavailable
|
|
1091
|
+
headers: *a6
|
|
1092
|
+
content:
|
|
1093
|
+
application/json: *a7
|
|
1094
|
+
/api/v0/docs/openapi-spec:
|
|
1095
|
+
get:
|
|
1096
|
+
summary: OpenAPI Specification
|
|
1097
|
+
description: Serves the OpenAPI specification file
|
|
1098
|
+
tags:
|
|
1099
|
+
- Documentation
|
|
1100
|
+
operationId: v0_docs_openapi_spec
|
|
1101
|
+
security: []
|
|
1102
|
+
responses:
|
|
1103
|
+
"200":
|
|
1104
|
+
description: OpenAPI specification
|
|
1105
|
+
content:
|
|
1106
|
+
text/yaml:
|
|
1107
|
+
schema:
|
|
1108
|
+
type: string
|
|
1109
|
+
description: OpenAPI specification in YAML format
|
|
1110
|
+
"400":
|
|
1111
|
+
description: Bad Request
|
|
1112
|
+
content:
|
|
1113
|
+
application/json: *a1
|
|
1114
|
+
"401":
|
|
1115
|
+
description: Unauthorized
|
|
1116
|
+
content:
|
|
1117
|
+
application/json: *a2
|
|
1118
|
+
"429":
|
|
1119
|
+
description: Too Many Requests
|
|
1120
|
+
headers: *a3
|
|
1121
|
+
content:
|
|
1122
|
+
application/json: *a4
|
|
1123
|
+
"500":
|
|
1124
|
+
description: Server Error
|
|
1125
|
+
content:
|
|
1126
|
+
application/json: *a5
|
|
1127
|
+
"503":
|
|
1128
|
+
description: Service Unavailable
|
|
1129
|
+
headers: *a6
|
|
1130
|
+
content:
|
|
1131
|
+
application/json: *a7
|
|
760
1132
|
/api/v0/authentications/{authenticationId}:
|
|
761
1133
|
get:
|
|
762
1134
|
summary: Get an authentication
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/zapier-sdk-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
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.",
|
|
@@ -51,6 +51,11 @@
|
|
|
51
51
|
"import": "./dist/v0/schemas/actions.js",
|
|
52
52
|
"require": "./dist/v0/schemas/actions.cjs"
|
|
53
53
|
},
|
|
54
|
+
"./v0/schemas/client-credentials": {
|
|
55
|
+
"types": "./dist/v0/schemas/client-credentials.d.ts",
|
|
56
|
+
"import": "./dist/v0/schemas/client-credentials.js",
|
|
57
|
+
"require": "./dist/v0/schemas/client-credentials.cjs"
|
|
58
|
+
},
|
|
54
59
|
"./v0/common/responses": {
|
|
55
60
|
"types": "./dist/v0/common/responses.d.ts",
|
|
56
61
|
"import": "./dist/v0/common/responses.js",
|