Skip to content

Commit 4e48172

Browse files
authored
Merge pull request #109 from erincdustin/6.0.5
6.0.5
2 parents 65f8888 + ebc54f8 commit 4e48172

6 files changed

Lines changed: 152 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ All notable changes to the ordercloud-javascript-sdk will be documented in this
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
# [6.0.5] - 2024-03-28
9+
- Bring SDK up to date with API [v1.0.332](https://ordercloud.io/release-notes/v1.0.332), which adds Suppliers to Entity Sync
10+
811
# [6.0.4] - 2024-03-20
912
### Fixed
1013
- Error when trying to set token in edge runtime because trying to use document in server environment

docs/assets/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/classes/Resources.EntitySynchronization.html

Lines changed: 82 additions & 14 deletions
Large diffs are not rendered by default.

docs/variables/EntitySynchronization.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<h1>Variable EntitySynchronization</h1></div>
1818
<div class="tsd-signature">Entity<wbr/>Synchronization<span class="tsd-signature-symbol">:</span> <a href="../classes/Resources.EntitySynchronization.html" class="tsd-signature-type" data-tsd-kind="Class">EntitySynchronization</a></div><aside class="tsd-sources">
1919
<ul>
20-
<li>Defined in <a href="https://github.com/ordercloud-api/ordercloud-javascript-sdk/blob/master/src/api/EntitySynchronization.ts#L287">api/EntitySynchronization.ts:287</a></li></ul></aside></div>
20+
<li>Defined in <a href="https://github.com/ordercloud-api/ordercloud-javascript-sdk/blob/master/src/api/EntitySynchronization.ts#L351">api/EntitySynchronization.ts:351</a></li></ul></aside></div>
2121
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
2222
<div class="tsd-navigation settings">
2323
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ordercloud-javascript-sdk",
33
"description": "The offical Javascript SDK for the Ordercloud ecommerce API",
44
"author": "Four51 OrderCloud",
5-
"version": "6.0.4",
5+
"version": "6.0.5",
66
"main": "dist/index.js",
77
"umd:main": "dist/index.umd.js",
88
"module": "dist/index.esm.js",

src/api/EntitySynchronization.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ class EntitySynchronization {
2222
this.GetCategories = this.GetCategories.bind(this);
2323
this.SaveCategories = this.SaveCategories.bind(this);
2424
this.DeleteCategories = this.DeleteCategories.bind(this);
25+
this.GetSuppliersEntitySyncConfig = this.GetSuppliersEntitySyncConfig.bind(this);
26+
this.SaveSuppliersEntitySyncConfig = this.SaveSuppliersEntitySyncConfig.bind(this);
27+
this.DeleteSuppliersEntitySyncConfig = this.DeleteSuppliersEntitySyncConfig.bind(this);
2528
this.GetSupplierUsersEntitySyncConfig = this.GetSupplierUsersEntitySyncConfig.bind(this);
2629
this.SaveSupplierUsersEntitySyncConfig = this.SaveSupplierUsersEntitySyncConfig.bind(this);
2730
this.DeleteSupplierUsersEntitySyncConfig = this.DeleteSupplierUsersEntitySyncConfig.bind(this);
@@ -210,6 +213,67 @@ class EntitySynchronization {
210213
})
211214
}
212215

216+
/**
217+
* Get the entity sync delivery configuration for Suppliers Get the entity sync delivery configuration for Suppliers
218+
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/get-suppliers-entity-sync-config|api docs} for more info
219+
*
220+
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
221+
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
222+
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
223+
*/
224+
public async GetSuppliersEntitySyncConfig<TEntitySyncConfig extends EntitySyncConfig>(requestOptions: RequestOptions = {} ): Promise<RequiredDeep<TEntitySyncConfig>>{
225+
const impersonating = this.impersonating;
226+
this.impersonating = false;
227+
return await http.get(`/integrations/entitysync/suppliers`, { ...requestOptions, impersonating, } )
228+
.catch(ex => {
229+
if(ex.response) {
230+
throw new OrderCloudError(ex)
231+
}
232+
throw ex;
233+
})
234+
}
235+
236+
/**
237+
* Create or update the entity sync delivery configuration for Suppliers Create or update the entity sync delivery configuration for Suppliers
238+
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/save-suppliers-entity-sync-config|api docs} for more info
239+
*
240+
* @param entitySyncConfig Required fields: DeliveryConfigID
241+
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
242+
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
243+
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
244+
*/
245+
public async SaveSuppliersEntitySyncConfig<TEntitySyncConfig extends EntitySyncConfig>(entitySyncConfig: EntitySyncConfig,requestOptions: RequestOptions = {} ): Promise<RequiredDeep<TEntitySyncConfig>>{
246+
const impersonating = this.impersonating;
247+
this.impersonating = false;
248+
return await http.put(`/integrations/entitysync/suppliers`, { ...requestOptions, data: entitySyncConfig, impersonating, } )
249+
.catch(ex => {
250+
if(ex.response) {
251+
throw new OrderCloudError(ex)
252+
}
253+
throw ex;
254+
})
255+
}
256+
257+
/**
258+
* Delete the entity sync delivery configuration for Suppliers Delete the entity sync delivery configuration for Suppliers
259+
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/delete-suppliers-entity-sync-config|api docs} for more info
260+
*
261+
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
262+
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
263+
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
264+
*/
265+
public async DeleteSuppliersEntitySyncConfig(requestOptions: RequestOptions = {} ): Promise<void>{
266+
const impersonating = this.impersonating;
267+
this.impersonating = false;
268+
return await http.delete(`/integrations/entitysync/suppliers`, { ...requestOptions, impersonating, } )
269+
.catch(ex => {
270+
if(ex.response) {
271+
throw new OrderCloudError(ex)
272+
}
273+
throw ex;
274+
})
275+
}
276+
213277
/**
214278
* Get the entity sync delivery configuration for SupplierUsers Get the entity sync delivery configuration for SupplierUsers
215279
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/get-supplier-users-entity-sync-config|api docs} for more info

0 commit comments

Comments
 (0)