@moovio/sdk 0.6.1 → 0.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/FUNCTIONS.md +1 -0
- package/README.md +25 -0
- package/bin/mcp-server.js +814 -275
- package/bin/mcp-server.js.map +26 -14
- package/docs/sdks/accounts/README.md +2 -0
- package/docs/sdks/onboarding/README.md +2 -0
- package/docs/sdks/receipts/README.md +189 -0
- package/funcs/receiptsCreate.d.ts +18 -0
- package/funcs/receiptsCreate.d.ts.map +1 -0
- package/funcs/receiptsCreate.js +133 -0
- package/funcs/receiptsCreate.js.map +1 -0
- package/funcs/receiptsList.d.ts +16 -0
- package/funcs/receiptsList.d.ts.map +1 -0
- package/funcs/receiptsList.js +121 -0
- package/funcs/receiptsList.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/extensions.d.ts +9 -0
- package/mcp-server/extensions.d.ts.map +1 -0
- package/mcp-server/extensions.js +6 -0
- package/mcp-server/extensions.js.map +1 -0
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/resources.d.ts +9 -4
- package/mcp-server/resources.d.ts.map +1 -1
- package/mcp-server/resources.js +36 -9
- package/mcp-server/resources.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +10 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/receiptsCreate.d.ts +9 -0
- package/mcp-server/tools/receiptsCreate.d.ts.map +1 -0
- package/mcp-server/tools/receiptsCreate.js +66 -0
- package/mcp-server/tools/receiptsCreate.js.map +1 -0
- package/mcp-server/tools/receiptsList.d.ts +8 -0
- package/mcp-server/tools/receiptsList.d.ts.map +1 -0
- package/mcp-server/tools/receiptsList.js +65 -0
- package/mcp-server/tools/receiptsList.js.map +1 -0
- package/models/components/achtransactiondetails.d.ts +2 -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/achtransactionstatus.d.ts +3 -0
- package/models/components/achtransactionstatus.d.ts.map +1 -1
- package/models/components/achtransactionstatus.js +1 -0
- package/models/components/achtransactionstatus.js.map +1 -1
- package/models/components/createaccount.d.ts +6 -0
- package/models/components/createaccount.d.ts.map +1 -1
- package/models/components/createaccount.js +3 -0
- package/models/components/createaccount.js.map +1 -1
- package/models/components/createterminalapplication.d.ts +4 -4
- package/models/components/index.d.ts +4 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -0
- package/models/components/index.js.map +1 -1
- package/models/components/receiptkind.d.ts +31 -0
- package/models/components/receiptkind.d.ts.map +1 -0
- package/models/components/receiptkind.js +63 -0
- package/models/components/receiptkind.js.map +1 -0
- package/models/components/receiptrequest.d.ts +76 -0
- package/models/components/receiptrequest.d.ts.map +1 -0
- package/models/components/receiptrequest.js +80 -0
- package/models/components/receiptrequest.js.map +1 -0
- package/models/components/receiptresponse.d.ts +94 -0
- package/models/components/receiptresponse.d.ts.map +1 -0
- package/models/components/receiptresponse.js +90 -0
- package/models/components/receiptresponse.js.map +1 -0
- package/models/components/sentreceipt.d.ts +42 -0
- package/models/components/sentreceipt.d.ts.map +1 -0
- package/models/components/sentreceipt.js +73 -0
- package/models/components/sentreceipt.js.map +1 -0
- package/models/components/terminalapplication.d.ts +4 -4
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/receiptvalidationerror.d.ts +46 -0
- package/models/errors/receiptvalidationerror.d.ts.map +1 -0
- package/models/errors/receiptvalidationerror.js +98 -0
- package/models/errors/receiptvalidationerror.js.map +1 -0
- package/models/operations/createreceipts.d.ts +74 -0
- package/models/operations/createreceipts.d.ts.map +1 -0
- package/models/operations/createreceipts.js +118 -0
- package/models/operations/createreceipts.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listreceipts.d.ts +102 -0
- package/models/operations/listreceipts.d.ts.map +1 -0
- package/models/operations/listreceipts.js +145 -0
- package/models/operations/listreceipts.js.map +1 -0
- package/package.json +1 -1
- package/sdk/receipts.d.ts +20 -0
- package/sdk/receipts.d.ts.map +1 -0
- package/sdk/receipts.js +32 -0
- package/sdk/receipts.js.map +1 -0
- 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/src/funcs/receiptsCreate.ts +190 -0
- package/src/funcs/receiptsList.ts +171 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/extensions.ts +13 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/resources.ts +75 -14
- package/src/mcp-server/server.ts +20 -1
- package/src/mcp-server/tools/receiptsCreate.ts +39 -0
- package/src/mcp-server/tools/receiptsList.ts +38 -0
- package/src/models/components/achtransactiondetails.ts +5 -0
- package/src/models/components/achtransactionstatus.ts +1 -0
- package/src/models/components/createaccount.ts +8 -0
- package/src/models/components/createterminalapplication.ts +4 -4
- package/src/models/components/index.ts +4 -0
- package/src/models/components/receiptkind.ts +36 -0
- package/src/models/components/receiptrequest.ts +123 -0
- package/src/models/components/receiptresponse.ts +157 -0
- package/src/models/components/sentreceipt.ts +79 -0
- package/src/models/components/terminalapplication.ts +4 -4
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/receiptvalidationerror.ts +99 -0
- package/src/models/operations/createreceipts.ts +161 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listreceipts.ts +222 -0
- package/src/sdk/receipts.ts +46 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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
|
+
ReceiptKind,
|
|
11
|
+
ReceiptKind$inboundSchema,
|
|
12
|
+
ReceiptKind$outboundSchema,
|
|
13
|
+
} from "./receiptkind.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A receipt request for a specific transfer, schedule, or schedule occurrence.
|
|
17
|
+
*/
|
|
18
|
+
export type ReceiptRequest = {
|
|
19
|
+
/**
|
|
20
|
+
* The type of receipt being requested.
|
|
21
|
+
*/
|
|
22
|
+
kind: ReceiptKind;
|
|
23
|
+
/**
|
|
24
|
+
* The email address to send the receipt to.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Either email or emailAccountID must be provided, but not both.
|
|
28
|
+
*/
|
|
29
|
+
email?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* The accountID to send the receipt to.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Either email or emailAccountID must be provided, but not both.
|
|
35
|
+
*/
|
|
36
|
+
emailAccountID?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The ID of the transfer associated with this receipt.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Exactly one of forTransferID, forScheduleID, or forOccurrenceID must be provided.
|
|
42
|
+
*/
|
|
43
|
+
forTransferID?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* The ID of the schedule associated with this receipt.
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* Exactly one of forTransferID, forScheduleID, or forOccurrenceID must be provided.
|
|
49
|
+
*/
|
|
50
|
+
forScheduleID?: string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The ID of the schedule occurrence associated with this receipt.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* Exactly one of forTransferID, forScheduleID, or forOccurrenceID must be provided.
|
|
56
|
+
*/
|
|
57
|
+
forOccurrenceID?: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const ReceiptRequest$inboundSchema: z.ZodType<
|
|
62
|
+
ReceiptRequest,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
unknown
|
|
65
|
+
> = z.object({
|
|
66
|
+
kind: ReceiptKind$inboundSchema,
|
|
67
|
+
email: z.string().optional(),
|
|
68
|
+
emailAccountID: z.string().optional(),
|
|
69
|
+
forTransferID: z.string().optional(),
|
|
70
|
+
forScheduleID: z.string().optional(),
|
|
71
|
+
forOccurrenceID: z.string().optional(),
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export type ReceiptRequest$Outbound = {
|
|
76
|
+
kind: string;
|
|
77
|
+
email?: string | undefined;
|
|
78
|
+
emailAccountID?: string | undefined;
|
|
79
|
+
forTransferID?: string | undefined;
|
|
80
|
+
forScheduleID?: string | undefined;
|
|
81
|
+
forOccurrenceID?: string | undefined;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const ReceiptRequest$outboundSchema: z.ZodType<
|
|
86
|
+
ReceiptRequest$Outbound,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
ReceiptRequest
|
|
89
|
+
> = z.object({
|
|
90
|
+
kind: ReceiptKind$outboundSchema,
|
|
91
|
+
email: z.string().optional(),
|
|
92
|
+
emailAccountID: z.string().optional(),
|
|
93
|
+
forTransferID: z.string().optional(),
|
|
94
|
+
forScheduleID: z.string().optional(),
|
|
95
|
+
forOccurrenceID: z.string().optional(),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
+
*/
|
|
102
|
+
export namespace ReceiptRequest$ {
|
|
103
|
+
/** @deprecated use `ReceiptRequest$inboundSchema` instead. */
|
|
104
|
+
export const inboundSchema = ReceiptRequest$inboundSchema;
|
|
105
|
+
/** @deprecated use `ReceiptRequest$outboundSchema` instead. */
|
|
106
|
+
export const outboundSchema = ReceiptRequest$outboundSchema;
|
|
107
|
+
/** @deprecated use `ReceiptRequest$Outbound` instead. */
|
|
108
|
+
export type Outbound = ReceiptRequest$Outbound;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function receiptRequestToJSON(receiptRequest: ReceiptRequest): string {
|
|
112
|
+
return JSON.stringify(ReceiptRequest$outboundSchema.parse(receiptRequest));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function receiptRequestFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<ReceiptRequest, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => ReceiptRequest$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'ReceiptRequest' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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
|
+
ReceiptKind,
|
|
11
|
+
ReceiptKind$inboundSchema,
|
|
12
|
+
ReceiptKind$outboundSchema,
|
|
13
|
+
} from "./receiptkind.js";
|
|
14
|
+
import {
|
|
15
|
+
SentReceipt,
|
|
16
|
+
SentReceipt$inboundSchema,
|
|
17
|
+
SentReceipt$Outbound,
|
|
18
|
+
SentReceipt$outboundSchema,
|
|
19
|
+
} from "./sentreceipt.js";
|
|
20
|
+
|
|
21
|
+
export type ReceiptResponse = {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the receipt request.
|
|
24
|
+
*/
|
|
25
|
+
receiptID: string;
|
|
26
|
+
/**
|
|
27
|
+
* AccountID for which the receipt request was created.
|
|
28
|
+
*/
|
|
29
|
+
createdBy: string;
|
|
30
|
+
/**
|
|
31
|
+
* The date and time the receipt was disabled.
|
|
32
|
+
*/
|
|
33
|
+
disabledOn?: Date | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The type of receipt.
|
|
36
|
+
*/
|
|
37
|
+
kind: ReceiptKind;
|
|
38
|
+
/**
|
|
39
|
+
* The email address the receipt is sent to.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Either email or emailAccountID will be in the response, but not both.
|
|
43
|
+
*/
|
|
44
|
+
email?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The accountID the receipt is sent to.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* Either email or emailAccountID will be in the response, but not both.
|
|
50
|
+
*/
|
|
51
|
+
emailAccountID?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The ID of the transfer associated with this receipt.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* Exactly one of forTransferID, forScheduleID, or forOccurrenceID must be provided.
|
|
57
|
+
*/
|
|
58
|
+
forTransferID?: string | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* The ID of the schedule associated with this receipt.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* Exactly one of forTransferID, forScheduleID, or forOccurrenceID must be provided.
|
|
64
|
+
*/
|
|
65
|
+
forScheduleID?: string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* The ID of the schedule occurrence associated with this receipt.
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* Exactly one of forTransferID, forScheduleID, or forOccurrenceID must be provided.
|
|
71
|
+
*/
|
|
72
|
+
forOccurrenceID?: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* The list of receipts that have been sent.
|
|
75
|
+
*/
|
|
76
|
+
sentFor: Array<SentReceipt>;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const ReceiptResponse$inboundSchema: z.ZodType<
|
|
81
|
+
ReceiptResponse,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
unknown
|
|
84
|
+
> = z.object({
|
|
85
|
+
receiptID: z.string(),
|
|
86
|
+
createdBy: z.string(),
|
|
87
|
+
disabledOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
88
|
+
.optional(),
|
|
89
|
+
kind: ReceiptKind$inboundSchema,
|
|
90
|
+
email: z.string().optional(),
|
|
91
|
+
emailAccountID: z.string().optional(),
|
|
92
|
+
forTransferID: z.string().optional(),
|
|
93
|
+
forScheduleID: z.string().optional(),
|
|
94
|
+
forOccurrenceID: z.string().optional(),
|
|
95
|
+
sentFor: z.array(SentReceipt$inboundSchema),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export type ReceiptResponse$Outbound = {
|
|
100
|
+
receiptID: string;
|
|
101
|
+
createdBy: string;
|
|
102
|
+
disabledOn?: string | undefined;
|
|
103
|
+
kind: string;
|
|
104
|
+
email?: string | undefined;
|
|
105
|
+
emailAccountID?: string | undefined;
|
|
106
|
+
forTransferID?: string | undefined;
|
|
107
|
+
forScheduleID?: string | undefined;
|
|
108
|
+
forOccurrenceID?: string | undefined;
|
|
109
|
+
sentFor: Array<SentReceipt$Outbound>;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
export const ReceiptResponse$outboundSchema: z.ZodType<
|
|
114
|
+
ReceiptResponse$Outbound,
|
|
115
|
+
z.ZodTypeDef,
|
|
116
|
+
ReceiptResponse
|
|
117
|
+
> = z.object({
|
|
118
|
+
receiptID: z.string(),
|
|
119
|
+
createdBy: z.string(),
|
|
120
|
+
disabledOn: z.date().transform(v => v.toISOString()).optional(),
|
|
121
|
+
kind: ReceiptKind$outboundSchema,
|
|
122
|
+
email: z.string().optional(),
|
|
123
|
+
emailAccountID: z.string().optional(),
|
|
124
|
+
forTransferID: z.string().optional(),
|
|
125
|
+
forScheduleID: z.string().optional(),
|
|
126
|
+
forOccurrenceID: z.string().optional(),
|
|
127
|
+
sentFor: z.array(SentReceipt$outboundSchema),
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
133
|
+
*/
|
|
134
|
+
export namespace ReceiptResponse$ {
|
|
135
|
+
/** @deprecated use `ReceiptResponse$inboundSchema` instead. */
|
|
136
|
+
export const inboundSchema = ReceiptResponse$inboundSchema;
|
|
137
|
+
/** @deprecated use `ReceiptResponse$outboundSchema` instead. */
|
|
138
|
+
export const outboundSchema = ReceiptResponse$outboundSchema;
|
|
139
|
+
/** @deprecated use `ReceiptResponse$Outbound` instead. */
|
|
140
|
+
export type Outbound = ReceiptResponse$Outbound;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function receiptResponseToJSON(
|
|
144
|
+
receiptResponse: ReceiptResponse,
|
|
145
|
+
): string {
|
|
146
|
+
return JSON.stringify(ReceiptResponse$outboundSchema.parse(receiptResponse));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function receiptResponseFromJSON(
|
|
150
|
+
jsonString: string,
|
|
151
|
+
): SafeParseResult<ReceiptResponse, SDKValidationError> {
|
|
152
|
+
return safeParse(
|
|
153
|
+
jsonString,
|
|
154
|
+
(x) => ReceiptResponse$inboundSchema.parse(JSON.parse(x)),
|
|
155
|
+
`Failed to parse 'ReceiptResponse' from JSON`,
|
|
156
|
+
);
|
|
157
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 SentReceipt = {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for the receipt.
|
|
13
|
+
*/
|
|
14
|
+
receiptID: string;
|
|
15
|
+
/**
|
|
16
|
+
* The idempotency key used when creating the receipt.
|
|
17
|
+
*/
|
|
18
|
+
idempotencyKey: string;
|
|
19
|
+
/**
|
|
20
|
+
* When the receipt was sent.
|
|
21
|
+
*/
|
|
22
|
+
sentOn: Date;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const SentReceipt$inboundSchema: z.ZodType<
|
|
27
|
+
SentReceipt,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
receiptID: z.string(),
|
|
32
|
+
idempotencyKey: z.string(),
|
|
33
|
+
sentOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type SentReceipt$Outbound = {
|
|
38
|
+
receiptID: string;
|
|
39
|
+
idempotencyKey: string;
|
|
40
|
+
sentOn: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const SentReceipt$outboundSchema: z.ZodType<
|
|
45
|
+
SentReceipt$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
SentReceipt
|
|
48
|
+
> = z.object({
|
|
49
|
+
receiptID: z.string(),
|
|
50
|
+
idempotencyKey: z.string(),
|
|
51
|
+
sentOn: z.date().transform(v => v.toISOString()),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace SentReceipt$ {
|
|
59
|
+
/** @deprecated use `SentReceipt$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema = SentReceipt$inboundSchema;
|
|
61
|
+
/** @deprecated use `SentReceipt$outboundSchema` instead. */
|
|
62
|
+
export const outboundSchema = SentReceipt$outboundSchema;
|
|
63
|
+
/** @deprecated use `SentReceipt$Outbound` instead. */
|
|
64
|
+
export type Outbound = SentReceipt$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function sentReceiptToJSON(sentReceipt: SentReceipt): string {
|
|
68
|
+
return JSON.stringify(SentReceipt$outboundSchema.parse(sentReceipt));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function sentReceiptFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<SentReceipt, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => SentReceipt$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'SentReceipt' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -34,19 +34,19 @@ export type TerminalApplication = {
|
|
|
34
34
|
*/
|
|
35
35
|
platform: TerminalApplicationPlatform;
|
|
36
36
|
/**
|
|
37
|
-
* The app bundle identifier of the terminal application. Will be returned if platform is ios
|
|
37
|
+
* The app bundle identifier of the terminal application. Will be returned if platform is `ios`.
|
|
38
38
|
*/
|
|
39
39
|
appBundleID?: string | undefined;
|
|
40
40
|
/**
|
|
41
|
-
* The app package name of the terminal application. Will be returned if platform is android
|
|
41
|
+
* The app package name of the terminal application. Will be returned if platform is `android`.
|
|
42
42
|
*/
|
|
43
43
|
packageName?: string | undefined;
|
|
44
44
|
/**
|
|
45
|
-
* The app version of the terminal application Will be returned if platform is android
|
|
45
|
+
* The app version of the terminal application Will be returned if platform is `android`.
|
|
46
46
|
*/
|
|
47
47
|
sha256Digest?: string | undefined;
|
|
48
48
|
/**
|
|
49
|
-
* The app version of the terminal application Will be returned if platform is android
|
|
49
|
+
* The app version of the terminal application Will be returned if platform is `android`.
|
|
50
50
|
*/
|
|
51
51
|
versionCode?: string | undefined;
|
|
52
52
|
};
|
|
@@ -22,6 +22,7 @@ export * from "./linkcarderror.js";
|
|
|
22
22
|
export * from "./microdepositvalidationerror.js";
|
|
23
23
|
export * from "./onboardinginviteerror.js";
|
|
24
24
|
export * from "./patchsweepconfigerror.js";
|
|
25
|
+
export * from "./receiptvalidationerror.js";
|
|
25
26
|
export * from "./refundvalidationerror.js";
|
|
26
27
|
export * from "./representativevalidationerror.js";
|
|
27
28
|
export * from "./requestcarderror.js";
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type ReceiptValidationErrorData = {
|
|
8
|
+
kind?: string | undefined;
|
|
9
|
+
email?: string | undefined;
|
|
10
|
+
emailAccountID?: string | undefined;
|
|
11
|
+
forTransferID?: string | undefined;
|
|
12
|
+
forScheduleID?: string | undefined;
|
|
13
|
+
forOccurrenceID?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export class ReceiptValidationError extends Error {
|
|
17
|
+
kind?: string | undefined;
|
|
18
|
+
email?: string | undefined;
|
|
19
|
+
emailAccountID?: string | undefined;
|
|
20
|
+
forTransferID?: string | undefined;
|
|
21
|
+
forScheduleID?: string | undefined;
|
|
22
|
+
forOccurrenceID?: string | undefined;
|
|
23
|
+
|
|
24
|
+
/** The original data that was passed to this error instance. */
|
|
25
|
+
data$: ReceiptValidationErrorData;
|
|
26
|
+
|
|
27
|
+
constructor(err: ReceiptValidationErrorData) {
|
|
28
|
+
const message = "message" in err && typeof err.message === "string"
|
|
29
|
+
? err.message
|
|
30
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
31
|
+
super(message);
|
|
32
|
+
this.data$ = err;
|
|
33
|
+
|
|
34
|
+
if (err.kind != null) this.kind = err.kind;
|
|
35
|
+
if (err.email != null) this.email = err.email;
|
|
36
|
+
if (err.emailAccountID != null) this.emailAccountID = err.emailAccountID;
|
|
37
|
+
if (err.forTransferID != null) this.forTransferID = err.forTransferID;
|
|
38
|
+
if (err.forScheduleID != null) this.forScheduleID = err.forScheduleID;
|
|
39
|
+
if (err.forOccurrenceID != null) this.forOccurrenceID = err.forOccurrenceID;
|
|
40
|
+
|
|
41
|
+
this.name = "ReceiptValidationError";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const ReceiptValidationError$inboundSchema: z.ZodType<
|
|
47
|
+
ReceiptValidationError,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
unknown
|
|
50
|
+
> = z.object({
|
|
51
|
+
kind: z.string().optional(),
|
|
52
|
+
email: z.string().optional(),
|
|
53
|
+
emailAccountID: z.string().optional(),
|
|
54
|
+
forTransferID: z.string().optional(),
|
|
55
|
+
forScheduleID: z.string().optional(),
|
|
56
|
+
forOccurrenceID: z.string().optional(),
|
|
57
|
+
})
|
|
58
|
+
.transform((v) => {
|
|
59
|
+
return new ReceiptValidationError(v);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type ReceiptValidationError$Outbound = {
|
|
64
|
+
kind?: string | undefined;
|
|
65
|
+
email?: string | undefined;
|
|
66
|
+
emailAccountID?: string | undefined;
|
|
67
|
+
forTransferID?: string | undefined;
|
|
68
|
+
forScheduleID?: string | undefined;
|
|
69
|
+
forOccurrenceID?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const ReceiptValidationError$outboundSchema: z.ZodType<
|
|
74
|
+
ReceiptValidationError$Outbound,
|
|
75
|
+
z.ZodTypeDef,
|
|
76
|
+
ReceiptValidationError
|
|
77
|
+
> = z.instanceof(ReceiptValidationError)
|
|
78
|
+
.transform(v => v.data$)
|
|
79
|
+
.pipe(z.object({
|
|
80
|
+
kind: z.string().optional(),
|
|
81
|
+
email: z.string().optional(),
|
|
82
|
+
emailAccountID: z.string().optional(),
|
|
83
|
+
forTransferID: z.string().optional(),
|
|
84
|
+
forScheduleID: z.string().optional(),
|
|
85
|
+
forOccurrenceID: z.string().optional(),
|
|
86
|
+
}));
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
91
|
+
*/
|
|
92
|
+
export namespace ReceiptValidationError$ {
|
|
93
|
+
/** @deprecated use `ReceiptValidationError$inboundSchema` instead. */
|
|
94
|
+
export const inboundSchema = ReceiptValidationError$inboundSchema;
|
|
95
|
+
/** @deprecated use `ReceiptValidationError$outboundSchema` instead. */
|
|
96
|
+
export const outboundSchema = ReceiptValidationError$outboundSchema;
|
|
97
|
+
/** @deprecated use `ReceiptValidationError$Outbound` instead. */
|
|
98
|
+
export type Outbound = ReceiptValidationError$Outbound;
|
|
99
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 CreateReceiptsGlobals = {
|
|
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
|
+
*/
|
|
26
|
+
xMoovVersion?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type CreateReceiptsResponse = {
|
|
30
|
+
headers: { [k: string]: Array<string> };
|
|
31
|
+
result: components.ReceiptResponse;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const CreateReceiptsGlobals$inboundSchema: z.ZodType<
|
|
36
|
+
CreateReceiptsGlobals,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
"x-moov-version": z.string().default("v2024.01.00"),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"x-moov-version": "xMoovVersion",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type CreateReceiptsGlobals$Outbound = {
|
|
49
|
+
"x-moov-version": string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const CreateReceiptsGlobals$outboundSchema: z.ZodType<
|
|
54
|
+
CreateReceiptsGlobals$Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
CreateReceiptsGlobals
|
|
57
|
+
> = z.object({
|
|
58
|
+
xMoovVersion: z.string().default("v2024.01.00"),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
xMoovVersion: "x-moov-version",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
+
*/
|
|
69
|
+
export namespace CreateReceiptsGlobals$ {
|
|
70
|
+
/** @deprecated use `CreateReceiptsGlobals$inboundSchema` instead. */
|
|
71
|
+
export const inboundSchema = CreateReceiptsGlobals$inboundSchema;
|
|
72
|
+
/** @deprecated use `CreateReceiptsGlobals$outboundSchema` instead. */
|
|
73
|
+
export const outboundSchema = CreateReceiptsGlobals$outboundSchema;
|
|
74
|
+
/** @deprecated use `CreateReceiptsGlobals$Outbound` instead. */
|
|
75
|
+
export type Outbound = CreateReceiptsGlobals$Outbound;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function createReceiptsGlobalsToJSON(
|
|
79
|
+
createReceiptsGlobals: CreateReceiptsGlobals,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
CreateReceiptsGlobals$outboundSchema.parse(createReceiptsGlobals),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function createReceiptsGlobalsFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<CreateReceiptsGlobals, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => CreateReceiptsGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'CreateReceiptsGlobals' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const CreateReceiptsResponse$inboundSchema: z.ZodType<
|
|
98
|
+
CreateReceiptsResponse,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.object({
|
|
102
|
+
Headers: z.record(z.array(z.string())),
|
|
103
|
+
Result: components.ReceiptResponse$inboundSchema,
|
|
104
|
+
}).transform((v) => {
|
|
105
|
+
return remap$(v, {
|
|
106
|
+
"Headers": "headers",
|
|
107
|
+
"Result": "result",
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type CreateReceiptsResponse$Outbound = {
|
|
113
|
+
Headers: { [k: string]: Array<string> };
|
|
114
|
+
Result: components.ReceiptResponse$Outbound;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const CreateReceiptsResponse$outboundSchema: z.ZodType<
|
|
119
|
+
CreateReceiptsResponse$Outbound,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
CreateReceiptsResponse
|
|
122
|
+
> = z.object({
|
|
123
|
+
headers: z.record(z.array(z.string())),
|
|
124
|
+
result: components.ReceiptResponse$outboundSchema,
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
headers: "Headers",
|
|
128
|
+
result: "Result",
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
135
|
+
*/
|
|
136
|
+
export namespace CreateReceiptsResponse$ {
|
|
137
|
+
/** @deprecated use `CreateReceiptsResponse$inboundSchema` instead. */
|
|
138
|
+
export const inboundSchema = CreateReceiptsResponse$inboundSchema;
|
|
139
|
+
/** @deprecated use `CreateReceiptsResponse$outboundSchema` instead. */
|
|
140
|
+
export const outboundSchema = CreateReceiptsResponse$outboundSchema;
|
|
141
|
+
/** @deprecated use `CreateReceiptsResponse$Outbound` instead. */
|
|
142
|
+
export type Outbound = CreateReceiptsResponse$Outbound;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function createReceiptsResponseToJSON(
|
|
146
|
+
createReceiptsResponse: CreateReceiptsResponse,
|
|
147
|
+
): string {
|
|
148
|
+
return JSON.stringify(
|
|
149
|
+
CreateReceiptsResponse$outboundSchema.parse(createReceiptsResponse),
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function createReceiptsResponseFromJSON(
|
|
154
|
+
jsonString: string,
|
|
155
|
+
): SafeParseResult<CreateReceiptsResponse, SDKValidationError> {
|
|
156
|
+
return safeParse(
|
|
157
|
+
jsonString,
|
|
158
|
+
(x) => CreateReceiptsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
159
|
+
`Failed to parse 'CreateReceiptsResponse' from JSON`,
|
|
160
|
+
);
|
|
161
|
+
}
|
|
@@ -15,6 +15,7 @@ export * from "./createcancellation.js";
|
|
|
15
15
|
export * from "./createfeeplanagreements.js";
|
|
16
16
|
export * from "./createonboardinginvite.js";
|
|
17
17
|
export * from "./createpaymentlink.js";
|
|
18
|
+
export * from "./createreceipts.js";
|
|
18
19
|
export * from "./createrepresentative.js";
|
|
19
20
|
export * from "./createreversal.js";
|
|
20
21
|
export * from "./createschedule.js";
|
|
@@ -97,6 +98,7 @@ export * from "./listpartnerpricing.js";
|
|
|
97
98
|
export * from "./listpartnerpricingagreements.js";
|
|
98
99
|
export * from "./listpaymentlinks.js";
|
|
99
100
|
export * from "./listpaymentmethods.js";
|
|
101
|
+
export * from "./listreceipts.js";
|
|
100
102
|
export * from "./listrefunds.js";
|
|
101
103
|
export * from "./listrepresentatives.js";
|
|
102
104
|
export * from "./listschedules.js";
|