@moovio/sdk 26.7.0-dev.5 → 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 +520 -187
- package/bin/mcp-server.js.map +38 -28
- 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/lib/http.d.ts +1 -1
- package/lib/http.d.ts.map +1 -1
- package/lib/http.js +1 -1
- package/lib/http.js.map +1 -1
- package/lib/security.d.ts +5 -4
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +6 -7
- package/lib/security.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/cardbrandfees.d.ts +5 -0
- package/models/components/cardbrandfees.d.ts.map +1 -1
- package/models/components/cardbrandfees.js +2 -0
- package/models/components/cardbrandfees.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/lib/http.ts +3 -1
- package/src/lib/security.ts +10 -5
- 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/cardbrandfees.ts +7 -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
|
@@ -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
|
}
|