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/README.md CHANGED
@@ -3,15 +3,23 @@ First of all there are no official SDKs for ShipBob. I'm just dropping this her
3
3
 
4
4
  These is just a starting point for anybody looking to integrate ShipBob into a Node.js application.
5
5
 
6
- You could make it run in the browser by replacing `https` with `fetch` or `axios`. I could have used fetch as well, but in case somebody is on Node < v18 (and it wasn't stable till v21 anyway).
6
+ It uses the built-in node.js fetch.
7
7
 
8
- This is not an official or supported library. If you extend or have any issues kindly open a PR. Not really sure anybody will ever need this as most common platforms probably have built-in support.
8
+ Not really sure anybody will ever need this as most common platforms probably have integrations. There are a couple of other community SDKs. They do not have 2.0 endpoints:
9
+ - [shipbob-sdk-python](https://github.com/community-phone-company/shipbob-sdk-python)
10
+ - [shipbob-go](https://github.com/stryd/shipbob-go) - generated from Open API
9
11
 
10
12
  NOTE: I did not notice until all this code was written that ShipBob had published an Open API spec :facepunch:. You may have better luck generating your own client.
11
13
  ```bash
12
14
  $ yarn generate:client
13
15
  ```
14
- The included script using OpenAPI to generate clients in various languages. It's generating TypeScript. This SDK exposes some endpoints not available in the OpenAPI - the `2.0/receiving-extended` and `experimental/receiving` endpoints.
16
+ The included script using OpenAPI can generate clients in various languages.
17
+
18
+ This SDK exposes some endpoints not available in the OpenAPI including:
19
+ - `/2.0/receiving-extended`
20
+ - `/2.0/product`
21
+ - `/experimental/product` :skull:
22
+ - `/experimental/receiving` :skull:
15
23
 
16
24
  Have a look in the `/test` folder. You might like more something like PostMan, but you can run and debug these "tests" in VS Code. You need a `.env` file with a Personal Access Token:
17
25
  ```
@@ -21,68 +29,89 @@ SHIPBOB_API_TOKEN=<redacted>
21
29
  # API implementation progress
22
30
 
23
31
  ## Legend
24
- > [x] = I haven't needed this
32
+ :x: = I haven't needed this
25
33
 
26
- > [✓] = implemented
34
+ :heavy_check_mark: = implemented
27
35
 
28
- > [ ] = intend to add
36
+ - [ ] = intend to add
29
37
 
30
- > [?] = might add support soon - under investigation
38
+ :question: = might add support soon - under investigation
31
39
 
32
40
  ## Orders
33
- - [x] Estimate Fulfillment Cost For Order
34
- - [?] Get Order
35
- - [?] Get Orders
36
- - [✓] Create Order: api.placeOrder(...)
37
- - [✓] Cancel single Order by Order ID: api.cancelSingleOrderByOrderId()
38
- - [x] Get Order Store Json
39
- - [x] Save the Store Order Json (The JSON that represent the order on the Third Party Source)
40
- - [x] Get one Shipment by Order Id and Shipment Id
41
- - [x] Cancel one Shipment by Order Id and Shipment Id
42
- - [x] Get one Shipment's status timeline by Order Id and Shipment Id
43
- - [?] Get all Shipments for Order
44
- - [x] Get logs for one Shipment by Order Id and Shipment Id
41
+ - :x: Estimate Fulfillment Cost For Order
42
+ - :question: Get Order
43
+ - :question: Get Orders
44
+ - :heavy_check_mark: Create Order: api.placeOrder(...)
45
+ - :heavy_check_mark: Cancel single Order by Order ID: api.cancelSingleOrderByOrderId()
46
+ - :x: Get Order Store Json
47
+ - :x: Save the Store Order Json (The JSON that represent the order on the Third Party Source)
48
+ - :x: Get one Shipment by Order Id and Shipment Id
49
+ - :x: Cancel one Shipment by Order Id and Shipment Id
50
+ - :x: Get one Shipment's status timeline by Order Id and Shipment Id
51
+ - :question: Get all Shipments for Order
52
+ - :x: Get logs for one Shipment by Order Id and Shipment Id
53
+ - :x: Get one Shipment by Shipment Id
54
+ - :x: Update a Shipment
55
+ - :x: Cancel one Shipment by Shipment Id
56
+ - :x: Cancel multiple Shipments by Shipment Id
57
+ - :x: Get one Shipment's status timeline by Shipment Id
58
+ - :x: Get logs for one Shipment by Shipment Id
59
+ - :heavy_check_mark: Get shipping methods: api.getShippingMethods()
45
60
 
46
61
  ## Shipments
47
- - [?] Get one Shipment by Shipment Id (webhooks are enough?)
48
- - [?] Update a Shipment (marked with tracking information uploaded to a third-party system where the order originated)
49
- - [?] Cancel one Shipment by Shipment Id
50
- - [x] Cancel multiple Shipments by Shipment Id
51
- - [x] Get one Shipment's status timeline by Shipment Id
52
- - [x] Get logs for one Shipment by Shipment Id
53
- - [?] Get shipping methods (hard-code shipping methods?)
54
-
55
- ## Products
56
- - [✓] Get multiple products: api.getProducts(...)
57
- - [✓] Add a single product to the store: api.addProduct(...)
58
- - [ ] Modify a single product (we will need this to add multiple barcodes)
59
- - [x] Add multiple products to the store
62
+ - :question: Get one Shipment by Shipment Id (webhooks are enough?)
63
+ - :question: Update a Shipment (marked with tracking information uploaded to a third-party system where the order originated)
64
+ - :question: Cancel one Shipment by Shipment Id
65
+ - :x: Cancel multiple Shipments by Shipment Id
66
+ - :x: Get one Shipment's status timeline by Shipment Id
67
+ - :x: Get logs for one Shipment by Shipment Id
68
+ - :question: Get shipping methods (hard-code shipping methods?)
69
+
70
+ ## Products 1.0
71
+ - :heavy_check_mark: Get multiple products: api.getProducts1_0(...)
72
+ - :heavy_check_mark: Add a single product to the store: api.createProduct1_0(...)
73
+ - :x: Modify a single product (using 2.0 for additional properties)
74
+ - :x: Add multiple products to the store
75
+
76
+ ## Products 2.0
77
+ These are not documented on the site yet:
78
+ - :heavy_check_mark: Get multiple products: api.getProducts2_0(...)
79
+ - :heavy_check_mark: Add a single product to the store: api.createProduct2_0(...)
80
+ - :heavy_check_mark: Modify a single product: api.updateProducts2_0(...)
81
+ - :x: Add multiple products to the store
82
+
83
+ ## Products Experimental
84
+ Kindly note as it's experimental subject to change/removal :skull:
85
+ - :heavy_check_mark: Get multiple products: api.getProductsExperimental(...)
86
+ - :heavy_check_mark: Add a single product to the store: api.createProductExperimental(...)
87
+ - :heavy_check_mark: Modify a single product: api.updateProductsExperimental(...)
88
+ - :x: Add multiple products to the store
60
89
 
61
90
  ## Inventory
62
91
  - [ ] Get an inventory item
63
- - [✓] List inventory items: api.listInventory(...)
64
- - [x] Get a list of inventory items by product id (we don't know product_id)
92
+ - :heavy_check_mark: List inventory items: api.listInventory(...)
93
+ - :x: Get a list of inventory items by product id (we don't know product_id)
65
94
 
66
95
  ## Channels
67
- - [✓] Get user-authorized channel info: not in api, but used on init
96
+ - :heavy_check_mark: Get user-authorized channel info: not in api, but used on init
68
97
 
69
98
  ## Returns
70
- - [?] Get Return Order
71
- - [?] Modify Return Order
72
- - [?] Get Return Orders
73
- - [?] Create Return Order
74
- - [?] Cancel Return Order
75
- - [?] Get One Return's status history
99
+ - :question: Get Return Order
100
+ - :question: Modify Return Order
101
+ - :question: Get Return Orders
102
+ - :question: Create Return Order
103
+ - :question: Cancel Return Order
104
+ - :question: Get One Return's status history
76
105
 
77
106
  ## Receiving
78
- - [x] Get Fulfillment Centers
79
- - [✓] Get Warehouse Receiving Order
80
- - [✓] Get Warehouse Receiving Order Boxes
81
- - [ ] Get Multiple Warehouse Receiving Orders (we probably need this to filter by statuses)
82
- - [✓] Create Warehouse Receiving Order: api.createWarehouseReceivingOrder(...)
83
- - [x] Get Warehouse Receiving Order Box Labels
84
- - [x] Cancel Warehouse Receiving Order (could be done manually, if needed?)
85
- - [x] 5 x DEPRECATED '/1.0/receiving
107
+ - :heavy_check_mark: Get Fulfillment Centers: api.getFulfillmentCenters()
108
+ - :heavy_check_mark: Get Warehouse Receiving Order
109
+ - :heavy_check_mark: Get Warehouse Receiving Order Boxes
110
+ - [ ] Get Multiple Warehouse Receiving Orders (we will need this to filter by statuses - will include this in a recipe that uses SetExternalSync)
111
+ - :heavy_check_mark: Create Warehouse Receiving Order: api.createWarehouseReceivingOrder(...)
112
+ - :x: Get Warehouse Receiving Order Box Labels
113
+ - :x: Cancel Warehouse Receiving Order (could be done manually, if needed?)
114
+ - :x: 5 x DEPRECATED '/1.0/receiving
86
115
  - Get Warehouse Receiving Order
87
116
  - Get a Warehouse Receiving Order by Purchase Order Number
88
117
  - Create Warehouse Receiving Order
@@ -90,15 +119,20 @@ SHIPBOB_API_TOKEN=<redacted>
90
119
  - Cancel Warehouse Receiving Order
91
120
 
92
121
  ## Receiving-Extended (not in API docs)
93
- - [✓] Get Receiving Extended: api.getReceivingExtended(...)
122
+ - :heavy_check_mark: Get Receiving Extended: api.getReceivingExtended(...)
123
+
124
+ ## Receiving Experimental
125
+ Kindly note as it's experimental subject to change/removal :skull:
94
126
 
95
- ## Experimental/receiving (not in API docs. can change/be removed)
96
- - [✓] Receiving Set External Sync: api.experimentalReceivingSetExternalSync(...)
127
+ I'll try to share a recipe for using this for marking completed WROs.
128
+ - :heavy_check_mark: Receiving Set External Sync: api.experimentalReceivingSetExternalSync(...)
97
129
 
98
130
  ## Webhooks
99
- - [✓] Get Webhooks: api.getWebhooks()
100
- - [✓] Create a new webhook subscription: api.createWebhookSubscription(...)
101
- - [ ] Delete an existing webhook subscription
131
+ - :heavy_check_mark: Get Webhooks: api.getWebhooks()
132
+ - :heavy_check_mark: Create a new webhook subscription: api.registerWebhookSubscription(...)
133
+ - :heavy_check_mark: Delete an existing webhook subscription: api.unregisterWebhookSubscription(...)
102
134
 
103
135
  ## Locations
104
- - [x] Get locations
136
+ - :x: Get locations
137
+
138
+ For making changes locally - use `yarn link` to test out the changes easily.