UNPKG

ordercloud-javascript-sdk

Version:

The offical Javascript SDK for the Ordercloud ecommerce API

61 lines (60 loc) 4.07 kB
import { InventoryIntegration } from '../models/InventoryIntegration'; import { PartialDeep } from '../models/PartialDeep'; import { RequiredDeep } from '../models/RequiredDeep'; import { RequestOptions } from '../models/RequestOptions'; declare class InventoryIntegrations { private impersonating; /** * @ignore * not part of public api, don't include in generated docs */ constructor(); /** * Retrieve an inventory integration * Check out the {@link https://ordercloud.io/api-reference/integrations/inventory-integrations/get|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. */ Get<TInventoryIntegration extends InventoryIntegration>(requestOptions?: RequestOptions): Promise<RequiredDeep<TInventoryIntegration>>; /** * Create or update an inventory integration If an object with the same ID already exists, it will be overwritten. * Check out the {@link https://ordercloud.io/api-reference/integrations/inventory-integrations/save|api docs} for more info * * @param inventoryIntegration 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. */ Save<TInventoryIntegration extends InventoryIntegration>(inventoryIntegration: InventoryIntegration, requestOptions?: RequestOptions): Promise<RequiredDeep<TInventoryIntegration>>; /** * Delete an inventory integration * Check out the {@link https://ordercloud.io/api-reference/integrations/inventory-integrations/delete|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. */ Delete(requestOptions?: RequestOptions): Promise<void>; /** * Partially update an inventory integration * Check out the {@link https://ordercloud.io/api-reference/integrations/inventory-integrations/patch|api docs} for more info * * @param inventoryIntegration * @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. */ Patch<TInventoryIntegration extends InventoryIntegration>(inventoryIntegration: PartialDeep<InventoryIntegration>, requestOptions?: RequestOptions): Promise<RequiredDeep<TInventoryIntegration>>; /** * @description * enables impersonation by calling the subsequent method with the stored impersonation token * * @example * InventoryIntegrations.As().List() // lists InventoryIntegrations using the impersonated users' token */ As(): this; } declare const _default: InventoryIntegrations; export default _default;