@moovio/sdk 0.22.8 → 0.22.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -64
- package/bin/mcp-server.js +691 -849
- package/bin/mcp-server.js.map +23 -24
- package/examples/package-lock.json +1 -1
- package/funcs/imagesDelete.d.ts +4 -1
- package/funcs/imagesDelete.d.ts.map +1 -1
- package/funcs/imagesDelete.js +4 -1
- package/funcs/imagesDelete.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +1 -3
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/imagesDelete.d.ts.map +1 -1
- package/mcp-server/tools/imagesDelete.js +4 -1
- package/mcp-server/tools/imagesDelete.js.map +1 -1
- package/models/components/createtransfer.d.ts +3 -3
- package/models/components/createtransfer.d.ts.map +1 -1
- package/models/components/createtransfer.js +3 -3
- package/models/components/createtransfer.js.map +1 -1
- package/models/components/createtransferlineitem.d.ts +50 -0
- package/models/components/createtransferlineitem.d.ts.map +1 -0
- package/models/components/createtransferlineitem.js +70 -0
- package/models/components/createtransferlineitem.js.map +1 -0
- package/models/components/createtransferlineitemoption.d.ts +44 -0
- package/models/components/createtransferlineitemoption.d.ts.map +1 -0
- package/models/{errors/markinvoicepaiderror.js → components/createtransferlineitemoption.js} +25 -41
- package/models/components/createtransferlineitemoption.js.map +1 -0
- package/models/components/createtransferlineitemoptionvalidationerror.d.ts +26 -0
- package/models/components/createtransferlineitemoptionvalidationerror.d.ts.map +1 -0
- package/models/components/{transferlineitemoptionvalidationerror.js → createtransferlineitemoptionvalidationerror.js} +12 -10
- package/models/components/createtransferlineitemoptionvalidationerror.js.map +1 -0
- package/models/components/createtransferlineitems.d.ts +27 -0
- package/models/components/createtransferlineitems.d.ts.map +1 -0
- package/models/components/{markinvoicepaid.js → createtransferlineitems.js} +13 -17
- package/models/components/createtransferlineitems.js.map +1 -0
- package/models/components/createtransferlineitemsvalidationerror.d.ts +22 -0
- package/models/components/createtransferlineitemsvalidationerror.d.ts.map +1 -0
- package/models/components/createtransferlineitemsvalidationerror.js +61 -0
- package/models/components/createtransferlineitemsvalidationerror.js.map +1 -0
- package/models/components/createtransferlineitemvalidationerror.d.ts +33 -0
- package/models/components/createtransferlineitemvalidationerror.d.ts.map +1 -0
- package/models/components/{transferlineitemvalidationerror.js → createtransferlineitemvalidationerror.js} +15 -13
- package/models/components/createtransferlineitemvalidationerror.js.map +1 -0
- package/models/components/imagemetadata.d.ts +2 -0
- package/models/components/imagemetadata.d.ts.map +1 -1
- package/models/components/imagemetadata.js +3 -0
- package/models/components/imagemetadata.js.map +1 -1
- package/models/components/index.d.ts +7 -4
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -4
- package/models/components/index.js.map +1 -1
- package/models/components/transferlineitem.d.ts +6 -0
- package/models/components/transferlineitem.d.ts.map +1 -1
- package/models/components/transferlineitem.js +3 -0
- package/models/components/transferlineitem.js.map +1 -1
- package/models/components/transferlineitemimagemetadata.d.ts +35 -0
- package/models/components/transferlineitemimagemetadata.d.ts.map +1 -0
- package/models/components/{transferlineitemsvalidationerror.js → transferlineitemimagemetadata.js} +18 -13
- package/models/components/transferlineitemimagemetadata.js.map +1 -0
- package/models/components/transferlineitemoption.d.ts +6 -0
- package/models/components/transferlineitemoption.d.ts.map +1 -1
- package/models/components/transferlineitemoption.js +3 -0
- package/models/components/transferlineitemoption.js.map +1 -1
- package/models/errors/index.d.ts +0 -1
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -1
- package/models/errors/index.js.map +1 -1
- package/models/errors/transfervalidationerror.d.ts +3 -3
- package/models/errors/transfervalidationerror.d.ts.map +1 -1
- package/models/errors/transfervalidationerror.js +3 -3
- package/models/errors/transfervalidationerror.js.map +1 -1
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/images.d.ts +4 -1
- package/sdk/images.d.ts.map +1 -1
- package/sdk/images.js +4 -1
- package/sdk/images.js.map +1 -1
- package/sdk/invoices.d.ts +0 -8
- package/sdk/invoices.d.ts.map +1 -1
- package/sdk/invoices.js +0 -11
- package/sdk/invoices.js.map +1 -1
- package/src/funcs/imagesDelete.ts +4 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -3
- package/src/mcp-server/tools/imagesDelete.ts +4 -1
- package/src/models/components/createtransfer.ts +10 -10
- package/src/models/components/createtransferlineitem.ts +104 -0
- package/src/models/components/createtransferlineitemoption.ts +93 -0
- package/src/models/components/createtransferlineitemoptionvalidationerror.ts +84 -0
- package/src/models/components/createtransferlineitems.ts +66 -0
- package/src/models/components/createtransferlineitemsvalidationerror.ts +65 -0
- package/src/models/components/createtransferlineitemvalidationerror.ts +92 -0
- package/src/models/components/imagemetadata.ts +5 -0
- package/src/models/components/index.ts +7 -4
- package/src/models/components/transferlineitem.ts +13 -0
- package/src/models/components/transferlineitemimagemetadata.ts +77 -0
- package/src/models/components/transferlineitemoption.ts +13 -0
- package/src/models/errors/index.ts +0 -1
- package/src/models/errors/transfervalidationerror.ts +8 -6
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/images.ts +4 -1
- package/src/sdk/invoices.ts +0 -19
- package/funcs/invoicesMarkPaidInvoice.d.ts +0 -19
- package/funcs/invoicesMarkPaidInvoice.d.ts.map +0 -1
- package/funcs/invoicesMarkPaidInvoice.js +0 -144
- package/funcs/invoicesMarkPaidInvoice.js.map +0 -1
- package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts +0 -8
- package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts.map +0 -1
- package/mcp-server/tools/invoicesMarkPaidInvoice.js +0 -66
- package/mcp-server/tools/invoicesMarkPaidInvoice.js.map +0 -1
- package/models/components/markinvoicepaid.d.ts +0 -21
- package/models/components/markinvoicepaid.d.ts.map +0 -1
- package/models/components/markinvoicepaid.js.map +0 -1
- package/models/components/transferlineitemoptionvalidationerror.d.ts +0 -24
- package/models/components/transferlineitemoptionvalidationerror.d.ts.map +0 -1
- package/models/components/transferlineitemoptionvalidationerror.js.map +0 -1
- package/models/components/transferlineitemsvalidationerror.d.ts +0 -22
- package/models/components/transferlineitemsvalidationerror.d.ts.map +0 -1
- package/models/components/transferlineitemsvalidationerror.js.map +0 -1
- package/models/components/transferlineitemvalidationerror.d.ts +0 -31
- package/models/components/transferlineitemvalidationerror.d.ts.map +0 -1
- package/models/components/transferlineitemvalidationerror.js.map +0 -1
- package/models/errors/markinvoicepaiderror.d.ts +0 -30
- package/models/errors/markinvoicepaiderror.d.ts.map +0 -1
- package/models/errors/markinvoicepaiderror.js.map +0 -1
- package/models/operations/markpaidinvoice.d.ts +0 -68
- package/models/operations/markpaidinvoice.d.ts.map +0 -1
- package/models/operations/markpaidinvoice.js +0 -124
- package/models/operations/markpaidinvoice.js.map +0 -1
- package/src/funcs/invoicesMarkPaidInvoice.ts +0 -208
- package/src/mcp-server/tools/invoicesMarkPaidInvoice.ts +0 -39
- package/src/models/components/markinvoicepaid.ts +0 -58
- package/src/models/components/transferlineitemoptionvalidationerror.ts +0 -72
- package/src/models/components/transferlineitemsvalidationerror.ts +0 -59
- package/src/models/components/transferlineitemvalidationerror.ts +0 -85
- package/src/models/errors/markinvoicepaiderror.ts +0 -78
- package/src/models/operations/markpaidinvoice.ts +0 -191
|
@@ -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
|
+
}
|
|
@@ -29,6 +29,7 @@ export type ImageMetadata = {
|
|
|
29
29
|
link: string;
|
|
30
30
|
createdOn: Date;
|
|
31
31
|
updatedOn: Date;
|
|
32
|
+
disabledOn?: Date | undefined;
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
/** @internal */
|
|
@@ -43,6 +44,8 @@ export const ImageMetadata$inboundSchema: z.ZodType<
|
|
|
43
44
|
link: z.string(),
|
|
44
45
|
createdOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
45
46
|
updatedOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
47
|
+
disabledOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
48
|
+
.optional(),
|
|
46
49
|
});
|
|
47
50
|
/** @internal */
|
|
48
51
|
export type ImageMetadata$Outbound = {
|
|
@@ -52,6 +55,7 @@ export type ImageMetadata$Outbound = {
|
|
|
52
55
|
link: string;
|
|
53
56
|
createdOn: string;
|
|
54
57
|
updatedOn: string;
|
|
58
|
+
disabledOn?: string | undefined;
|
|
55
59
|
};
|
|
56
60
|
|
|
57
61
|
/** @internal */
|
|
@@ -66,6 +70,7 @@ export const ImageMetadata$outboundSchema: z.ZodType<
|
|
|
66
70
|
link: z.string(),
|
|
67
71
|
createdOn: z.date().transform(v => v.toISOString()),
|
|
68
72
|
updatedOn: z.date().transform(v => v.toISOString()),
|
|
73
|
+
disabledOn: z.date().transform(v => v.toISOString()).optional(),
|
|
69
74
|
});
|
|
70
75
|
|
|
71
76
|
export function imageMetadataToJSON(imageMetadata: ImageMetadata): string {
|
|
@@ -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";
|
|
@@ -291,7 +297,6 @@ export * from "./linkedapplepaypaymentmethod.js";
|
|
|
291
297
|
export * from "./listfeesfetchrequest.js";
|
|
292
298
|
export * from "./manualtermsofservice.js";
|
|
293
299
|
export * from "./manualtermsofserviceupdate.js";
|
|
294
|
-
export * from "./markinvoicepaid.js";
|
|
295
300
|
export * from "./microdepositstatus.js";
|
|
296
301
|
export * from "./minimumcommitment.js";
|
|
297
302
|
export * from "./mode.js";
|
|
@@ -453,11 +458,9 @@ export * from "./transferaccount.js";
|
|
|
453
458
|
export * from "./transferdestination.js";
|
|
454
459
|
export * from "./transferfailurereason.js";
|
|
455
460
|
export * from "./transferlineitem.js";
|
|
461
|
+
export * from "./transferlineitemimagemetadata.js";
|
|
456
462
|
export * from "./transferlineitemoption.js";
|
|
457
|
-
export * from "./transferlineitemoptionvalidationerror.js";
|
|
458
463
|
export * from "./transferlineitems.js";
|
|
459
|
-
export * from "./transferlineitemsvalidationerror.js";
|
|
460
|
-
export * from "./transferlineitemvalidationerror.js";
|
|
461
464
|
export * from "./transferoptions.js";
|
|
462
465
|
export * from "./transferparty.js";
|
|
463
466
|
export * from "./transfersource.js";
|
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
AmountDecimal$Outbound,
|
|
13
13
|
AmountDecimal$outboundSchema,
|
|
14
14
|
} from "./amountdecimal.js";
|
|
15
|
+
import {
|
|
16
|
+
TransferLineItemImageMetadata,
|
|
17
|
+
TransferLineItemImageMetadata$inboundSchema,
|
|
18
|
+
TransferLineItemImageMetadata$Outbound,
|
|
19
|
+
TransferLineItemImageMetadata$outboundSchema,
|
|
20
|
+
} from "./transferlineitemimagemetadata.js";
|
|
15
21
|
import {
|
|
16
22
|
TransferLineItemOption,
|
|
17
23
|
TransferLineItemOption$inboundSchema,
|
|
@@ -39,6 +45,10 @@ export type TransferLineItem = {
|
|
|
39
45
|
* Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
|
|
40
46
|
*/
|
|
41
47
|
options?: Array<TransferLineItemOption> | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Optional list of images associated with this line item.
|
|
50
|
+
*/
|
|
51
|
+
images?: Array<TransferLineItemImageMetadata> | undefined;
|
|
42
52
|
/**
|
|
43
53
|
* Optional unique identifier associating the line item with a product.
|
|
44
54
|
*/
|
|
@@ -55,6 +65,7 @@ export const TransferLineItem$inboundSchema: z.ZodType<
|
|
|
55
65
|
basePrice: AmountDecimal$inboundSchema,
|
|
56
66
|
quantity: z.number().int(),
|
|
57
67
|
options: z.array(TransferLineItemOption$inboundSchema).optional(),
|
|
68
|
+
images: z.array(TransferLineItemImageMetadata$inboundSchema).optional(),
|
|
58
69
|
productID: z.string().optional(),
|
|
59
70
|
});
|
|
60
71
|
/** @internal */
|
|
@@ -63,6 +74,7 @@ export type TransferLineItem$Outbound = {
|
|
|
63
74
|
basePrice: AmountDecimal$Outbound;
|
|
64
75
|
quantity: number;
|
|
65
76
|
options?: Array<TransferLineItemOption$Outbound> | undefined;
|
|
77
|
+
images?: Array<TransferLineItemImageMetadata$Outbound> | undefined;
|
|
66
78
|
productID?: string | undefined;
|
|
67
79
|
};
|
|
68
80
|
|
|
@@ -76,6 +88,7 @@ export const TransferLineItem$outboundSchema: z.ZodType<
|
|
|
76
88
|
basePrice: AmountDecimal$outboundSchema,
|
|
77
89
|
quantity: z.number().int(),
|
|
78
90
|
options: z.array(TransferLineItemOption$outboundSchema).optional(),
|
|
91
|
+
images: z.array(TransferLineItemImageMetadata$outboundSchema).optional(),
|
|
79
92
|
productID: z.string().optional(),
|
|
80
93
|
});
|
|
81
94
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type TransferLineItemImageMetadata = {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for a image resource.
|
|
13
|
+
*/
|
|
14
|
+
imageID: string;
|
|
15
|
+
/**
|
|
16
|
+
* Alternative text for the image.
|
|
17
|
+
*/
|
|
18
|
+
altText?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The image's public URL.
|
|
21
|
+
*/
|
|
22
|
+
link: string;
|
|
23
|
+
/**
|
|
24
|
+
* A unique identifier for an image, used in public image links.
|
|
25
|
+
*/
|
|
26
|
+
publicID: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const TransferLineItemImageMetadata$inboundSchema: z.ZodType<
|
|
31
|
+
TransferLineItemImageMetadata,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
imageID: z.string(),
|
|
36
|
+
altText: z.string().optional(),
|
|
37
|
+
link: z.string(),
|
|
38
|
+
publicID: z.string(),
|
|
39
|
+
});
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type TransferLineItemImageMetadata$Outbound = {
|
|
42
|
+
imageID: string;
|
|
43
|
+
altText?: string | undefined;
|
|
44
|
+
link: string;
|
|
45
|
+
publicID: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const TransferLineItemImageMetadata$outboundSchema: z.ZodType<
|
|
50
|
+
TransferLineItemImageMetadata$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
TransferLineItemImageMetadata
|
|
53
|
+
> = z.object({
|
|
54
|
+
imageID: z.string(),
|
|
55
|
+
altText: z.string().optional(),
|
|
56
|
+
link: z.string(),
|
|
57
|
+
publicID: z.string(),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function transferLineItemImageMetadataToJSON(
|
|
61
|
+
transferLineItemImageMetadata: TransferLineItemImageMetadata,
|
|
62
|
+
): string {
|
|
63
|
+
return JSON.stringify(
|
|
64
|
+
TransferLineItemImageMetadata$outboundSchema.parse(
|
|
65
|
+
transferLineItemImageMetadata,
|
|
66
|
+
),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export function transferLineItemImageMetadataFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<TransferLineItemImageMetadata, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => TransferLineItemImageMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'TransferLineItemImageMetadata' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|