@moovio/sdk 26.10.0-dev.0 → 26.10.0-dev.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.
- package/README.md +121 -59
- package/bin/mcp-server.js +512 -185
- package/bin/mcp-server.js.map +32 -22
- package/funcs/avatarsDelete.d.ts +23 -0
- package/funcs/avatarsDelete.d.ts.map +1 -0
- package/funcs/avatarsDelete.js +135 -0
- package/funcs/avatarsDelete.js.map +1 -0
- package/funcs/avatarsUpload.d.ts +23 -0
- package/funcs/avatarsUpload.d.ts.map +1 -0
- package/funcs/avatarsUpload.js +155 -0
- package/funcs/avatarsUpload.js.map +1 -0
- package/funcs/productsList.js +1 -0
- package/funcs/productsList.js.map +1 -1
- package/funcs/productsListCategories.d.ts +14 -0
- package/funcs/productsListCategories.d.ts.map +1 -0
- package/funcs/productsListCategories.js +107 -0
- package/funcs/productsListCategories.js.map +1 -0
- package/hooks/oauth2scopes.d.ts +5 -0
- package/hooks/oauth2scopes.d.ts.map +1 -0
- package/hooks/oauth2scopes.js +6 -0
- package/hooks/oauth2scopes.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/productsListCategories.d.ts +3 -0
- package/mcp-server/tools/productsListCategories.d.ts.map +1 -0
- package/mcp-server/tools/productsListCategories.js +24 -0
- package/mcp-server/tools/productsListCategories.js.map +1 -0
- package/models/components/avataruploadrequest.d.ts +35 -0
- package/models/components/avataruploadrequest.d.ts.map +1 -0
- package/models/components/avataruploadrequest.js +88 -0
- package/models/components/avataruploadrequest.js.map +1 -0
- package/models/components/capabilityid.d.ts +1 -0
- package/models/components/capabilityid.d.ts.map +1 -1
- package/models/components/capabilityid.js +1 -0
- package/models/components/capabilityid.js.map +1 -1
- package/models/components/createtransfer.d.ts +6 -0
- package/models/components/createtransfer.d.ts.map +1 -1
- package/models/components/createtransfer.js +3 -0
- package/models/components/createtransfer.js.map +1 -1
- package/models/components/feepaidby.d.ts +18 -0
- package/models/components/feepaidby.d.ts.map +1 -0
- package/models/components/feepaidby.js +52 -0
- package/models/components/feepaidby.js.map +1 -0
- package/models/components/incurredfee.d.ts +6 -0
- package/models/components/incurredfee.d.ts.map +1 -1
- package/models/components/incurredfee.js +3 -0
- package/models/components/incurredfee.js.map +1 -1
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -0
- package/models/components/index.js.map +1 -1
- package/models/components/issuingintervallimit.d.ts +2 -2
- package/models/components/issuingintervallimit.js +1 -1
- package/models/components/issuingvelocitylimit.d.ts +1 -1
- package/models/components/paymentlinkpayoutdetails.d.ts +14 -0
- package/models/components/paymentlinkpayoutdetails.d.ts.map +1 -1
- package/models/components/paymentlinkpayoutdetails.js +3 -0
- package/models/components/paymentlinkpayoutdetails.js.map +1 -1
- package/models/components/paymentlinkpayoutdetailsupdate.d.ts +14 -0
- package/models/components/paymentlinkpayoutdetailsupdate.d.ts.map +1 -1
- package/models/components/paymentlinkpayoutdetailsupdate.js +3 -0
- package/models/components/paymentlinkpayoutdetailsupdate.js.map +1 -1
- package/models/components/payoutdetailserror.d.ts +2 -0
- package/models/components/payoutdetailserror.d.ts.map +1 -1
- package/models/components/payoutdetailserror.js +2 -0
- package/models/components/payoutdetailserror.js.map +1 -1
- package/models/components/product.d.ts +6 -0
- package/models/components/product.d.ts.map +1 -1
- package/models/components/product.js +3 -0
- package/models/components/product.js.map +1 -1
- package/models/components/productcategories.d.ts +21 -0
- package/models/components/productcategories.d.ts.map +1 -0
- package/models/components/productcategories.js +59 -0
- package/models/components/productcategories.js.map +1 -0
- package/models/components/productcategory.d.ts +43 -0
- package/models/components/productcategory.d.ts.map +1 -0
- package/models/components/productcategory.js +67 -0
- package/models/components/productcategory.js.map +1 -0
- package/models/components/productrequest.d.ts +5 -0
- package/models/components/productrequest.d.ts.map +1 -1
- package/models/components/productrequest.js +2 -0
- package/models/components/productrequest.js.map +1 -1
- package/models/components/transferfeepaidby.d.ts +24 -0
- package/models/components/transferfeepaidby.d.ts.map +1 -0
- package/models/components/transferfeepaidby.js +60 -0
- package/models/components/transferfeepaidby.js.map +1 -0
- package/models/errors/productrequestvalidationerror.d.ts +3 -0
- package/models/errors/productrequestvalidationerror.d.ts.map +1 -1
- package/models/errors/productrequestvalidationerror.js +4 -0
- package/models/errors/productrequestvalidationerror.js.map +1 -1
- package/models/operations/deleteavatar.d.ts +52 -0
- package/models/operations/deleteavatar.d.ts.map +1 -0
- package/models/operations/deleteavatar.js +102 -0
- package/models/operations/deleteavatar.js.map +1 -0
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listproductcategories.d.ts +24 -0
- package/models/operations/listproductcategories.d.ts.map +1 -0
- package/models/operations/listproductcategories.js +72 -0
- package/models/operations/listproductcategories.js.map +1 -0
- package/models/operations/listproducts.d.ts +9 -0
- package/models/operations/listproducts.d.ts.map +1 -1
- package/models/operations/listproducts.js +2 -0
- package/models/operations/listproducts.js.map +1 -1
- package/models/operations/uploadavatar.d.ts +55 -0
- package/models/operations/uploadavatar.d.ts.map +1 -0
- package/models/operations/uploadavatar.js +113 -0
- package/models/operations/uploadavatar.js.map +1 -0
- package/package.json +1 -1
- package/sdk/avatars.d.ts +24 -0
- package/sdk/avatars.d.ts.map +1 -1
- package/sdk/avatars.js +30 -0
- package/sdk/avatars.js.map +1 -1
- package/sdk/products.d.ts +4 -0
- package/sdk/products.d.ts.map +1 -1
- package/sdk/products.js +7 -0
- package/sdk/products.js.map +1 -1
- package/src/funcs/avatarsDelete.ts +194 -0
- package/src/funcs/avatarsUpload.ts +231 -0
- package/src/funcs/productsList.ts +1 -0
- package/src/funcs/productsListCategories.ts +149 -0
- package/src/hooks/oauth2scopes.ts +8 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/productsListCategories.ts +29 -0
- package/src/models/components/avataruploadrequest.ts +113 -0
- package/src/models/components/capabilityid.ts +1 -0
- package/src/models/components/createtransfer.ts +13 -0
- package/src/models/components/feepaidby.ts +32 -0
- package/src/models/components/incurredfee.ts +12 -0
- package/src/models/components/index.ts +5 -0
- package/src/models/components/issuingintervallimit.ts +2 -2
- package/src/models/components/issuingvelocitylimit.ts +1 -1
- package/src/models/components/paymentlinkpayoutdetails.ts +16 -0
- package/src/models/components/paymentlinkpayoutdetailsupdate.ts +16 -0
- package/src/models/components/payoutdetailserror.ts +4 -0
- package/src/models/components/product.ts +13 -0
- package/src/models/components/productcategories.ts +60 -0
- package/src/models/components/productcategory.ts +84 -0
- package/src/models/components/productrequest.ts +7 -0
- package/src/models/components/transferfeepaidby.ts +63 -0
- package/src/models/errors/productrequestvalidationerror.ts +6 -0
- package/src/models/operations/deleteavatar.ts +154 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/listproductcategories.ts +69 -0
- package/src/models/operations/listproducts.ts +11 -0
- package/src/models/operations/uploadavatar.ts +167 -0
- package/src/sdk/avatars.ts +50 -0
- package/src/sdk/products.ts +13 -0
|
@@ -13,6 +13,11 @@ import {
|
|
|
13
13
|
AmountDecimal$Outbound,
|
|
14
14
|
AmountDecimal$outboundSchema,
|
|
15
15
|
} from "./amountdecimal.js";
|
|
16
|
+
import {
|
|
17
|
+
FeePaidBy,
|
|
18
|
+
FeePaidBy$inboundSchema,
|
|
19
|
+
FeePaidBy$outboundSchema,
|
|
20
|
+
} from "./feepaidby.js";
|
|
16
21
|
import {
|
|
17
22
|
GeneratedBy,
|
|
18
23
|
GeneratedBy$inboundSchema,
|
|
@@ -60,6 +65,10 @@ export type IncurredFee = {
|
|
|
60
65
|
* Unique identifier for this residual payment calculation.
|
|
61
66
|
*/
|
|
62
67
|
residualID?: string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Indicates which party to the money movement bore this fee.
|
|
70
|
+
*/
|
|
71
|
+
feePaidBy?: FeePaidBy | undefined;
|
|
63
72
|
};
|
|
64
73
|
|
|
65
74
|
/** @internal */
|
|
@@ -77,6 +86,7 @@ export const IncurredFee$inboundSchema: z.ZodType<
|
|
|
77
86
|
generatedBy: types.optional(GeneratedBy$inboundSchema),
|
|
78
87
|
feeGroup: types.optional(types.string()),
|
|
79
88
|
residualID: types.optional(types.string()),
|
|
89
|
+
feePaidBy: types.optional(FeePaidBy$inboundSchema),
|
|
80
90
|
});
|
|
81
91
|
/** @internal */
|
|
82
92
|
export type IncurredFee$Outbound = {
|
|
@@ -89,6 +99,7 @@ export type IncurredFee$Outbound = {
|
|
|
89
99
|
generatedBy?: GeneratedBy$Outbound | undefined;
|
|
90
100
|
feeGroup?: string | undefined;
|
|
91
101
|
residualID?: string | undefined;
|
|
102
|
+
feePaidBy?: string | undefined;
|
|
92
103
|
};
|
|
93
104
|
|
|
94
105
|
/** @internal */
|
|
@@ -106,6 +117,7 @@ export const IncurredFee$outboundSchema: z.ZodType<
|
|
|
106
117
|
generatedBy: GeneratedBy$outboundSchema.optional(),
|
|
107
118
|
feeGroup: z.string().optional(),
|
|
108
119
|
residualID: z.string().optional(),
|
|
120
|
+
feePaidBy: FeePaidBy$outboundSchema.optional(),
|
|
109
121
|
});
|
|
110
122
|
|
|
111
123
|
export function incurredFeeToJSON(incurredFee: IncurredFee): string {
|
|
@@ -59,6 +59,7 @@ export * from "./asynccreatedrefund.js";
|
|
|
59
59
|
export * from "./asynctransfer.js";
|
|
60
60
|
export * from "./authtoken.js";
|
|
61
61
|
export * from "./authtokenrequest.js";
|
|
62
|
+
export * from "./avataruploadrequest.js";
|
|
62
63
|
export * from "./bankaccount.js";
|
|
63
64
|
export * from "./bankaccountexception.js";
|
|
64
65
|
export * from "./bankaccountholdertype.js";
|
|
@@ -249,6 +250,7 @@ export * from "./fednowinstitution.js";
|
|
|
249
250
|
export * from "./fednowservices.js";
|
|
250
251
|
export * from "./feecategory.js";
|
|
251
252
|
export * from "./feemodel.js";
|
|
253
|
+
export * from "./feepaidby.js";
|
|
252
254
|
export * from "./feeplan.js";
|
|
253
255
|
export * from "./feeplanagreement.js";
|
|
254
256
|
export * from "./feeplanagreementstatus.js";
|
|
@@ -415,6 +417,8 @@ export * from "./plaidpayload.js";
|
|
|
415
417
|
export * from "./platformfees.js";
|
|
416
418
|
export * from "./primaryregulator.js";
|
|
417
419
|
export * from "./product.js";
|
|
420
|
+
export * from "./productcategories.js";
|
|
421
|
+
export * from "./productcategory.js";
|
|
418
422
|
export * from "./productimagemetadata.js";
|
|
419
423
|
export * from "./productoption.js";
|
|
420
424
|
export * from "./productoptiongroup.js";
|
|
@@ -539,6 +543,7 @@ export * from "./transfercontrols.js";
|
|
|
539
543
|
export * from "./transferdestination.js";
|
|
540
544
|
export * from "./transferentrymode.js";
|
|
541
545
|
export * from "./transferfailurereason.js";
|
|
546
|
+
export * from "./transferfeepaidby.js";
|
|
542
547
|
export * from "./transferlineitem.js";
|
|
543
548
|
export * from "./transferlineitemimagemetadata.js";
|
|
544
549
|
export * from "./transferlineitemoption.js";
|
|
@@ -6,13 +6,13 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Specifies the time frame for
|
|
9
|
+
* Specifies the time frame for a velocity limit. `per-transaction` applies to each individual authorization and never resets. Time-based intervals (where supported) reset at midnight ET.
|
|
10
10
|
*/
|
|
11
11
|
export const IssuingIntervalLimit = {
|
|
12
12
|
PerTransaction: "per-transaction",
|
|
13
13
|
} as const;
|
|
14
14
|
/**
|
|
15
|
-
* Specifies the time frame for
|
|
15
|
+
* Specifies the time frame for a velocity limit. `per-transaction` applies to each individual authorization and never resets. Time-based intervals (where supported) reset at midnight ET.
|
|
16
16
|
*/
|
|
17
17
|
export type IssuingIntervalLimit = ClosedEnum<typeof IssuingIntervalLimit>;
|
|
18
18
|
|
|
@@ -19,7 +19,7 @@ export type IssuingVelocityLimit = {
|
|
|
19
19
|
*/
|
|
20
20
|
amount: number;
|
|
21
21
|
/**
|
|
22
|
-
* Specifies the time frame for
|
|
22
|
+
* Specifies the time frame for a velocity limit. `per-transaction` applies to each individual authorization and never resets. Time-based intervals (where supported) reset at midnight ET.
|
|
23
23
|
*/
|
|
24
24
|
interval: IssuingIntervalLimit;
|
|
25
25
|
};
|
|
@@ -12,6 +12,11 @@ import {
|
|
|
12
12
|
DisbursementPaymentMethodType$inboundSchema,
|
|
13
13
|
DisbursementPaymentMethodType$outboundSchema,
|
|
14
14
|
} from "./disbursementpaymentmethodtype.js";
|
|
15
|
+
import {
|
|
16
|
+
FeePaidBy,
|
|
17
|
+
FeePaidBy$inboundSchema,
|
|
18
|
+
FeePaidBy$outboundSchema,
|
|
19
|
+
} from "./feepaidby.js";
|
|
15
20
|
import {
|
|
16
21
|
PayoutRecipient,
|
|
17
22
|
PayoutRecipient$inboundSchema,
|
|
@@ -52,6 +57,14 @@ export type PaymentLinkPayoutDetails = {
|
|
|
52
57
|
* (`push-to-apple-pay`, `push-to-google-pay`) are always delivered instantly regardless of these options.
|
|
53
58
|
*/
|
|
54
59
|
pushOptions?: PushOptions | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Indicates which party bears the fee, keyed by disbursement payment method (`DisbursementPaymentMethodType`).
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
*
|
|
65
|
+
* Sparse — include only the methods you want to attribute. Any method left unset defaults to `source`.
|
|
66
|
+
*/
|
|
67
|
+
feePaidBy?: { [k: string]: FeePaidBy } | undefined;
|
|
55
68
|
};
|
|
56
69
|
|
|
57
70
|
/** @internal */
|
|
@@ -64,6 +77,7 @@ export const PaymentLinkPayoutDetails$inboundSchema: z.ZodType<
|
|
|
64
77
|
recipient: PayoutRecipient$inboundSchema,
|
|
65
78
|
metadata: types.optional(z.record(types.string())),
|
|
66
79
|
pushOptions: types.optional(PushOptions$inboundSchema),
|
|
80
|
+
feePaidBy: types.optional(z.record(FeePaidBy$inboundSchema)),
|
|
67
81
|
});
|
|
68
82
|
/** @internal */
|
|
69
83
|
export type PaymentLinkPayoutDetails$Outbound = {
|
|
@@ -71,6 +85,7 @@ export type PaymentLinkPayoutDetails$Outbound = {
|
|
|
71
85
|
recipient: PayoutRecipient$Outbound;
|
|
72
86
|
metadata?: { [k: string]: string } | undefined;
|
|
73
87
|
pushOptions?: PushOptions$Outbound | undefined;
|
|
88
|
+
feePaidBy?: { [k: string]: string } | undefined;
|
|
74
89
|
};
|
|
75
90
|
|
|
76
91
|
/** @internal */
|
|
@@ -83,6 +98,7 @@ export const PaymentLinkPayoutDetails$outboundSchema: z.ZodType<
|
|
|
83
98
|
recipient: PayoutRecipient$outboundSchema,
|
|
84
99
|
metadata: z.record(z.string()).optional(),
|
|
85
100
|
pushOptions: PushOptions$outboundSchema.optional(),
|
|
101
|
+
feePaidBy: z.record(FeePaidBy$outboundSchema).optional(),
|
|
86
102
|
});
|
|
87
103
|
|
|
88
104
|
export function paymentLinkPayoutDetailsToJSON(
|
|
@@ -12,6 +12,11 @@ import {
|
|
|
12
12
|
DisbursementPaymentMethodType$inboundSchema,
|
|
13
13
|
DisbursementPaymentMethodType$outboundSchema,
|
|
14
14
|
} from "./disbursementpaymentmethodtype.js";
|
|
15
|
+
import {
|
|
16
|
+
FeePaidBy,
|
|
17
|
+
FeePaidBy$inboundSchema,
|
|
18
|
+
FeePaidBy$outboundSchema,
|
|
19
|
+
} from "./feepaidby.js";
|
|
15
20
|
import {
|
|
16
21
|
PayoutRecipient,
|
|
17
22
|
PayoutRecipient$inboundSchema,
|
|
@@ -52,6 +57,14 @@ export type PaymentLinkPayoutDetailsUpdate = {
|
|
|
52
57
|
* (`push-to-apple-pay`, `push-to-google-pay`) are always delivered instantly regardless of these options.
|
|
53
58
|
*/
|
|
54
59
|
pushOptions?: PushOptionsUpdate | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Indicates which party bears the fee, keyed by disbursement payment method (`DisbursementPaymentMethodType`).
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
*
|
|
65
|
+
* Sparse — include only the methods you want to attribute. Any method left unset defaults to `source`.
|
|
66
|
+
*/
|
|
67
|
+
feePaidBy?: { [k: string]: FeePaidBy } | undefined;
|
|
55
68
|
};
|
|
56
69
|
|
|
57
70
|
/** @internal */
|
|
@@ -66,6 +79,7 @@ export const PaymentLinkPayoutDetailsUpdate$inboundSchema: z.ZodType<
|
|
|
66
79
|
recipient: types.optional(PayoutRecipient$inboundSchema),
|
|
67
80
|
metadata: types.optional(z.record(types.string())),
|
|
68
81
|
pushOptions: types.optional(PushOptionsUpdate$inboundSchema),
|
|
82
|
+
feePaidBy: types.optional(z.record(FeePaidBy$inboundSchema)),
|
|
69
83
|
});
|
|
70
84
|
/** @internal */
|
|
71
85
|
export type PaymentLinkPayoutDetailsUpdate$Outbound = {
|
|
@@ -73,6 +87,7 @@ export type PaymentLinkPayoutDetailsUpdate$Outbound = {
|
|
|
73
87
|
recipient?: PayoutRecipient$Outbound | undefined;
|
|
74
88
|
metadata?: { [k: string]: string } | undefined;
|
|
75
89
|
pushOptions?: PushOptionsUpdate$Outbound | undefined;
|
|
90
|
+
feePaidBy?: { [k: string]: string } | undefined;
|
|
76
91
|
};
|
|
77
92
|
|
|
78
93
|
/** @internal */
|
|
@@ -86,6 +101,7 @@ export const PaymentLinkPayoutDetailsUpdate$outboundSchema: z.ZodType<
|
|
|
86
101
|
recipient: PayoutRecipient$outboundSchema.optional(),
|
|
87
102
|
metadata: z.record(z.string()).optional(),
|
|
88
103
|
pushOptions: PushOptionsUpdate$outboundSchema.optional(),
|
|
104
|
+
feePaidBy: z.record(FeePaidBy$outboundSchema).optional(),
|
|
89
105
|
});
|
|
90
106
|
|
|
91
107
|
export function paymentLinkPayoutDetailsUpdateToJSON(
|
|
@@ -25,6 +25,7 @@ export type PayoutDetailsError = {
|
|
|
25
25
|
recipient?: PayoutRecipientError | undefined;
|
|
26
26
|
metadata?: string | undefined;
|
|
27
27
|
pushOptions?: PushOptionsError | undefined;
|
|
28
|
+
feePaidBy?: string | undefined;
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
/** @internal */
|
|
@@ -37,6 +38,7 @@ export const PayoutDetailsError$inboundSchema: z.ZodType<
|
|
|
37
38
|
recipient: types.optional(PayoutRecipientError$inboundSchema),
|
|
38
39
|
metadata: types.optional(types.string()),
|
|
39
40
|
pushOptions: types.optional(PushOptionsError$inboundSchema),
|
|
41
|
+
feePaidBy: types.optional(types.string()),
|
|
40
42
|
});
|
|
41
43
|
/** @internal */
|
|
42
44
|
export type PayoutDetailsError$Outbound = {
|
|
@@ -44,6 +46,7 @@ export type PayoutDetailsError$Outbound = {
|
|
|
44
46
|
recipient?: PayoutRecipientError$Outbound | undefined;
|
|
45
47
|
metadata?: string | undefined;
|
|
46
48
|
pushOptions?: PushOptionsError$Outbound | undefined;
|
|
49
|
+
feePaidBy?: string | undefined;
|
|
47
50
|
};
|
|
48
51
|
|
|
49
52
|
/** @internal */
|
|
@@ -56,6 +59,7 @@ export const PayoutDetailsError$outboundSchema: z.ZodType<
|
|
|
56
59
|
recipient: PayoutRecipientError$outboundSchema.optional(),
|
|
57
60
|
metadata: z.string().optional(),
|
|
58
61
|
pushOptions: PushOptionsError$outboundSchema.optional(),
|
|
62
|
+
feePaidBy: z.string().optional(),
|
|
59
63
|
});
|
|
60
64
|
|
|
61
65
|
export function payoutDetailsErrorToJSON(
|
|
@@ -13,6 +13,12 @@ import {
|
|
|
13
13
|
AmountDecimal$Outbound,
|
|
14
14
|
AmountDecimal$outboundSchema,
|
|
15
15
|
} from "./amountdecimal.js";
|
|
16
|
+
import {
|
|
17
|
+
ProductCategory,
|
|
18
|
+
ProductCategory$inboundSchema,
|
|
19
|
+
ProductCategory$Outbound,
|
|
20
|
+
ProductCategory$outboundSchema,
|
|
21
|
+
} from "./productcategory.js";
|
|
16
22
|
import {
|
|
17
23
|
ProductImageMetadata,
|
|
18
24
|
ProductImageMetadata$inboundSchema,
|
|
@@ -57,6 +63,10 @@ export type Product = {
|
|
|
57
63
|
* Optional images associated with the product.
|
|
58
64
|
*/
|
|
59
65
|
images?: Array<ProductImageMetadata> | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* The product taxonomy category associated with the product, if any.
|
|
68
|
+
*/
|
|
69
|
+
category?: ProductCategory | undefined;
|
|
60
70
|
/**
|
|
61
71
|
* The date and time when the product was added.
|
|
62
72
|
*/
|
|
@@ -80,6 +90,7 @@ export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
|
80
90
|
basePrice: AmountDecimal$inboundSchema,
|
|
81
91
|
optionGroups: types.optional(z.array(ProductOptionGroup$inboundSchema)),
|
|
82
92
|
images: types.optional(z.array(ProductImageMetadata$inboundSchema)),
|
|
93
|
+
category: types.optional(ProductCategory$inboundSchema),
|
|
83
94
|
createdOn: types.date(),
|
|
84
95
|
updatedOn: types.date(),
|
|
85
96
|
disabledOn: types.optional(types.date()),
|
|
@@ -92,6 +103,7 @@ export type Product$Outbound = {
|
|
|
92
103
|
basePrice: AmountDecimal$Outbound;
|
|
93
104
|
optionGroups?: Array<ProductOptionGroup$Outbound> | undefined;
|
|
94
105
|
images?: Array<ProductImageMetadata$Outbound> | undefined;
|
|
106
|
+
category?: ProductCategory$Outbound | undefined;
|
|
95
107
|
createdOn: string;
|
|
96
108
|
updatedOn: string;
|
|
97
109
|
disabledOn?: string | undefined;
|
|
@@ -109,6 +121,7 @@ export const Product$outboundSchema: z.ZodType<
|
|
|
109
121
|
basePrice: AmountDecimal$outboundSchema,
|
|
110
122
|
optionGroups: z.array(ProductOptionGroup$outboundSchema).optional(),
|
|
111
123
|
images: z.array(ProductImageMetadata$outboundSchema).optional(),
|
|
124
|
+
category: ProductCategory$outboundSchema.optional(),
|
|
112
125
|
createdOn: z.date().transform(v => v.toISOString()),
|
|
113
126
|
updatedOn: z.date().transform(v => v.toISOString()),
|
|
114
127
|
disabledOn: z.date().transform(v => v.toISOString()).optional(),
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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
|
+
ProductCategory,
|
|
11
|
+
ProductCategory$inboundSchema,
|
|
12
|
+
ProductCategory$Outbound,
|
|
13
|
+
ProductCategory$outboundSchema,
|
|
14
|
+
} from "./productcategory.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A list of product categories from the product taxonomy.
|
|
18
|
+
*/
|
|
19
|
+
export type ProductCategories = {
|
|
20
|
+
categories: Array<ProductCategory>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const ProductCategories$inboundSchema: z.ZodType<
|
|
25
|
+
ProductCategories,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
categories: z.array(ProductCategory$inboundSchema),
|
|
30
|
+
});
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type ProductCategories$Outbound = {
|
|
33
|
+
categories: Array<ProductCategory$Outbound>;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const ProductCategories$outboundSchema: z.ZodType<
|
|
38
|
+
ProductCategories$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
ProductCategories
|
|
41
|
+
> = z.object({
|
|
42
|
+
categories: z.array(ProductCategory$outboundSchema),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export function productCategoriesToJSON(
|
|
46
|
+
productCategories: ProductCategories,
|
|
47
|
+
): string {
|
|
48
|
+
return JSON.stringify(
|
|
49
|
+
ProductCategories$outboundSchema.parse(productCategories),
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
export function productCategoriesFromJSON(
|
|
53
|
+
jsonString: string,
|
|
54
|
+
): SafeParseResult<ProductCategories, SDKValidationError> {
|
|
55
|
+
return safeParse(
|
|
56
|
+
jsonString,
|
|
57
|
+
(x) => ProductCategories$inboundSchema.parse(JSON.parse(x)),
|
|
58
|
+
`Failed to parse 'ProductCategories' from JSON`,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as types from "../../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A product category from the product taxonomy.
|
|
13
|
+
*/
|
|
14
|
+
export type ProductCategory = {
|
|
15
|
+
/**
|
|
16
|
+
* The unique identifier for the category.
|
|
17
|
+
*/
|
|
18
|
+
categoryID: string;
|
|
19
|
+
/**
|
|
20
|
+
* The short display name of the category.
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* The full taxonomy path name of the category.
|
|
25
|
+
*/
|
|
26
|
+
fullName: string;
|
|
27
|
+
/**
|
|
28
|
+
* The depth of the category in the taxonomy tree (1 = top-level).
|
|
29
|
+
*/
|
|
30
|
+
level: number;
|
|
31
|
+
/**
|
|
32
|
+
* The identifier of the parent category, if any. Absent for top-level categories.
|
|
33
|
+
*/
|
|
34
|
+
parentID?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ProductCategory$inboundSchema: z.ZodType<
|
|
39
|
+
ProductCategory,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
categoryID: types.string(),
|
|
44
|
+
name: types.string(),
|
|
45
|
+
fullName: types.string(),
|
|
46
|
+
level: types.number(),
|
|
47
|
+
parentID: types.optional(types.string()),
|
|
48
|
+
});
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type ProductCategory$Outbound = {
|
|
51
|
+
categoryID: string;
|
|
52
|
+
name: string;
|
|
53
|
+
fullName: string;
|
|
54
|
+
level: number;
|
|
55
|
+
parentID?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const ProductCategory$outboundSchema: z.ZodType<
|
|
60
|
+
ProductCategory$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
ProductCategory
|
|
63
|
+
> = z.object({
|
|
64
|
+
categoryID: z.string(),
|
|
65
|
+
name: z.string(),
|
|
66
|
+
fullName: z.string(),
|
|
67
|
+
level: z.number().int(),
|
|
68
|
+
parentID: z.string().optional(),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function productCategoryToJSON(
|
|
72
|
+
productCategory: ProductCategory,
|
|
73
|
+
): string {
|
|
74
|
+
return JSON.stringify(ProductCategory$outboundSchema.parse(productCategory));
|
|
75
|
+
}
|
|
76
|
+
export function productCategoryFromJSON(
|
|
77
|
+
jsonString: string,
|
|
78
|
+
): SafeParseResult<ProductCategory, SDKValidationError> {
|
|
79
|
+
return safeParse(
|
|
80
|
+
jsonString,
|
|
81
|
+
(x) => ProductCategory$inboundSchema.parse(JSON.parse(x)),
|
|
82
|
+
`Failed to parse 'ProductCategory' from JSON`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -53,6 +53,10 @@ export type ProductRequest = {
|
|
|
53
53
|
* Optional configuration options for a product, such as size or color.
|
|
54
54
|
*/
|
|
55
55
|
optionGroups?: Array<CreateProductOptionGroup> | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The ID of a product taxonomy category to associate with the product.
|
|
58
|
+
*/
|
|
59
|
+
categoryID?: string | undefined;
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
/** @internal */
|
|
@@ -66,6 +70,7 @@ export const ProductRequest$inboundSchema: z.ZodType<
|
|
|
66
70
|
basePrice: AmountDecimal$inboundSchema,
|
|
67
71
|
images: types.optional(z.array(AssignProductImage$inboundSchema)),
|
|
68
72
|
optionGroups: types.optional(z.array(CreateProductOptionGroup$inboundSchema)),
|
|
73
|
+
categoryID: types.optional(types.string()),
|
|
69
74
|
});
|
|
70
75
|
/** @internal */
|
|
71
76
|
export type ProductRequest$Outbound = {
|
|
@@ -74,6 +79,7 @@ export type ProductRequest$Outbound = {
|
|
|
74
79
|
basePrice: AmountDecimal$Outbound;
|
|
75
80
|
images?: Array<AssignProductImage$Outbound> | undefined;
|
|
76
81
|
optionGroups?: Array<CreateProductOptionGroup$Outbound> | undefined;
|
|
82
|
+
categoryID?: string | undefined;
|
|
77
83
|
};
|
|
78
84
|
|
|
79
85
|
/** @internal */
|
|
@@ -87,6 +93,7 @@ export const ProductRequest$outboundSchema: z.ZodType<
|
|
|
87
93
|
basePrice: AmountDecimal$outboundSchema,
|
|
88
94
|
images: z.array(AssignProductImage$outboundSchema).optional(),
|
|
89
95
|
optionGroups: z.array(CreateProductOptionGroup$outboundSchema).optional(),
|
|
96
|
+
categoryID: z.string().optional(),
|
|
90
97
|
});
|
|
91
98
|
|
|
92
99
|
export function productRequestToJSON(productRequest: ProductRequest): string {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as types from "../../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
FeePaidBy,
|
|
12
|
+
FeePaidBy$inboundSchema,
|
|
13
|
+
FeePaidBy$outboundSchema,
|
|
14
|
+
} from "./feepaidby.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Indicates which party bears fees for a transfer, keyed by fee type.
|
|
18
|
+
*/
|
|
19
|
+
export type TransferFeePaidBy = {
|
|
20
|
+
/**
|
|
21
|
+
* For payouts, indicates which party bears the fee. Defaults to `source`.
|
|
22
|
+
*/
|
|
23
|
+
payout?: FeePaidBy | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const TransferFeePaidBy$inboundSchema: z.ZodType<
|
|
28
|
+
TransferFeePaidBy,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
payout: types.optional(FeePaidBy$inboundSchema),
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type TransferFeePaidBy$Outbound = {
|
|
36
|
+
payout?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const TransferFeePaidBy$outboundSchema: z.ZodType<
|
|
41
|
+
TransferFeePaidBy$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
TransferFeePaidBy
|
|
44
|
+
> = z.object({
|
|
45
|
+
payout: FeePaidBy$outboundSchema.optional(),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function transferFeePaidByToJSON(
|
|
49
|
+
transferFeePaidBy: TransferFeePaidBy,
|
|
50
|
+
): string {
|
|
51
|
+
return JSON.stringify(
|
|
52
|
+
TransferFeePaidBy$outboundSchema.parse(transferFeePaidBy),
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
export function transferFeePaidByFromJSON(
|
|
56
|
+
jsonString: string,
|
|
57
|
+
): SafeParseResult<TransferFeePaidBy, SDKValidationError> {
|
|
58
|
+
return safeParse(
|
|
59
|
+
jsonString,
|
|
60
|
+
(x) => TransferFeePaidBy$inboundSchema.parse(JSON.parse(x)),
|
|
61
|
+
`Failed to parse 'TransferFeePaidBy' from JSON`,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -17,6 +17,7 @@ export type ProductRequestValidationErrorData = {
|
|
|
17
17
|
optionGroups?:
|
|
18
18
|
| { [k: string]: components.ProductOptionGroupValidationError }
|
|
19
19
|
| undefined;
|
|
20
|
+
categoryID?: string | undefined;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
export class ProductRequestValidationError extends MoovError {
|
|
@@ -29,6 +30,7 @@ export class ProductRequestValidationError extends MoovError {
|
|
|
29
30
|
optionGroups?:
|
|
30
31
|
| { [k: string]: components.ProductOptionGroupValidationError }
|
|
31
32
|
| undefined;
|
|
33
|
+
categoryID?: string | undefined;
|
|
32
34
|
|
|
33
35
|
/** The original data that was passed to this error instance. */
|
|
34
36
|
data$: ProductRequestValidationErrorData;
|
|
@@ -47,6 +49,7 @@ export class ProductRequestValidationError extends MoovError {
|
|
|
47
49
|
if (err.basePrice != null) this.basePrice = err.basePrice;
|
|
48
50
|
if (err.images != null) this.images = err.images;
|
|
49
51
|
if (err.optionGroups != null) this.optionGroups = err.optionGroups;
|
|
52
|
+
if (err.categoryID != null) this.categoryID = err.categoryID;
|
|
50
53
|
|
|
51
54
|
this.name = "ProductRequestValidationError";
|
|
52
55
|
}
|
|
@@ -69,6 +72,7 @@ export const ProductRequestValidationError$inboundSchema: z.ZodType<
|
|
|
69
72
|
optionGroups: types.optional(
|
|
70
73
|
z.record(components.ProductOptionGroupValidationError$inboundSchema),
|
|
71
74
|
),
|
|
75
|
+
categoryID: types.optional(types.string()),
|
|
72
76
|
request$: z.instanceof(Request),
|
|
73
77
|
response$: z.instanceof(Response),
|
|
74
78
|
body$: z.string(),
|
|
@@ -92,6 +96,7 @@ export type ProductRequestValidationError$Outbound = {
|
|
|
92
96
|
optionGroups?: {
|
|
93
97
|
[k: string]: components.ProductOptionGroupValidationError$Outbound;
|
|
94
98
|
} | undefined;
|
|
99
|
+
categoryID?: string | undefined;
|
|
95
100
|
};
|
|
96
101
|
|
|
97
102
|
/** @internal */
|
|
@@ -112,4 +117,5 @@ export const ProductRequestValidationError$outboundSchema: z.ZodType<
|
|
|
112
117
|
optionGroups: z.record(
|
|
113
118
|
components.ProductOptionGroupValidationError$outboundSchema,
|
|
114
119
|
).optional(),
|
|
120
|
+
categoryID: z.string().optional(),
|
|
115
121
|
}));
|