import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type OnBehalfOf = { userType: "service-account"; serviceAccountId: string; }; export type CreateScopedApiKeyRequestBody = { name: string; teamId: string; scopes: Array; expiresIn?: number | undefined; rateLimitEnabled?: boolean | undefined; rateLimitTimeWindow?: number | undefined; rateLimitMax?: number | undefined; onBehalfOf?: OnBehalfOf | undefined; }; export type CreateScopedApiKeyRequest = { /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; requestBody?: CreateScopedApiKeyRequestBody | undefined; }; export declare const UserType: { readonly User: "user"; readonly ServiceAccount: "service-account"; }; export type UserType = ClosedEnum; /** * Key minted (plaintext returned once) */ export type CreateScopedApiKeyResponseBody = { id: string; name?: string | null | undefined; key?: string | undefined; prefix?: string | null | undefined; start?: string | null | undefined; userId: string; userType: UserType; orgId: string | null; teamId: string | null; scopes: Array; expiresAt?: string | null | undefined; }; /** @internal */ export declare const OnBehalfOf$inboundSchema: z.ZodType; /** @internal */ export type OnBehalfOf$Outbound = { userType: "service-account"; serviceAccountId: string; }; /** @internal */ export declare const OnBehalfOf$outboundSchema: z.ZodType; export declare function onBehalfOfToJSON(onBehalfOf: OnBehalfOf): string; export declare function onBehalfOfFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const CreateScopedApiKeyRequestBody$inboundSchema: z.ZodType; /** @internal */ export type CreateScopedApiKeyRequestBody$Outbound = { name: string; teamId: string; scopes: Array; expiresIn?: number | undefined; rateLimitEnabled: boolean; rateLimitTimeWindow?: number | undefined; rateLimitMax?: number | undefined; onBehalfOf?: OnBehalfOf$Outbound | undefined; }; /** @internal */ export declare const CreateScopedApiKeyRequestBody$outboundSchema: z.ZodType; export declare function createScopedApiKeyRequestBodyToJSON(createScopedApiKeyRequestBody: CreateScopedApiKeyRequestBody): string; export declare function createScopedApiKeyRequestBodyFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const CreateScopedApiKeyRequest$inboundSchema: z.ZodType; /** @internal */ export type CreateScopedApiKeyRequest$Outbound = { "X-On-Behalf-Of"?: string | undefined; RequestBody?: CreateScopedApiKeyRequestBody$Outbound | undefined; }; /** @internal */ export declare const CreateScopedApiKeyRequest$outboundSchema: z.ZodType; export declare function createScopedApiKeyRequestToJSON(createScopedApiKeyRequest: CreateScopedApiKeyRequest): string; export declare function createScopedApiKeyRequestFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UserType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const UserType$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const CreateScopedApiKeyResponseBody$inboundSchema: z.ZodType; /** @internal */ export type CreateScopedApiKeyResponseBody$Outbound = { id: string; name?: string | null | undefined; key?: string | undefined; prefix?: string | null | undefined; start?: string | null | undefined; userId: string; userType: string; orgId: string | null; teamId: string | null; scopes: Array; expiresAt?: string | null | undefined; }; /** @internal */ export declare const CreateScopedApiKeyResponseBody$outboundSchema: z.ZodType; export declare function createScopedApiKeyResponseBodyToJSON(createScopedApiKeyResponseBody: CreateScopedApiKeyResponseBody): string; export declare function createScopedApiKeyResponseBodyFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=createscopedapikey.d.ts.map