@moovio/sdk 0.22.7 → 0.22.9
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 +72 -51
- package/_speakeasy/.github/action-inputs-config.json +53 -0
- package/_speakeasy/.github/action-security-config.json +88 -0
- package/bin/mcp-server.js +40342 -21443
- package/bin/mcp-server.js.map +224 -45
- package/examples/package-lock.json +2 -2
- package/funcs/accountsConnect.d.ts +16 -0
- package/funcs/accountsConnect.d.ts.map +1 -0
- package/funcs/accountsConnect.js +138 -0
- package/funcs/accountsConnect.js.map +1 -0
- package/funcs/accountsListConnected.d.ts +21 -0
- package/funcs/accountsListConnected.d.ts.map +1 -0
- package/funcs/accountsListConnected.js +138 -0
- package/funcs/accountsListConnected.js.map +1 -0
- package/funcs/invoicesMarkPaidInvoice.js +1 -1
- package/funcs/invoicesMarkPaidInvoice.js.map +1 -1
- 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/prompts.d.ts +3 -3
- package/mcp-server/prompts.d.ts.map +1 -1
- package/mcp-server/prompts.js.map +1 -1
- package/mcp-server/resources.d.ts +3 -3
- package/mcp-server/resources.d.ts.map +1 -1
- package/mcp-server/resources.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +5 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/accountsConnect.d.ts +8 -0
- package/mcp-server/tools/accountsConnect.d.ts.map +1 -0
- package/mcp-server/tools/accountsConnect.js +62 -0
- package/mcp-server/tools/accountsConnect.js.map +1 -0
- package/mcp-server/tools/accountsListConnected.d.ts +8 -0
- package/mcp-server/tools/accountsListConnected.d.ts.map +1 -0
- package/mcp-server/tools/accountsListConnected.js +69 -0
- package/mcp-server/tools/accountsListConnected.js.map +1 -0
- package/mcp-server/tools.d.ts +3 -3
- package/mcp-server/tools.d.ts.map +1 -1
- package/mcp-server/tools.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/components/createtransferlineitemoption.js +67 -0
- 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/{transferlineitemsvalidationerror.js → createtransferlineitems.js} +13 -13
- 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/index.d.ts +8 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -3
- package/models/components/index.js.map +1 -1
- package/models/components/sharescopes.d.ts +29 -0
- package/models/components/sharescopes.d.ts.map +1 -0
- package/models/components/sharescopes.js +61 -0
- package/models/components/sharescopes.js.map +1 -0
- 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/transferlineitemimagemetadata.js +64 -0
- 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/connectaccountrequestvalidationerror.d.ts +33 -0
- package/models/errors/connectaccountrequestvalidationerror.d.ts.map +1 -0
- package/models/errors/connectaccountrequestvalidationerror.js +80 -0
- package/models/errors/connectaccountrequestvalidationerror.js.map +1 -0
- 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/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/connectaccount.d.ts +64 -0
- package/models/operations/connectaccount.d.ts.map +1 -0
- package/models/operations/connectaccount.js +118 -0
- package/models/operations/connectaccount.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/listconnectedaccountsforaccount.d.ts +130 -0
- package/models/operations/listconnectedaccountsforaccount.d.ts.map +1 -0
- package/models/operations/listconnectedaccountsforaccount.js +130 -0
- package/models/operations/listconnectedaccountsforaccount.js.map +1 -0
- package/package.json +2 -2
- package/sdk/accounts.d.ts +16 -0
- package/sdk/accounts.d.ts.map +1 -1
- package/sdk/accounts.js +22 -0
- package/sdk/accounts.js.map +1 -1
- package/src/funcs/accountsConnect.ts +200 -0
- package/src/funcs/accountsListConnected.ts +202 -0
- package/src/funcs/invoicesMarkPaidInvoice.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +7 -3
- package/src/mcp-server/resources.ts +7 -3
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/accountsConnect.ts +35 -0
- package/src/mcp-server/tools/accountsListConnected.ts +42 -0
- package/src/mcp-server/tools.ts +7 -3
- 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/index.ts +8 -3
- package/src/models/components/sharescopes.ts +65 -0
- 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/connectaccountrequestvalidationerror.ts +74 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/transfervalidationerror.ts +8 -6
- package/src/models/operations/connectaccount.ts +181 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listconnectedaccountsforaccount.ts +276 -0
- package/src/sdk/accounts.ts +38 -0
- 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/src/models/components/transferlineitemoptionvalidationerror.ts +0 -72
- package/src/models/components/transferlineitemsvalidationerror.ts +0 -59
- package/src/models/components/transferlineitemvalidationerror.ts +0 -85
|
@@ -18,6 +18,12 @@ import {
|
|
|
18
18
|
CreateTransferDestination$Outbound,
|
|
19
19
|
CreateTransferDestination$outboundSchema,
|
|
20
20
|
} from "./createtransferdestination.js";
|
|
21
|
+
import {
|
|
22
|
+
CreateTransferLineItems,
|
|
23
|
+
CreateTransferLineItems$inboundSchema,
|
|
24
|
+
CreateTransferLineItems$Outbound,
|
|
25
|
+
CreateTransferLineItems$outboundSchema,
|
|
26
|
+
} from "./createtransferlineitems.js";
|
|
21
27
|
import {
|
|
22
28
|
CreateTransferSource,
|
|
23
29
|
CreateTransferSource$inboundSchema,
|
|
@@ -30,12 +36,6 @@ import {
|
|
|
30
36
|
FacilitatorFee$Outbound,
|
|
31
37
|
FacilitatorFee$outboundSchema,
|
|
32
38
|
} from "./facilitatorfee.js";
|
|
33
|
-
import {
|
|
34
|
-
TransferLineItems,
|
|
35
|
-
TransferLineItems$inboundSchema,
|
|
36
|
-
TransferLineItems$Outbound,
|
|
37
|
-
TransferLineItems$outboundSchema,
|
|
38
|
-
} from "./transferlineitems.js";
|
|
39
39
|
|
|
40
40
|
export type CreateTransfer = {
|
|
41
41
|
/**
|
|
@@ -73,7 +73,7 @@ export type CreateTransfer = {
|
|
|
73
73
|
* @remarks
|
|
74
74
|
* When line items are provided, their total plus sales tax must equal the transfer amount.
|
|
75
75
|
*/
|
|
76
|
-
lineItems?:
|
|
76
|
+
lineItems?: CreateTransferLineItems | undefined;
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
/** @internal */
|
|
@@ -90,7 +90,7 @@ export const CreateTransfer$inboundSchema: z.ZodType<
|
|
|
90
90
|
metadata: z.record(z.string()).optional(),
|
|
91
91
|
salesTaxAmount: Amount$inboundSchema.optional(),
|
|
92
92
|
foreignID: z.string().optional(),
|
|
93
|
-
lineItems:
|
|
93
|
+
lineItems: CreateTransferLineItems$inboundSchema.optional(),
|
|
94
94
|
});
|
|
95
95
|
/** @internal */
|
|
96
96
|
export type CreateTransfer$Outbound = {
|
|
@@ -102,7 +102,7 @@ export type CreateTransfer$Outbound = {
|
|
|
102
102
|
metadata?: { [k: string]: string } | undefined;
|
|
103
103
|
salesTaxAmount?: Amount$Outbound | undefined;
|
|
104
104
|
foreignID?: string | undefined;
|
|
105
|
-
lineItems?:
|
|
105
|
+
lineItems?: CreateTransferLineItems$Outbound | undefined;
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
/** @internal */
|
|
@@ -119,7 +119,7 @@ export const CreateTransfer$outboundSchema: z.ZodType<
|
|
|
119
119
|
metadata: z.record(z.string()).optional(),
|
|
120
120
|
salesTaxAmount: Amount$outboundSchema.optional(),
|
|
121
121
|
foreignID: z.string().optional(),
|
|
122
|
-
lineItems:
|
|
122
|
+
lineItems: CreateTransferLineItems$outboundSchema.optional(),
|
|
123
123
|
});
|
|
124
124
|
|
|
125
125
|
export function createTransferToJSON(createTransfer: CreateTransfer): string {
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
AmountDecimal,
|
|
11
|
+
AmountDecimal$inboundSchema,
|
|
12
|
+
AmountDecimal$Outbound,
|
|
13
|
+
AmountDecimal$outboundSchema,
|
|
14
|
+
} from "./amountdecimal.js";
|
|
15
|
+
import {
|
|
16
|
+
CreateTransferLineItemOption,
|
|
17
|
+
CreateTransferLineItemOption$inboundSchema,
|
|
18
|
+
CreateTransferLineItemOption$Outbound,
|
|
19
|
+
CreateTransferLineItemOption$outboundSchema,
|
|
20
|
+
} from "./createtransferlineitemoption.js";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents a single item in a transfer, including optional modifiers and quantity.
|
|
24
|
+
*/
|
|
25
|
+
export type CreateTransferLineItem = {
|
|
26
|
+
/**
|
|
27
|
+
* The name of the item.
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* The base price of the item before applying option modifiers.
|
|
32
|
+
*/
|
|
33
|
+
basePrice: AmountDecimal;
|
|
34
|
+
/**
|
|
35
|
+
* The quantity of this item.
|
|
36
|
+
*/
|
|
37
|
+
quantity: number;
|
|
38
|
+
/**
|
|
39
|
+
* Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
|
|
40
|
+
*/
|
|
41
|
+
options?: Array<CreateTransferLineItemOption> | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Optional list of images associated with this line item.
|
|
44
|
+
*/
|
|
45
|
+
imageIDs?: Array<string> | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Optional unique identifier associating the line item with a product.
|
|
48
|
+
*/
|
|
49
|
+
productID?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const CreateTransferLineItem$inboundSchema: z.ZodType<
|
|
54
|
+
CreateTransferLineItem,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
unknown
|
|
57
|
+
> = z.object({
|
|
58
|
+
name: z.string(),
|
|
59
|
+
basePrice: AmountDecimal$inboundSchema,
|
|
60
|
+
quantity: z.number().int(),
|
|
61
|
+
options: z.array(CreateTransferLineItemOption$inboundSchema).optional(),
|
|
62
|
+
imageIDs: z.array(z.string()).optional(),
|
|
63
|
+
productID: z.string().optional(),
|
|
64
|
+
});
|
|
65
|
+
/** @internal */
|
|
66
|
+
export type CreateTransferLineItem$Outbound = {
|
|
67
|
+
name: string;
|
|
68
|
+
basePrice: AmountDecimal$Outbound;
|
|
69
|
+
quantity: number;
|
|
70
|
+
options?: Array<CreateTransferLineItemOption$Outbound> | undefined;
|
|
71
|
+
imageIDs?: Array<string> | undefined;
|
|
72
|
+
productID?: string | undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const CreateTransferLineItem$outboundSchema: z.ZodType<
|
|
77
|
+
CreateTransferLineItem$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
CreateTransferLineItem
|
|
80
|
+
> = z.object({
|
|
81
|
+
name: z.string(),
|
|
82
|
+
basePrice: AmountDecimal$outboundSchema,
|
|
83
|
+
quantity: z.number().int(),
|
|
84
|
+
options: z.array(CreateTransferLineItemOption$outboundSchema).optional(),
|
|
85
|
+
imageIDs: z.array(z.string()).optional(),
|
|
86
|
+
productID: z.string().optional(),
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export function createTransferLineItemToJSON(
|
|
90
|
+
createTransferLineItem: CreateTransferLineItem,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
CreateTransferLineItem$outboundSchema.parse(createTransferLineItem),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
export function createTransferLineItemFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<CreateTransferLineItem, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => CreateTransferLineItem$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'CreateTransferLineItem' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
AmountDecimal,
|
|
11
|
+
AmountDecimal$inboundSchema,
|
|
12
|
+
AmountDecimal$Outbound,
|
|
13
|
+
AmountDecimal$outboundSchema,
|
|
14
|
+
} from "./amountdecimal.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Represents a modifier or option applied to a line item.
|
|
18
|
+
*/
|
|
19
|
+
export type CreateTransferLineItemOption = {
|
|
20
|
+
/**
|
|
21
|
+
* The name of the option or modifier.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* The quantity of this option.
|
|
26
|
+
*/
|
|
27
|
+
quantity: number;
|
|
28
|
+
/**
|
|
29
|
+
* Optional price modification applied by this option. Can be positive, negative, or zero.
|
|
30
|
+
*/
|
|
31
|
+
priceModifier?: AmountDecimal | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Optional list of images associated with this line item option.
|
|
34
|
+
*/
|
|
35
|
+
imageIDs?: Array<string> | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Optional group identifier to categorize related options (e.g., 'toppings').
|
|
38
|
+
*/
|
|
39
|
+
group?: string | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const CreateTransferLineItemOption$inboundSchema: z.ZodType<
|
|
44
|
+
CreateTransferLineItemOption,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
name: z.string(),
|
|
49
|
+
quantity: z.number().int(),
|
|
50
|
+
priceModifier: AmountDecimal$inboundSchema.optional(),
|
|
51
|
+
imageIDs: z.array(z.string()).optional(),
|
|
52
|
+
group: z.string().optional(),
|
|
53
|
+
});
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type CreateTransferLineItemOption$Outbound = {
|
|
56
|
+
name: string;
|
|
57
|
+
quantity: number;
|
|
58
|
+
priceModifier?: AmountDecimal$Outbound | undefined;
|
|
59
|
+
imageIDs?: Array<string> | undefined;
|
|
60
|
+
group?: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const CreateTransferLineItemOption$outboundSchema: z.ZodType<
|
|
65
|
+
CreateTransferLineItemOption$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
CreateTransferLineItemOption
|
|
68
|
+
> = z.object({
|
|
69
|
+
name: z.string(),
|
|
70
|
+
quantity: z.number().int(),
|
|
71
|
+
priceModifier: AmountDecimal$outboundSchema.optional(),
|
|
72
|
+
imageIDs: z.array(z.string()).optional(),
|
|
73
|
+
group: z.string().optional(),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function createTransferLineItemOptionToJSON(
|
|
77
|
+
createTransferLineItemOption: CreateTransferLineItemOption,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
CreateTransferLineItemOption$outboundSchema.parse(
|
|
81
|
+
createTransferLineItemOption,
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
export function createTransferLineItemOptionFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<CreateTransferLineItemOption, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) => CreateTransferLineItemOption$inboundSchema.parse(JSON.parse(x)),
|
|
91
|
+
`Failed to parse 'CreateTransferLineItemOption' from JSON`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 CreateTransferLineItemOptionValidationError = {
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
group?: string | undefined;
|
|
19
|
+
priceModifier?: AmountDecimalValidationError | undefined;
|
|
20
|
+
quantity?: string | undefined;
|
|
21
|
+
imageIDs?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const CreateTransferLineItemOptionValidationError$inboundSchema:
|
|
26
|
+
z.ZodType<
|
|
27
|
+
CreateTransferLineItemOptionValidationError,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
name: z.string().optional(),
|
|
32
|
+
group: z.string().optional(),
|
|
33
|
+
priceModifier: AmountDecimalValidationError$inboundSchema.optional(),
|
|
34
|
+
quantity: z.string().optional(),
|
|
35
|
+
imageIDs: z.string().optional(),
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type CreateTransferLineItemOptionValidationError$Outbound = {
|
|
39
|
+
name?: string | undefined;
|
|
40
|
+
group?: string | undefined;
|
|
41
|
+
priceModifier?: AmountDecimalValidationError$Outbound | undefined;
|
|
42
|
+
quantity?: string | undefined;
|
|
43
|
+
imageIDs?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const CreateTransferLineItemOptionValidationError$outboundSchema:
|
|
48
|
+
z.ZodType<
|
|
49
|
+
CreateTransferLineItemOptionValidationError$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
CreateTransferLineItemOptionValidationError
|
|
52
|
+
> = z.object({
|
|
53
|
+
name: z.string().optional(),
|
|
54
|
+
group: z.string().optional(),
|
|
55
|
+
priceModifier: AmountDecimalValidationError$outboundSchema.optional(),
|
|
56
|
+
quantity: z.string().optional(),
|
|
57
|
+
imageIDs: z.string().optional(),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function createTransferLineItemOptionValidationErrorToJSON(
|
|
61
|
+
createTransferLineItemOptionValidationError:
|
|
62
|
+
CreateTransferLineItemOptionValidationError,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
CreateTransferLineItemOptionValidationError$outboundSchema.parse(
|
|
66
|
+
createTransferLineItemOptionValidationError,
|
|
67
|
+
),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
export function createTransferLineItemOptionValidationErrorFromJSON(
|
|
71
|
+
jsonString: string,
|
|
72
|
+
): SafeParseResult<
|
|
73
|
+
CreateTransferLineItemOptionValidationError,
|
|
74
|
+
SDKValidationError
|
|
75
|
+
> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) =>
|
|
79
|
+
CreateTransferLineItemOptionValidationError$inboundSchema.parse(
|
|
80
|
+
JSON.parse(x),
|
|
81
|
+
),
|
|
82
|
+
`Failed to parse 'CreateTransferLineItemOptionValidationError' from JSON`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
CreateTransferLineItem,
|
|
11
|
+
CreateTransferLineItem$inboundSchema,
|
|
12
|
+
CreateTransferLineItem$Outbound,
|
|
13
|
+
CreateTransferLineItem$outboundSchema,
|
|
14
|
+
} from "./createtransferlineitem.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* An optional collection of line items for a transfer.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* When line items are provided, their total plus sales tax must equal the transfer amount.
|
|
21
|
+
*/
|
|
22
|
+
export type CreateTransferLineItems = {
|
|
23
|
+
/**
|
|
24
|
+
* The list of line items.
|
|
25
|
+
*/
|
|
26
|
+
items: Array<CreateTransferLineItem>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const CreateTransferLineItems$inboundSchema: z.ZodType<
|
|
31
|
+
CreateTransferLineItems,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
items: z.array(CreateTransferLineItem$inboundSchema),
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type CreateTransferLineItems$Outbound = {
|
|
39
|
+
items: Array<CreateTransferLineItem$Outbound>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const CreateTransferLineItems$outboundSchema: z.ZodType<
|
|
44
|
+
CreateTransferLineItems$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
CreateTransferLineItems
|
|
47
|
+
> = z.object({
|
|
48
|
+
items: z.array(CreateTransferLineItem$outboundSchema),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function createTransferLineItemsToJSON(
|
|
52
|
+
createTransferLineItems: CreateTransferLineItems,
|
|
53
|
+
): string {
|
|
54
|
+
return JSON.stringify(
|
|
55
|
+
CreateTransferLineItems$outboundSchema.parse(createTransferLineItems),
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
export function createTransferLineItemsFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<CreateTransferLineItems, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => CreateTransferLineItems$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'CreateTransferLineItems' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
CreateTransferLineItemValidationError,
|
|
11
|
+
CreateTransferLineItemValidationError$inboundSchema,
|
|
12
|
+
CreateTransferLineItemValidationError$Outbound,
|
|
13
|
+
CreateTransferLineItemValidationError$outboundSchema,
|
|
14
|
+
} from "./createtransferlineitemvalidationerror.js";
|
|
15
|
+
|
|
16
|
+
export type CreateTransferLineItemsValidationError = {
|
|
17
|
+
items?: { [k: string]: CreateTransferLineItemValidationError } | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const CreateTransferLineItemsValidationError$inboundSchema: z.ZodType<
|
|
22
|
+
CreateTransferLineItemsValidationError,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
items: z.record(CreateTransferLineItemValidationError$inboundSchema)
|
|
27
|
+
.optional(),
|
|
28
|
+
});
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type CreateTransferLineItemsValidationError$Outbound = {
|
|
31
|
+
items?:
|
|
32
|
+
| { [k: string]: CreateTransferLineItemValidationError$Outbound }
|
|
33
|
+
| undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const CreateTransferLineItemsValidationError$outboundSchema: z.ZodType<
|
|
38
|
+
CreateTransferLineItemsValidationError$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
CreateTransferLineItemsValidationError
|
|
41
|
+
> = z.object({
|
|
42
|
+
items: z.record(CreateTransferLineItemValidationError$outboundSchema)
|
|
43
|
+
.optional(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function createTransferLineItemsValidationErrorToJSON(
|
|
47
|
+
createTransferLineItemsValidationError:
|
|
48
|
+
CreateTransferLineItemsValidationError,
|
|
49
|
+
): string {
|
|
50
|
+
return JSON.stringify(
|
|
51
|
+
CreateTransferLineItemsValidationError$outboundSchema.parse(
|
|
52
|
+
createTransferLineItemsValidationError,
|
|
53
|
+
),
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
export function createTransferLineItemsValidationErrorFromJSON(
|
|
57
|
+
jsonString: string,
|
|
58
|
+
): SafeParseResult<CreateTransferLineItemsValidationError, SDKValidationError> {
|
|
59
|
+
return safeParse(
|
|
60
|
+
jsonString,
|
|
61
|
+
(x) =>
|
|
62
|
+
CreateTransferLineItemsValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
63
|
+
`Failed to parse 'CreateTransferLineItemsValidationError' from JSON`,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
import {
|
|
16
|
+
CreateTransferLineItemOptionValidationError,
|
|
17
|
+
CreateTransferLineItemOptionValidationError$inboundSchema,
|
|
18
|
+
CreateTransferLineItemOptionValidationError$Outbound,
|
|
19
|
+
CreateTransferLineItemOptionValidationError$outboundSchema,
|
|
20
|
+
} from "./createtransferlineitemoptionvalidationerror.js";
|
|
21
|
+
|
|
22
|
+
export type CreateTransferLineItemValidationError = {
|
|
23
|
+
productID?: string | undefined;
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
basePrice?: AmountDecimalValidationError | undefined;
|
|
26
|
+
options?:
|
|
27
|
+
| { [k: string]: CreateTransferLineItemOptionValidationError }
|
|
28
|
+
| undefined;
|
|
29
|
+
quantity?: string | undefined;
|
|
30
|
+
imageIDs?: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const CreateTransferLineItemValidationError$inboundSchema: z.ZodType<
|
|
35
|
+
CreateTransferLineItemValidationError,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
unknown
|
|
38
|
+
> = z.object({
|
|
39
|
+
productID: z.string().optional(),
|
|
40
|
+
name: z.string().optional(),
|
|
41
|
+
basePrice: AmountDecimalValidationError$inboundSchema.optional(),
|
|
42
|
+
options: z.record(CreateTransferLineItemOptionValidationError$inboundSchema)
|
|
43
|
+
.optional(),
|
|
44
|
+
quantity: z.string().optional(),
|
|
45
|
+
imageIDs: z.string().optional(),
|
|
46
|
+
});
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type CreateTransferLineItemValidationError$Outbound = {
|
|
49
|
+
productID?: string | undefined;
|
|
50
|
+
name?: string | undefined;
|
|
51
|
+
basePrice?: AmountDecimalValidationError$Outbound | undefined;
|
|
52
|
+
options?: {
|
|
53
|
+
[k: string]: CreateTransferLineItemOptionValidationError$Outbound;
|
|
54
|
+
} | undefined;
|
|
55
|
+
quantity?: string | undefined;
|
|
56
|
+
imageIDs?: string | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const CreateTransferLineItemValidationError$outboundSchema: z.ZodType<
|
|
61
|
+
CreateTransferLineItemValidationError$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
CreateTransferLineItemValidationError
|
|
64
|
+
> = z.object({
|
|
65
|
+
productID: z.string().optional(),
|
|
66
|
+
name: z.string().optional(),
|
|
67
|
+
basePrice: AmountDecimalValidationError$outboundSchema.optional(),
|
|
68
|
+
options: z.record(CreateTransferLineItemOptionValidationError$outboundSchema)
|
|
69
|
+
.optional(),
|
|
70
|
+
quantity: z.string().optional(),
|
|
71
|
+
imageIDs: z.string().optional(),
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export function createTransferLineItemValidationErrorToJSON(
|
|
75
|
+
createTransferLineItemValidationError: CreateTransferLineItemValidationError,
|
|
76
|
+
): string {
|
|
77
|
+
return JSON.stringify(
|
|
78
|
+
CreateTransferLineItemValidationError$outboundSchema.parse(
|
|
79
|
+
createTransferLineItemValidationError,
|
|
80
|
+
),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
export function createTransferLineItemValidationErrorFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<CreateTransferLineItemValidationError, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) =>
|
|
89
|
+
CreateTransferLineItemValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'CreateTransferLineItemValidationError' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -175,6 +175,12 @@ export * from "./createtransfer.js";
|
|
|
175
175
|
export * from "./createtransferdestination.js";
|
|
176
176
|
export * from "./createtransferdestinationach.js";
|
|
177
177
|
export * from "./createtransferdestinationcard.js";
|
|
178
|
+
export * from "./createtransferlineitem.js";
|
|
179
|
+
export * from "./createtransferlineitemoption.js";
|
|
180
|
+
export * from "./createtransferlineitemoptionvalidationerror.js";
|
|
181
|
+
export * from "./createtransferlineitems.js";
|
|
182
|
+
export * from "./createtransferlineitemsvalidationerror.js";
|
|
183
|
+
export * from "./createtransferlineitemvalidationerror.js";
|
|
178
184
|
export * from "./createtransferoptions.js";
|
|
179
185
|
export * from "./createtransfersource.js";
|
|
180
186
|
export * from "./createtransfersourceach.js";
|
|
@@ -419,6 +425,7 @@ export * from "./sendfundsrtp.js";
|
|
|
419
425
|
export * from "./sendfundsrtperror.js";
|
|
420
426
|
export * from "./sentreceipt.js";
|
|
421
427
|
export * from "./settings.js";
|
|
428
|
+
export * from "./sharescopes.js";
|
|
422
429
|
export * from "./sourcedestinationoptions.js";
|
|
423
430
|
export * from "./statement.js";
|
|
424
431
|
export * from "./submissionintent.js";
|
|
@@ -452,11 +459,9 @@ export * from "./transferaccount.js";
|
|
|
452
459
|
export * from "./transferdestination.js";
|
|
453
460
|
export * from "./transferfailurereason.js";
|
|
454
461
|
export * from "./transferlineitem.js";
|
|
462
|
+
export * from "./transferlineitemimagemetadata.js";
|
|
455
463
|
export * from "./transferlineitemoption.js";
|
|
456
|
-
export * from "./transferlineitemoptionvalidationerror.js";
|
|
457
464
|
export * from "./transferlineitems.js";
|
|
458
|
-
export * from "./transferlineitemsvalidationerror.js";
|
|
459
|
-
export * from "./transferlineitemvalidationerror.js";
|
|
460
465
|
export * from "./transferoptions.js";
|
|
461
466
|
export * from "./transferparty.js";
|
|
462
467
|
export * from "./transfersource.js";
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
ApplicationScope,
|
|
11
|
+
ApplicationScope$inboundSchema,
|
|
12
|
+
ApplicationScope$outboundSchema,
|
|
13
|
+
} from "./applicationscope.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Describes the scopes being shared from a subject account to a principal account.
|
|
17
|
+
*/
|
|
18
|
+
export type ShareScopes = {
|
|
19
|
+
/**
|
|
20
|
+
* The account ID that will receive access to the scopes.
|
|
21
|
+
*/
|
|
22
|
+
principalAccountID: string;
|
|
23
|
+
/**
|
|
24
|
+
* The list of scopes to share with the principal account. If none are provided, all intersecting scopes are added.
|
|
25
|
+
*/
|
|
26
|
+
allowScopes?: Array<ApplicationScope> | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const ShareScopes$inboundSchema: z.ZodType<
|
|
31
|
+
ShareScopes,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
principalAccountID: z.string(),
|
|
36
|
+
allowScopes: z.array(ApplicationScope$inboundSchema).optional(),
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type ShareScopes$Outbound = {
|
|
40
|
+
principalAccountID: string;
|
|
41
|
+
allowScopes?: Array<string> | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const ShareScopes$outboundSchema: z.ZodType<
|
|
46
|
+
ShareScopes$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
ShareScopes
|
|
49
|
+
> = z.object({
|
|
50
|
+
principalAccountID: z.string(),
|
|
51
|
+
allowScopes: z.array(ApplicationScope$outboundSchema).optional(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export function shareScopesToJSON(shareScopes: ShareScopes): string {
|
|
55
|
+
return JSON.stringify(ShareScopes$outboundSchema.parse(shareScopes));
|
|
56
|
+
}
|
|
57
|
+
export function shareScopesFromJSON(
|
|
58
|
+
jsonString: string,
|
|
59
|
+
): SafeParseResult<ShareScopes, SDKValidationError> {
|
|
60
|
+
return safeParse(
|
|
61
|
+
jsonString,
|
|
62
|
+
(x) => ShareScopes$inboundSchema.parse(JSON.parse(x)),
|
|
63
|
+
`Failed to parse 'ShareScopes' from JSON`,
|
|
64
|
+
);
|
|
65
|
+
}
|