import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The request as defined in OpenApi Spec. */ export type Operation = { /** * The OpenApi Operation Id associated with the request */ id: string; /** * The OpenApi Operation name associated with the request */ name: string; }; /** * Apideck service provider associated with request. */ export type Service = { /** * Apideck service provider id. */ id: string; /** * Apideck service provider name. */ name: string; }; /** * Which Unified Api request was made to. */ export declare const UnifiedApi: { readonly Crm: "crm"; readonly Lead: "lead"; readonly Proxy: "proxy"; readonly Vault: "vault"; readonly Accounting: "accounting"; readonly Hris: "hris"; readonly Ats: "ats"; readonly Ecommerce: "ecommerce"; readonly IssueTracking: "issue-tracking"; readonly Pos: "pos"; readonly FileStorage: "file-storage"; readonly Sms: "sms"; }; /** * Which Unified Api request was made to. */ export type UnifiedApi = ClosedEnum; export type Log = { /** * Indicates if the request was made via REST or Graphql endpoint. */ apiStyle: string; /** * The Apideck base URL the request was made to. */ baseUrl: string; /** * Indicates whether or not this is a child or parent request. */ childRequest: boolean; /** * The consumer Id associated with the request. */ consumerId: string; /** * The entire execution time in milliseconds it took to call the Apideck service provider. */ duration: number; /** * If error occurred, this is brief explanation */ errorMessage?: string | null | undefined; /** * The entire execution time in milliseconds it took to make the request. */ execution: number; /** * When request is a parent request, this indicates if there are child requests associated. */ hasChildren: boolean; /** * HTTP Method of request. */ httpMethod: string; /** * UUID acting as Request Identifier. */ id: string; /** * Latency added by making this request via Unified Api. */ latency: number; /** * The request as defined in OpenApi Spec. */ operation: Operation; /** * When request is a child request, this UUID indicates it's parent request. */ parentId: string | null; /** * The path component of the URI the request was made to. */ path: string; /** * Indicates whether the request was made using Apidecks sandbox credentials or not. */ sandbox: boolean; /** * Apideck service provider associated with request. */ service: Service; /** * The IP address of the source of the request. */ sourceIp?: string | null | undefined; /** * HTTP Status code that was returned. */ statusCode: number; /** * Whether or not the request was successful. */ success: boolean; /** * ISO Date and time when the request was made. */ timestamp: string; /** * Which Unified Api request was made to. */ unifiedApi: UnifiedApi; }; /** @internal */ export declare const Operation$inboundSchema: z.ZodType; /** @internal */ export type Operation$Outbound = { id: string; name: string; }; /** @internal */ export declare const Operation$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 Operation$ { /** @deprecated use `Operation$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Operation$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Operation$Outbound` instead. */ type Outbound = Operation$Outbound; } export declare function operationToJSON(operation: Operation): string; export declare function operationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Service$inboundSchema: z.ZodType; /** @internal */ export type Service$Outbound = { id: string; name: string; }; /** @internal */ export declare const Service$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 Service$ { /** @deprecated use `Service$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Service$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Service$Outbound` instead. */ type Outbound = Service$Outbound; } export declare function serviceToJSON(service: Service): string; export declare function serviceFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const UnifiedApi$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const UnifiedApi$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 UnifiedApi$ { /** @deprecated use `UnifiedApi$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Crm: "crm"; readonly Lead: "lead"; readonly Proxy: "proxy"; readonly Vault: "vault"; readonly Accounting: "accounting"; readonly Hris: "hris"; readonly Ats: "ats"; readonly Ecommerce: "ecommerce"; readonly IssueTracking: "issue-tracking"; readonly Pos: "pos"; readonly FileStorage: "file-storage"; readonly Sms: "sms"; }>; /** @deprecated use `UnifiedApi$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Crm: "crm"; readonly Lead: "lead"; readonly Proxy: "proxy"; readonly Vault: "vault"; readonly Accounting: "accounting"; readonly Hris: "hris"; readonly Ats: "ats"; readonly Ecommerce: "ecommerce"; readonly IssueTracking: "issue-tracking"; readonly Pos: "pos"; readonly FileStorage: "file-storage"; readonly Sms: "sms"; }>; } /** @internal */ export declare const Log$inboundSchema: z.ZodType; /** @internal */ export type Log$Outbound = { api_style: string; base_url: string; child_request: boolean; consumer_id: string; duration: number; error_message?: string | null | undefined; execution: number; has_children: boolean; http_method: string; id: string; latency: number; operation: Operation$Outbound; parent_id: string | null; path: string; sandbox: boolean; service: Service$Outbound; source_ip?: string | null | undefined; status_code: number; success: boolean; timestamp: string; unified_api: string; }; /** @internal */ export declare const Log$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 Log$ { /** @deprecated use `Log$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Log$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Log$Outbound` instead. */ type Outbound = Log$Outbound; } export declare function logToJSON(log: Log): string; export declare function logFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=log.d.ts.map