UNPKG

ordercloud-javascript-sdk

Version:

The offical Javascript SDK for the Ordercloud ecommerce API

32 lines (31 loc) 1.55 kB
import { RequiredDeep } from '../models/RequiredDeep'; import { RequestOptions } from '../models/RequestOptions'; import { PublicKey } from '../models/PublicKey'; declare class Certs { private impersonating; /** * @ignore * not part of public api, don't include in generated docs */ constructor(); /** * Get a single cert public key. Returns a JSON Web Key (JWK). Can be used for validating the token was signed by OrderCloud. * Check out the {@link https://ordercloud.io/api-reference/authentication-and-authorization/certs/get-public-key|api docs} for more info * * @param ID ID of the public key. * @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. */ GetPublicKey<TPublicKey extends PublicKey>(ID: string, requestOptions?: RequestOptions): Promise<RequiredDeep<TPublicKey>>; /** * @description * enables impersonation by calling the subsequent method with the stored impersonation token * * @example * Certs.As().List() // lists Certs using the impersonated users' token */ As(): this; } declare const _default: Certs; export default _default;