@vercel/sdk 1.8.6 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -9
- package/bin/mcp-server.js +669 -1264
- package/bin/mcp-server.js.map +17 -26
- package/docs/sdks/marketplace/README.md +78 -310
- package/esm/__tests__/marketplace.test.js +7 -51
- package/esm/__tests__/marketplace.test.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +2 -8
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/models/approverollingreleasestageop.d.ts +36 -0
- package/esm/models/approverollingreleasestageop.d.ts.map +1 -1
- package/esm/models/approverollingreleasestageop.js +25 -0
- package/esm/models/approverollingreleasestageop.js.map +1 -1
- package/esm/models/completerollingreleaseop.d.ts +36 -0
- package/esm/models/completerollingreleaseop.d.ts.map +1 -1
- package/esm/models/completerollingreleaseop.js +24 -0
- package/esm/models/completerollingreleaseop.js.map +1 -1
- package/esm/models/createprojectop.d.ts +2 -0
- package/esm/models/createprojectop.d.ts.map +1 -1
- package/esm/models/createprojectop.js +2 -0
- package/esm/models/createprojectop.js.map +1 -1
- package/esm/models/getedgeconfigbackupop.d.ts +15 -15
- package/esm/models/getedgeconfigbackupop.d.ts.map +1 -1
- package/esm/models/getedgeconfigbackupop.js +15 -15
- package/esm/models/getedgeconfigbackupop.js.map +1 -1
- package/esm/models/getprojectsop.d.ts +2 -0
- package/esm/models/getprojectsop.d.ts.map +1 -1
- package/esm/models/getprojectsop.js +2 -0
- package/esm/models/getprojectsop.js.map +1 -1
- package/esm/models/getrollingreleaseop.d.ts +36 -0
- package/esm/models/getrollingreleaseop.d.ts.map +1 -1
- package/esm/models/getrollingreleaseop.js +24 -0
- package/esm/models/getrollingreleaseop.js.map +1 -1
- package/esm/models/getv9projectsidornamecustomenvironmentsop.d.ts +3 -3
- package/esm/models/getv9projectsidornamecustomenvironmentsop.js +1 -1
- package/esm/models/getv9projectsidornamecustomenvironmentsop.js.map +1 -1
- package/esm/models/importresourceop.d.ts +15 -15
- package/esm/models/importresourceop.d.ts.map +1 -1
- package/esm/models/importresourceop.js +15 -17
- package/esm/models/importresourceop.js.map +1 -1
- package/esm/models/updateprojectdatacacheop.d.ts +2 -0
- package/esm/models/updateprojectdatacacheop.d.ts.map +1 -1
- package/esm/models/updateprojectdatacacheop.js +2 -0
- package/esm/models/updateprojectdatacacheop.js.map +1 -1
- package/esm/models/updateprojectop.d.ts +2 -0
- package/esm/models/updateprojectop.d.ts.map +1 -1
- package/esm/models/updateprojectop.js +2 -0
- package/esm/models/updateprojectop.js.map +1 -1
- package/esm/models/updateresourcesecretsop.d.ts +15 -15
- package/esm/models/updateresourcesecretsop.d.ts.map +1 -1
- package/esm/models/updateresourcesecretsop.js +17 -15
- package/esm/models/updateresourcesecretsop.js.map +1 -1
- package/esm/sdk/marketplace.d.ts +7 -31
- package/esm/sdk/marketplace.d.ts.map +1 -1
- package/esm/sdk/marketplace.js +9 -39
- package/esm/sdk/marketplace.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/marketplace.test.ts +13 -57
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +2 -8
- package/src/models/approverollingreleasestageop.ts +44 -0
- package/src/models/completerollingreleaseop.ts +45 -0
- package/src/models/createprojectop.ts +4 -0
- package/src/models/getedgeconfigbackupop.ts +24 -41
- package/src/models/getprojectsop.ts +4 -0
- package/src/models/getrollingreleaseop.ts +40 -0
- package/src/models/getv9projectsidornamecustomenvironmentsop.ts +1 -1
- package/src/models/importresourceop.ts +35 -27
- package/src/models/updateprojectdatacacheop.ts +4 -0
- package/src/models/updateprojectop.ts +4 -0
- package/src/models/updateresourcesecretsop.ts +33 -49
- package/src/sdk/marketplace.ts +17 -80
- package/vercel-spec.json +464 -880
- package/esm/funcs/marketplaceDeleteResource.d.ts +0 -20
- package/esm/funcs/marketplaceDeleteResource.d.ts.map +0 -1
- package/esm/funcs/marketplaceDeleteResource.js +0 -91
- package/esm/funcs/marketplaceDeleteResource.js.map +0 -1
- package/esm/funcs/marketplaceGetResource.d.ts +0 -20
- package/esm/funcs/marketplaceGetResource.d.ts.map +0 -1
- package/esm/funcs/marketplaceGetResource.js +0 -90
- package/esm/funcs/marketplaceGetResource.js.map +0 -1
- package/esm/funcs/marketplaceGetResources.d.ts +0 -20
- package/esm/funcs/marketplaceGetResources.d.ts.map +0 -1
- package/esm/funcs/marketplaceGetResources.js +0 -86
- package/esm/funcs/marketplaceGetResources.js.map +0 -1
- package/esm/mcp-server/tools/marketplaceDeleteResource.d.ts +0 -7
- package/esm/mcp-server/tools/marketplaceDeleteResource.d.ts.map +0 -1
- package/esm/mcp-server/tools/marketplaceDeleteResource.js +0 -27
- package/esm/mcp-server/tools/marketplaceDeleteResource.js.map +0 -1
- package/esm/mcp-server/tools/marketplaceGetResource.d.ts +0 -7
- package/esm/mcp-server/tools/marketplaceGetResource.d.ts.map +0 -1
- package/esm/mcp-server/tools/marketplaceGetResource.js +0 -28
- package/esm/mcp-server/tools/marketplaceGetResource.js.map +0 -1
- package/esm/mcp-server/tools/marketplaceGetResources.d.ts +0 -7
- package/esm/mcp-server/tools/marketplaceGetResources.d.ts.map +0 -1
- package/esm/mcp-server/tools/marketplaceGetResources.js +0 -28
- package/esm/mcp-server/tools/marketplaceGetResources.js.map +0 -1
- package/esm/models/deleteresourceop.d.ts +0 -31
- package/esm/models/deleteresourceop.d.ts.map +0 -1
- package/esm/models/deleteresourceop.js +0 -33
- package/esm/models/deleteresourceop.js.map +0 -1
- package/esm/models/getresourceop.d.ts +0 -293
- package/esm/models/getresourceop.d.ts.map +0 -1
- package/esm/models/getresourceop.js +0 -250
- package/esm/models/getresourceop.js.map +0 -1
- package/esm/models/getresourcesop.d.ts +0 -310
- package/esm/models/getresourcesop.d.ts.map +0 -1
- package/esm/models/getresourcesop.js +0 -278
- package/esm/models/getresourcesop.js.map +0 -1
- package/src/funcs/marketplaceDeleteResource.ts +0 -205
- package/src/funcs/marketplaceGetResource.ts +0 -206
- package/src/funcs/marketplaceGetResources.ts +0 -202
- package/src/mcp-server/tools/marketplaceDeleteResource.ts +0 -35
- package/src/mcp-server/tools/marketplaceGetResource.ts +0 -37
- package/src/mcp-server/tools/marketplaceGetResources.ts +0 -37
- package/src/models/deleteresourceop.ts +0 -70
- package/src/models/getresourceop.ts +0 -545
- package/src/models/getresourcesop.ts +0 -604
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { marketplaceGetResources } from "../../funcs/marketplaceGetResources.js";
|
|
6
|
-
import { GetResourcesRequest$inboundSchema } from "../../models/getresourcesop.js";
|
|
7
|
-
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
-
|
|
9
|
-
const args = {
|
|
10
|
-
request: GetResourcesRequest$inboundSchema,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const tool$marketplaceGetResources: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "marketplace-get-resources",
|
|
15
|
-
description: `Get Resources
|
|
16
|
-
|
|
17
|
-
Get all resources for a given integration configuration ID.`,
|
|
18
|
-
args,
|
|
19
|
-
tool: async (client, args, ctx) => {
|
|
20
|
-
const [result, apiCall] = await marketplaceGetResources(
|
|
21
|
-
client,
|
|
22
|
-
args.request,
|
|
23
|
-
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
-
).$inspect();
|
|
25
|
-
|
|
26
|
-
if (!result.ok) {
|
|
27
|
-
return {
|
|
28
|
-
content: [{ type: "text", text: result.error.message }],
|
|
29
|
-
isError: true,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const value = result.value;
|
|
34
|
-
|
|
35
|
-
return formatResult(value, apiCall);
|
|
36
|
-
},
|
|
37
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
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 "./sdkvalidationerror.js";
|
|
9
|
-
|
|
10
|
-
export type DeleteResourceRequest = {
|
|
11
|
-
integrationConfigurationId: string;
|
|
12
|
-
resourceId: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const DeleteResourceRequest$inboundSchema: z.ZodType<
|
|
17
|
-
DeleteResourceRequest,
|
|
18
|
-
z.ZodTypeDef,
|
|
19
|
-
unknown
|
|
20
|
-
> = z.object({
|
|
21
|
-
integrationConfigurationId: z.string(),
|
|
22
|
-
resourceId: z.string(),
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
/** @internal */
|
|
26
|
-
export type DeleteResourceRequest$Outbound = {
|
|
27
|
-
integrationConfigurationId: string;
|
|
28
|
-
resourceId: string;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const DeleteResourceRequest$outboundSchema: z.ZodType<
|
|
33
|
-
DeleteResourceRequest$Outbound,
|
|
34
|
-
z.ZodTypeDef,
|
|
35
|
-
DeleteResourceRequest
|
|
36
|
-
> = z.object({
|
|
37
|
-
integrationConfigurationId: z.string(),
|
|
38
|
-
resourceId: z.string(),
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @internal
|
|
43
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
-
*/
|
|
45
|
-
export namespace DeleteResourceRequest$ {
|
|
46
|
-
/** @deprecated use `DeleteResourceRequest$inboundSchema` instead. */
|
|
47
|
-
export const inboundSchema = DeleteResourceRequest$inboundSchema;
|
|
48
|
-
/** @deprecated use `DeleteResourceRequest$outboundSchema` instead. */
|
|
49
|
-
export const outboundSchema = DeleteResourceRequest$outboundSchema;
|
|
50
|
-
/** @deprecated use `DeleteResourceRequest$Outbound` instead. */
|
|
51
|
-
export type Outbound = DeleteResourceRequest$Outbound;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function deleteResourceRequestToJSON(
|
|
55
|
-
deleteResourceRequest: DeleteResourceRequest,
|
|
56
|
-
): string {
|
|
57
|
-
return JSON.stringify(
|
|
58
|
-
DeleteResourceRequest$outboundSchema.parse(deleteResourceRequest),
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function deleteResourceRequestFromJSON(
|
|
63
|
-
jsonString: string,
|
|
64
|
-
): SafeParseResult<DeleteResourceRequest, SDKValidationError> {
|
|
65
|
-
return safeParse(
|
|
66
|
-
jsonString,
|
|
67
|
-
(x) => DeleteResourceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
-
`Failed to parse 'DeleteResourceRequest' from JSON`,
|
|
69
|
-
);
|
|
70
|
-
}
|
|
@@ -1,545 +0,0 @@
|
|
|
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 { ClosedEnum } from "../types/enums.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
-
import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
10
|
-
|
|
11
|
-
export type GetResourceRequest = {
|
|
12
|
-
/**
|
|
13
|
-
* The ID of the integration configuration (installation) the resource belongs to
|
|
14
|
-
*/
|
|
15
|
-
integrationConfigurationId: string;
|
|
16
|
-
/**
|
|
17
|
-
* The ID provided by the 3rd party provider for the given resource
|
|
18
|
-
*/
|
|
19
|
-
resourceId: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* The current status of the resource
|
|
24
|
-
*/
|
|
25
|
-
export const GetResourceStatus = {
|
|
26
|
-
Ready: "ready",
|
|
27
|
-
Pending: "pending",
|
|
28
|
-
Suspended: "suspended",
|
|
29
|
-
Resumed: "resumed",
|
|
30
|
-
Uninstalled: "uninstalled",
|
|
31
|
-
Error: "error",
|
|
32
|
-
} as const;
|
|
33
|
-
/**
|
|
34
|
-
* The current status of the resource
|
|
35
|
-
*/
|
|
36
|
-
export type GetResourceStatus = ClosedEnum<typeof GetResourceStatus>;
|
|
37
|
-
|
|
38
|
-
export type Experimentation = {
|
|
39
|
-
edgeConfigSyncingEnabled?: boolean | undefined;
|
|
40
|
-
edgeConfigId?: string | undefined;
|
|
41
|
-
edgeConfigTokenId?: string | undefined;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Any settings provided for the resource to support its product's protocols
|
|
46
|
-
*/
|
|
47
|
-
export type ProtocolSettings = {
|
|
48
|
-
experimentation?: Experimentation | undefined;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const GetResourceLevel = {
|
|
52
|
-
Error: "error",
|
|
53
|
-
Info: "info",
|
|
54
|
-
Warn: "warn",
|
|
55
|
-
} as const;
|
|
56
|
-
export type GetResourceLevel = ClosedEnum<typeof GetResourceLevel>;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The notification, if set, displayed to the user when viewing the resource in Vercel
|
|
60
|
-
*/
|
|
61
|
-
export type GetResourceNotification = {
|
|
62
|
-
level: GetResourceLevel;
|
|
63
|
-
title: string;
|
|
64
|
-
message?: string | undefined;
|
|
65
|
-
href?: string | undefined;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export type Metadata =
|
|
69
|
-
| string
|
|
70
|
-
| number
|
|
71
|
-
| boolean
|
|
72
|
-
| Array<string>
|
|
73
|
-
| Array<number>;
|
|
74
|
-
|
|
75
|
-
export type GetResourceResponseBody = {
|
|
76
|
-
/**
|
|
77
|
-
* The ID provided by the 3rd party provider for the given resource
|
|
78
|
-
*/
|
|
79
|
-
id: string;
|
|
80
|
-
/**
|
|
81
|
-
* The ID assigned by Vercel for the given resource
|
|
82
|
-
*/
|
|
83
|
-
internalId: string;
|
|
84
|
-
/**
|
|
85
|
-
* The name of the resource as it is recorded in Vercel
|
|
86
|
-
*/
|
|
87
|
-
name: string;
|
|
88
|
-
/**
|
|
89
|
-
* The current status of the resource
|
|
90
|
-
*/
|
|
91
|
-
status?: GetResourceStatus | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* The ID of the product the resource is derived from
|
|
94
|
-
*/
|
|
95
|
-
productId: string;
|
|
96
|
-
/**
|
|
97
|
-
* Any settings provided for the resource to support its product's protocols
|
|
98
|
-
*/
|
|
99
|
-
protocolSettings?: ProtocolSettings | undefined;
|
|
100
|
-
/**
|
|
101
|
-
* The notification, if set, displayed to the user when viewing the resource in Vercel
|
|
102
|
-
*/
|
|
103
|
-
notification?: GetResourceNotification | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* The ID of the billing plan the resource is subscribed to, if applicable
|
|
106
|
-
*/
|
|
107
|
-
billingPlanId?: string | undefined;
|
|
108
|
-
/**
|
|
109
|
-
* The configured metadata for the resource as defined by its product's Metadata Schema
|
|
110
|
-
*/
|
|
111
|
-
metadata?: {
|
|
112
|
-
[k: string]: string | number | boolean | Array<string> | Array<number>;
|
|
113
|
-
} | undefined;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
/** @internal */
|
|
117
|
-
export const GetResourceRequest$inboundSchema: z.ZodType<
|
|
118
|
-
GetResourceRequest,
|
|
119
|
-
z.ZodTypeDef,
|
|
120
|
-
unknown
|
|
121
|
-
> = z.object({
|
|
122
|
-
integrationConfigurationId: z.string(),
|
|
123
|
-
resourceId: z.string(),
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
/** @internal */
|
|
127
|
-
export type GetResourceRequest$Outbound = {
|
|
128
|
-
integrationConfigurationId: string;
|
|
129
|
-
resourceId: string;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
/** @internal */
|
|
133
|
-
export const GetResourceRequest$outboundSchema: z.ZodType<
|
|
134
|
-
GetResourceRequest$Outbound,
|
|
135
|
-
z.ZodTypeDef,
|
|
136
|
-
GetResourceRequest
|
|
137
|
-
> = z.object({
|
|
138
|
-
integrationConfigurationId: z.string(),
|
|
139
|
-
resourceId: z.string(),
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @internal
|
|
144
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
145
|
-
*/
|
|
146
|
-
export namespace GetResourceRequest$ {
|
|
147
|
-
/** @deprecated use `GetResourceRequest$inboundSchema` instead. */
|
|
148
|
-
export const inboundSchema = GetResourceRequest$inboundSchema;
|
|
149
|
-
/** @deprecated use `GetResourceRequest$outboundSchema` instead. */
|
|
150
|
-
export const outboundSchema = GetResourceRequest$outboundSchema;
|
|
151
|
-
/** @deprecated use `GetResourceRequest$Outbound` instead. */
|
|
152
|
-
export type Outbound = GetResourceRequest$Outbound;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export function getResourceRequestToJSON(
|
|
156
|
-
getResourceRequest: GetResourceRequest,
|
|
157
|
-
): string {
|
|
158
|
-
return JSON.stringify(
|
|
159
|
-
GetResourceRequest$outboundSchema.parse(getResourceRequest),
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export function getResourceRequestFromJSON(
|
|
164
|
-
jsonString: string,
|
|
165
|
-
): SafeParseResult<GetResourceRequest, SDKValidationError> {
|
|
166
|
-
return safeParse(
|
|
167
|
-
jsonString,
|
|
168
|
-
(x) => GetResourceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
169
|
-
`Failed to parse 'GetResourceRequest' from JSON`,
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/** @internal */
|
|
174
|
-
export const GetResourceStatus$inboundSchema: z.ZodNativeEnum<
|
|
175
|
-
typeof GetResourceStatus
|
|
176
|
-
> = z.nativeEnum(GetResourceStatus);
|
|
177
|
-
|
|
178
|
-
/** @internal */
|
|
179
|
-
export const GetResourceStatus$outboundSchema: z.ZodNativeEnum<
|
|
180
|
-
typeof GetResourceStatus
|
|
181
|
-
> = GetResourceStatus$inboundSchema;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* @internal
|
|
185
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
186
|
-
*/
|
|
187
|
-
export namespace GetResourceStatus$ {
|
|
188
|
-
/** @deprecated use `GetResourceStatus$inboundSchema` instead. */
|
|
189
|
-
export const inboundSchema = GetResourceStatus$inboundSchema;
|
|
190
|
-
/** @deprecated use `GetResourceStatus$outboundSchema` instead. */
|
|
191
|
-
export const outboundSchema = GetResourceStatus$outboundSchema;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/** @internal */
|
|
195
|
-
export const Experimentation$inboundSchema: z.ZodType<
|
|
196
|
-
Experimentation,
|
|
197
|
-
z.ZodTypeDef,
|
|
198
|
-
unknown
|
|
199
|
-
> = z.object({
|
|
200
|
-
edgeConfigSyncingEnabled: z.boolean().optional(),
|
|
201
|
-
edgeConfigId: z.string().optional(),
|
|
202
|
-
edgeConfigTokenId: z.string().optional(),
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
/** @internal */
|
|
206
|
-
export type Experimentation$Outbound = {
|
|
207
|
-
edgeConfigSyncingEnabled?: boolean | undefined;
|
|
208
|
-
edgeConfigId?: string | undefined;
|
|
209
|
-
edgeConfigTokenId?: string | undefined;
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
/** @internal */
|
|
213
|
-
export const Experimentation$outboundSchema: z.ZodType<
|
|
214
|
-
Experimentation$Outbound,
|
|
215
|
-
z.ZodTypeDef,
|
|
216
|
-
Experimentation
|
|
217
|
-
> = z.object({
|
|
218
|
-
edgeConfigSyncingEnabled: z.boolean().optional(),
|
|
219
|
-
edgeConfigId: z.string().optional(),
|
|
220
|
-
edgeConfigTokenId: z.string().optional(),
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* @internal
|
|
225
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
226
|
-
*/
|
|
227
|
-
export namespace Experimentation$ {
|
|
228
|
-
/** @deprecated use `Experimentation$inboundSchema` instead. */
|
|
229
|
-
export const inboundSchema = Experimentation$inboundSchema;
|
|
230
|
-
/** @deprecated use `Experimentation$outboundSchema` instead. */
|
|
231
|
-
export const outboundSchema = Experimentation$outboundSchema;
|
|
232
|
-
/** @deprecated use `Experimentation$Outbound` instead. */
|
|
233
|
-
export type Outbound = Experimentation$Outbound;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export function experimentationToJSON(
|
|
237
|
-
experimentation: Experimentation,
|
|
238
|
-
): string {
|
|
239
|
-
return JSON.stringify(Experimentation$outboundSchema.parse(experimentation));
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
export function experimentationFromJSON(
|
|
243
|
-
jsonString: string,
|
|
244
|
-
): SafeParseResult<Experimentation, SDKValidationError> {
|
|
245
|
-
return safeParse(
|
|
246
|
-
jsonString,
|
|
247
|
-
(x) => Experimentation$inboundSchema.parse(JSON.parse(x)),
|
|
248
|
-
`Failed to parse 'Experimentation' from JSON`,
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/** @internal */
|
|
253
|
-
export const ProtocolSettings$inboundSchema: z.ZodType<
|
|
254
|
-
ProtocolSettings,
|
|
255
|
-
z.ZodTypeDef,
|
|
256
|
-
unknown
|
|
257
|
-
> = z.object({
|
|
258
|
-
experimentation: z.lazy(() => Experimentation$inboundSchema).optional(),
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
/** @internal */
|
|
262
|
-
export type ProtocolSettings$Outbound = {
|
|
263
|
-
experimentation?: Experimentation$Outbound | undefined;
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
/** @internal */
|
|
267
|
-
export const ProtocolSettings$outboundSchema: z.ZodType<
|
|
268
|
-
ProtocolSettings$Outbound,
|
|
269
|
-
z.ZodTypeDef,
|
|
270
|
-
ProtocolSettings
|
|
271
|
-
> = z.object({
|
|
272
|
-
experimentation: z.lazy(() => Experimentation$outboundSchema).optional(),
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* @internal
|
|
277
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
278
|
-
*/
|
|
279
|
-
export namespace ProtocolSettings$ {
|
|
280
|
-
/** @deprecated use `ProtocolSettings$inboundSchema` instead. */
|
|
281
|
-
export const inboundSchema = ProtocolSettings$inboundSchema;
|
|
282
|
-
/** @deprecated use `ProtocolSettings$outboundSchema` instead. */
|
|
283
|
-
export const outboundSchema = ProtocolSettings$outboundSchema;
|
|
284
|
-
/** @deprecated use `ProtocolSettings$Outbound` instead. */
|
|
285
|
-
export type Outbound = ProtocolSettings$Outbound;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export function protocolSettingsToJSON(
|
|
289
|
-
protocolSettings: ProtocolSettings,
|
|
290
|
-
): string {
|
|
291
|
-
return JSON.stringify(
|
|
292
|
-
ProtocolSettings$outboundSchema.parse(protocolSettings),
|
|
293
|
-
);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
export function protocolSettingsFromJSON(
|
|
297
|
-
jsonString: string,
|
|
298
|
-
): SafeParseResult<ProtocolSettings, SDKValidationError> {
|
|
299
|
-
return safeParse(
|
|
300
|
-
jsonString,
|
|
301
|
-
(x) => ProtocolSettings$inboundSchema.parse(JSON.parse(x)),
|
|
302
|
-
`Failed to parse 'ProtocolSettings' from JSON`,
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/** @internal */
|
|
307
|
-
export const GetResourceLevel$inboundSchema: z.ZodNativeEnum<
|
|
308
|
-
typeof GetResourceLevel
|
|
309
|
-
> = z.nativeEnum(GetResourceLevel);
|
|
310
|
-
|
|
311
|
-
/** @internal */
|
|
312
|
-
export const GetResourceLevel$outboundSchema: z.ZodNativeEnum<
|
|
313
|
-
typeof GetResourceLevel
|
|
314
|
-
> = GetResourceLevel$inboundSchema;
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* @internal
|
|
318
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
319
|
-
*/
|
|
320
|
-
export namespace GetResourceLevel$ {
|
|
321
|
-
/** @deprecated use `GetResourceLevel$inboundSchema` instead. */
|
|
322
|
-
export const inboundSchema = GetResourceLevel$inboundSchema;
|
|
323
|
-
/** @deprecated use `GetResourceLevel$outboundSchema` instead. */
|
|
324
|
-
export const outboundSchema = GetResourceLevel$outboundSchema;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/** @internal */
|
|
328
|
-
export const GetResourceNotification$inboundSchema: z.ZodType<
|
|
329
|
-
GetResourceNotification,
|
|
330
|
-
z.ZodTypeDef,
|
|
331
|
-
unknown
|
|
332
|
-
> = z.object({
|
|
333
|
-
level: GetResourceLevel$inboundSchema,
|
|
334
|
-
title: z.string(),
|
|
335
|
-
message: z.string().optional(),
|
|
336
|
-
href: z.string().optional(),
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
/** @internal */
|
|
340
|
-
export type GetResourceNotification$Outbound = {
|
|
341
|
-
level: string;
|
|
342
|
-
title: string;
|
|
343
|
-
message?: string | undefined;
|
|
344
|
-
href?: string | undefined;
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
/** @internal */
|
|
348
|
-
export const GetResourceNotification$outboundSchema: z.ZodType<
|
|
349
|
-
GetResourceNotification$Outbound,
|
|
350
|
-
z.ZodTypeDef,
|
|
351
|
-
GetResourceNotification
|
|
352
|
-
> = z.object({
|
|
353
|
-
level: GetResourceLevel$outboundSchema,
|
|
354
|
-
title: z.string(),
|
|
355
|
-
message: z.string().optional(),
|
|
356
|
-
href: z.string().optional(),
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* @internal
|
|
361
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
362
|
-
*/
|
|
363
|
-
export namespace GetResourceNotification$ {
|
|
364
|
-
/** @deprecated use `GetResourceNotification$inboundSchema` instead. */
|
|
365
|
-
export const inboundSchema = GetResourceNotification$inboundSchema;
|
|
366
|
-
/** @deprecated use `GetResourceNotification$outboundSchema` instead. */
|
|
367
|
-
export const outboundSchema = GetResourceNotification$outboundSchema;
|
|
368
|
-
/** @deprecated use `GetResourceNotification$Outbound` instead. */
|
|
369
|
-
export type Outbound = GetResourceNotification$Outbound;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
export function getResourceNotificationToJSON(
|
|
373
|
-
getResourceNotification: GetResourceNotification,
|
|
374
|
-
): string {
|
|
375
|
-
return JSON.stringify(
|
|
376
|
-
GetResourceNotification$outboundSchema.parse(getResourceNotification),
|
|
377
|
-
);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
export function getResourceNotificationFromJSON(
|
|
381
|
-
jsonString: string,
|
|
382
|
-
): SafeParseResult<GetResourceNotification, SDKValidationError> {
|
|
383
|
-
return safeParse(
|
|
384
|
-
jsonString,
|
|
385
|
-
(x) => GetResourceNotification$inboundSchema.parse(JSON.parse(x)),
|
|
386
|
-
`Failed to parse 'GetResourceNotification' from JSON`,
|
|
387
|
-
);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/** @internal */
|
|
391
|
-
export const Metadata$inboundSchema: z.ZodType<
|
|
392
|
-
Metadata,
|
|
393
|
-
z.ZodTypeDef,
|
|
394
|
-
unknown
|
|
395
|
-
> = z.union([
|
|
396
|
-
z.string(),
|
|
397
|
-
z.number(),
|
|
398
|
-
z.boolean(),
|
|
399
|
-
z.array(z.string()),
|
|
400
|
-
z.array(z.number()),
|
|
401
|
-
]);
|
|
402
|
-
|
|
403
|
-
/** @internal */
|
|
404
|
-
export type Metadata$Outbound =
|
|
405
|
-
| string
|
|
406
|
-
| number
|
|
407
|
-
| boolean
|
|
408
|
-
| Array<string>
|
|
409
|
-
| Array<number>;
|
|
410
|
-
|
|
411
|
-
/** @internal */
|
|
412
|
-
export const Metadata$outboundSchema: z.ZodType<
|
|
413
|
-
Metadata$Outbound,
|
|
414
|
-
z.ZodTypeDef,
|
|
415
|
-
Metadata
|
|
416
|
-
> = z.union([
|
|
417
|
-
z.string(),
|
|
418
|
-
z.number(),
|
|
419
|
-
z.boolean(),
|
|
420
|
-
z.array(z.string()),
|
|
421
|
-
z.array(z.number()),
|
|
422
|
-
]);
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* @internal
|
|
426
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
427
|
-
*/
|
|
428
|
-
export namespace Metadata$ {
|
|
429
|
-
/** @deprecated use `Metadata$inboundSchema` instead. */
|
|
430
|
-
export const inboundSchema = Metadata$inboundSchema;
|
|
431
|
-
/** @deprecated use `Metadata$outboundSchema` instead. */
|
|
432
|
-
export const outboundSchema = Metadata$outboundSchema;
|
|
433
|
-
/** @deprecated use `Metadata$Outbound` instead. */
|
|
434
|
-
export type Outbound = Metadata$Outbound;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
export function metadataToJSON(metadata: Metadata): string {
|
|
438
|
-
return JSON.stringify(Metadata$outboundSchema.parse(metadata));
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
export function metadataFromJSON(
|
|
442
|
-
jsonString: string,
|
|
443
|
-
): SafeParseResult<Metadata, SDKValidationError> {
|
|
444
|
-
return safeParse(
|
|
445
|
-
jsonString,
|
|
446
|
-
(x) => Metadata$inboundSchema.parse(JSON.parse(x)),
|
|
447
|
-
`Failed to parse 'Metadata' from JSON`,
|
|
448
|
-
);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/** @internal */
|
|
452
|
-
export const GetResourceResponseBody$inboundSchema: z.ZodType<
|
|
453
|
-
GetResourceResponseBody,
|
|
454
|
-
z.ZodTypeDef,
|
|
455
|
-
unknown
|
|
456
|
-
> = z.object({
|
|
457
|
-
id: z.string(),
|
|
458
|
-
internalId: z.string(),
|
|
459
|
-
name: z.string(),
|
|
460
|
-
status: GetResourceStatus$inboundSchema.optional(),
|
|
461
|
-
productId: z.string(),
|
|
462
|
-
protocolSettings: z.lazy(() => ProtocolSettings$inboundSchema).optional(),
|
|
463
|
-
notification: z.lazy(() => GetResourceNotification$inboundSchema).optional(),
|
|
464
|
-
billingPlanId: z.string().optional(),
|
|
465
|
-
metadata: z.record(
|
|
466
|
-
z.union([
|
|
467
|
-
z.string(),
|
|
468
|
-
z.number(),
|
|
469
|
-
z.boolean(),
|
|
470
|
-
z.array(z.string()),
|
|
471
|
-
z.array(z.number()),
|
|
472
|
-
]),
|
|
473
|
-
).optional(),
|
|
474
|
-
});
|
|
475
|
-
|
|
476
|
-
/** @internal */
|
|
477
|
-
export type GetResourceResponseBody$Outbound = {
|
|
478
|
-
id: string;
|
|
479
|
-
internalId: string;
|
|
480
|
-
name: string;
|
|
481
|
-
status?: string | undefined;
|
|
482
|
-
productId: string;
|
|
483
|
-
protocolSettings?: ProtocolSettings$Outbound | undefined;
|
|
484
|
-
notification?: GetResourceNotification$Outbound | undefined;
|
|
485
|
-
billingPlanId?: string | undefined;
|
|
486
|
-
metadata?: {
|
|
487
|
-
[k: string]: string | number | boolean | Array<string> | Array<number>;
|
|
488
|
-
} | undefined;
|
|
489
|
-
};
|
|
490
|
-
|
|
491
|
-
/** @internal */
|
|
492
|
-
export const GetResourceResponseBody$outboundSchema: z.ZodType<
|
|
493
|
-
GetResourceResponseBody$Outbound,
|
|
494
|
-
z.ZodTypeDef,
|
|
495
|
-
GetResourceResponseBody
|
|
496
|
-
> = z.object({
|
|
497
|
-
id: z.string(),
|
|
498
|
-
internalId: z.string(),
|
|
499
|
-
name: z.string(),
|
|
500
|
-
status: GetResourceStatus$outboundSchema.optional(),
|
|
501
|
-
productId: z.string(),
|
|
502
|
-
protocolSettings: z.lazy(() => ProtocolSettings$outboundSchema).optional(),
|
|
503
|
-
notification: z.lazy(() => GetResourceNotification$outboundSchema).optional(),
|
|
504
|
-
billingPlanId: z.string().optional(),
|
|
505
|
-
metadata: z.record(
|
|
506
|
-
z.union([
|
|
507
|
-
z.string(),
|
|
508
|
-
z.number(),
|
|
509
|
-
z.boolean(),
|
|
510
|
-
z.array(z.string()),
|
|
511
|
-
z.array(z.number()),
|
|
512
|
-
]),
|
|
513
|
-
).optional(),
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* @internal
|
|
518
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
519
|
-
*/
|
|
520
|
-
export namespace GetResourceResponseBody$ {
|
|
521
|
-
/** @deprecated use `GetResourceResponseBody$inboundSchema` instead. */
|
|
522
|
-
export const inboundSchema = GetResourceResponseBody$inboundSchema;
|
|
523
|
-
/** @deprecated use `GetResourceResponseBody$outboundSchema` instead. */
|
|
524
|
-
export const outboundSchema = GetResourceResponseBody$outboundSchema;
|
|
525
|
-
/** @deprecated use `GetResourceResponseBody$Outbound` instead. */
|
|
526
|
-
export type Outbound = GetResourceResponseBody$Outbound;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
export function getResourceResponseBodyToJSON(
|
|
530
|
-
getResourceResponseBody: GetResourceResponseBody,
|
|
531
|
-
): string {
|
|
532
|
-
return JSON.stringify(
|
|
533
|
-
GetResourceResponseBody$outboundSchema.parse(getResourceResponseBody),
|
|
534
|
-
);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
export function getResourceResponseBodyFromJSON(
|
|
538
|
-
jsonString: string,
|
|
539
|
-
): SafeParseResult<GetResourceResponseBody, SDKValidationError> {
|
|
540
|
-
return safeParse(
|
|
541
|
-
jsonString,
|
|
542
|
-
(x) => GetResourceResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
543
|
-
`Failed to parse 'GetResourceResponseBody' from JSON`,
|
|
544
|
-
);
|
|
545
|
-
}
|