@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
128 lines • 5.13 kB
TypeScript
import * as z from "zod";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type Link = {
rel: string;
href: string;
};
export type Organization = {
organizationId: string;
links: Array<Link>;
};
export type Account = {
accountId: string;
isDefault: boolean;
accountName: string;
baseUri: string;
organization?: Organization | undefined;
};
export type UserInfo = {
sub: string;
name: string;
givenName: string;
familyName: string;
created: string;
email: string;
accounts: Array<Account>;
};
/** @internal */
export declare const Link$inboundSchema: z.ZodType<Link, z.ZodTypeDef, unknown>;
/** @internal */
export type Link$Outbound = {
rel: string;
href: string;
};
/** @internal */
export declare const Link$outboundSchema: z.ZodType<Link$Outbound, z.ZodTypeDef, Link>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace Link$ {
/** @deprecated use `Link$inboundSchema` instead. */
const inboundSchema: z.ZodType<Link, z.ZodTypeDef, unknown>;
/** @deprecated use `Link$outboundSchema` instead. */
const outboundSchema: z.ZodType<Link$Outbound, z.ZodTypeDef, Link>;
/** @deprecated use `Link$Outbound` instead. */
type Outbound = Link$Outbound;
}
export declare function linkToJSON(link: Link): string;
export declare function linkFromJSON(jsonString: string): SafeParseResult<Link, SDKValidationError>;
/** @internal */
export declare const Organization$inboundSchema: z.ZodType<Organization, z.ZodTypeDef, unknown>;
/** @internal */
export type Organization$Outbound = {
organization_id: string;
links: Array<Link$Outbound>;
};
/** @internal */
export declare const Organization$outboundSchema: z.ZodType<Organization$Outbound, z.ZodTypeDef, Organization>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace Organization$ {
/** @deprecated use `Organization$inboundSchema` instead. */
const inboundSchema: z.ZodType<Organization, z.ZodTypeDef, unknown>;
/** @deprecated use `Organization$outboundSchema` instead. */
const outboundSchema: z.ZodType<Organization$Outbound, z.ZodTypeDef, Organization>;
/** @deprecated use `Organization$Outbound` instead. */
type Outbound = Organization$Outbound;
}
export declare function organizationToJSON(organization: Organization): string;
export declare function organizationFromJSON(jsonString: string): SafeParseResult<Organization, SDKValidationError>;
/** @internal */
export declare const Account$inboundSchema: z.ZodType<Account, z.ZodTypeDef, unknown>;
/** @internal */
export type Account$Outbound = {
account_id: string;
is_default: boolean;
account_name: string;
base_uri: string;
organization?: Organization$Outbound | undefined;
};
/** @internal */
export declare const Account$outboundSchema: z.ZodType<Account$Outbound, z.ZodTypeDef, Account>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace Account$ {
/** @deprecated use `Account$inboundSchema` instead. */
const inboundSchema: z.ZodType<Account, z.ZodTypeDef, unknown>;
/** @deprecated use `Account$outboundSchema` instead. */
const outboundSchema: z.ZodType<Account$Outbound, z.ZodTypeDef, Account>;
/** @deprecated use `Account$Outbound` instead. */
type Outbound = Account$Outbound;
}
export declare function accountToJSON(account: Account): string;
export declare function accountFromJSON(jsonString: string): SafeParseResult<Account, SDKValidationError>;
/** @internal */
export declare const UserInfo$inboundSchema: z.ZodType<UserInfo, z.ZodTypeDef, unknown>;
/** @internal */
export type UserInfo$Outbound = {
sub: string;
name: string;
given_name: string;
family_name: string;
created: string;
email: string;
accounts: Array<Account$Outbound>;
};
/** @internal */
export declare const UserInfo$outboundSchema: z.ZodType<UserInfo$Outbound, z.ZodTypeDef, UserInfo>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace UserInfo$ {
/** @deprecated use `UserInfo$inboundSchema` instead. */
const inboundSchema: z.ZodType<UserInfo, z.ZodTypeDef, unknown>;
/** @deprecated use `UserInfo$outboundSchema` instead. */
const outboundSchema: z.ZodType<UserInfo$Outbound, z.ZodTypeDef, UserInfo>;
/** @deprecated use `UserInfo$Outbound` instead. */
type Outbound = UserInfo$Outbound;
}
export declare function userInfoToJSON(userInfo: UserInfo): string;
export declare function userInfoFromJSON(jsonString: string): SafeParseResult<UserInfo, SDKValidationError>;
//# sourceMappingURL=userinfo.d.ts.map