import * as z from "zod"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { UnifiedApiId } from "./unifiedapiid.js"; /** * Apideck service provider associated with event. */ export type WebhookEventLogService = { /** * Apideck service provider id. */ id: string; /** * Apideck service provider name. */ name: string; }; export type Attempts = { /** * ISO Date and time when the request was made. */ timestamp?: string | undefined; /** * Number of attempts webhook endpoint was called before a success was returned or eventually failed */ executionAttempt?: number | undefined; /** * HTTP Status code that was returned. */ statusCode?: number | undefined; /** * Whether or not the request was successful. */ success?: boolean | undefined; }; export type WebhookEventLog = { id?: string | undefined; /** * HTTP Status code that was returned. */ statusCode?: number | undefined; /** * Whether or not the request was successful. */ success?: boolean | undefined; /** * ID of your Apideck Application */ applicationId?: string | undefined; /** * Unique consumer identifier. You can freely choose a consumer ID yourself. Most of the time, this is an ID of your internal data model that represents a user or account in your system (for example account:12345). If the consumer doesn't exist yet, Vault will upsert a consumer based on your ID. */ consumerId?: string | undefined; /** * Name of Apideck Unified API */ unifiedApi?: UnifiedApiId | undefined; /** * Apideck service provider associated with event. */ service?: WebhookEventLogService | undefined; /** * The URL of the webhook endpoint. */ endpoint?: string | undefined; /** * Name of source event that webhook is subscribed to. */ eventType?: string | undefined; /** * Number of attempts webhook endpoint was called before a success was returned or eventually failed */ executionAttempt?: number | undefined; /** * HTTP Method of request to endpoint. */ httpMethod?: string | undefined; /** * ISO Date and time when the request was made. */ timestamp?: string | undefined; /** * Name of the Entity described by the attributes delivered within payload */ entityType?: string | undefined; /** * The JSON stringified payload that was delivered to the webhook endpoint. */ requestBody?: string | undefined; /** * The JSON stringified response that was returned from the webhook endpoint. */ responseBody?: string | undefined; /** * If the request has not hit the max retry limit and will be retried. */ retryScheduled?: boolean | undefined; /** * record of each attempt to call webhook endpoint */ attempts?: Array | undefined; }; /** @internal */ export declare const WebhookEventLogService$inboundSchema: z.ZodType; /** @internal */ export type WebhookEventLogService$Outbound = { id: string; name: string; }; /** @internal */ export declare const WebhookEventLogService$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 WebhookEventLogService$ { /** @deprecated use `WebhookEventLogService$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `WebhookEventLogService$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `WebhookEventLogService$Outbound` instead. */ type Outbound = WebhookEventLogService$Outbound; } export declare function webhookEventLogServiceToJSON(webhookEventLogService: WebhookEventLogService): string; export declare function webhookEventLogServiceFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Attempts$inboundSchema: z.ZodType; /** @internal */ export type Attempts$Outbound = { timestamp?: string | undefined; execution_attempt?: number | undefined; status_code?: number | undefined; success?: boolean | undefined; }; /** @internal */ export declare const Attempts$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 Attempts$ { /** @deprecated use `Attempts$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Attempts$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Attempts$Outbound` instead. */ type Outbound = Attempts$Outbound; } export declare function attemptsToJSON(attempts: Attempts): string; export declare function attemptsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const WebhookEventLog$inboundSchema: z.ZodType; /** @internal */ export type WebhookEventLog$Outbound = { id?: string | undefined; status_code?: number | undefined; success?: boolean | undefined; application_id?: string | undefined; consumer_id?: string | undefined; unified_api?: string | undefined; service?: WebhookEventLogService$Outbound | undefined; endpoint?: string | undefined; event_type?: string | undefined; execution_attempt?: number | undefined; http_method?: string | undefined; timestamp?: string | undefined; entity_type?: string | undefined; request_body?: string | undefined; response_body?: string | undefined; retry_scheduled?: boolean | undefined; attempts?: Array | undefined; }; /** @internal */ export declare const WebhookEventLog$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 WebhookEventLog$ { /** @deprecated use `WebhookEventLog$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `WebhookEventLog$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `WebhookEventLog$Outbound` instead. */ type Outbound = WebhookEventLog$Outbound; } export declare function webhookEventLogToJSON(webhookEventLog: WebhookEventLog): string; export declare function webhookEventLogFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=webhookeventlog.d.ts.map