import * as z from "zod"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The type of OAuth 2.0 grant being utilized. */ export declare enum GrantType { AuthorizationCode = "authorization_code" } export declare enum Scope { BoltAccountManage = "bolt.account.manage", BoltAccountView = "bolt.account.view", Openid = "openid" } export type AuthorizationCodeRequest = { /** * The type of OAuth 2.0 grant being utilized. */ grantType: GrantType; /** * Fetched value using OTP value from the Authorization Modal. */ code: string; /** * The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved in your Merchant Dashboard. */ clientId: string; /** * The OAuth client secret, which corresponds the merchant API key, which can be retrieved in your Merchant Dashboard. */ clientSecret: string; /** * The requested scopes. If the request is successful, the OAuth client will be able to perform operations requiring these scopes. */ scope: Array; /** * A randomly generated string sent along with an authorization code. This must be included if provided. It is used to prevent cross-site request forgery (CSRF) attacks. */ state?: string | undefined; }; /** @internal */ export declare const GrantType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const GrantType$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace GrantType$ { /** @deprecated use `GrantType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `GrantType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const Scope$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Scope$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Scope$ { /** @deprecated use `Scope$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `Scope$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const AuthorizationCodeRequest$inboundSchema: z.ZodType; /** @internal */ export type AuthorizationCodeRequest$Outbound = { grant_type: string; code: string; client_id: string; client_secret: string; scope: Array; state?: string | undefined; }; /** @internal */ export declare const AuthorizationCodeRequest$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace AuthorizationCodeRequest$ { /** @deprecated use `AuthorizationCodeRequest$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `AuthorizationCodeRequest$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `AuthorizationCodeRequest$Outbound` instead. */ type Outbound = AuthorizationCodeRequest$Outbound; } export declare function authorizationCodeRequestToJSON(authorizationCodeRequest: AuthorizationCodeRequest): string; export declare function authorizationCodeRequestFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=authorizationcoderequest.d.ts.map