@shippo/shippo-mcp 0.8.39 → 0.8.43
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/bin/mcp-server.js +68 -32
- package/bin/mcp-server.js.map +11 -11
- package/esm/funcs/batchesCreate.d.ts +9 -0
- package/esm/funcs/batchesCreate.d.ts.map +1 -1
- package/esm/funcs/batchesCreate.js +9 -0
- package/esm/funcs/batchesCreate.js.map +1 -1
- package/esm/funcs/batchesGet.d.ts +5 -4
- package/esm/funcs/batchesGet.d.ts.map +1 -1
- package/esm/funcs/batchesGet.js +5 -4
- package/esm/funcs/batchesGet.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/mcp-server/tools/batchesCreate.d.ts.map +1 -1
- package/esm/mcp-server/tools/batchesCreate.js +11 -1
- package/esm/mcp-server/tools/batchesCreate.js.map +1 -1
- package/esm/mcp-server/tools/batchesGet.d.ts.map +1 -1
- package/esm/mcp-server/tools/batchesGet.js +6 -4
- package/esm/mcp-server/tools/batchesGet.js.map +1 -1
- package/esm/models/order.d.ts +39 -11
- package/esm/models/order.d.ts.map +1 -1
- package/esm/models/order.js +36 -11
- package/esm/models/order.js.map +1 -1
- package/esm/models/ordercreaterequest.d.ts +10 -10
- package/esm/models/ordercreaterequest.d.ts.map +1 -1
- package/esm/models/ordercreaterequest.js +10 -10
- package/esm/models/ordercreaterequest.js.map +1 -1
- package/manifest.json +3 -3
- package/package.json +1 -1
- package/src/funcs/batchesCreate.ts +9 -0
- package/src/funcs/batchesGet.ts +5 -4
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/batchesCreate.ts +11 -1
- package/src/mcp-server/tools/batchesGet.ts +6 -4
- package/src/models/order.ts +84 -22
- package/src/models/ordercreaterequest.ts +20 -20
|
@@ -14,10 +14,12 @@ export const tool$batchesGet: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "batches-get",
|
|
15
15
|
description: `Retrieve a batch
|
|
16
16
|
|
|
17
|
-
Returns a batch using an object ID.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
Returns a batch using an object ID. Batch shipments are displayed 100 at a time. You can iterate through each \`page\` using the \`?page=\` query parameter. You can also filter based on batch shipment status, for example, by passing a query param like \`?object_results=creation_failed\`.
|
|
18
|
+
|
|
19
|
+
**IMPORTANT: There is NO batches-list endpoint in the Shippo API.**
|
|
20
|
+
You must know the batch \`object_id\` (returned when you created the batch) to retrieve it.
|
|
21
|
+
Store batch IDs when creating batches if you need to access them later.
|
|
22
|
+
`,
|
|
21
23
|
annotations: {
|
|
22
24
|
"title": "",
|
|
23
25
|
"destructiveHint": false,
|
package/src/models/order.ts
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { Address, Address$zodSchema } from "./address.js";
|
|
7
|
+
import {
|
|
8
|
+
AddressValidationResults,
|
|
9
|
+
AddressValidationResults$zodSchema,
|
|
10
|
+
} from "./addressvalidationresults.js";
|
|
7
11
|
import { LineItem, LineItem$zodSchema } from "./lineitem.js";
|
|
8
12
|
import {
|
|
9
13
|
OrderShopAppEnum,
|
|
@@ -15,6 +19,63 @@ import {
|
|
|
15
19
|
} from "./orderstatusenum.js";
|
|
16
20
|
import { WeightUnitEnum, WeightUnitEnum$zodSchema } from "./weightunitenum.js";
|
|
17
21
|
|
|
22
|
+
/**
|
|
23
|
+
* <a href="#tag/Addresses">Address</a> object of the sender / seller. Will be returned expanded by default.
|
|
24
|
+
*/
|
|
25
|
+
export type OrderAddressFrom = {
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
company?: string | undefined;
|
|
28
|
+
street1?: string | undefined;
|
|
29
|
+
street2?: string | undefined;
|
|
30
|
+
street3?: string | undefined;
|
|
31
|
+
street_no?: string | undefined;
|
|
32
|
+
city?: string | undefined;
|
|
33
|
+
state?: string | undefined;
|
|
34
|
+
zip?: string | undefined;
|
|
35
|
+
country: string;
|
|
36
|
+
phone?: string | undefined;
|
|
37
|
+
email?: string | undefined;
|
|
38
|
+
is_residential?: boolean | null | undefined;
|
|
39
|
+
metadata?: string | undefined;
|
|
40
|
+
is_complete?: boolean | undefined;
|
|
41
|
+
object_created?: string | undefined;
|
|
42
|
+
object_id?: string | undefined;
|
|
43
|
+
object_owner?: string | undefined;
|
|
44
|
+
object_updated?: string | undefined;
|
|
45
|
+
validation_results?: AddressValidationResults | undefined;
|
|
46
|
+
test?: boolean | null | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const OrderAddressFrom$zodSchema: z.ZodType<
|
|
50
|
+
OrderAddressFrom,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
unknown
|
|
53
|
+
> = z.object({
|
|
54
|
+
city: z.string().optional(),
|
|
55
|
+
company: z.string().optional(),
|
|
56
|
+
country: z.string(),
|
|
57
|
+
email: z.string().optional(),
|
|
58
|
+
is_complete: z.boolean().optional(),
|
|
59
|
+
is_residential: z.boolean().nullable().optional(),
|
|
60
|
+
metadata: z.string().optional(),
|
|
61
|
+
name: z.string().optional(),
|
|
62
|
+
object_created: z.string().datetime({ offset: true }).optional(),
|
|
63
|
+
object_id: z.string().optional(),
|
|
64
|
+
object_owner: z.string().optional(),
|
|
65
|
+
object_updated: z.string().datetime({ offset: true }).optional(),
|
|
66
|
+
phone: z.string().optional(),
|
|
67
|
+
state: z.string().optional(),
|
|
68
|
+
street1: z.string().optional(),
|
|
69
|
+
street2: z.string().optional(),
|
|
70
|
+
street3: z.string().optional(),
|
|
71
|
+
street_no: z.string().optional(),
|
|
72
|
+
test: z.boolean().nullable().optional(),
|
|
73
|
+
validation_results: AddressValidationResults$zodSchema.optional(),
|
|
74
|
+
zip: z.string().optional(),
|
|
75
|
+
}).describe(
|
|
76
|
+
"<a href=\"#tag/Addresses\">Address</a> object of the sender / seller. Will be returned expanded by default.",
|
|
77
|
+
);
|
|
78
|
+
|
|
18
79
|
export type OrderTransaction = {};
|
|
19
80
|
|
|
20
81
|
export const OrderTransaction$zodSchema: z.ZodType<
|
|
@@ -24,20 +85,20 @@ export const OrderTransaction$zodSchema: z.ZodType<
|
|
|
24
85
|
> = z.object({});
|
|
25
86
|
|
|
26
87
|
export type Order = {
|
|
27
|
-
currency?: string | undefined;
|
|
28
|
-
notes?: string | undefined;
|
|
29
|
-
order_number?: string | undefined;
|
|
88
|
+
currency?: string | null | undefined;
|
|
89
|
+
notes?: string | null | undefined;
|
|
90
|
+
order_number?: string | null | undefined;
|
|
30
91
|
order_status?: OrderStatusEnum | undefined;
|
|
31
92
|
placed_at: string;
|
|
32
|
-
shipping_cost?: string | undefined;
|
|
33
|
-
shipping_cost_currency?: string | undefined;
|
|
34
|
-
shipping_method?: string | undefined;
|
|
35
|
-
subtotal_price?: string | undefined;
|
|
36
|
-
total_price?: string | undefined;
|
|
37
|
-
total_tax?: string | undefined;
|
|
38
|
-
weight?: string | undefined;
|
|
93
|
+
shipping_cost?: string | null | undefined;
|
|
94
|
+
shipping_cost_currency?: string | null | undefined;
|
|
95
|
+
shipping_method?: string | null | undefined;
|
|
96
|
+
subtotal_price?: string | null | undefined;
|
|
97
|
+
total_price?: string | null | undefined;
|
|
98
|
+
total_tax?: string | null | undefined;
|
|
99
|
+
weight?: string | null | undefined;
|
|
39
100
|
weight_unit?: WeightUnitEnum | undefined;
|
|
40
|
-
from_address?:
|
|
101
|
+
from_address?: OrderAddressFrom | null | undefined;
|
|
41
102
|
to_address: Address;
|
|
42
103
|
line_items?: Array<LineItem> | undefined;
|
|
43
104
|
object_id?: string | undefined;
|
|
@@ -48,24 +109,25 @@ export type Order = {
|
|
|
48
109
|
|
|
49
110
|
export const Order$zodSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
50
111
|
.object({
|
|
51
|
-
currency: z.string().optional(),
|
|
52
|
-
from_address:
|
|
112
|
+
currency: z.string().nullable().optional(),
|
|
113
|
+
from_address: z.lazy(() => OrderAddressFrom$zodSchema).nullable()
|
|
114
|
+
.optional(),
|
|
53
115
|
line_items: z.array(LineItem$zodSchema).optional(),
|
|
54
|
-
notes: z.string().optional(),
|
|
116
|
+
notes: z.string().nullable().optional(),
|
|
55
117
|
object_id: z.string().optional(),
|
|
56
118
|
object_owner: z.string().optional(),
|
|
57
|
-
order_number: z.string().optional(),
|
|
119
|
+
order_number: z.string().nullable().optional(),
|
|
58
120
|
order_status: OrderStatusEnum$zodSchema.optional(),
|
|
59
121
|
placed_at: z.string(),
|
|
60
|
-
shipping_cost: z.string().optional(),
|
|
61
|
-
shipping_cost_currency: z.string().optional(),
|
|
62
|
-
shipping_method: z.string().optional(),
|
|
122
|
+
shipping_cost: z.string().nullable().optional(),
|
|
123
|
+
shipping_cost_currency: z.string().nullable().optional(),
|
|
124
|
+
shipping_method: z.string().nullable().optional(),
|
|
63
125
|
shop_app: OrderShopAppEnum$zodSchema.optional(),
|
|
64
|
-
subtotal_price: z.string().optional(),
|
|
126
|
+
subtotal_price: z.string().nullable().optional(),
|
|
65
127
|
to_address: Address$zodSchema,
|
|
66
|
-
total_price: z.string().optional(),
|
|
67
|
-
total_tax: z.string().optional(),
|
|
128
|
+
total_price: z.string().nullable().optional(),
|
|
129
|
+
total_tax: z.string().nullable().optional(),
|
|
68
130
|
transactions: z.array(z.lazy(() => OrderTransaction$zodSchema)).optional(),
|
|
69
|
-
weight: z.string().optional(),
|
|
131
|
+
weight: z.string().nullable().optional(),
|
|
70
132
|
weight_unit: WeightUnitEnum$zodSchema.optional(),
|
|
71
133
|
});
|
|
@@ -15,18 +15,18 @@ import {
|
|
|
15
15
|
import { WeightUnitEnum, WeightUnitEnum$zodSchema } from "./weightunitenum.js";
|
|
16
16
|
|
|
17
17
|
export type OrderCreateRequest = {
|
|
18
|
-
currency?: string | undefined;
|
|
19
|
-
notes?: string | undefined;
|
|
20
|
-
order_number?: string | undefined;
|
|
18
|
+
currency?: string | null | undefined;
|
|
19
|
+
notes?: string | null | undefined;
|
|
20
|
+
order_number?: string | null | undefined;
|
|
21
21
|
order_status?: OrderStatusEnum | undefined;
|
|
22
22
|
placed_at: string;
|
|
23
|
-
shipping_cost?: string | undefined;
|
|
24
|
-
shipping_cost_currency?: string | undefined;
|
|
25
|
-
shipping_method?: string | undefined;
|
|
26
|
-
subtotal_price?: string | undefined;
|
|
27
|
-
total_price?: string | undefined;
|
|
28
|
-
total_tax?: string | undefined;
|
|
29
|
-
weight?: string | undefined;
|
|
23
|
+
shipping_cost?: string | null | undefined;
|
|
24
|
+
shipping_cost_currency?: string | null | undefined;
|
|
25
|
+
shipping_method?: string | null | undefined;
|
|
26
|
+
subtotal_price?: string | null | undefined;
|
|
27
|
+
total_price?: string | null | undefined;
|
|
28
|
+
total_tax?: string | null | undefined;
|
|
29
|
+
weight?: string | null | undefined;
|
|
30
30
|
weight_unit?: WeightUnitEnum | undefined;
|
|
31
31
|
from_address?: AddressCreateRequest | undefined;
|
|
32
32
|
to_address: AddressCreateRequest;
|
|
@@ -38,20 +38,20 @@ export const OrderCreateRequest$zodSchema: z.ZodType<
|
|
|
38
38
|
z.ZodTypeDef,
|
|
39
39
|
unknown
|
|
40
40
|
> = z.object({
|
|
41
|
-
currency: z.string().optional(),
|
|
41
|
+
currency: z.string().nullable().optional(),
|
|
42
42
|
from_address: AddressCreateRequest$zodSchema.optional(),
|
|
43
43
|
line_items: z.array(LineItemBase$zodSchema).optional(),
|
|
44
|
-
notes: z.string().optional(),
|
|
45
|
-
order_number: z.string().optional(),
|
|
44
|
+
notes: z.string().nullable().optional(),
|
|
45
|
+
order_number: z.string().nullable().optional(),
|
|
46
46
|
order_status: OrderStatusEnum$zodSchema.optional(),
|
|
47
47
|
placed_at: z.string(),
|
|
48
|
-
shipping_cost: z.string().optional(),
|
|
49
|
-
shipping_cost_currency: z.string().optional(),
|
|
50
|
-
shipping_method: z.string().optional(),
|
|
51
|
-
subtotal_price: z.string().optional(),
|
|
48
|
+
shipping_cost: z.string().nullable().optional(),
|
|
49
|
+
shipping_cost_currency: z.string().nullable().optional(),
|
|
50
|
+
shipping_method: z.string().nullable().optional(),
|
|
51
|
+
subtotal_price: z.string().nullable().optional(),
|
|
52
52
|
to_address: AddressCreateRequest$zodSchema,
|
|
53
|
-
total_price: z.string().optional(),
|
|
54
|
-
total_tax: z.string().optional(),
|
|
55
|
-
weight: z.string().optional(),
|
|
53
|
+
total_price: z.string().nullable().optional(),
|
|
54
|
+
total_tax: z.string().nullable().optional(),
|
|
55
|
+
weight: z.string().nullable().optional(),
|
|
56
56
|
weight_unit: WeightUnitEnum$zodSchema.optional(),
|
|
57
57
|
});
|