@shippo/shippo-mcp 0.8.39 → 0.8.48
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 +125 -40
- package/bin/mcp-server.js.map +17 -17
- 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 +9 -4
- package/esm/funcs/batchesGet.d.ts.map +1 -1
- package/esm/funcs/batchesGet.js +9 -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 +10 -4
- package/esm/mcp-server/tools/batchesGet.js.map +1 -1
- package/esm/mcp-server/tools/manifestsGet.d.ts.map +1 -1
- package/esm/mcp-server/tools/manifestsGet.js +10 -3
- package/esm/mcp-server/tools/manifestsGet.js.map +1 -1
- package/esm/mcp-server/tools/manifestsList.d.ts.map +1 -1
- package/esm/mcp-server/tools/manifestsList.js +10 -3
- package/esm/mcp-server/tools/manifestsList.js.map +1 -1
- package/esm/mcp-server/tools/trackingStatusGet.d.ts.map +1 -1
- package/esm/mcp-server/tools/trackingStatusGet.js +5 -0
- package/esm/mcp-server/tools/trackingStatusGet.js.map +1 -1
- package/esm/mcp-server/tools/transactionsCreate.d.ts.map +1 -1
- package/esm/mcp-server/tools/transactionsCreate.js +12 -0
- package/esm/mcp-server/tools/transactionsCreate.js.map +1 -1
- package/esm/mcp-server/tools/transactionsGet.d.ts.map +1 -1
- package/esm/mcp-server/tools/transactionsGet.js +7 -0
- package/esm/mcp-server/tools/transactionsGet.js.map +1 -1
- package/esm/mcp-server/tools/transactionsList.d.ts.map +1 -1
- package/esm/mcp-server/tools/transactionsList.js +7 -0
- package/esm/mcp-server/tools/transactionsList.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 +9 -9
- package/package.json +1 -1
- package/src/funcs/batchesCreate.ts +9 -0
- package/src/funcs/batchesGet.ts +9 -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 +10 -4
- package/src/mcp-server/tools/manifestsGet.ts +10 -3
- package/src/mcp-server/tools/manifestsList.ts +10 -3
- package/src/mcp-server/tools/trackingStatusGet.ts +5 -0
- package/src/mcp-server/tools/transactionsCreate.ts +12 -0
- package/src/mcp-server/tools/transactionsGet.ts +7 -0
- package/src/mcp-server/tools/transactionsList.ts +7 -0
- package/src/models/order.ts +84 -22
- package/src/models/ordercreaterequest.ts +20 -20
package/esm/models/order.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/models/order.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAW,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAY,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAEL,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;A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AE;CACjD,CAAC,CAAC"}
|
|
@@ -4,18 +4,18 @@ import { LineItemBase } from "./lineitembase.js";
|
|
|
4
4
|
import { OrderStatusEnum } from "./orderstatusenum.js";
|
|
5
5
|
import { WeightUnitEnum } from "./weightunitenum.js";
|
|
6
6
|
export type OrderCreateRequest = {
|
|
7
|
-
currency?: string | undefined;
|
|
8
|
-
notes?: string | undefined;
|
|
9
|
-
order_number?: string | undefined;
|
|
7
|
+
currency?: string | null | undefined;
|
|
8
|
+
notes?: string | null | undefined;
|
|
9
|
+
order_number?: string | null | undefined;
|
|
10
10
|
order_status?: OrderStatusEnum | undefined;
|
|
11
11
|
placed_at: string;
|
|
12
|
-
shipping_cost?: string | undefined;
|
|
13
|
-
shipping_cost_currency?: string | undefined;
|
|
14
|
-
shipping_method?: string | undefined;
|
|
15
|
-
subtotal_price?: string | undefined;
|
|
16
|
-
total_price?: string | undefined;
|
|
17
|
-
total_tax?: string | undefined;
|
|
18
|
-
weight?: string | undefined;
|
|
12
|
+
shipping_cost?: string | null | undefined;
|
|
13
|
+
shipping_cost_currency?: string | null | undefined;
|
|
14
|
+
shipping_method?: string | null | undefined;
|
|
15
|
+
subtotal_price?: string | null | undefined;
|
|
16
|
+
total_price?: string | null | undefined;
|
|
17
|
+
total_tax?: string | null | undefined;
|
|
18
|
+
weight?: string | null | undefined;
|
|
19
19
|
weight_unit?: WeightUnitEnum | undefined;
|
|
20
20
|
from_address?: AddressCreateRequest | undefined;
|
|
21
21
|
to_address: AddressCreateRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ordercreaterequest.d.ts","sourceRoot":"","sources":["../../src/models/ordercreaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAA0B,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,eAAe,EAEhB,MAAM,s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C,EAAE,cAAc,GAAG,SAAS,CAAC;IACzC,YAAY,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAChD,UAAU,EAAE,oBAAoB,CAAC;IACjC,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CAkBP,CAAC"}
|
|
@@ -7,21 +7,21 @@ import { LineItemBase$zodSchema } from "./lineitembase.js";
|
|
|
7
7
|
import { OrderStatusEnum$zodSchema, } from "./orderstatusenum.js";
|
|
8
8
|
import { WeightUnitEnum$zodSchema } from "./weightunitenum.js";
|
|
9
9
|
export const OrderCreateRequest$zodSchema = z.object({
|
|
10
|
-
currency: z.string().optional(),
|
|
10
|
+
currency: z.string().nullable().optional(),
|
|
11
11
|
from_address: AddressCreateRequest$zodSchema.optional(),
|
|
12
12
|
line_items: z.array(LineItemBase$zodSchema).optional(),
|
|
13
|
-
notes: z.string().optional(),
|
|
14
|
-
order_number: z.string().optional(),
|
|
13
|
+
notes: z.string().nullable().optional(),
|
|
14
|
+
order_number: z.string().nullable().optional(),
|
|
15
15
|
order_status: OrderStatusEnum$zodSchema.optional(),
|
|
16
16
|
placed_at: z.string(),
|
|
17
|
-
shipping_cost: z.string().optional(),
|
|
18
|
-
shipping_cost_currency: z.string().optional(),
|
|
19
|
-
shipping_method: z.string().optional(),
|
|
20
|
-
subtotal_price: z.string().optional(),
|
|
17
|
+
shipping_cost: z.string().nullable().optional(),
|
|
18
|
+
shipping_cost_currency: z.string().nullable().optional(),
|
|
19
|
+
shipping_method: z.string().nullable().optional(),
|
|
20
|
+
subtotal_price: z.string().nullable().optional(),
|
|
21
21
|
to_address: AddressCreateRequest$zodSchema,
|
|
22
|
-
total_price: z.string().optional(),
|
|
23
|
-
total_tax: z.string().optional(),
|
|
24
|
-
weight: z.string().optional(),
|
|
22
|
+
total_price: z.string().nullable().optional(),
|
|
23
|
+
total_tax: z.string().nullable().optional(),
|
|
24
|
+
weight: z.string().nullable().optional(),
|
|
25
25
|
weight_unit: WeightUnitEnum$zodSchema.optional(),
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=ordercreaterequest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ordercreaterequest.js","sourceRoot":"","sources":["../../src/models/ordercreaterequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,8BAA8B,GAC/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAgB,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAEL,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAkB,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAqB/E,MAAM,CAAC,MAAM,4BAA4B,GAIrC,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"ordercreaterequest.js","sourceRoot":"","sources":["../../src/models/ordercreaterequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,8BAA8B,GAC/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAgB,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAEL,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAkB,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAqB/E,MAAM,CAAC,MAAM,4BAA4B,GAIrC,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC1C,YAA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Shippo external API.: Use this API to integrate with the Shippo service",
|
|
7
7
|
"author": {
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"name": "batches-create",
|
|
45
|
-
"description": "Create a batch\n\nCreates a new batch object for purchasing shipping labels for many shipments at once. Batches are created asynchronously. This means that the API response won't include your batch shipments yet. You need to retrieve the batch later to verify that all batch shipments are valid."
|
|
45
|
+
"description": "Create a batch\n\nCreates a new batch object for purchasing shipping labels for many shipments at once. Batches are created asynchronously. This means that the API response won't include your batch shipments yet. You need to retrieve the batch later to verify that all batch shipments are valid.\n\n**IMPORTANT: There is NO batches-list endpoint in the Shippo API.**\nYou must store the batch \\`object_id\\` returned from this endpoint to retrieve batches later using \\`batches-get\\`.\n\n**Workflow:**\n1. Create batch → Save the returned \\`object_id\\`\n2. Retrieve batch status using \\`batches-get\\` with the saved ID\n3. Add/remove shipments as needed\n4. Purchase the batch when ready\n"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"name": "batches-get",
|
|
49
|
-
"description": "Retrieve a batch\n\nReturns a batch using an object ID.
|
|
49
|
+
"description": "Retrieve a batch\n\nReturns 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\\`.\n\n**IMPORTANT: There is NO batches-list endpoint in the Shippo API.**\nYou must know the batch \\`object_id\\` (returned when you created the batch) to retrieve it.\nStore batch IDs when creating batches if you need to access them later.\n\n**URL HANDLING:** This response contains \\`label_url\\` (array of download URLs).\nWhen displaying URLs, ALWAYS show the complete URL without truncation.\nNever replace parts with \"...\" - S3 signed URLs will break if truncated.\n"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"name": "batches-add-shipments",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
"name": "manifests-list",
|
|
133
|
-
"description": "
|
|
133
|
+
"description": "Returns a list of all manifest objects.\n\n**⚠️ URL HANDLING - CRITICAL:**\nEach manifest contains a \\`documents\\` field with URLs to scan form PDFs.\nWhen displaying these URLs:\n- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with \"...\"\n- These are S3 signed URLs that break if modified\n- Display URLs in a code block AND as a clickable hyperlink\n"
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
"name": "manifests-create",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"name": "manifests-get",
|
|
141
|
-
"description": "
|
|
141
|
+
"description": "Returns an existing manifest using an object ID.\n\n**⚠️ URL HANDLING - CRITICAL:**\nThe manifest contains a \\`documents\\` field with URLs to scan form PDFs.\nWhen displaying these URLs:\n- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with \"...\"\n- These are S3 signed URLs that break if modified\n- Display URLs in a code block AND as a clickable hyperlink\n"
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
"name": "orders-list",
|
|
@@ -234,19 +234,19 @@
|
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
236
|
"name": "tracking-status-get",
|
|
237
|
-
"description": "Get tracking status for a shipment using carrier and tracking number.\n\n**IMPORTANT TEST MODE BEHAVIOR:**\nWhen using test tokens, you MUST use 'shippo' as the Carrier parameter, \nnot the actual carrier names like 'USPS', 'UPS', 'FedEx', etc.\n\n**Test Mode Usage:**\n\\`\\`\\`json\n{\n \"Carrier\": \"shippo\",\n \"TrackingNumber\": \"your_tracking_number\"\n}\n\\`\\`\\`\n\n**Production Mode Usage:**\n\\`\\`\\`json\n{\n \"Carrier\": \"USPS\", // or \"UPS\", \"FedEx\", etc.\n \"TrackingNumber\": \"your_tracking_number\"\n}\n\\`\\`\\`\n\nThe API will return an error if you use real carrier names with test tokens.\n"
|
|
237
|
+
"description": "Get tracking status for a shipment using carrier and tracking number.\n\n**IMPORTANT TEST MODE BEHAVIOR:**\nWhen using test tokens, you MUST use 'shippo' as the Carrier parameter, \nnot the actual carrier names like 'USPS', 'UPS', 'FedEx', etc.\n\n**Test Mode Usage:**\n\\`\\`\\`json\n{\n \"Carrier\": \"shippo\",\n \"TrackingNumber\": \"your_tracking_number\"\n}\n\\`\\`\\`\n\n**Production Mode Usage:**\n\\`\\`\\`json\n{\n \"Carrier\": \"USPS\", // or \"UPS\", \"FedEx\", etc.\n \"TrackingNumber\": \"your_tracking_number\"\n}\n\\`\\`\\`\n\nThe API will return an error if you use real carrier names with test tokens.\n\n**⚠️ URL HANDLING - CRITICAL:**\nThe response may include tracking URLs. When displaying any URLs:\n- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with \"...\"\n- Display URLs in a code block AND as a clickable hyperlink\n"
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
"name": "transactions-list",
|
|
241
|
-
"description": "**LIST TRANSACTIONS (Purchased Labels)** - Use this for finding shipped/delivered packages!\n\nThis tool lists transaction objects, which represent purchased shipping labels. Each transaction contains:\n- Tracking number and tracking URL\n- Label URL for printing\n- Tracking status (UNKNOWN, PRE_TRANSIT, TRANSIT, DELIVERED, RETURNED, FAILURE)\n- Purchase date and carrier info\n\n**IMPORTANT DISTINCTIONS:**\n- Transactions = Purchased shipping labels\n- Transactions HAVE tracking status and tracking numbers\n- Use \\`shipments-list\\` for rate quotes (unpurchased shipments)\n\n**When to use this tool:**\n- Find delivered packages → filter by \\`tracking_status: \"DELIVERED\"\\`\n- Find packages in transit → filter by \\`tracking_status: \"TRANSIT\"\\`\n- List all purchased labels\n- Find a specific label by rate ID\n\n**Available Filters:**\n- \\`tracking_status\\`: UNKNOWN, PRE_TRANSIT, TRANSIT, DELIVERED, RETURNED, FAILURE\n- \\`object_status\\`: WAITING, QUEUED, SUCCESS, ERROR, REFUNDED, REFUNDPENDING, REFUNDREJECTED\n- \\`rate\\`: Filter by rate ID\n- \\`page/results\\`: Pagination\n\n**Example Use Cases:**\n- \"Show delivered shipments\" → \\`{tracking_status: \"DELIVERED\"}\\`\n- \"Show packages in transit\" → \\`{tracking_status: \"TRANSIT\"}\\`\n- \"Show all labels\" → \\`{results: 25}\\`\n\n**Note on Test Mode:**\nTest transactions will always show \\`tracking_status: \"UNKNOWN\"\\` because they don't receive real carrier tracking updates.\n"
|
|
241
|
+
"description": "**LIST TRANSACTIONS (Purchased Labels)** - Use this for finding shipped/delivered packages!\n\nThis tool lists transaction objects, which represent purchased shipping labels. Each transaction contains:\n- Tracking number and tracking URL\n- Label URL for printing\n- Tracking status (UNKNOWN, PRE_TRANSIT, TRANSIT, DELIVERED, RETURNED, FAILURE)\n- Purchase date and carrier info\n\n**IMPORTANT DISTINCTIONS:**\n- Transactions = Purchased shipping labels\n- Transactions HAVE tracking status and tracking numbers\n- Use \\`shipments-list\\` for rate quotes (unpurchased shipments)\n\n**When to use this tool:**\n- Find delivered packages → filter by \\`tracking_status: \"DELIVERED\"\\`\n- Find packages in transit → filter by \\`tracking_status: \"TRANSIT\"\\`\n- List all purchased labels\n- Find a specific label by rate ID\n\n**Available Filters:**\n- \\`tracking_status\\`: UNKNOWN, PRE_TRANSIT, TRANSIT, DELIVERED, RETURNED, FAILURE\n- \\`object_status\\`: WAITING, QUEUED, SUCCESS, ERROR, REFUNDED, REFUNDPENDING, REFUNDREJECTED\n- \\`rate\\`: Filter by rate ID\n- \\`page/results\\`: Pagination\n\n**Example Use Cases:**\n- \"Show delivered shipments\" → \\`{tracking_status: \"DELIVERED\"}\\`\n- \"Show packages in transit\" → \\`{tracking_status: \"TRANSIT\"}\\`\n- \"Show all labels\" → \\`{results: 25}\\`\n\n**Note on Test Mode:**\nTest transactions will always show \\`tracking_status: \"UNKNOWN\"\\` because they don't receive real carrier tracking updates.\n\n**⚠️ URL HANDLING - CRITICAL:**\nEach transaction may include URLs (label_url, qr_code_url, tracking_url_provider).\nWhen displaying these URLs:\n- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with \"...\"\n- These are S3 signed URLs that break if modified\n- Display URLs in a code block AND as a clickable hyperlink\n"
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
244
|
"name": "transactions-create",
|
|
245
|
-
"description": "Creates a shipping label by purchasing an existing rate.\n\n**IMPORTANT:** The request parameter must be a JSON object, not a string.\n\n**Usage:**\nThis tool creates shipping labels by purchasing existing rates from shipments.\nFirst create a shipment to get rates, then use this tool with the rate ID.\n\n**Required Format:**\n\\`\\`\\`json\n{\n \"rate\": \"rate_id_here\"\n}\n\\`\\`\\`\n\n**Working Example:**\n\\`\\`\\`json\n{\n \"rate\": \"b3b719ce08754a249a1fc20db7a61f4b\",\n \"async\": false\n}\n\\`\\`\\`\n\n**INTERNATIONAL SHIPMENTS - CRITICAL NOTES:**\n- **ALWAYS use \\`async: true\\` for international shipments** to avoid timeouts\n- **Server load can cause 500/504 errors** - retry with async processing\n- **Customs declaration must be attached to shipment** before label creation\n\n**International Example:**\n\\`\\`\\`json\n{\n \"rate\": \"international_rate_id\",\n \"async\": true\n}\n\\`\\`\\`\n\n**Error Handling:**\n- If you get 504 Gateway timeout → Use \\`async: true\\`\n- If you get 500 Internal Server Error → Retry with \\`async: true\\`\n- If customs error → Ensure shipment has valid customs_declaration\n\n**Optional Parameters:**\n- \\`async\\`: **Set to true for international** (default: false)\n- \\`label_file_type\\`: PDF_4x6, PNG, etc.\n- \\`metadata\\`: Custom metadata string\n- \\`order\\`: Order ID reference\n\n**Workflow:**\n1. Create shipment → Get rates\n2. **For international: Attach customs declaration**\n3. Choose rate → Use this tool with rate ID\n4. **For international: Use async=true**\n5. **If async: Poll transaction status until complete**\n\n**Async Processing Pattern:**\n\\`\\`\\`javascript\n// 1. Create async transaction\n{\"rate\": \"rate_id\", \"async\": true}\n\n// 2. Get transaction ID from response\n// Response: {\"object_id\": \"txn_123\", \"status\": \"QUEUED\"}\n\n// 3. Poll using transactions-get until done\n// Use: mcp_shippo-node_transactions-get with TransactionId\n// Keep checking until status changes from \"QUEUED\" to \"SUCCESS\"\n\n// 4. Once SUCCESS: label_url, tracking_number will be populated\n\\`\\`\\`\n\n**Status Flow:**\n- \\`QUEUED\\` → Processing (keep polling)\n- \\`SUCCESS\\` → ✅ Label ready! Check label_url and tracking_number\n- \\`ERROR\\` → ❌ Check messages for details\n"
|
|
245
|
+
"description": "Creates a shipping label by purchasing an existing rate.\n\n**IMPORTANT:** The request parameter must be a JSON object, not a string.\n\n**Usage:**\nThis tool creates shipping labels by purchasing existing rates from shipments.\nFirst create a shipment to get rates, then use this tool with the rate ID.\n\n**Required Format:**\n\\`\\`\\`json\n{\n \"rate\": \"rate_id_here\"\n}\n\\`\\`\\`\n\n**Working Example:**\n\\`\\`\\`json\n{\n \"rate\": \"b3b719ce08754a249a1fc20db7a61f4b\",\n \"async\": false\n}\n\\`\\`\\`\n\n**INTERNATIONAL SHIPMENTS - CRITICAL NOTES:**\n- **ALWAYS use \\`async: true\\` for international shipments** to avoid timeouts\n- **Server load can cause 500/504 errors** - retry with async processing\n- **Customs declaration must be attached to shipment** before label creation\n\n**International Example:**\n\\`\\`\\`json\n{\n \"rate\": \"international_rate_id\",\n \"async\": true\n}\n\\`\\`\\`\n\n**Error Handling:**\n- If you get 504 Gateway timeout → Use \\`async: true\\`\n- If you get 500 Internal Server Error → Retry with \\`async: true\\`\n- If customs error → Ensure shipment has valid customs_declaration\n\n**Optional Parameters:**\n- \\`async\\`: **Set to true for international** (default: false)\n- \\`label_file_type\\`: PDF_4x6, PNG, etc.\n- \\`metadata\\`: Custom metadata string\n- \\`order\\`: Order ID reference\n\n**Workflow:**\n1. Create shipment → Get rates\n2. **For international: Attach customs declaration**\n3. Choose rate → Use this tool with rate ID\n4. **For international: Use async=true**\n5. **If async: Poll transaction status until complete**\n\n**Async Processing Pattern:**\n\\`\\`\\`javascript\n// 1. Create async transaction\n{\"rate\": \"rate_id\", \"async\": true}\n\n// 2. Get transaction ID from response\n// Response: {\"object_id\": \"txn_123\", \"status\": \"QUEUED\"}\n\n// 3. Poll using transactions-get until done\n// Use: mcp_shippo-node_transactions-get with TransactionId\n// Keep checking until status changes from \"QUEUED\" to \"SUCCESS\"\n\n// 4. Once SUCCESS: label_url, tracking_number will be populated\n\\`\\`\\`\n\n**Status Flow:**\n- \\`QUEUED\\` → Processing (keep polling)\n- \\`SUCCESS\\` → ✅ Label ready! Check label_url and tracking_number\n- \\`ERROR\\` → ❌ Check messages for details\n\n**⚠️ URL HANDLING - CRITICAL:**\nWhen transaction succeeds, the response includes:\n- \\`label_url\\`: S3 signed URL for shipping label download\n- \\`qr_code_url\\`: QR code image URL (if requested)\n- \\`tracking_url_provider\\`: Carrier's tracking page URL\n\n**When displaying these URLs:**\n- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with \"...\"\n- S3 signed URLs contain required query parameters (Signature, Expires, AWSAccessKeyId)\n- Truncating these URLs will make them non-functional\n- Display URLs in a code block AND as a clickable hyperlink\n"
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
"name": "transactions-get",
|
|
249
|
-
"description": "Retrieve a shipping label transaction by its ID.\n\n**PRIMARY USE: Polling async transaction status**\n\n**Async Transaction Polling Pattern:**\n\\`\\`\\`javascript\n// After creating async transaction, poll until complete:\n\n// 1. Create async transaction → Get transaction_id\n// 2. Poll this endpoint until status != \"QUEUED\"\n\n// Poll example:\n{TransactionId: \"5bd872675aee4e7fb19f961d319fac44\"}\n\\`\\`\\`\n\n**Transaction Status Values:**\n- \\`QUEUED\\` → Still processing (keep polling)\n- \\`SUCCESS\\` → ✅ Label ready! Check response for:\n - \\`label_url\\`: Download link for shipping label\n - \\`tracking_number\\`: Package tracking number \n - \\`tracking_url_provider\\`: Carrier tracking URL\n- \\`ERROR\\` → ❌ Failed (check \\`messages\\` field for details)\n\n**Polling Best Practice:**\n- Poll every 2-3 seconds until status changes\n- International shipments typically take 10-30 seconds\n- Domestic shipments typically take 2-5 seconds\n\n**Required Parameter:**\n- \\`TransactionId\\`: The transaction object ID from transaction creation\n"
|
|
249
|
+
"description": "Retrieve a shipping label transaction by its ID.\n\n**PRIMARY USE: Polling async transaction status**\n\n**Async Transaction Polling Pattern:**\n\\`\\`\\`javascript\n// After creating async transaction, poll until complete:\n\n// 1. Create async transaction → Get transaction_id\n// 2. Poll this endpoint until status != \"QUEUED\"\n\n// Poll example:\n{TransactionId: \"5bd872675aee4e7fb19f961d319fac44\"}\n\\`\\`\\`\n\n**Transaction Status Values:**\n- \\`QUEUED\\` → Still processing (keep polling)\n- \\`SUCCESS\\` → ✅ Label ready! Check response for:\n - \\`label_url\\`: Download link for shipping label\n - \\`tracking_number\\`: Package tracking number \n - \\`tracking_url_provider\\`: Carrier tracking URL\n- \\`ERROR\\` → ❌ Failed (check \\`messages\\` field for details)\n\n**Polling Best Practice:**\n- Poll every 2-3 seconds until status changes\n- International shipments typically take 10-30 seconds\n- Domestic shipments typically take 2-5 seconds\n\n**Required Parameter:**\n- \\`TransactionId\\`: The transaction object ID from transaction creation\n\n**⚠️ URL HANDLING - CRITICAL:**\nWhen displaying URLs from this response (label_url, qr_code_url, tracking_url_provider):\n- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with \"...\"\n- These are S3 signed URLs with required query parameters (Signature, Expires, AWSAccessKeyId)\n- Truncating these URLs will make them non-functional\n- Display URLs in a code block AND as a clickable hyperlink\n"
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
"name": "user-parcel-templates-list",
|
package/package.json
CHANGED
|
@@ -35,6 +35,15 @@ import { Result } from "../types/fp.js";
|
|
|
35
35
|
*
|
|
36
36
|
* @remarks
|
|
37
37
|
* Creates a new batch object for purchasing shipping labels for many shipments at once. Batches are created asynchronously. This means that the API response won't include your batch shipments yet. You need to retrieve the batch later to verify that all batch shipments are valid.
|
|
38
|
+
*
|
|
39
|
+
* **IMPORTANT: There is NO batches-list endpoint in the Shippo API.**
|
|
40
|
+
* You must store the batch `object_id` returned from this endpoint to retrieve batches later using `batches-get`.
|
|
41
|
+
*
|
|
42
|
+
* **Workflow:**
|
|
43
|
+
* 1. Create batch → Save the returned `object_id`
|
|
44
|
+
* 2. Retrieve batch status using `batches-get` with the saved ID
|
|
45
|
+
* 3. Add/remove shipments as needed
|
|
46
|
+
* 4. Purchase the batch when ready
|
|
38
47
|
*/
|
|
39
48
|
export function batchesCreate(
|
|
40
49
|
client$: ShippoSDKCore,
|
package/src/funcs/batchesGet.ts
CHANGED
|
@@ -32,10 +32,15 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
* Retrieve a batch
|
|
33
33
|
*
|
|
34
34
|
* @remarks
|
|
35
|
-
* Returns a batch using an object ID.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* 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`.
|
|
36
|
+
*
|
|
37
|
+
* **IMPORTANT: There is NO batches-list endpoint in the Shippo API.**
|
|
38
|
+
* You must know the batch `object_id` (returned when you created the batch) to retrieve it.
|
|
39
|
+
* Store batch IDs when creating batches if you need to access them later.
|
|
40
|
+
*
|
|
41
|
+
* **URL HANDLING:** This response contains `label_url` (array of download URLs).
|
|
42
|
+
* When displaying URLs, ALWAYS show the complete URL without truncation.
|
|
43
|
+
* Never replace parts with "..." - S3 signed URLs will break if truncated.
|
|
39
44
|
*/
|
|
40
45
|
export function batchesGet(
|
|
41
46
|
client$: ShippoSDKCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -67,8 +67,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
67
67
|
export const SDK_METADATA = {
|
|
68
68
|
language: "typescript",
|
|
69
69
|
openapiDocVersion: "2018-02-08",
|
|
70
|
-
sdkVersion: "0.8.
|
|
70
|
+
sdkVersion: "0.8.48",
|
|
71
71
|
genVersion: "2.770.0",
|
|
72
72
|
userAgent:
|
|
73
|
-
"speakeasy-sdk/mcp-typescript 0.8.
|
|
73
|
+
"speakeasy-sdk/mcp-typescript 0.8.48 2.770.0 2018-02-08 @shippo/shippo-mcp",
|
|
74
74
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -14,7 +14,17 @@ export const tool$batchesCreate: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "batches-create",
|
|
15
15
|
description: `Create a batch
|
|
16
16
|
|
|
17
|
-
Creates a new batch object for purchasing shipping labels for many shipments at once. Batches are created asynchronously. This means that the API response won't include your batch shipments yet. You need to retrieve the batch later to verify that all batch shipments are valid
|
|
17
|
+
Creates a new batch object for purchasing shipping labels for many shipments at once. Batches are created asynchronously. This means that the API response won't include your batch shipments yet. You need to retrieve the batch later to verify that all batch shipments are valid.
|
|
18
|
+
|
|
19
|
+
**IMPORTANT: There is NO batches-list endpoint in the Shippo API.**
|
|
20
|
+
You must store the batch \`object_id\` returned from this endpoint to retrieve batches later using \`batches-get\`.
|
|
21
|
+
|
|
22
|
+
**Workflow:**
|
|
23
|
+
1. Create batch → Save the returned \`object_id\`
|
|
24
|
+
2. Retrieve batch status using \`batches-get\` with the saved ID
|
|
25
|
+
3. Add/remove shipments as needed
|
|
26
|
+
4. Purchase the batch when ready
|
|
27
|
+
`,
|
|
18
28
|
annotations: {
|
|
19
29
|
"title": "",
|
|
20
30
|
"destructiveHint": false,
|
|
@@ -14,10 +14,16 @@ 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
|
+
|
|
23
|
+
**URL HANDLING:** This response contains \`label_url\` (array of download URLs).
|
|
24
|
+
When displaying URLs, ALWAYS show the complete URL without truncation.
|
|
25
|
+
Never replace parts with "..." - S3 signed URLs will break if truncated.
|
|
26
|
+
`,
|
|
21
27
|
annotations: {
|
|
22
28
|
"title": "",
|
|
23
29
|
"destructiveHint": false,
|
|
@@ -12,15 +12,22 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$manifestsGet: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "manifests-get",
|
|
15
|
-
description: `
|
|
15
|
+
description: `Returns an existing manifest using an object ID.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
**⚠️ URL HANDLING - CRITICAL:**
|
|
18
|
+
The manifest contains a \`documents\` field with URLs to scan form PDFs.
|
|
19
|
+
When displaying these URLs:
|
|
20
|
+
- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with "..."
|
|
21
|
+
- These are S3 signed URLs that break if modified
|
|
22
|
+
- Display URLs in a code block AND as a clickable hyperlink
|
|
23
|
+
`,
|
|
24
|
+
scopes: ["read"],
|
|
18
25
|
annotations: {
|
|
19
26
|
"title": "",
|
|
20
27
|
"destructiveHint": false,
|
|
21
28
|
"idempotentHint": false,
|
|
22
29
|
"openWorldHint": false,
|
|
23
|
-
"readOnlyHint":
|
|
30
|
+
"readOnlyHint": false,
|
|
24
31
|
},
|
|
25
32
|
args,
|
|
26
33
|
tool: async (client, args, ctx) => {
|
|
@@ -12,15 +12,22 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$manifestsList: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "manifests-list",
|
|
15
|
-
description: `
|
|
15
|
+
description: `Returns a list of all manifest objects.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
**⚠️ URL HANDLING - CRITICAL:**
|
|
18
|
+
Each manifest contains a \`documents\` field with URLs to scan form PDFs.
|
|
19
|
+
When displaying these URLs:
|
|
20
|
+
- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with "..."
|
|
21
|
+
- These are S3 signed URLs that break if modified
|
|
22
|
+
- Display URLs in a code block AND as a clickable hyperlink
|
|
23
|
+
`,
|
|
24
|
+
scopes: ["read"],
|
|
18
25
|
annotations: {
|
|
19
26
|
"title": "",
|
|
20
27
|
"destructiveHint": false,
|
|
21
28
|
"idempotentHint": false,
|
|
22
29
|
"openWorldHint": false,
|
|
23
|
-
"readOnlyHint":
|
|
30
|
+
"readOnlyHint": false,
|
|
24
31
|
},
|
|
25
32
|
args,
|
|
26
33
|
tool: async (client, args, ctx) => {
|
|
@@ -36,6 +36,11 @@ not the actual carrier names like 'USPS', 'UPS', 'FedEx', etc.
|
|
|
36
36
|
\`\`\`
|
|
37
37
|
|
|
38
38
|
The API will return an error if you use real carrier names with test tokens.
|
|
39
|
+
|
|
40
|
+
**⚠️ URL HANDLING - CRITICAL:**
|
|
41
|
+
The response may include tracking URLs. When displaying any URLs:
|
|
42
|
+
- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with "..."
|
|
43
|
+
- Display URLs in a code block AND as a clickable hyperlink
|
|
39
44
|
`,
|
|
40
45
|
scopes: ["read", "tracking"],
|
|
41
46
|
annotations: {
|
|
@@ -85,6 +85,18 @@ First create a shipment to get rates, then use this tool with the rate ID.
|
|
|
85
85
|
- \`QUEUED\` → Processing (keep polling)
|
|
86
86
|
- \`SUCCESS\` → ✅ Label ready! Check label_url and tracking_number
|
|
87
87
|
- \`ERROR\` → ❌ Check messages for details
|
|
88
|
+
|
|
89
|
+
**⚠️ URL HANDLING - CRITICAL:**
|
|
90
|
+
When transaction succeeds, the response includes:
|
|
91
|
+
- \`label_url\`: S3 signed URL for shipping label download
|
|
92
|
+
- \`qr_code_url\`: QR code image URL (if requested)
|
|
93
|
+
- \`tracking_url_provider\`: Carrier's tracking page URL
|
|
94
|
+
|
|
95
|
+
**When displaying these URLs:**
|
|
96
|
+
- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with "..."
|
|
97
|
+
- S3 signed URLs contain required query parameters (Signature, Expires, AWSAccessKeyId)
|
|
98
|
+
- Truncating these URLs will make them non-functional
|
|
99
|
+
- Display URLs in a code block AND as a clickable hyperlink
|
|
88
100
|
`,
|
|
89
101
|
scopes: ["write"],
|
|
90
102
|
annotations: {
|
|
@@ -42,6 +42,13 @@ export const tool$transactionsGet: ToolDefinition<typeof args> = {
|
|
|
42
42
|
|
|
43
43
|
**Required Parameter:**
|
|
44
44
|
- \`TransactionId\`: The transaction object ID from transaction creation
|
|
45
|
+
|
|
46
|
+
**⚠️ URL HANDLING - CRITICAL:**
|
|
47
|
+
When displaying URLs from this response (label_url, qr_code_url, tracking_url_provider):
|
|
48
|
+
- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with "..."
|
|
49
|
+
- These are S3 signed URLs with required query parameters (Signature, Expires, AWSAccessKeyId)
|
|
50
|
+
- Truncating these URLs will make them non-functional
|
|
51
|
+
- Display URLs in a code block AND as a clickable hyperlink
|
|
45
52
|
`,
|
|
46
53
|
scopes: ["read"],
|
|
47
54
|
annotations: {
|
|
@@ -45,6 +45,13 @@ This tool lists transaction objects, which represent purchased shipping labels.
|
|
|
45
45
|
|
|
46
46
|
**Note on Test Mode:**
|
|
47
47
|
Test transactions will always show \`tracking_status: "UNKNOWN"\` because they don't receive real carrier tracking updates.
|
|
48
|
+
|
|
49
|
+
**⚠️ URL HANDLING - CRITICAL:**
|
|
50
|
+
Each transaction may include URLs (label_url, qr_code_url, tracking_url_provider).
|
|
51
|
+
When displaying these URLs:
|
|
52
|
+
- ALWAYS show the COMPLETE URL - NEVER truncate or replace parts with "..."
|
|
53
|
+
- These are S3 signed URLs that break if modified
|
|
54
|
+
- Display URLs in a code block AND as a clickable hyperlink
|
|
48
55
|
`,
|
|
49
56
|
scopes: ["read"],
|
|
50
57
|
annotations: {
|
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
|
});
|