@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
61 lines • 2.04 kB
TypeScript
import { z } from "zod";
import { DocusignIamAuthScope } from "./scopes.js";
/**
* Schema for JWT user token request parameters
*/
export declare const FetchJwtUserTokenRequestSchema: z.ZodObject<{
/**
* Docusign OAuth Client ID (AKA Integrator Key)
*/
clientId: z.ZodString;
/**
* The Docusign user ID for which to generate the token
*/
userId: z.ZodString;
/**
* The environment to use for the OAuth flow.
*
* Use `account-d-docusign.com` for demo and `account.docusign.com` for
* production.
*
* @default account-d.docusign.com
*/
oauthBasePath: z.ZodDefault<z.ZodOptional<z.ZodEnum<["account-d.docusign.com", "account.docusign.com"]>>>;
/**
* Private key in PEM format used to sign the JWT
*/
privateKey: z.ZodEffects<z.ZodString, string, string>;
/**
* Scopes for the OAuth flow.
*
* If no scopes are provided, all available scopes will be used.
*
* @link https://developers.docusign.com/platform/auth/scopes/
*/
scopes: z.ZodDefault<z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString, "many">>>>;
}, "strip", z.ZodTypeAny, {
clientId: string;
oauthBasePath: "account-d.docusign.com" | "account.docusign.com";
scopes: readonly string[];
userId: string;
privateKey: string;
}, {
clientId: string;
userId: string;
privateKey: string;
oauthBasePath?: "account-d.docusign.com" | "account.docusign.com" | undefined;
scopes?: readonly string[] | undefined;
}>;
type CreateAssertionParams = Omit<z.input<typeof FetchJwtUserTokenRequestSchema>, "scopes"> & {
/**
* Scopes for the OAuth flow.
*
* If no scopes are provided, all available scopes will be used.
*
* @link https://developers.docusign.com/platform/auth/scopes/
*/
scopes?: Array<DocusignIamAuthScope | (string & {})> | undefined;
};
export declare function createJwtAssertion(params: CreateAssertionParams): string;
export {};
//# sourceMappingURL=jwt-assertion.d.ts.map