@moovio/sdk 0.16.3 → 0.16.5
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 +62 -44
- package/bin/mcp-server.js +1897 -591
- package/bin/mcp-server.js.map +41 -12
- package/docs/sdks/products/README.md +592 -0
- package/examples/package-lock.json +1 -1
- package/funcs/productsCreate.d.ts +15 -0
- package/funcs/productsCreate.d.ts.map +1 -0
- package/funcs/productsCreate.js +138 -0
- package/funcs/productsCreate.js.map +1 -0
- package/funcs/productsDisable.d.ts +17 -0
- package/funcs/productsDisable.d.ts.map +1 -0
- package/funcs/productsDisable.js +139 -0
- package/funcs/productsDisable.js.map +1 -0
- package/funcs/productsGet.d.ts +14 -0
- package/funcs/productsGet.d.ts.map +1 -0
- package/funcs/productsGet.js +126 -0
- package/funcs/productsGet.js.map +1 -0
- package/funcs/productsList.d.ts +14 -0
- package/funcs/productsList.d.ts.map +1 -0
- package/funcs/productsList.js +127 -0
- package/funcs/productsList.js.map +1 -0
- package/funcs/productsUpdate.d.ts +15 -0
- package/funcs/productsUpdate.d.ts.map +1 -0
- package/funcs/productsUpdate.js +142 -0
- package/funcs/productsUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +11 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/productsCreate.d.ts +8 -0
- package/mcp-server/tools/productsCreate.d.ts.map +1 -0
- package/mcp-server/tools/productsCreate.js +62 -0
- package/mcp-server/tools/productsCreate.js.map +1 -0
- package/mcp-server/tools/productsDisable.d.ts +8 -0
- package/mcp-server/tools/productsDisable.d.ts.map +1 -0
- package/mcp-server/tools/productsDisable.js +63 -0
- package/mcp-server/tools/productsDisable.js.map +1 -0
- package/mcp-server/tools/productsGet.d.ts +8 -0
- package/mcp-server/tools/productsGet.d.ts.map +1 -0
- package/mcp-server/tools/productsGet.js +62 -0
- package/mcp-server/tools/productsGet.js.map +1 -0
- package/mcp-server/tools/productsList.d.ts +8 -0
- package/mcp-server/tools/productsList.d.ts.map +1 -0
- package/mcp-server/tools/productsList.js +62 -0
- package/mcp-server/tools/productsList.js.map +1 -0
- package/mcp-server/tools/productsUpdate.d.ts +8 -0
- package/mcp-server/tools/productsUpdate.d.ts.map +1 -0
- package/mcp-server/tools/productsUpdate.js +62 -0
- package/mcp-server/tools/productsUpdate.js.map +1 -0
- package/models/components/amountdecimalvalidationerror.d.ts +31 -0
- package/models/components/amountdecimalvalidationerror.d.ts.map +1 -0
- package/models/components/amountdecimalvalidationerror.js +71 -0
- package/models/components/amountdecimalvalidationerror.js.map +1 -0
- package/models/components/assignproductimage.d.ts +32 -0
- package/models/components/assignproductimage.d.ts.map +1 -0
- package/models/components/assignproductimage.js +69 -0
- package/models/components/assignproductimage.js.map +1 -0
- package/models/components/assignproductimagevalidationerror.d.ts +29 -0
- package/models/components/assignproductimagevalidationerror.d.ts.map +1 -0
- package/models/components/assignproductimagevalidationerror.js +69 -0
- package/models/components/assignproductimagevalidationerror.js.map +1 -0
- package/models/components/createproductoption.d.ts +54 -0
- package/models/components/createproductoption.d.ts.map +1 -0
- package/models/components/createproductoption.js +76 -0
- package/models/components/createproductoption.js.map +1 -0
- package/models/components/createproductoptiongroup.d.ts +60 -0
- package/models/components/createproductoptiongroup.d.ts.map +1 -0
- package/models/components/createproductoptiongroup.js +78 -0
- package/models/components/createproductoptiongroup.js.map +1 -0
- package/models/components/feeproperties.d.ts +6 -0
- package/models/components/feeproperties.d.ts.map +1 -1
- package/models/components/feeproperties.js +3 -0
- package/models/components/feeproperties.js.map +1 -1
- package/models/components/index.d.ts +13 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +13 -0
- package/models/components/index.js.map +1 -1
- package/models/components/partnerpricing.d.ts +8 -4
- package/models/components/partnerpricing.d.ts.map +1 -1
- package/models/components/partnerpricing.js +2 -2
- package/models/components/partnerpricing.js.map +1 -1
- package/models/components/partnerpricingagreement.d.ts +7 -3
- package/models/components/partnerpricingagreement.d.ts.map +1 -1
- package/models/components/partnerpricingagreement.js +2 -2
- package/models/components/partnerpricingagreement.js.map +1 -1
- package/models/components/product.d.ts +81 -0
- package/models/components/product.d.ts.map +1 -0
- package/models/components/product.js +88 -0
- package/models/components/product.js.map +1 -0
- package/models/components/productimagemetadata.d.ts +42 -0
- package/models/components/productimagemetadata.d.ts.map +1 -0
- package/models/components/productimagemetadata.js +73 -0
- package/models/components/productimagemetadata.js.map +1 -0
- package/models/components/productoption.d.ts +57 -0
- package/models/components/productoption.d.ts.map +1 -0
- package/models/components/productoption.js +76 -0
- package/models/components/productoption.js.map +1 -0
- package/models/components/productoptiongroup.d.ts +63 -0
- package/models/components/productoptiongroup.d.ts.map +1 -0
- package/models/components/productoptiongroup.js +78 -0
- package/models/components/productoptiongroup.js.map +1 -0
- package/models/components/productoptiongroupvalidationerror.d.ts +42 -0
- package/models/components/productoptiongroupvalidationerror.d.ts.map +1 -0
- package/models/components/productoptiongroupvalidationerror.js +78 -0
- package/models/components/productoptiongroupvalidationerror.js.map +1 -0
- package/models/components/productoptionvalidationerror.d.ts +40 -0
- package/models/components/productoptionvalidationerror.d.ts.map +1 -0
- package/models/components/productoptionvalidationerror.js +76 -0
- package/models/components/productoptionvalidationerror.js.map +1 -0
- package/models/components/productrequest.d.ts +61 -0
- package/models/components/productrequest.d.ts.map +1 -0
- package/models/components/productrequest.js +80 -0
- package/models/components/productrequest.js.map +1 -0
- package/models/components/volumerange.d.ts +51 -0
- package/models/components/volumerange.d.ts.map +1 -0
- package/models/components/volumerange.js +76 -0
- package/models/components/volumerange.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/productrequestvalidationerror.d.ts +61 -0
- package/models/errors/productrequestvalidationerror.d.ts.map +1 -0
- package/models/errors/productrequestvalidationerror.js +105 -0
- package/models/errors/productrequestvalidationerror.js.map +1 -0
- package/models/operations/createproduct.d.ts +101 -0
- package/models/operations/createproduct.d.ts.map +1 -0
- package/models/operations/createproduct.js +155 -0
- package/models/operations/createproduct.js.map +1 -0
- package/models/operations/disableproduct.d.ts +98 -0
- package/models/operations/disableproduct.d.ts.map +1 -0
- package/models/operations/disableproduct.js +142 -0
- package/models/operations/disableproduct.js.map +1 -0
- package/models/operations/getproduct.d.ts +101 -0
- package/models/operations/getproduct.d.ts.map +1 -0
- package/models/operations/getproduct.js +147 -0
- package/models/operations/getproduct.js.map +1 -0
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listproducts.d.ts +103 -0
- package/models/operations/listproducts.d.ts.map +1 -0
- package/models/operations/listproducts.js +149 -0
- package/models/operations/listproducts.js.map +1 -0
- package/models/operations/updateproduct.d.ts +103 -0
- package/models/operations/updateproduct.d.ts.map +1 -0
- package/models/operations/updateproduct.js +157 -0
- package/models/operations/updateproduct.js.map +1 -0
- package/package.json +1 -1
- package/sdk/products.d.ts +27 -0
- package/sdk/products.d.ts.map +1 -0
- package/sdk/products.js +49 -0
- package/sdk/products.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/productsCreate.ts +200 -0
- package/src/funcs/productsDisable.ts +199 -0
- package/src/funcs/productsGet.ts +182 -0
- package/src/funcs/productsList.ts +182 -0
- package/src/funcs/productsUpdate.ts +206 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +11 -1
- package/src/mcp-server/tools/productsCreate.ts +35 -0
- package/src/mcp-server/tools/productsDisable.ts +35 -0
- package/src/mcp-server/tools/productsGet.ts +35 -0
- package/src/mcp-server/tools/productsList.ts +35 -0
- package/src/mcp-server/tools/productsUpdate.ts +35 -0
- package/src/models/components/amountdecimalvalidationerror.ts +72 -0
- package/src/models/components/assignproductimage.ts +69 -0
- package/src/models/components/assignproductimagevalidationerror.ts +69 -0
- package/src/models/components/createproductoption.ts +102 -0
- package/src/models/components/createproductoptiongroup.ts +110 -0
- package/src/models/components/feeproperties.ts +13 -0
- package/src/models/components/index.ts +13 -0
- package/src/models/components/partnerpricing.ts +10 -6
- package/src/models/components/partnerpricingagreement.ts +9 -5
- package/src/models/components/product.ts +148 -0
- package/src/models/components/productimagemetadata.ts +83 -0
- package/src/models/components/productoption.ts +101 -0
- package/src/models/components/productoptiongroup.ts +113 -0
- package/src/models/components/productoptiongroupvalidationerror.ts +91 -0
- package/src/models/components/productoptionvalidationerror.ts +88 -0
- package/src/models/components/productrequest.ts +117 -0
- package/src/models/components/volumerange.ts +95 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/productrequestvalidationerror.ts +124 -0
- package/src/models/operations/createproduct.ts +231 -0
- package/src/models/operations/disableproduct.ts +216 -0
- package/src/models/operations/getproduct.ts +223 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/listproducts.ts +227 -0
- package/src/models/operations/updateproduct.ts +235 -0
- package/src/sdk/products.ts +86 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import * as components from "../components/index.js";
|
|
7
|
+
import { MoovError } from "./mooverror.js";
|
|
8
|
+
|
|
9
|
+
export type ProductRequestValidationErrorData = {
|
|
10
|
+
title?: string | undefined;
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
basePrice?: components.AmountDecimalValidationError | undefined;
|
|
13
|
+
images?:
|
|
14
|
+
| { [k: string]: components.AssignProductImageValidationError }
|
|
15
|
+
| undefined;
|
|
16
|
+
optionGroups?:
|
|
17
|
+
| { [k: string]: components.ProductOptionGroupValidationError }
|
|
18
|
+
| undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export class ProductRequestValidationError extends MoovError {
|
|
22
|
+
title?: string | undefined;
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
basePrice?: components.AmountDecimalValidationError | undefined;
|
|
25
|
+
images?:
|
|
26
|
+
| { [k: string]: components.AssignProductImageValidationError }
|
|
27
|
+
| undefined;
|
|
28
|
+
optionGroups?:
|
|
29
|
+
| { [k: string]: components.ProductOptionGroupValidationError }
|
|
30
|
+
| undefined;
|
|
31
|
+
|
|
32
|
+
/** The original data that was passed to this error instance. */
|
|
33
|
+
data$: ProductRequestValidationErrorData;
|
|
34
|
+
|
|
35
|
+
constructor(
|
|
36
|
+
err: ProductRequestValidationErrorData,
|
|
37
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
38
|
+
) {
|
|
39
|
+
const message = "message" in err && typeof err.message === "string"
|
|
40
|
+
? err.message
|
|
41
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
42
|
+
super(message, httpMeta);
|
|
43
|
+
this.data$ = err;
|
|
44
|
+
if (err.title != null) this.title = err.title;
|
|
45
|
+
if (err.description != null) this.description = err.description;
|
|
46
|
+
if (err.basePrice != null) this.basePrice = err.basePrice;
|
|
47
|
+
if (err.images != null) this.images = err.images;
|
|
48
|
+
if (err.optionGroups != null) this.optionGroups = err.optionGroups;
|
|
49
|
+
|
|
50
|
+
this.name = "ProductRequestValidationError";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const ProductRequestValidationError$inboundSchema: z.ZodType<
|
|
56
|
+
ProductRequestValidationError,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.object({
|
|
60
|
+
title: z.string().optional(),
|
|
61
|
+
description: z.string().optional(),
|
|
62
|
+
basePrice: components.AmountDecimalValidationError$inboundSchema.optional(),
|
|
63
|
+
images: z.record(components.AssignProductImageValidationError$inboundSchema)
|
|
64
|
+
.optional(),
|
|
65
|
+
optionGroups: z.record(
|
|
66
|
+
components.ProductOptionGroupValidationError$inboundSchema,
|
|
67
|
+
).optional(),
|
|
68
|
+
request$: z.instanceof(Request),
|
|
69
|
+
response$: z.instanceof(Response),
|
|
70
|
+
body$: z.string(),
|
|
71
|
+
})
|
|
72
|
+
.transform((v) => {
|
|
73
|
+
return new ProductRequestValidationError(v, {
|
|
74
|
+
request: v.request$,
|
|
75
|
+
response: v.response$,
|
|
76
|
+
body: v.body$,
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export type ProductRequestValidationError$Outbound = {
|
|
82
|
+
title?: string | undefined;
|
|
83
|
+
description?: string | undefined;
|
|
84
|
+
basePrice?: components.AmountDecimalValidationError$Outbound | undefined;
|
|
85
|
+
images?: {
|
|
86
|
+
[k: string]: components.AssignProductImageValidationError$Outbound;
|
|
87
|
+
} | undefined;
|
|
88
|
+
optionGroups?: {
|
|
89
|
+
[k: string]: components.ProductOptionGroupValidationError$Outbound;
|
|
90
|
+
} | undefined;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const ProductRequestValidationError$outboundSchema: z.ZodType<
|
|
95
|
+
ProductRequestValidationError$Outbound,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
ProductRequestValidationError
|
|
98
|
+
> = z.instanceof(ProductRequestValidationError)
|
|
99
|
+
.transform(v => v.data$)
|
|
100
|
+
.pipe(z.object({
|
|
101
|
+
title: z.string().optional(),
|
|
102
|
+
description: z.string().optional(),
|
|
103
|
+
basePrice: components.AmountDecimalValidationError$outboundSchema
|
|
104
|
+
.optional(),
|
|
105
|
+
images: z.record(
|
|
106
|
+
components.AssignProductImageValidationError$outboundSchema,
|
|
107
|
+
).optional(),
|
|
108
|
+
optionGroups: z.record(
|
|
109
|
+
components.ProductOptionGroupValidationError$outboundSchema,
|
|
110
|
+
).optional(),
|
|
111
|
+
}));
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
116
|
+
*/
|
|
117
|
+
export namespace ProductRequestValidationError$ {
|
|
118
|
+
/** @deprecated use `ProductRequestValidationError$inboundSchema` instead. */
|
|
119
|
+
export const inboundSchema = ProductRequestValidationError$inboundSchema;
|
|
120
|
+
/** @deprecated use `ProductRequestValidationError$outboundSchema` instead. */
|
|
121
|
+
export const outboundSchema = ProductRequestValidationError$outboundSchema;
|
|
122
|
+
/** @deprecated use `ProductRequestValidationError$Outbound` instead. */
|
|
123
|
+
export type Outbound = ProductRequestValidationError$Outbound;
|
|
124
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type CreateProductGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
*/
|
|
26
|
+
xMoovVersion?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type CreateProductRequest = {
|
|
30
|
+
accountID: string;
|
|
31
|
+
productRequest: components.ProductRequest;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type CreateProductResponse = {
|
|
35
|
+
headers: { [k: string]: Array<string> };
|
|
36
|
+
result: components.Product;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const CreateProductGlobals$inboundSchema: z.ZodType<
|
|
41
|
+
CreateProductGlobals,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
"x-moov-version": z.string().default("v2024.01.00"),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"x-moov-version": "xMoovVersion",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type CreateProductGlobals$Outbound = {
|
|
54
|
+
"x-moov-version": string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const CreateProductGlobals$outboundSchema: z.ZodType<
|
|
59
|
+
CreateProductGlobals$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
CreateProductGlobals
|
|
62
|
+
> = z.object({
|
|
63
|
+
xMoovVersion: z.string().default("v2024.01.00"),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
xMoovVersion: "x-moov-version",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
+
*/
|
|
74
|
+
export namespace CreateProductGlobals$ {
|
|
75
|
+
/** @deprecated use `CreateProductGlobals$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = CreateProductGlobals$inboundSchema;
|
|
77
|
+
/** @deprecated use `CreateProductGlobals$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = CreateProductGlobals$outboundSchema;
|
|
79
|
+
/** @deprecated use `CreateProductGlobals$Outbound` instead. */
|
|
80
|
+
export type Outbound = CreateProductGlobals$Outbound;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function createProductGlobalsToJSON(
|
|
84
|
+
createProductGlobals: CreateProductGlobals,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
CreateProductGlobals$outboundSchema.parse(createProductGlobals),
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function createProductGlobalsFromJSON(
|
|
92
|
+
jsonString: string,
|
|
93
|
+
): SafeParseResult<CreateProductGlobals, SDKValidationError> {
|
|
94
|
+
return safeParse(
|
|
95
|
+
jsonString,
|
|
96
|
+
(x) => CreateProductGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
+
`Failed to parse 'CreateProductGlobals' from JSON`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const CreateProductRequest$inboundSchema: z.ZodType<
|
|
103
|
+
CreateProductRequest,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
unknown
|
|
106
|
+
> = z.object({
|
|
107
|
+
accountID: z.string(),
|
|
108
|
+
ProductRequest: components.ProductRequest$inboundSchema,
|
|
109
|
+
}).transform((v) => {
|
|
110
|
+
return remap$(v, {
|
|
111
|
+
"ProductRequest": "productRequest",
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
export type CreateProductRequest$Outbound = {
|
|
117
|
+
accountID: string;
|
|
118
|
+
ProductRequest: components.ProductRequest$Outbound;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const CreateProductRequest$outboundSchema: z.ZodType<
|
|
123
|
+
CreateProductRequest$Outbound,
|
|
124
|
+
z.ZodTypeDef,
|
|
125
|
+
CreateProductRequest
|
|
126
|
+
> = z.object({
|
|
127
|
+
accountID: z.string(),
|
|
128
|
+
productRequest: components.ProductRequest$outboundSchema,
|
|
129
|
+
}).transform((v) => {
|
|
130
|
+
return remap$(v, {
|
|
131
|
+
productRequest: "ProductRequest",
|
|
132
|
+
});
|
|
133
|
+
});
|
|
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 CreateProductRequest$ {
|
|
140
|
+
/** @deprecated use `CreateProductRequest$inboundSchema` instead. */
|
|
141
|
+
export const inboundSchema = CreateProductRequest$inboundSchema;
|
|
142
|
+
/** @deprecated use `CreateProductRequest$outboundSchema` instead. */
|
|
143
|
+
export const outboundSchema = CreateProductRequest$outboundSchema;
|
|
144
|
+
/** @deprecated use `CreateProductRequest$Outbound` instead. */
|
|
145
|
+
export type Outbound = CreateProductRequest$Outbound;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function createProductRequestToJSON(
|
|
149
|
+
createProductRequest: CreateProductRequest,
|
|
150
|
+
): string {
|
|
151
|
+
return JSON.stringify(
|
|
152
|
+
CreateProductRequest$outboundSchema.parse(createProductRequest),
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function createProductRequestFromJSON(
|
|
157
|
+
jsonString: string,
|
|
158
|
+
): SafeParseResult<CreateProductRequest, SDKValidationError> {
|
|
159
|
+
return safeParse(
|
|
160
|
+
jsonString,
|
|
161
|
+
(x) => CreateProductRequest$inboundSchema.parse(JSON.parse(x)),
|
|
162
|
+
`Failed to parse 'CreateProductRequest' from JSON`,
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const CreateProductResponse$inboundSchema: z.ZodType<
|
|
168
|
+
CreateProductResponse,
|
|
169
|
+
z.ZodTypeDef,
|
|
170
|
+
unknown
|
|
171
|
+
> = z.object({
|
|
172
|
+
Headers: z.record(z.array(z.string())),
|
|
173
|
+
Result: components.Product$inboundSchema,
|
|
174
|
+
}).transform((v) => {
|
|
175
|
+
return remap$(v, {
|
|
176
|
+
"Headers": "headers",
|
|
177
|
+
"Result": "result",
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
/** @internal */
|
|
182
|
+
export type CreateProductResponse$Outbound = {
|
|
183
|
+
Headers: { [k: string]: Array<string> };
|
|
184
|
+
Result: components.Product$Outbound;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/** @internal */
|
|
188
|
+
export const CreateProductResponse$outboundSchema: z.ZodType<
|
|
189
|
+
CreateProductResponse$Outbound,
|
|
190
|
+
z.ZodTypeDef,
|
|
191
|
+
CreateProductResponse
|
|
192
|
+
> = z.object({
|
|
193
|
+
headers: z.record(z.array(z.string())),
|
|
194
|
+
result: components.Product$outboundSchema,
|
|
195
|
+
}).transform((v) => {
|
|
196
|
+
return remap$(v, {
|
|
197
|
+
headers: "Headers",
|
|
198
|
+
result: "Result",
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
205
|
+
*/
|
|
206
|
+
export namespace CreateProductResponse$ {
|
|
207
|
+
/** @deprecated use `CreateProductResponse$inboundSchema` instead. */
|
|
208
|
+
export const inboundSchema = CreateProductResponse$inboundSchema;
|
|
209
|
+
/** @deprecated use `CreateProductResponse$outboundSchema` instead. */
|
|
210
|
+
export const outboundSchema = CreateProductResponse$outboundSchema;
|
|
211
|
+
/** @deprecated use `CreateProductResponse$Outbound` instead. */
|
|
212
|
+
export type Outbound = CreateProductResponse$Outbound;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function createProductResponseToJSON(
|
|
216
|
+
createProductResponse: CreateProductResponse,
|
|
217
|
+
): string {
|
|
218
|
+
return JSON.stringify(
|
|
219
|
+
CreateProductResponse$outboundSchema.parse(createProductResponse),
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export function createProductResponseFromJSON(
|
|
224
|
+
jsonString: string,
|
|
225
|
+
): SafeParseResult<CreateProductResponse, SDKValidationError> {
|
|
226
|
+
return safeParse(
|
|
227
|
+
jsonString,
|
|
228
|
+
(x) => CreateProductResponse$inboundSchema.parse(JSON.parse(x)),
|
|
229
|
+
`Failed to parse 'CreateProductResponse' from JSON`,
|
|
230
|
+
);
|
|
231
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type DisableProductGlobals = {
|
|
12
|
+
/**
|
|
13
|
+
* Specify an API version.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
*
|
|
17
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
18
|
+
* - `YYYY` is the year
|
|
19
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
20
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
21
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
22
|
+
*
|
|
23
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
24
|
+
*/
|
|
25
|
+
xMoovVersion?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type DisableProductRequest = {
|
|
29
|
+
accountID: string;
|
|
30
|
+
productID: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type DisableProductResponse = {
|
|
34
|
+
headers: { [k: string]: Array<string> };
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const DisableProductGlobals$inboundSchema: z.ZodType<
|
|
39
|
+
DisableProductGlobals,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
"x-moov-version": z.string().default("v2024.01.00"),
|
|
44
|
+
}).transform((v) => {
|
|
45
|
+
return remap$(v, {
|
|
46
|
+
"x-moov-version": "xMoovVersion",
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type DisableProductGlobals$Outbound = {
|
|
52
|
+
"x-moov-version": string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const DisableProductGlobals$outboundSchema: z.ZodType<
|
|
57
|
+
DisableProductGlobals$Outbound,
|
|
58
|
+
z.ZodTypeDef,
|
|
59
|
+
DisableProductGlobals
|
|
60
|
+
> = z.object({
|
|
61
|
+
xMoovVersion: z.string().default("v2024.01.00"),
|
|
62
|
+
}).transform((v) => {
|
|
63
|
+
return remap$(v, {
|
|
64
|
+
xMoovVersion: "x-moov-version",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
71
|
+
*/
|
|
72
|
+
export namespace DisableProductGlobals$ {
|
|
73
|
+
/** @deprecated use `DisableProductGlobals$inboundSchema` instead. */
|
|
74
|
+
export const inboundSchema = DisableProductGlobals$inboundSchema;
|
|
75
|
+
/** @deprecated use `DisableProductGlobals$outboundSchema` instead. */
|
|
76
|
+
export const outboundSchema = DisableProductGlobals$outboundSchema;
|
|
77
|
+
/** @deprecated use `DisableProductGlobals$Outbound` instead. */
|
|
78
|
+
export type Outbound = DisableProductGlobals$Outbound;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function disableProductGlobalsToJSON(
|
|
82
|
+
disableProductGlobals: DisableProductGlobals,
|
|
83
|
+
): string {
|
|
84
|
+
return JSON.stringify(
|
|
85
|
+
DisableProductGlobals$outboundSchema.parse(disableProductGlobals),
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function disableProductGlobalsFromJSON(
|
|
90
|
+
jsonString: string,
|
|
91
|
+
): SafeParseResult<DisableProductGlobals, SDKValidationError> {
|
|
92
|
+
return safeParse(
|
|
93
|
+
jsonString,
|
|
94
|
+
(x) => DisableProductGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
95
|
+
`Failed to parse 'DisableProductGlobals' from JSON`,
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const DisableProductRequest$inboundSchema: z.ZodType<
|
|
101
|
+
DisableProductRequest,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
unknown
|
|
104
|
+
> = z.object({
|
|
105
|
+
accountID: z.string(),
|
|
106
|
+
productID: z.string(),
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export type DisableProductRequest$Outbound = {
|
|
111
|
+
accountID: string;
|
|
112
|
+
productID: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
export const DisableProductRequest$outboundSchema: z.ZodType<
|
|
117
|
+
DisableProductRequest$Outbound,
|
|
118
|
+
z.ZodTypeDef,
|
|
119
|
+
DisableProductRequest
|
|
120
|
+
> = z.object({
|
|
121
|
+
accountID: z.string(),
|
|
122
|
+
productID: z.string(),
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
128
|
+
*/
|
|
129
|
+
export namespace DisableProductRequest$ {
|
|
130
|
+
/** @deprecated use `DisableProductRequest$inboundSchema` instead. */
|
|
131
|
+
export const inboundSchema = DisableProductRequest$inboundSchema;
|
|
132
|
+
/** @deprecated use `DisableProductRequest$outboundSchema` instead. */
|
|
133
|
+
export const outboundSchema = DisableProductRequest$outboundSchema;
|
|
134
|
+
/** @deprecated use `DisableProductRequest$Outbound` instead. */
|
|
135
|
+
export type Outbound = DisableProductRequest$Outbound;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function disableProductRequestToJSON(
|
|
139
|
+
disableProductRequest: DisableProductRequest,
|
|
140
|
+
): string {
|
|
141
|
+
return JSON.stringify(
|
|
142
|
+
DisableProductRequest$outboundSchema.parse(disableProductRequest),
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function disableProductRequestFromJSON(
|
|
147
|
+
jsonString: string,
|
|
148
|
+
): SafeParseResult<DisableProductRequest, SDKValidationError> {
|
|
149
|
+
return safeParse(
|
|
150
|
+
jsonString,
|
|
151
|
+
(x) => DisableProductRequest$inboundSchema.parse(JSON.parse(x)),
|
|
152
|
+
`Failed to parse 'DisableProductRequest' from JSON`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** @internal */
|
|
157
|
+
export const DisableProductResponse$inboundSchema: z.ZodType<
|
|
158
|
+
DisableProductResponse,
|
|
159
|
+
z.ZodTypeDef,
|
|
160
|
+
unknown
|
|
161
|
+
> = z.object({
|
|
162
|
+
Headers: z.record(z.array(z.string())),
|
|
163
|
+
}).transform((v) => {
|
|
164
|
+
return remap$(v, {
|
|
165
|
+
"Headers": "headers",
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
/** @internal */
|
|
170
|
+
export type DisableProductResponse$Outbound = {
|
|
171
|
+
Headers: { [k: string]: Array<string> };
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const DisableProductResponse$outboundSchema: z.ZodType<
|
|
176
|
+
DisableProductResponse$Outbound,
|
|
177
|
+
z.ZodTypeDef,
|
|
178
|
+
DisableProductResponse
|
|
179
|
+
> = z.object({
|
|
180
|
+
headers: z.record(z.array(z.string())),
|
|
181
|
+
}).transform((v) => {
|
|
182
|
+
return remap$(v, {
|
|
183
|
+
headers: "Headers",
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @internal
|
|
189
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
190
|
+
*/
|
|
191
|
+
export namespace DisableProductResponse$ {
|
|
192
|
+
/** @deprecated use `DisableProductResponse$inboundSchema` instead. */
|
|
193
|
+
export const inboundSchema = DisableProductResponse$inboundSchema;
|
|
194
|
+
/** @deprecated use `DisableProductResponse$outboundSchema` instead. */
|
|
195
|
+
export const outboundSchema = DisableProductResponse$outboundSchema;
|
|
196
|
+
/** @deprecated use `DisableProductResponse$Outbound` instead. */
|
|
197
|
+
export type Outbound = DisableProductResponse$Outbound;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export function disableProductResponseToJSON(
|
|
201
|
+
disableProductResponse: DisableProductResponse,
|
|
202
|
+
): string {
|
|
203
|
+
return JSON.stringify(
|
|
204
|
+
DisableProductResponse$outboundSchema.parse(disableProductResponse),
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function disableProductResponseFromJSON(
|
|
209
|
+
jsonString: string,
|
|
210
|
+
): SafeParseResult<DisableProductResponse, SDKValidationError> {
|
|
211
|
+
return safeParse(
|
|
212
|
+
jsonString,
|
|
213
|
+
(x) => DisableProductResponse$inboundSchema.parse(JSON.parse(x)),
|
|
214
|
+
`Failed to parse 'DisableProductResponse' from JSON`,
|
|
215
|
+
);
|
|
216
|
+
}
|