import * as z from "zod"; import { Result as SafeParseResult } from "../../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Provenance, Provenance$Outbound } from "./provenance.js"; import { Result, Result$Outbound } from "./result.js"; export type Location = { file: string; row: number; col: number; }; export type Errors = { code: string; message: string; location?: Location | undefined; }; export type ServerErrorWithStatusCode = { httpStatusCode: string; code: string; message: string; errors?: Array | undefined; decisionId?: string | undefined; }; export type SuccessfulPolicyResponseWithStatusCode = { httpStatusCode: string; /** * The base or virtual document referred to by the URL path. If the path is undefined, this key will be omitted. */ result?: Result | undefined; /** * If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps. */ metrics?: { [k: string]: any; } | undefined; /** * If decision logging is enabled, this field contains a string that uniquely identifies the decision. The identifier will be included in the decision log event for this decision. Callers can use the identifier for correlation purposes. */ decisionId?: string | undefined; /** * Provenance information can be requested on individual API calls and are returned inline with the API response. To obtain provenance information on an API call, specify the `provenance=true` query parameter when executing the API call. */ provenance?: Provenance | undefined; }; export type Responses = (SuccessfulPolicyResponseWithStatusCode & { httpStatusCode: "200"; }) | (ServerErrorWithStatusCode & { httpStatusCode: "500"; }); /** * Mixed success and failures. */ export type BatchMixedResults = { batchDecisionId?: string | undefined; /** * If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps. */ metrics?: { [k: string]: any; } | undefined; responses?: { [k: string]: (SuccessfulPolicyResponseWithStatusCode & { httpStatusCode: "200"; }) | (ServerErrorWithStatusCode & { httpStatusCode: "500"; }); } | undefined; }; /** @internal */ export declare const Location$inboundSchema: z.ZodType; /** @internal */ export type Location$Outbound = { file: string; row: number; col: number; }; /** @internal */ export declare const Location$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 Location$ { /** @deprecated use `Location$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Location$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Location$Outbound` instead. */ type Outbound = Location$Outbound; } export declare function locationToJSON(location: Location): string; export declare function locationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Errors$inboundSchema: z.ZodType; /** @internal */ export type Errors$Outbound = { code: string; message: string; location?: Location$Outbound | undefined; }; /** @internal */ export declare const Errors$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 Errors$ { /** @deprecated use `Errors$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Errors$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Errors$Outbound` instead. */ type Outbound = Errors$Outbound; } export declare function errorsToJSON(errors: Errors): string; export declare function errorsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ServerErrorWithStatusCode$inboundSchema: z.ZodType; /** @internal */ export type ServerErrorWithStatusCode$Outbound = { http_status_code: string; code: string; message: string; errors?: Array | undefined; decision_id?: string | undefined; }; /** @internal */ export declare const ServerErrorWithStatusCode$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 ServerErrorWithStatusCode$ { /** @deprecated use `ServerErrorWithStatusCode$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ServerErrorWithStatusCode$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ServerErrorWithStatusCode$Outbound` instead. */ type Outbound = ServerErrorWithStatusCode$Outbound; } export declare function serverErrorWithStatusCodeToJSON(serverErrorWithStatusCode: ServerErrorWithStatusCode): string; export declare function serverErrorWithStatusCodeFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const SuccessfulPolicyResponseWithStatusCode$inboundSchema: z.ZodType; /** @internal */ export type SuccessfulPolicyResponseWithStatusCode$Outbound = { http_status_code: string; result?: Result$Outbound | undefined; metrics?: { [k: string]: any; } | undefined; decision_id?: string | undefined; provenance?: Provenance$Outbound | undefined; }; /** @internal */ export declare const SuccessfulPolicyResponseWithStatusCode$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 SuccessfulPolicyResponseWithStatusCode$ { /** @deprecated use `SuccessfulPolicyResponseWithStatusCode$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `SuccessfulPolicyResponseWithStatusCode$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `SuccessfulPolicyResponseWithStatusCode$Outbound` instead. */ type Outbound = SuccessfulPolicyResponseWithStatusCode$Outbound; } export declare function successfulPolicyResponseWithStatusCodeToJSON(successfulPolicyResponseWithStatusCode: SuccessfulPolicyResponseWithStatusCode): string; export declare function successfulPolicyResponseWithStatusCodeFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Responses$inboundSchema: z.ZodType; /** @internal */ export type Responses$Outbound = (SuccessfulPolicyResponseWithStatusCode$Outbound & { http_status_code: "200"; }) | (ServerErrorWithStatusCode$Outbound & { http_status_code: "500"; }); /** @internal */ export declare const Responses$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 Responses$ { /** @deprecated use `Responses$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Responses$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Responses$Outbound` instead. */ type Outbound = Responses$Outbound; } export declare function responsesToJSON(responses: Responses): string; export declare function responsesFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BatchMixedResults$inboundSchema: z.ZodType; /** @internal */ export type BatchMixedResults$Outbound = { batch_decision_id?: string | undefined; metrics?: { [k: string]: any; } | undefined; responses?: { [k: string]: (SuccessfulPolicyResponseWithStatusCode$Outbound & { http_status_code: "200"; }) | (ServerErrorWithStatusCode$Outbound & { http_status_code: "500"; }); } | undefined; }; /** @internal */ export declare const BatchMixedResults$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 BatchMixedResults$ { /** @deprecated use `BatchMixedResults$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `BatchMixedResults$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `BatchMixedResults$Outbound` instead. */ type Outbound = BatchMixedResults$Outbound; } export declare function batchMixedResultsToJSON(batchMixedResults: BatchMixedResults): string; export declare function batchMixedResultsFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=batchmixedresults.d.ts.map