@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,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
AssignProductImage,
|
|
11
|
+
AssignProductImage$inboundSchema,
|
|
12
|
+
AssignProductImage$Outbound,
|
|
13
|
+
AssignProductImage$outboundSchema,
|
|
14
|
+
} from "./assignproductimage.js";
|
|
15
|
+
|
|
16
|
+
export type CreateProductOption = {
|
|
17
|
+
/**
|
|
18
|
+
* The display name of a product option.
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* A detailed description of the option.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
*
|
|
26
|
+
* - Must be valid UTF-8 text
|
|
27
|
+
* - Supports Markdown for formatting
|
|
28
|
+
* - HTML is not permitted and will be rejected
|
|
29
|
+
*/
|
|
30
|
+
description?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The adjustment applied to a product's base price by this option. Can be negative, positive, or zero.
|
|
33
|
+
*/
|
|
34
|
+
priceModifier?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Assign previously uploaded images to a product or option.
|
|
37
|
+
*/
|
|
38
|
+
images?: Array<AssignProductImage> | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const CreateProductOption$inboundSchema: z.ZodType<
|
|
43
|
+
CreateProductOption,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.object({
|
|
47
|
+
name: z.string(),
|
|
48
|
+
description: z.string().optional(),
|
|
49
|
+
priceModifier: z.string().optional(),
|
|
50
|
+
images: z.array(AssignProductImage$inboundSchema).optional(),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type CreateProductOption$Outbound = {
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string | undefined;
|
|
57
|
+
priceModifier?: string | undefined;
|
|
58
|
+
images?: Array<AssignProductImage$Outbound> | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const CreateProductOption$outboundSchema: z.ZodType<
|
|
63
|
+
CreateProductOption$Outbound,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
CreateProductOption
|
|
66
|
+
> = z.object({
|
|
67
|
+
name: z.string(),
|
|
68
|
+
description: z.string().optional(),
|
|
69
|
+
priceModifier: z.string().optional(),
|
|
70
|
+
images: z.array(AssignProductImage$outboundSchema).optional(),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
|
+
*/
|
|
77
|
+
export namespace CreateProductOption$ {
|
|
78
|
+
/** @deprecated use `CreateProductOption$inboundSchema` instead. */
|
|
79
|
+
export const inboundSchema = CreateProductOption$inboundSchema;
|
|
80
|
+
/** @deprecated use `CreateProductOption$outboundSchema` instead. */
|
|
81
|
+
export const outboundSchema = CreateProductOption$outboundSchema;
|
|
82
|
+
/** @deprecated use `CreateProductOption$Outbound` instead. */
|
|
83
|
+
export type Outbound = CreateProductOption$Outbound;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function createProductOptionToJSON(
|
|
87
|
+
createProductOption: CreateProductOption,
|
|
88
|
+
): string {
|
|
89
|
+
return JSON.stringify(
|
|
90
|
+
CreateProductOption$outboundSchema.parse(createProductOption),
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function createProductOptionFromJSON(
|
|
95
|
+
jsonString: string,
|
|
96
|
+
): SafeParseResult<CreateProductOption, SDKValidationError> {
|
|
97
|
+
return safeParse(
|
|
98
|
+
jsonString,
|
|
99
|
+
(x) => CreateProductOption$inboundSchema.parse(JSON.parse(x)),
|
|
100
|
+
`Failed to parse 'CreateProductOption' from JSON`,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
CreateProductOption,
|
|
11
|
+
CreateProductOption$inboundSchema,
|
|
12
|
+
CreateProductOption$Outbound,
|
|
13
|
+
CreateProductOption$outboundSchema,
|
|
14
|
+
} from "./createproductoption.js";
|
|
15
|
+
|
|
16
|
+
export type CreateProductOptionGroup = {
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* A detailed description of the option group.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*
|
|
23
|
+
* - Must be valid UTF-8 text
|
|
24
|
+
* - Supports Markdown for formatting
|
|
25
|
+
* - HTML is not permitted and will be rejected
|
|
26
|
+
*/
|
|
27
|
+
description?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The minimum number of options that must be selected from this group.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
*
|
|
33
|
+
* A value of 0 indicates that no selection from this group is required.
|
|
34
|
+
*/
|
|
35
|
+
minSelect: number;
|
|
36
|
+
/**
|
|
37
|
+
* The maximum number of options that can be selected from this group.
|
|
38
|
+
*/
|
|
39
|
+
maxSelect: number;
|
|
40
|
+
/**
|
|
41
|
+
* The options available within this group.
|
|
42
|
+
*/
|
|
43
|
+
options: Array<CreateProductOption>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const CreateProductOptionGroup$inboundSchema: z.ZodType<
|
|
48
|
+
CreateProductOptionGroup,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
name: z.string(),
|
|
53
|
+
description: z.string().optional(),
|
|
54
|
+
minSelect: z.number().int(),
|
|
55
|
+
maxSelect: z.number().int(),
|
|
56
|
+
options: z.array(CreateProductOption$inboundSchema),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type CreateProductOptionGroup$Outbound = {
|
|
61
|
+
name: string;
|
|
62
|
+
description?: string | undefined;
|
|
63
|
+
minSelect: number;
|
|
64
|
+
maxSelect: number;
|
|
65
|
+
options: Array<CreateProductOption$Outbound>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const CreateProductOptionGroup$outboundSchema: z.ZodType<
|
|
70
|
+
CreateProductOptionGroup$Outbound,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
CreateProductOptionGroup
|
|
73
|
+
> = z.object({
|
|
74
|
+
name: z.string(),
|
|
75
|
+
description: z.string().optional(),
|
|
76
|
+
minSelect: z.number().int(),
|
|
77
|
+
maxSelect: z.number().int(),
|
|
78
|
+
options: z.array(CreateProductOption$outboundSchema),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
84
|
+
*/
|
|
85
|
+
export namespace CreateProductOptionGroup$ {
|
|
86
|
+
/** @deprecated use `CreateProductOptionGroup$inboundSchema` instead. */
|
|
87
|
+
export const inboundSchema = CreateProductOptionGroup$inboundSchema;
|
|
88
|
+
/** @deprecated use `CreateProductOptionGroup$outboundSchema` instead. */
|
|
89
|
+
export const outboundSchema = CreateProductOptionGroup$outboundSchema;
|
|
90
|
+
/** @deprecated use `CreateProductOptionGroup$Outbound` instead. */
|
|
91
|
+
export type Outbound = CreateProductOptionGroup$Outbound;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function createProductOptionGroupToJSON(
|
|
95
|
+
createProductOptionGroup: CreateProductOptionGroup,
|
|
96
|
+
): string {
|
|
97
|
+
return JSON.stringify(
|
|
98
|
+
CreateProductOptionGroup$outboundSchema.parse(createProductOptionGroup),
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function createProductOptionGroupFromJSON(
|
|
103
|
+
jsonString: string,
|
|
104
|
+
): SafeParseResult<CreateProductOptionGroup, SDKValidationError> {
|
|
105
|
+
return safeParse(
|
|
106
|
+
jsonString,
|
|
107
|
+
(x) => CreateProductOptionGroup$inboundSchema.parse(JSON.parse(x)),
|
|
108
|
+
`Failed to parse 'CreateProductOptionGroup' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
AmountDecimal$Outbound,
|
|
13
13
|
AmountDecimal$outboundSchema,
|
|
14
14
|
} from "./amountdecimal.js";
|
|
15
|
+
import {
|
|
16
|
+
VolumeRange,
|
|
17
|
+
VolumeRange$inboundSchema,
|
|
18
|
+
VolumeRange$Outbound,
|
|
19
|
+
VolumeRange$outboundSchema,
|
|
20
|
+
} from "./volumerange.js";
|
|
15
21
|
|
|
16
22
|
/**
|
|
17
23
|
* Defines the specific parameters used for fee calculation.
|
|
@@ -37,6 +43,10 @@ export type FeeProperties = {
|
|
|
37
43
|
* Specifies the maximum allowable spending for a single transaction, working as a transaction ceiling.
|
|
38
44
|
*/
|
|
39
45
|
maxPerTransaction?: AmountDecimal | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Defines the volume ranges for tiered pricing models.
|
|
48
|
+
*/
|
|
49
|
+
volumeRanges: Array<VolumeRange>;
|
|
40
50
|
};
|
|
41
51
|
|
|
42
52
|
/** @internal */
|
|
@@ -49,6 +59,7 @@ export const FeeProperties$inboundSchema: z.ZodType<
|
|
|
49
59
|
variableRate: z.string().optional(),
|
|
50
60
|
minPerTransaction: AmountDecimal$inboundSchema.optional(),
|
|
51
61
|
maxPerTransaction: AmountDecimal$inboundSchema.optional(),
|
|
62
|
+
volumeRanges: z.array(VolumeRange$inboundSchema),
|
|
52
63
|
});
|
|
53
64
|
|
|
54
65
|
/** @internal */
|
|
@@ -57,6 +68,7 @@ export type FeeProperties$Outbound = {
|
|
|
57
68
|
variableRate?: string | undefined;
|
|
58
69
|
minPerTransaction?: AmountDecimal$Outbound | undefined;
|
|
59
70
|
maxPerTransaction?: AmountDecimal$Outbound | undefined;
|
|
71
|
+
volumeRanges: Array<VolumeRange$Outbound>;
|
|
60
72
|
};
|
|
61
73
|
|
|
62
74
|
/** @internal */
|
|
@@ -69,6 +81,7 @@ export const FeeProperties$outboundSchema: z.ZodType<
|
|
|
69
81
|
variableRate: z.string().optional(),
|
|
70
82
|
minPerTransaction: AmountDecimal$outboundSchema.optional(),
|
|
71
83
|
maxPerTransaction: AmountDecimal$outboundSchema.optional(),
|
|
84
|
+
volumeRanges: z.array(VolumeRange$outboundSchema),
|
|
72
85
|
});
|
|
73
86
|
|
|
74
87
|
/**
|
|
@@ -32,6 +32,7 @@ export * from "./addressupdate.js";
|
|
|
32
32
|
export * from "./adjustment.js";
|
|
33
33
|
export * from "./amount.js";
|
|
34
34
|
export * from "./amountdecimal.js";
|
|
35
|
+
export * from "./amountdecimalvalidationerror.js";
|
|
35
36
|
export * from "./amountupdate.js";
|
|
36
37
|
export * from "./amountvalidationerror.js";
|
|
37
38
|
export * from "./applebillingcontact.js";
|
|
@@ -40,6 +41,8 @@ export * from "./applepaymerchantdomains.js";
|
|
|
40
41
|
export * from "./applepaypaymentmethod.js";
|
|
41
42
|
export * from "./applepayresponse.js";
|
|
42
43
|
export * from "./applicationscope.js";
|
|
44
|
+
export * from "./assignproductimage.js";
|
|
45
|
+
export * from "./assignproductimagevalidationerror.js";
|
|
43
46
|
export * from "./asynccreatedrefund.js";
|
|
44
47
|
export * from "./asynctransfer.js";
|
|
45
48
|
export * from "./authorizeduser.js";
|
|
@@ -139,6 +142,8 @@ export * from "./createfeeplanagreement.js";
|
|
|
139
142
|
export * from "./createindividualerror.js";
|
|
140
143
|
export * from "./createindividualprofile.js";
|
|
141
144
|
export * from "./createpaymentlink.js";
|
|
145
|
+
export * from "./createproductoption.js";
|
|
146
|
+
export * from "./createproductoptiongroup.js";
|
|
142
147
|
export * from "./createprofile.js";
|
|
143
148
|
export * from "./createprofileerror.js";
|
|
144
149
|
export * from "./createrefund.js";
|
|
@@ -317,6 +322,13 @@ export * from "./plaidlinkpayload.js";
|
|
|
317
322
|
export * from "./plaidpayload.js";
|
|
318
323
|
export * from "./platformfees.js";
|
|
319
324
|
export * from "./primaryregulator.js";
|
|
325
|
+
export * from "./product.js";
|
|
326
|
+
export * from "./productimagemetadata.js";
|
|
327
|
+
export * from "./productoption.js";
|
|
328
|
+
export * from "./productoptiongroup.js";
|
|
329
|
+
export * from "./productoptiongroupvalidationerror.js";
|
|
330
|
+
export * from "./productoptionvalidationerror.js";
|
|
331
|
+
export * from "./productrequest.js";
|
|
320
332
|
export * from "./profile.js";
|
|
321
333
|
export * from "./pullfromcardpaymentmethod.js";
|
|
322
334
|
export * from "./pushtocardpaymentmethod.js";
|
|
@@ -426,6 +438,7 @@ export * from "./verificationstatus.js";
|
|
|
426
438
|
export * from "./verificationstatusdetail.js";
|
|
427
439
|
export * from "./volumebycustomertype.js";
|
|
428
440
|
export * from "./volumebycustomertypeerror.js";
|
|
441
|
+
export * from "./volumerange.js";
|
|
429
442
|
export * from "./volumesharebycustomertype.js";
|
|
430
443
|
export * from "./volumesharebycustomertypeerror.js";
|
|
431
444
|
export * from "./wallet.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
export type PartnerPricing = {
|
|
34
34
|
planID: string;
|
|
35
35
|
/**
|
|
36
|
-
* The name of the
|
|
36
|
+
* The name of the partner pricing plan.
|
|
37
37
|
*/
|
|
38
38
|
name: string;
|
|
39
39
|
/**
|
|
@@ -41,9 +41,13 @@ export type PartnerPricing = {
|
|
|
41
41
|
*/
|
|
42
42
|
description?: string | undefined;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* The decimal-formatted numerical string of the revenue split for partner.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
*
|
|
48
|
+
* For example, 2.25% is '2.25'.
|
|
45
49
|
*/
|
|
46
|
-
revenueShare:
|
|
50
|
+
revenueShare: string;
|
|
47
51
|
/**
|
|
48
52
|
* Specifies the card processing pricing model
|
|
49
53
|
*/
|
|
@@ -69,7 +73,7 @@ export const PartnerPricing$inboundSchema: z.ZodType<
|
|
|
69
73
|
planID: z.string(),
|
|
70
74
|
name: z.string(),
|
|
71
75
|
description: z.string().optional(),
|
|
72
|
-
revenueShare: z.
|
|
76
|
+
revenueShare: z.string(),
|
|
73
77
|
cardAcquiringModel: CardAcquiringModel$inboundSchema,
|
|
74
78
|
billableFees: z.array(BillableFee$inboundSchema),
|
|
75
79
|
minimumCommitment: MinimumCommitment$inboundSchema,
|
|
@@ -82,7 +86,7 @@ export type PartnerPricing$Outbound = {
|
|
|
82
86
|
planID: string;
|
|
83
87
|
name: string;
|
|
84
88
|
description?: string | undefined;
|
|
85
|
-
revenueShare:
|
|
89
|
+
revenueShare: string;
|
|
86
90
|
cardAcquiringModel: string;
|
|
87
91
|
billableFees: Array<BillableFee$Outbound>;
|
|
88
92
|
minimumCommitment: MinimumCommitment$Outbound;
|
|
@@ -99,7 +103,7 @@ export const PartnerPricing$outboundSchema: z.ZodType<
|
|
|
99
103
|
planID: z.string(),
|
|
100
104
|
name: z.string(),
|
|
101
105
|
description: z.string().optional(),
|
|
102
|
-
revenueShare: z.
|
|
106
|
+
revenueShare: z.string(),
|
|
103
107
|
cardAcquiringModel: CardAcquiringModel$outboundSchema,
|
|
104
108
|
billableFees: z.array(BillableFee$outboundSchema),
|
|
105
109
|
minimumCommitment: MinimumCommitment$outboundSchema,
|
|
@@ -63,9 +63,13 @@ export type PartnerPricingAgreement = {
|
|
|
63
63
|
*/
|
|
64
64
|
monthlyPlatformFee: MonthlyPlatformFee;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* The decimal-formatted numerical string of the revenue split for partner.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
*
|
|
70
|
+
* For example, 2.25% is '2.25'.
|
|
67
71
|
*/
|
|
68
|
-
revenueShare:
|
|
72
|
+
revenueShare: string;
|
|
69
73
|
};
|
|
70
74
|
|
|
71
75
|
/** @internal */
|
|
@@ -85,7 +89,7 @@ export const PartnerPricingAgreement$inboundSchema: z.ZodType<
|
|
|
85
89
|
billableFees: z.array(BillableFee$inboundSchema),
|
|
86
90
|
minimumCommitment: MinimumCommitment$inboundSchema,
|
|
87
91
|
monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
|
|
88
|
-
revenueShare: z.
|
|
92
|
+
revenueShare: z.string(),
|
|
89
93
|
});
|
|
90
94
|
|
|
91
95
|
/** @internal */
|
|
@@ -101,7 +105,7 @@ export type PartnerPricingAgreement$Outbound = {
|
|
|
101
105
|
billableFees: Array<BillableFee$Outbound>;
|
|
102
106
|
minimumCommitment: MinimumCommitment$Outbound;
|
|
103
107
|
monthlyPlatformFee: MonthlyPlatformFee$Outbound;
|
|
104
|
-
revenueShare:
|
|
108
|
+
revenueShare: string;
|
|
105
109
|
};
|
|
106
110
|
|
|
107
111
|
/** @internal */
|
|
@@ -121,7 +125,7 @@ export const PartnerPricingAgreement$outboundSchema: z.ZodType<
|
|
|
121
125
|
billableFees: z.array(BillableFee$outboundSchema),
|
|
122
126
|
minimumCommitment: MinimumCommitment$outboundSchema,
|
|
123
127
|
monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
|
|
124
|
-
revenueShare: z.
|
|
128
|
+
revenueShare: z.string(),
|
|
125
129
|
});
|
|
126
130
|
|
|
127
131
|
/**
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
AmountDecimal,
|
|
11
|
+
AmountDecimal$inboundSchema,
|
|
12
|
+
AmountDecimal$Outbound,
|
|
13
|
+
AmountDecimal$outboundSchema,
|
|
14
|
+
} from "./amountdecimal.js";
|
|
15
|
+
import {
|
|
16
|
+
ProductImageMetadata,
|
|
17
|
+
ProductImageMetadata$inboundSchema,
|
|
18
|
+
ProductImageMetadata$Outbound,
|
|
19
|
+
ProductImageMetadata$outboundSchema,
|
|
20
|
+
} from "./productimagemetadata.js";
|
|
21
|
+
import {
|
|
22
|
+
ProductOptionGroup,
|
|
23
|
+
ProductOptionGroup$inboundSchema,
|
|
24
|
+
ProductOptionGroup$Outbound,
|
|
25
|
+
ProductOptionGroup$outboundSchema,
|
|
26
|
+
} from "./productoptiongroup.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A product available for purchase, which may have optional configuration options.
|
|
30
|
+
*/
|
|
31
|
+
export type Product = {
|
|
32
|
+
/**
|
|
33
|
+
* Unique identifier for a product.
|
|
34
|
+
*/
|
|
35
|
+
productID: string;
|
|
36
|
+
title: string;
|
|
37
|
+
/**
|
|
38
|
+
* A detailed description of the product.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*
|
|
42
|
+
* - Must be valid UTF-8 text
|
|
43
|
+
* - Supports Markdown for formatting
|
|
44
|
+
* - HTML is not permitted and will be rejected
|
|
45
|
+
*/
|
|
46
|
+
description?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* A product's starting price, before applying modifiers.
|
|
49
|
+
*/
|
|
50
|
+
basePrice: AmountDecimal;
|
|
51
|
+
/**
|
|
52
|
+
* Optional configuration options for a product, such as size or color.
|
|
53
|
+
*/
|
|
54
|
+
optionGroups?: Array<ProductOptionGroup> | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Optional images associated with the product.
|
|
57
|
+
*/
|
|
58
|
+
images?: Array<ProductImageMetadata> | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* The date and time when the product was added.
|
|
61
|
+
*/
|
|
62
|
+
createdOn: Date;
|
|
63
|
+
/**
|
|
64
|
+
* The date and time when the product was last updated.
|
|
65
|
+
*/
|
|
66
|
+
updatedOn: Date;
|
|
67
|
+
/**
|
|
68
|
+
* The date and time when the product was disabled.
|
|
69
|
+
*/
|
|
70
|
+
disabledOn?: Date | undefined;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
75
|
+
z.object({
|
|
76
|
+
productID: z.string(),
|
|
77
|
+
title: z.string(),
|
|
78
|
+
description: z.string().optional(),
|
|
79
|
+
basePrice: AmountDecimal$inboundSchema,
|
|
80
|
+
optionGroups: z.array(ProductOptionGroup$inboundSchema).optional(),
|
|
81
|
+
images: z.array(ProductImageMetadata$inboundSchema).optional(),
|
|
82
|
+
createdOn: z.string().datetime({ offset: true }).transform(v =>
|
|
83
|
+
new Date(v)
|
|
84
|
+
),
|
|
85
|
+
updatedOn: z.string().datetime({ offset: true }).transform(v =>
|
|
86
|
+
new Date(v)
|
|
87
|
+
),
|
|
88
|
+
disabledOn: z.string().datetime({ offset: true }).transform(v =>
|
|
89
|
+
new Date(v)
|
|
90
|
+
).optional(),
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export type Product$Outbound = {
|
|
95
|
+
productID: string;
|
|
96
|
+
title: string;
|
|
97
|
+
description?: string | undefined;
|
|
98
|
+
basePrice: AmountDecimal$Outbound;
|
|
99
|
+
optionGroups?: Array<ProductOptionGroup$Outbound> | undefined;
|
|
100
|
+
images?: Array<ProductImageMetadata$Outbound> | undefined;
|
|
101
|
+
createdOn: string;
|
|
102
|
+
updatedOn: string;
|
|
103
|
+
disabledOn?: string | undefined;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export const Product$outboundSchema: z.ZodType<
|
|
108
|
+
Product$Outbound,
|
|
109
|
+
z.ZodTypeDef,
|
|
110
|
+
Product
|
|
111
|
+
> = z.object({
|
|
112
|
+
productID: z.string(),
|
|
113
|
+
title: z.string(),
|
|
114
|
+
description: z.string().optional(),
|
|
115
|
+
basePrice: AmountDecimal$outboundSchema,
|
|
116
|
+
optionGroups: z.array(ProductOptionGroup$outboundSchema).optional(),
|
|
117
|
+
images: z.array(ProductImageMetadata$outboundSchema).optional(),
|
|
118
|
+
createdOn: z.date().transform(v => v.toISOString()),
|
|
119
|
+
updatedOn: z.date().transform(v => v.toISOString()),
|
|
120
|
+
disabledOn: z.date().transform(v => v.toISOString()).optional(),
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @internal
|
|
125
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
126
|
+
*/
|
|
127
|
+
export namespace Product$ {
|
|
128
|
+
/** @deprecated use `Product$inboundSchema` instead. */
|
|
129
|
+
export const inboundSchema = Product$inboundSchema;
|
|
130
|
+
/** @deprecated use `Product$outboundSchema` instead. */
|
|
131
|
+
export const outboundSchema = Product$outboundSchema;
|
|
132
|
+
/** @deprecated use `Product$Outbound` instead. */
|
|
133
|
+
export type Outbound = Product$Outbound;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function productToJSON(product: Product): string {
|
|
137
|
+
return JSON.stringify(Product$outboundSchema.parse(product));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function productFromJSON(
|
|
141
|
+
jsonString: string,
|
|
142
|
+
): SafeParseResult<Product, SDKValidationError> {
|
|
143
|
+
return safeParse(
|
|
144
|
+
jsonString,
|
|
145
|
+
(x) => Product$inboundSchema.parse(JSON.parse(x)),
|
|
146
|
+
`Failed to parse 'Product' from JSON`,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type ProductImageMetadata = {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for a product or product option image resource.
|
|
13
|
+
*/
|
|
14
|
+
imageID: string;
|
|
15
|
+
/**
|
|
16
|
+
* Alternative text for the image.
|
|
17
|
+
*/
|
|
18
|
+
altText?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The image's public URL.
|
|
21
|
+
*/
|
|
22
|
+
link: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ProductImageMetadata$inboundSchema: z.ZodType<
|
|
27
|
+
ProductImageMetadata,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
imageID: z.string(),
|
|
32
|
+
altText: z.string().optional(),
|
|
33
|
+
link: z.string(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type ProductImageMetadata$Outbound = {
|
|
38
|
+
imageID: string;
|
|
39
|
+
altText?: string | undefined;
|
|
40
|
+
link: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const ProductImageMetadata$outboundSchema: z.ZodType<
|
|
45
|
+
ProductImageMetadata$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
ProductImageMetadata
|
|
48
|
+
> = z.object({
|
|
49
|
+
imageID: z.string(),
|
|
50
|
+
altText: z.string().optional(),
|
|
51
|
+
link: z.string(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace ProductImageMetadata$ {
|
|
59
|
+
/** @deprecated use `ProductImageMetadata$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema = ProductImageMetadata$inboundSchema;
|
|
61
|
+
/** @deprecated use `ProductImageMetadata$outboundSchema` instead. */
|
|
62
|
+
export const outboundSchema = ProductImageMetadata$outboundSchema;
|
|
63
|
+
/** @deprecated use `ProductImageMetadata$Outbound` instead. */
|
|
64
|
+
export type Outbound = ProductImageMetadata$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function productImageMetadataToJSON(
|
|
68
|
+
productImageMetadata: ProductImageMetadata,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
ProductImageMetadata$outboundSchema.parse(productImageMetadata),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function productImageMetadataFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<ProductImageMetadata, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => ProductImageMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'ProductImageMetadata' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|