UNPKG

@shipengine/connect-order-source-api

Version:

This is the typescript/javascript definitions for the order source api

29 lines (28 loc) 1.71 kB
import { AuthIdentifier } from './auth-identifier'; import { AccessToken, AuthorizationConfiguration, ConnectionNamesConfiguration, Parameter, RefreshTokenConfiguration, RequestTokenConfiguration } from './monoauth'; import Joi from 'joi'; /** @description Used to specify information about an integrations authentication */ export declare class AuthSpecification { /** @description Identify the type of Auth being used by the integration */ Identifier: AuthIdentifier; /** @description Added to allow oauth 1.0 to work. */ access_token?: AccessToken; /** @description Authorization: the beginning of an OAuth2.0 flow that ensures the user is logged * in and approves access to the Resource. */ authorization?: AuthorizationConfiguration; /** @description Request Token: server-server code for token exchange */ request_token?: RequestTokenConfiguration; /** @description Refresh Token: server-server refresh token exchange for access token * **NOTE: sometimes a new RT is also created** */ refresh_token?: RefreshTokenConfiguration; /** @description Advanced configurations used for oauth 1.0 */ advanced_configuration?: Parameter[]; /** @description Connections is an optional feature that an integration may provide. A common use * of connections is to provide the ability to connect to a sandbox or production endpoint. * Connection name values may be accessed in a flow e.g in the request_token section, the url is * dynamic. * * "url_template": "{connection_name:$.url}/access/token/request", */ connections?: ConnectionNamesConfiguration; } export declare const AuthSpecificationSchema: Joi.ObjectSchema<any>;