@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
25 lines • 993 B
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import * as types from "../../types/primitives.js";
/** @internal */
export const AuthorizationCodeGrantResponse$inboundSchema = z.object({
access_token: types.string(),
token_type: types.string(),
refresh_token: types.string(),
expires_in: types.number(),
}).transform((v) => {
return remap$(v, {
"access_token": "accessToken",
"token_type": "tokenType",
"refresh_token": "refreshToken",
"expires_in": "expiresIn",
});
});
export function authorizationCodeGrantResponseFromJSON(jsonString) {
return safeParse(jsonString, (x) => AuthorizationCodeGrantResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthorizationCodeGrantResponse' from JSON`);
}
//# sourceMappingURL=authorizationcodegrantresponse.js.map