UNPKG

@docusign/iam-sdk

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.

124 lines 6.62 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfidentialAuthCodeGrantRequestBody$ = exports.ConfidentialAuthCodeGrantRequestBody$outboundSchema = exports.ConfidentialAuthCodeGrantRequestBody$inboundSchema = exports.ConfidentialAuthCodeGrantRequestBodyGrantType$ = exports.ConfidentialAuthCodeGrantRequestBodyGrantType$outboundSchema = exports.ConfidentialAuthCodeGrantRequestBodyGrantType$inboundSchema = exports.Flow$ = exports.Flow$outboundSchema = exports.Flow$inboundSchema = exports.ConfidentialAuthCodeGrantRequestBodyGrantType = exports.Flow = void 0; exports.confidentialAuthCodeGrantRequestBodyToJSON = confidentialAuthCodeGrantRequestBodyToJSON; exports.confidentialAuthCodeGrantRequestBodyFromJSON = confidentialAuthCodeGrantRequestBodyFromJSON; const z = __importStar(require("zod")); const primitives_js_1 = require("../../lib/primitives.js"); const schemas_js_1 = require("../../lib/schemas.js"); exports.Flow = { Confidential: "confidential", }; /** * The grant type. This value must be set to "authorization_code". */ exports.ConfidentialAuthCodeGrantRequestBodyGrantType = { AuthorizationCode: "authorization_code", }; /** @internal */ exports.Flow$inboundSchema = z.nativeEnum(exports.Flow); /** @internal */ exports.Flow$outboundSchema = exports.Flow$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var Flow$; (function (Flow$) { /** @deprecated use `Flow$inboundSchema` instead. */ Flow$.inboundSchema = exports.Flow$inboundSchema; /** @deprecated use `Flow$outboundSchema` instead. */ Flow$.outboundSchema = exports.Flow$outboundSchema; })(Flow$ || (exports.Flow$ = Flow$ = {})); /** @internal */ exports.ConfidentialAuthCodeGrantRequestBodyGrantType$inboundSchema = z .nativeEnum(exports.ConfidentialAuthCodeGrantRequestBodyGrantType); /** @internal */ exports.ConfidentialAuthCodeGrantRequestBodyGrantType$outboundSchema = exports.ConfidentialAuthCodeGrantRequestBodyGrantType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var ConfidentialAuthCodeGrantRequestBodyGrantType$; (function (ConfidentialAuthCodeGrantRequestBodyGrantType$) { /** @deprecated use `ConfidentialAuthCodeGrantRequestBodyGrantType$inboundSchema` instead. */ ConfidentialAuthCodeGrantRequestBodyGrantType$.inboundSchema = exports.ConfidentialAuthCodeGrantRequestBodyGrantType$inboundSchema; /** @deprecated use `ConfidentialAuthCodeGrantRequestBodyGrantType$outboundSchema` instead. */ ConfidentialAuthCodeGrantRequestBodyGrantType$.outboundSchema = exports.ConfidentialAuthCodeGrantRequestBodyGrantType$outboundSchema; })(ConfidentialAuthCodeGrantRequestBodyGrantType$ || (exports.ConfidentialAuthCodeGrantRequestBodyGrantType$ = ConfidentialAuthCodeGrantRequestBodyGrantType$ = {})); /** @internal */ exports.ConfidentialAuthCodeGrantRequestBody$inboundSchema = z.object({ flow: z.literal("confidential").optional(), grant_type: exports.ConfidentialAuthCodeGrantRequestBodyGrantType$inboundSchema .default("authorization_code"), code: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "grant_type": "grantType", }); }); /** @internal */ exports.ConfidentialAuthCodeGrantRequestBody$outboundSchema = z.object({ flow: z.literal("confidential").default("confidential"), grantType: exports.ConfidentialAuthCodeGrantRequestBodyGrantType$outboundSchema .default("authorization_code"), code: z.string(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { grantType: "grant_type", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var ConfidentialAuthCodeGrantRequestBody$; (function (ConfidentialAuthCodeGrantRequestBody$) { /** @deprecated use `ConfidentialAuthCodeGrantRequestBody$inboundSchema` instead. */ ConfidentialAuthCodeGrantRequestBody$.inboundSchema = exports.ConfidentialAuthCodeGrantRequestBody$inboundSchema; /** @deprecated use `ConfidentialAuthCodeGrantRequestBody$outboundSchema` instead. */ ConfidentialAuthCodeGrantRequestBody$.outboundSchema = exports.ConfidentialAuthCodeGrantRequestBody$outboundSchema; })(ConfidentialAuthCodeGrantRequestBody$ || (exports.ConfidentialAuthCodeGrantRequestBody$ = ConfidentialAuthCodeGrantRequestBody$ = {})); function confidentialAuthCodeGrantRequestBodyToJSON(confidentialAuthCodeGrantRequestBody) { return JSON.stringify(exports.ConfidentialAuthCodeGrantRequestBody$outboundSchema.parse(confidentialAuthCodeGrantRequestBody)); } function confidentialAuthCodeGrantRequestBodyFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ConfidentialAuthCodeGrantRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConfidentialAuthCodeGrantRequestBody' from JSON`); } //# sourceMappingURL=confidentialauthcodegrantrequestbody.js.map