@moovio/sdk 26.7.0-dev.6 → 26.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -59
- package/bin/mcp-server.js +510 -183
- package/bin/mcp-server.js.map +35 -25
- 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.d.ts.map +1 -1
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +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/filedetails.d.ts +1 -1
- package/models/components/filepurpose.d.ts +2 -2
- package/models/components/filepurpose.js +1 -1
- 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/onboardinginvite.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 -4
- 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/filedetails.ts +1 -1
- package/src/models/components/filepurpose.ts +2 -2
- 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/onboardinginvite.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
|
@@ -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
|
}));
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type DeleteAvatarSecurity = {
|
|
13
|
+
username?: string | undefined;
|
|
14
|
+
password?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type DeleteAvatarRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* The accountID to delete the avatar for. Only accountID values are accepted for writes.
|
|
20
|
+
*/
|
|
21
|
+
uniqueID: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type DeleteAvatarResponse = {
|
|
25
|
+
headers: { [k: string]: Array<string> };
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const DeleteAvatarSecurity$inboundSchema: z.ZodType<
|
|
30
|
+
DeleteAvatarSecurity,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
username: types.optional(types.string()),
|
|
35
|
+
password: types.optional(types.string()),
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type DeleteAvatarSecurity$Outbound = {
|
|
39
|
+
username?: string | undefined;
|
|
40
|
+
password?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const DeleteAvatarSecurity$outboundSchema: z.ZodType<
|
|
45
|
+
DeleteAvatarSecurity$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
DeleteAvatarSecurity
|
|
48
|
+
> = z.object({
|
|
49
|
+
username: z.string().optional(),
|
|
50
|
+
password: z.string().optional(),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export function deleteAvatarSecurityToJSON(
|
|
54
|
+
deleteAvatarSecurity: DeleteAvatarSecurity,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
DeleteAvatarSecurity$outboundSchema.parse(deleteAvatarSecurity),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
export function deleteAvatarSecurityFromJSON(
|
|
61
|
+
jsonString: string,
|
|
62
|
+
): SafeParseResult<DeleteAvatarSecurity, SDKValidationError> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) => DeleteAvatarSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
+
`Failed to parse 'DeleteAvatarSecurity' from JSON`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const DeleteAvatarRequest$inboundSchema: z.ZodType<
|
|
72
|
+
DeleteAvatarRequest,
|
|
73
|
+
z.ZodTypeDef,
|
|
74
|
+
unknown
|
|
75
|
+
> = z.object({
|
|
76
|
+
uniqueID: types.string(),
|
|
77
|
+
});
|
|
78
|
+
/** @internal */
|
|
79
|
+
export type DeleteAvatarRequest$Outbound = {
|
|
80
|
+
uniqueID: string;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const DeleteAvatarRequest$outboundSchema: z.ZodType<
|
|
85
|
+
DeleteAvatarRequest$Outbound,
|
|
86
|
+
z.ZodTypeDef,
|
|
87
|
+
DeleteAvatarRequest
|
|
88
|
+
> = z.object({
|
|
89
|
+
uniqueID: z.string(),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export function deleteAvatarRequestToJSON(
|
|
93
|
+
deleteAvatarRequest: DeleteAvatarRequest,
|
|
94
|
+
): string {
|
|
95
|
+
return JSON.stringify(
|
|
96
|
+
DeleteAvatarRequest$outboundSchema.parse(deleteAvatarRequest),
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
export function deleteAvatarRequestFromJSON(
|
|
100
|
+
jsonString: string,
|
|
101
|
+
): SafeParseResult<DeleteAvatarRequest, SDKValidationError> {
|
|
102
|
+
return safeParse(
|
|
103
|
+
jsonString,
|
|
104
|
+
(x) => DeleteAvatarRequest$inboundSchema.parse(JSON.parse(x)),
|
|
105
|
+
`Failed to parse 'DeleteAvatarRequest' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const DeleteAvatarResponse$inboundSchema: z.ZodType<
|
|
111
|
+
DeleteAvatarResponse,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
unknown
|
|
114
|
+
> = z.object({
|
|
115
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
116
|
+
}).transform((v) => {
|
|
117
|
+
return remap$(v, {
|
|
118
|
+
"Headers": "headers",
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
/** @internal */
|
|
122
|
+
export type DeleteAvatarResponse$Outbound = {
|
|
123
|
+
Headers: { [k: string]: Array<string> };
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const DeleteAvatarResponse$outboundSchema: z.ZodType<
|
|
128
|
+
DeleteAvatarResponse$Outbound,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
DeleteAvatarResponse
|
|
131
|
+
> = z.object({
|
|
132
|
+
headers: z.record(z.array(z.string())),
|
|
133
|
+
}).transform((v) => {
|
|
134
|
+
return remap$(v, {
|
|
135
|
+
headers: "Headers",
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export function deleteAvatarResponseToJSON(
|
|
140
|
+
deleteAvatarResponse: DeleteAvatarResponse,
|
|
141
|
+
): string {
|
|
142
|
+
return JSON.stringify(
|
|
143
|
+
DeleteAvatarResponse$outboundSchema.parse(deleteAvatarResponse),
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
export function deleteAvatarResponseFromJSON(
|
|
147
|
+
jsonString: string,
|
|
148
|
+
): SafeParseResult<DeleteAvatarResponse, SDKValidationError> {
|
|
149
|
+
return safeParse(
|
|
150
|
+
jsonString,
|
|
151
|
+
(x) => DeleteAvatarResponse$inboundSchema.parse(JSON.parse(x)),
|
|
152
|
+
`Failed to parse 'DeleteAvatarResponse' from JSON`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
@@ -35,6 +35,7 @@ export * from "./createtransferconfig.js";
|
|
|
35
35
|
export * from "./createtransferoptions.js";
|
|
36
36
|
export * from "./createwallet.js";
|
|
37
37
|
export * from "./createwebhook.js";
|
|
38
|
+
export * from "./deleteavatar.js";
|
|
38
39
|
export * from "./deletedisputeevidencefile.js";
|
|
39
40
|
export * from "./deleteimage.js";
|
|
40
41
|
export * from "./deleteinvoice.js";
|
|
@@ -138,6 +139,7 @@ export * from "./listonboardinginvites.js";
|
|
|
138
139
|
export * from "./listpartnerpricingagreements.js";
|
|
139
140
|
export * from "./listpaymentlinks.js";
|
|
140
141
|
export * from "./listpaymentmethods.js";
|
|
142
|
+
export * from "./listproductcategories.js";
|
|
141
143
|
export * from "./listproducts.js";
|
|
142
144
|
export * from "./listreceipts.js";
|
|
143
145
|
export * from "./listrefunds.js";
|
|
@@ -186,6 +188,7 @@ export * from "./updatetransfer.js";
|
|
|
186
188
|
export * from "./updatetransferconfig.js";
|
|
187
189
|
export * from "./updatewallet.js";
|
|
188
190
|
export * from "./updatewebhook.js";
|
|
191
|
+
export * from "./uploadavatar.js";
|
|
189
192
|
export * from "./uploaddisputeevidencefile.js";
|
|
190
193
|
export * from "./uploaddisputeevidencetext.js";
|
|
191
194
|
export * from "./uploadfile.js";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 ListProductCategoriesResponse = {
|
|
13
|
+
headers: { [k: string]: Array<string> };
|
|
14
|
+
result: components.ProductCategories;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ListProductCategoriesResponse$inboundSchema: z.ZodType<
|
|
19
|
+
ListProductCategoriesResponse,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
24
|
+
Result: components.ProductCategories$inboundSchema,
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"Headers": "headers",
|
|
28
|
+
"Result": "result",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type ListProductCategoriesResponse$Outbound = {
|
|
33
|
+
Headers: { [k: string]: Array<string> };
|
|
34
|
+
Result: components.ProductCategories$Outbound;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ListProductCategoriesResponse$outboundSchema: z.ZodType<
|
|
39
|
+
ListProductCategoriesResponse$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
ListProductCategoriesResponse
|
|
42
|
+
> = z.object({
|
|
43
|
+
headers: z.record(z.array(z.string())),
|
|
44
|
+
result: components.ProductCategories$outboundSchema,
|
|
45
|
+
}).transform((v) => {
|
|
46
|
+
return remap$(v, {
|
|
47
|
+
headers: "Headers",
|
|
48
|
+
result: "Result",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export function listProductCategoriesResponseToJSON(
|
|
53
|
+
listProductCategoriesResponse: ListProductCategoriesResponse,
|
|
54
|
+
): string {
|
|
55
|
+
return JSON.stringify(
|
|
56
|
+
ListProductCategoriesResponse$outboundSchema.parse(
|
|
57
|
+
listProductCategoriesResponse,
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export function listProductCategoriesResponseFromJSON(
|
|
62
|
+
jsonString: string,
|
|
63
|
+
): SafeParseResult<ListProductCategoriesResponse, SDKValidationError> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) => ListProductCategoriesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'ListProductCategoriesResponse' from JSON`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -16,6 +16,14 @@ export type ListProductsRequest = {
|
|
|
16
16
|
* Allows filtering products by title. This supports partial matches and is case-insensitive
|
|
17
17
|
*/
|
|
18
18
|
title?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Filter products by category. Accepts a category ID at any level of the taxonomy;
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* a product matches when the given category is anywhere in its category's breadcrumb
|
|
24
|
+
* (i.e. filtering by a top-level category returns products in any of its descendants).
|
|
25
|
+
*/
|
|
26
|
+
category?: string | undefined;
|
|
19
27
|
skip?: number | undefined;
|
|
20
28
|
count?: number | undefined;
|
|
21
29
|
};
|
|
@@ -33,6 +41,7 @@ export const ListProductsRequest$inboundSchema: z.ZodType<
|
|
|
33
41
|
> = z.object({
|
|
34
42
|
accountID: types.string(),
|
|
35
43
|
title: types.optional(types.string()),
|
|
44
|
+
category: types.optional(types.string()),
|
|
36
45
|
skip: types.optional(types.number()),
|
|
37
46
|
count: types.optional(types.number()),
|
|
38
47
|
});
|
|
@@ -40,6 +49,7 @@ export const ListProductsRequest$inboundSchema: z.ZodType<
|
|
|
40
49
|
export type ListProductsRequest$Outbound = {
|
|
41
50
|
accountID: string;
|
|
42
51
|
title?: string | undefined;
|
|
52
|
+
category?: string | undefined;
|
|
43
53
|
skip?: number | undefined;
|
|
44
54
|
count?: number | undefined;
|
|
45
55
|
};
|
|
@@ -52,6 +62,7 @@ export const ListProductsRequest$outboundSchema: z.ZodType<
|
|
|
52
62
|
> = z.object({
|
|
53
63
|
accountID: z.string(),
|
|
54
64
|
title: z.string().optional(),
|
|
65
|
+
category: z.string().optional(),
|
|
55
66
|
skip: z.number().int().optional(),
|
|
56
67
|
count: z.number().int().optional(),
|
|
57
68
|
});
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 types from "../../types/primitives.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export type UploadAvatarSecurity = {
|
|
14
|
+
username?: string | undefined;
|
|
15
|
+
password?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type UploadAvatarRequest = {
|
|
19
|
+
/**
|
|
20
|
+
* The accountID to upload the avatar for. Only accountID values are accepted for writes.
|
|
21
|
+
*/
|
|
22
|
+
uniqueID: string;
|
|
23
|
+
avatarUploadRequest: components.AvatarUploadRequest;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type UploadAvatarResponse = {
|
|
27
|
+
headers: { [k: string]: Array<string> };
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const UploadAvatarSecurity$inboundSchema: z.ZodType<
|
|
32
|
+
UploadAvatarSecurity,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
username: types.optional(types.string()),
|
|
37
|
+
password: types.optional(types.string()),
|
|
38
|
+
});
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type UploadAvatarSecurity$Outbound = {
|
|
41
|
+
username?: string | undefined;
|
|
42
|
+
password?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const UploadAvatarSecurity$outboundSchema: z.ZodType<
|
|
47
|
+
UploadAvatarSecurity$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
UploadAvatarSecurity
|
|
50
|
+
> = z.object({
|
|
51
|
+
username: z.string().optional(),
|
|
52
|
+
password: z.string().optional(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function uploadAvatarSecurityToJSON(
|
|
56
|
+
uploadAvatarSecurity: UploadAvatarSecurity,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
UploadAvatarSecurity$outboundSchema.parse(uploadAvatarSecurity),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export function uploadAvatarSecurityFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<UploadAvatarSecurity, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => UploadAvatarSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'UploadAvatarSecurity' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const UploadAvatarRequest$inboundSchema: z.ZodType<
|
|
74
|
+
UploadAvatarRequest,
|
|
75
|
+
z.ZodTypeDef,
|
|
76
|
+
unknown
|
|
77
|
+
> = z.object({
|
|
78
|
+
uniqueID: types.string(),
|
|
79
|
+
AvatarUploadRequest: components.AvatarUploadRequest$inboundSchema,
|
|
80
|
+
}).transform((v) => {
|
|
81
|
+
return remap$(v, {
|
|
82
|
+
"AvatarUploadRequest": "avatarUploadRequest",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
/** @internal */
|
|
86
|
+
export type UploadAvatarRequest$Outbound = {
|
|
87
|
+
uniqueID: string;
|
|
88
|
+
AvatarUploadRequest: components.AvatarUploadRequest$Outbound;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const UploadAvatarRequest$outboundSchema: z.ZodType<
|
|
93
|
+
UploadAvatarRequest$Outbound,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
UploadAvatarRequest
|
|
96
|
+
> = z.object({
|
|
97
|
+
uniqueID: z.string(),
|
|
98
|
+
avatarUploadRequest: components.AvatarUploadRequest$outboundSchema,
|
|
99
|
+
}).transform((v) => {
|
|
100
|
+
return remap$(v, {
|
|
101
|
+
avatarUploadRequest: "AvatarUploadRequest",
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export function uploadAvatarRequestToJSON(
|
|
106
|
+
uploadAvatarRequest: UploadAvatarRequest,
|
|
107
|
+
): string {
|
|
108
|
+
return JSON.stringify(
|
|
109
|
+
UploadAvatarRequest$outboundSchema.parse(uploadAvatarRequest),
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
export function uploadAvatarRequestFromJSON(
|
|
113
|
+
jsonString: string,
|
|
114
|
+
): SafeParseResult<UploadAvatarRequest, SDKValidationError> {
|
|
115
|
+
return safeParse(
|
|
116
|
+
jsonString,
|
|
117
|
+
(x) => UploadAvatarRequest$inboundSchema.parse(JSON.parse(x)),
|
|
118
|
+
`Failed to parse 'UploadAvatarRequest' from JSON`,
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const UploadAvatarResponse$inboundSchema: z.ZodType<
|
|
124
|
+
UploadAvatarResponse,
|
|
125
|
+
z.ZodTypeDef,
|
|
126
|
+
unknown
|
|
127
|
+
> = z.object({
|
|
128
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
129
|
+
}).transform((v) => {
|
|
130
|
+
return remap$(v, {
|
|
131
|
+
"Headers": "headers",
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
/** @internal */
|
|
135
|
+
export type UploadAvatarResponse$Outbound = {
|
|
136
|
+
Headers: { [k: string]: Array<string> };
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/** @internal */
|
|
140
|
+
export const UploadAvatarResponse$outboundSchema: z.ZodType<
|
|
141
|
+
UploadAvatarResponse$Outbound,
|
|
142
|
+
z.ZodTypeDef,
|
|
143
|
+
UploadAvatarResponse
|
|
144
|
+
> = z.object({
|
|
145
|
+
headers: z.record(z.array(z.string())),
|
|
146
|
+
}).transform((v) => {
|
|
147
|
+
return remap$(v, {
|
|
148
|
+
headers: "Headers",
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
export function uploadAvatarResponseToJSON(
|
|
153
|
+
uploadAvatarResponse: UploadAvatarResponse,
|
|
154
|
+
): string {
|
|
155
|
+
return JSON.stringify(
|
|
156
|
+
UploadAvatarResponse$outboundSchema.parse(uploadAvatarResponse),
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
export function uploadAvatarResponseFromJSON(
|
|
160
|
+
jsonString: string,
|
|
161
|
+
): SafeParseResult<UploadAvatarResponse, SDKValidationError> {
|
|
162
|
+
return safeParse(
|
|
163
|
+
jsonString,
|
|
164
|
+
(x) => UploadAvatarResponse$inboundSchema.parse(JSON.parse(x)),
|
|
165
|
+
`Failed to parse 'UploadAvatarResponse' from JSON`,
|
|
166
|
+
);
|
|
167
|
+
}
|
package/src/sdk/avatars.ts
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { avatarsDelete } from "../funcs/avatarsDelete.js";
|
|
5
6
|
import { avatarsGet } from "../funcs/avatarsGet.js";
|
|
7
|
+
import { avatarsUpload } from "../funcs/avatarsUpload.js";
|
|
6
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
9
|
import * as operations from "../models/operations/index.js";
|
|
8
10
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -24,4 +26,52 @@ export class Avatars extends ClientSDK {
|
|
|
24
26
|
options,
|
|
25
27
|
));
|
|
26
28
|
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Upload a user avatar image for an account.
|
|
32
|
+
*
|
|
33
|
+
* The image will be normalized to 512x512 PNG format and stored separately from
|
|
34
|
+
* automatically discovered logos. User-uploaded avatars take precedence over enriched avatars at read time.
|
|
35
|
+
*
|
|
36
|
+
* This endpoint only accepts accountID values for the uniqueID parameter.
|
|
37
|
+
*
|
|
38
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
39
|
+
* you'll need to specify the `/accounts.write` scope.
|
|
40
|
+
*/
|
|
41
|
+
async upload(
|
|
42
|
+
security: operations.UploadAvatarSecurity,
|
|
43
|
+
request: operations.UploadAvatarRequest,
|
|
44
|
+
options?: RequestOptions,
|
|
45
|
+
): Promise<operations.UploadAvatarResponse | undefined> {
|
|
46
|
+
return unwrapAsync(avatarsUpload(
|
|
47
|
+
this,
|
|
48
|
+
security,
|
|
49
|
+
request,
|
|
50
|
+
options,
|
|
51
|
+
));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Delete a user-uploaded avatar for an account.
|
|
56
|
+
*
|
|
57
|
+
* After deletion, the avatar endpoint will fall back to the enriched avatar
|
|
58
|
+
* or an account-type-aware fallback icon.
|
|
59
|
+
*
|
|
60
|
+
* This endpoint only accepts accountID values for the uniqueID parameter.
|
|
61
|
+
*
|
|
62
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
63
|
+
* you'll need to specify the `/accounts.write` scope.
|
|
64
|
+
*/
|
|
65
|
+
async delete(
|
|
66
|
+
security: operations.DeleteAvatarSecurity,
|
|
67
|
+
request: operations.DeleteAvatarRequest,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<operations.DeleteAvatarResponse | undefined> {
|
|
70
|
+
return unwrapAsync(avatarsDelete(
|
|
71
|
+
this,
|
|
72
|
+
security,
|
|
73
|
+
request,
|
|
74
|
+
options,
|
|
75
|
+
));
|
|
76
|
+
}
|
|
27
77
|
}
|
package/src/sdk/products.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { productsCreate } from "../funcs/productsCreate.js";
|
|
|
6
6
|
import { productsDisable } from "../funcs/productsDisable.js";
|
|
7
7
|
import { productsGet } from "../funcs/productsGet.js";
|
|
8
8
|
import { productsList } from "../funcs/productsList.js";
|
|
9
|
+
import { productsListCategories } from "../funcs/productsListCategories.js";
|
|
9
10
|
import { productsUpdate } from "../funcs/productsUpdate.js";
|
|
10
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
12
|
import * as operations from "../models/operations/index.js";
|
|
@@ -83,4 +84,16 @@ export class Products extends ClientSDK {
|
|
|
83
84
|
options,
|
|
84
85
|
));
|
|
85
86
|
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Returns the full, read-only list of product categories from the product taxonomy.
|
|
90
|
+
*/
|
|
91
|
+
async listCategories(
|
|
92
|
+
options?: RequestOptions,
|
|
93
|
+
): Promise<operations.ListProductCategoriesResponse> {
|
|
94
|
+
return unwrapAsync(productsListCategories(
|
|
95
|
+
this,
|
|
96
|
+
options,
|
|
97
|
+
));
|
|
98
|
+
}
|
|
86
99
|
}
|