shipbob-node-sdk 0.0.16 → 0.0.18

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.
Files changed (109) hide show
  1. package/README.md +78 -175
  2. package/dist/WebScraper.js +7 -5
  3. package/dist/WebScraper.js.map +1 -1
  4. package/dist/client/2025-07/client/client.gen.d.ts +2 -0
  5. package/dist/client/2025-07/client/client.gen.js +240 -0
  6. package/dist/client/2025-07/client/client.gen.js.map +1 -0
  7. package/dist/client/2025-07/client/index.d.ts +8 -0
  8. package/dist/client/2025-07/client/index.js +18 -0
  9. package/dist/client/2025-07/client/index.js.map +1 -0
  10. package/dist/client/2025-07/client/types.gen.d.ts +117 -0
  11. package/dist/client/2025-07/client/types.gen.js +4 -0
  12. package/dist/client/2025-07/client/types.gen.js.map +1 -0
  13. package/dist/client/2025-07/client/utils.gen.d.ts +33 -0
  14. package/dist/client/2025-07/client/utils.gen.js +242 -0
  15. package/dist/client/2025-07/client/utils.gen.js.map +1 -0
  16. package/dist/client/2025-07/client.gen.d.ts +12 -0
  17. package/dist/client/2025-07/client.gen.js +7 -0
  18. package/dist/client/2025-07/client.gen.js.map +1 -0
  19. package/dist/client/2025-07/core/auth.gen.d.ts +18 -0
  20. package/dist/client/2025-07/core/auth.gen.js +19 -0
  21. package/dist/client/2025-07/core/auth.gen.js.map +1 -0
  22. package/dist/client/2025-07/core/bodySerializer.gen.d.ts +25 -0
  23. package/dist/client/2025-07/core/bodySerializer.gen.js +61 -0
  24. package/dist/client/2025-07/core/bodySerializer.gen.js.map +1 -0
  25. package/dist/client/2025-07/core/params.gen.d.ts +43 -0
  26. package/dist/client/2025-07/core/params.gen.js +105 -0
  27. package/dist/client/2025-07/core/params.gen.js.map +1 -0
  28. package/dist/client/2025-07/core/pathSerializer.gen.d.ts +33 -0
  29. package/dist/client/2025-07/core/pathSerializer.gen.js +116 -0
  30. package/dist/client/2025-07/core/pathSerializer.gen.js.map +1 -0
  31. package/dist/client/2025-07/core/queryKeySerializer.gen.d.ts +18 -0
  32. package/dist/client/2025-07/core/queryKeySerializer.gen.js +99 -0
  33. package/dist/client/2025-07/core/queryKeySerializer.gen.js.map +1 -0
  34. package/dist/client/2025-07/core/serverSentEvents.gen.d.ts +71 -0
  35. package/dist/client/2025-07/core/serverSentEvents.gen.js +138 -0
  36. package/dist/client/2025-07/core/serverSentEvents.gen.js.map +1 -0
  37. package/dist/client/2025-07/core/types.gen.d.ts +78 -0
  38. package/dist/client/2025-07/core/types.gen.js +4 -0
  39. package/dist/client/2025-07/core/types.gen.js.map +1 -0
  40. package/dist/client/2025-07/core/utils.gen.d.ts +19 -0
  41. package/dist/client/2025-07/core/utils.gen.js +94 -0
  42. package/dist/client/2025-07/core/utils.gen.js.map +1 -0
  43. package/dist/client/2025-07/index.d.ts +2 -0
  44. package/dist/client/2025-07/index.js +73 -0
  45. package/dist/client/2025-07/index.js.map +1 -0
  46. package/dist/client/2025-07/sdk.gen.d.ts +380 -0
  47. package/dist/client/2025-07/sdk.gen.js +778 -0
  48. package/dist/client/2025-07/sdk.gen.js.map +1 -0
  49. package/dist/client/2025-07/types.gen.d.ts +7191 -0
  50. package/dist/client/2025-07/types.gen.js +4 -0
  51. package/dist/client/2025-07/types.gen.js.map +1 -0
  52. package/dist/client/2026-01/client/client.gen.d.ts +2 -0
  53. package/dist/client/2026-01/client/client.gen.js +240 -0
  54. package/dist/client/2026-01/client/client.gen.js.map +1 -0
  55. package/dist/client/2026-01/client/index.d.ts +8 -0
  56. package/dist/client/2026-01/client/index.js +18 -0
  57. package/dist/client/2026-01/client/index.js.map +1 -0
  58. package/dist/client/2026-01/client/types.gen.d.ts +117 -0
  59. package/dist/client/2026-01/client/types.gen.js +4 -0
  60. package/dist/client/2026-01/client/types.gen.js.map +1 -0
  61. package/dist/client/2026-01/client/utils.gen.d.ts +33 -0
  62. package/dist/client/2026-01/client/utils.gen.js +242 -0
  63. package/dist/client/2026-01/client/utils.gen.js.map +1 -0
  64. package/dist/client/2026-01/client.gen.d.ts +12 -0
  65. package/dist/client/2026-01/client.gen.js +7 -0
  66. package/dist/client/2026-01/client.gen.js.map +1 -0
  67. package/dist/client/2026-01/core/auth.gen.d.ts +18 -0
  68. package/dist/client/2026-01/core/auth.gen.js +19 -0
  69. package/dist/client/2026-01/core/auth.gen.js.map +1 -0
  70. package/dist/client/2026-01/core/bodySerializer.gen.d.ts +25 -0
  71. package/dist/client/2026-01/core/bodySerializer.gen.js +61 -0
  72. package/dist/client/2026-01/core/bodySerializer.gen.js.map +1 -0
  73. package/dist/client/2026-01/core/params.gen.d.ts +43 -0
  74. package/dist/client/2026-01/core/params.gen.js +105 -0
  75. package/dist/client/2026-01/core/params.gen.js.map +1 -0
  76. package/dist/client/2026-01/core/pathSerializer.gen.d.ts +33 -0
  77. package/dist/client/2026-01/core/pathSerializer.gen.js +116 -0
  78. package/dist/client/2026-01/core/pathSerializer.gen.js.map +1 -0
  79. package/dist/client/2026-01/core/queryKeySerializer.gen.d.ts +18 -0
  80. package/dist/client/2026-01/core/queryKeySerializer.gen.js +99 -0
  81. package/dist/client/2026-01/core/queryKeySerializer.gen.js.map +1 -0
  82. package/dist/client/2026-01/core/serverSentEvents.gen.d.ts +71 -0
  83. package/dist/client/2026-01/core/serverSentEvents.gen.js +138 -0
  84. package/dist/client/2026-01/core/serverSentEvents.gen.js.map +1 -0
  85. package/dist/client/2026-01/core/types.gen.d.ts +78 -0
  86. package/dist/client/2026-01/core/types.gen.js +4 -0
  87. package/dist/client/2026-01/core/types.gen.js.map +1 -0
  88. package/dist/client/2026-01/core/utils.gen.d.ts +19 -0
  89. package/dist/client/2026-01/core/utils.gen.js +94 -0
  90. package/dist/client/2026-01/core/utils.gen.js.map +1 -0
  91. package/dist/client/2026-01/index.d.ts +2 -0
  92. package/dist/client/2026-01/index.js +73 -0
  93. package/dist/client/2026-01/index.js.map +1 -0
  94. package/dist/client/2026-01/sdk.gen.d.ts +450 -0
  95. package/dist/client/2026-01/sdk.gen.js +848 -0
  96. package/dist/client/2026-01/sdk.gen.js.map +1 -0
  97. package/dist/client/2026-01/types.gen.d.ts +7282 -0
  98. package/dist/client/2026-01/types.gen.js +4 -0
  99. package/dist/client/2026-01/types.gen.js.map +1 -0
  100. package/dist/index.d.ts +20 -178
  101. package/dist/index.js +116 -386
  102. package/dist/index.js.map +1 -1
  103. package/dist/types.d.ts +61 -1435
  104. package/dist/types.js +1 -38
  105. package/dist/types.js.map +1 -1
  106. package/openapi-1.0.json +8422 -0
  107. package/openapi-2025-07.json +1 -0
  108. package/openapi-2026-01.json +1 -0
  109. package/package.json +6 -9
package/dist/types.d.ts CHANGED
@@ -1,972 +1,9 @@
1
- import type { Nullable } from '.';
2
- export type Channel = {
3
- id: number;
4
- name: string;
5
- application_name: string;
6
- scopes: string[];
7
- };
8
- export type Address = {
9
- /**
10
- * First line of the address
11
- */
12
- address1: string;
13
- /**
14
- * Second line of the address
15
- */
16
- address2?: Nullable<string>;
17
- /**
18
- * Name of the company receiving the shipment
19
- */
20
- company_name?: Nullable<string>;
21
- /**
22
- * The city
23
- */
24
- city: Required<string>;
25
- /**
26
- * The state or province
27
- * Not required, but not all countries have state/province
28
- */
29
- state: Nullable<string>;
30
- /**
31
- * The country (Must be ISO Alpha-2 for estimates)
32
- */
33
- country: string;
34
- /**
35
- * The zip code or postal code
36
- */
37
- zip_code: string;
38
- };
39
- /**
40
- * Returns also everything else including onhand, etc. Stuff that makes no sense at this point.
41
- */
42
- export type AddProductResponse = {
43
- id: number;
44
- reference_id: string;
45
- };
46
- export type GetProducts1_0QueryString = Partial<{
47
- ReferenceIds: string;
48
- Page: number;
49
- Limit: number;
50
- IDs: string;
51
- Search: string;
52
- ActiveStatus: 'Any' | 'Active' | 'Inactive';
53
- BundleStatus: 'Any' | 'Bundle' | 'NotBundle';
54
- }>;
55
- /**
56
- * This is missing practically all fields of actual result.
57
- */
58
- export type GetProduct1_0Result = {
59
- id: number;
60
- reference_id: string;
61
- };
62
- export type ActionName = 'Dispose' | 'Restock' | 'Quarantine';
63
- export type ProductType = 'Regular' | 'Bundle';
64
- export type GetProduct2_0Variant = {
65
- /**
66
- * The expected barcode to be found on the item and checked during the pick process
67
- */
68
- barcode: string;
69
- barcode_sticker_url: Nullable<string>;
70
- channel_metadata: unknown[];
71
- reviews_pending: unknown[];
72
- associated_bundles: unknown[];
73
- bundle_definition: unknown[];
74
- created_on: string;
75
- customs: {
76
- /**
77
- * The customs code (6 digit)
78
- */
79
- hs_tariff_code: string;
80
- /**
81
- * 2 character country code
82
- */
83
- country_code_of_origin: string;
84
- /**
85
- * Value of object for customs (in USD)
86
- */
87
- value: Nullable<string>;
88
- currency: 'USD';
89
- /**
90
- * Description of product for customs purposes
91
- */
92
- description: string;
93
- is321_eligible: boolean;
94
- };
95
- dimension: {
96
- length: number;
97
- width: number;
98
- height: number;
99
- /**
100
- * "inch"
101
- */
102
- unit: string;
103
- is_locked: boolean;
104
- /**
105
- * ie: "UserEntry"
106
- */
107
- source: string;
108
- };
109
- fulfillment_settings: {
110
- /**
111
- * If the product requires a prop65 label in the box
112
- */
113
- requires_prop65: false;
114
- serial_scan: {
115
- /**
116
- * Indicates if a Serial Scan is required during the pack process.
117
- * Note: Serial scan requires either a prefix or a suffix to be defined
118
- */
119
- is_enabled: false;
120
- /**
121
- * The prefix expected on the serial number
122
- */
123
- prefix: string;
124
- /**
125
- * The suffix expected on the serial number
126
- */
127
- suffix: string;
128
- /**
129
- * The exact number of characters expected in the serial number
130
- */
131
- exact_character_length: Nullable<number>;
132
- };
133
- /**
134
- * If the product needs to classified as a hazmat product with the shipping carrier
135
- */
136
- dangerous_goods: false;
137
- /**
138
- * URL of the Safety Data Sheet for this product.
139
- * Note: should be populated by ShipBob system via the UI, should not reference a URL outside of the ShipBob domain
140
- */
141
- msds_url: string;
142
- /**
143
- * If the product should be picked as an entire case
144
- */
145
- is_case_pick: boolean;
146
- /**
147
- * Is Bound Printed Matter, must be set by the ShipBob internal team
148
- */
149
- is_bpm_parcel: boolean;
150
- };
151
- /**
152
- * Global Trade Item Number
153
- */
154
- gtin: string;
155
- /**
156
- * Variant Id (used to alter product lot, packaging, etc.)
157
- */
158
- id: number;
159
- inventory: {
160
- inventory_id: number;
161
- on_hand_qty: number;
162
- };
163
- is_digital: boolean;
164
- lot_information: {
165
- /**
166
- * If the product should use lot date based picking
167
- */
168
- is_lot: boolean;
169
- minimum_shelf_life_days: Nullable<number>;
170
- };
171
- /**
172
- * Name of the Variant (should match the Product name if a non-varying product)
173
- */
174
- name: string;
175
- /**
176
- * PDf has wrong field: The specific material to package the product in (box, poly mailer, bubble mailer, etc_
177
- */
178
- packaging_material_type: {
179
- id: number;
180
- /**
181
- * Not sure what else can be here
182
- */
183
- name: 'Box';
184
- };
185
- /**
186
- * PDF has wrong field. int The id of the packaging_requirement (No requirement, fragile, ship in own container, etc)
187
- */
188
- packaging_requirement: {
189
- id: number;
190
- name: 'NoRequirements' | 'Fragile';
191
- };
192
- return_preferences: {
193
- /**
194
- * Restock (1) Quarantine (2) Dispose (3)
195
- */
196
- primary_action: Nullable<{
197
- id: number;
198
- name: ActionName;
199
- }>;
200
- /**
201
- * Restock (1) Quarantine (2) Dispose (3)
202
- */
203
- backup_action: Nullable<{
204
- id: number;
205
- name: ActionName;
206
- }>;
207
- /**
208
- * Instructions for inspecting returns
209
- */
210
- instructions: Nullable<string>;
211
- return_to_sender_primary_action: Nullable<{
212
- id: number;
213
- name: ActionName;
214
- }>;
215
- return_to_sender_backup_action: Nullable<{
216
- id: number;
217
- name: ActionName;
218
- }>;
219
- };
220
- /**
221
- * The SKU of the product. This is a required field and must be unique.
222
- */
223
- sku: string;
224
- /**
225
- * PDF is incorrect - it describes in int. Active (1) or Inactive (2)
226
- */
227
- status: 'Active' | 'Inactive';
228
- /**
229
- * Universal Product Code
230
- */
231
- upc: string;
232
- is_image_uploaded: false;
233
- updated_on: string;
234
- weight: {
235
- weight: number;
236
- /**
237
- * ie: "oz"
238
- */
239
- unit: string;
240
- };
241
- additional_hazmat_attributes: Nullable<unknown>;
242
- merge_children: [];
243
- };
244
- /**
245
- * This is just some guessing based on found responses
246
- */
247
- export type GetProduct2_0Response = {
248
- /**
249
- * Product Id
250
- */
251
- id: number;
252
- /**
253
- * Product Name
254
- */
255
- name: string;
256
- type: ProductType;
257
- category: Nullable<unknown>;
258
- sub_category: Nullable<unknown>;
259
- user_id: number;
260
- created_on: string;
261
- updated_on: string;
262
- /**
263
- * null | ?
264
- */
265
- taxonomy: null;
266
- variants: GetProduct2_0Variant[];
267
- };
268
- export type GetProductExperimentalVariant = Omit<GetProduct2_0Variant, 'barcode'> & {
269
- barcodes: {
270
- value: string;
271
- sticker_url: Nullable<string>;
272
- }[];
273
- };
274
- /**
275
- * Just the barcode -> barcodes on the variant seems like the only difference so far.
276
- */
277
- export type GetProductExperimentalResponse = Omit<GetProduct2_0Response, 'variants'> & {
278
- variants: GetProductExperimentalVariant[];
279
- };
280
- export type OrderType = 'DTC' | 'DropShip' | 'B2B' | 'Transportation';
281
- export type AnyProduct = ({
282
- /**
283
- * Unique reference id of the product
284
- */
285
- reference_id: string;
286
- /**
287
- * Name of the product. Required if there is not an existing ShipBob product with a matching reference_id value.
288
- */
289
- name?: Nullable<string>;
290
- /**
291
- * Global Trade Item Number - unique and internationally recognized identifier assigned to item by company GS1 (0-50 chars)
292
- */
293
- gtin?: Nullable<string>;
294
- /**
295
- * Universal Product Code - Unique external identifier
296
- */
297
- upc?: Nullable<string>;
298
- /**
299
- * Price for one item
300
- */
301
- unit_price?: Nullable<number>;
302
- /**
303
- * Product SKU
304
- */
305
- sku?: Nullable<string>;
306
- } & {
307
- /**
308
- * Unique Id of the product. Not sure who would track **their** product ids..
309
- */
310
- id: number;
311
- }) | {
312
- /**
313
- * Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc.
314
- */
315
- external_line_id?: number;
316
- /**
317
- * The quantity of this product ordered
318
- * (< 2147483647 LOL)
319
- */
320
- quantity: number;
321
- /**
322
- * Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL
323
- */
324
- quantity_unit_of_measure_code?: Nullable<string>;
325
- required_lot?: {
326
- lot_number: Nullable<string>;
327
- /**
328
- * string or null <date-time>
329
- * Manually specified lot date
330
- */
331
- lot_date: Nullable<string>;
332
- };
333
- };
334
- export type CancelOrderResponse = {
335
- order_id: number;
336
- order: {
337
- id: number;
338
- reference_id: string;
339
- order_number: string;
340
- status: string;
341
- };
342
- /**
343
- * ie: "Success"
344
- */
345
- status: string;
346
- canceled_shipment_results: {
347
- /**
348
- * ie: "Cancel". The docs are wrong. This is actually a number like 6.
349
- */
350
- action: number;
351
- shipment_id: number;
352
- is_success: boolean;
353
- /**
354
- * ie: "Order cancelled"
355
- */
356
- reason: string;
357
- }[];
358
- };
359
- /**
360
- * ShipBob.Orders.StatusResolver.OrderStatus
361
- */
362
- export type OrderStatusType = 'Processing' | 'Exception' | 'PartiallyFulfilled' | 'Fulfilled' | 'Cancelled' | 'ImportReview';
363
- /**
364
- * Shipbob.CoreModels.OrderStateResolver.OrderStatusEnum
365
- */
366
- export type ShipmentStatusType = 'None' | 'Processing' | 'Completed' | 'Exception' | 'OnHold' | 'Cancelled' | 'CleanSweeped' | 'LabeledCreated' | 'ImportReview';
367
- export type OrderShipment = {
368
- /**
369
- * The datetime of Shipment delivered to customer.
370
- *
371
- * set is order_delivered webhook. ie: "2025-02-19T03:11:00+00:00"
372
- */
373
- delivery_date: Nullable<string>;
374
- /**
375
- * Unique id of the shipment
376
- */
377
- id: number;
378
- /**
379
- * order_shipped has no actual information on when the label was printed (unlike the UI)
380
- * so, then to use this as a best guess (not always available)
381
- */
382
- last_update_at: Nullable<string>;
383
- /**
384
- * Id of the order this shipment belongs to
385
- */
386
- order_id: number;
387
- /**
388
- * Client-defined external unique id of the order this shipment belongs to
389
- */
390
- reference_id: string;
391
- /**
392
- * Information about the recipient of a shipment
393
- */
394
- recipient: {
395
- name: string;
396
- address: Address;
397
- email: string;
398
- phone_number: string;
399
- };
400
- /**
401
- * OrderStateResolver.OrderStatusEnum
402
- */
403
- status: ShipmentStatusType;
404
- status_details: {
405
- /**
406
- * ie: "OutOfStock"
407
- */
408
- name: string;
409
- /**
410
- * ie: "No Stock On Hand For Sku"
411
- */
412
- description: string;
413
- id: number;
414
- inventory_id: number;
415
- exception_fulfillment_center_id: number;
416
- /**
417
- * Not sure what will be here - have only seen null
418
- */
419
- extra_information: null;
420
- }[];
421
- /**
422
- * Tracking information for a shipment (null on creation)
423
- */
424
- tracking: Nullable<{
425
- /**
426
- * Carrier of the shipment
427
- */
428
- carrier: Nullable<string>;
429
- /**
430
- * Tracking number of the shipment
431
- */
432
- tracking_number: Nullable<string>;
433
- /**
434
- * The carrier's service which was used for this shipment
435
- */
436
- carrier_service: Nullable<string>;
437
- /**
438
- * URL to the website where a shipment can be tracked
439
- */
440
- tracking_url: Nullable<string>;
441
- }>;
442
- invoice_amount?: number;
443
- invoice_currency_code?: string;
444
- insurance_value?: Nullable<number>;
445
- /**
446
- * ie: "Ground"
447
- */
448
- ship_option?: string;
449
- /**
450
- * ie: "2024-04-09T06:59:59+00:00"
451
- */
452
- estimated_fulfillment_date?: string;
453
- /**
454
- * Is this when it was actually delivered?
455
- * "2024-04-08T11:17:07.122+00:00"
456
- */
457
- actual_fulfillment_date?: string;
458
- /**
459
- * ie: "FulfilledOnTime", "Unavailable"
460
- */
461
- estimated_fulfillment_date_status?: string;
462
- is_tracking_uploaded?: boolean;
463
- };
464
- export type Order = {
465
- /**
466
- * Unique id of the order
467
- */
468
- id: number;
469
- /**
470
- * Date this order was created
471
- *
472
- * ISO date. ie: "2019-08-24T14:15:22Z"
473
- */
474
- created_date: string;
475
- /**
476
- * Date this order was purchase by the end user
477
- *
478
- * ISO date. ie: "2019-08-24T14:15:22Z"
479
- */
480
- purchase_date: Nullable<string>;
481
- /**
482
- * Client-defined external unique id of the order
483
- */
484
- reference_id: string;
485
- /**
486
- * User friendly orderId or store order number that will be shown on the Orders Page. If not provided, referenceId will be used
487
- */
488
- order_number: string;
489
- /**
490
- * ie "Processing" when created. We should be able to get order status updates via webhook
491
- *
492
- * ShipBob.Orders.StatusResolver.OrderStatus
493
- * "Processing" "Exception" "PartiallyFulfilled" "Fulfilled" "Cancelled" "ImportReview"
494
- */
495
- status: OrderStatusType;
496
- /**
497
- * Shipbob.Orders.Common.OrderType
498
- */
499
- type: OrderType;
500
- /**
501
- * Created by channel metadata
502
- */
503
- channel: {
504
- id: number;
505
- /**
506
- * ie: "ShipBobs-Shopify-Store"
507
- */
508
- name: string;
509
- };
510
- /**
511
- * Client-defined shipping method
512
- *
513
- * ie: "Free 2-day Shipping"
514
- */
515
- shipping_method: string;
516
- /**
517
- * Information about the recipient of an order
518
- */
519
- recipient: {
520
- name: string;
521
- address: Address;
522
- email: string;
523
- phone_number: string;
524
- };
525
- /**
526
- * List of products included in the order
527
- *
528
- * ShipBob.Orders.Presentation.ViewModels.ProductInfoViewModel
529
- */
530
- products: {
531
- /**
532
- * Unique id of the product
533
- */
534
- id: number;
535
- /**
536
- * Unique reference id of the product
537
- */
538
- reference_id: string;
539
- /**
540
- * The quantity of this product ordered
541
- */
542
- quantity: number;
543
- /**
544
- * Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL
545
- */
546
- quantity_unit_of_measure_code: Nullable<string>;
547
- /**
548
- * Stock keeping unit for the product
549
- */
550
- sku: string;
551
- /**
552
- * Global Trade Item Number - unique and internationally recognized identifier assigned to item by company GS1
553
- */
554
- gtin: string;
555
- /**
556
- * Universal Product Code - Unique external identifier
557
- */
558
- upc: string;
559
- /**
560
- * Price for one item
561
- */
562
- unit_price: number;
563
- /**
564
- * Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc.
565
- */
566
- external_line_id: number;
567
- }[];
568
- /**
569
- * Client-defined order tags
570
- */
571
- tags: Record<string, string>;
572
- /**
573
- * Shipments affiliated with the order
574
- * TODO: redo this as it's a union of 2 types.
575
- * - ShipBob.Orders.Presentation.ViewModels.ShipmentViewModel
576
- * - ShipBob.Orders.Presentation.ViewModels.InternalShipmentViewModel
577
- * probably good idea to use what is generated from the OpenAPI and reference here - the generated has lots of TS errors.
578
- */
579
- shipments: OrderShipment[];
580
- gift_message: string;
581
- shipping_terms: {
582
- /**
583
- * ie: "Parcel"
584
- */
585
- carrier_type: CarrierShipType;
586
- payment_term: PaymentShipTerm;
587
- };
588
- };
589
- export type PaymentShipTerm = 'Collect' | 'ThirdParty' | 'Prepaid' | 'MerchantResponsible';
590
- export type CarrierShipType = 'Parcel' | 'Freight';
591
- export type PlaceOrderRequest = {
592
- /**
593
- * Desired Fulfillment Center Location ID. If not specified, ShipBob will determine the location that fulfills this order.
594
- */
595
- location_id: null | number;
596
- /**
597
- * User friendly orderId or store order number that will be shown on the Orders Page. If not provided, referenceId will be used (<= 400 characters)
598
- */
599
- order_number: Nullable<string>;
600
- recipient: {
601
- name: string;
602
- address: Address;
603
- /**
604
- * Email address of the recipient
605
- */
606
- email?: Nullable<string>;
607
- /**
608
- * Phone number of the recipient (<= 50 characters)
609
- */
610
- phone_number?: Nullable<string>;
611
- };
612
- /**
613
- * Products included in the order. Products identified by reference_id must also include the product name if there is no matching ShipBob product.
614
- */
615
- products: AnyProduct[];
616
- /**
617
- * Unique and immutable order identifier from your upstream system.
618
- *
619
- * Discussions with Simon. This is a forever unique identifier. ie: cannot be an IC order number like 18888888 - we could not reship.
620
- *
621
- * NOTE: reusing generates 422 error: "Cannot insert order with existing ReferenceId"
622
- */
623
- reference_id: string;
624
- /**
625
- * Contains properties that needs to be used for fulfilling B2B/Dropship orders.
626
- */
627
- retailer_program_data?: {
628
- /**
629
- * First initial documentation sent from buyer to seller with item(s) and quantities.
630
- */
631
- purchase_order_number: string;
632
- /**
633
- * Identifies retailer-merchant combination
634
- */
635
- retailer_program_type: string;
636
- /**
637
- * Store Number
638
- */
639
- mark_for_store?: Nullable<string>;
640
- /**
641
- * Identifies a merchant's store department
642
- */
643
- department?: Nullable<string>;
644
- /**
645
- * Expected delivery date
646
- */
647
- delivery_date?: Nullable<string>;
648
- /**
649
- * Customer Ticket Number
650
- */
651
- customer_ticket_number?: Nullable<string>;
652
- /**
653
- * The date the retailer has requested the order to ship by.
654
- */
655
- shipByDate?: Nullable<string>;
656
- /**
657
- * The date the retailer does not want the order shipped by.
658
- */
659
- doNotShipBeforeDate?: Nullable<string>;
660
- };
661
- /**
662
- * Client-defined shipping method matching what the user has listed as the shipping method on the Ship Option Mapping setup page in the ShipBob Merchant Portal.
663
- * If they don’t match, we will create a new one and default it to Standard
664
- * (non-empty)
665
- * ie: "Standard"
666
- */
667
- shipping_method: string;
668
- /**
669
- * Contains shipping properties that need to be used for fulfilling an order.
670
- */
671
- shipping_terms?: {
672
- /**
673
- * CarrierShipType: Enum: "Parcel" "Freight"
674
- */
675
- carrier_type: CarrierShipType;
676
- /**
677
- * PaymentShipTerm
678
- */
679
- payment_term: PaymentShipTerm;
680
- };
681
- /**
682
- * Enum: "DTC" "DropShip" "B2B" "Transportation"
683
- */
684
- type: OrderType;
685
- /**
686
- * Gift message associated with the order
687
- * Maximum string length: 500
688
- */
689
- gift_message: string | null;
690
- };
691
- export type ShippingMethod = {
692
- /**
693
- * Unique id for shipping method
694
- */
695
- id: number;
696
- /**
697
- * Indicates if the shipping method is active
698
- */
699
- active: boolean;
700
- /**
701
- * Indicates the shipping method is a ShipBob default shipping method.
702
- */
703
- default: boolean;
704
- /**
705
- * Name of the ship method as selected by the merchant and saved in ShipBob’s database (i.e. “ground”).
706
- *
707
- * Corresponds to the shipping_method field in the Orders API.
708
- */
709
- name: string;
710
- /**
711
- * ShipBob.Orders.Presentation.ViewModels.ServiceLevelDetailViewModel)
712
- */
713
- service_level: {
714
- /**
715
- * Unique id for the service level
716
- */
717
- id: number;
718
- /**
719
- * The name or title of the service level
720
- */
721
- name: string;
722
- };
723
- };
724
- export type Webhook = {
725
- id: number;
726
- /**
727
- * ISO date format: "2025-02-14T22:21:33.4911731"
728
- */
729
- created_at: string;
730
- /**
731
- * The subscription topic for the webhook
732
- */
733
- topic: WebhookTopic;
734
- /**
735
- * This is what we provided to them.
736
- */
737
- subscription_url: string;
738
- };
739
- export type FulfillmentCenter = {
740
- id: number;
741
- /**
742
- * ie: "Cicero (IL)"
743
- */
744
- name: string;
745
- /**
746
- * ie: "Central Standard Time"
747
- */
748
- timezone: string;
749
- address1: string;
750
- address2: string;
751
- city: string;
752
- /**
753
- * ie: "IL"
754
- */
755
- state: string;
756
- /**
757
- * ie: "USA"
758
- */
759
- country: string;
760
- zip_code: string;
761
- phone_number: string;
762
- email: string;
763
- };
764
- export type PackageType = 'Package' | 'Pallet' | 'FloorLoadedContainer';
765
- export type BoxPackagingType = 'EverythingInOneBox' | 'OneSkuPerBox' | 'MultipleSkuPerBox';
766
- /**
767
- * The receiving order to create
768
- */
769
- export type WarehouseReceivingOrderRequest = {
770
- /**
771
- * Model containing information that assigns a receiving order to a fulfillment center.
772
- * If the fulfillment center provided is in a receiving hub region, then the response will be the receiving hub location.
773
- */
774
- fulfillment_center: {
775
- /**
776
- * ID of the fulfillment center to assign this receiving order to
777
- */
778
- id: number;
779
- };
780
- package_type: PackageType;
781
- box_packaging_type: BoxPackagingType;
782
- /**
783
- * Box shipments to be added to this receiving order
784
- */
785
- boxes: {
786
- /**
787
- * Tracking number for the box shipment.
788
- *
789
- * The API docs say "string or null", but if you pass null will get a 400: Boxes[...] 'The TrackingNumber field is required.'
790
- */
791
- tracking_number: string;
792
- /**
793
- * Items contained in this box
794
- */
795
- box_items: {
796
- /**
797
- * Quantity of the items in the box
798
- *
799
- * NOTE: integer <int32> [ 1 .. 2147483647 ]. LOL. 2 billion
800
- */
801
- quantity: number;
802
- /**
803
- * Unique inventory id of the items in the box
804
- */
805
- inventory_id: number;
806
- /**
807
- * Lot number of the items in the box. Must be supplied for products that have lot set, otherwise will be:
808
- * 422 status code "Wrong Lot Information Provided For Inventory IDs: 8619859,8619860, etc."
809
- */
810
- lot_number?: Nullable<string>;
811
- /**
812
- * Lot expiration date for the items in the box
813
- */
814
- lot_date?: Nullable<string>;
815
- }[];
816
- }[];
817
- /**
818
- * Expected arrival date of all the box shipments in this receiving order
819
- * ie: ISO date "2019-08-24T14:15:22Z"
820
- *
821
- * NOTE: Must be in the future or it will generate a 422 error.
822
- */
823
- expected_arrival_date: string;
824
- /**
825
- * Purchase order number for this receiving order
826
- *
827
- * NOTE: Supporting idempotency this must be unique across WROs
828
- * Otherwise 422: "Request could not be completed, PO reference already exists and must be a unique value"
829
- */
830
- purchase_order_number?: Nullable<string>;
831
- };
832
- export type ReceivingStatus = 'Awaiting' | 'Processing' | 'Completed' | 'Cancelled' | 'Incomplete' | 'Arrived' | 'PartiallyArrived' | 'PartiallyArrivedAtHub' | 'ArrivedAtHub' | 'ProcessingAtHub' | 'InternalTransfer';
833
- export type WarehouseReceivingOrderResponse = {
834
- id: number;
835
- /**
836
- * Not sure what these could be. "Awaiting" is a staging status.
837
- */
838
- status: ReceivingStatus;
839
- /**
840
- * What was sent in the request
841
- */
842
- package_type: PackageType;
843
- /**
844
- * What was sent in the request
845
- */
846
- box_packaging_type: BoxPackagingType;
847
- /**
848
- * What was sent in the request (ISO date)
849
- */
850
- expected_arrival_date: string;
851
- /**
852
- * ISO date: "2025-02-18T19:25:13.034265+00:00"
853
- */
854
- insert_date: string;
855
- /**
856
- * ISO date
857
- */
858
- last_updated_date: string;
859
- /**
860
- * ie: "/2.0/receiving/442945/labels"
861
- */
862
- box_labels_uri: string;
863
- fulfillment_center: FulfillmentCenter;
864
- purchase_order_number: Nullable<string>;
865
- inventory_quantities: {
866
- inventory_id: number;
867
- sku: string;
868
- expected_quantity: number;
869
- received_quantity: number;
870
- stowed_quantity: number;
871
- }[];
872
- /**
873
- * The timestamp in UTC when a 3rd party integrator has set in ShipBob system
874
- *
875
- * We set this in their receiving-extended API endpoints. Use case is for acknowledging completed orders.
876
- * Their API has example: "2019-08-24T14:15:22Z"
877
- */
878
- external_sync_timestamp: Nullable<string>;
879
- };
880
- /**
881
- * The simulation will work on our SandBox Environment.
882
- */
883
- export type Simulation = {
884
- /**
885
- * Identifies what action to perform on shipment.
886
- */
887
- action: 'ShipOrder' | 'DeliverOrder';
888
- /**
889
- * Delay time for action in minutes to be triggered after.
890
- *
891
- * NOTE: anything over 2880 will be clamped
892
- */
893
- delay?: Nullable<number>;
894
- /**
895
- * Next simulation action to be performed after it.
896
- */
897
- next?: Nullable<SimulateShipmentRequest>;
898
- };
899
- export type SimulateShipmentRequest = {
900
- /**
901
- * Shipment Id for simulation.
902
- */
903
- shipment_id: number;
904
- /**
905
- * Simulation actions object.
906
- */
907
- simulation: Simulation;
908
- };
909
- export type SimulateShipmentResponse = {
910
- /**
911
- * Simulation id for register simulation request.
912
- * UUID ie: 439a9dec-9bff-4339-9564-89975d3a8f5c
913
- */
914
- simulation_id: string;
915
- /**
916
- * ie: "Simulation registered successfully"
917
- */
918
- message: string;
919
- };
920
- export type SimulationDetails = {
921
- /**
922
- * Identifies the action that was performed.
923
- */
924
- action: 'ShipOrder' | 'DeliverOrder';
925
- /**
926
- * Status of the simulation action.
927
- */
928
- status: 'Success' | 'Failed' | 'Pending' | 'Skipped';
929
- /**
930
- * Additional message for the action.
931
- *
932
- * ie:
933
- * - "This simulated action has been completed successfully."
934
- * - "This simulation action is not executed yet."
935
- */
936
- message: string;
937
- /**
938
- * Scheduled time if the action had a delay.
939
- * ie: ISO date '2025-02-19T00:09:53.77' or NULL
940
- */
941
- schedule_time: Nullable<string>;
942
- /**
943
- * Nested object with details of subsequent simulation actions. This value would be null if there is no subsequent action.
944
- */
945
- next: Nullable<SimulationDetails>;
946
- };
947
- export type SimulationResponse = {
948
- /**
949
- * Simulation id for register simulation request.
950
- */
951
- simulation_id: string;
952
- /**
953
- * ID of the entity for which the simulation was registered.
954
- */
955
- entity_id: string;
956
- /**
957
- * Type of entity for which the simulation was registered.
958
- *
959
- * ie: "Order"
960
- */
961
- entity_type: string;
962
- /**
963
- * Object with details of simulation actions
964
- * type: SimulationDetails (not described in docs)
965
- */
966
- simulation: SimulationDetails;
967
- };
968
1
  /**
969
- * For each WRO that was supplied, if ExternalSync was updated
2
+ * They list in the comment these are allowed, but API spec is a string.
3
+ */
4
+ export type ProductType = 'Regular' | 'Bundle';
5
+ /**
6
+ * NOTE: their spec returns wrong type
970
7
  */
971
8
  export type SetExternalSyncResponse = {
972
9
  results: {
@@ -980,63 +17,6 @@ export type SetExternalSyncResponse = {
980
17
  reason: string;
981
18
  }[];
982
19
  };
983
- export type BoxStatus = 'Awaiting' | 'Arrived' | 'Completed' | 'Counting' | 'Stowing' | 'Cancelled' | 'InternalTransfer';
984
- /**
985
- * Get Warehouse Receiving Order Boxes response
986
- */
987
- export type WarehouseReceivingOrderBoxesResponse = {
988
- box_id: number;
989
- /**
990
- * The number of the box in the receiving order
991
- */
992
- box_number: number;
993
- box_status: BoxStatus;
994
- /**
995
- * Date the box arrived
996
- */
997
- arrived_date: Nullable<string>;
998
- /**
999
- * Date the box was received
1000
- */
1001
- received_date: Nullable<string>;
1002
- /**
1003
- * Date counting of the box's inventory items started
1004
- */
1005
- counting_started_date: Nullable<string>;
1006
- /**
1007
- * Tracking number of the box shipment
1008
- */
1009
- tracking_number: Nullable<string>;
1010
- /**
1011
- * type: BoxItemViewModel
1012
- */
1013
- box_items: {
1014
- /**
1015
- * Quantity of the item included
1016
- */
1017
- quantity: number;
1018
- /**
1019
- * Quantity of the item that was received after processing the receiving order
1020
- */
1021
- received_quantity: number;
1022
- /**
1023
- * Quantity of the item that has been stowed
1024
- */
1025
- stowed_quantity: number;
1026
- /**
1027
- * Unique identifier of the inventory item
1028
- */
1029
- inventory_id: number;
1030
- /**
1031
- * Lot number the item belongs to
1032
- */
1033
- lot_number: Nullable<string>;
1034
- /**
1035
- * Expiration date of the item's lot
1036
- */
1037
- lot_date: Nullable<string>;
1038
- }[];
1039
- }[];
1040
20
  export declare enum PackagingRequirement {
1041
21
  'No Requirements' = 1,
1042
22
  Fragile = 2,
@@ -1078,419 +58,9 @@ export declare enum ReturnAction {
1078
58
  */
1079
59
  Dispose = 3
1080
60
  }
1081
- export type VariantRequestProductExperimental = Omit<VariantRequestProduct2_0, 'barcode'> & {
1082
- /**
1083
- * Multiple barcodes support added in 2.0
1084
- */
1085
- barcodes: {
1086
- value: string;
1087
- sticker_url: Nullable<string>;
1088
- }[];
1089
- };
1090
- export type VariantRequestProduct2_0 = {
1091
- /**
1092
- * Required for updates
1093
- */
1094
- id?: number;
1095
- name?: string;
1096
- sku?: string;
1097
- /**
1098
- * will serialize as a number
1099
- */
1100
- packaging_requirement_id?: PackagingRequirement;
1101
- /**
1102
- * will serialize as a number
1103
- */
1104
- packaging_material_type_id?: PackagingMaterial;
1105
- barcode?: string;
1106
- upc?: string;
1107
- gtin?: string;
1108
- customs?: {
1109
- /**
1110
- * 2 character country code
1111
- */
1112
- country_code_of_origin: 'US';
1113
- /**
1114
- * The customs code (6 digit)
1115
- * ie: “6103.22”
1116
- */
1117
- hs_tariff_code: string;
1118
- /**
1119
- * Value of object for customs (in USD)
1120
- * ie: “15”
1121
- */
1122
- value: string;
1123
- /**
1124
- * Description of product for customs purposes
1125
- */
1126
- description: string;
1127
- };
1128
- /**
1129
- * Not sure if these can be partially supplied.
1130
- */
1131
- return_preferences?: {
1132
- primary_action_id: Nullable<ReturnAction>;
1133
- backup_action_id: null;
1134
- /**
1135
- * Cannot be set when "primary_action_id" has certain values (ie: Quarantine)
1136
- * error: variants.return_preferences.instructions cannot be set for the selected primary action
1137
- */
1138
- instructions: Nullable<string>;
1139
- return_to_sender_primary_action_id: Nullable<ReturnAction>;
1140
- return_to_sender_backup_action_id: Nullable<ReturnAction>;
1141
- };
1142
- lot_information?: {
1143
- /**
1144
- * If the product should use lot date based picking
1145
- */
1146
- is_lot: boolean;
1147
- minimum_shelf_life_days: Nullable<number>;
1148
- };
1149
- /**
1150
- * This is not part of Open API spec, but found starting with Product 2.0
1151
- */
1152
- fulfillment_settings?: {
1153
- is_bpm_parcel?: boolean;
1154
- is_case_pick?: boolean;
1155
- msds_url?: Nullable<string>;
1156
- dangerous_goods?: boolean;
1157
- /**
1158
- * If the product requires a prop65 label in the box
1159
- */
1160
- requires_prop65?: boolean;
1161
- serial_scan?: {
1162
- /**
1163
- * Indicates if a Serial Scan is required during the pack process.
1164
- * Note: Serial scan requires either a prefix or a suffix to be defined
1165
- */
1166
- is_enabled: boolean;
1167
- /**
1168
- * The exact number of characters expected in the serial number
1169
- */
1170
- exact_character_length?: Nullable<number>;
1171
- } & ({
1172
- /**
1173
- * The prefix expected on the serial number
1174
- */
1175
- prefix: string;
1176
- /**
1177
- * The suffix expected on the serial number
1178
- */
1179
- suffix?: Nullable<string>;
1180
- } | {
1181
- /**
1182
- * The prefix expected on the serial number
1183
- */
1184
- prefix?: Nullable<string>;
1185
- /**
1186
- * The suffix expected on the serial number
1187
- */
1188
- suffix: string;
1189
- });
1190
- };
1191
- };
1192
- export type GetProductQueryStrings = Partial<{
1193
- Page: number;
1194
- Limit: number;
1195
- /**
1196
- * Regular product (1) or Bundle (2)
1197
- */
1198
- productTypeId: 1 | 2;
1199
- /**
1200
- * Active (1) or Inactive (2)
1201
- */
1202
- variantStatus: 1 | 2;
1203
- /**
1204
- * True -> at least one variant is digital
1205
- * False -> at least one variant is not-digital
1206
- */
1207
- hasDigitalVariants: boolean;
1208
- /**
1209
- * Search by one or more Product Ids (comma separated) to return multiple products
1210
- */
1211
- Ids: string;
1212
- /**
1213
- * Search by one or more Variant Ids (comma separated) to return multiple products
1214
- */
1215
- VariantIds: string;
1216
- /**
1217
- * Search by product barcode
1218
- */
1219
- barcode: string;
1220
- /**
1221
- * Search by an exact sku
1222
- */
1223
- sku: string;
1224
- /**
1225
- * Search for products that vary or non-varying products
1226
- */
1227
- hasVariants: boolean;
1228
- /**
1229
- * Search by one or more InventoryIds (comma separated) to return multiple barcodes
1230
- */
1231
- InventoryId: string;
1232
- /**
1233
- * Search by Variant Name.
1234
- * NOTE: Query parameters should be URL encoded such as "Green%20Shirt"
1235
- */
1236
- Name: string;
1237
- /**
1238
- * Search by matching Taxonomy (category) of the product (comma separated)
1239
- */
1240
- TaxonomyIds: string;
1241
- }>;
1242
- export type GetOrdersQueryStrings = {
1243
- Page: number;
1244
- Limit: number;
1245
- /**
1246
- * order ids to filter by, comma separated
1247
- */
1248
- Ids: string;
1249
- /**
1250
- * Reference ids to filter by, comma separated
1251
- */
1252
- ReferenceIds: string;
1253
- /**
1254
- * Start date to filter orders inserted later than
1255
- */
1256
- StartDate: string;
1257
- /**
1258
- * End date to filter orders inserted earlier than
1259
- */
1260
- EndDate: string;
1261
- /**
1262
- * Order to sort results in
1263
- */
1264
- SortOrder: 'Newest' | 'Oldest';
1265
- /**
1266
- * Has any portion of this order been assigned a tracking number
1267
- */
1268
- HasTracking: boolean;
1269
- /**
1270
- * Start date to filter orders updated later than
1271
- */
1272
- LastUpdateStartDate: string;
1273
- /**
1274
- * End date to filter orders updated later than
1275
- */
1276
- LastUpdateEndDate: string;
1277
- /**
1278
- * Filter orders that their tracking information was fully uploaded
1279
- */
1280
- IsTrackingUploaded: boolean;
1281
- /**
1282
- * Start date to filter orders with tracking updates later than the supplied date. Will only return orders that have tracking information
1283
- */
1284
- LastTrackingUpdateStartDate: string;
1285
- /**
1286
- * End date to filter orders updated later than the supplied date. Will only return orders that have tracking information
1287
- */
1288
- LastTrackingUpdateEndDate: string;
1289
- };
1290
- export type ExperimentalPagedResult<T> = {
1291
- /**
1292
- * Will be null when there are no items
1293
- */
1294
- first: Nullable<string>;
1295
- next: Nullable<string>;
1296
- items: T[];
1297
- prev: Nullable<string>;
1298
- /**
1299
- * Will be null when there are no items.
1300
- */
1301
- last: Nullable<string>;
1302
- };
1303
- export type ListInventoryQueryStrings = {
1304
- /**
1305
- * Page of inventory items to get
1306
- */
1307
- Page: number;
1308
- /**
1309
- * Amount of inventory items per page to request
1310
- * ie: [1 .. 250]
1311
- */
1312
- Limit: number;
1313
- IsActive: boolean;
1314
- IsDigital: boolean;
1315
- /**
1316
- * ShipBob recommends sending only 150/request
1317
- *
1318
- * NOTE: if you pass ie: 250 IDs then you will get 404s from shipbob.
1319
- * NOTE: it's IDs in the documentation. Web UI sends "Ids", so probably case-insensitive
1320
- */
1321
- Ids: number[];
1322
- /**
1323
- * Sort will default to ascending order for each field. To sort in descending order please pass a "-" in front of the field name. For example, Sort=-onHand,name will sort by onHand descending
1324
- *
1325
- * NOTE: if you sort a non-valid field will be a 422. ie: on_hand is not an available sort property
1326
- *
1327
- * NOTE: their API is a mix of pascalCase and snake_case.
1328
- */
1329
- Sort: string;
1330
- /**
1331
- * Search is available for 2 fields, Inventory ID and Name -
1332
- *
1333
- * Expected behavior for search by Inventory ID is exact match
1334
- * Expected behavior for search by Inventory Name is partial match, i.e. does not have to be start of word, but must be consecutive characters. This is not case sensitive.
1335
- */
1336
- Search: string;
1337
- /**
1338
- * LocationType is valid for hub, spoke, or lts. LocationType will default to all locations.
1339
- */
1340
- LocationType: string;
1341
- };
1342
- export type GetInventory1_0Result = {
1343
- id: number;
1344
- name: string;
1345
- is_digital: boolean;
1346
- is_case_pick: boolean;
1347
- is_lot: boolean;
1348
- dimensions: {
1349
- weight: number;
1350
- length: number;
1351
- width: number;
1352
- depth: number;
1353
- };
1354
- /**
1355
- * Total fulfillable quantity of this inventory item
1356
- */
1357
- total_fulfillable_quantity: number;
1358
- /**
1359
- * Total onhand quantity of this inventory item
1360
- */
1361
- total_onhand_quantity: number;
1362
- /**
1363
- * Total committed quantity of this inventory item
1364
- */
1365
- total_committed_quantity: number;
1366
- /**
1367
- * Total quantity that can be sold without overselling the inventory item. This is calculated by subtracting the total exception quantity from the fulfillable quantity.
1368
- */
1369
- total_sellable_quantity: number;
1370
- /**
1371
- * Total quantity in unreceived receiving orders for this inventory item
1372
- */
1373
- total_awaiting_quantity: number;
1374
- /**
1375
- * The total quantity of all items that are contained within orders that are in exception/out of stock status. Out of stock orders have not been processed and therefore do not have lot or fulfillment centers assigned.
1376
- */
1377
- total_exception_quantity: number;
1378
- /**
1379
- * The total quantity of all items that are in the process of internal transit between ShipBob fulfillment centers. These items are not pickable or fulfillable until they have been received and moved to the "On Hand" quantity of the destination FC. Internal transit quantities for each FC represent the incoming transfer stock for that specific location.
1380
- */
1381
- total_internal_transfer_quantity: number;
1382
- /**
1383
- * The amount of the item you need to send to ShipBob to fulfill all exception orders containing the item. This is the exception_quantity less the fulfillable_quantity of the item.
1384
- */
1385
- total_backordered_quantity: number;
1386
- /**
1387
- * Whether the inventory is active or not
1388
- */
1389
- is_active: boolean;
1390
- /**
1391
- * Fulfillable quantity of this inventory item broken down by fulfillment center location
1392
- */
1393
- fulfillable_quantity_by_fulfillment_center: {
1394
- id: number;
1395
- name: string;
1396
- fulfillable_quantity: number;
1397
- onhand_quantity: number;
1398
- committed_quantity: number;
1399
- awaiting_quantity: number;
1400
- internal_transfer_quantity: number;
1401
- }[];
1402
- /**
1403
- * Fulfillable quantity of this inventory item broken down by lot
1404
- */
1405
- fulfillable_quantity_by_lot: {
1406
- lot_number: string;
1407
- /**
1408
- * ie: "2019-08-24T14:15:22Z"
1409
- */
1410
- expiration_date: string;
1411
- fulfillable_quantity: number;
1412
- onhand_quantity: number;
1413
- committed_quantity: number;
1414
- awaiting_quantity: number;
1415
- internal_transfer_quantity: number;
1416
- fulfillable_quantity_by_fulfillment_center: {
1417
- id: number;
1418
- name: string;
1419
- fulfillable_quantity: number;
1420
- onhand_quantity: number;
1421
- committed_quantity: number;
1422
- awaiting_quantity: number;
1423
- internal_transfer_quantity: number;
1424
- }[];
1425
- }[];
1426
- /**
1427
- * ie: "None" "Fragile" "Foldable" "Stackable" "Book" "CustomPackaging" "CustomDunnage" "MarketingInsert" or "Poster"
1428
- */
1429
- packaging_attribute: 'None' | 'Fragile' | 'Foldable' | 'Stackable' | 'Book' | 'CustomPackaging' | 'CustomDunnage' | 'MarketingInsert' | 'Poster';
1430
- };
1431
- /**
1432
- * The Topic and SubsciptionId are passed in the HTTP header of the webhook notification, with the names:
1433
- * - shipbob-topic
1434
- * - shipbob-subscription-id
1435
- */
1436
- export declare enum WebhookTopic {
1437
- /**
1438
- * Sends the full order payload when the label is purchased, printed, and placed on box for carrier pickup.
1439
- * While the tracking # will be available, there may be a delay while carriers scan in the package.
1440
- * If the order is split into multiple shipments, this will fire for each shipment that is part of the order.
1441
- */
1442
- OrderShipped = "order_shipped",
1443
- /**
1444
- * Sends the full shipment payload when a shipment is delivered by the carrier to the customer.
1445
- * If the order is split into multiple shipments, this will fire for each shipment.
1446
- */
1447
- ShipmentDelivered = "shipment_delivered",
1448
- /**
1449
- * Sends the full shipment payload when a shipment moves to exception status.
1450
- * Shipments are moved into exception because ShipBob is unable to fulfill the shipment.
1451
- * Shipments are moved into exception status largely because one or more items in the shipment is out of stock.
1452
- */
1453
- ShipmentException = "shipment_exception",
1454
- /**
1455
- * Sends the full shipment payload when a shipment moves to On-Hold status.
1456
- * Shipments are moved into On-Hold status by ShipBob when we are missing key information like Address or Packaging preferences.
1457
- * Shipments can also be moved to On-Hold in the Merchant Dashboard. On-Hold Shipments will not be fulfilled.
1458
- */
1459
- ShipmentOnHold = "shipment_onhold",
1460
- /**
1461
- * Sends the full shipment payload when a shipment moves to cancelled status.
1462
- * This webhook subcription will NOT notify you of cancelled split, copied, manual, and excel imported orders.
1463
- * This functionality will be available on this webhook at a later point.
1464
- */
1465
- ShipmentCancelled = "shipment_cancelled"
1466
- }
1467
61
  /**
1468
62
  * This can be used to lookup a webhook content based on the supplier "shipbob-topic" header.
1469
63
  */
1470
- export type WebhookResponsesByTopic = {
1471
- topic: 'order_shipped';
1472
- payload: Order;
1473
- } | {
1474
- topic: 'shipment_delivered';
1475
- payload: Omit<OrderShipment, 'status'> & {
1476
- status: 'Completed';
1477
- };
1478
- } | {
1479
- topic: 'shipment_exception';
1480
- payload: Omit<OrderShipment, 'status'> & {
1481
- status: 'Exception';
1482
- };
1483
- } | {
1484
- topic: 'shipment_onhold';
1485
- payload: Omit<OrderShipment, 'status'> & {
1486
- status: 'OnHold';
1487
- };
1488
- } | {
1489
- topic: 'shipment_cancelled';
1490
- payload: Omit<OrderShipment, 'status'> & {
1491
- status: 'Cancelled';
1492
- };
1493
- };
1494
64
  /**
1495
65
  * OAuth types here
1496
66
  */
@@ -1569,3 +139,59 @@ export type AuthorizeParametersWeb = {
1569
139
  code_challenge_method: 'S256';
1570
140
  shipbob_response_mode?: 'query';
1571
141
  } & AuthorizeParametersCommon<AuthScopesWeb>;
142
+ /**
143
+ * Existing registration
144
+ */
145
+ export type SimulationResponse = {
146
+ /**
147
+ * The unique identifier of the simulation run.
148
+ */
149
+ simulation_id: string;
150
+ /**
151
+ * Optional message about the submitted simulation.
152
+ */
153
+ message: string;
154
+ };
155
+ export type Simulation = {
156
+ /**
157
+ * The name of the action performed in the simulation (for example: ShipOrder, DeliverOrder).
158
+ */
159
+ action: 'ShipOrder' | 'DeliverOrder';
160
+ /**
161
+ * The scheduled time for the action to run, in ISO 8601 date-time format (UTC).
162
+ */
163
+ schedule_time: string;
164
+ /**
165
+ * The current execution state of the action.
166
+ */
167
+ status: string;
168
+ /**
169
+ * Additional details about the action status, such as progress information or an error message.
170
+ */
171
+ message: string;
172
+ /**
173
+ * The status for the next action in the sequence, if actions are chained.
174
+ */
175
+ next: null | Simulation;
176
+ };
177
+ /**
178
+ * The simulation status
179
+ */
180
+ export type SimulationStatusResponse = {
181
+ /**
182
+ * The unique identifier of the simulation run.
183
+ */
184
+ simulation_id: string;
185
+ /**
186
+ * The identifier of the entity the simulation is associated with (for example: shipment id).
187
+ */
188
+ entity_id: string;
189
+ /**
190
+ * The type of entity the simulation is associated with (for example: Order).
191
+ */
192
+ entity_type: string;
193
+ /**
194
+ * The current status of the simulation action(s), including any chained next actions.
195
+ */
196
+ simulation: Simulation;
197
+ };