@vercel/sdk 14.0.0-canary.7 → 14.0.0-canary.9

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.
Files changed (179) hide show
  1. package/.devcontainer/README.md +1 -1
  2. package/README.md +25 -0
  3. package/docs/sdks/authentication/README.md +69 -0
  4. package/docs/sdks/marketplace/README.md +694 -0
  5. package/docs/sdks/projects/README.md +85 -0
  6. package/esm/funcs/authenticationExchangeSsoToken.d.ts +15 -0
  7. package/esm/funcs/authenticationExchangeSsoToken.d.ts.map +1 -0
  8. package/esm/funcs/authenticationExchangeSsoToken.js +66 -0
  9. package/esm/funcs/authenticationExchangeSsoToken.js.map +1 -0
  10. package/esm/funcs/marketplaceCreateEvent.d.ts +15 -0
  11. package/esm/funcs/marketplaceCreateEvent.d.ts.map +1 -0
  12. package/esm/funcs/marketplaceCreateEvent.js +73 -0
  13. package/esm/funcs/marketplaceCreateEvent.js.map +1 -0
  14. package/esm/funcs/marketplaceExchangeSsoToken.d.ts +15 -0
  15. package/esm/funcs/marketplaceExchangeSsoToken.d.ts.map +1 -0
  16. package/esm/funcs/marketplaceExchangeSsoToken.js +66 -0
  17. package/esm/funcs/marketplaceExchangeSsoToken.js.map +1 -0
  18. package/esm/funcs/marketplaceGetAccountInfo.d.ts +15 -0
  19. package/esm/funcs/marketplaceGetAccountInfo.d.ts.map +1 -0
  20. package/esm/funcs/marketplaceGetAccountInfo.js +71 -0
  21. package/esm/funcs/marketplaceGetAccountInfo.js.map +1 -0
  22. package/esm/funcs/marketplaceGetInvoice.d.ts +15 -0
  23. package/esm/funcs/marketplaceGetInvoice.d.ts.map +1 -0
  24. package/esm/funcs/marketplaceGetInvoice.js +75 -0
  25. package/esm/funcs/marketplaceGetInvoice.js.map +1 -0
  26. package/esm/funcs/marketplaceGetMember.d.ts +15 -0
  27. package/esm/funcs/marketplaceGetMember.d.ts.map +1 -0
  28. package/esm/funcs/marketplaceGetMember.js +75 -0
  29. package/esm/funcs/marketplaceGetMember.js.map +1 -0
  30. package/esm/funcs/marketplaceSubmitBillingData.d.ts +15 -0
  31. package/esm/funcs/marketplaceSubmitBillingData.d.ts.map +1 -0
  32. package/esm/funcs/marketplaceSubmitBillingData.js +73 -0
  33. package/esm/funcs/marketplaceSubmitBillingData.js.map +1 -0
  34. package/esm/funcs/marketplaceSubmitInvoice.d.ts +15 -0
  35. package/esm/funcs/marketplaceSubmitInvoice.d.ts.map +1 -0
  36. package/esm/funcs/marketplaceSubmitInvoice.js +72 -0
  37. package/esm/funcs/marketplaceSubmitInvoice.js.map +1 -0
  38. package/esm/funcs/marketplaceUpdateInvoice.d.ts +15 -0
  39. package/esm/funcs/marketplaceUpdateInvoice.d.ts.map +1 -0
  40. package/esm/funcs/marketplaceUpdateInvoice.js +77 -0
  41. package/esm/funcs/marketplaceUpdateInvoice.js.map +1 -0
  42. package/esm/funcs/marketplaceUpdateResourceSecrets.d.ts +15 -0
  43. package/esm/funcs/marketplaceUpdateResourceSecrets.d.ts.map +1 -0
  44. package/esm/funcs/marketplaceUpdateResourceSecrets.js +78 -0
  45. package/esm/funcs/marketplaceUpdateResourceSecrets.js.map +1 -0
  46. package/esm/funcs/projectsGetProjectDomains.d.ts +15 -0
  47. package/esm/funcs/projectsGetProjectDomains.d.ts.map +1 -0
  48. package/esm/funcs/projectsGetProjectDomains.js +89 -0
  49. package/esm/funcs/projectsGetProjectDomains.js.map +1 -0
  50. package/esm/lib/config.d.ts +2 -2
  51. package/esm/lib/config.js +2 -2
  52. package/esm/models/components/authuser.d.ts +6 -3
  53. package/esm/models/components/authuser.d.ts.map +1 -1
  54. package/esm/models/components/authuser.js +2 -1
  55. package/esm/models/components/authuser.js.map +1 -1
  56. package/esm/models/components/security.d.ts +2 -2
  57. package/esm/models/components/security.d.ts.map +1 -1
  58. package/esm/models/components/security.js +2 -2
  59. package/esm/models/components/security.js.map +1 -1
  60. package/esm/models/operations/createevent.d.ts +187 -0
  61. package/esm/models/operations/createevent.d.ts.map +1 -0
  62. package/esm/models/operations/createevent.js +195 -0
  63. package/esm/models/operations/createevent.js.map +1 -0
  64. package/esm/models/operations/createproject.d.ts +4 -0
  65. package/esm/models/operations/createproject.d.ts.map +1 -1
  66. package/esm/models/operations/createproject.js +4 -0
  67. package/esm/models/operations/createproject.js.map +1 -1
  68. package/esm/models/operations/createteam.d.ts +15 -15
  69. package/esm/models/operations/createteam.d.ts.map +1 -1
  70. package/esm/models/operations/createteam.js +15 -15
  71. package/esm/models/operations/createteam.js.map +1 -1
  72. package/esm/models/operations/deletedeployment.d.ts +8 -8
  73. package/esm/models/operations/deletedeployment.d.ts.map +1 -1
  74. package/esm/models/operations/deletedeployment.js +12 -12
  75. package/esm/models/operations/deletedeployment.js.map +1 -1
  76. package/esm/models/operations/exchangessotoken.d.ts +81 -0
  77. package/esm/models/operations/exchangessotoken.d.ts.map +1 -0
  78. package/esm/models/operations/exchangessotoken.js +93 -0
  79. package/esm/models/operations/exchangessotoken.js.map +1 -0
  80. package/esm/models/operations/getaccountinfo.d.ts +85 -0
  81. package/esm/models/operations/getaccountinfo.d.ts.map +1 -0
  82. package/esm/models/operations/getaccountinfo.js +87 -0
  83. package/esm/models/operations/getaccountinfo.js.map +1 -0
  84. package/esm/models/operations/getinvoice.d.ts +232 -0
  85. package/esm/models/operations/getinvoice.d.ts.map +1 -0
  86. package/esm/models/operations/getinvoice.js +219 -0
  87. package/esm/models/operations/getinvoice.js.map +1 -0
  88. package/esm/models/operations/getmember.d.ts +84 -0
  89. package/esm/models/operations/getmember.d.ts.map +1 -0
  90. package/esm/models/operations/getmember.js +79 -0
  91. package/esm/models/operations/getmember.js.map +1 -0
  92. package/esm/models/operations/getprojectdomains.d.ts +367 -0
  93. package/esm/models/operations/getprojectdomains.d.ts.map +1 -0
  94. package/esm/models/operations/getprojectdomains.js +272 -0
  95. package/esm/models/operations/getprojectdomains.js.map +1 -0
  96. package/esm/models/operations/getprojects.d.ts +4 -0
  97. package/esm/models/operations/getprojects.d.ts.map +1 -1
  98. package/esm/models/operations/getprojects.js +4 -0
  99. package/esm/models/operations/getprojects.js.map +1 -1
  100. package/esm/models/operations/putfirewallconfig.d.ts +44 -44
  101. package/esm/models/operations/putfirewallconfig.d.ts.map +1 -1
  102. package/esm/models/operations/putfirewallconfig.js +71 -72
  103. package/esm/models/operations/putfirewallconfig.js.map +1 -1
  104. package/esm/models/operations/submitbillingdata.d.ts +448 -0
  105. package/esm/models/operations/submitbillingdata.d.ts.map +1 -0
  106. package/esm/models/operations/submitbillingdata.js +355 -0
  107. package/esm/models/operations/submitbillingdata.js.map +1 -0
  108. package/esm/models/operations/submitinvoice.d.ts +299 -0
  109. package/esm/models/operations/submitinvoice.d.ts.map +1 -0
  110. package/esm/models/operations/submitinvoice.js +269 -0
  111. package/esm/models/operations/submitinvoice.js.map +1 -0
  112. package/esm/models/operations/updateinvoice.d.ts +91 -0
  113. package/esm/models/operations/updateinvoice.d.ts.map +1 -0
  114. package/esm/models/operations/updateinvoice.js +92 -0
  115. package/esm/models/operations/updateinvoice.js.map +1 -0
  116. package/esm/models/operations/updateproject.d.ts +4 -0
  117. package/esm/models/operations/updateproject.d.ts.map +1 -1
  118. package/esm/models/operations/updateproject.js +4 -0
  119. package/esm/models/operations/updateproject.js.map +1 -1
  120. package/esm/models/operations/updateprojectdatacache.d.ts +4 -0
  121. package/esm/models/operations/updateprojectdatacache.d.ts.map +1 -1
  122. package/esm/models/operations/updateprojectdatacache.js +4 -0
  123. package/esm/models/operations/updateprojectdatacache.js.map +1 -1
  124. package/esm/models/operations/updateresourcesecrets.d.ts +87 -0
  125. package/esm/models/operations/updateresourcesecrets.d.ts.map +1 -0
  126. package/esm/models/operations/updateresourcesecrets.js +100 -0
  127. package/esm/models/operations/updateresourcesecrets.js.map +1 -0
  128. package/esm/sdk/authentication.d.ts +8 -0
  129. package/esm/sdk/authentication.d.ts.map +1 -1
  130. package/esm/sdk/authentication.js +10 -0
  131. package/esm/sdk/authentication.js.map +1 -1
  132. package/esm/sdk/marketplace.d.ts +76 -0
  133. package/esm/sdk/marketplace.d.ts.map +1 -0
  134. package/esm/sdk/marketplace.js +98 -0
  135. package/esm/sdk/marketplace.js.map +1 -0
  136. package/esm/sdk/projects.d.ts +8 -0
  137. package/esm/sdk/projects.d.ts.map +1 -1
  138. package/esm/sdk/projects.js +10 -0
  139. package/esm/sdk/projects.js.map +1 -1
  140. package/esm/sdk/sdk.d.ts +5 -2
  141. package/esm/sdk/sdk.d.ts.map +1 -1
  142. package/esm/sdk/sdk.js +9 -4
  143. package/esm/sdk/sdk.js.map +1 -1
  144. package/package.json +2 -2
  145. package/src/funcs/authenticationExchangeSsoToken.ts +125 -0
  146. package/src/funcs/marketplaceCreateEvent.ts +137 -0
  147. package/src/funcs/marketplaceExchangeSsoToken.ts +125 -0
  148. package/src/funcs/marketplaceGetAccountInfo.ts +137 -0
  149. package/src/funcs/marketplaceGetInvoice.ts +141 -0
  150. package/src/funcs/marketplaceGetMember.ts +141 -0
  151. package/src/funcs/marketplaceSubmitBillingData.ts +137 -0
  152. package/src/funcs/marketplaceSubmitInvoice.ts +138 -0
  153. package/src/funcs/marketplaceUpdateInvoice.ts +141 -0
  154. package/src/funcs/marketplaceUpdateResourceSecrets.ts +146 -0
  155. package/src/funcs/projectsGetProjectDomains.ts +150 -0
  156. package/src/lib/config.ts +2 -2
  157. package/src/models/components/authuser.ts +2 -1
  158. package/src/models/components/security.ts +4 -4
  159. package/src/models/operations/createevent.ts +373 -0
  160. package/src/models/operations/createproject.ts +8 -0
  161. package/src/models/operations/createteam.ts +31 -24
  162. package/src/models/operations/deletedeployment.ts +16 -15
  163. package/src/models/operations/exchangessotoken.ts +192 -0
  164. package/src/models/operations/getaccountinfo.ts +187 -0
  165. package/src/models/operations/getinvoice.ts +454 -0
  166. package/src/models/operations/getmember.ts +160 -0
  167. package/src/models/operations/getprojectdomains.ts +571 -0
  168. package/src/models/operations/getprojects.ts +8 -0
  169. package/src/models/operations/putfirewallconfig.ts +102 -93
  170. package/src/models/operations/submitbillingdata.ts +813 -0
  171. package/src/models/operations/submitinvoice.ts +593 -0
  172. package/src/models/operations/updateinvoice.ts +180 -0
  173. package/src/models/operations/updateproject.ts +8 -0
  174. package/src/models/operations/updateprojectdatacache.ts +8 -0
  175. package/src/models/operations/updateresourcesecrets.ts +206 -0
  176. package/src/sdk/authentication.ts +22 -0
  177. package/src/sdk/marketplace.ts +194 -0
  178. package/src/sdk/projects.ts +22 -0
  179. package/src/sdk/sdk.ts +11 -5
@@ -63,7 +63,7 @@ export type CreateTeamRequestBody = {
63
63
  /**
64
64
  * IMPORTANT: If extending Billing, particularly with optional fields, make sure you also update `sync-orb-subscription-to-owner.ts` to handle the items when the object is recreated.
65
65
  */
66
- export type Billing = {};
66
+ export type CreateTeamBilling = {};
67
67
 
68
68
  /**
69
69
  * The team was created successfully
@@ -77,7 +77,7 @@ export type CreateTeamResponseBody = {
77
77
  /**
78
78
  * IMPORTANT: If extending Billing, particularly with optional fields, make sure you also update `sync-orb-subscription-to-owner.ts` to handle the items when the object is recreated.
79
79
  */
80
- billing: Billing;
80
+ billing: CreateTeamBilling;
81
81
  };
82
82
 
83
83
  /** @internal */
@@ -253,43 +253,50 @@ export function createTeamRequestBodyFromJSON(
253
253
  }
254
254
 
255
255
  /** @internal */
256
- export const Billing$inboundSchema: z.ZodType<Billing, z.ZodTypeDef, unknown> =
257
- z.object({});
256
+ export const CreateTeamBilling$inboundSchema: z.ZodType<
257
+ CreateTeamBilling,
258
+ z.ZodTypeDef,
259
+ unknown
260
+ > = z.object({});
258
261
 
259
262
  /** @internal */
260
- export type Billing$Outbound = {};
263
+ export type CreateTeamBilling$Outbound = {};
261
264
 
262
265
  /** @internal */
263
- export const Billing$outboundSchema: z.ZodType<
264
- Billing$Outbound,
266
+ export const CreateTeamBilling$outboundSchema: z.ZodType<
267
+ CreateTeamBilling$Outbound,
265
268
  z.ZodTypeDef,
266
- Billing
269
+ CreateTeamBilling
267
270
  > = z.object({});
268
271
 
269
272
  /**
270
273
  * @internal
271
274
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
272
275
  */
273
- export namespace Billing$ {
274
- /** @deprecated use `Billing$inboundSchema` instead. */
275
- export const inboundSchema = Billing$inboundSchema;
276
- /** @deprecated use `Billing$outboundSchema` instead. */
277
- export const outboundSchema = Billing$outboundSchema;
278
- /** @deprecated use `Billing$Outbound` instead. */
279
- export type Outbound = Billing$Outbound;
276
+ export namespace CreateTeamBilling$ {
277
+ /** @deprecated use `CreateTeamBilling$inboundSchema` instead. */
278
+ export const inboundSchema = CreateTeamBilling$inboundSchema;
279
+ /** @deprecated use `CreateTeamBilling$outboundSchema` instead. */
280
+ export const outboundSchema = CreateTeamBilling$outboundSchema;
281
+ /** @deprecated use `CreateTeamBilling$Outbound` instead. */
282
+ export type Outbound = CreateTeamBilling$Outbound;
280
283
  }
281
284
 
282
- export function billingToJSON(billing: Billing): string {
283
- return JSON.stringify(Billing$outboundSchema.parse(billing));
285
+ export function createTeamBillingToJSON(
286
+ createTeamBilling: CreateTeamBilling,
287
+ ): string {
288
+ return JSON.stringify(
289
+ CreateTeamBilling$outboundSchema.parse(createTeamBilling),
290
+ );
284
291
  }
285
292
 
286
- export function billingFromJSON(
293
+ export function createTeamBillingFromJSON(
287
294
  jsonString: string,
288
- ): SafeParseResult<Billing, SDKValidationError> {
295
+ ): SafeParseResult<CreateTeamBilling, SDKValidationError> {
289
296
  return safeParse(
290
297
  jsonString,
291
- (x) => Billing$inboundSchema.parse(JSON.parse(x)),
292
- `Failed to parse 'Billing' from JSON`,
298
+ (x) => CreateTeamBilling$inboundSchema.parse(JSON.parse(x)),
299
+ `Failed to parse 'CreateTeamBilling' from JSON`,
293
300
  );
294
301
  }
295
302
 
@@ -301,14 +308,14 @@ export const CreateTeamResponseBody$inboundSchema: z.ZodType<
301
308
  > = z.object({
302
309
  id: z.string(),
303
310
  slug: z.string(),
304
- billing: z.lazy(() => Billing$inboundSchema),
311
+ billing: z.lazy(() => CreateTeamBilling$inboundSchema),
305
312
  });
306
313
 
307
314
  /** @internal */
308
315
  export type CreateTeamResponseBody$Outbound = {
309
316
  id: string;
310
317
  slug: string;
311
- billing: Billing$Outbound;
318
+ billing: CreateTeamBilling$Outbound;
312
319
  };
313
320
 
314
321
  /** @internal */
@@ -319,7 +326,7 @@ export const CreateTeamResponseBody$outboundSchema: z.ZodType<
319
326
  > = z.object({
320
327
  id: z.string(),
321
328
  slug: z.string(),
322
- billing: z.lazy(() => Billing$outboundSchema),
329
+ billing: z.lazy(() => CreateTeamBilling$outboundSchema),
323
330
  });
324
331
 
325
332
  /**
@@ -30,13 +30,13 @@ export type DeleteDeploymentRequest = {
30
30
  /**
31
31
  * A constant with the final state of the deployment.
32
32
  */
33
- export const State = {
33
+ export const DeleteDeploymentState = {
34
34
  Deleted: "DELETED",
35
35
  } as const;
36
36
  /**
37
37
  * A constant with the final state of the deployment.
38
38
  */
39
- export type State = ClosedEnum<typeof State>;
39
+ export type DeleteDeploymentState = ClosedEnum<typeof DeleteDeploymentState>;
40
40
 
41
41
  /**
42
42
  * The deployment was successfully deleted
@@ -49,7 +49,7 @@ export type DeleteDeploymentResponseBody = {
49
49
  /**
50
50
  * A constant with the final state of the deployment.
51
51
  */
52
- state: State;
52
+ state: DeleteDeploymentState;
53
53
  };
54
54
 
55
55
  /** @internal */
@@ -116,23 +116,24 @@ export function deleteDeploymentRequestFromJSON(
116
116
  }
117
117
 
118
118
  /** @internal */
119
- export const State$inboundSchema: z.ZodNativeEnum<typeof State> = z.nativeEnum(
120
- State,
121
- );
119
+ export const DeleteDeploymentState$inboundSchema: z.ZodNativeEnum<
120
+ typeof DeleteDeploymentState
121
+ > = z.nativeEnum(DeleteDeploymentState);
122
122
 
123
123
  /** @internal */
124
- export const State$outboundSchema: z.ZodNativeEnum<typeof State> =
125
- State$inboundSchema;
124
+ export const DeleteDeploymentState$outboundSchema: z.ZodNativeEnum<
125
+ typeof DeleteDeploymentState
126
+ > = DeleteDeploymentState$inboundSchema;
126
127
 
127
128
  /**
128
129
  * @internal
129
130
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
130
131
  */
131
- export namespace State$ {
132
- /** @deprecated use `State$inboundSchema` instead. */
133
- export const inboundSchema = State$inboundSchema;
134
- /** @deprecated use `State$outboundSchema` instead. */
135
- export const outboundSchema = State$outboundSchema;
132
+ export namespace DeleteDeploymentState$ {
133
+ /** @deprecated use `DeleteDeploymentState$inboundSchema` instead. */
134
+ export const inboundSchema = DeleteDeploymentState$inboundSchema;
135
+ /** @deprecated use `DeleteDeploymentState$outboundSchema` instead. */
136
+ export const outboundSchema = DeleteDeploymentState$outboundSchema;
136
137
  }
137
138
 
138
139
  /** @internal */
@@ -142,7 +143,7 @@ export const DeleteDeploymentResponseBody$inboundSchema: z.ZodType<
142
143
  unknown
143
144
  > = z.object({
144
145
  uid: z.string(),
145
- state: State$inboundSchema,
146
+ state: DeleteDeploymentState$inboundSchema,
146
147
  });
147
148
 
148
149
  /** @internal */
@@ -158,7 +159,7 @@ export const DeleteDeploymentResponseBody$outboundSchema: z.ZodType<
158
159
  DeleteDeploymentResponseBody
159
160
  > = z.object({
160
161
  uid: z.string(),
161
- state: State$outboundSchema,
162
+ state: DeleteDeploymentState$outboundSchema,
162
163
  });
163
164
 
164
165
  /**
@@ -0,0 +1,192 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type ExchangeSsoTokenRequestBody = {
12
+ /**
13
+ * The sensitive code received from Vercel
14
+ */
15
+ code: string;
16
+ /**
17
+ * The state received from the initialization request
18
+ */
19
+ state?: string | undefined;
20
+ /**
21
+ * The integration client id
22
+ */
23
+ clientId: string;
24
+ /**
25
+ * The integration client secret
26
+ */
27
+ clientSecret: string;
28
+ /**
29
+ * The integration redirect URI
30
+ */
31
+ redirectUri?: string | undefined;
32
+ };
33
+
34
+ export type ExchangeSsoTokenResponseBody = {
35
+ idToken: string;
36
+ accessToken?: any | null | undefined;
37
+ tokenType?: any | null | undefined;
38
+ };
39
+
40
+ /** @internal */
41
+ export const ExchangeSsoTokenRequestBody$inboundSchema: z.ZodType<
42
+ ExchangeSsoTokenRequestBody,
43
+ z.ZodTypeDef,
44
+ unknown
45
+ > = z.object({
46
+ code: z.string(),
47
+ state: z.string().optional(),
48
+ client_id: z.string(),
49
+ client_secret: z.string(),
50
+ redirect_uri: z.string().optional(),
51
+ }).transform((v) => {
52
+ return remap$(v, {
53
+ "client_id": "clientId",
54
+ "client_secret": "clientSecret",
55
+ "redirect_uri": "redirectUri",
56
+ });
57
+ });
58
+
59
+ /** @internal */
60
+ export type ExchangeSsoTokenRequestBody$Outbound = {
61
+ code: string;
62
+ state?: string | undefined;
63
+ client_id: string;
64
+ client_secret: string;
65
+ redirect_uri?: string | undefined;
66
+ };
67
+
68
+ /** @internal */
69
+ export const ExchangeSsoTokenRequestBody$outboundSchema: z.ZodType<
70
+ ExchangeSsoTokenRequestBody$Outbound,
71
+ z.ZodTypeDef,
72
+ ExchangeSsoTokenRequestBody
73
+ > = z.object({
74
+ code: z.string(),
75
+ state: z.string().optional(),
76
+ clientId: z.string(),
77
+ clientSecret: z.string(),
78
+ redirectUri: z.string().optional(),
79
+ }).transform((v) => {
80
+ return remap$(v, {
81
+ clientId: "client_id",
82
+ clientSecret: "client_secret",
83
+ redirectUri: "redirect_uri",
84
+ });
85
+ });
86
+
87
+ /**
88
+ * @internal
89
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
90
+ */
91
+ export namespace ExchangeSsoTokenRequestBody$ {
92
+ /** @deprecated use `ExchangeSsoTokenRequestBody$inboundSchema` instead. */
93
+ export const inboundSchema = ExchangeSsoTokenRequestBody$inboundSchema;
94
+ /** @deprecated use `ExchangeSsoTokenRequestBody$outboundSchema` instead. */
95
+ export const outboundSchema = ExchangeSsoTokenRequestBody$outboundSchema;
96
+ /** @deprecated use `ExchangeSsoTokenRequestBody$Outbound` instead. */
97
+ export type Outbound = ExchangeSsoTokenRequestBody$Outbound;
98
+ }
99
+
100
+ export function exchangeSsoTokenRequestBodyToJSON(
101
+ exchangeSsoTokenRequestBody: ExchangeSsoTokenRequestBody,
102
+ ): string {
103
+ return JSON.stringify(
104
+ ExchangeSsoTokenRequestBody$outboundSchema.parse(
105
+ exchangeSsoTokenRequestBody,
106
+ ),
107
+ );
108
+ }
109
+
110
+ export function exchangeSsoTokenRequestBodyFromJSON(
111
+ jsonString: string,
112
+ ): SafeParseResult<ExchangeSsoTokenRequestBody, SDKValidationError> {
113
+ return safeParse(
114
+ jsonString,
115
+ (x) => ExchangeSsoTokenRequestBody$inboundSchema.parse(JSON.parse(x)),
116
+ `Failed to parse 'ExchangeSsoTokenRequestBody' from JSON`,
117
+ );
118
+ }
119
+
120
+ /** @internal */
121
+ export const ExchangeSsoTokenResponseBody$inboundSchema: z.ZodType<
122
+ ExchangeSsoTokenResponseBody,
123
+ z.ZodTypeDef,
124
+ unknown
125
+ > = z.object({
126
+ id_token: z.string(),
127
+ access_token: z.nullable(z.any()).optional(),
128
+ token_type: z.nullable(z.any()).optional(),
129
+ }).transform((v) => {
130
+ return remap$(v, {
131
+ "id_token": "idToken",
132
+ "access_token": "accessToken",
133
+ "token_type": "tokenType",
134
+ });
135
+ });
136
+
137
+ /** @internal */
138
+ export type ExchangeSsoTokenResponseBody$Outbound = {
139
+ id_token: string;
140
+ access_token?: any | null | undefined;
141
+ token_type?: any | null | undefined;
142
+ };
143
+
144
+ /** @internal */
145
+ export const ExchangeSsoTokenResponseBody$outboundSchema: z.ZodType<
146
+ ExchangeSsoTokenResponseBody$Outbound,
147
+ z.ZodTypeDef,
148
+ ExchangeSsoTokenResponseBody
149
+ > = z.object({
150
+ idToken: z.string(),
151
+ accessToken: z.nullable(z.any()).optional(),
152
+ tokenType: z.nullable(z.any()).optional(),
153
+ }).transform((v) => {
154
+ return remap$(v, {
155
+ idToken: "id_token",
156
+ accessToken: "access_token",
157
+ tokenType: "token_type",
158
+ });
159
+ });
160
+
161
+ /**
162
+ * @internal
163
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
164
+ */
165
+ export namespace ExchangeSsoTokenResponseBody$ {
166
+ /** @deprecated use `ExchangeSsoTokenResponseBody$inboundSchema` instead. */
167
+ export const inboundSchema = ExchangeSsoTokenResponseBody$inboundSchema;
168
+ /** @deprecated use `ExchangeSsoTokenResponseBody$outboundSchema` instead. */
169
+ export const outboundSchema = ExchangeSsoTokenResponseBody$outboundSchema;
170
+ /** @deprecated use `ExchangeSsoTokenResponseBody$Outbound` instead. */
171
+ export type Outbound = ExchangeSsoTokenResponseBody$Outbound;
172
+ }
173
+
174
+ export function exchangeSsoTokenResponseBodyToJSON(
175
+ exchangeSsoTokenResponseBody: ExchangeSsoTokenResponseBody,
176
+ ): string {
177
+ return JSON.stringify(
178
+ ExchangeSsoTokenResponseBody$outboundSchema.parse(
179
+ exchangeSsoTokenResponseBody,
180
+ ),
181
+ );
182
+ }
183
+
184
+ export function exchangeSsoTokenResponseBodyFromJSON(
185
+ jsonString: string,
186
+ ): SafeParseResult<ExchangeSsoTokenResponseBody, SDKValidationError> {
187
+ return safeParse(
188
+ jsonString,
189
+ (x) => ExchangeSsoTokenResponseBody$inboundSchema.parse(JSON.parse(x)),
190
+ `Failed to parse 'ExchangeSsoTokenResponseBody' from JSON`,
191
+ );
192
+ }
@@ -0,0 +1,187 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type GetAccountInfoRequest = {
11
+ integrationConfigurationId: string;
12
+ };
13
+
14
+ export type Contact = {
15
+ email: string;
16
+ name?: string | undefined;
17
+ };
18
+
19
+ export type GetAccountInfoResponseBody = {
20
+ name?: string | undefined;
21
+ url: string;
22
+ contact: Contact | null;
23
+ };
24
+
25
+ /** @internal */
26
+ export const GetAccountInfoRequest$inboundSchema: z.ZodType<
27
+ GetAccountInfoRequest,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ integrationConfigurationId: z.string(),
32
+ });
33
+
34
+ /** @internal */
35
+ export type GetAccountInfoRequest$Outbound = {
36
+ integrationConfigurationId: string;
37
+ };
38
+
39
+ /** @internal */
40
+ export const GetAccountInfoRequest$outboundSchema: z.ZodType<
41
+ GetAccountInfoRequest$Outbound,
42
+ z.ZodTypeDef,
43
+ GetAccountInfoRequest
44
+ > = z.object({
45
+ integrationConfigurationId: z.string(),
46
+ });
47
+
48
+ /**
49
+ * @internal
50
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
51
+ */
52
+ export namespace GetAccountInfoRequest$ {
53
+ /** @deprecated use `GetAccountInfoRequest$inboundSchema` instead. */
54
+ export const inboundSchema = GetAccountInfoRequest$inboundSchema;
55
+ /** @deprecated use `GetAccountInfoRequest$outboundSchema` instead. */
56
+ export const outboundSchema = GetAccountInfoRequest$outboundSchema;
57
+ /** @deprecated use `GetAccountInfoRequest$Outbound` instead. */
58
+ export type Outbound = GetAccountInfoRequest$Outbound;
59
+ }
60
+
61
+ export function getAccountInfoRequestToJSON(
62
+ getAccountInfoRequest: GetAccountInfoRequest,
63
+ ): string {
64
+ return JSON.stringify(
65
+ GetAccountInfoRequest$outboundSchema.parse(getAccountInfoRequest),
66
+ );
67
+ }
68
+
69
+ export function getAccountInfoRequestFromJSON(
70
+ jsonString: string,
71
+ ): SafeParseResult<GetAccountInfoRequest, SDKValidationError> {
72
+ return safeParse(
73
+ jsonString,
74
+ (x) => GetAccountInfoRequest$inboundSchema.parse(JSON.parse(x)),
75
+ `Failed to parse 'GetAccountInfoRequest' from JSON`,
76
+ );
77
+ }
78
+
79
+ /** @internal */
80
+ export const Contact$inboundSchema: z.ZodType<Contact, z.ZodTypeDef, unknown> =
81
+ z.object({
82
+ email: z.string(),
83
+ name: z.string().optional(),
84
+ });
85
+
86
+ /** @internal */
87
+ export type Contact$Outbound = {
88
+ email: string;
89
+ name?: string | undefined;
90
+ };
91
+
92
+ /** @internal */
93
+ export const Contact$outboundSchema: z.ZodType<
94
+ Contact$Outbound,
95
+ z.ZodTypeDef,
96
+ Contact
97
+ > = z.object({
98
+ email: z.string(),
99
+ name: z.string().optional(),
100
+ });
101
+
102
+ /**
103
+ * @internal
104
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
105
+ */
106
+ export namespace Contact$ {
107
+ /** @deprecated use `Contact$inboundSchema` instead. */
108
+ export const inboundSchema = Contact$inboundSchema;
109
+ /** @deprecated use `Contact$outboundSchema` instead. */
110
+ export const outboundSchema = Contact$outboundSchema;
111
+ /** @deprecated use `Contact$Outbound` instead. */
112
+ export type Outbound = Contact$Outbound;
113
+ }
114
+
115
+ export function contactToJSON(contact: Contact): string {
116
+ return JSON.stringify(Contact$outboundSchema.parse(contact));
117
+ }
118
+
119
+ export function contactFromJSON(
120
+ jsonString: string,
121
+ ): SafeParseResult<Contact, SDKValidationError> {
122
+ return safeParse(
123
+ jsonString,
124
+ (x) => Contact$inboundSchema.parse(JSON.parse(x)),
125
+ `Failed to parse 'Contact' from JSON`,
126
+ );
127
+ }
128
+
129
+ /** @internal */
130
+ export const GetAccountInfoResponseBody$inboundSchema: z.ZodType<
131
+ GetAccountInfoResponseBody,
132
+ z.ZodTypeDef,
133
+ unknown
134
+ > = z.object({
135
+ name: z.string().optional(),
136
+ url: z.string(),
137
+ contact: z.nullable(z.lazy(() => Contact$inboundSchema)),
138
+ });
139
+
140
+ /** @internal */
141
+ export type GetAccountInfoResponseBody$Outbound = {
142
+ name?: string | undefined;
143
+ url: string;
144
+ contact: Contact$Outbound | null;
145
+ };
146
+
147
+ /** @internal */
148
+ export const GetAccountInfoResponseBody$outboundSchema: z.ZodType<
149
+ GetAccountInfoResponseBody$Outbound,
150
+ z.ZodTypeDef,
151
+ GetAccountInfoResponseBody
152
+ > = z.object({
153
+ name: z.string().optional(),
154
+ url: z.string(),
155
+ contact: z.nullable(z.lazy(() => Contact$outboundSchema)),
156
+ });
157
+
158
+ /**
159
+ * @internal
160
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
161
+ */
162
+ export namespace GetAccountInfoResponseBody$ {
163
+ /** @deprecated use `GetAccountInfoResponseBody$inboundSchema` instead. */
164
+ export const inboundSchema = GetAccountInfoResponseBody$inboundSchema;
165
+ /** @deprecated use `GetAccountInfoResponseBody$outboundSchema` instead. */
166
+ export const outboundSchema = GetAccountInfoResponseBody$outboundSchema;
167
+ /** @deprecated use `GetAccountInfoResponseBody$Outbound` instead. */
168
+ export type Outbound = GetAccountInfoResponseBody$Outbound;
169
+ }
170
+
171
+ export function getAccountInfoResponseBodyToJSON(
172
+ getAccountInfoResponseBody: GetAccountInfoResponseBody,
173
+ ): string {
174
+ return JSON.stringify(
175
+ GetAccountInfoResponseBody$outboundSchema.parse(getAccountInfoResponseBody),
176
+ );
177
+ }
178
+
179
+ export function getAccountInfoResponseBodyFromJSON(
180
+ jsonString: string,
181
+ ): SafeParseResult<GetAccountInfoResponseBody, SDKValidationError> {
182
+ return safeParse(
183
+ jsonString,
184
+ (x) => GetAccountInfoResponseBody$inboundSchema.parse(JSON.parse(x)),
185
+ `Failed to parse 'GetAccountInfoResponseBody' from JSON`,
186
+ );
187
+ }