shipbob-node-sdk 0.0.3 → 0.0.5

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
@@ -5,13 +5,21 @@ These is just a starting point for anybody looking to integrate ShipBob into a N
5
5
 
6
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,75 +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 - don't see the point of this endpoint, unless you store their Ids
43
+ - :heavy_check_mark: Get Orders: api.getOrders(...)
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?)
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?)
54
69
 
55
70
  ## Products 1.0
56
- - [✓] Get multiple products: api.getProducts1_0(...)
57
- - [✓] Add a single product to the store: api.createProduct1_0(...)
58
- - [x] Modify a single product (using 2.0 for additional properties)
59
- - [x] Add multiple products to the store
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
60
75
 
61
76
  ## Products 2.0
62
- These are not documented on the site yet.
63
- - [✓] Get multiple products: api.getProducts2_0(...)
64
- - [✓] Add a single product to the store: api.createProduct2_0(...)
65
- - [✓] Modify a single product: api.updateProducts2_0(..,)
66
- - [x] Add multiple products to the store
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
67
89
 
68
90
  ## Inventory
69
91
  - [ ] Get an inventory item
70
- - [✓] List inventory items: api.listInventory(...)
71
- - [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)
72
94
 
73
95
  ## Channels
74
- - [✓] 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
75
97
 
76
98
  ## Returns
77
- - [?] Get Return Order
78
- - [?] Modify Return Order
79
- - [?] Get Return Orders
80
- - [?] Create Return Order
81
- - [?] Cancel Return Order
82
- - [?] 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
83
105
 
84
106
  ## Receiving
85
- - [x] Get Fulfillment Centers
86
- - [✓] Get Warehouse Receiving Order
87
- - [✓] Get Warehouse Receiving Order Boxes
88
- - [ ] Get Multiple Warehouse Receiving Orders (we probably need this to filter by statuses)
89
- - [✓] Create Warehouse Receiving Order: api.createWarehouseReceivingOrder(...)
90
- - [x] Get Warehouse Receiving Order Box Labels
91
- - [x] Cancel Warehouse Receiving Order (could be done manually, if needed?)
92
- - [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
93
115
  - Get Warehouse Receiving Order
94
116
  - Get a Warehouse Receiving Order by Purchase Order Number
95
117
  - Create Warehouse Receiving Order
@@ -97,15 +119,20 @@ These are not documented on the site yet.
97
119
  - Cancel Warehouse Receiving Order
98
120
 
99
121
  ## Receiving-Extended (not in API docs)
100
- - [✓] 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:
101
126
 
102
- ## Experimental/receiving (not in API docs. can change/be removed)
103
- - [✓] 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(...)
104
129
 
105
130
  ## Webhooks
106
- - [✓] Get Webhooks: api.getWebhooks()
107
- - [✓] Create a new webhook subscription: api.createWebhookSubscription(...)
108
- - [ ] 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(...)
109
134
 
110
135
  ## Locations
111
- - [x] Get locations
136
+ - :x: Get locations
137
+
138
+ For making changes locally - use `yarn link` to test out the changes easily.