@moovio/sdk 0.22.11 → 0.22.13
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 +91 -51
- package/bin/mcp-server.js +2557 -621
- package/bin/mcp-server.js.map +59 -16
- package/examples/package-lock.json +1 -1
- package/funcs/invoicesCreateInvoicePayment.d.ts +19 -0
- package/funcs/invoicesCreateInvoicePayment.d.ts.map +1 -0
- package/funcs/invoicesCreateInvoicePayment.js +148 -0
- package/funcs/invoicesCreateInvoicePayment.js.map +1 -0
- package/funcs/invoicesListInvoicePayments.d.ts +17 -0
- package/funcs/invoicesListInvoicePayments.d.ts.map +1 -0
- package/funcs/invoicesListInvoicePayments.js +129 -0
- package/funcs/invoicesListInvoicePayments.js.map +1 -0
- package/funcs/webhooksCreate.d.ts +16 -0
- package/funcs/webhooksCreate.d.ts.map +1 -0
- package/funcs/webhooksCreate.js +133 -0
- package/funcs/webhooksCreate.js.map +1 -0
- package/funcs/webhooksDisable.d.ts +15 -0
- package/funcs/webhooksDisable.d.ts.map +1 -0
- package/funcs/webhooksDisable.js +133 -0
- package/funcs/webhooksDisable.js.map +1 -0
- package/funcs/webhooksGet.d.ts +14 -0
- package/funcs/webhooksGet.d.ts.map +1 -0
- package/funcs/webhooksGet.js +122 -0
- package/funcs/webhooksGet.js.map +1 -0
- package/funcs/webhooksGetSecret.d.ts +14 -0
- package/funcs/webhooksGetSecret.d.ts.map +1 -0
- package/funcs/webhooksGetSecret.js +122 -0
- package/funcs/webhooksGetSecret.js.map +1 -0
- package/funcs/webhooksList.d.ts +14 -0
- package/funcs/webhooksList.d.ts.map +1 -0
- package/funcs/webhooksList.js +108 -0
- package/funcs/webhooksList.js.map +1 -0
- package/funcs/webhooksListEventTypes.d.ts +14 -0
- package/funcs/webhooksListEventTypes.d.ts.map +1 -0
- package/funcs/webhooksListEventTypes.js +108 -0
- package/funcs/webhooksListEventTypes.js.map +1 -0
- package/funcs/webhooksPing.d.ts +14 -0
- package/funcs/webhooksPing.d.ts.map +1 -0
- package/funcs/webhooksPing.js +122 -0
- package/funcs/webhooksPing.js.map +1 -0
- package/funcs/webhooksUpdate.d.ts +15 -0
- package/funcs/webhooksUpdate.d.ts.map +1 -0
- package/funcs/webhooksUpdate.js +138 -0
- package/funcs/webhooksUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +21 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/invoicesCreateInvoicePayment.d.ts +8 -0
- package/mcp-server/tools/invoicesCreateInvoicePayment.d.ts.map +1 -0
- package/mcp-server/tools/invoicesCreateInvoicePayment.js +66 -0
- package/mcp-server/tools/invoicesCreateInvoicePayment.js.map +1 -0
- package/mcp-server/tools/invoicesListInvoicePayments.d.ts +8 -0
- package/mcp-server/tools/invoicesListInvoicePayments.d.ts.map +1 -0
- package/mcp-server/tools/invoicesListInvoicePayments.js +65 -0
- package/mcp-server/tools/invoicesListInvoicePayments.js.map +1 -0
- package/mcp-server/tools/webhooksCreate.d.ts +8 -0
- package/mcp-server/tools/webhooksCreate.d.ts.map +1 -0
- package/mcp-server/tools/webhooksCreate.js +62 -0
- package/mcp-server/tools/webhooksCreate.js.map +1 -0
- package/mcp-server/tools/webhooksDisable.d.ts +8 -0
- package/mcp-server/tools/webhooksDisable.d.ts.map +1 -0
- package/mcp-server/tools/webhooksDisable.js +61 -0
- package/mcp-server/tools/webhooksDisable.js.map +1 -0
- package/mcp-server/tools/webhooksGet.d.ts +8 -0
- package/mcp-server/tools/webhooksGet.d.ts.map +1 -0
- package/mcp-server/tools/webhooksGet.js +62 -0
- package/mcp-server/tools/webhooksGet.js.map +1 -0
- package/mcp-server/tools/webhooksGetSecret.d.ts +8 -0
- package/mcp-server/tools/webhooksGetSecret.d.ts.map +1 -0
- package/mcp-server/tools/webhooksGetSecret.js +62 -0
- package/mcp-server/tools/webhooksGetSecret.js.map +1 -0
- package/mcp-server/tools/webhooksList.d.ts +8 -0
- package/mcp-server/tools/webhooksList.d.ts.map +1 -0
- package/mcp-server/tools/webhooksList.js +62 -0
- package/mcp-server/tools/webhooksList.js.map +1 -0
- package/mcp-server/tools/webhooksListEventTypes.d.ts +8 -0
- package/mcp-server/tools/webhooksListEventTypes.d.ts.map +1 -0
- package/mcp-server/tools/webhooksListEventTypes.js +62 -0
- package/mcp-server/tools/webhooksListEventTypes.js.map +1 -0
- package/mcp-server/tools/webhooksPing.d.ts +8 -0
- package/mcp-server/tools/webhooksPing.d.ts.map +1 -0
- package/mcp-server/tools/webhooksPing.js +62 -0
- package/mcp-server/tools/webhooksPing.js.map +1 -0
- package/mcp-server/tools/webhooksUpdate.d.ts +8 -0
- package/mcp-server/tools/webhooksUpdate.d.ts.map +1 -0
- package/mcp-server/tools/webhooksUpdate.js +62 -0
- package/mcp-server/tools/webhooksUpdate.js.map +1 -0
- package/models/components/achtransactiondetails.d.ts +3 -0
- package/models/components/achtransactiondetails.d.ts.map +1 -1
- package/models/components/achtransactiondetails.js +3 -0
- package/models/components/achtransactiondetails.js.map +1 -1
- package/models/components/createinvoicepayment.d.ts +21 -0
- package/models/components/createinvoicepayment.d.ts.map +1 -0
- package/models/components/createinvoicepayment.js +63 -0
- package/models/components/createinvoicepayment.js.map +1 -0
- package/models/components/createtransferachaddendarecord.d.ts +23 -0
- package/models/components/createtransferachaddendarecord.d.ts.map +1 -0
- package/models/components/createtransferachaddendarecord.js +58 -0
- package/models/components/createtransferachaddendarecord.js.map +1 -0
- package/models/components/createtransferdestinationach.d.ts +3 -0
- package/models/components/createtransferdestinationach.d.ts.map +1 -1
- package/models/components/createtransferdestinationach.js +3 -0
- package/models/components/createtransferdestinationach.js.map +1 -1
- package/models/components/createtransfersourceach.d.ts +3 -0
- package/models/components/createtransfersourceach.d.ts.map +1 -1
- package/models/components/createtransfersourceach.js +3 -0
- package/models/components/createtransfersourceach.js.map +1 -1
- package/models/components/createwebhook.d.ts +40 -0
- package/models/components/createwebhook.d.ts.map +1 -0
- package/models/components/createwebhook.js +66 -0
- package/models/components/createwebhook.js.map +1 -0
- package/models/components/eventtype.d.ts +33 -0
- package/models/components/eventtype.d.ts.map +1 -0
- package/models/components/eventtype.js +62 -0
- package/models/components/eventtype.js.map +1 -0
- package/models/components/index.d.ts +10 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +10 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoiceexternalpayment.d.ts +0 -11
- package/models/components/invoiceexternalpayment.d.ts.map +1 -1
- package/models/components/invoiceexternalpayment.js +1 -10
- package/models/components/invoiceexternalpayment.js.map +1 -1
- package/models/components/invoicepayment.d.ts +4 -2
- package/models/components/invoicepayment.d.ts.map +1 -1
- package/models/components/invoicepayment.js +4 -2
- package/models/components/invoicepayment.js.map +1 -1
- package/models/components/invoicetransferpayment.d.ts +0 -11
- package/models/components/invoicetransferpayment.d.ts.map +1 -1
- package/models/components/invoicetransferpayment.js +1 -11
- package/models/components/invoicetransferpayment.js.map +1 -1
- package/models/components/pingresponse.d.ts +38 -0
- package/models/components/pingresponse.d.ts.map +1 -0
- package/models/components/pingresponse.js +63 -0
- package/models/components/pingresponse.js.map +1 -0
- package/models/components/transferachaddendarecord.d.ts +28 -0
- package/models/components/transferachaddendarecord.d.ts.map +1 -0
- package/models/components/transferachaddendarecord.js +60 -0
- package/models/components/transferachaddendarecord.js.map +1 -0
- package/models/components/updatewebhook.d.ts +40 -0
- package/models/components/updatewebhook.d.ts.map +1 -0
- package/models/components/updatewebhook.js +66 -0
- package/models/components/updatewebhook.js.map +1 -0
- package/models/components/webhook.d.ts +60 -0
- package/models/components/webhook.d.ts.map +1 -0
- package/models/components/webhook.js +74 -0
- package/models/components/webhook.js.map +1 -0
- package/models/components/webhooksecret.d.ts +23 -0
- package/models/components/webhooksecret.d.ts.map +1 -0
- package/models/components/webhooksecret.js +58 -0
- package/models/components/webhooksecret.js.map +1 -0
- package/models/components/webhookstatus.d.ts +18 -0
- package/models/components/webhookstatus.d.ts.map +1 -0
- package/models/components/webhookstatus.js +52 -0
- package/models/components/webhookstatus.js.map +1 -0
- package/models/errors/createinvoicepaymenterror.d.ts +30 -0
- package/models/errors/createinvoicepaymenterror.d.ts.map +1 -0
- package/models/errors/createinvoicepaymenterror.js +83 -0
- package/models/errors/createinvoicepaymenterror.js.map +1 -0
- package/models/errors/createwebhookvalidationerror.d.ts +57 -0
- package/models/errors/createwebhookvalidationerror.d.ts.map +1 -0
- package/models/errors/createwebhookvalidationerror.js +87 -0
- package/models/errors/createwebhookvalidationerror.js.map +1 -0
- package/models/errors/index.d.ts +3 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +3 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/updatewebhookvalidationerror.d.ts +57 -0
- package/models/errors/updatewebhookvalidationerror.d.ts.map +1 -0
- package/models/errors/updatewebhookvalidationerror.js +87 -0
- package/models/errors/updatewebhookvalidationerror.js.map +1 -0
- package/models/operations/createinvoicepayment.d.ts +68 -0
- package/models/operations/createinvoicepayment.d.ts.map +1 -0
- package/models/operations/createinvoicepayment.js +124 -0
- package/models/operations/createinvoicepayment.js.map +1 -0
- package/models/operations/createwebhook.d.ts +51 -0
- package/models/operations/createwebhook.d.ts.map +1 -0
- package/models/operations/createwebhook.js +96 -0
- package/models/operations/createwebhook.js.map +1 -0
- package/models/operations/disablewebhook.d.ts +61 -0
- package/models/operations/disablewebhook.d.ts.map +1 -0
- package/models/operations/disablewebhook.js +107 -0
- package/models/operations/disablewebhook.js.map +1 -0
- package/models/operations/getwebhook.d.ts +64 -0
- package/models/operations/getwebhook.d.ts.map +1 -0
- package/models/operations/getwebhook.js +112 -0
- package/models/operations/getwebhook.js.map +1 -0
- package/models/operations/getwebhooksecret.d.ts +64 -0
- package/models/operations/getwebhooksecret.d.ts.map +1 -0
- package/models/operations/getwebhooksecret.js +112 -0
- package/models/operations/getwebhooksecret.js.map +1 -0
- package/models/operations/index.d.ts +10 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +10 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listeventtypes.d.ts +60 -0
- package/models/operations/listeventtypes.d.ts.map +1 -0
- package/models/operations/listeventtypes.js +108 -0
- package/models/operations/listeventtypes.js.map +1 -0
- package/models/operations/listinvoicepayments.d.ts +66 -0
- package/models/operations/listinvoicepayments.d.ts.map +1 -0
- package/models/operations/listinvoicepayments.js +114 -0
- package/models/operations/listinvoicepayments.js.map +1 -0
- package/models/operations/listwebhooks.d.ts +60 -0
- package/models/operations/listwebhooks.d.ts.map +1 -0
- package/models/operations/listwebhooks.js +108 -0
- package/models/operations/listwebhooks.js.map +1 -0
- package/models/operations/pingwebhook.d.ts +64 -0
- package/models/operations/pingwebhook.d.ts.map +1 -0
- package/models/operations/pingwebhook.js +112 -0
- package/models/operations/pingwebhook.js.map +1 -0
- package/models/operations/updatewebhook.d.ts +66 -0
- package/models/operations/updatewebhook.d.ts.map +1 -0
- package/models/operations/updatewebhook.js +122 -0
- package/models/operations/updatewebhook.js.map +1 -0
- package/package.json +1 -1
- package/sdk/invoices.d.ts +15 -0
- package/sdk/invoices.d.ts.map +1 -1
- package/sdk/invoices.js +21 -0
- package/sdk/invoices.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/webhooks.d.ts +38 -0
- package/sdk/webhooks.d.ts.map +1 -0
- package/sdk/webhooks.js +68 -0
- package/sdk/webhooks.js.map +1 -0
- package/src/funcs/invoicesCreateInvoicePayment.ts +213 -0
- package/src/funcs/invoicesListInvoicePayments.ts +186 -0
- package/src/funcs/webhooksCreate.ts +194 -0
- package/src/funcs/webhooksDisable.ts +191 -0
- package/src/funcs/webhooksGet.ts +176 -0
- package/src/funcs/webhooksGetSecret.ts +176 -0
- package/src/funcs/webhooksList.ts +156 -0
- package/src/funcs/webhooksListEventTypes.ts +156 -0
- package/src/funcs/webhooksPing.ts +176 -0
- package/src/funcs/webhooksUpdate.ts +200 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +21 -1
- package/src/mcp-server/tools/invoicesCreateInvoicePayment.ts +40 -0
- package/src/mcp-server/tools/invoicesListInvoicePayments.ts +38 -0
- package/src/mcp-server/tools/webhooksCreate.ts +35 -0
- package/src/mcp-server/tools/webhooksDisable.ts +34 -0
- package/src/mcp-server/tools/webhooksGet.ts +35 -0
- package/src/mcp-server/tools/webhooksGetSecret.ts +35 -0
- package/src/mcp-server/tools/webhooksList.ts +35 -0
- package/src/mcp-server/tools/webhooksListEventTypes.ts +35 -0
- package/src/mcp-server/tools/webhooksPing.ts +36 -0
- package/src/mcp-server/tools/webhooksUpdate.ts +35 -0
- package/src/models/components/achtransactiondetails.ts +10 -0
- package/src/models/components/createinvoicepayment.ts +60 -0
- package/src/models/components/createtransferachaddendarecord.ts +59 -0
- package/src/models/components/createtransferdestinationach.ts +10 -0
- package/src/models/components/createtransfersourceach.ts +10 -0
- package/src/models/components/createwebhook.ts +84 -0
- package/src/models/components/eventtype.ts +67 -0
- package/src/models/components/index.ts +10 -0
- package/src/models/components/invoiceexternalpayment.ts +0 -21
- package/src/models/components/invoicepayment.ts +8 -4
- package/src/models/components/invoicetransferpayment.ts +0 -17
- package/src/models/components/pingresponse.ts +73 -0
- package/src/models/components/transferachaddendarecord.ts +64 -0
- package/src/models/components/updatewebhook.ts +84 -0
- package/src/models/components/webhook.ts +115 -0
- package/src/models/components/webhooksecret.ts +53 -0
- package/src/models/components/webhookstatus.ts +27 -0
- package/src/models/errors/createinvoicepaymenterror.ts +78 -0
- package/src/models/errors/createwebhookvalidationerror.ts +108 -0
- package/src/models/errors/index.ts +3 -0
- package/src/models/errors/updatewebhookvalidationerror.ts +108 -0
- package/src/models/operations/createinvoicepayment.ts +197 -0
- package/src/models/operations/createwebhook.ts +132 -0
- package/src/models/operations/disablewebhook.ts +168 -0
- package/src/models/operations/getwebhook.ts +175 -0
- package/src/models/operations/getwebhooksecret.ts +175 -0
- package/src/models/operations/index.ts +10 -0
- package/src/models/operations/listeventtypes.ts +167 -0
- package/src/models/operations/listinvoicepayments.ts +181 -0
- package/src/models/operations/listwebhooks.ts +167 -0
- package/src/models/operations/pingwebhook.ts +175 -0
- package/src/models/operations/updatewebhook.ts +187 -0
- package/src/sdk/invoices.ts +37 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/webhooks.ts +130 -0
|
@@ -0,0 +1,181 @@
|
|
|
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 ListInvoicePaymentsGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type ListInvoicePaymentsRequest = {
|
|
31
|
+
accountID: string;
|
|
32
|
+
invoiceID: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type ListInvoicePaymentsResponse = {
|
|
36
|
+
headers: { [k: string]: Array<string> };
|
|
37
|
+
result: Array<components.InvoicePayment>;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ListInvoicePaymentsGlobals$inboundSchema: z.ZodType<
|
|
42
|
+
ListInvoicePaymentsGlobals,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
"X-Moov-Version": z.string().optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
"X-Moov-Version": "xMoovVersion",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type ListInvoicePaymentsGlobals$Outbound = {
|
|
54
|
+
"X-Moov-Version"?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const ListInvoicePaymentsGlobals$outboundSchema: z.ZodType<
|
|
59
|
+
ListInvoicePaymentsGlobals$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
ListInvoicePaymentsGlobals
|
|
62
|
+
> = z.object({
|
|
63
|
+
xMoovVersion: z.string().optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
xMoovVersion: "X-Moov-Version",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export function listInvoicePaymentsGlobalsToJSON(
|
|
71
|
+
listInvoicePaymentsGlobals: ListInvoicePaymentsGlobals,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
ListInvoicePaymentsGlobals$outboundSchema.parse(listInvoicePaymentsGlobals),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export function listInvoicePaymentsGlobalsFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<ListInvoicePaymentsGlobals, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => ListInvoicePaymentsGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'ListInvoicePaymentsGlobals' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const ListInvoicePaymentsRequest$inboundSchema: z.ZodType<
|
|
89
|
+
ListInvoicePaymentsRequest,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
unknown
|
|
92
|
+
> = z.object({
|
|
93
|
+
accountID: z.string(),
|
|
94
|
+
invoiceID: z.string(),
|
|
95
|
+
});
|
|
96
|
+
/** @internal */
|
|
97
|
+
export type ListInvoicePaymentsRequest$Outbound = {
|
|
98
|
+
accountID: string;
|
|
99
|
+
invoiceID: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const ListInvoicePaymentsRequest$outboundSchema: z.ZodType<
|
|
104
|
+
ListInvoicePaymentsRequest$Outbound,
|
|
105
|
+
z.ZodTypeDef,
|
|
106
|
+
ListInvoicePaymentsRequest
|
|
107
|
+
> = z.object({
|
|
108
|
+
accountID: z.string(),
|
|
109
|
+
invoiceID: z.string(),
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export function listInvoicePaymentsRequestToJSON(
|
|
113
|
+
listInvoicePaymentsRequest: ListInvoicePaymentsRequest,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
ListInvoicePaymentsRequest$outboundSchema.parse(listInvoicePaymentsRequest),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
export function listInvoicePaymentsRequestFromJSON(
|
|
120
|
+
jsonString: string,
|
|
121
|
+
): SafeParseResult<ListInvoicePaymentsRequest, SDKValidationError> {
|
|
122
|
+
return safeParse(
|
|
123
|
+
jsonString,
|
|
124
|
+
(x) => ListInvoicePaymentsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
125
|
+
`Failed to parse 'ListInvoicePaymentsRequest' from JSON`,
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const ListInvoicePaymentsResponse$inboundSchema: z.ZodType<
|
|
131
|
+
ListInvoicePaymentsResponse,
|
|
132
|
+
z.ZodTypeDef,
|
|
133
|
+
unknown
|
|
134
|
+
> = z.object({
|
|
135
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
136
|
+
Result: z.array(components.InvoicePayment$inboundSchema),
|
|
137
|
+
}).transform((v) => {
|
|
138
|
+
return remap$(v, {
|
|
139
|
+
"Headers": "headers",
|
|
140
|
+
"Result": "result",
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
/** @internal */
|
|
144
|
+
export type ListInvoicePaymentsResponse$Outbound = {
|
|
145
|
+
Headers: { [k: string]: Array<string> };
|
|
146
|
+
Result: Array<components.InvoicePayment$Outbound>;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/** @internal */
|
|
150
|
+
export const ListInvoicePaymentsResponse$outboundSchema: z.ZodType<
|
|
151
|
+
ListInvoicePaymentsResponse$Outbound,
|
|
152
|
+
z.ZodTypeDef,
|
|
153
|
+
ListInvoicePaymentsResponse
|
|
154
|
+
> = z.object({
|
|
155
|
+
headers: z.record(z.array(z.string())),
|
|
156
|
+
result: z.array(components.InvoicePayment$outboundSchema),
|
|
157
|
+
}).transform((v) => {
|
|
158
|
+
return remap$(v, {
|
|
159
|
+
headers: "Headers",
|
|
160
|
+
result: "Result",
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
export function listInvoicePaymentsResponseToJSON(
|
|
165
|
+
listInvoicePaymentsResponse: ListInvoicePaymentsResponse,
|
|
166
|
+
): string {
|
|
167
|
+
return JSON.stringify(
|
|
168
|
+
ListInvoicePaymentsResponse$outboundSchema.parse(
|
|
169
|
+
listInvoicePaymentsResponse,
|
|
170
|
+
),
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
export function listInvoicePaymentsResponseFromJSON(
|
|
174
|
+
jsonString: string,
|
|
175
|
+
): SafeParseResult<ListInvoicePaymentsResponse, SDKValidationError> {
|
|
176
|
+
return safeParse(
|
|
177
|
+
jsonString,
|
|
178
|
+
(x) => ListInvoicePaymentsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
179
|
+
`Failed to parse 'ListInvoicePaymentsResponse' from JSON`,
|
|
180
|
+
);
|
|
181
|
+
}
|
|
@@ -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 components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type ListWebhooksGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type ListWebhooksRequest = {};
|
|
31
|
+
|
|
32
|
+
export type ListWebhooksResponse = {
|
|
33
|
+
headers: { [k: string]: Array<string> };
|
|
34
|
+
result: Array<components.Webhook>;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ListWebhooksGlobals$inboundSchema: z.ZodType<
|
|
39
|
+
ListWebhooksGlobals,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
"X-Moov-Version": z.string().optional(),
|
|
44
|
+
}).transform((v) => {
|
|
45
|
+
return remap$(v, {
|
|
46
|
+
"X-Moov-Version": "xMoovVersion",
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type ListWebhooksGlobals$Outbound = {
|
|
51
|
+
"X-Moov-Version"?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const ListWebhooksGlobals$outboundSchema: z.ZodType<
|
|
56
|
+
ListWebhooksGlobals$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
ListWebhooksGlobals
|
|
59
|
+
> = z.object({
|
|
60
|
+
xMoovVersion: z.string().optional(),
|
|
61
|
+
}).transform((v) => {
|
|
62
|
+
return remap$(v, {
|
|
63
|
+
xMoovVersion: "X-Moov-Version",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export function listWebhooksGlobalsToJSON(
|
|
68
|
+
listWebhooksGlobals: ListWebhooksGlobals,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
ListWebhooksGlobals$outboundSchema.parse(listWebhooksGlobals),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
export function listWebhooksGlobalsFromJSON(
|
|
75
|
+
jsonString: string,
|
|
76
|
+
): SafeParseResult<ListWebhooksGlobals, SDKValidationError> {
|
|
77
|
+
return safeParse(
|
|
78
|
+
jsonString,
|
|
79
|
+
(x) => ListWebhooksGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
+
`Failed to parse 'ListWebhooksGlobals' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const ListWebhooksRequest$inboundSchema: z.ZodType<
|
|
86
|
+
ListWebhooksRequest,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
unknown
|
|
89
|
+
> = z.object({});
|
|
90
|
+
/** @internal */
|
|
91
|
+
export type ListWebhooksRequest$Outbound = {};
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const ListWebhooksRequest$outboundSchema: z.ZodType<
|
|
95
|
+
ListWebhooksRequest$Outbound,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
ListWebhooksRequest
|
|
98
|
+
> = z.object({});
|
|
99
|
+
|
|
100
|
+
export function listWebhooksRequestToJSON(
|
|
101
|
+
listWebhooksRequest: ListWebhooksRequest,
|
|
102
|
+
): string {
|
|
103
|
+
return JSON.stringify(
|
|
104
|
+
ListWebhooksRequest$outboundSchema.parse(listWebhooksRequest),
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
export function listWebhooksRequestFromJSON(
|
|
108
|
+
jsonString: string,
|
|
109
|
+
): SafeParseResult<ListWebhooksRequest, SDKValidationError> {
|
|
110
|
+
return safeParse(
|
|
111
|
+
jsonString,
|
|
112
|
+
(x) => ListWebhooksRequest$inboundSchema.parse(JSON.parse(x)),
|
|
113
|
+
`Failed to parse 'ListWebhooksRequest' from JSON`,
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const ListWebhooksResponse$inboundSchema: z.ZodType<
|
|
119
|
+
ListWebhooksResponse,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
unknown
|
|
122
|
+
> = z.object({
|
|
123
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
124
|
+
Result: z.array(components.Webhook$inboundSchema),
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
"Headers": "headers",
|
|
128
|
+
"Result": "result",
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
/** @internal */
|
|
132
|
+
export type ListWebhooksResponse$Outbound = {
|
|
133
|
+
Headers: { [k: string]: Array<string> };
|
|
134
|
+
Result: Array<components.Webhook$Outbound>;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const ListWebhooksResponse$outboundSchema: z.ZodType<
|
|
139
|
+
ListWebhooksResponse$Outbound,
|
|
140
|
+
z.ZodTypeDef,
|
|
141
|
+
ListWebhooksResponse
|
|
142
|
+
> = z.object({
|
|
143
|
+
headers: z.record(z.array(z.string())),
|
|
144
|
+
result: z.array(components.Webhook$outboundSchema),
|
|
145
|
+
}).transform((v) => {
|
|
146
|
+
return remap$(v, {
|
|
147
|
+
headers: "Headers",
|
|
148
|
+
result: "Result",
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
export function listWebhooksResponseToJSON(
|
|
153
|
+
listWebhooksResponse: ListWebhooksResponse,
|
|
154
|
+
): string {
|
|
155
|
+
return JSON.stringify(
|
|
156
|
+
ListWebhooksResponse$outboundSchema.parse(listWebhooksResponse),
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
export function listWebhooksResponseFromJSON(
|
|
160
|
+
jsonString: string,
|
|
161
|
+
): SafeParseResult<ListWebhooksResponse, SDKValidationError> {
|
|
162
|
+
return safeParse(
|
|
163
|
+
jsonString,
|
|
164
|
+
(x) => ListWebhooksResponse$inboundSchema.parse(JSON.parse(x)),
|
|
165
|
+
`Failed to parse 'ListWebhooksResponse' from JSON`,
|
|
166
|
+
);
|
|
167
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
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 PingWebhookGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type PingWebhookRequest = {
|
|
31
|
+
webhookID: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type PingWebhookResponse = {
|
|
35
|
+
headers: { [k: string]: Array<string> };
|
|
36
|
+
result: components.PingResponse;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const PingWebhookGlobals$inboundSchema: z.ZodType<
|
|
41
|
+
PingWebhookGlobals,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
"X-Moov-Version": z.string().optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"X-Moov-Version": "xMoovVersion",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type PingWebhookGlobals$Outbound = {
|
|
53
|
+
"X-Moov-Version"?: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const PingWebhookGlobals$outboundSchema: z.ZodType<
|
|
58
|
+
PingWebhookGlobals$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
PingWebhookGlobals
|
|
61
|
+
> = z.object({
|
|
62
|
+
xMoovVersion: z.string().optional(),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
xMoovVersion: "X-Moov-Version",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export function pingWebhookGlobalsToJSON(
|
|
70
|
+
pingWebhookGlobals: PingWebhookGlobals,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
PingWebhookGlobals$outboundSchema.parse(pingWebhookGlobals),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export function pingWebhookGlobalsFromJSON(
|
|
77
|
+
jsonString: string,
|
|
78
|
+
): SafeParseResult<PingWebhookGlobals, SDKValidationError> {
|
|
79
|
+
return safeParse(
|
|
80
|
+
jsonString,
|
|
81
|
+
(x) => PingWebhookGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
82
|
+
`Failed to parse 'PingWebhookGlobals' from JSON`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const PingWebhookRequest$inboundSchema: z.ZodType<
|
|
88
|
+
PingWebhookRequest,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.object({
|
|
92
|
+
webhookID: z.string(),
|
|
93
|
+
});
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type PingWebhookRequest$Outbound = {
|
|
96
|
+
webhookID: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const PingWebhookRequest$outboundSchema: z.ZodType<
|
|
101
|
+
PingWebhookRequest$Outbound,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
PingWebhookRequest
|
|
104
|
+
> = z.object({
|
|
105
|
+
webhookID: z.string(),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export function pingWebhookRequestToJSON(
|
|
109
|
+
pingWebhookRequest: PingWebhookRequest,
|
|
110
|
+
): string {
|
|
111
|
+
return JSON.stringify(
|
|
112
|
+
PingWebhookRequest$outboundSchema.parse(pingWebhookRequest),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
export function pingWebhookRequestFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<PingWebhookRequest, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => PingWebhookRequest$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'PingWebhookRequest' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const PingWebhookResponse$inboundSchema: z.ZodType<
|
|
127
|
+
PingWebhookResponse,
|
|
128
|
+
z.ZodTypeDef,
|
|
129
|
+
unknown
|
|
130
|
+
> = z.object({
|
|
131
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
132
|
+
Result: components.PingResponse$inboundSchema,
|
|
133
|
+
}).transform((v) => {
|
|
134
|
+
return remap$(v, {
|
|
135
|
+
"Headers": "headers",
|
|
136
|
+
"Result": "result",
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
/** @internal */
|
|
140
|
+
export type PingWebhookResponse$Outbound = {
|
|
141
|
+
Headers: { [k: string]: Array<string> };
|
|
142
|
+
Result: components.PingResponse$Outbound;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const PingWebhookResponse$outboundSchema: z.ZodType<
|
|
147
|
+
PingWebhookResponse$Outbound,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
PingWebhookResponse
|
|
150
|
+
> = z.object({
|
|
151
|
+
headers: z.record(z.array(z.string())),
|
|
152
|
+
result: components.PingResponse$outboundSchema,
|
|
153
|
+
}).transform((v) => {
|
|
154
|
+
return remap$(v, {
|
|
155
|
+
headers: "Headers",
|
|
156
|
+
result: "Result",
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
export function pingWebhookResponseToJSON(
|
|
161
|
+
pingWebhookResponse: PingWebhookResponse,
|
|
162
|
+
): string {
|
|
163
|
+
return JSON.stringify(
|
|
164
|
+
PingWebhookResponse$outboundSchema.parse(pingWebhookResponse),
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
export function pingWebhookResponseFromJSON(
|
|
168
|
+
jsonString: string,
|
|
169
|
+
): SafeParseResult<PingWebhookResponse, SDKValidationError> {
|
|
170
|
+
return safeParse(
|
|
171
|
+
jsonString,
|
|
172
|
+
(x) => PingWebhookResponse$inboundSchema.parse(JSON.parse(x)),
|
|
173
|
+
`Failed to parse 'PingWebhookResponse' from JSON`,
|
|
174
|
+
);
|
|
175
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
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 UpdateWebhookGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type UpdateWebhookRequest = {
|
|
31
|
+
webhookID: string;
|
|
32
|
+
updateWebhook: components.UpdateWebhook;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type UpdateWebhookResponse = {
|
|
36
|
+
headers: { [k: string]: Array<string> };
|
|
37
|
+
result: components.Webhook;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const UpdateWebhookGlobals$inboundSchema: z.ZodType<
|
|
42
|
+
UpdateWebhookGlobals,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
"X-Moov-Version": z.string().optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
"X-Moov-Version": "xMoovVersion",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type UpdateWebhookGlobals$Outbound = {
|
|
54
|
+
"X-Moov-Version"?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const UpdateWebhookGlobals$outboundSchema: z.ZodType<
|
|
59
|
+
UpdateWebhookGlobals$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
UpdateWebhookGlobals
|
|
62
|
+
> = z.object({
|
|
63
|
+
xMoovVersion: z.string().optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
xMoovVersion: "X-Moov-Version",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export function updateWebhookGlobalsToJSON(
|
|
71
|
+
updateWebhookGlobals: UpdateWebhookGlobals,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
UpdateWebhookGlobals$outboundSchema.parse(updateWebhookGlobals),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export function updateWebhookGlobalsFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<UpdateWebhookGlobals, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => UpdateWebhookGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'UpdateWebhookGlobals' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const UpdateWebhookRequest$inboundSchema: z.ZodType<
|
|
89
|
+
UpdateWebhookRequest,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
unknown
|
|
92
|
+
> = z.object({
|
|
93
|
+
webhookID: z.string(),
|
|
94
|
+
UpdateWebhook: components.UpdateWebhook$inboundSchema,
|
|
95
|
+
}).transform((v) => {
|
|
96
|
+
return remap$(v, {
|
|
97
|
+
"UpdateWebhook": "updateWebhook",
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
/** @internal */
|
|
101
|
+
export type UpdateWebhookRequest$Outbound = {
|
|
102
|
+
webhookID: string;
|
|
103
|
+
UpdateWebhook: components.UpdateWebhook$Outbound;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export const UpdateWebhookRequest$outboundSchema: z.ZodType<
|
|
108
|
+
UpdateWebhookRequest$Outbound,
|
|
109
|
+
z.ZodTypeDef,
|
|
110
|
+
UpdateWebhookRequest
|
|
111
|
+
> = z.object({
|
|
112
|
+
webhookID: z.string(),
|
|
113
|
+
updateWebhook: components.UpdateWebhook$outboundSchema,
|
|
114
|
+
}).transform((v) => {
|
|
115
|
+
return remap$(v, {
|
|
116
|
+
updateWebhook: "UpdateWebhook",
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
export function updateWebhookRequestToJSON(
|
|
121
|
+
updateWebhookRequest: UpdateWebhookRequest,
|
|
122
|
+
): string {
|
|
123
|
+
return JSON.stringify(
|
|
124
|
+
UpdateWebhookRequest$outboundSchema.parse(updateWebhookRequest),
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
export function updateWebhookRequestFromJSON(
|
|
128
|
+
jsonString: string,
|
|
129
|
+
): SafeParseResult<UpdateWebhookRequest, SDKValidationError> {
|
|
130
|
+
return safeParse(
|
|
131
|
+
jsonString,
|
|
132
|
+
(x) => UpdateWebhookRequest$inboundSchema.parse(JSON.parse(x)),
|
|
133
|
+
`Failed to parse 'UpdateWebhookRequest' from JSON`,
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const UpdateWebhookResponse$inboundSchema: z.ZodType<
|
|
139
|
+
UpdateWebhookResponse,
|
|
140
|
+
z.ZodTypeDef,
|
|
141
|
+
unknown
|
|
142
|
+
> = z.object({
|
|
143
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
144
|
+
Result: components.Webhook$inboundSchema,
|
|
145
|
+
}).transform((v) => {
|
|
146
|
+
return remap$(v, {
|
|
147
|
+
"Headers": "headers",
|
|
148
|
+
"Result": "result",
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
/** @internal */
|
|
152
|
+
export type UpdateWebhookResponse$Outbound = {
|
|
153
|
+
Headers: { [k: string]: Array<string> };
|
|
154
|
+
Result: components.Webhook$Outbound;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export const UpdateWebhookResponse$outboundSchema: z.ZodType<
|
|
159
|
+
UpdateWebhookResponse$Outbound,
|
|
160
|
+
z.ZodTypeDef,
|
|
161
|
+
UpdateWebhookResponse
|
|
162
|
+
> = z.object({
|
|
163
|
+
headers: z.record(z.array(z.string())),
|
|
164
|
+
result: components.Webhook$outboundSchema,
|
|
165
|
+
}).transform((v) => {
|
|
166
|
+
return remap$(v, {
|
|
167
|
+
headers: "Headers",
|
|
168
|
+
result: "Result",
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
export function updateWebhookResponseToJSON(
|
|
173
|
+
updateWebhookResponse: UpdateWebhookResponse,
|
|
174
|
+
): string {
|
|
175
|
+
return JSON.stringify(
|
|
176
|
+
UpdateWebhookResponse$outboundSchema.parse(updateWebhookResponse),
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
export function updateWebhookResponseFromJSON(
|
|
180
|
+
jsonString: string,
|
|
181
|
+
): SafeParseResult<UpdateWebhookResponse, SDKValidationError> {
|
|
182
|
+
return safeParse(
|
|
183
|
+
jsonString,
|
|
184
|
+
(x) => UpdateWebhookResponse$inboundSchema.parse(JSON.parse(x)),
|
|
185
|
+
`Failed to parse 'UpdateWebhookResponse' from JSON`,
|
|
186
|
+
);
|
|
187
|
+
}
|