UNPKG

@shipengine/connect-carrier-api

Version:

This is the typescript/javascript definitions for carrier api

32 lines 1.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AuthSpecificationSchema = exports.AuthSpecification = void 0; const tslib_1 = require("tslib"); const auth_identifier_1 = require("./auth-identifier"); const monoauth_1 = require("./monoauth"); const joi_1 = tslib_1.__importDefault(require("joi")); /** @description Used to specify information about an integrations authentication */ class AuthSpecification { /** @description Identify the type of Auth being used by the integration */ Identifier; /** @description Added to allow oauth 1.0 to work. */ access_token; /** @description Authorization: the beginning of an OAuth2.0 flow that ensures the user is logged in and approves access to the Resource. */ authorization; /** @description Request Token: server-server code for token exchange */ request_token; /** @description Refresh Token: server-server refresh token exchange for access token **NOTE: sometimes a new RT is also created** */ refresh_token; /** @description Advanced configurations used for oauth 1.0 */ advanced_configuration; } exports.AuthSpecification = AuthSpecification; exports.AuthSpecificationSchema = joi_1.default.object({ Identifier: auth_identifier_1.AuthIdentifierSchema, access_token: monoauth_1.AccessTokenSchema.optional(), authorization: monoauth_1.AuthorizationConfigurationSchema.optional(), request_token: monoauth_1.RequestTokenConfigurationSchema.optional(), refresh_token: monoauth_1.RefreshTokenConfigurationSchema.optional(), advanced_configuration: joi_1.default.array().optional().items(monoauth_1.ParameterSchema), }); //# sourceMappingURL=auth-specification.js.map