ordercloud-javascript-sdk
Version:
The offical Javascript SDK for the Ordercloud ecommerce API
70 lines (69 loc) • 4.48 kB
TypeScript
import { ErrorConfig } from '../models/ErrorConfig';
import { PartialDeep } from '../models/PartialDeep';
import { RequiredDeep } from '../models/RequiredDeep';
import { RequestOptions } from '../models/RequestOptions';
declare class ErrorConfigs {
private impersonating;
/**
* @ignore
* not part of public api, don't include in generated docs
*/
constructor();
/**
* Retrieve an error config
* Check out the {@link https://ordercloud.io/api-reference/integrations/error-configs/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<TErrorConfig extends ErrorConfig>(requestOptions?: RequestOptions): Promise<RequiredDeep<TErrorConfig>>;
/**
* Create or update an error config If an object with the same ID already exists, it will be overwritten.
* Check out the {@link https://ordercloud.io/api-reference/integrations/error-configs/save|api docs} for more info
*
* @param errorConfig 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<TErrorConfig extends ErrorConfig>(errorConfig: ErrorConfig, requestOptions?: RequestOptions): Promise<RequiredDeep<TErrorConfig>>;
/**
* Delete an error config
* Check out the {@link https://ordercloud.io/api-reference/integrations/error-configs/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 error config
* Check out the {@link https://ordercloud.io/api-reference/integrations/error-configs/patch|api docs} for more info
*
* @param errorConfig
* @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<TErrorConfig extends ErrorConfig>(errorConfig: PartialDeep<ErrorConfig>, requestOptions?: RequestOptions): Promise<RequiredDeep<TErrorConfig>>;
/**
* Validates an error config
* Check out the {@link https://ordercloud.io/api-reference/integrations/error-configs/validate|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.
*/
Validate(requestOptions?: RequestOptions): Promise<void>;
/**
* @description
* enables impersonation by calling the subsequent method with the stored impersonation token
*
* @example
* ErrorConfigs.As().List() // lists ErrorConfigs using the impersonated users' token
*/
As(): this;
}
declare const _default: ErrorConfigs;
export default _default;