shipbob-node-sdk 0.0.2 → 0.0.4

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/dist/index.d.ts CHANGED
@@ -26,7 +26,21 @@ export type DataResponse<T> = ({
26
26
  */
27
27
  data: object | string;
28
28
  }) & {
29
+ headers: Record<string, string>;
29
30
  statusCode: number;
31
+ rateLimit: {
32
+ /**
33
+ * There are 150 calls in a sliding window of 1 minute.
34
+ *
35
+ * Retrieved from x-remaining-calls header in response.
36
+ * null when not found.
37
+ */
38
+ remainingCalls: Nullable<number>;
39
+ /**
40
+ * Seconds remaining in sliding window once rate limit has been exhausted.
41
+ */
42
+ retryAfter: Nullable<number>;
43
+ };
30
44
  };
31
45
  export type ChannelsResponse = {
32
46
  id: number;
@@ -72,10 +86,231 @@ export type AddProductResponse = {
72
86
  id: number;
73
87
  reference_id: string;
74
88
  };
75
- export type GetProductResult = {
89
+ /**
90
+ * This is missing practically all fields of actual result.
91
+ */
92
+ export type GetProduct1_0Result = {
76
93
  id: number;
77
94
  reference_id: string;
78
95
  };
96
+ export type ActionName = 'Dispose' | 'Restock' | 'Quarantine';
97
+ export type ProductType = 'Regular' | 'Bundle';
98
+ type GetProduct2_0Variant = {
99
+ /**
100
+ * The expected barcode to be found on the item and checked during the pick process
101
+ */
102
+ barcode: string;
103
+ barcode_sticker_url: Nullable<string>;
104
+ channel_metadata: unknown[];
105
+ reviews_pending: unknown[];
106
+ associated_bundles: unknown[];
107
+ bundle_definition: unknown[];
108
+ created_on: string;
109
+ customs: {
110
+ /**
111
+ * The customs code (6 digit)
112
+ */
113
+ hs_tariff_code: string;
114
+ /**
115
+ * 2 character country code
116
+ */
117
+ country_code_of_origin: string;
118
+ /**
119
+ * Value of object for customs (in USD)
120
+ */
121
+ value: Nullable<string>;
122
+ currency: 'USD';
123
+ /**
124
+ * Description of product for customs purposes
125
+ */
126
+ description: string;
127
+ is321_eligible: boolean;
128
+ };
129
+ dimension: {
130
+ length: number;
131
+ width: number;
132
+ height: number;
133
+ /**
134
+ * "inch"
135
+ */
136
+ unit: string;
137
+ is_locked: boolean;
138
+ /**
139
+ * ie: "UserEntry"
140
+ */
141
+ source: string;
142
+ };
143
+ fulfillment_settings: {
144
+ /**
145
+ * If the product requires a prop65 label in the box
146
+ */
147
+ requires_prop65: false;
148
+ serial_scan: {
149
+ /**
150
+ * Indicates if a Serial Scan is required during the pack process.
151
+ * Note: Serial scan requires either a prefix or a suffix to be defined
152
+ */
153
+ is_enabled: false;
154
+ /**
155
+ * The prefix expected on the serial number
156
+ */
157
+ prefix: string;
158
+ /**
159
+ * The suffix expected on the serial number
160
+ */
161
+ suffix: string;
162
+ /**
163
+ * The exact number of characters expected in the serial number
164
+ */
165
+ exact_character_length: Nullable<number>;
166
+ };
167
+ /**
168
+ * If the product needs to classified as a hazmat product with the shipping carrier
169
+ */
170
+ dangerous_goods: false;
171
+ /**
172
+ * URL of the Safety Data Sheet for this product.
173
+ * Note: should be populated by ShipBob system via the UI, should not reference a URL outside of the ShipBob domain
174
+ */
175
+ msds_url: string;
176
+ /**
177
+ * If the product should be picked as an entire case
178
+ */
179
+ is_case_pick: boolean;
180
+ /**
181
+ * Is Bound Printed Matter, must be set by the ShipBob internal team
182
+ */
183
+ is_bpm_parcel: boolean;
184
+ };
185
+ /**
186
+ * Global Trade Item Number
187
+ */
188
+ gtin: string;
189
+ /**
190
+ * Variant Id (used to alter product lot, packaging, etc.)
191
+ */
192
+ id: number;
193
+ inventory: {
194
+ inventory_id: number;
195
+ on_hand_qty: number;
196
+ };
197
+ is_digital: boolean;
198
+ lot_information: {
199
+ /**
200
+ * If the product should use lot date based picking
201
+ */
202
+ is_lot: boolean;
203
+ minimum_shelf_life_days: Nullable<number>;
204
+ };
205
+ /**
206
+ * Name of the Variant (should match the Product name if a non-varying product)
207
+ */
208
+ name: string;
209
+ /**
210
+ * PDf has wrong field: The specific material to package the product in (box, poly mailer, bubble mailer, etc_
211
+ */
212
+ packaging_material_type: {
213
+ id: number;
214
+ /**
215
+ * Not sure what else can be here
216
+ */
217
+ name: 'Box';
218
+ };
219
+ /**
220
+ * PDF has wrong field. int The id of the packaging_requirement (No requirement, fragile, ship in own container, etc)
221
+ */
222
+ packaging_requirement: {
223
+ id: number;
224
+ name: 'NoRequirements' | 'Fragile';
225
+ };
226
+ return_preferences: {
227
+ /**
228
+ * Restock (1) Quarantine (2) Dispose (3)
229
+ */
230
+ primary_action: Nullable<{
231
+ id: number;
232
+ name: ActionName;
233
+ }>;
234
+ /**
235
+ * Restock (1) Quarantine (2) Dispose (3)
236
+ */
237
+ backup_action: Nullable<{
238
+ id: number;
239
+ name: ActionName;
240
+ }>;
241
+ /**
242
+ * Instructions for inspecting returns
243
+ */
244
+ instructions: Nullable<string>;
245
+ return_to_sender_primary_action: Nullable<{
246
+ id: number;
247
+ name: ActionName;
248
+ }>;
249
+ return_to_sender_backup_action: Nullable<{
250
+ id: number;
251
+ name: ActionName;
252
+ }>;
253
+ };
254
+ /**
255
+ * The SKU of the product. This is a required field and must be unique.
256
+ */
257
+ sku: string;
258
+ /**
259
+ * PDF is incorrect - it describes in int. Active (1) or Inactive (2)
260
+ */
261
+ status: 'Active' | 'Inactive';
262
+ /**
263
+ * Universal Product Code
264
+ */
265
+ upc: string;
266
+ is_image_uploaded: false;
267
+ updated_on: string;
268
+ weight: {
269
+ weight: number;
270
+ /**
271
+ * ie: "oz"
272
+ */
273
+ unit: string;
274
+ };
275
+ additional_hazmat_attributes: Nullable<unknown>;
276
+ merge_children: [];
277
+ };
278
+ /**
279
+ * This is just some guessing based on found responses
280
+ */
281
+ export type GetProduct2_0Response = {
282
+ /**
283
+ * Product Id
284
+ */
285
+ id: number;
286
+ /**
287
+ * Product Name
288
+ */
289
+ name: string;
290
+ type: ProductType;
291
+ category: Nullable<unknown>;
292
+ sub_category: Nullable<unknown>;
293
+ user_id: number;
294
+ created_on: string;
295
+ updated_on: string;
296
+ /**
297
+ * null | ?
298
+ */
299
+ taxonomy: null;
300
+ variants: GetProduct2_0Variant[];
301
+ };
302
+ export type GetProductExperimentalVariant = Omit<GetProduct2_0Variant, 'barcode'> & {
303
+ barcodes: {
304
+ value: string;
305
+ sticker_url: Nullable<string>;
306
+ }[];
307
+ };
308
+ /**
309
+ * Just the barcode -> barcodes on the variant seems like the only difference so far.
310
+ */
311
+ export type GetProductExperimentalResponse = Omit<GetProduct2_0Response, 'variants'> & {
312
+ variants: GetProductExperimentalVariant[];
313
+ };
79
314
  export type OrderType = 'DTC' | 'DropShip' | 'B2B' | 'Transportation';
80
315
  export type AnyProduct = ({
81
316
  /**
@@ -314,6 +549,39 @@ export type PlaceOrderRequest = {
314
549
  */
315
550
  type: OrderType;
316
551
  };
552
+ export type ShippingMethod = {
553
+ /**
554
+ * Unique id for shipping method
555
+ */
556
+ id: number;
557
+ /**
558
+ * Indicates if the shipping method is active
559
+ */
560
+ active: boolean;
561
+ /**
562
+ * Indicates the shipping method is a ShipBob default shipping method.
563
+ */
564
+ default: boolean;
565
+ /**
566
+ * Name of the ship method as selected by the merchant and saved in ShipBob’s database (i.e. “ground”).
567
+ *
568
+ * Corresponds to the shipping_method field in the Orders API.
569
+ */
570
+ name: string;
571
+ /**
572
+ * ShipBob.Orders.Presentation.ViewModels.ServiceLevelDetailViewModel)
573
+ */
574
+ service_level: {
575
+ /**
576
+ * Unique id for the service level
577
+ */
578
+ id: number;
579
+ /**
580
+ * The name or title of the service level
581
+ */
582
+ name: string;
583
+ };
584
+ };
317
585
  export type Webhook = {
318
586
  id: number;
319
587
  /**
@@ -397,7 +665,8 @@ export type WarehouseReceivingOrderRequest = {
397
665
  */
398
666
  inventory_id: number;
399
667
  /**
400
- * Lot number of the items in the box
668
+ * Lot number of the items in the box. Must be supplied for products that have lot set, otherwise will be:
669
+ * 422 status code "Wrong Lot Information Provided For Inventory IDs: 8619859,8619860, etc."
401
670
  */
402
671
  lot_number?: Nullable<string>;
403
672
  /**
@@ -409,6 +678,8 @@ export type WarehouseReceivingOrderRequest = {
409
678
  /**
410
679
  * Expected arrival date of all the box shipments in this receiving order
411
680
  * ie: ISO date "2019-08-24T14:15:22Z"
681
+ *
682
+ * NOTE: Must be in the future or it will generate a 422 error.
412
683
  */
413
684
  expected_arrival_date: string;
414
685
  /**
@@ -627,6 +898,265 @@ export type WarehouseReceivingOrderBoxesResponse = {
627
898
  lot_date: Nullable<string>;
628
899
  }[];
629
900
  }[];
901
+ export declare enum PackagingRequirement {
902
+ 'No Requirements' = 1,
903
+ Fragile = 2,
904
+ 'Is Foldable' = 3,
905
+ 'Is Media (Media mail)' = 4,
906
+ 'Is Book' = 5,
907
+ 'Is Poster' = 6,
908
+ 'Is Apparel' = 7,
909
+ 'Is Packaging Material (for custom boxes, marketing inserts, etc)' = 8,
910
+ 'Ship In Own Container' = 9
911
+ }
912
+ export declare enum PackagingMaterial {
913
+ 'Box' = 1,
914
+ 'Bubble Mailer' = 2,
915
+ 'Poly Mailer' = 3,
916
+ 'Poster Tube' = 5,
917
+ 'Custom Box' = 6,
918
+ 'Bookfold' = 7,
919
+ 'Ship In Own Container' = 8,
920
+ 'Custom Bubble Mailer' = 9,
921
+ 'Custom Poly Mailer' = 10
922
+ }
923
+ /**
924
+ * Restock (1)
925
+ * Quarantine (2)
926
+ * Dispose (3)
927
+ */
928
+ export declare enum ReturnAction {
929
+ /**
930
+ * Restock (1)
931
+ */
932
+ Restock = 1,
933
+ /**
934
+ * Quarantine (2)
935
+ */
936
+ Quarantine = 2,
937
+ /**
938
+ * Dispose (3)
939
+ */
940
+ Dispose = 3
941
+ }
942
+ export type VariantRequestProductExperimental = Omit<VariantRequestProduct2_0, 'barcode'> & {
943
+ barcodes: {
944
+ value: string;
945
+ sticker_url: Nullable<string>;
946
+ }[];
947
+ };
948
+ export type VariantRequestProduct2_0 = {
949
+ /**
950
+ * Required for updates
951
+ */
952
+ id?: number;
953
+ name?: string;
954
+ sku?: string;
955
+ /**
956
+ * will serialize as a number
957
+ */
958
+ packaging_requirement_id?: PackagingRequirement;
959
+ /**
960
+ * will serialize as a number
961
+ */
962
+ packaging_material_type_id?: PackagingMaterial;
963
+ barcode?: string;
964
+ upc?: string;
965
+ gtin?: string;
966
+ customs?: {
967
+ /**
968
+ * 2 character country code
969
+ */
970
+ country_code_of_origin: 'US';
971
+ /**
972
+ * The customs code (6 digit)
973
+ * ie: “6103.22”
974
+ */
975
+ hs_tariff_code: string;
976
+ /**
977
+ * Value of object for customs (in USD)
978
+ * ie: “15”
979
+ */
980
+ value: string;
981
+ /**
982
+ * Description of product for customs purposes
983
+ */
984
+ description: string;
985
+ };
986
+ /**
987
+ * Not sure if these can be partially supplied.
988
+ */
989
+ return_preferences?: {
990
+ primary_action_id: Nullable<ReturnAction>;
991
+ backup_action_id: null;
992
+ /**
993
+ * Cannot be set when "primary_action_id" has certain values (ie: Quarantine)
994
+ * error: variants.return_preferences.instructions cannot be set for the selected primary action
995
+ */
996
+ instructions: Nullable<string>;
997
+ return_to_sender_primary_action_id: Nullable<ReturnAction>;
998
+ return_to_sender_backup_action_id: Nullable<ReturnAction>;
999
+ };
1000
+ lot_information: {
1001
+ /**
1002
+ * If the product should use lot date based picking
1003
+ */
1004
+ is_lot: boolean;
1005
+ minimum_shelf_life_days: Nullable<number>;
1006
+ };
1007
+ };
1008
+ export type GetProductQueryStrings = {
1009
+ Page: number;
1010
+ Limit: number;
1011
+ /**
1012
+ * Regular product (1) or Bundle (2)
1013
+ */
1014
+ productTypeId: 1 | 2;
1015
+ /**
1016
+ * Active (1) or Inactive (2)
1017
+ */
1018
+ variantStatus: 1 | 2;
1019
+ /**
1020
+ * True -> at least one variant is digital
1021
+ * False -> at least one variant is not-digital
1022
+ */
1023
+ hasDigitalVariants: boolean;
1024
+ /**
1025
+ * Search by one or more Product Ids (comma separated) to return multiple products
1026
+ */
1027
+ Ids: string;
1028
+ /**
1029
+ * Search by one or more Variant Ids (comma separated) to return multiple products
1030
+ */
1031
+ VariantIds: string;
1032
+ /**
1033
+ * Search by product barcode
1034
+ */
1035
+ barcode: string;
1036
+ /**
1037
+ * Search by an exact sku
1038
+ */
1039
+ sku: string;
1040
+ /**
1041
+ * Search for products that vary or non-varying products
1042
+ */
1043
+ hasVariants: boolean;
1044
+ /**
1045
+ * Search by one or more InventoryIds (comma separated) to return multiple barcodes
1046
+ */
1047
+ InventoryId: string;
1048
+ /**
1049
+ * Search by Variant Name.
1050
+ * NOTE: Query parameters should be URL encoded such as "Green%20Shirt"
1051
+ */
1052
+ Name: string;
1053
+ /**
1054
+ * Search by matching Taxonomy (category) of the product (comma separated)
1055
+ */
1056
+ TaxonomyIds: string;
1057
+ };
1058
+ export type ExperimentalPagedResult<T> = {
1059
+ /**
1060
+ * Will be null when there are no items
1061
+ */
1062
+ first: Nullable<string>;
1063
+ next: Nullable<string>;
1064
+ items: T[];
1065
+ prev: Nullable<string>;
1066
+ /**
1067
+ * Will be null when there are no items.
1068
+ */
1069
+ last: Nullable<string>;
1070
+ };
1071
+ export type GetInventory1_0Result = {
1072
+ id: number;
1073
+ name: string;
1074
+ is_digital: boolean;
1075
+ is_case_pick: boolean;
1076
+ is_lot: boolean;
1077
+ dimensions: {
1078
+ weight: number;
1079
+ length: number;
1080
+ width: number;
1081
+ depth: number;
1082
+ };
1083
+ /**
1084
+ * Total fulfillable quantity of this inventory item
1085
+ */
1086
+ total_fulfillable_quantity: number;
1087
+ /**
1088
+ * Total onhand quantity of this inventory item
1089
+ */
1090
+ total_onhand_quantity: number;
1091
+ /**
1092
+ * Total committed quantity of this inventory item
1093
+ */
1094
+ total_committed_quantity: number;
1095
+ /**
1096
+ * Total quantity that can be sold without overselling the inventory item. This is calculated by subtracting the total exception quantity from the fulfillable quantity.
1097
+ */
1098
+ total_sellable_quantity: number;
1099
+ /**
1100
+ * Total quantity in unreceived receiving orders for this inventory item
1101
+ */
1102
+ total_awaiting_quantity: number;
1103
+ /**
1104
+ * 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.
1105
+ */
1106
+ total_exception_quantity: number;
1107
+ /**
1108
+ * 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.
1109
+ */
1110
+ total_internal_transfer_quantity: number;
1111
+ /**
1112
+ * 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.
1113
+ */
1114
+ total_backordered_quantity: number;
1115
+ /**
1116
+ * Whether the inventory is active or not
1117
+ */
1118
+ is_active: boolean;
1119
+ /**
1120
+ * Fulfillable quantity of this inventory item broken down by fulfillment center location
1121
+ */
1122
+ fulfillable_quantity_by_fulfillment_center: {
1123
+ id: number;
1124
+ name: string;
1125
+ fulfillable_quantity: number;
1126
+ onhand_quantity: number;
1127
+ committed_quantity: number;
1128
+ awaiting_quantity: number;
1129
+ internal_transfer_quantity: number;
1130
+ }[];
1131
+ /**
1132
+ * Fulfillable quantity of this inventory item broken down by lot
1133
+ */
1134
+ fulfillable_quantity_by_lot: {
1135
+ lot_number: string;
1136
+ /**
1137
+ * ie: "2019-08-24T14:15:22Z"
1138
+ */
1139
+ expiration_date: string;
1140
+ fulfillable_quantity: number;
1141
+ onhand_quantity: number;
1142
+ committed_quantity: number;
1143
+ awaiting_quantity: number;
1144
+ internal_transfer_quantity: number;
1145
+ fulfillable_quantity_by_fulfillment_center: {
1146
+ id: number;
1147
+ name: string;
1148
+ fulfillable_quantity: number;
1149
+ onhand_quantity: number;
1150
+ committed_quantity: number;
1151
+ awaiting_quantity: number;
1152
+ internal_transfer_quantity: number;
1153
+ }[];
1154
+ }[];
1155
+ /**
1156
+ * ie: "None" "Fragile" "Foldable" "Stackable" "Book" "CustomPackaging" "CustomDunnage" "MarketingInsert" or "Poster"
1157
+ */
1158
+ packaging_attribute: 'None' | 'Fragile' | 'Foldable' | 'Stackable' | 'Book' | 'CustomPackaging' | 'CustomDunnage' | 'MarketingInsert' | 'Poster';
1159
+ };
630
1160
  /**
631
1161
  * Create API with PAT (personal access token) - defaults to sandbox endpoints and "SMA" channel.
632
1162
  *
@@ -637,11 +1167,18 @@ export type WarehouseReceivingOrderBoxesResponse = {
637
1167
  * @param personalAccessToken passing *undefined* or empty string has a guar clause that will throw
638
1168
  * @param apiBaseUrl
639
1169
  * @param channelApplicationName
1170
+ * @param options
640
1171
  * @returns
641
1172
  */
642
- export declare const createShipBobApi: (personalAccessToken: string | undefined, apiBaseUrl?: string, channelApplicationName?: string) => Promise<{
643
- getProductById: (productId: number) => Promise<DataResponse<GetProductResult>>;
644
- getProducts: (query: Partial<{
1173
+ export declare const createShipBobApi: (personalAccessToken: string | undefined, apiBaseUrl?: string, channelApplicationName?: string, options?: {
1174
+ logTraffic: boolean;
1175
+ }) => Promise<{
1176
+ /**
1177
+ * You would need a product id on your side. Not sure how useful this is in all practicality unless
1178
+ * you maintain the association on your side.
1179
+ */
1180
+ getProductById: (productId: number) => Promise<DataResponse<GetProduct1_0Result>>;
1181
+ getProducts1_0: (query: Partial<{
645
1182
  ReferenceIds: string;
646
1183
  Page: number;
647
1184
  Limit: number;
@@ -649,13 +1186,56 @@ export declare const createShipBobApi: (personalAccessToken: string | undefined,
649
1186
  Search: string;
650
1187
  ActiveStatus: "Any" | "Active" | "Inactive";
651
1188
  BundleStatus: "Any" | "Bundle" | "NotBundle";
652
- }>) => Promise<DataResponse<GetProductResult[]>>;
653
- addProduct: (product: {
1189
+ }>) => Promise<DataResponse<GetProduct1_0Result[]>>;
1190
+ /**
1191
+ * NOTE: you need to use the headers (part of this client response) to page the results.
1192
+ * page-number='1'
1193
+ * page-size='50'
1194
+ * total-count='1'
1195
+ * total-pages='1'
1196
+ *
1197
+ * NOTE: we can probably pass more than "variants" prop. We could on the /1.0/product endpoint
1198
+ * NOTE: This PATCH functionality will be available in the next version available in ShipBob next large release January 2025, it may require extra scope.
1199
+ */
1200
+ updateProduct2_0: (productId: number, variants: VariantRequestProduct2_0[]) => Promise<DataResponse<AddProductResponse>>;
1201
+ /**
1202
+ * Unsure how this is different from /2.0/product except for "barcode" -> "barcodes"
1203
+ */
1204
+ updateProductExperimental: (productId: number, variants: VariantRequestProductExperimental[]) => Promise<DataResponse<AddProductResponse>>;
1205
+ /**
1206
+ * Not supported here, but:
1207
+ * Some search filters allow for operators (equals, not equals, starts with, ends with, contains, etc) to get more exact values. When filtering with an operator, the query string will look like the below:
1208
+ * Example: /product?{filter}={operator}:{value}
1209
+ * Example: /product?sku=any:shirt-a,shirt-b,shirt-c Find products that match any of these SKUs
1210
+ * Example: /product?onHandQuantity=gt:0 Find products where OnHandQty greater than 0
1211
+ */
1212
+ getProducts2_0: (query: Partial<GetProductQueryStrings>) => Promise<DataResponse<GetProduct2_0Response[]>>;
1213
+ /**
1214
+ * Note sure how this is different from /2.0/product. Only notable difference is "barcodes" type from string to object.
1215
+ */
1216
+ getProductsExperimental: (query: Partial<GetProductQueryStrings>) => Promise<DataResponse<ExperimentalPagedResult<GetProductExperimentalResponse>>>;
1217
+ createProduct1_0: (product: {
654
1218
  reference_id: string;
655
1219
  sku: string;
656
1220
  name: string;
657
1221
  barcode: string;
658
1222
  }) => Promise<DataResponse<AddProductResponse>>;
1223
+ /**
1224
+ * The request part for variant is not accurate. This is just for testing - there are no official docs.
1225
+ */
1226
+ createProduct2_0: (product: {
1227
+ type_id: number;
1228
+ name: string;
1229
+ variants: VariantRequestProduct2_0[];
1230
+ }) => Promise<DataResponse<AddProductResponse>>;
1231
+ /**
1232
+ * Unsure how this is different from '2.0/product' except for "barcode" -> "barcodes"
1233
+ */
1234
+ createProductExperimental: (product: {
1235
+ type_id: number;
1236
+ name: string;
1237
+ variants: VariantRequestProductExperimental[];
1238
+ }) => Promise<DataResponse<AddProductResponse>>;
659
1239
  placeOrder: (order: PlaceOrderRequest) => Promise<DataResponse<PlaceOrderResponse>>;
660
1240
  /**
661
1241
  * Cancel single Order by Order Id
@@ -663,16 +1243,29 @@ export declare const createShipBobApi: (personalAccessToken: string | undefined,
663
1243
  * @param orderId The order Id to cancel
664
1244
  */
665
1245
  cancelSingleOrderByOrderId: (orderId: number) => Promise<DataResponse<CancelOrderResponse>>;
666
- getWebhooks: () => Promise<DataResponse<Webhook[][]>>;
667
- createWebhookSubscription: (webhook: Omit<Webhook, "id" | "created_at">) => Promise<DataResponse<Webhook>>;
1246
+ getShippingMethods: () => Promise<DataResponse<ShippingMethod[]>>;
1247
+ getWebhooks: () => Promise<DataResponse<Webhook[]>>;
1248
+ /**
1249
+ * NOTE: can consider option to add without providing channel id (would need matching unregister)
1250
+ */
1251
+ registerWebhookSubscription: (webhook: Omit<Webhook, "id" | "created_at">) => Promise<DataResponse<Webhook>>;
1252
+ /**
1253
+ * Can generate 500 response with data: "The wait operation timed out." If so, check your channel id matches.
1254
+ *
1255
+ * NOTE: can consider option to add without providing channel id (would need matching register)
1256
+ */
1257
+ unregisterWebhookSubscription: (id: number) => Promise<DataResponse<Webhook>>;
668
1258
  getFulfillmentCenters: () => Promise<DataResponse<FulfillmentCenter[]>>;
669
1259
  createWarehouseReceivingOrder: (request: WarehouseReceivingOrderRequest) => Promise<DataResponse<WarehouseReceivingOrderResponse>>;
670
1260
  getWarehouseReceivingOrder: (orderId: number) => Promise<DataResponse<WarehouseReceivingOrderResponse>>;
671
1261
  getWarehouseReceivingOrderBoxes: (orderId: number) => Promise<DataResponse<WarehouseReceivingOrderBoxesResponse>>;
1262
+ /**
1263
+ * NOTE: should verify that response matches 1.0 product endpoint
1264
+ */
672
1265
  getReceivingExtended: (query: Partial<{
673
1266
  Statuses: string;
674
1267
  ExternalSync: boolean;
675
- }>) => Promise<DataResponse<GetProductResult[]>>;
1268
+ }>) => Promise<DataResponse<GetProduct1_0Result[]>>;
676
1269
  /**
677
1270
  * This must be for setting/clearing if it has been synced externally.
678
1271
  *
@@ -681,6 +1274,9 @@ export declare const createShipBobApi: (personalAccessToken: string | undefined,
681
1274
  * NOTE: this is tagged experimental, so might change or be dropped
682
1275
  */
683
1276
  experimentalReceivingSetExternalSync: (ids: number[], isExternalSync: boolean) => Promise<DataResponse<SetExternalSyncResponse>>;
1277
+ /**
1278
+ * NOTE: should verify the response type matches the product 1.0 endpoint
1279
+ */
684
1280
  listInventory: (query: Partial<{
685
1281
  /**
686
1282
  * Page of inventory items to get
@@ -712,7 +1308,7 @@ export declare const createShipBobApi: (personalAccessToken: string | undefined,
712
1308
  * LocationType is valid for hub, spoke, or lts. LocationType will default to all locations.
713
1309
  */
714
1310
  LocationType: string;
715
- }>) => Promise<DataResponse<GetProductResult[]>>;
1311
+ }>) => Promise<DataResponse<GetInventory1_0Result[]>>;
716
1312
  /**
717
1313
  * Only for sandbox: https://developer.shipbob.com/sandbox-simulations/
718
1314
  *
@@ -727,3 +1323,4 @@ export declare const createShipBobApi: (personalAccessToken: string | undefined,
727
1323
  */
728
1324
  getSimulationStatus: (simulationId: string) => Promise<DataResponse<SimulationResponse>>;
729
1325
  }>;
1326
+ export {};