@moovio/sdk 0.22.8 → 0.22.10
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 +59 -64
- package/bin/mcp-server.js +691 -849
- package/bin/mcp-server.js.map +23 -24
- package/examples/package-lock.json +1 -1
- package/funcs/imagesDelete.d.ts +4 -1
- package/funcs/imagesDelete.d.ts.map +1 -1
- package/funcs/imagesDelete.js +4 -1
- package/funcs/imagesDelete.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- 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 +1 -3
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/imagesDelete.d.ts.map +1 -1
- package/mcp-server/tools/imagesDelete.js +4 -1
- package/mcp-server/tools/imagesDelete.js.map +1 -1
- package/models/components/createtransfer.d.ts +3 -3
- package/models/components/createtransfer.d.ts.map +1 -1
- package/models/components/createtransfer.js +3 -3
- package/models/components/createtransfer.js.map +1 -1
- package/models/components/createtransferlineitem.d.ts +50 -0
- package/models/components/createtransferlineitem.d.ts.map +1 -0
- package/models/components/createtransferlineitem.js +70 -0
- package/models/components/createtransferlineitem.js.map +1 -0
- package/models/components/createtransferlineitemoption.d.ts +44 -0
- package/models/components/createtransferlineitemoption.d.ts.map +1 -0
- package/models/{errors/markinvoicepaiderror.js → components/createtransferlineitemoption.js} +25 -41
- package/models/components/createtransferlineitemoption.js.map +1 -0
- package/models/components/createtransferlineitemoptionvalidationerror.d.ts +26 -0
- package/models/components/createtransferlineitemoptionvalidationerror.d.ts.map +1 -0
- package/models/components/{transferlineitemoptionvalidationerror.js → createtransferlineitemoptionvalidationerror.js} +12 -10
- package/models/components/createtransferlineitemoptionvalidationerror.js.map +1 -0
- package/models/components/createtransferlineitems.d.ts +27 -0
- package/models/components/createtransferlineitems.d.ts.map +1 -0
- package/models/components/{markinvoicepaid.js → createtransferlineitems.js} +13 -17
- package/models/components/createtransferlineitems.js.map +1 -0
- package/models/components/createtransferlineitemsvalidationerror.d.ts +22 -0
- package/models/components/createtransferlineitemsvalidationerror.d.ts.map +1 -0
- package/models/components/createtransferlineitemsvalidationerror.js +61 -0
- package/models/components/createtransferlineitemsvalidationerror.js.map +1 -0
- package/models/components/createtransferlineitemvalidationerror.d.ts +33 -0
- package/models/components/createtransferlineitemvalidationerror.d.ts.map +1 -0
- package/models/components/{transferlineitemvalidationerror.js → createtransferlineitemvalidationerror.js} +15 -13
- package/models/components/createtransferlineitemvalidationerror.js.map +1 -0
- package/models/components/imagemetadata.d.ts +2 -0
- package/models/components/imagemetadata.d.ts.map +1 -1
- package/models/components/imagemetadata.js +3 -0
- package/models/components/imagemetadata.js.map +1 -1
- package/models/components/index.d.ts +7 -4
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -4
- package/models/components/index.js.map +1 -1
- package/models/components/transferlineitem.d.ts +6 -0
- package/models/components/transferlineitem.d.ts.map +1 -1
- package/models/components/transferlineitem.js +3 -0
- package/models/components/transferlineitem.js.map +1 -1
- package/models/components/transferlineitemimagemetadata.d.ts +35 -0
- package/models/components/transferlineitemimagemetadata.d.ts.map +1 -0
- package/models/components/{transferlineitemsvalidationerror.js → transferlineitemimagemetadata.js} +18 -13
- package/models/components/transferlineitemimagemetadata.js.map +1 -0
- package/models/components/transferlineitemoption.d.ts +6 -0
- package/models/components/transferlineitemoption.d.ts.map +1 -1
- package/models/components/transferlineitemoption.js +3 -0
- package/models/components/transferlineitemoption.js.map +1 -1
- package/models/errors/index.d.ts +0 -1
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -1
- package/models/errors/index.js.map +1 -1
- package/models/errors/transfervalidationerror.d.ts +3 -3
- package/models/errors/transfervalidationerror.d.ts.map +1 -1
- package/models/errors/transfervalidationerror.js +3 -3
- package/models/errors/transfervalidationerror.js.map +1 -1
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/images.d.ts +4 -1
- package/sdk/images.d.ts.map +1 -1
- package/sdk/images.js +4 -1
- package/sdk/images.js.map +1 -1
- package/sdk/invoices.d.ts +0 -8
- package/sdk/invoices.d.ts.map +1 -1
- package/sdk/invoices.js +0 -11
- package/sdk/invoices.js.map +1 -1
- package/src/funcs/imagesDelete.ts +4 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -3
- package/src/mcp-server/tools/imagesDelete.ts +4 -1
- package/src/models/components/createtransfer.ts +10 -10
- package/src/models/components/createtransferlineitem.ts +104 -0
- package/src/models/components/createtransferlineitemoption.ts +93 -0
- package/src/models/components/createtransferlineitemoptionvalidationerror.ts +84 -0
- package/src/models/components/createtransferlineitems.ts +66 -0
- package/src/models/components/createtransferlineitemsvalidationerror.ts +65 -0
- package/src/models/components/createtransferlineitemvalidationerror.ts +92 -0
- package/src/models/components/imagemetadata.ts +5 -0
- package/src/models/components/index.ts +7 -4
- package/src/models/components/transferlineitem.ts +13 -0
- package/src/models/components/transferlineitemimagemetadata.ts +77 -0
- package/src/models/components/transferlineitemoption.ts +13 -0
- package/src/models/errors/index.ts +0 -1
- package/src/models/errors/transfervalidationerror.ts +8 -6
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/images.ts +4 -1
- package/src/sdk/invoices.ts +0 -19
- package/funcs/invoicesMarkPaidInvoice.d.ts +0 -19
- package/funcs/invoicesMarkPaidInvoice.d.ts.map +0 -1
- package/funcs/invoicesMarkPaidInvoice.js +0 -144
- package/funcs/invoicesMarkPaidInvoice.js.map +0 -1
- package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts +0 -8
- package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts.map +0 -1
- package/mcp-server/tools/invoicesMarkPaidInvoice.js +0 -66
- package/mcp-server/tools/invoicesMarkPaidInvoice.js.map +0 -1
- package/models/components/markinvoicepaid.d.ts +0 -21
- package/models/components/markinvoicepaid.d.ts.map +0 -1
- package/models/components/markinvoicepaid.js.map +0 -1
- package/models/components/transferlineitemoptionvalidationerror.d.ts +0 -24
- package/models/components/transferlineitemoptionvalidationerror.d.ts.map +0 -1
- package/models/components/transferlineitemoptionvalidationerror.js.map +0 -1
- package/models/components/transferlineitemsvalidationerror.d.ts +0 -22
- package/models/components/transferlineitemsvalidationerror.d.ts.map +0 -1
- package/models/components/transferlineitemsvalidationerror.js.map +0 -1
- package/models/components/transferlineitemvalidationerror.d.ts +0 -31
- package/models/components/transferlineitemvalidationerror.d.ts.map +0 -1
- package/models/components/transferlineitemvalidationerror.js.map +0 -1
- package/models/errors/markinvoicepaiderror.d.ts +0 -30
- package/models/errors/markinvoicepaiderror.d.ts.map +0 -1
- package/models/errors/markinvoicepaiderror.js.map +0 -1
- package/models/operations/markpaidinvoice.d.ts +0 -68
- package/models/operations/markpaidinvoice.d.ts.map +0 -1
- package/models/operations/markpaidinvoice.js +0 -124
- package/models/operations/markpaidinvoice.js.map +0 -1
- package/src/funcs/invoicesMarkPaidInvoice.ts +0 -208
- package/src/mcp-server/tools/invoicesMarkPaidInvoice.ts +0 -39
- package/src/models/components/markinvoicepaid.ts +0 -58
- package/src/models/components/transferlineitemoptionvalidationerror.ts +0 -72
- package/src/models/components/transferlineitemsvalidationerror.ts +0 -59
- package/src/models/components/transferlineitemvalidationerror.ts +0 -85
- package/src/models/errors/markinvoicepaiderror.ts +0 -78
- package/src/models/operations/markpaidinvoice.ts +0 -191
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import * as components from "../components/index.js";
|
|
4
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
-
export type MarkPaidInvoiceGlobals = {
|
|
6
|
-
/**
|
|
7
|
-
* Specify an API version.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
*
|
|
11
|
-
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
12
|
-
* - `YYYY` is the year
|
|
13
|
-
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
14
|
-
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
15
|
-
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
16
|
-
*
|
|
17
|
-
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
18
|
-
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
19
|
-
*/
|
|
20
|
-
xMoovVersion?: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
export type MarkPaidInvoiceRequest = {
|
|
23
|
-
accountID: string;
|
|
24
|
-
invoiceID: string;
|
|
25
|
-
markInvoicePaid: components.MarkInvoicePaid;
|
|
26
|
-
};
|
|
27
|
-
export type MarkPaidInvoiceResponse = {
|
|
28
|
-
headers: {
|
|
29
|
-
[k: string]: Array<string>;
|
|
30
|
-
};
|
|
31
|
-
result: components.Invoice;
|
|
32
|
-
};
|
|
33
|
-
/** @internal */
|
|
34
|
-
export declare const MarkPaidInvoiceGlobals$inboundSchema: z.ZodType<MarkPaidInvoiceGlobals, z.ZodTypeDef, unknown>;
|
|
35
|
-
/** @internal */
|
|
36
|
-
export type MarkPaidInvoiceGlobals$Outbound = {
|
|
37
|
-
"X-Moov-Version"?: string | undefined;
|
|
38
|
-
};
|
|
39
|
-
/** @internal */
|
|
40
|
-
export declare const MarkPaidInvoiceGlobals$outboundSchema: z.ZodType<MarkPaidInvoiceGlobals$Outbound, z.ZodTypeDef, MarkPaidInvoiceGlobals>;
|
|
41
|
-
export declare function markPaidInvoiceGlobalsToJSON(markPaidInvoiceGlobals: MarkPaidInvoiceGlobals): string;
|
|
42
|
-
export declare function markPaidInvoiceGlobalsFromJSON(jsonString: string): SafeParseResult<MarkPaidInvoiceGlobals, SDKValidationError>;
|
|
43
|
-
/** @internal */
|
|
44
|
-
export declare const MarkPaidInvoiceRequest$inboundSchema: z.ZodType<MarkPaidInvoiceRequest, z.ZodTypeDef, unknown>;
|
|
45
|
-
/** @internal */
|
|
46
|
-
export type MarkPaidInvoiceRequest$Outbound = {
|
|
47
|
-
accountID: string;
|
|
48
|
-
invoiceID: string;
|
|
49
|
-
MarkInvoicePaid: components.MarkInvoicePaid$Outbound;
|
|
50
|
-
};
|
|
51
|
-
/** @internal */
|
|
52
|
-
export declare const MarkPaidInvoiceRequest$outboundSchema: z.ZodType<MarkPaidInvoiceRequest$Outbound, z.ZodTypeDef, MarkPaidInvoiceRequest>;
|
|
53
|
-
export declare function markPaidInvoiceRequestToJSON(markPaidInvoiceRequest: MarkPaidInvoiceRequest): string;
|
|
54
|
-
export declare function markPaidInvoiceRequestFromJSON(jsonString: string): SafeParseResult<MarkPaidInvoiceRequest, SDKValidationError>;
|
|
55
|
-
/** @internal */
|
|
56
|
-
export declare const MarkPaidInvoiceResponse$inboundSchema: z.ZodType<MarkPaidInvoiceResponse, z.ZodTypeDef, unknown>;
|
|
57
|
-
/** @internal */
|
|
58
|
-
export type MarkPaidInvoiceResponse$Outbound = {
|
|
59
|
-
Headers: {
|
|
60
|
-
[k: string]: Array<string>;
|
|
61
|
-
};
|
|
62
|
-
Result: components.Invoice$Outbound;
|
|
63
|
-
};
|
|
64
|
-
/** @internal */
|
|
65
|
-
export declare const MarkPaidInvoiceResponse$outboundSchema: z.ZodType<MarkPaidInvoiceResponse$Outbound, z.ZodTypeDef, MarkPaidInvoiceResponse>;
|
|
66
|
-
export declare function markPaidInvoiceResponseToJSON(markPaidInvoiceResponse: MarkPaidInvoiceResponse): string;
|
|
67
|
-
export declare function markPaidInvoiceResponseFromJSON(jsonString: string): SafeParseResult<MarkPaidInvoiceResponse, SDKValidationError>;
|
|
68
|
-
//# sourceMappingURL=markp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ACD,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAM9D"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.MarkPaidInvoiceResponse$outboundSchema = exports.MarkPaidInvoiceResponse$inboundSchema = exports.MarkPaidInvoiceRequest$outboundSchema = exports.MarkPaidInvoiceRequest$inboundSchema = exports.MarkPaidInvoiceGlobals$outboundSchema = exports.MarkPaidInvoiceGlobals$inboundSchema = void 0;
|
|
40
|
-
exports.markPaidInvoiceGlobalsToJSON = markPaidInvoiceGlobalsToJSON;
|
|
41
|
-
exports.markPaidInvoiceGlobalsFromJSON = markPaidInvoiceGlobalsFromJSON;
|
|
42
|
-
exports.markPaidInvoiceRequestToJSON = markPaidInvoiceRequestToJSON;
|
|
43
|
-
exports.markPaidInvoiceRequestFromJSON = markPaidInvoiceRequestFromJSON;
|
|
44
|
-
exports.markPaidInvoiceResponseToJSON = markPaidInvoiceResponseToJSON;
|
|
45
|
-
exports.markPaidInvoiceResponseFromJSON = markPaidInvoiceResponseFromJSON;
|
|
46
|
-
const z = __importStar(require("zod/v3"));
|
|
47
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
48
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
49
|
-
const components = __importStar(require("../components/index.js"));
|
|
50
|
-
/** @internal */
|
|
51
|
-
exports.MarkPaidInvoiceGlobals$inboundSchema = z.object({
|
|
52
|
-
"X-Moov-Version": z.string().optional(),
|
|
53
|
-
}).transform((v) => {
|
|
54
|
-
return (0, primitives_js_1.remap)(v, {
|
|
55
|
-
"X-Moov-Version": "xMoovVersion",
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
/** @internal */
|
|
59
|
-
exports.MarkPaidInvoiceGlobals$outboundSchema = z.object({
|
|
60
|
-
xMoovVersion: z.string().optional(),
|
|
61
|
-
}).transform((v) => {
|
|
62
|
-
return (0, primitives_js_1.remap)(v, {
|
|
63
|
-
xMoovVersion: "X-Moov-Version",
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
function markPaidInvoiceGlobalsToJSON(markPaidInvoiceGlobals) {
|
|
67
|
-
return JSON.stringify(exports.MarkPaidInvoiceGlobals$outboundSchema.parse(markPaidInvoiceGlobals));
|
|
68
|
-
}
|
|
69
|
-
function markPaidInvoiceGlobalsFromJSON(jsonString) {
|
|
70
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MarkPaidInvoiceGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MarkPaidInvoiceGlobals' from JSON`);
|
|
71
|
-
}
|
|
72
|
-
/** @internal */
|
|
73
|
-
exports.MarkPaidInvoiceRequest$inboundSchema = z.object({
|
|
74
|
-
accountID: z.string(),
|
|
75
|
-
invoiceID: z.string(),
|
|
76
|
-
MarkInvoicePaid: components.MarkInvoicePaid$inboundSchema,
|
|
77
|
-
}).transform((v) => {
|
|
78
|
-
return (0, primitives_js_1.remap)(v, {
|
|
79
|
-
"MarkInvoicePaid": "markInvoicePaid",
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
/** @internal */
|
|
83
|
-
exports.MarkPaidInvoiceRequest$outboundSchema = z.object({
|
|
84
|
-
accountID: z.string(),
|
|
85
|
-
invoiceID: z.string(),
|
|
86
|
-
markInvoicePaid: components.MarkInvoicePaid$outboundSchema,
|
|
87
|
-
}).transform((v) => {
|
|
88
|
-
return (0, primitives_js_1.remap)(v, {
|
|
89
|
-
markInvoicePaid: "MarkInvoicePaid",
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
function markPaidInvoiceRequestToJSON(markPaidInvoiceRequest) {
|
|
93
|
-
return JSON.stringify(exports.MarkPaidInvoiceRequest$outboundSchema.parse(markPaidInvoiceRequest));
|
|
94
|
-
}
|
|
95
|
-
function markPaidInvoiceRequestFromJSON(jsonString) {
|
|
96
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MarkPaidInvoiceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MarkPaidInvoiceRequest' from JSON`);
|
|
97
|
-
}
|
|
98
|
-
/** @internal */
|
|
99
|
-
exports.MarkPaidInvoiceResponse$inboundSchema = z.object({
|
|
100
|
-
Headers: z.record(z.array(z.string())).default({}),
|
|
101
|
-
Result: components.Invoice$inboundSchema,
|
|
102
|
-
}).transform((v) => {
|
|
103
|
-
return (0, primitives_js_1.remap)(v, {
|
|
104
|
-
"Headers": "headers",
|
|
105
|
-
"Result": "result",
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
/** @internal */
|
|
109
|
-
exports.MarkPaidInvoiceResponse$outboundSchema = z.object({
|
|
110
|
-
headers: z.record(z.array(z.string())),
|
|
111
|
-
result: components.Invoice$outboundSchema,
|
|
112
|
-
}).transform((v) => {
|
|
113
|
-
return (0, primitives_js_1.remap)(v, {
|
|
114
|
-
headers: "Headers",
|
|
115
|
-
result: "Result",
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
function markPaidInvoiceResponseToJSON(markPaidInvoiceResponse) {
|
|
119
|
-
return JSON.stringify(exports.MarkPaidInvoiceResponse$outboundSchema.parse(markPaidInvoiceResponse));
|
|
120
|
-
}
|
|
121
|
-
function markPaidInvoiceResponseFromJSON(jsonString) {
|
|
122
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.MarkPaidInvoiceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MarkPaidInvoiceResponse' from JSON`);
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=markpaidinvoice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markpaidinvoice.js","sourceRoot":"","sources":["../../src/models/operations/markpaidinvoice.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEH,oEAMC;AACD,wEAQC;AAsCD,oEAMC;AACD,wEAQC;AAqCD,sEAMC;AACD,0EAQC;AA1LD,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AAC;AAOH,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACtC,MAAM,EAAE,UAAU,CAAC,sBAAsB;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,QAAQ;KACjB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,6BAA6B,CAC3C,uBAAgD;IAEhD,OAAO,IAAI,CAAC,SAAS,CACnB,8CAAsC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACtE,CAAC;AACJ,CAAC;AACD,SAAgB,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,6CAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { MoovCore } from "../core.js";
|
|
6
|
-
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { MoovError } from "../models/errors/mooverror.js";
|
|
22
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
-
import * as operations from "../models/operations/index.js";
|
|
25
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
-
import { Result } from "../types/fp.js";
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Marks an invoice as paid outside of the Moov platform.
|
|
30
|
-
* If a payment link was created, the corresponding payment link is canceled, but a receipt is still sent.
|
|
31
|
-
*
|
|
32
|
-
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
33
|
-
* you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
|
|
34
|
-
*/
|
|
35
|
-
export function invoicesMarkPaidInvoice(
|
|
36
|
-
client: MoovCore,
|
|
37
|
-
request: operations.MarkPaidInvoiceRequest,
|
|
38
|
-
options?: RequestOptions,
|
|
39
|
-
): APIPromise<
|
|
40
|
-
Result<
|
|
41
|
-
operations.MarkPaidInvoiceResponse,
|
|
42
|
-
| errors.GenericError
|
|
43
|
-
| errors.MarkInvoicePaidError
|
|
44
|
-
| MoovError
|
|
45
|
-
| ResponseValidationError
|
|
46
|
-
| ConnectionError
|
|
47
|
-
| RequestAbortedError
|
|
48
|
-
| RequestTimeoutError
|
|
49
|
-
| InvalidRequestError
|
|
50
|
-
| UnexpectedClientError
|
|
51
|
-
| SDKValidationError
|
|
52
|
-
>
|
|
53
|
-
> {
|
|
54
|
-
return new APIPromise($do(
|
|
55
|
-
client,
|
|
56
|
-
request,
|
|
57
|
-
options,
|
|
58
|
-
));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async function $do(
|
|
62
|
-
client: MoovCore,
|
|
63
|
-
request: operations.MarkPaidInvoiceRequest,
|
|
64
|
-
options?: RequestOptions,
|
|
65
|
-
): Promise<
|
|
66
|
-
[
|
|
67
|
-
Result<
|
|
68
|
-
operations.MarkPaidInvoiceResponse,
|
|
69
|
-
| errors.GenericError
|
|
70
|
-
| errors.MarkInvoicePaidError
|
|
71
|
-
| MoovError
|
|
72
|
-
| ResponseValidationError
|
|
73
|
-
| ConnectionError
|
|
74
|
-
| RequestAbortedError
|
|
75
|
-
| RequestTimeoutError
|
|
76
|
-
| InvalidRequestError
|
|
77
|
-
| UnexpectedClientError
|
|
78
|
-
| SDKValidationError
|
|
79
|
-
>,
|
|
80
|
-
APICall,
|
|
81
|
-
]
|
|
82
|
-
> {
|
|
83
|
-
const parsed = safeParse(
|
|
84
|
-
request,
|
|
85
|
-
(value) => operations.MarkPaidInvoiceRequest$outboundSchema.parse(value),
|
|
86
|
-
"Input validation failed",
|
|
87
|
-
);
|
|
88
|
-
if (!parsed.ok) {
|
|
89
|
-
return [parsed, { status: "invalid" }];
|
|
90
|
-
}
|
|
91
|
-
const payload = parsed.value;
|
|
92
|
-
const body = encodeJSON("body", payload.MarkInvoicePaid, { explode: true });
|
|
93
|
-
|
|
94
|
-
const pathParams = {
|
|
95
|
-
accountID: encodeSimple("accountID", payload.accountID, {
|
|
96
|
-
explode: false,
|
|
97
|
-
charEncoding: "percent",
|
|
98
|
-
}),
|
|
99
|
-
invoiceID: encodeSimple("invoiceID", payload.invoiceID, {
|
|
100
|
-
explode: false,
|
|
101
|
-
charEncoding: "percent",
|
|
102
|
-
}),
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const path = pathToFunc(
|
|
106
|
-
"/accounts/{accountID}/invoices/{invoiceID}/mark-paid",
|
|
107
|
-
)(pathParams);
|
|
108
|
-
|
|
109
|
-
const headers = new Headers(compactMap({
|
|
110
|
-
"Content-Type": "application/json",
|
|
111
|
-
Accept: "application/json",
|
|
112
|
-
"X-Moov-Version": encodeSimple(
|
|
113
|
-
"X-Moov-Version",
|
|
114
|
-
client._options.xMoovVersion,
|
|
115
|
-
{ explode: false, charEncoding: "none" },
|
|
116
|
-
),
|
|
117
|
-
}));
|
|
118
|
-
|
|
119
|
-
const securityInput = await extractSecurity(client._options.security);
|
|
120
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
121
|
-
|
|
122
|
-
const context = {
|
|
123
|
-
options: client._options,
|
|
124
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
125
|
-
operationID: "markPaidInvoice",
|
|
126
|
-
oAuth2Scopes: null,
|
|
127
|
-
|
|
128
|
-
resolvedSecurity: requestSecurity,
|
|
129
|
-
|
|
130
|
-
securitySource: client._options.security,
|
|
131
|
-
retryConfig: options?.retries
|
|
132
|
-
|| client._options.retryConfig
|
|
133
|
-
|| { strategy: "none" },
|
|
134
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
const requestRes = client._createRequest(context, {
|
|
138
|
-
security: requestSecurity,
|
|
139
|
-
method: "PUT",
|
|
140
|
-
baseURL: options?.serverURL,
|
|
141
|
-
path: path,
|
|
142
|
-
headers: headers,
|
|
143
|
-
body: body,
|
|
144
|
-
userAgent: client._options.userAgent,
|
|
145
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
146
|
-
}, options);
|
|
147
|
-
if (!requestRes.ok) {
|
|
148
|
-
return [requestRes, { status: "invalid" }];
|
|
149
|
-
}
|
|
150
|
-
const req = requestRes.value;
|
|
151
|
-
|
|
152
|
-
const doResult = await client._do(req, {
|
|
153
|
-
context,
|
|
154
|
-
errorCodes: [
|
|
155
|
-
"400",
|
|
156
|
-
"401",
|
|
157
|
-
"403",
|
|
158
|
-
"404",
|
|
159
|
-
"409",
|
|
160
|
-
"422",
|
|
161
|
-
"429",
|
|
162
|
-
"4XX",
|
|
163
|
-
"500",
|
|
164
|
-
"504",
|
|
165
|
-
"5XX",
|
|
166
|
-
],
|
|
167
|
-
retryConfig: context.retryConfig,
|
|
168
|
-
retryCodes: context.retryCodes,
|
|
169
|
-
});
|
|
170
|
-
if (!doResult.ok) {
|
|
171
|
-
return [doResult, { status: "request-error", request: req }];
|
|
172
|
-
}
|
|
173
|
-
const response = doResult.value;
|
|
174
|
-
|
|
175
|
-
const responseFields = {
|
|
176
|
-
HttpMeta: { Response: response, Request: req },
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
const [result] = await M.match<
|
|
180
|
-
operations.MarkPaidInvoiceResponse,
|
|
181
|
-
| errors.GenericError
|
|
182
|
-
| errors.MarkInvoicePaidError
|
|
183
|
-
| MoovError
|
|
184
|
-
| ResponseValidationError
|
|
185
|
-
| ConnectionError
|
|
186
|
-
| RequestAbortedError
|
|
187
|
-
| RequestTimeoutError
|
|
188
|
-
| InvalidRequestError
|
|
189
|
-
| UnexpectedClientError
|
|
190
|
-
| SDKValidationError
|
|
191
|
-
>(
|
|
192
|
-
M.json(200, operations.MarkPaidInvoiceResponse$inboundSchema, {
|
|
193
|
-
hdrs: true,
|
|
194
|
-
key: "Result",
|
|
195
|
-
}),
|
|
196
|
-
M.jsonErr([400, 409], errors.GenericError$inboundSchema, { hdrs: true }),
|
|
197
|
-
M.jsonErr(422, errors.MarkInvoicePaidError$inboundSchema, { hdrs: true }),
|
|
198
|
-
M.fail([401, 403, 404, 429]),
|
|
199
|
-
M.fail([500, 504]),
|
|
200
|
-
M.fail("4XX"),
|
|
201
|
-
M.fail("5XX"),
|
|
202
|
-
)(response, req, { extraFields: responseFields });
|
|
203
|
-
if (!result.ok) {
|
|
204
|
-
return [result, { status: "complete", request: req, response }];
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
return [result, { status: "complete", request: req, response }];
|
|
208
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { invoicesMarkPaidInvoice } from "../../funcs/invoicesMarkPaidInvoice.js";
|
|
6
|
-
import * as operations from "../../models/operations/index.js";
|
|
7
|
-
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
-
|
|
9
|
-
const args = {
|
|
10
|
-
request: operations.MarkPaidInvoiceRequest$inboundSchema,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const tool$invoicesMarkPaidInvoice: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "invoices-mark-paid-invoice",
|
|
15
|
-
description: `Marks an invoice as paid outside of the Moov platform.
|
|
16
|
-
If a payment link was created, the corresponding payment link is canceled, but a receipt is still sent.
|
|
17
|
-
|
|
18
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
19
|
-
you'll need to specify the \`/accounts/{accountID}/invoices.write\` scope.`,
|
|
20
|
-
args,
|
|
21
|
-
tool: async (client, args, ctx) => {
|
|
22
|
-
const [result, apiCall] = await invoicesMarkPaidInvoice(
|
|
23
|
-
client,
|
|
24
|
-
args.request,
|
|
25
|
-
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
-
).$inspect();
|
|
27
|
-
|
|
28
|
-
if (!result.ok) {
|
|
29
|
-
return {
|
|
30
|
-
content: [{ type: "text", text: result.error.message }],
|
|
31
|
-
isError: true,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const value = result.value.result;
|
|
36
|
-
|
|
37
|
-
return formatResult(value, apiCall);
|
|
38
|
-
},
|
|
39
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
|
|
10
|
-
export type MarkInvoicePaid = {
|
|
11
|
-
foreignID?: string | undefined;
|
|
12
|
-
description?: string | undefined;
|
|
13
|
-
paymentDate?: Date | undefined;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
/** @internal */
|
|
17
|
-
export const MarkInvoicePaid$inboundSchema: z.ZodType<
|
|
18
|
-
MarkInvoicePaid,
|
|
19
|
-
z.ZodTypeDef,
|
|
20
|
-
unknown
|
|
21
|
-
> = z.object({
|
|
22
|
-
foreignID: z.string().optional(),
|
|
23
|
-
description: z.string().optional(),
|
|
24
|
-
paymentDate: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
25
|
-
.optional(),
|
|
26
|
-
});
|
|
27
|
-
/** @internal */
|
|
28
|
-
export type MarkInvoicePaid$Outbound = {
|
|
29
|
-
foreignID?: string | undefined;
|
|
30
|
-
description?: string | undefined;
|
|
31
|
-
paymentDate?: string | undefined;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const MarkInvoicePaid$outboundSchema: z.ZodType<
|
|
36
|
-
MarkInvoicePaid$Outbound,
|
|
37
|
-
z.ZodTypeDef,
|
|
38
|
-
MarkInvoicePaid
|
|
39
|
-
> = z.object({
|
|
40
|
-
foreignID: z.string().optional(),
|
|
41
|
-
description: z.string().optional(),
|
|
42
|
-
paymentDate: z.date().transform(v => v.toISOString()).optional(),
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export function markInvoicePaidToJSON(
|
|
46
|
-
markInvoicePaid: MarkInvoicePaid,
|
|
47
|
-
): string {
|
|
48
|
-
return JSON.stringify(MarkInvoicePaid$outboundSchema.parse(markInvoicePaid));
|
|
49
|
-
}
|
|
50
|
-
export function markInvoicePaidFromJSON(
|
|
51
|
-
jsonString: string,
|
|
52
|
-
): SafeParseResult<MarkInvoicePaid, SDKValidationError> {
|
|
53
|
-
return safeParse(
|
|
54
|
-
jsonString,
|
|
55
|
-
(x) => MarkInvoicePaid$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
-
`Failed to parse 'MarkInvoicePaid' from JSON`,
|
|
57
|
-
);
|
|
58
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
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
|
-
AmountDecimalValidationError,
|
|
11
|
-
AmountDecimalValidationError$inboundSchema,
|
|
12
|
-
AmountDecimalValidationError$Outbound,
|
|
13
|
-
AmountDecimalValidationError$outboundSchema,
|
|
14
|
-
} from "./amountdecimalvalidationerror.js";
|
|
15
|
-
|
|
16
|
-
export type TransferLineItemOptionValidationError = {
|
|
17
|
-
name?: string | undefined;
|
|
18
|
-
group?: string | undefined;
|
|
19
|
-
priceModifier?: AmountDecimalValidationError | undefined;
|
|
20
|
-
quantity?: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export const TransferLineItemOptionValidationError$inboundSchema: z.ZodType<
|
|
25
|
-
TransferLineItemOptionValidationError,
|
|
26
|
-
z.ZodTypeDef,
|
|
27
|
-
unknown
|
|
28
|
-
> = z.object({
|
|
29
|
-
name: z.string().optional(),
|
|
30
|
-
group: z.string().optional(),
|
|
31
|
-
priceModifier: AmountDecimalValidationError$inboundSchema.optional(),
|
|
32
|
-
quantity: z.string().optional(),
|
|
33
|
-
});
|
|
34
|
-
/** @internal */
|
|
35
|
-
export type TransferLineItemOptionValidationError$Outbound = {
|
|
36
|
-
name?: string | undefined;
|
|
37
|
-
group?: string | undefined;
|
|
38
|
-
priceModifier?: AmountDecimalValidationError$Outbound | undefined;
|
|
39
|
-
quantity?: string | undefined;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/** @internal */
|
|
43
|
-
export const TransferLineItemOptionValidationError$outboundSchema: z.ZodType<
|
|
44
|
-
TransferLineItemOptionValidationError$Outbound,
|
|
45
|
-
z.ZodTypeDef,
|
|
46
|
-
TransferLineItemOptionValidationError
|
|
47
|
-
> = z.object({
|
|
48
|
-
name: z.string().optional(),
|
|
49
|
-
group: z.string().optional(),
|
|
50
|
-
priceModifier: AmountDecimalValidationError$outboundSchema.optional(),
|
|
51
|
-
quantity: z.string().optional(),
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
export function transferLineItemOptionValidationErrorToJSON(
|
|
55
|
-
transferLineItemOptionValidationError: TransferLineItemOptionValidationError,
|
|
56
|
-
): string {
|
|
57
|
-
return JSON.stringify(
|
|
58
|
-
TransferLineItemOptionValidationError$outboundSchema.parse(
|
|
59
|
-
transferLineItemOptionValidationError,
|
|
60
|
-
),
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
export function transferLineItemOptionValidationErrorFromJSON(
|
|
64
|
-
jsonString: string,
|
|
65
|
-
): SafeParseResult<TransferLineItemOptionValidationError, SDKValidationError> {
|
|
66
|
-
return safeParse(
|
|
67
|
-
jsonString,
|
|
68
|
-
(x) =>
|
|
69
|
-
TransferLineItemOptionValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
-
`Failed to parse 'TransferLineItemOptionValidationError' from JSON`,
|
|
71
|
-
);
|
|
72
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
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
|
-
TransferLineItemValidationError,
|
|
11
|
-
TransferLineItemValidationError$inboundSchema,
|
|
12
|
-
TransferLineItemValidationError$Outbound,
|
|
13
|
-
TransferLineItemValidationError$outboundSchema,
|
|
14
|
-
} from "./transferlineitemvalidationerror.js";
|
|
15
|
-
|
|
16
|
-
export type TransferLineItemsValidationError = {
|
|
17
|
-
items?: { [k: string]: TransferLineItemValidationError } | undefined;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const TransferLineItemsValidationError$inboundSchema: z.ZodType<
|
|
22
|
-
TransferLineItemsValidationError,
|
|
23
|
-
z.ZodTypeDef,
|
|
24
|
-
unknown
|
|
25
|
-
> = z.object({
|
|
26
|
-
items: z.record(TransferLineItemValidationError$inboundSchema).optional(),
|
|
27
|
-
});
|
|
28
|
-
/** @internal */
|
|
29
|
-
export type TransferLineItemsValidationError$Outbound = {
|
|
30
|
-
items?: { [k: string]: TransferLineItemValidationError$Outbound } | undefined;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/** @internal */
|
|
34
|
-
export const TransferLineItemsValidationError$outboundSchema: z.ZodType<
|
|
35
|
-
TransferLineItemsValidationError$Outbound,
|
|
36
|
-
z.ZodTypeDef,
|
|
37
|
-
TransferLineItemsValidationError
|
|
38
|
-
> = z.object({
|
|
39
|
-
items: z.record(TransferLineItemValidationError$outboundSchema).optional(),
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
export function transferLineItemsValidationErrorToJSON(
|
|
43
|
-
transferLineItemsValidationError: TransferLineItemsValidationError,
|
|
44
|
-
): string {
|
|
45
|
-
return JSON.stringify(
|
|
46
|
-
TransferLineItemsValidationError$outboundSchema.parse(
|
|
47
|
-
transferLineItemsValidationError,
|
|
48
|
-
),
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
export function transferLineItemsValidationErrorFromJSON(
|
|
52
|
-
jsonString: string,
|
|
53
|
-
): SafeParseResult<TransferLineItemsValidationError, SDKValidationError> {
|
|
54
|
-
return safeParse(
|
|
55
|
-
jsonString,
|
|
56
|
-
(x) => TransferLineItemsValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
-
`Failed to parse 'TransferLineItemsValidationError' from JSON`,
|
|
58
|
-
);
|
|
59
|
-
}
|