Skip to content

Commit

Permalink
Merge pull request #107 from erincdustin/6.0.3
Browse files Browse the repository at this point in the history
6.0.3
  • Loading branch information
erincdustin authored Mar 19, 2024
2 parents 334b814 + f93d9ff commit fbff894
Show file tree
Hide file tree
Showing 6 changed files with 407 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ All notable changes to the ordercloud-javascript-sdk will be documented in this
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [6.0.3] - 2024-03-19
- Bring SDK up to date with API [v1.0.328](https://ordercloud.io/release-notes/v1.0.328), which adds Admin, Buyer and Supplier users to Entity Sync

# [6.0.2] - 2024-03-13
- Bring SDK up to date with API [v1.0.327](https://ordercloud.io/release-notes/v1.0.327)

Expand Down
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

214 changes: 209 additions & 5 deletions docs/classes/Resources.EntitySynchronization.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/variables/EntitySynchronization.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1>Variable EntitySynchronization</h1></div>
<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">
<ul>
<li>Defined in <a href="https://github.com/ordercloud-api/ordercloud-javascript-sdk/blob/master/src/api/EntitySynchronization.ts#L95">api/EntitySynchronization.ts:95</a></li></ul></aside></div>
<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>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ordercloud-javascript-sdk",
"description": "The offical Javascript SDK for the Ordercloud ecommerce API",
"author": "Four51 OrderCloud",
"version": "6.0.2",
"version": "6.0.3",
"main": "dist/index.js",
"umd:main": "dist/index.umd.js",
"module": "dist/index.esm.js",
Expand Down
192 changes: 192 additions & 0 deletions src/api/EntitySynchronization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,140 @@ class EntitySynchronization {
* not part of public api, don't include in generated docs
*/
constructor() {
this.GetAdminUsersEntitySyncConfig = this.GetAdminUsersEntitySyncConfig.bind(this);
this.SaveAdminUsersEntitySyncConfig = this.SaveAdminUsersEntitySyncConfig.bind(this);
this.DeleteAdminUsersEntitySyncConfig = this.DeleteAdminUsersEntitySyncConfig.bind(this);
this.GetBuyerUsersEntitySyncConfig = this.GetBuyerUsersEntitySyncConfig.bind(this);
this.SaveBuyerUsersEntitySyncConfig = this.SaveBuyerUsersEntitySyncConfig.bind(this);
this.DeleteBuyerUsersEntitySyncConfig = this.DeleteBuyerUsersEntitySyncConfig.bind(this);
this.GetCategories = this.GetCategories.bind(this);
this.SaveCategories = this.SaveCategories.bind(this);
this.DeleteCategories = this.DeleteCategories.bind(this);
this.GetSupplierUsersEntitySyncConfig = this.GetSupplierUsersEntitySyncConfig.bind(this);
this.SaveSupplierUsersEntitySyncConfig = this.SaveSupplierUsersEntitySyncConfig.bind(this);
this.DeleteSupplierUsersEntitySyncConfig = this.DeleteSupplierUsersEntitySyncConfig.bind(this);
}

/**
* Get the entity sync delivery configuration for AdminUsers Get the entity sync delivery configuration for AdminUsers
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/get-admin-users-entity-sync-config|api docs} for more info
*
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
public async GetAdminUsersEntitySyncConfig<TEntitySyncConfig extends EntitySyncConfig>(requestOptions: RequestOptions = {} ): Promise<RequiredDeep<TEntitySyncConfig>>{
const impersonating = this.impersonating;
this.impersonating = false;
return await http.get(`/integrations/entitysync/adminusers`, { ...requestOptions, impersonating, } )
.catch(ex => {
if(ex.response) {
throw new OrderCloudError(ex)
}
throw ex;
})
}

/**
* Create or update the entity sync delivery configuration for AdminUsers Create or update the entity sync delivery configuration for AdminUsers
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/save-admin-users-entity-sync-config|api docs} for more info
*
* @param entitySyncConfig Required fields: DeliveryConfigID
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
public async SaveAdminUsersEntitySyncConfig<TEntitySyncConfig extends EntitySyncConfig>(entitySyncConfig: EntitySyncConfig,requestOptions: RequestOptions = {} ): Promise<RequiredDeep<TEntitySyncConfig>>{
const impersonating = this.impersonating;
this.impersonating = false;
return await http.put(`/integrations/entitysync/adminusers`, { ...requestOptions, data: entitySyncConfig, impersonating, } )
.catch(ex => {
if(ex.response) {
throw new OrderCloudError(ex)
}
throw ex;
})
}

/**
* Delete the entity sync delivery configuration for AdminUsers Delete the entity sync delivery configuration for AdminUsers
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/delete-admin-users-entity-sync-config|api docs} for more info
*
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
public async DeleteAdminUsersEntitySyncConfig(requestOptions: RequestOptions = {} ): Promise<void>{
const impersonating = this.impersonating;
this.impersonating = false;
return await http.delete(`/integrations/entitysync/adminusers`, { ...requestOptions, impersonating, } )
.catch(ex => {
if(ex.response) {
throw new OrderCloudError(ex)
}
throw ex;
})
}

/**
* Get the entity sync delivery configuration for BuyerUsers Get the entity sync delivery configuration for BuyerUsers
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/get-buyer-users-entity-sync-config|api docs} for more info
*
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
public async GetBuyerUsersEntitySyncConfig<TEntitySyncConfig extends EntitySyncConfig>(requestOptions: RequestOptions = {} ): Promise<RequiredDeep<TEntitySyncConfig>>{
const impersonating = this.impersonating;
this.impersonating = false;
return await http.get(`/integrations/entitysync/buyers/users`, { ...requestOptions, impersonating, } )
.catch(ex => {
if(ex.response) {
throw new OrderCloudError(ex)
}
throw ex;
})
}

/**
* Create or update the entity sync delivery configuration for BuyerUsers Create or update the entity sync delivery configuration for BuyerUsers
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/save-buyer-users-entity-sync-config|api docs} for more info
*
* @param entitySyncConfig Required fields: DeliveryConfigID
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
public async SaveBuyerUsersEntitySyncConfig<TEntitySyncConfig extends EntitySyncConfig>(entitySyncConfig: EntitySyncConfig,requestOptions: RequestOptions = {} ): Promise<RequiredDeep<TEntitySyncConfig>>{
const impersonating = this.impersonating;
this.impersonating = false;
return await http.put(`/integrations/entitysync/buyers/users`, { ...requestOptions, data: entitySyncConfig, impersonating, } )
.catch(ex => {
if(ex.response) {
throw new OrderCloudError(ex)
}
throw ex;
})
}

/**
* Delete the entity sync delivery configuration for BuyerUsers Delete the entity sync delivery configuration for BuyerUsers
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/delete-buyer-users-entity-sync-config|api docs} for more info
*
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
public async DeleteBuyerUsersEntitySyncConfig(requestOptions: RequestOptions = {} ): Promise<void>{
const impersonating = this.impersonating;
this.impersonating = false;
return await http.delete(`/integrations/entitysync/buyers/users`, { ...requestOptions, impersonating, } )
.catch(ex => {
if(ex.response) {
throw new OrderCloudError(ex)
}
throw ex;
})
}

/**
Expand Down Expand Up @@ -79,6 +210,67 @@ class EntitySynchronization {
})
}

/**
* Get the entity sync delivery configuration for SupplierUsers Get the entity sync delivery configuration for SupplierUsers
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/get-supplier-users-entity-sync-config|api docs} for more info
*
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
public async GetSupplierUsersEntitySyncConfig<TEntitySyncConfig extends EntitySyncConfig>(requestOptions: RequestOptions = {} ): Promise<RequiredDeep<TEntitySyncConfig>>{
const impersonating = this.impersonating;
this.impersonating = false;
return await http.get(`/integrations/entitysync/suppliers/users`, { ...requestOptions, impersonating, } )
.catch(ex => {
if(ex.response) {
throw new OrderCloudError(ex)
}
throw ex;
})
}

/**
* Create or update the entity sync delivery configuration for SupplierUsers Create or update the entity sync delivery configuration for SupplierUsers
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/save-supplier-users-entity-sync-config|api docs} for more info
*
* @param entitySyncConfig Required fields: DeliveryConfigID
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
public async SaveSupplierUsersEntitySyncConfig<TEntitySyncConfig extends EntitySyncConfig>(entitySyncConfig: EntitySyncConfig,requestOptions: RequestOptions = {} ): Promise<RequiredDeep<TEntitySyncConfig>>{
const impersonating = this.impersonating;
this.impersonating = false;
return await http.put(`/integrations/entitysync/suppliers/users`, { ...requestOptions, data: entitySyncConfig, impersonating, } )
.catch(ex => {
if(ex.response) {
throw new OrderCloudError(ex)
}
throw ex;
})
}

/**
* Delete the entity sync delivery configuration for SupplierUsers Delete the entity sync delivery configuration for SupplierUsers
* Check out the {@link https://ordercloud.io/api-reference/integrations/entity-synchronization/delete-supplier-users-entity-sync-config|api docs} for more info
*
* @param requestOptions.accessToken Provide an alternative token to the one stored in the sdk instance (useful for impersonation).
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
*/
public async DeleteSupplierUsersEntitySyncConfig(requestOptions: RequestOptions = {} ): Promise<void>{
const impersonating = this.impersonating;
this.impersonating = false;
return await http.delete(`/integrations/entitysync/suppliers/users`, { ...requestOptions, impersonating, } )
.catch(ex => {
if(ex.response) {
throw new OrderCloudError(ex)
}
throw ex;
})
}

/**
* @description
* enables impersonation by calling the subsequent method with the stored impersonation token
Expand Down

0 comments on commit fbff894

Please sign in to comment.