@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
@@ -0,0 +1,150 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { VercelCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import {
13
+ ConnectionError,
14
+ InvalidRequestError,
15
+ RequestAbortedError,
16
+ RequestTimeoutError,
17
+ UnexpectedClientError,
18
+ } from "../models/errors/httpclienterrors.js";
19
+ import { SDKError } from "../models/errors/sdkerror.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import {
22
+ GetProjectDomainsRequest,
23
+ GetProjectDomainsRequest$outboundSchema,
24
+ GetProjectDomainsResponseBody,
25
+ GetProjectDomainsResponseBody$inboundSchema,
26
+ } from "../models/operations/getprojectdomains.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Retrieve project domains by project by id or name
31
+ *
32
+ * @remarks
33
+ * Retrieve the domains associated with a given project by passing either the project `id` or `name` in the URL.
34
+ */
35
+ export async function projectsGetProjectDomains(
36
+ client: VercelCore,
37
+ request: GetProjectDomainsRequest,
38
+ options?: RequestOptions,
39
+ ): Promise<
40
+ Result<
41
+ GetProjectDomainsResponseBody,
42
+ | SDKError
43
+ | SDKValidationError
44
+ | UnexpectedClientError
45
+ | InvalidRequestError
46
+ | RequestAbortedError
47
+ | RequestTimeoutError
48
+ | ConnectionError
49
+ >
50
+ > {
51
+ const parsed = safeParse(
52
+ request,
53
+ (value) => GetProjectDomainsRequest$outboundSchema.parse(value),
54
+ "Input validation failed",
55
+ );
56
+ if (!parsed.ok) {
57
+ return parsed;
58
+ }
59
+ const payload = parsed.value;
60
+ const body = null;
61
+
62
+ const pathParams = {
63
+ idOrName: encodeSimple("idOrName", payload.idOrName, {
64
+ explode: false,
65
+ charEncoding: "percent",
66
+ }),
67
+ };
68
+
69
+ const path = pathToFunc("/v9/projects/{idOrName}/domains")(pathParams);
70
+
71
+ const query = encodeFormQuery({
72
+ "gitBranch": payload.gitBranch,
73
+ "limit": payload.limit,
74
+ "order": payload.order,
75
+ "production": payload.production,
76
+ "redirect": payload.redirect,
77
+ "redirects": payload.redirects,
78
+ "since": payload.since,
79
+ "slug": payload.slug,
80
+ "target": payload.target,
81
+ "teamId": payload.teamId,
82
+ "until": payload.until,
83
+ "verified": payload.verified,
84
+ });
85
+
86
+ const headers = new Headers({
87
+ Accept: "application/json",
88
+ });
89
+
90
+ const secConfig = await extractSecurity(client._options.bearerToken);
91
+ const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
92
+ const requestSecurity = resolveGlobalSecurity(securityInput);
93
+
94
+ const context = {
95
+ operationID: "getProjectDomains",
96
+ oAuth2Scopes: [],
97
+
98
+ resolvedSecurity: requestSecurity,
99
+
100
+ securitySource: client._options.bearerToken,
101
+ retryConfig: options?.retries
102
+ || client._options.retryConfig
103
+ || { strategy: "none" },
104
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
105
+ };
106
+
107
+ const requestRes = client._createRequest(context, {
108
+ security: requestSecurity,
109
+ method: "GET",
110
+ path: path,
111
+ headers: headers,
112
+ query: query,
113
+ body: body,
114
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
115
+ }, options);
116
+ if (!requestRes.ok) {
117
+ return requestRes;
118
+ }
119
+ const req = requestRes.value;
120
+
121
+ const doResult = await client._do(req, {
122
+ context,
123
+ errorCodes: ["400", "401", "403", "4XX", "5XX"],
124
+ retryConfig: context.retryConfig,
125
+ retryCodes: context.retryCodes,
126
+ });
127
+ if (!doResult.ok) {
128
+ return doResult;
129
+ }
130
+ const response = doResult.value;
131
+
132
+ const [result] = await M.match<
133
+ GetProjectDomainsResponseBody,
134
+ | SDKError
135
+ | SDKValidationError
136
+ | UnexpectedClientError
137
+ | InvalidRequestError
138
+ | RequestAbortedError
139
+ | RequestTimeoutError
140
+ | ConnectionError
141
+ >(
142
+ M.json(200, GetProjectDomainsResponseBody$inboundSchema),
143
+ M.fail([400, 401, 403, "4XX", "5XX"]),
144
+ )(response);
145
+ if (!result.ok) {
146
+ return result;
147
+ }
148
+
149
+ return result;
150
+ }
package/src/lib/config.ts CHANGED
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
57
57
  export const SDK_METADATA = {
58
58
  language: "typescript",
59
59
  openapiDocVersion: "0.0.1",
60
- sdkVersion: "14.0.0-canary.7",
60
+ sdkVersion: "14.0.0-canary.9",
61
61
  genVersion: "2.461.4",
62
62
  userAgent:
63
- "speakeasy-sdk/typescript 14.0.0-canary.7 2.461.4 0.0.1 @vercel/sdk",
63
+ "speakeasy-sdk/typescript 14.0.0-canary.9 2.461.4 0.0.1 @vercel/sdk",
64
64
  } as const;
@@ -36,14 +36,15 @@ export const BlockedDueToOverageType = {
36
36
  EdgeConfigWrite: "edgeConfigWrite",
37
37
  EdgeFunctionExecutionUnits: "edgeFunctionExecutionUnits",
38
38
  EdgeMiddlewareInvocations: "edgeMiddlewareInvocations",
39
- EdgeRequest: "edgeRequest",
40
39
  EdgeRequestAdditionalCpuDuration: "edgeRequestAdditionalCpuDuration",
40
+ EdgeRequest: "edgeRequest",
41
41
  FastDataTransfer: "fastDataTransfer",
42
42
  FastOriginTransfer: "fastOriginTransfer",
43
43
  FunctionDuration: "functionDuration",
44
44
  FunctionInvocation: "functionInvocation",
45
45
  LogDrainsVolume: "logDrainsVolume",
46
46
  MonitoringMetric: "monitoringMetric",
47
+ ObservabilityEvent: "observabilityEvent",
47
48
  PostgresComputeTime: "postgresComputeTime",
48
49
  PostgresDataStorage: "postgresDataStorage",
49
50
  PostgresDataTransfer: "postgresDataTransfer",
@@ -8,7 +8,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type Security = {
11
- bearerToken: string;
11
+ bearerToken?: string | undefined;
12
12
  };
13
13
 
14
14
  /** @internal */
@@ -17,12 +17,12 @@ export const Security$inboundSchema: z.ZodType<
17
17
  z.ZodTypeDef,
18
18
  unknown
19
19
  > = z.object({
20
- bearerToken: z.string(),
20
+ bearerToken: z.string().optional(),
21
21
  });
22
22
 
23
23
  /** @internal */
24
24
  export type Security$Outbound = {
25
- bearerToken: string;
25
+ bearerToken?: string | undefined;
26
26
  };
27
27
 
28
28
  /** @internal */
@@ -31,7 +31,7 @@ export const Security$outboundSchema: z.ZodType<
31
31
  z.ZodTypeDef,
32
32
  Security
33
33
  > = z.object({
34
- bearerToken: z.string(),
34
+ bearerToken: z.string().optional(),
35
35
  });
36
36
 
37
37
  /**
@@ -0,0 +1,373 @@
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 { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export const CreateEventEventType = {
13
+ ResourceUpdated: "resource.updated",
14
+ } as const;
15
+ export type CreateEventEventType = ClosedEnum<typeof CreateEventEventType>;
16
+
17
+ export type Event2 = {
18
+ type: CreateEventEventType;
19
+ /**
20
+ * Partner-provided product slug or id
21
+ */
22
+ productId: string;
23
+ /**
24
+ * Partner provided resource ID
25
+ */
26
+ resourceId: string;
27
+ };
28
+
29
+ export const EventType = {
30
+ InstallationUpdated: "installation.updated",
31
+ } as const;
32
+ export type EventType = ClosedEnum<typeof EventType>;
33
+
34
+ export type Event1 = {
35
+ type: EventType;
36
+ /**
37
+ * The installation-level billing plan ID
38
+ */
39
+ billingPlanId?: string | undefined;
40
+ };
41
+
42
+ export type CreateEventEvent = Event1 | Event2;
43
+
44
+ export type CreateEventRequestBody = {
45
+ event: Event1 | Event2;
46
+ };
47
+
48
+ export type CreateEventRequest = {
49
+ integrationConfigurationId: string;
50
+ requestBody?: CreateEventRequestBody | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const CreateEventEventType$inboundSchema: z.ZodNativeEnum<
55
+ typeof CreateEventEventType
56
+ > = z.nativeEnum(CreateEventEventType);
57
+
58
+ /** @internal */
59
+ export const CreateEventEventType$outboundSchema: z.ZodNativeEnum<
60
+ typeof CreateEventEventType
61
+ > = CreateEventEventType$inboundSchema;
62
+
63
+ /**
64
+ * @internal
65
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
+ */
67
+ export namespace CreateEventEventType$ {
68
+ /** @deprecated use `CreateEventEventType$inboundSchema` instead. */
69
+ export const inboundSchema = CreateEventEventType$inboundSchema;
70
+ /** @deprecated use `CreateEventEventType$outboundSchema` instead. */
71
+ export const outboundSchema = CreateEventEventType$outboundSchema;
72
+ }
73
+
74
+ /** @internal */
75
+ export const Event2$inboundSchema: z.ZodType<Event2, z.ZodTypeDef, unknown> = z
76
+ .object({
77
+ type: CreateEventEventType$inboundSchema,
78
+ productId: z.string(),
79
+ resourceId: z.string(),
80
+ });
81
+
82
+ /** @internal */
83
+ export type Event2$Outbound = {
84
+ type: string;
85
+ productId: string;
86
+ resourceId: string;
87
+ };
88
+
89
+ /** @internal */
90
+ export const Event2$outboundSchema: z.ZodType<
91
+ Event2$Outbound,
92
+ z.ZodTypeDef,
93
+ Event2
94
+ > = z.object({
95
+ type: CreateEventEventType$outboundSchema,
96
+ productId: z.string(),
97
+ resourceId: z.string(),
98
+ });
99
+
100
+ /**
101
+ * @internal
102
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
103
+ */
104
+ export namespace Event2$ {
105
+ /** @deprecated use `Event2$inboundSchema` instead. */
106
+ export const inboundSchema = Event2$inboundSchema;
107
+ /** @deprecated use `Event2$outboundSchema` instead. */
108
+ export const outboundSchema = Event2$outboundSchema;
109
+ /** @deprecated use `Event2$Outbound` instead. */
110
+ export type Outbound = Event2$Outbound;
111
+ }
112
+
113
+ export function event2ToJSON(event2: Event2): string {
114
+ return JSON.stringify(Event2$outboundSchema.parse(event2));
115
+ }
116
+
117
+ export function event2FromJSON(
118
+ jsonString: string,
119
+ ): SafeParseResult<Event2, SDKValidationError> {
120
+ return safeParse(
121
+ jsonString,
122
+ (x) => Event2$inboundSchema.parse(JSON.parse(x)),
123
+ `Failed to parse 'Event2' from JSON`,
124
+ );
125
+ }
126
+
127
+ /** @internal */
128
+ export const EventType$inboundSchema: z.ZodNativeEnum<typeof EventType> = z
129
+ .nativeEnum(EventType);
130
+
131
+ /** @internal */
132
+ export const EventType$outboundSchema: z.ZodNativeEnum<typeof EventType> =
133
+ EventType$inboundSchema;
134
+
135
+ /**
136
+ * @internal
137
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
138
+ */
139
+ export namespace EventType$ {
140
+ /** @deprecated use `EventType$inboundSchema` instead. */
141
+ export const inboundSchema = EventType$inboundSchema;
142
+ /** @deprecated use `EventType$outboundSchema` instead. */
143
+ export const outboundSchema = EventType$outboundSchema;
144
+ }
145
+
146
+ /** @internal */
147
+ export const Event1$inboundSchema: z.ZodType<Event1, z.ZodTypeDef, unknown> = z
148
+ .object({
149
+ type: EventType$inboundSchema,
150
+ billingPlanId: z.string().optional(),
151
+ });
152
+
153
+ /** @internal */
154
+ export type Event1$Outbound = {
155
+ type: string;
156
+ billingPlanId?: string | undefined;
157
+ };
158
+
159
+ /** @internal */
160
+ export const Event1$outboundSchema: z.ZodType<
161
+ Event1$Outbound,
162
+ z.ZodTypeDef,
163
+ Event1
164
+ > = z.object({
165
+ type: EventType$outboundSchema,
166
+ billingPlanId: z.string().optional(),
167
+ });
168
+
169
+ /**
170
+ * @internal
171
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
172
+ */
173
+ export namespace Event1$ {
174
+ /** @deprecated use `Event1$inboundSchema` instead. */
175
+ export const inboundSchema = Event1$inboundSchema;
176
+ /** @deprecated use `Event1$outboundSchema` instead. */
177
+ export const outboundSchema = Event1$outboundSchema;
178
+ /** @deprecated use `Event1$Outbound` instead. */
179
+ export type Outbound = Event1$Outbound;
180
+ }
181
+
182
+ export function event1ToJSON(event1: Event1): string {
183
+ return JSON.stringify(Event1$outboundSchema.parse(event1));
184
+ }
185
+
186
+ export function event1FromJSON(
187
+ jsonString: string,
188
+ ): SafeParseResult<Event1, SDKValidationError> {
189
+ return safeParse(
190
+ jsonString,
191
+ (x) => Event1$inboundSchema.parse(JSON.parse(x)),
192
+ `Failed to parse 'Event1' from JSON`,
193
+ );
194
+ }
195
+
196
+ /** @internal */
197
+ export const CreateEventEvent$inboundSchema: z.ZodType<
198
+ CreateEventEvent,
199
+ z.ZodTypeDef,
200
+ unknown
201
+ > = z.union([
202
+ z.lazy(() => Event1$inboundSchema),
203
+ z.lazy(() => Event2$inboundSchema),
204
+ ]);
205
+
206
+ /** @internal */
207
+ export type CreateEventEvent$Outbound = Event1$Outbound | Event2$Outbound;
208
+
209
+ /** @internal */
210
+ export const CreateEventEvent$outboundSchema: z.ZodType<
211
+ CreateEventEvent$Outbound,
212
+ z.ZodTypeDef,
213
+ CreateEventEvent
214
+ > = z.union([
215
+ z.lazy(() => Event1$outboundSchema),
216
+ z.lazy(() => Event2$outboundSchema),
217
+ ]);
218
+
219
+ /**
220
+ * @internal
221
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
222
+ */
223
+ export namespace CreateEventEvent$ {
224
+ /** @deprecated use `CreateEventEvent$inboundSchema` instead. */
225
+ export const inboundSchema = CreateEventEvent$inboundSchema;
226
+ /** @deprecated use `CreateEventEvent$outboundSchema` instead. */
227
+ export const outboundSchema = CreateEventEvent$outboundSchema;
228
+ /** @deprecated use `CreateEventEvent$Outbound` instead. */
229
+ export type Outbound = CreateEventEvent$Outbound;
230
+ }
231
+
232
+ export function createEventEventToJSON(
233
+ createEventEvent: CreateEventEvent,
234
+ ): string {
235
+ return JSON.stringify(
236
+ CreateEventEvent$outboundSchema.parse(createEventEvent),
237
+ );
238
+ }
239
+
240
+ export function createEventEventFromJSON(
241
+ jsonString: string,
242
+ ): SafeParseResult<CreateEventEvent, SDKValidationError> {
243
+ return safeParse(
244
+ jsonString,
245
+ (x) => CreateEventEvent$inboundSchema.parse(JSON.parse(x)),
246
+ `Failed to parse 'CreateEventEvent' from JSON`,
247
+ );
248
+ }
249
+
250
+ /** @internal */
251
+ export const CreateEventRequestBody$inboundSchema: z.ZodType<
252
+ CreateEventRequestBody,
253
+ z.ZodTypeDef,
254
+ unknown
255
+ > = z.object({
256
+ event: z.union([
257
+ z.lazy(() => Event1$inboundSchema),
258
+ z.lazy(() => Event2$inboundSchema),
259
+ ]),
260
+ });
261
+
262
+ /** @internal */
263
+ export type CreateEventRequestBody$Outbound = {
264
+ event: Event1$Outbound | Event2$Outbound;
265
+ };
266
+
267
+ /** @internal */
268
+ export const CreateEventRequestBody$outboundSchema: z.ZodType<
269
+ CreateEventRequestBody$Outbound,
270
+ z.ZodTypeDef,
271
+ CreateEventRequestBody
272
+ > = z.object({
273
+ event: z.union([
274
+ z.lazy(() => Event1$outboundSchema),
275
+ z.lazy(() => Event2$outboundSchema),
276
+ ]),
277
+ });
278
+
279
+ /**
280
+ * @internal
281
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
282
+ */
283
+ export namespace CreateEventRequestBody$ {
284
+ /** @deprecated use `CreateEventRequestBody$inboundSchema` instead. */
285
+ export const inboundSchema = CreateEventRequestBody$inboundSchema;
286
+ /** @deprecated use `CreateEventRequestBody$outboundSchema` instead. */
287
+ export const outboundSchema = CreateEventRequestBody$outboundSchema;
288
+ /** @deprecated use `CreateEventRequestBody$Outbound` instead. */
289
+ export type Outbound = CreateEventRequestBody$Outbound;
290
+ }
291
+
292
+ export function createEventRequestBodyToJSON(
293
+ createEventRequestBody: CreateEventRequestBody,
294
+ ): string {
295
+ return JSON.stringify(
296
+ CreateEventRequestBody$outboundSchema.parse(createEventRequestBody),
297
+ );
298
+ }
299
+
300
+ export function createEventRequestBodyFromJSON(
301
+ jsonString: string,
302
+ ): SafeParseResult<CreateEventRequestBody, SDKValidationError> {
303
+ return safeParse(
304
+ jsonString,
305
+ (x) => CreateEventRequestBody$inboundSchema.parse(JSON.parse(x)),
306
+ `Failed to parse 'CreateEventRequestBody' from JSON`,
307
+ );
308
+ }
309
+
310
+ /** @internal */
311
+ export const CreateEventRequest$inboundSchema: z.ZodType<
312
+ CreateEventRequest,
313
+ z.ZodTypeDef,
314
+ unknown
315
+ > = z.object({
316
+ integrationConfigurationId: z.string(),
317
+ RequestBody: z.lazy(() => CreateEventRequestBody$inboundSchema).optional(),
318
+ }).transform((v) => {
319
+ return remap$(v, {
320
+ "RequestBody": "requestBody",
321
+ });
322
+ });
323
+
324
+ /** @internal */
325
+ export type CreateEventRequest$Outbound = {
326
+ integrationConfigurationId: string;
327
+ RequestBody?: CreateEventRequestBody$Outbound | undefined;
328
+ };
329
+
330
+ /** @internal */
331
+ export const CreateEventRequest$outboundSchema: z.ZodType<
332
+ CreateEventRequest$Outbound,
333
+ z.ZodTypeDef,
334
+ CreateEventRequest
335
+ > = z.object({
336
+ integrationConfigurationId: z.string(),
337
+ requestBody: z.lazy(() => CreateEventRequestBody$outboundSchema).optional(),
338
+ }).transform((v) => {
339
+ return remap$(v, {
340
+ requestBody: "RequestBody",
341
+ });
342
+ });
343
+
344
+ /**
345
+ * @internal
346
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
347
+ */
348
+ export namespace CreateEventRequest$ {
349
+ /** @deprecated use `CreateEventRequest$inboundSchema` instead. */
350
+ export const inboundSchema = CreateEventRequest$inboundSchema;
351
+ /** @deprecated use `CreateEventRequest$outboundSchema` instead. */
352
+ export const outboundSchema = CreateEventRequest$outboundSchema;
353
+ /** @deprecated use `CreateEventRequest$Outbound` instead. */
354
+ export type Outbound = CreateEventRequest$Outbound;
355
+ }
356
+
357
+ export function createEventRequestToJSON(
358
+ createEventRequest: CreateEventRequest,
359
+ ): string {
360
+ return JSON.stringify(
361
+ CreateEventRequest$outboundSchema.parse(createEventRequest),
362
+ );
363
+ }
364
+
365
+ export function createEventRequestFromJSON(
366
+ jsonString: string,
367
+ ): SafeParseResult<CreateEventRequest, SDKValidationError> {
368
+ return safeParse(
369
+ jsonString,
370
+ (x) => CreateEventRequest$inboundSchema.parse(JSON.parse(x)),
371
+ `Failed to parse 'CreateEventRequest' from JSON`,
372
+ );
373
+ }
@@ -1242,6 +1242,7 @@ export type CreateProjectPermissions = {
1242
1242
  notificationCustomerBudget?: Array<ACLAction> | undefined;
1243
1243
  notificationStatementOfReasons?: Array<ACLAction> | undefined;
1244
1244
  oauth2Connection?: Array<ACLAction> | undefined;
1245
+ observabilityConfiguration?: Array<ACLAction> | undefined;
1245
1246
  openTelemetryEndpoint?: Array<ACLAction> | undefined;
1246
1247
  paymentMethod?: Array<ACLAction> | undefined;
1247
1248
  permissions?: Array<ACLAction> | undefined;
@@ -1316,6 +1317,7 @@ export type CreateProjectPermissions = {
1316
1317
  passwordProtection?: Array<ACLAction> | undefined;
1317
1318
  optionsAllowlist?: Array<ACLAction> | undefined;
1318
1319
  job?: Array<ACLAction> | undefined;
1320
+ observabilityData?: Array<ACLAction> | undefined;
1319
1321
  project?: Array<ACLAction> | undefined;
1320
1322
  projectFromV0?: Array<ACLAction> | undefined;
1321
1323
  projectAccessGroup?: Array<ACLAction> | undefined;
@@ -7027,6 +7029,7 @@ export const CreateProjectPermissions$inboundSchema: z.ZodType<
7027
7029
  notificationCustomerBudget: z.array(ACLAction$inboundSchema).optional(),
7028
7030
  notificationStatementOfReasons: z.array(ACLAction$inboundSchema).optional(),
7029
7031
  oauth2Connection: z.array(ACLAction$inboundSchema).optional(),
7032
+ observabilityConfiguration: z.array(ACLAction$inboundSchema).optional(),
7030
7033
  openTelemetryEndpoint: z.array(ACLAction$inboundSchema).optional(),
7031
7034
  paymentMethod: z.array(ACLAction$inboundSchema).optional(),
7032
7035
  permissions: z.array(ACLAction$inboundSchema).optional(),
@@ -7102,6 +7105,7 @@ export const CreateProjectPermissions$inboundSchema: z.ZodType<
7102
7105
  passwordProtection: z.array(ACLAction$inboundSchema).optional(),
7103
7106
  optionsAllowlist: z.array(ACLAction$inboundSchema).optional(),
7104
7107
  job: z.array(ACLAction$inboundSchema).optional(),
7108
+ observabilityData: z.array(ACLAction$inboundSchema).optional(),
7105
7109
  project: z.array(ACLAction$inboundSchema).optional(),
7106
7110
  projectFromV0: z.array(ACLAction$inboundSchema).optional(),
7107
7111
  projectAccessGroup: z.array(ACLAction$inboundSchema).optional(),
@@ -7219,6 +7223,7 @@ export type CreateProjectPermissions$Outbound = {
7219
7223
  notificationCustomerBudget?: Array<string> | undefined;
7220
7224
  notificationStatementOfReasons?: Array<string> | undefined;
7221
7225
  oauth2Connection?: Array<string> | undefined;
7226
+ observabilityConfiguration?: Array<string> | undefined;
7222
7227
  openTelemetryEndpoint?: Array<string> | undefined;
7223
7228
  paymentMethod?: Array<string> | undefined;
7224
7229
  permissions?: Array<string> | undefined;
@@ -7293,6 +7298,7 @@ export type CreateProjectPermissions$Outbound = {
7293
7298
  passwordProtection?: Array<string> | undefined;
7294
7299
  optionsAllowlist?: Array<string> | undefined;
7295
7300
  job?: Array<string> | undefined;
7301
+ observabilityData?: Array<string> | undefined;
7296
7302
  project?: Array<string> | undefined;
7297
7303
  projectFromV0?: Array<string> | undefined;
7298
7304
  projectAccessGroup?: Array<string> | undefined;
@@ -7411,6 +7417,7 @@ export const CreateProjectPermissions$outboundSchema: z.ZodType<
7411
7417
  notificationCustomerBudget: z.array(ACLAction$outboundSchema).optional(),
7412
7418
  notificationStatementOfReasons: z.array(ACLAction$outboundSchema).optional(),
7413
7419
  oauth2Connection: z.array(ACLAction$outboundSchema).optional(),
7420
+ observabilityConfiguration: z.array(ACLAction$outboundSchema).optional(),
7414
7421
  openTelemetryEndpoint: z.array(ACLAction$outboundSchema).optional(),
7415
7422
  paymentMethod: z.array(ACLAction$outboundSchema).optional(),
7416
7423
  permissions: z.array(ACLAction$outboundSchema).optional(),
@@ -7486,6 +7493,7 @@ export const CreateProjectPermissions$outboundSchema: z.ZodType<
7486
7493
  passwordProtection: z.array(ACLAction$outboundSchema).optional(),
7487
7494
  optionsAllowlist: z.array(ACLAction$outboundSchema).optional(),
7488
7495
  job: z.array(ACLAction$outboundSchema).optional(),
7496
+ observabilityData: z.array(ACLAction$outboundSchema).optional(),
7489
7497
  project: z.array(ACLAction$outboundSchema).optional(),
7490
7498
  projectFromV0: z.array(ACLAction$outboundSchema).optional(),
7491
7499
  projectAccessGroup: z.array(ACLAction$outboundSchema).optional(),