@vercel/sdk 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/README.md +0 -2
  2. package/bin/mcp-server.js +718 -728
  3. package/bin/mcp-server.js.map +23 -26
  4. package/docs/sdks/marketplace/README.md +0 -81
  5. package/docs/sdks/security/README.md +8 -2
  6. package/esm/__tests__/marketplace.test.js +3 -13
  7. package/esm/__tests__/marketplace.test.js.map +1 -1
  8. package/esm/__tests__/projects.test.js +13 -15
  9. package/esm/__tests__/projects.test.js.map +1 -1
  10. package/esm/funcs/deploymentsUploadFile.js +2 -1
  11. package/esm/funcs/deploymentsUploadFile.js.map +1 -1
  12. package/esm/lib/config.d.ts +3 -3
  13. package/esm/lib/config.js +3 -3
  14. package/esm/mcp-server/mcp-server.js +1 -1
  15. package/esm/mcp-server/prompts.d.ts.map +1 -1
  16. package/esm/mcp-server/prompts.js +5 -1
  17. package/esm/mcp-server/prompts.js.map +1 -1
  18. package/esm/mcp-server/resources.d.ts.map +1 -1
  19. package/esm/mcp-server/resources.js +10 -2
  20. package/esm/mcp-server/resources.js.map +1 -1
  21. package/esm/mcp-server/server.d.ts.map +1 -1
  22. package/esm/mcp-server/server.js +2 -5
  23. package/esm/mcp-server/server.js.map +1 -1
  24. package/esm/mcp-server/tools.d.ts.map +1 -1
  25. package/esm/mcp-server/tools.js +4 -3
  26. package/esm/mcp-server/tools.js.map +1 -1
  27. package/esm/models/authuser.d.ts +17 -66
  28. package/esm/models/authuser.d.ts.map +1 -1
  29. package/esm/models/authuser.js +10 -74
  30. package/esm/models/authuser.js.map +1 -1
  31. package/esm/models/createprojectop.d.ts +1 -1
  32. package/esm/models/createprojectop.d.ts.map +1 -1
  33. package/esm/models/createprojectop.js +4 -4
  34. package/esm/models/createprojectop.js.map +1 -1
  35. package/esm/models/getconfigurationop.d.ts +306 -0
  36. package/esm/models/getconfigurationop.d.ts.map +1 -1
  37. package/esm/models/getconfigurationop.js +296 -0
  38. package/esm/models/getconfigurationop.js.map +1 -1
  39. package/esm/models/importresourceop.d.ts +64 -0
  40. package/esm/models/importresourceop.d.ts.map +1 -1
  41. package/esm/models/importresourceop.js +64 -0
  42. package/esm/models/importresourceop.js.map +1 -1
  43. package/esm/models/updateprojectop.d.ts +1 -1
  44. package/esm/models/updateprojectop.d.ts.map +1 -1
  45. package/esm/models/updateprojectop.js +4 -4
  46. package/esm/models/updateprojectop.js.map +1 -1
  47. package/esm/models/uploadfileop.d.ts +2 -0
  48. package/esm/models/uploadfileop.d.ts.map +1 -1
  49. package/esm/models/uploadfileop.js +14 -0
  50. package/esm/models/uploadfileop.js.map +1 -1
  51. package/esm/models/userevent.d.ts +11 -63
  52. package/esm/models/userevent.d.ts.map +1 -1
  53. package/esm/models/userevent.js +10 -74
  54. package/esm/models/userevent.js.map +1 -1
  55. package/esm/sdk/marketplace.d.ts +0 -8
  56. package/esm/sdk/marketplace.d.ts.map +1 -1
  57. package/esm/sdk/marketplace.js +0 -10
  58. package/esm/sdk/marketplace.js.map +1 -1
  59. package/jsr.json +1 -1
  60. package/package.json +1 -1
  61. package/src/__tests__/marketplace.test.ts +5 -15
  62. package/src/__tests__/projects.test.ts +13 -15
  63. package/src/funcs/deploymentsUploadFile.ts +2 -1
  64. package/src/lib/config.ts +3 -3
  65. package/src/mcp-server/mcp-server.ts +1 -1
  66. package/src/mcp-server/prompts.ts +8 -1
  67. package/src/mcp-server/resources.ts +16 -2
  68. package/src/mcp-server/server.ts +3 -5
  69. package/src/mcp-server/tools.ts +6 -3
  70. package/src/models/authuser.ts +29 -166
  71. package/src/models/createprojectop.ts +5 -5
  72. package/src/models/getconfigurationop.ts +579 -0
  73. package/src/models/importresourceop.ts +141 -0
  74. package/src/models/updateprojectop.ts +5 -5
  75. package/src/models/uploadfileop.ts +26 -0
  76. package/src/models/userevent.ts +23 -174
  77. package/src/sdk/marketplace.ts +0 -22
  78. package/vercel-spec.json +271 -229
  79. package/esm/funcs/marketplaceQueryExperimentationItems.d.ts +0 -18
  80. package/esm/funcs/marketplaceQueryExperimentationItems.d.ts.map +0 -1
  81. package/esm/funcs/marketplaceQueryExperimentationItems.js +0 -84
  82. package/esm/funcs/marketplaceQueryExperimentationItems.js.map +0 -1
  83. package/esm/mcp-server/tools/marketplaceQueryExperimentationItems.d.ts +0 -7
  84. package/esm/mcp-server/tools/marketplaceQueryExperimentationItems.d.ts.map +0 -1
  85. package/esm/mcp-server/tools/marketplaceQueryExperimentationItems.js +0 -28
  86. package/esm/mcp-server/tools/marketplaceQueryExperimentationItems.js.map +0 -1
  87. package/esm/models/queryexperimentationitemsop.d.ts +0 -148
  88. package/esm/models/queryexperimentationitemsop.d.ts.map +0 -1
  89. package/esm/models/queryexperimentationitemsop.js +0 -125
  90. package/esm/models/queryexperimentationitemsop.js.map +0 -1
  91. package/src/funcs/marketplaceQueryExperimentationItems.ts +0 -183
  92. package/src/mcp-server/tools/marketplaceQueryExperimentationItems.ts +0 -39
  93. package/src/models/queryexperimentationitemsop.ts +0 -287
@@ -1,84 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { encodeFormQuery } from "../lib/encodings.js";
5
- import * as M from "../lib/matchers.js";
6
- import { compactMap } from "../lib/primitives.js";
7
- import { safeParse } from "../lib/schemas.js";
8
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
- import { pathToFunc } from "../lib/url.js";
10
- import { QueryExperimentationItemsRequest$outboundSchema, QueryExperimentationItemsResponseBody$inboundSchema, } from "../models/queryexperimentationitemsop.js";
11
- import { VercelBadRequestError$inboundSchema, } from "../models/vercelbadrequesterror.js";
12
- import { VercelForbiddenError$inboundSchema, } from "../models/vercelforbiddenerror.js";
13
- import { APIPromise } from "../types/async.js";
14
- /**
15
- * Query experimentation items
16
- *
17
- * @remarks
18
- * Queries flags, experiments under a Marketplace resource.
19
- */
20
- export function marketplaceQueryExperimentationItems(client, request, options) {
21
- return new APIPromise($do(client, request, options));
22
- }
23
- async function $do(client, request, options) {
24
- const parsed = safeParse(request, (value) => QueryExperimentationItemsRequest$outboundSchema.parse(value), "Input validation failed");
25
- if (!parsed.ok) {
26
- return [parsed, { status: "invalid" }];
27
- }
28
- const payload = parsed.value;
29
- const body = null;
30
- const path = pathToFunc("/v1/experimentation/items")();
31
- const query = encodeFormQuery({
32
- "resourceId": payload.resourceId,
33
- });
34
- const headers = new Headers(compactMap({
35
- Accept: "application/json",
36
- }));
37
- const secConfig = await extractSecurity(client._options.bearerToken);
38
- const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
39
- const requestSecurity = resolveGlobalSecurity(securityInput);
40
- const context = {
41
- baseURL: options?.serverURL ?? client._baseURL ?? "",
42
- operationID: "queryExperimentationItems",
43
- oAuth2Scopes: [],
44
- resolvedSecurity: requestSecurity,
45
- securitySource: client._options.bearerToken,
46
- retryConfig: options?.retries
47
- || client._options.retryConfig
48
- || { strategy: "none" },
49
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
50
- };
51
- const requestRes = client._createRequest(context, {
52
- security: requestSecurity,
53
- method: "GET",
54
- baseURL: options?.serverURL,
55
- path: path,
56
- headers: headers,
57
- query: query,
58
- body: body,
59
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
60
- }, options);
61
- if (!requestRes.ok) {
62
- return [requestRes, { status: "invalid" }];
63
- }
64
- const req = requestRes.value;
65
- const doResult = await client._do(req, {
66
- context,
67
- errorCodes: ["400", "401", "403", "4XX", "5XX"],
68
- retryConfig: context.retryConfig,
69
- retryCodes: context.retryCodes,
70
- });
71
- if (!doResult.ok) {
72
- return [doResult, { status: "request-error", request: req }];
73
- }
74
- const response = doResult.value;
75
- const responseFields = {
76
- HttpMeta: { Response: response, Request: req },
77
- };
78
- const [result] = await M.match(M.json(200, QueryExperimentationItemsResponseBody$inboundSchema), M.jsonErr(400, VercelBadRequestError$inboundSchema), M.jsonErr(401, VercelForbiddenError$inboundSchema), M.fail([403, "4XX"]), M.fail("5XX"))(response, { extraFields: responseFields });
79
- if (!result.ok) {
80
- return [result, { status: "complete", request: req, response }];
81
- }
82
- return [result, { status: "complete", request: req, response }];
83
- }
84
- //# sourceMappingURL=marketplaceQueryExperimentationItems.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"marketplaceQueryExperimentationItems.js","sourceRoot":"","sources":["../../src/funcs/marketplaceQueryExperimentationItems.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,OAAO,EAEL,+CAA+C,EAE/C,mDAAmD,GACpD,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAEL,mCAAmC,GACpC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,kCAAkC,GACnC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAClD,MAAkB,EAClB,OAAyC,EACzC,OAAwB;IAexB,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAkB,EAClB,OAAyC,EACzC,OAAwB;IAkBxB,MAAM,MAAM,GAAG,SAAS,CACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,+CAA+C,CAAC,KAAK,CAAC,KAAK,CAAC,EACvE,yBAAyB,CAC1B,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AO,CAAC,GAAG,EAAE,mCAAmC,CAAC,EACnD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,kCAAkC,CAAC,EAClD,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EACpB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -1,7 +0,0 @@
1
- import { ToolDefinition } from "../tools.js";
2
- declare const args: {
3
- request: import("zod").ZodType<import("../../models/queryexperimentationitemsop.js").QueryExperimentationItemsRequest, import("zod").ZodTypeDef, unknown>;
4
- };
5
- export declare const tool$marketplaceQueryExperimentationItems: ToolDefinition<typeof args>;
6
- export {};
7
- //# sourceMappingURL=marketplaceQueryExperimentationItems.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"marketplaceQueryExperimentationItems.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/marketplaceQueryExperimentationItems.ts"],"names":[],"mappings":"AAMA,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,yCAAyC,EAAE,cAAc,CACpE,OAAO,IAAI,CAyBZ,CAAC"}
@@ -1,28 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { marketplaceQueryExperimentationItems } from "../../funcs/marketplaceQueryExperimentationItems.js";
5
- import { QueryExperimentationItemsRequest$inboundSchema } from "../../models/queryexperimentationitemsop.js";
6
- import { formatResult } from "../tools.js";
7
- const args = {
8
- request: QueryExperimentationItemsRequest$inboundSchema,
9
- };
10
- export const tool$marketplaceQueryExperimentationItems = {
11
- name: "marketplace-query-experimentation-items",
12
- description: `Query experimentation items
13
-
14
- Queries flags, experiments under a Marketplace resource.`,
15
- args,
16
- tool: async (client, args, ctx) => {
17
- const [result, apiCall] = await marketplaceQueryExperimentationItems(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
18
- if (!result.ok) {
19
- return {
20
- content: [{ type: "text", text: result.error.message }],
21
- isError: true,
22
- };
23
- }
24
- const value = result.value;
25
- return formatResult(value, apiCall);
26
- },
27
- };
28
- //# sourceMappingURL=marketplaceQueryExperimentationItems.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"marketplaceQueryExperimentationItems.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/marketplaceQueryExperimentationItems.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oCAAoC,EAAE,MAAM,qDAAqD,CAAC;AAC3G,OAAO,EAAE,8CAA8C,EAAE,MAAM,6CAA6C,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,8CAA8C;CACxD,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAElD;IACF,IAAI,EAAE,yCAAyC;IAC/C,WAAW,EAAE;;yDAE0C;IACvD,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,oCAAoC,CAClE,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
@@ -1,148 +0,0 @@
1
- import * as z from "zod";
2
- import { ClosedEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./sdkvalidationerror.js";
5
- export type QueryExperimentationItemsRequest = {
6
- resourceId?: string | undefined;
7
- };
8
- /**
9
- * An optional functional category for the item. Categorization semantics are: - flag (can resolve variants, can freely update variant resolution, usually does not perform analysis) - experiment (has variants, constrains changes to variant allocations, performs analysis) Using statsig as an example: - FeatureGate -> flag - Experiment -> experiment - Autotune -> experiment Forwards compatibility for other primitives can be considered, ex. `DynamicConfig`, `Holdouts`, `Layers`
10
- */
11
- export declare const QueryExperimentationItemsCategory: {
12
- readonly Experiment: "experiment";
13
- readonly Flag: "flag";
14
- };
15
- /**
16
- * An optional functional category for the item. Categorization semantics are: - flag (can resolve variants, can freely update variant resolution, usually does not perform analysis) - experiment (has variants, constrains changes to variant allocations, performs analysis) Using statsig as an example: - FeatureGate -> flag - Experiment -> experiment - Autotune -> experiment Forwards compatibility for other primitives can be considered, ex. `DynamicConfig`, `Holdouts`, `Layers`
17
- */
18
- export type QueryExperimentationItemsCategory = ClosedEnum<typeof QueryExperimentationItemsCategory>;
19
- export type QueryExperimentationItemsItems = {
20
- /**
21
- * The Vercel generated ID for this item Integrations should not receive this in API responses
22
- */
23
- id: string;
24
- slug: string;
25
- origin: string;
26
- /**
27
- * The ID the partner has for this item. Integrations should receive this as `id` in API responses
28
- */
29
- externalId: string;
30
- /**
31
- * The id of the integration installation on a team
32
- */
33
- integrationConfigurationId: string;
34
- /**
35
- * The flags collection ID
36
- */
37
- resourceId: string;
38
- /**
39
- * An optional functional category for the item. Categorization semantics are: - flag (can resolve variants, can freely update variant resolution, usually does not perform analysis) - experiment (has variants, constrains changes to variant allocations, performs analysis) Using statsig as an example: - FeatureGate -> flag - Experiment -> experiment - Autotune -> experiment Forwards compatibility for other primitives can be considered, ex. `DynamicConfig`, `Holdouts`, `Layers`
40
- */
41
- category?: QueryExperimentationItemsCategory | undefined;
42
- name?: string | undefined;
43
- description?: string | undefined;
44
- isArchived?: boolean | undefined;
45
- createdAt?: number | undefined;
46
- updatedAt?: number | undefined;
47
- };
48
- export type QueryExperimentationItemsResponseBody = {
49
- items: Array<QueryExperimentationItemsItems>;
50
- };
51
- /** @internal */
52
- export declare const QueryExperimentationItemsRequest$inboundSchema: z.ZodType<QueryExperimentationItemsRequest, z.ZodTypeDef, unknown>;
53
- /** @internal */
54
- export type QueryExperimentationItemsRequest$Outbound = {
55
- resourceId?: string | undefined;
56
- };
57
- /** @internal */
58
- export declare const QueryExperimentationItemsRequest$outboundSchema: z.ZodType<QueryExperimentationItemsRequest$Outbound, z.ZodTypeDef, QueryExperimentationItemsRequest>;
59
- /**
60
- * @internal
61
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
62
- */
63
- export declare namespace QueryExperimentationItemsRequest$ {
64
- /** @deprecated use `QueryExperimentationItemsRequest$inboundSchema` instead. */
65
- const inboundSchema: z.ZodType<QueryExperimentationItemsRequest, z.ZodTypeDef, unknown>;
66
- /** @deprecated use `QueryExperimentationItemsRequest$outboundSchema` instead. */
67
- const outboundSchema: z.ZodType<QueryExperimentationItemsRequest$Outbound, z.ZodTypeDef, QueryExperimentationItemsRequest>;
68
- /** @deprecated use `QueryExperimentationItemsRequest$Outbound` instead. */
69
- type Outbound = QueryExperimentationItemsRequest$Outbound;
70
- }
71
- export declare function queryExperimentationItemsRequestToJSON(queryExperimentationItemsRequest: QueryExperimentationItemsRequest): string;
72
- export declare function queryExperimentationItemsRequestFromJSON(jsonString: string): SafeParseResult<QueryExperimentationItemsRequest, SDKValidationError>;
73
- /** @internal */
74
- export declare const QueryExperimentationItemsCategory$inboundSchema: z.ZodNativeEnum<typeof QueryExperimentationItemsCategory>;
75
- /** @internal */
76
- export declare const QueryExperimentationItemsCategory$outboundSchema: z.ZodNativeEnum<typeof QueryExperimentationItemsCategory>;
77
- /**
78
- * @internal
79
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
80
- */
81
- export declare namespace QueryExperimentationItemsCategory$ {
82
- /** @deprecated use `QueryExperimentationItemsCategory$inboundSchema` instead. */
83
- const inboundSchema: z.ZodNativeEnum<{
84
- readonly Experiment: "experiment";
85
- readonly Flag: "flag";
86
- }>;
87
- /** @deprecated use `QueryExperimentationItemsCategory$outboundSchema` instead. */
88
- const outboundSchema: z.ZodNativeEnum<{
89
- readonly Experiment: "experiment";
90
- readonly Flag: "flag";
91
- }>;
92
- }
93
- /** @internal */
94
- export declare const QueryExperimentationItemsItems$inboundSchema: z.ZodType<QueryExperimentationItemsItems, z.ZodTypeDef, unknown>;
95
- /** @internal */
96
- export type QueryExperimentationItemsItems$Outbound = {
97
- id: string;
98
- slug: string;
99
- origin: string;
100
- externalId: string;
101
- integrationConfigurationId: string;
102
- resourceId: string;
103
- category?: string | undefined;
104
- name?: string | undefined;
105
- description?: string | undefined;
106
- isArchived?: boolean | undefined;
107
- createdAt?: number | undefined;
108
- updatedAt?: number | undefined;
109
- };
110
- /** @internal */
111
- export declare const QueryExperimentationItemsItems$outboundSchema: z.ZodType<QueryExperimentationItemsItems$Outbound, z.ZodTypeDef, QueryExperimentationItemsItems>;
112
- /**
113
- * @internal
114
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
115
- */
116
- export declare namespace QueryExperimentationItemsItems$ {
117
- /** @deprecated use `QueryExperimentationItemsItems$inboundSchema` instead. */
118
- const inboundSchema: z.ZodType<QueryExperimentationItemsItems, z.ZodTypeDef, unknown>;
119
- /** @deprecated use `QueryExperimentationItemsItems$outboundSchema` instead. */
120
- const outboundSchema: z.ZodType<QueryExperimentationItemsItems$Outbound, z.ZodTypeDef, QueryExperimentationItemsItems>;
121
- /** @deprecated use `QueryExperimentationItemsItems$Outbound` instead. */
122
- type Outbound = QueryExperimentationItemsItems$Outbound;
123
- }
124
- export declare function queryExperimentationItemsItemsToJSON(queryExperimentationItemsItems: QueryExperimentationItemsItems): string;
125
- export declare function queryExperimentationItemsItemsFromJSON(jsonString: string): SafeParseResult<QueryExperimentationItemsItems, SDKValidationError>;
126
- /** @internal */
127
- export declare const QueryExperimentationItemsResponseBody$inboundSchema: z.ZodType<QueryExperimentationItemsResponseBody, z.ZodTypeDef, unknown>;
128
- /** @internal */
129
- export type QueryExperimentationItemsResponseBody$Outbound = {
130
- items: Array<QueryExperimentationItemsItems$Outbound>;
131
- };
132
- /** @internal */
133
- export declare const QueryExperimentationItemsResponseBody$outboundSchema: z.ZodType<QueryExperimentationItemsResponseBody$Outbound, z.ZodTypeDef, QueryExperimentationItemsResponseBody>;
134
- /**
135
- * @internal
136
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
137
- */
138
- export declare namespace QueryExperimentationItemsResponseBody$ {
139
- /** @deprecated use `QueryExperimentationItemsResponseBody$inboundSchema` instead. */
140
- const inboundSchema: z.ZodType<QueryExperimentationItemsResponseBody, z.ZodTypeDef, unknown>;
141
- /** @deprecated use `QueryExperimentationItemsResponseBody$outboundSchema` instead. */
142
- const outboundSchema: z.ZodType<QueryExperimentationItemsResponseBody$Outbound, z.ZodTypeDef, QueryExperimentationItemsResponseBody>;
143
- /** @deprecated use `QueryExperimentationItemsResponseBody$Outbound` instead. */
144
- type Outbound = QueryExperimentationItemsResponseBody$Outbound;
145
- }
146
- export declare function queryExperimentationItemsResponseBodyToJSON(queryExperimentationItemsResponseBody: QueryExperimentationItemsResponseBody): string;
147
- export declare function queryExperimentationItemsResponseBodyFromJSON(jsonString: string): SafeParseResult<QueryExperimentationItemsResponseBody, SDKValidationError>;
148
- //# sourceMappingURL=queryexperimentationitemsop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"queryexperimentationitemsop.d.ts","sourceRoot":"","sources":["../../src/models/queryexperimentationitemsop.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,MAAM,gCAAgC,GAAG;IAC7C,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;CAGpC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,UAAU,CACxD,OAAO,iCAAiC,CACzC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,0BAA0B,EAAE,MAAM,CAAC;IACnC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,iCAAiC,GAAG,SAAS,CAAC;IACzD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAA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ACrC,CAAC,CAAC,UAAU,EACZ,OAAO,CAGP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,8CAA8C,GAAG;IAC3D,KAAK,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;CACvD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oDAAoD,EAAE,CAAC,CAAC,OAAO,CAC1E,8CAA8C,EAC9C,CAAC,CAAC,UAAU,EACZ,qCAAqC,CAGrC,CAAC;AAEH;;;GAGG;AACH,yBAAiB,sCAAsC,CAAC;IACtD,qFAAqF;IAC9E,MAAM,aAAa,yEAC2B,CAAC;IACtD,sFAAsF;IAC/E,MAAM,cAAc,gHAC2B,CAAC;IACvD,gFAAgF;IAChF,KAAY,QAAQ,GAAG,8CAA8C,CAAC;CACvE;AAED,wBAAgB,2CAA2C,CACzD,qCAAqC,EAAE,qCAAqC,GAC3E,MAAM,CAMR;AAED,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qCAAqC,EAAE,kBAAkB,CAAC,CAO5E"}
@@ -1,125 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod";
5
- import { safeParse } from "../lib/schemas.js";
6
- /**
7
- * An optional functional category for the item. Categorization semantics are: - flag (can resolve variants, can freely update variant resolution, usually does not perform analysis) - experiment (has variants, constrains changes to variant allocations, performs analysis) Using statsig as an example: - FeatureGate -> flag - Experiment -> experiment - Autotune -> experiment Forwards compatibility for other primitives can be considered, ex. `DynamicConfig`, `Holdouts`, `Layers`
8
- */
9
- export const QueryExperimentationItemsCategory = {
10
- Experiment: "experiment",
11
- Flag: "flag",
12
- };
13
- /** @internal */
14
- export const QueryExperimentationItemsRequest$inboundSchema = z.object({
15
- resourceId: z.string().optional(),
16
- });
17
- /** @internal */
18
- export const QueryExperimentationItemsRequest$outboundSchema = z.object({
19
- resourceId: z.string().optional(),
20
- });
21
- /**
22
- * @internal
23
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
24
- */
25
- export var QueryExperimentationItemsRequest$;
26
- (function (QueryExperimentationItemsRequest$) {
27
- /** @deprecated use `QueryExperimentationItemsRequest$inboundSchema` instead. */
28
- QueryExperimentationItemsRequest$.inboundSchema = QueryExperimentationItemsRequest$inboundSchema;
29
- /** @deprecated use `QueryExperimentationItemsRequest$outboundSchema` instead. */
30
- QueryExperimentationItemsRequest$.outboundSchema = QueryExperimentationItemsRequest$outboundSchema;
31
- })(QueryExperimentationItemsRequest$ || (QueryExperimentationItemsRequest$ = {}));
32
- export function queryExperimentationItemsRequestToJSON(queryExperimentationItemsRequest) {
33
- return JSON.stringify(QueryExperimentationItemsRequest$outboundSchema.parse(queryExperimentationItemsRequest));
34
- }
35
- export function queryExperimentationItemsRequestFromJSON(jsonString) {
36
- return safeParse(jsonString, (x) => QueryExperimentationItemsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QueryExperimentationItemsRequest' from JSON`);
37
- }
38
- /** @internal */
39
- export const QueryExperimentationItemsCategory$inboundSchema = z.nativeEnum(QueryExperimentationItemsCategory);
40
- /** @internal */
41
- export const QueryExperimentationItemsCategory$outboundSchema = QueryExperimentationItemsCategory$inboundSchema;
42
- /**
43
- * @internal
44
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
45
- */
46
- export var QueryExperimentationItemsCategory$;
47
- (function (QueryExperimentationItemsCategory$) {
48
- /** @deprecated use `QueryExperimentationItemsCategory$inboundSchema` instead. */
49
- QueryExperimentationItemsCategory$.inboundSchema = QueryExperimentationItemsCategory$inboundSchema;
50
- /** @deprecated use `QueryExperimentationItemsCategory$outboundSchema` instead. */
51
- QueryExperimentationItemsCategory$.outboundSchema = QueryExperimentationItemsCategory$outboundSchema;
52
- })(QueryExperimentationItemsCategory$ || (QueryExperimentationItemsCategory$ = {}));
53
- /** @internal */
54
- export const QueryExperimentationItemsItems$inboundSchema = z.object({
55
- id: z.string(),
56
- slug: z.string(),
57
- origin: z.string(),
58
- externalId: z.string(),
59
- integrationConfigurationId: z.string(),
60
- resourceId: z.string(),
61
- category: QueryExperimentationItemsCategory$inboundSchema.optional(),
62
- name: z.string().optional(),
63
- description: z.string().optional(),
64
- isArchived: z.boolean().optional(),
65
- createdAt: z.number().optional(),
66
- updatedAt: z.number().optional(),
67
- });
68
- /** @internal */
69
- export const QueryExperimentationItemsItems$outboundSchema = z.object({
70
- id: z.string(),
71
- slug: z.string(),
72
- origin: z.string(),
73
- externalId: z.string(),
74
- integrationConfigurationId: z.string(),
75
- resourceId: z.string(),
76
- category: QueryExperimentationItemsCategory$outboundSchema.optional(),
77
- name: z.string().optional(),
78
- description: z.string().optional(),
79
- isArchived: z.boolean().optional(),
80
- createdAt: z.number().optional(),
81
- updatedAt: z.number().optional(),
82
- });
83
- /**
84
- * @internal
85
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
86
- */
87
- export var QueryExperimentationItemsItems$;
88
- (function (QueryExperimentationItemsItems$) {
89
- /** @deprecated use `QueryExperimentationItemsItems$inboundSchema` instead. */
90
- QueryExperimentationItemsItems$.inboundSchema = QueryExperimentationItemsItems$inboundSchema;
91
- /** @deprecated use `QueryExperimentationItemsItems$outboundSchema` instead. */
92
- QueryExperimentationItemsItems$.outboundSchema = QueryExperimentationItemsItems$outboundSchema;
93
- })(QueryExperimentationItemsItems$ || (QueryExperimentationItemsItems$ = {}));
94
- export function queryExperimentationItemsItemsToJSON(queryExperimentationItemsItems) {
95
- return JSON.stringify(QueryExperimentationItemsItems$outboundSchema.parse(queryExperimentationItemsItems));
96
- }
97
- export function queryExperimentationItemsItemsFromJSON(jsonString) {
98
- return safeParse(jsonString, (x) => QueryExperimentationItemsItems$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QueryExperimentationItemsItems' from JSON`);
99
- }
100
- /** @internal */
101
- export const QueryExperimentationItemsResponseBody$inboundSchema = z.object({
102
- items: z.array(z.lazy(() => QueryExperimentationItemsItems$inboundSchema)),
103
- });
104
- /** @internal */
105
- export const QueryExperimentationItemsResponseBody$outboundSchema = z.object({
106
- items: z.array(z.lazy(() => QueryExperimentationItemsItems$outboundSchema)),
107
- });
108
- /**
109
- * @internal
110
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
111
- */
112
- export var QueryExperimentationItemsResponseBody$;
113
- (function (QueryExperimentationItemsResponseBody$) {
114
- /** @deprecated use `QueryExperimentationItemsResponseBody$inboundSchema` instead. */
115
- QueryExperimentationItemsResponseBody$.inboundSchema = QueryExperimentationItemsResponseBody$inboundSchema;
116
- /** @deprecated use `QueryExperimentationItemsResponseBody$outboundSchema` instead. */
117
- QueryExperimentationItemsResponseBody$.outboundSchema = QueryExperimentationItemsResponseBody$outboundSchema;
118
- })(QueryExperimentationItemsResponseBody$ || (QueryExperimentationItemsResponseBody$ = {}));
119
- export function queryExperimentationItemsResponseBodyToJSON(queryExperimentationItemsResponseBody) {
120
- return JSON.stringify(QueryExperimentationItemsResponseBody$outboundSchema.parse(queryExperimentationItemsResponseBody));
121
- }
122
- export function queryExperimentationItemsResponseBodyFromJSON(jsonString) {
123
- return safeParse(jsonString, (x) => QueryExperimentationItemsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QueryExperimentationItemsResponseBody' from JSON`);
124
- }
125
- //# sourceMappingURL=queryexperimentationitemsop.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"queryexperimentationitemsop.js","sourceRoot":"","sources":["../../src/models/queryexperimentationitemsop.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAS9C;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,MAAM;CACJ,CAAC;AA0CX,gBAAgB;AAChB,MAAM,CAAC,MAAM,8CAA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B,mDAAmD,CAAC;IACtD,sFAAsF;IACzE,qDAAc,GACzB,oDAAoD,CAAC;AAGzD,CAAC,EATgB,sCAAsC,KAAtC,sCAAsC,QAStD;AAED,MAAM,UAAU,2CAA2C,CACzD,qCAA4E;IAE5E,OAAO,IAAI,CAAC,SAAS,CACnB,oDAAoD,CAAC,KAAK,CACxD,qCAAqC,CACtC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6CAA6C,CAC3D,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,mDAAmD,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1E,mEAAmE,CACpE,CAAC;AACJ,CAAC"}
@@ -1,183 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { VercelCore } from "../core.js";
6
- import { encodeFormQuery } from "../lib/encodings.js";
7
- import * as M from "../lib/matchers.js";
8
- import { compactMap } from "../lib/primitives.js";
9
- import { safeParse } from "../lib/schemas.js";
10
- import { RequestOptions } from "../lib/sdks.js";
11
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
- import { pathToFunc } from "../lib/url.js";
13
- import {
14
- ConnectionError,
15
- InvalidRequestError,
16
- RequestAbortedError,
17
- RequestTimeoutError,
18
- UnexpectedClientError,
19
- } from "../models/httpclienterrors.js";
20
- import {
21
- QueryExperimentationItemsRequest,
22
- QueryExperimentationItemsRequest$outboundSchema,
23
- QueryExperimentationItemsResponseBody,
24
- QueryExperimentationItemsResponseBody$inboundSchema,
25
- } from "../models/queryexperimentationitemsop.js";
26
- import { SDKError } from "../models/sdkerror.js";
27
- import { SDKValidationError } from "../models/sdkvalidationerror.js";
28
- import {
29
- VercelBadRequestError,
30
- VercelBadRequestError$inboundSchema,
31
- } from "../models/vercelbadrequesterror.js";
32
- import {
33
- VercelForbiddenError,
34
- VercelForbiddenError$inboundSchema,
35
- } from "../models/vercelforbiddenerror.js";
36
- import { APICall, APIPromise } from "../types/async.js";
37
- import { Result } from "../types/fp.js";
38
-
39
- /**
40
- * Query experimentation items
41
- *
42
- * @remarks
43
- * Queries flags, experiments under a Marketplace resource.
44
- */
45
- export function marketplaceQueryExperimentationItems(
46
- client: VercelCore,
47
- request: QueryExperimentationItemsRequest,
48
- options?: RequestOptions,
49
- ): APIPromise<
50
- Result<
51
- QueryExperimentationItemsResponseBody,
52
- | VercelBadRequestError
53
- | VercelForbiddenError
54
- | SDKError
55
- | SDKValidationError
56
- | UnexpectedClientError
57
- | InvalidRequestError
58
- | RequestAbortedError
59
- | RequestTimeoutError
60
- | ConnectionError
61
- >
62
- > {
63
- return new APIPromise($do(
64
- client,
65
- request,
66
- options,
67
- ));
68
- }
69
-
70
- async function $do(
71
- client: VercelCore,
72
- request: QueryExperimentationItemsRequest,
73
- options?: RequestOptions,
74
- ): Promise<
75
- [
76
- Result<
77
- QueryExperimentationItemsResponseBody,
78
- | VercelBadRequestError
79
- | VercelForbiddenError
80
- | SDKError
81
- | SDKValidationError
82
- | UnexpectedClientError
83
- | InvalidRequestError
84
- | RequestAbortedError
85
- | RequestTimeoutError
86
- | ConnectionError
87
- >,
88
- APICall,
89
- ]
90
- > {
91
- const parsed = safeParse(
92
- request,
93
- (value) => QueryExperimentationItemsRequest$outboundSchema.parse(value),
94
- "Input validation failed",
95
- );
96
- if (!parsed.ok) {
97
- return [parsed, { status: "invalid" }];
98
- }
99
- const payload = parsed.value;
100
- const body = null;
101
-
102
- const path = pathToFunc("/v1/experimentation/items")();
103
-
104
- const query = encodeFormQuery({
105
- "resourceId": payload.resourceId,
106
- });
107
-
108
- const headers = new Headers(compactMap({
109
- Accept: "application/json",
110
- }));
111
-
112
- const secConfig = await extractSecurity(client._options.bearerToken);
113
- const securityInput = secConfig == null ? {} : { bearerToken: secConfig };
114
- const requestSecurity = resolveGlobalSecurity(securityInput);
115
-
116
- const context = {
117
- baseURL: options?.serverURL ?? client._baseURL ?? "",
118
- operationID: "queryExperimentationItems",
119
- oAuth2Scopes: [],
120
-
121
- resolvedSecurity: requestSecurity,
122
-
123
- securitySource: client._options.bearerToken,
124
- retryConfig: options?.retries
125
- || client._options.retryConfig
126
- || { strategy: "none" },
127
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
128
- };
129
-
130
- const requestRes = client._createRequest(context, {
131
- security: requestSecurity,
132
- method: "GET",
133
- baseURL: options?.serverURL,
134
- path: path,
135
- headers: headers,
136
- query: query,
137
- body: body,
138
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
139
- }, options);
140
- if (!requestRes.ok) {
141
- return [requestRes, { status: "invalid" }];
142
- }
143
- const req = requestRes.value;
144
-
145
- const doResult = await client._do(req, {
146
- context,
147
- errorCodes: ["400", "401", "403", "4XX", "5XX"],
148
- retryConfig: context.retryConfig,
149
- retryCodes: context.retryCodes,
150
- });
151
- if (!doResult.ok) {
152
- return [doResult, { status: "request-error", request: req }];
153
- }
154
- const response = doResult.value;
155
-
156
- const responseFields = {
157
- HttpMeta: { Response: response, Request: req },
158
- };
159
-
160
- const [result] = await M.match<
161
- QueryExperimentationItemsResponseBody,
162
- | VercelBadRequestError
163
- | VercelForbiddenError
164
- | SDKError
165
- | SDKValidationError
166
- | UnexpectedClientError
167
- | InvalidRequestError
168
- | RequestAbortedError
169
- | RequestTimeoutError
170
- | ConnectionError
171
- >(
172
- M.json(200, QueryExperimentationItemsResponseBody$inboundSchema),
173
- M.jsonErr(400, VercelBadRequestError$inboundSchema),
174
- M.jsonErr(401, VercelForbiddenError$inboundSchema),
175
- M.fail([403, "4XX"]),
176
- M.fail("5XX"),
177
- )(response, { extraFields: responseFields });
178
- if (!result.ok) {
179
- return [result, { status: "complete", request: req, response }];
180
- }
181
-
182
- return [result, { status: "complete", request: req, response }];
183
- }
@@ -1,39 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { marketplaceQueryExperimentationItems } from "../../funcs/marketplaceQueryExperimentationItems.js";
6
- import { QueryExperimentationItemsRequest$inboundSchema } from "../../models/queryexperimentationitemsop.js";
7
- import { formatResult, ToolDefinition } from "../tools.js";
8
-
9
- const args = {
10
- request: QueryExperimentationItemsRequest$inboundSchema,
11
- };
12
-
13
- export const tool$marketplaceQueryExperimentationItems: ToolDefinition<
14
- typeof args
15
- > = {
16
- name: "marketplace-query-experimentation-items",
17
- description: `Query experimentation items
18
-
19
- Queries flags, experiments under a Marketplace resource.`,
20
- args,
21
- tool: async (client, args, ctx) => {
22
- const [result, apiCall] = await marketplaceQueryExperimentationItems(
23
- client,
24
- args.request,
25
- { fetchOptions: { signal: ctx.signal } },
26
- ).$inspect();
27
-
28
- if (!result.ok) {
29
- return {
30
- content: [{ type: "text", text: result.error.message }],
31
- isError: true,
32
- };
33
- }
34
-
35
- const value = result.value;
36
-
37
- return formatResult(value, apiCall);
38
- },
39
- };