@gemina/sdk 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -13528,7 +13528,9 @@ type GeminaWebhookVerificationReason = 'missing_header' | 'ambiguous_header' | '
13528
13528
  */
13529
13529
  declare class GeminaWebhookVerificationError extends GeminaError {
13530
13530
  readonly reason: GeminaWebhookVerificationReason;
13531
- constructor(reason: GeminaWebhookVerificationReason, message: string);
13531
+ /** The underlying error, when the refusal came from one (a body that is not JSON, say). */
13532
+ readonly cause?: unknown;
13533
+ constructor(reason: GeminaWebhookVerificationReason, message: string, cause?: unknown);
13532
13534
  }
13533
13535
 
13534
13536
  /**
@@ -13551,7 +13553,7 @@ interface WebhookEvent {
13551
13553
  type: string | null;
13552
13554
  /** When the event was recorded; the same on every retry. */
13553
13555
  timestamp: string | null;
13554
- /** Typed for the known event types (narrow with the guards below); the parsed value otherwise. */
13556
+ /** Typed for the known event types (narrow with the guards below); the parsed value otherwise, or `null` when the body has no `data`. */
13555
13557
  data: unknown;
13556
13558
  /** The whole parsed body. */
13557
13559
  raw: Record<string, unknown>;
@@ -13584,6 +13586,6 @@ declare function unwrapWebhook(body: string | ArrayBuffer | ArrayBufferView, hea
13584
13586
  * client sends NO custom User-Agent header (browsers forbid overriding it).
13585
13587
  * VERSION is exported for consumers and diagnostics only.
13586
13588
  */
13587
- declare const VERSION = "0.17.0";
13589
+ declare const VERSION = "0.17.1";
13588
13590
 
13589
13591
  export { type ActivateTemplateRequest, type AddDocumentExtractionsByUserRequest, type AddDocumentExtractionsRequest, type AddExtractionsInDTO, AddExtractionsInDTOFromJSON, AddExtractionsInDTOFromJSONTyped, AddExtractionsInDTOToJSON, AddExtractionsInDTOToJSONTyped, type AggregateMetaDTO, AggregateMetaDTOFromJSON, AggregateMetaDTOFromJSONTyped, AggregateMetaDTOToJSON, AggregateMetaDTOToJSONTyped, type AggregateMetricDTO, AggregateMetricDTOFieldEnum, AggregateMetricDTOFromJSON, AggregateMetricDTOFromJSONTyped, AggregateMetricDTOOpEnum, AggregateMetricDTOToJSON, AggregateMetricDTOToJSONTyped, type AggregateRowDTO, AggregateRowDTOFromJSON, AggregateRowDTOFromJSONTyped, AggregateRowDTOToJSON, AggregateRowDTOToJSONTyped, type ApiResponse, BASE_PATH, BaseAPI, BillingApi, BlobApiResponse, COLLECTION_FORMATS, type ChangePlanRequest, ChatApi, type ChatMessageOutDTO, ChatMessageOutDTOFromJSON, ChatMessageOutDTOFromJSONTyped, ChatMessageOutDTOToJSON, ChatMessageOutDTOToJSONTyped, type ChatQueryInDTO, ChatQueryInDTOFromJSON, ChatQueryInDTOFromJSONTyped, ChatQueryInDTOToJSON, ChatQueryInDTOToJSONTyped, type ChatQueryOutDTO, ChatQueryOutDTOFromJSON, ChatQueryOutDTOFromJSONTyped, ChatQueryOutDTOToJSON, ChatQueryOutDTOToJSONTyped, type ChatQueryRequest, type ChatSessionListOutDTO, ChatSessionListOutDTOFromJSON, ChatSessionListOutDTOFromJSONTyped, ChatSessionListOutDTOToJSON, ChatSessionListOutDTOToJSONTyped, type ChatSessionOutDTO, ChatSessionOutDTOFromJSON, ChatSessionOutDTOFromJSONTyped, ChatSessionOutDTOToJSON, ChatSessionOutDTOToJSONTyped, type ChatTranscriptOutDTO, ChatTranscriptOutDTOFromJSON, ChatTranscriptOutDTOFromJSONTyped, ChatTranscriptOutDTOToJSON, ChatTranscriptOutDTOToJSONTyped, type CheckoutOutDTO, CheckoutOutDTOFromJSON, CheckoutOutDTOFromJSONTyped, CheckoutOutDTOStatusEnum, CheckoutOutDTOToJSON, CheckoutOutDTOToJSONTyped, type ColumnDefinitionDTO, ColumnDefinitionDTOFromJSON, ColumnDefinitionDTOFromJSONTyped, ColumnDefinitionDTOToJSON, ColumnDefinitionDTOToJSONTyped, type ComparisonSummaryModel, ComparisonSummaryModelFromJSON, ComparisonSummaryModelFromJSONTyped, ComparisonSummaryModelToJSON, ComparisonSummaryModelToJSONTyped, Configuration, type ConfigurationParameters, type Consume, ContactApi, type ContactFormInDTO, ContactFormInDTOFromJSON, ContactFormInDTOFromJSONTyped, ContactFormInDTOToJSON, ContactFormInDTOToJSONTyped, type ContractOutDTO, ContractOutDTOFromJSON, ContractOutDTOFromJSONTyped, ContractOutDTOToJSON, ContractOutDTOToJSONTyped, ContractStatus, ContractStatusFromJSON, ContractStatusFromJSONTyped, ContractStatusToJSON, ContractStatusToJSONTyped, type ConversationOptions, type CountBreakdownModel, CountBreakdownModelFromJSON, CountBreakdownModelFromJSONTyped, CountBreakdownModelToJSON, CountBreakdownModelToJSONTyped, type CreateDocumentProcessingRequestByUserRequest, type CreateDocumentProcessingRequestRequest, type CreateTemplateInDTO, CreateTemplateInDTOFromJSON, CreateTemplateInDTOFromJSONTyped, CreateTemplateInDTOToJSON, CreateTemplateInDTOToJSONTyped, type CreateTemplateRequest, type CreateUploadRequest, type CreateWebDocumentProcessingRequestByUserRequest, type CreateWebDocumentProcessingRequestRequest, type CreateWebhookEndpointRequest, type CreatedWebhookEndpointOutDTO, CreatedWebhookEndpointOutDTODisabledReasonEnum, CreatedWebhookEndpointOutDTOFromJSON, CreatedWebhookEndpointOutDTOFromJSONTyped, CreatedWebhookEndpointOutDTOToJSON, CreatedWebhookEndpointOutDTOToJSONTyped, CreditMeter, CreditMeterFilter, CreditMeterFilterFromJSON, CreditMeterFilterFromJSONTyped, CreditMeterFilterToJSON, CreditMeterFilterToJSONTyped, CreditMeterFromJSON, CreditMeterFromJSONTyped, CreditMeterToJSON, CreditMeterToJSONTyped, type CreditTransactionListOutDTO, CreditTransactionListOutDTOFromJSON, CreditTransactionListOutDTOFromJSONTyped, CreditTransactionListOutDTOToJSON, CreditTransactionListOutDTOToJSONTyped, type CreditTransactionOutDTO, CreditTransactionOutDTOFromJSON, CreditTransactionOutDTOFromJSONTyped, CreditTransactionOutDTOToJSON, CreditTransactionOutDTOToJSONTyped, CreditTransactionType, CreditTransactionTypeFromJSON, CreditTransactionTypeFromJSONTyped, CreditTransactionTypeToJSON, CreditTransactionTypeToJSONTyped, DEFAULT_BASE_URL, DataCenterRegionModel, DataCenterRegionModelFromJSON, DataCenterRegionModelFromJSONTyped, DataCenterRegionModelToJSON, DataCenterRegionModelToJSONTyped, DataRetentionPeriodModel, DataRetentionPeriodModelFromJSON, DataRetentionPeriodModelFromJSONTyped, DataRetentionPeriodModelToJSON, DataRetentionPeriodModelToJSONTyped, type DeactivateTemplateRequest, DefaultConfig, type DeleteChatSessionRequest, type DeleteTemplateRequest, type DeleteWebhookEndpointRequest, type DocumentAddExtractionsMetaOutDTO, DocumentAddExtractionsMetaOutDTOFromJSON, DocumentAddExtractionsMetaOutDTOFromJSONTyped, DocumentAddExtractionsMetaOutDTOToJSON, DocumentAddExtractionsMetaOutDTOToJSONTyped, type DocumentAddExtractionsOutDTO, DocumentAddExtractionsOutDTOFromJSON, DocumentAddExtractionsOutDTOFromJSONTyped, DocumentAddExtractionsOutDTOToJSON, DocumentAddExtractionsOutDTOToJSONTyped, DocumentApi, type DocumentDataOutDTO, DocumentDataOutDTOFromJSON, DocumentDataOutDTOFromJSONTyped, DocumentDataOutDTOToJSON, DocumentDataOutDTOToJSONTyped, DocumentFileTypeModel, DocumentFileTypeModelFromJSON, DocumentFileTypeModelFromJSONTyped, DocumentFileTypeModelToJSON, DocumentFileTypeModelToJSONTyped, type DocumentMetaOutDTO, DocumentMetaOutDTOFromJSON, DocumentMetaOutDTOFromJSONTyped, DocumentMetaOutDTOToJSON, DocumentMetaOutDTOToJSONTyped, type DocumentPrimaryViewOutDTO, DocumentPrimaryViewOutDTOFromJSON, DocumentPrimaryViewOutDTOFromJSONTyped, DocumentPrimaryViewOutDTOToJSON, DocumentPrimaryViewOutDTOToJSONTyped, type DocumentProcessingMetaOutDTO, DocumentProcessingMetaOutDTOFromJSON, DocumentProcessingMetaOutDTOFromJSONTyped, DocumentProcessingMetaOutDTOToJSON, DocumentProcessingMetaOutDTOToJSONTyped, type DocumentProcessingResultOutDTO, DocumentProcessingResultOutDTOFromJSON, DocumentProcessingResultOutDTOFromJSONTyped, DocumentProcessingResultOutDTOToJSON, DocumentProcessingResultOutDTOToJSONTyped, type DocumentPurgingResultOutDTO, DocumentPurgingResultOutDTOFromJSON, DocumentPurgingResultOutDTOFromJSONTyped, DocumentPurgingResultOutDTOToJSON, DocumentPurgingResultOutDTOToJSONTyped, type DocumentSource, type DocumentViewDataOutDTO, DocumentViewDataOutDTOFromJSON, DocumentViewDataOutDTOFromJSONTyped, DocumentViewDataOutDTOToJSON, DocumentViewDataOutDTOToJSONTyped, type DocumentViewMetaOutDTO, DocumentViewMetaOutDTOFromJSON, DocumentViewMetaOutDTOFromJSONTyped, DocumentViewMetaOutDTOToJSON, DocumentViewMetaOutDTOToJSONTyped, type DocumentViewOutDTO, DocumentViewOutDTOFromJSON, DocumentViewOutDTOFromJSONTyped, DocumentViewOutDTOToJSON, DocumentViewOutDTOToJSONTyped, type DocumentsViewOutDTO, DocumentsViewOutDTOFromJSON, DocumentsViewOutDTOFromJSONTyped, DocumentsViewOutDTOToJSON, DocumentsViewOutDTOToJSONTyped, EnterpriseApi, type EnterpriseTransactionListOutDTO, EnterpriseTransactionListOutDTOFromJSON, EnterpriseTransactionListOutDTOFromJSONTyped, EnterpriseTransactionListOutDTOToJSON, EnterpriseTransactionListOutDTOToJSONTyped, type EnterpriseTransactionOutDTO, EnterpriseTransactionOutDTOFromJSON, EnterpriseTransactionOutDTOFromJSONTyped, EnterpriseTransactionOutDTOToJSON, EnterpriseTransactionOutDTOToJSONTyped, type ErrorContext, type ExtractionCompletedEvent, type ExtractionCompletedEventData, ExtractionCompletedEventDataFromJSON, ExtractionCompletedEventDataFromJSONTyped, ExtractionCompletedEventDataToJSON, ExtractionCompletedEventDataToJSONTyped, ExtractionCompletedEventFromJSON, ExtractionCompletedEventFromJSONTyped, ExtractionCompletedEventToJSON, ExtractionCompletedEventToJSONTyped, ExtractionCompletedEventTypeEnum, type ExtractionCompletedWebhookEvent, type ExtractionCostOutDTO, ExtractionCostOutDTOFromJSON, ExtractionCostOutDTOFromJSONTyped, ExtractionCostOutDTOToJSON, ExtractionCostOutDTOToJSONTyped, type ExtractionCostOutResultDTO, ExtractionCostOutResultDTOFromJSON, ExtractionCostOutResultDTOFromJSONTyped, ExtractionCostOutResultDTOToJSON, ExtractionCostOutResultDTOToJSONTyped, ExtractionCostStateModel, ExtractionCostStateModelFromJSON, ExtractionCostStateModelFromJSONTyped, ExtractionCostStateModelToJSON, ExtractionCostStateModelToJSONTyped, type ExtractionCostsDataOutDTO, ExtractionCostsDataOutDTOFromJSON, ExtractionCostsDataOutDTOFromJSONTyped, ExtractionCostsDataOutDTOToJSON, ExtractionCostsDataOutDTOToJSONTyped, type ExtractionCostsOutDTO, ExtractionCostsOutDTOFromJSON, ExtractionCostsOutDTOFromJSONTyped, ExtractionCostsOutDTOToJSON, ExtractionCostsOutDTOToJSONTyped, type ExtractionDocumentViewMetaOutDTO, ExtractionDocumentViewMetaOutDTOFromJSON, ExtractionDocumentViewMetaOutDTOFromJSONTyped, ExtractionDocumentViewMetaOutDTOToJSON, ExtractionDocumentViewMetaOutDTOToJSONTyped, type ExtractionMetaOutDTO, ExtractionMetaOutDTOFromJSON, ExtractionMetaOutDTOFromJSONTyped, ExtractionMetaOutDTOToJSON, ExtractionMetaOutDTOToJSONTyped, type ExtractionPrimaryViewOutDTO, ExtractionPrimaryViewOutDTOFromJSON, ExtractionPrimaryViewOutDTOFromJSONTyped, ExtractionPrimaryViewOutDTOToJSON, ExtractionPrimaryViewOutDTOToJSONTyped, type ExtractionProcessingResultOutDTO, ExtractionProcessingResultOutDTOFromJSON, ExtractionProcessingResultOutDTOFromJSONTyped, ExtractionProcessingResultOutDTOToJSON, ExtractionProcessingResultOutDTOToJSONTyped, ExtractionTypeModel, ExtractionTypeModelFromJSON, ExtractionTypeModelFromJSONTyped, ExtractionTypeModelToJSON, ExtractionTypeModelToJSONTyped, type ExtractionValidationInDTO, ExtractionValidationInDTOFromJSON, ExtractionValidationInDTOFromJSONTyped, ExtractionValidationInDTOToJSON, ExtractionValidationInDTOToJSONTyped, type ExtractionValidationMetaOutDTO, ExtractionValidationMetaOutDTOFromJSON, ExtractionValidationMetaOutDTOFromJSONTyped, ExtractionValidationMetaOutDTOToJSON, ExtractionValidationMetaOutDTOToJSONTyped, type ExtractionValidationResultOutDTO, ExtractionValidationResultOutDTOFromJSON, ExtractionValidationResultOutDTOFromJSONTyped, ExtractionValidationResultOutDTOToJSON, ExtractionValidationResultOutDTOToJSONTyped, type ExtractionViewDataOutDTO, ExtractionViewDataOutDTOFromJSON, ExtractionViewDataOutDTOFromJSONTyped, ExtractionViewDataOutDTOToJSON, ExtractionViewDataOutDTOToJSONTyped, type ExtractionViewMetaOutDTO, ExtractionViewMetaOutDTOFromJSON, ExtractionViewMetaOutDTOFromJSONTyped, ExtractionViewMetaOutDTOToJSON, ExtractionViewMetaOutDTOToJSONTyped, type ExtractionViewOutDTO, ExtractionViewOutDTOFromJSON, ExtractionViewOutDTOFromJSONTyped, ExtractionViewOutDTOToJSON, ExtractionViewOutDTOToJSONTyped, type ExtractionsViewOutDTO, ExtractionsViewOutDTOFromJSON, ExtractionsViewOutDTOFromJSONTyped, ExtractionsViewOutDTOToJSON, ExtractionsViewOutDTOToJSONTyped, FeatureType, FeatureTypeFromJSON, FeatureTypeFromJSONTyped, FeatureTypeToJSON, FeatureTypeToJSONTyped, type FetchAPI, FetchError, type FetchParams, type FieldDefinitionDTO, FieldDefinitionDTOFromJSON, FieldDefinitionDTOFromJSONTyped, FieldDefinitionDTOToJSON, FieldDefinitionDTOToJSONTyped, type FieldDifferenceModel, FieldDifferenceModelFromJSON, FieldDifferenceModelFromJSONTyped, FieldDifferenceModelToJSON, FieldDifferenceModelToJSONTyped, FieldType, FieldTypeFromJSON, FieldTypeFromJSONTyped, FieldTypeToJSON, FieldTypeToJSONTyped, FileTagApi, type FileTagBalanceOutDTO, FileTagBalanceOutDTOFromJSON, FileTagBalanceOutDTOFromJSONTyped, FileTagBalanceOutDTOToJSON, FileTagBalanceOutDTOToJSONTyped, type FileTagFilenamePatternsOutDTO, FileTagFilenamePatternsOutDTOFromJSON, FileTagFilenamePatternsOutDTOFromJSONTyped, FileTagFilenamePatternsOutDTOToJSON, FileTagFilenamePatternsOutDTOToJSONTyped, type FileTagMetadataOutDTO, FileTagMetadataOutDTOFromJSON, FileTagMetadataOutDTOFromJSONTyped, FileTagMetadataOutDTOToJSON, FileTagMetadataOutDTOToJSONTyped, type FileTagResultOutDTO, FileTagResultOutDTOFromJSON, FileTagResultOutDTOFromJSONTyped, FileTagResultOutDTOToJSON, FileTagResultOutDTOToJSONTyped, FilesApi, type FilesCreateUploadInDTO, FilesCreateUploadInDTOFromJSON, FilesCreateUploadInDTOFromJSONTyped, FilesCreateUploadInDTOToJSON, FilesCreateUploadInDTOToJSONTyped, type FilesNextToolCallOutDTO, FilesNextToolCallOutDTOFromJSON, FilesNextToolCallOutDTOFromJSONTyped, FilesNextToolCallOutDTOToJSON, FilesNextToolCallOutDTOToJSONTyped, FilesNextToolCallOutDTOToolEnum, type FilesUploadDetailsOutDTO, FilesUploadDetailsOutDTOFromJSON, FilesUploadDetailsOutDTOFromJSONTyped, FilesUploadDetailsOutDTOMethodEnum, FilesUploadDetailsOutDTOToJSON, FilesUploadDetailsOutDTOToJSONTyped, type FilesUploadInstructionsOutDTO, FilesUploadInstructionsOutDTOFromJSON, FilesUploadInstructionsOutDTOFromJSONTyped, FilesUploadInstructionsOutDTOToJSON, FilesUploadInstructionsOutDTOToJSONTyped, type FindDocumentExtractionsByUserRequest, type FindDocumentExtractionsRequest, type FindDocumentsByUserRequest, type FindDocumentsRequest, type FoundationDTO, FoundationDTOFromJSON, FoundationDTOFromJSONTyped, FoundationDTOToJSON, FoundationDTOToJSONTyped, type FoundationMetaDTO, FoundationMetaDTOFromJSON, FoundationMetaDTOFromJSONTyped, FoundationMetaDTOToJSON, FoundationMetaDTOToJSONTyped, FreeTierApi, type FreeTierConfigOutDTO, FreeTierConfigOutDTOFromJSON, FreeTierConfigOutDTOFromJSONTyped, FreeTierConfigOutDTOToJSON, FreeTierConfigOutDTOToJSONTyped, GeminaChatConversation, GeminaClient, type GeminaClientApis, type GeminaClientOptions, GeminaError, GeminaProcessingError, GeminaTimeoutError, GeminaWebhookVerificationError, type GeminaWebhookVerificationReason, type GenerateTemplateAsyncRequest, type GenerateTemplateFromUrlAsyncRequest, type GenerateTemplateFromUrlInDTO, GenerateTemplateFromUrlInDTOFromJSON, GenerateTemplateFromUrlInDTOFromJSONTyped, GenerateTemplateFromUrlInDTOToJSON, GenerateTemplateFromUrlInDTOToJSONTyped, type GenerateTemplateFromUrlRequest, type GenerateTemplateRequest, type GetChatSessionRequest, type GetCreditHistoryRequest, type GetDocumentByUserRequest, type GetDocumentExtractionByUserRequest, type GetDocumentExtractionRequest, type GetDocumentProcessingResultByCorrelationIdByUserRequest, type GetDocumentProcessingResultByCorrelationIdRequest, type GetDocumentRequest, type GetExtractionCostRequest, type GetExtractionCostsRequest, type GetInvoicePdfRequest, type GetInvoiceRequest, type GetMyFiletagCreditHistoryRequest, type GetMyTransactionsRequest, type GetMyUsageRequest, type GetPlanRequest, type GetTemplateRequest, type GetUserInvoicesRequest, type GetWebhookEndpointRequest, type GetWebhookEventRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type HTTPValidationError, HTTPValidationErrorFromJSON, HTTPValidationErrorFromJSONTyped, HTTPValidationErrorToJSON, HTTPValidationErrorToJSONTyped, type InitOverrideFunction, type InvoiceListOutDTO, InvoiceListOutDTOFromJSON, InvoiceListOutDTOFromJSONTyped, InvoiceListOutDTOToJSON, InvoiceListOutDTOToJSONTyped, type InvoiceOutDTO, InvoiceOutDTOFromJSON, InvoiceOutDTOFromJSONTyped, InvoiceOutDTOToJSON, InvoiceOutDTOToJSONTyped, type InvoicePdfOutDTO, InvoicePdfOutDTOFromJSON, InvoicePdfOutDTOFromJSONTyped, InvoicePdfOutDTOToJSON, InvoicePdfOutDTOToJSONTyped, InvoiceStatus, InvoiceStatusFromJSON, InvoiceStatusFromJSONTyped, InvoiceStatusToJSON, InvoiceStatusToJSONTyped, InvoiceType, InvoiceTypeFromJSON, InvoiceTypeFromJSONTyped, InvoiceTypeToJSON, InvoiceTypeToJSONTyped, JSONApiResponse, type Json, LegalApi, type ListActivePlansRequest, type ListChatSessionsRequest, type ListTemplatesByApiKeyRequest, type ListTemplatesRequest, type ListWebhookEventsRequest, ListWebhookEventsStatusEnum, type LocationInner, LocationInnerFromJSON, LocationInnerFromJSONTyped, LocationInnerToJSON, LocationInnerToJSONTyped, type MatchedChunkDTO, MatchedChunkDTOFromJSON, MatchedChunkDTOFromJSONTyped, MatchedChunkDTOToJSON, MatchedChunkDTOToJSONTyped, MetaApi, type Middleware, type MintRetrievalTokenRequest, type MintRetrievalTokenUserRequest, type ModelPropertyNaming, ModelType, ModelTypeFromJSON, ModelTypeFromJSONTyped, ModelTypeToJSON, ModelTypeToJSONTyped, type NextActionOutDTO, NextActionOutDTOActionEnum, NextActionOutDTOFromJSON, NextActionOutDTOFromJSONTyped, NextActionOutDTOToJSON, NextActionOutDTOToJSONTyped, type NumberOfStoredDocumentsOutDTO, NumberOfStoredDocumentsOutDTOFromJSON, NumberOfStoredDocumentsOutDTOFromJSONTyped, NumberOfStoredDocumentsOutDTOToJSON, NumberOfStoredDocumentsOutDTOToJSONTyped, OperationType, OperationTypeFromJSON, OperationTypeFromJSONTyped, OperationTypeToJSON, OperationTypeToJSONTyped, type PaymentMethodUpdateOutDTO, PaymentMethodUpdateOutDTOFromJSON, PaymentMethodUpdateOutDTOFromJSONTyped, PaymentMethodUpdateOutDTOPurposeEnum, PaymentMethodUpdateOutDTOToJSON, PaymentMethodUpdateOutDTOToJSONTyped, PeriodPresetModel, PeriodPresetModelFromJSON, PeriodPresetModelFromJSONTyped, PeriodPresetModelToJSON, PeriodPresetModelToJSONTyped, type PlanCreditCostOutDTO, PlanCreditCostOutDTOFromJSON, PlanCreditCostOutDTOFromJSONTyped, PlanCreditCostOutDTOToJSON, PlanCreditCostOutDTOToJSONTyped, type PlanDetailOutDTO, PlanDetailOutDTOFromJSON, PlanDetailOutDTOFromJSONTyped, PlanDetailOutDTOToJSON, PlanDetailOutDTOToJSONTyped, type PlanListOutDTO, PlanListOutDTOFromJSON, PlanListOutDTOFromJSONTyped, PlanListOutDTOToJSON, PlanListOutDTOToJSONTyped, type PlanOutDTO, PlanOutDTOFromJSON, PlanOutDTOFromJSONTyped, PlanOutDTOToJSON, PlanOutDTOToJSONTyped, type ProcessDocumentOptions, type PurchaseTopUpRequest, type PurgeChatSession422Response, PurgeChatSession422ResponseFromJSON, PurgeChatSession422ResponseFromJSONTyped, PurgeChatSession422ResponseToJSON, PurgeChatSession422ResponseToJSONTyped, type PurgeChatSessionByUserRequest, type PurgeChatSessionRequest, type PurgeDocumentByUserRequest, type PurgeDocumentExtractionByUserRequest, type PurgeDocumentExtractionRequest, type PurgeDocumentRequest, type PurgeDocumentsWithEndUserIdByUserRequest, type PurgeDocumentsWithEndUserIdRequest, type PurgeDocumentsWithExternalIdByUserRequest, type PurgeDocumentsWithExternalIdRequest, PurgeReasonModel, PurgeReasonModelFromJSON, PurgeReasonModelFromJSONTyped, PurgeReasonModelToJSON, PurgeReasonModelToJSONTyped, type PurgedDocumentsDataOutDTO, PurgedDocumentsDataOutDTOFromJSON, PurgedDocumentsDataOutDTOFromJSONTyped, PurgedDocumentsDataOutDTOToJSON, PurgedDocumentsDataOutDTOToJSONTyped, type QueryMetaDTO, QueryMetaDTOFromJSON, QueryMetaDTOFromJSONTyped, QueryMetaDTOIndexingStateEnum, QueryMetaDTOToJSON, QueryMetaDTOToJSONTyped, type QueryResultItemDTO, QueryResultItemDTOFromJSON, QueryResultItemDTOFromJSONTyped, QueryResultItemDTOToJSON, QueryResultItemDTOToJSONTyped, type RateCardOutDTO, RateCardOutDTOFromJSON, RateCardOutDTOFromJSONTyped, RateCardOutDTOToJSON, RateCardOutDTOToJSONTyped, type RequestContext, type RequestOpts, RequiredError, type ResendWebhookEventRequest, type ResponseChangePlan, ResponseChangePlanFromJSON, ResponseChangePlanFromJSONTyped, ResponseChangePlanToJSON, ResponseChangePlanToJSONTyped, type ResponseContext, ResponseError, ResponseStatus, ResponseStatusFromJSON, ResponseStatusFromJSONTyped, ResponseStatusToJSON, ResponseStatusToJSONTyped, type ResponseTransformer, type ResumeTutorialRequestRequest, type RetrievalAggregateInDTO, RetrievalAggregateInDTOFromJSON, RetrievalAggregateInDTOFromJSONTyped, RetrievalAggregateInDTOGroupByEnum, RetrievalAggregateInDTOToJSON, RetrievalAggregateInDTOToJSONTyped, type RetrievalAggregateOutDTO, RetrievalAggregateOutDTOFromJSON, RetrievalAggregateOutDTOFromJSONTyped, RetrievalAggregateOutDTOToJSON, RetrievalAggregateOutDTOToJSONTyped, type RetrievalAggregateRequest, RetrievalApi, type RetrievalFieldItemDTO, RetrievalFieldItemDTOFromJSON, RetrievalFieldItemDTOFromJSONTyped, RetrievalFieldItemDTOToJSON, RetrievalFieldItemDTOToJSONTyped, type RetrievalFieldsOutDTO, RetrievalFieldsOutDTOFromJSON, RetrievalFieldsOutDTOFromJSONTyped, RetrievalFieldsOutDTOToJSON, RetrievalFieldsOutDTOToJSONTyped, type RetrievalFiltersDTO, RetrievalFiltersDTOFromJSON, RetrievalFiltersDTOFromJSONTyped, RetrievalFiltersDTOToJSON, RetrievalFiltersDTOToJSONTyped, type RetrievalQueryInDTO, RetrievalQueryInDTOFromJSON, RetrievalQueryInDTOFromJSONTyped, RetrievalQueryInDTOModeEnum, RetrievalQueryInDTOSortFieldEnum, RetrievalQueryInDTOSortMethodEnum, RetrievalQueryInDTOToJSON, RetrievalQueryInDTOToJSONTyped, type RetrievalQueryOutDTO, RetrievalQueryOutDTOFromJSON, RetrievalQueryOutDTOFromJSONTyped, RetrievalQueryOutDTOToJSON, RetrievalQueryOutDTOToJSONTyped, type RetrievalQueryRequest, type RetrievalStatusOutDTO, RetrievalStatusOutDTOFromJSON, RetrievalStatusOutDTOFromJSONTyped, RetrievalStatusOutDTOToJSON, RetrievalStatusOutDTOToJSONTyped, type RotateWebhookEndpointSecretRequest, type RowMutableTableModel, RowMutableTableModelFromJSON, RowMutableTableModelFromJSONTyped, RowMutableTableModelToJSON, RowMutableTableModelToJSONTyped, type RowSourcesModel, RowSourcesModelFromJSON, RowSourcesModelFromJSONTyped, RowSourcesModelToJSON, RowSourcesModelToJSONTyped, type SavedFiletagResultRequest, type SavedFiletagResultUserRequest, type SendWebhookTestEventRequest, type SessionTokenInDTO, SessionTokenInDTOFromJSON, SessionTokenInDTOFromJSONTyped, SessionTokenInDTOToJSON, SessionTokenInDTOToJSONTyped, type SessionTokenOutDTO, SessionTokenOutDTOFromJSON, SessionTokenOutDTOFromJSONTyped, SessionTokenOutDTOToJSON, SessionTokenOutDTOToJSONTyped, SessionsApi, type SetMySpendLimitRequest, SortMethodModel, SortMethodModelFromJSON, SortMethodModelFromJSONTyped, SortMethodModelToJSON, SortMethodModelToJSONTyped, type SpendLimitOutDTO, SpendLimitOutDTOFromJSON, SpendLimitOutDTOFromJSONTyped, SpendLimitOutDTOToJSON, SpendLimitOutDTOToJSONTyped, type SpendLimitUpdateInDTO, SpendLimitUpdateInDTOFromJSON, SpendLimitUpdateInDTOFromJSONTyped, SpendLimitUpdateInDTOToJSON, SpendLimitUpdateInDTOToJSONTyped, type StorageUsageOutDTO, StorageUsageOutDTOFromJSON, StorageUsageOutDTOFromJSONTyped, StorageUsageOutDTOToJSON, StorageUsageOutDTOToJSONTyped, type StructuredFilterDTO, StructuredFilterDTOFromJSON, StructuredFilterDTOFromJSONTyped, StructuredFilterDTOOpEnum, StructuredFilterDTOToJSON, StructuredFilterDTOToJSONTyped, type SubmitContactFormRequest, type SubscribeInDTO, SubscribeInDTOFromJSON, SubscribeInDTOFromJSONTyped, SubscribeInDTOToJSON, SubscribeInDTOToJSONTyped, type SubscribeRequest, type SubscriptionOutDTO, SubscriptionOutDTOFromJSON, SubscriptionOutDTOFromJSONTyped, SubscriptionOutDTOToJSON, SubscriptionOutDTOToJSONTyped, SubscriptionStatus, SubscriptionStatusFromJSON, SubscriptionStatusFromJSONTyped, SubscriptionStatusToJSON, SubscriptionStatusToJSONTyped, SubscriptionsApi, SupportLevel, SupportLevelFromJSON, SupportLevelFromJSONTyped, SupportLevelToJSON, SupportLevelToJSONTyped, type TOSOutDTO, TOSOutDTOFromJSON, TOSOutDTOFromJSONTyped, TOSOutDTOToJSON, TOSOutDTOToJSONTyped, type TableDefinitionDTOInput, TableDefinitionDTOInputFromJSON, TableDefinitionDTOInputFromJSONTyped, TableDefinitionDTOInputToJSON, TableDefinitionDTOInputToJSONTyped, type TagDocumentByUserRequest, type TagDocumentRequest, type TagFileBodyDTO, TagFileBodyDTOFromJSON, TagFileBodyDTOFromJSONTyped, TagFileBodyDTOToJSON, TagFileBodyDTOToJSONTyped, type TagFileRequest, type TagUrlInDTO, TagUrlInDTOFromJSON, TagUrlInDTOFromJSONTyped, TagUrlInDTOToJSON, TagUrlInDTOToJSONTyped, type TagUrlRequest, type TemplateListOutDTO, TemplateListOutDTOFromJSON, TemplateListOutDTOFromJSONTyped, TemplateListOutDTOToJSON, TemplateListOutDTOToJSONTyped, type TemplateOutDTO, TemplateOutDTOFromJSON, TemplateOutDTOFromJSONTyped, TemplateOutDTOToJSON, TemplateOutDTOToJSONTyped, type TemplateSchemaDTOInput, TemplateSchemaDTOInputFromJSON, TemplateSchemaDTOInputFromJSONTyped, TemplateSchemaDTOInputToJSON, TemplateSchemaDTOInputToJSONTyped, type TemplateSchemaDTOOutput, TemplateSchemaDTOOutputFromJSON, TemplateSchemaDTOOutputFromJSONTyped, TemplateSchemaDTOOutputToJSON, TemplateSchemaDTOOutputToJSONTyped, TemplateStatusModel, TemplateStatusModelFromJSON, TemplateStatusModelFromJSONTyped, TemplateStatusModelToJSON, TemplateStatusModelToJSONTyped, TemplatesApi, TextApiResponse, type TopUpPackListOutDTO, TopUpPackListOutDTOFromJSON, TopUpPackListOutDTOFromJSONTyped, TopUpPackListOutDTOToJSON, TopUpPackListOutDTOToJSONTyped, type TopUpPackOutDTO, TopUpPackOutDTOFromJSON, TopUpPackOutDTOFromJSONTyped, TopUpPackOutDTOToJSON, TopUpPackOutDTOToJSONTyped, type TopUpPurchaseInDTO, TopUpPurchaseInDTOFromJSON, TopUpPurchaseInDTOFromJSONTyped, TopUpPurchaseInDTOToJSON, TopUpPurchaseInDTOToJSONTyped, type TopUpPurchaseOutDTO, TopUpPurchaseOutDTOFromJSON, TopUpPurchaseOutDTOFromJSONTyped, TopUpPurchaseOutDTOToJSON, TopUpPurchaseOutDTOToJSONTyped, type UnwrapWebhookOptions, type UpdateTemplateInDTO, UpdateTemplateInDTOFromJSON, UpdateTemplateInDTOFromJSONTyped, UpdateTemplateInDTOToJSON, UpdateTemplateInDTOToJSONTyped, type UpdateTemplateRequest, type UpdateWebhookEndpointRequest, type UploadDocumentByUserRequest, type UploadDocumentRequest, UploadExtractionTypeEnum, UploadExtractionTypeEnumFromJSON, UploadExtractionTypeEnumFromJSONTyped, UploadExtractionTypeEnumToJSON, UploadExtractionTypeEnumToJSONTyped, type UploadWebDocumentRequest, type UsageBreakdownListOutDTO, UsageBreakdownListOutDTOFromJSON, UsageBreakdownListOutDTOFromJSONTyped, UsageBreakdownListOutDTOToJSON, UsageBreakdownListOutDTOToJSONTyped, type UsageBreakdownOutDTO, UsageBreakdownOutDTOFromJSON, UsageBreakdownOutDTOFromJSONTyped, UsageBreakdownOutDTOToJSON, UsageBreakdownOutDTOToJSONTyped, type UsageLineItemOutDTO, UsageLineItemOutDTOFromJSON, UsageLineItemOutDTOFromJSONTyped, UsageLineItemOutDTOToJSON, UsageLineItemOutDTOToJSONTyped, type UsageSummaryOutDTO, UsageSummaryOutDTOFromJSON, UsageSummaryOutDTOFromJSONTyped, UsageSummaryOutDTOToJSON, UsageSummaryOutDTOToJSONTyped, VERSION, type ValidateDocumentExtractionRequest, type ValidationColumnModel, ValidationColumnModelFromJSON, ValidationColumnModelFromJSONTyped, ValidationColumnModelToJSON, ValidationColumnModelToJSONTyped, ValidationColumnModelTypeEnum, type ValidationError, ValidationErrorFromJSON, ValidationErrorFromJSONTyped, ValidationErrorToJSON, ValidationErrorToJSONTyped, type ValidationFieldModel, ValidationFieldModelFromJSON, ValidationFieldModelFromJSONTyped, ValidationFieldModelToJSON, ValidationFieldModelToJSONTyped, ValidationFieldModelTypeEnum, type ValidationSchemaModel, ValidationSchemaModelFromJSON, ValidationSchemaModelFromJSONTyped, ValidationSchemaModelToJSON, ValidationSchemaModelToJSONTyped, type Value, type ValueAnyOfInner, ValueAnyOfInnerFromJSON, ValueAnyOfInnerFromJSONTyped, ValueAnyOfInnerToJSON, ValueAnyOfInnerToJSONTyped, ValueFromJSON, ValueFromJSONTyped, ValueToJSON, ValueToJSONTyped, type ValuesValue, ValuesValueFromJSON, ValuesValueFromJSONTyped, ValuesValueToJSON, ValuesValueToJSONTyped, type VerifiedDiffEntryOutDTO, VerifiedDiffEntryOutDTOFromJSON, VerifiedDiffEntryOutDTOFromJSONTyped, VerifiedDiffEntryOutDTOStatusEnum, VerifiedDiffEntryOutDTOToJSON, VerifiedDiffEntryOutDTOToJSONTyped, type ViewMetaOutDTO, ViewMetaOutDTOFromJSON, ViewMetaOutDTOFromJSONTyped, ViewMetaOutDTOToJSON, ViewMetaOutDTOToJSONTyped, VoidApiResponse, type VolumeDiscountTierOutDTO, VolumeDiscountTierOutDTOFromJSON, VolumeDiscountTierOutDTOFromJSONTyped, VolumeDiscountTierOutDTOToJSON, VolumeDiscountTierOutDTOToJSONTyped, type WebDocumentUploadInDTO, WebDocumentUploadInDTOFromJSON, WebDocumentUploadInDTOFromJSONTyped, WebDocumentUploadInDTOToJSON, WebDocumentUploadInDTOToJSONTyped, type WebhookAttemptOutDTO, WebhookAttemptOutDTOFromJSON, WebhookAttemptOutDTOFromJSONTyped, WebhookAttemptOutDTOToJSON, WebhookAttemptOutDTOToJSONTyped, type WebhookDeliveryResultOutDTO, WebhookDeliveryResultOutDTOFromJSON, WebhookDeliveryResultOutDTOFromJSONTyped, WebhookDeliveryResultOutDTOToJSON, WebhookDeliveryResultOutDTOToJSONTyped, type WebhookEndpointCreateInDTO, WebhookEndpointCreateInDTOFromJSON, WebhookEndpointCreateInDTOFromJSONTyped, WebhookEndpointCreateInDTOToJSON, WebhookEndpointCreateInDTOToJSONTyped, type WebhookEndpointListOutDTO, WebhookEndpointListOutDTOFromJSON, WebhookEndpointListOutDTOFromJSONTyped, WebhookEndpointListOutDTOToJSON, WebhookEndpointListOutDTOToJSONTyped, type WebhookEndpointOutDTO, WebhookEndpointOutDTODisabledReasonEnum, WebhookEndpointOutDTOFromJSON, WebhookEndpointOutDTOFromJSONTyped, WebhookEndpointOutDTOToJSON, WebhookEndpointOutDTOToJSONTyped, type WebhookEndpointUpdateInDTO, WebhookEndpointUpdateInDTOFromJSON, WebhookEndpointUpdateInDTOFromJSONTyped, WebhookEndpointUpdateInDTOToJSON, WebhookEndpointUpdateInDTOToJSONTyped, type WebhookEvent, type WebhookEventListOutDTO, WebhookEventListOutDTOFromJSON, WebhookEventListOutDTOFromJSONTyped, WebhookEventListOutDTOToJSON, WebhookEventListOutDTOToJSONTyped, type WebhookEventOutDTO, WebhookEventOutDTOFailureReasonEnum, WebhookEventOutDTOFromJSON, WebhookEventOutDTOFromJSONTyped, WebhookEventOutDTOStatusEnum, WebhookEventOutDTOToJSON, WebhookEventOutDTOToJSONTyped, WebhookEventOutDTOTypeEnum, type WebhookHeaders, type WebhookResponseDTO, WebhookResponseDTOFromJSON, WebhookResponseDTOFromJSONTyped, WebhookResponseDTOToJSON, WebhookResponseDTOToJSONTyped, type WebhookTestEvent, type WebhookTestEventData, WebhookTestEventDataFromJSON, WebhookTestEventDataFromJSONTyped, WebhookTestEventDataToJSON, WebhookTestEventDataToJSONTyped, WebhookTestEventFromJSON, WebhookTestEventFromJSONTyped, WebhookTestEventToJSON, WebhookTestEventToJSONTyped, WebhookTestEventTypeEnum, type WebhookTestWebhookEvent, WebhooksApi, canConsumeForm, exists, instanceOfAddExtractionsInDTO, instanceOfAggregateMetaDTO, instanceOfAggregateMetricDTO, instanceOfAggregateRowDTO, instanceOfChatMessageOutDTO, instanceOfChatQueryInDTO, instanceOfChatQueryOutDTO, instanceOfChatSessionListOutDTO, instanceOfChatSessionOutDTO, instanceOfChatTranscriptOutDTO, instanceOfCheckoutOutDTO, instanceOfColumnDefinitionDTO, instanceOfComparisonSummaryModel, instanceOfContactFormInDTO, instanceOfContractOutDTO, instanceOfContractStatus, instanceOfCountBreakdownModel, instanceOfCreateTemplateInDTO, instanceOfCreatedWebhookEndpointOutDTO, instanceOfCreditMeter, instanceOfCreditMeterFilter, instanceOfCreditTransactionListOutDTO, instanceOfCreditTransactionOutDTO, instanceOfCreditTransactionType, instanceOfDataCenterRegionModel, instanceOfDataRetentionPeriodModel, instanceOfDocumentAddExtractionsMetaOutDTO, instanceOfDocumentAddExtractionsOutDTO, instanceOfDocumentDataOutDTO, instanceOfDocumentFileTypeModel, instanceOfDocumentMetaOutDTO, instanceOfDocumentPrimaryViewOutDTO, instanceOfDocumentProcessingMetaOutDTO, instanceOfDocumentProcessingResultOutDTO, instanceOfDocumentPurgingResultOutDTO, instanceOfDocumentViewDataOutDTO, instanceOfDocumentViewMetaOutDTO, instanceOfDocumentViewOutDTO, instanceOfDocumentsViewOutDTO, instanceOfEnterpriseTransactionListOutDTO, instanceOfEnterpriseTransactionOutDTO, instanceOfExtractionCompletedEvent, instanceOfExtractionCompletedEventData, instanceOfExtractionCostOutDTO, instanceOfExtractionCostOutResultDTO, instanceOfExtractionCostStateModel, instanceOfExtractionCostsDataOutDTO, instanceOfExtractionCostsOutDTO, instanceOfExtractionDocumentViewMetaOutDTO, instanceOfExtractionMetaOutDTO, instanceOfExtractionPrimaryViewOutDTO, instanceOfExtractionProcessingResultOutDTO, instanceOfExtractionTypeModel, instanceOfExtractionValidationInDTO, instanceOfExtractionValidationMetaOutDTO, instanceOfExtractionValidationResultOutDTO, instanceOfExtractionViewDataOutDTO, instanceOfExtractionViewMetaOutDTO, instanceOfExtractionViewOutDTO, instanceOfExtractionsViewOutDTO, instanceOfFeatureType, instanceOfFieldDefinitionDTO, instanceOfFieldDifferenceModel, instanceOfFieldType, instanceOfFileTagBalanceOutDTO, instanceOfFileTagFilenamePatternsOutDTO, instanceOfFileTagMetadataOutDTO, instanceOfFileTagResultOutDTO, instanceOfFilesCreateUploadInDTO, instanceOfFilesNextToolCallOutDTO, instanceOfFilesUploadDetailsOutDTO, instanceOfFilesUploadInstructionsOutDTO, instanceOfFoundationDTO, instanceOfFoundationMetaDTO, instanceOfFreeTierConfigOutDTO, instanceOfGenerateTemplateFromUrlInDTO, instanceOfHTTPValidationError, instanceOfInvoiceListOutDTO, instanceOfInvoiceOutDTO, instanceOfInvoicePdfOutDTO, instanceOfInvoiceStatus, instanceOfInvoiceType, instanceOfLocationInner, instanceOfMatchedChunkDTO, instanceOfModelType, instanceOfNextActionOutDTO, instanceOfNumberOfStoredDocumentsOutDTO, instanceOfOperationType, instanceOfPaymentMethodUpdateOutDTO, instanceOfPeriodPresetModel, instanceOfPlanCreditCostOutDTO, instanceOfPlanDetailOutDTO, instanceOfPlanListOutDTO, instanceOfPlanOutDTO, instanceOfPurgeReasonModel, instanceOfPurgedDocumentsDataOutDTO, instanceOfQueryMetaDTO, instanceOfQueryResultItemDTO, instanceOfRateCardOutDTO, instanceOfResponseChangePlan, instanceOfResponseStatus, instanceOfRetrievalAggregateInDTO, instanceOfRetrievalAggregateOutDTO, instanceOfRetrievalFieldItemDTO, instanceOfRetrievalFieldsOutDTO, instanceOfRetrievalFiltersDTO, instanceOfRetrievalQueryInDTO, instanceOfRetrievalQueryOutDTO, instanceOfRetrievalStatusOutDTO, instanceOfRowMutableTableModel, instanceOfRowSourcesModel, instanceOfSessionTokenInDTO, instanceOfSessionTokenOutDTO, instanceOfSortMethodModel, instanceOfSpendLimitOutDTO, instanceOfSpendLimitUpdateInDTO, instanceOfStorageUsageOutDTO, instanceOfStructuredFilterDTO, instanceOfSubscribeInDTO, instanceOfSubscriptionOutDTO, instanceOfSubscriptionStatus, instanceOfSupportLevel, instanceOfTOSOutDTO, instanceOfTableDefinitionDTOInput, instanceOfTagFileBodyDTO, instanceOfTagUrlInDTO, instanceOfTemplateListOutDTO, instanceOfTemplateOutDTO, instanceOfTemplateSchemaDTOInput, instanceOfTemplateSchemaDTOOutput, instanceOfTemplateStatusModel, instanceOfTopUpPackListOutDTO, instanceOfTopUpPackOutDTO, instanceOfTopUpPurchaseInDTO, instanceOfTopUpPurchaseOutDTO, instanceOfUpdateTemplateInDTO, instanceOfUploadExtractionTypeEnum, instanceOfUsageBreakdownListOutDTO, instanceOfUsageBreakdownOutDTO, instanceOfUsageLineItemOutDTO, instanceOfUsageSummaryOutDTO, instanceOfValidationColumnModel, instanceOfValidationError, instanceOfValidationFieldModel, instanceOfValidationSchemaModel, instanceOfValue, instanceOfValueAnyOfInner, instanceOfValuesValue, instanceOfVerifiedDiffEntryOutDTO, instanceOfViewMetaOutDTO, instanceOfVolumeDiscountTierOutDTO, instanceOfWebDocumentUploadInDTO, instanceOfWebhookAttemptOutDTO, instanceOfWebhookDeliveryResultOutDTO, instanceOfWebhookEndpointCreateInDTO, instanceOfWebhookEndpointListOutDTO, instanceOfWebhookEndpointOutDTO, instanceOfWebhookEndpointUpdateInDTO, instanceOfWebhookEventListOutDTO, instanceOfWebhookEventOutDTO, instanceOfWebhookResponseDTO, instanceOfWebhookTestEvent, instanceOfWebhookTestEventData, isExtractionCompleted, isWebhookTest, mapValues, querystring, unwrapWebhook };
package/dist/index.d.ts CHANGED
@@ -13528,7 +13528,9 @@ type GeminaWebhookVerificationReason = 'missing_header' | 'ambiguous_header' | '
13528
13528
  */
13529
13529
  declare class GeminaWebhookVerificationError extends GeminaError {
13530
13530
  readonly reason: GeminaWebhookVerificationReason;
13531
- constructor(reason: GeminaWebhookVerificationReason, message: string);
13531
+ /** The underlying error, when the refusal came from one (a body that is not JSON, say). */
13532
+ readonly cause?: unknown;
13533
+ constructor(reason: GeminaWebhookVerificationReason, message: string, cause?: unknown);
13532
13534
  }
13533
13535
 
13534
13536
  /**
@@ -13551,7 +13553,7 @@ interface WebhookEvent {
13551
13553
  type: string | null;
13552
13554
  /** When the event was recorded; the same on every retry. */
13553
13555
  timestamp: string | null;
13554
- /** Typed for the known event types (narrow with the guards below); the parsed value otherwise. */
13556
+ /** Typed for the known event types (narrow with the guards below); the parsed value otherwise, or `null` when the body has no `data`. */
13555
13557
  data: unknown;
13556
13558
  /** The whole parsed body. */
13557
13559
  raw: Record<string, unknown>;
@@ -13584,6 +13586,6 @@ declare function unwrapWebhook(body: string | ArrayBuffer | ArrayBufferView, hea
13584
13586
  * client sends NO custom User-Agent header (browsers forbid overriding it).
13585
13587
  * VERSION is exported for consumers and diagnostics only.
13586
13588
  */
13587
- declare const VERSION = "0.17.0";
13589
+ declare const VERSION = "0.17.1";
13588
13590
 
13589
13591
  export { type ActivateTemplateRequest, type AddDocumentExtractionsByUserRequest, type AddDocumentExtractionsRequest, type AddExtractionsInDTO, AddExtractionsInDTOFromJSON, AddExtractionsInDTOFromJSONTyped, AddExtractionsInDTOToJSON, AddExtractionsInDTOToJSONTyped, type AggregateMetaDTO, AggregateMetaDTOFromJSON, AggregateMetaDTOFromJSONTyped, AggregateMetaDTOToJSON, AggregateMetaDTOToJSONTyped, type AggregateMetricDTO, AggregateMetricDTOFieldEnum, AggregateMetricDTOFromJSON, AggregateMetricDTOFromJSONTyped, AggregateMetricDTOOpEnum, AggregateMetricDTOToJSON, AggregateMetricDTOToJSONTyped, type AggregateRowDTO, AggregateRowDTOFromJSON, AggregateRowDTOFromJSONTyped, AggregateRowDTOToJSON, AggregateRowDTOToJSONTyped, type ApiResponse, BASE_PATH, BaseAPI, BillingApi, BlobApiResponse, COLLECTION_FORMATS, type ChangePlanRequest, ChatApi, type ChatMessageOutDTO, ChatMessageOutDTOFromJSON, ChatMessageOutDTOFromJSONTyped, ChatMessageOutDTOToJSON, ChatMessageOutDTOToJSONTyped, type ChatQueryInDTO, ChatQueryInDTOFromJSON, ChatQueryInDTOFromJSONTyped, ChatQueryInDTOToJSON, ChatQueryInDTOToJSONTyped, type ChatQueryOutDTO, ChatQueryOutDTOFromJSON, ChatQueryOutDTOFromJSONTyped, ChatQueryOutDTOToJSON, ChatQueryOutDTOToJSONTyped, type ChatQueryRequest, type ChatSessionListOutDTO, ChatSessionListOutDTOFromJSON, ChatSessionListOutDTOFromJSONTyped, ChatSessionListOutDTOToJSON, ChatSessionListOutDTOToJSONTyped, type ChatSessionOutDTO, ChatSessionOutDTOFromJSON, ChatSessionOutDTOFromJSONTyped, ChatSessionOutDTOToJSON, ChatSessionOutDTOToJSONTyped, type ChatTranscriptOutDTO, ChatTranscriptOutDTOFromJSON, ChatTranscriptOutDTOFromJSONTyped, ChatTranscriptOutDTOToJSON, ChatTranscriptOutDTOToJSONTyped, type CheckoutOutDTO, CheckoutOutDTOFromJSON, CheckoutOutDTOFromJSONTyped, CheckoutOutDTOStatusEnum, CheckoutOutDTOToJSON, CheckoutOutDTOToJSONTyped, type ColumnDefinitionDTO, ColumnDefinitionDTOFromJSON, ColumnDefinitionDTOFromJSONTyped, ColumnDefinitionDTOToJSON, ColumnDefinitionDTOToJSONTyped, type ComparisonSummaryModel, ComparisonSummaryModelFromJSON, ComparisonSummaryModelFromJSONTyped, ComparisonSummaryModelToJSON, ComparisonSummaryModelToJSONTyped, Configuration, type ConfigurationParameters, type Consume, ContactApi, type ContactFormInDTO, ContactFormInDTOFromJSON, ContactFormInDTOFromJSONTyped, ContactFormInDTOToJSON, ContactFormInDTOToJSONTyped, type ContractOutDTO, ContractOutDTOFromJSON, ContractOutDTOFromJSONTyped, ContractOutDTOToJSON, ContractOutDTOToJSONTyped, ContractStatus, ContractStatusFromJSON, ContractStatusFromJSONTyped, ContractStatusToJSON, ContractStatusToJSONTyped, type ConversationOptions, type CountBreakdownModel, CountBreakdownModelFromJSON, CountBreakdownModelFromJSONTyped, CountBreakdownModelToJSON, CountBreakdownModelToJSONTyped, type CreateDocumentProcessingRequestByUserRequest, type CreateDocumentProcessingRequestRequest, type CreateTemplateInDTO, CreateTemplateInDTOFromJSON, CreateTemplateInDTOFromJSONTyped, CreateTemplateInDTOToJSON, CreateTemplateInDTOToJSONTyped, type CreateTemplateRequest, type CreateUploadRequest, type CreateWebDocumentProcessingRequestByUserRequest, type CreateWebDocumentProcessingRequestRequest, type CreateWebhookEndpointRequest, type CreatedWebhookEndpointOutDTO, CreatedWebhookEndpointOutDTODisabledReasonEnum, CreatedWebhookEndpointOutDTOFromJSON, CreatedWebhookEndpointOutDTOFromJSONTyped, CreatedWebhookEndpointOutDTOToJSON, CreatedWebhookEndpointOutDTOToJSONTyped, CreditMeter, CreditMeterFilter, CreditMeterFilterFromJSON, CreditMeterFilterFromJSONTyped, CreditMeterFilterToJSON, CreditMeterFilterToJSONTyped, CreditMeterFromJSON, CreditMeterFromJSONTyped, CreditMeterToJSON, CreditMeterToJSONTyped, type CreditTransactionListOutDTO, CreditTransactionListOutDTOFromJSON, CreditTransactionListOutDTOFromJSONTyped, CreditTransactionListOutDTOToJSON, CreditTransactionListOutDTOToJSONTyped, type CreditTransactionOutDTO, CreditTransactionOutDTOFromJSON, CreditTransactionOutDTOFromJSONTyped, CreditTransactionOutDTOToJSON, CreditTransactionOutDTOToJSONTyped, CreditTransactionType, CreditTransactionTypeFromJSON, CreditTransactionTypeFromJSONTyped, CreditTransactionTypeToJSON, CreditTransactionTypeToJSONTyped, DEFAULT_BASE_URL, DataCenterRegionModel, DataCenterRegionModelFromJSON, DataCenterRegionModelFromJSONTyped, DataCenterRegionModelToJSON, DataCenterRegionModelToJSONTyped, DataRetentionPeriodModel, DataRetentionPeriodModelFromJSON, DataRetentionPeriodModelFromJSONTyped, DataRetentionPeriodModelToJSON, DataRetentionPeriodModelToJSONTyped, type DeactivateTemplateRequest, DefaultConfig, type DeleteChatSessionRequest, type DeleteTemplateRequest, type DeleteWebhookEndpointRequest, type DocumentAddExtractionsMetaOutDTO, DocumentAddExtractionsMetaOutDTOFromJSON, DocumentAddExtractionsMetaOutDTOFromJSONTyped, DocumentAddExtractionsMetaOutDTOToJSON, DocumentAddExtractionsMetaOutDTOToJSONTyped, type DocumentAddExtractionsOutDTO, DocumentAddExtractionsOutDTOFromJSON, DocumentAddExtractionsOutDTOFromJSONTyped, DocumentAddExtractionsOutDTOToJSON, DocumentAddExtractionsOutDTOToJSONTyped, DocumentApi, type DocumentDataOutDTO, DocumentDataOutDTOFromJSON, DocumentDataOutDTOFromJSONTyped, DocumentDataOutDTOToJSON, DocumentDataOutDTOToJSONTyped, DocumentFileTypeModel, DocumentFileTypeModelFromJSON, DocumentFileTypeModelFromJSONTyped, DocumentFileTypeModelToJSON, DocumentFileTypeModelToJSONTyped, type DocumentMetaOutDTO, DocumentMetaOutDTOFromJSON, DocumentMetaOutDTOFromJSONTyped, DocumentMetaOutDTOToJSON, DocumentMetaOutDTOToJSONTyped, type DocumentPrimaryViewOutDTO, DocumentPrimaryViewOutDTOFromJSON, DocumentPrimaryViewOutDTOFromJSONTyped, DocumentPrimaryViewOutDTOToJSON, DocumentPrimaryViewOutDTOToJSONTyped, type DocumentProcessingMetaOutDTO, DocumentProcessingMetaOutDTOFromJSON, DocumentProcessingMetaOutDTOFromJSONTyped, DocumentProcessingMetaOutDTOToJSON, DocumentProcessingMetaOutDTOToJSONTyped, type DocumentProcessingResultOutDTO, DocumentProcessingResultOutDTOFromJSON, DocumentProcessingResultOutDTOFromJSONTyped, DocumentProcessingResultOutDTOToJSON, DocumentProcessingResultOutDTOToJSONTyped, type DocumentPurgingResultOutDTO, DocumentPurgingResultOutDTOFromJSON, DocumentPurgingResultOutDTOFromJSONTyped, DocumentPurgingResultOutDTOToJSON, DocumentPurgingResultOutDTOToJSONTyped, type DocumentSource, type DocumentViewDataOutDTO, DocumentViewDataOutDTOFromJSON, DocumentViewDataOutDTOFromJSONTyped, DocumentViewDataOutDTOToJSON, DocumentViewDataOutDTOToJSONTyped, type DocumentViewMetaOutDTO, DocumentViewMetaOutDTOFromJSON, DocumentViewMetaOutDTOFromJSONTyped, DocumentViewMetaOutDTOToJSON, DocumentViewMetaOutDTOToJSONTyped, type DocumentViewOutDTO, DocumentViewOutDTOFromJSON, DocumentViewOutDTOFromJSONTyped, DocumentViewOutDTOToJSON, DocumentViewOutDTOToJSONTyped, type DocumentsViewOutDTO, DocumentsViewOutDTOFromJSON, DocumentsViewOutDTOFromJSONTyped, DocumentsViewOutDTOToJSON, DocumentsViewOutDTOToJSONTyped, EnterpriseApi, type EnterpriseTransactionListOutDTO, EnterpriseTransactionListOutDTOFromJSON, EnterpriseTransactionListOutDTOFromJSONTyped, EnterpriseTransactionListOutDTOToJSON, EnterpriseTransactionListOutDTOToJSONTyped, type EnterpriseTransactionOutDTO, EnterpriseTransactionOutDTOFromJSON, EnterpriseTransactionOutDTOFromJSONTyped, EnterpriseTransactionOutDTOToJSON, EnterpriseTransactionOutDTOToJSONTyped, type ErrorContext, type ExtractionCompletedEvent, type ExtractionCompletedEventData, ExtractionCompletedEventDataFromJSON, ExtractionCompletedEventDataFromJSONTyped, ExtractionCompletedEventDataToJSON, ExtractionCompletedEventDataToJSONTyped, ExtractionCompletedEventFromJSON, ExtractionCompletedEventFromJSONTyped, ExtractionCompletedEventToJSON, ExtractionCompletedEventToJSONTyped, ExtractionCompletedEventTypeEnum, type ExtractionCompletedWebhookEvent, type ExtractionCostOutDTO, ExtractionCostOutDTOFromJSON, ExtractionCostOutDTOFromJSONTyped, ExtractionCostOutDTOToJSON, ExtractionCostOutDTOToJSONTyped, type ExtractionCostOutResultDTO, ExtractionCostOutResultDTOFromJSON, ExtractionCostOutResultDTOFromJSONTyped, ExtractionCostOutResultDTOToJSON, ExtractionCostOutResultDTOToJSONTyped, ExtractionCostStateModel, ExtractionCostStateModelFromJSON, ExtractionCostStateModelFromJSONTyped, ExtractionCostStateModelToJSON, ExtractionCostStateModelToJSONTyped, type ExtractionCostsDataOutDTO, ExtractionCostsDataOutDTOFromJSON, ExtractionCostsDataOutDTOFromJSONTyped, ExtractionCostsDataOutDTOToJSON, ExtractionCostsDataOutDTOToJSONTyped, type ExtractionCostsOutDTO, ExtractionCostsOutDTOFromJSON, ExtractionCostsOutDTOFromJSONTyped, ExtractionCostsOutDTOToJSON, ExtractionCostsOutDTOToJSONTyped, type ExtractionDocumentViewMetaOutDTO, ExtractionDocumentViewMetaOutDTOFromJSON, ExtractionDocumentViewMetaOutDTOFromJSONTyped, ExtractionDocumentViewMetaOutDTOToJSON, ExtractionDocumentViewMetaOutDTOToJSONTyped, type ExtractionMetaOutDTO, ExtractionMetaOutDTOFromJSON, ExtractionMetaOutDTOFromJSONTyped, ExtractionMetaOutDTOToJSON, ExtractionMetaOutDTOToJSONTyped, type ExtractionPrimaryViewOutDTO, ExtractionPrimaryViewOutDTOFromJSON, ExtractionPrimaryViewOutDTOFromJSONTyped, ExtractionPrimaryViewOutDTOToJSON, ExtractionPrimaryViewOutDTOToJSONTyped, type ExtractionProcessingResultOutDTO, ExtractionProcessingResultOutDTOFromJSON, ExtractionProcessingResultOutDTOFromJSONTyped, ExtractionProcessingResultOutDTOToJSON, ExtractionProcessingResultOutDTOToJSONTyped, ExtractionTypeModel, ExtractionTypeModelFromJSON, ExtractionTypeModelFromJSONTyped, ExtractionTypeModelToJSON, ExtractionTypeModelToJSONTyped, type ExtractionValidationInDTO, ExtractionValidationInDTOFromJSON, ExtractionValidationInDTOFromJSONTyped, ExtractionValidationInDTOToJSON, ExtractionValidationInDTOToJSONTyped, type ExtractionValidationMetaOutDTO, ExtractionValidationMetaOutDTOFromJSON, ExtractionValidationMetaOutDTOFromJSONTyped, ExtractionValidationMetaOutDTOToJSON, ExtractionValidationMetaOutDTOToJSONTyped, type ExtractionValidationResultOutDTO, ExtractionValidationResultOutDTOFromJSON, ExtractionValidationResultOutDTOFromJSONTyped, ExtractionValidationResultOutDTOToJSON, ExtractionValidationResultOutDTOToJSONTyped, type ExtractionViewDataOutDTO, ExtractionViewDataOutDTOFromJSON, ExtractionViewDataOutDTOFromJSONTyped, ExtractionViewDataOutDTOToJSON, ExtractionViewDataOutDTOToJSONTyped, type ExtractionViewMetaOutDTO, ExtractionViewMetaOutDTOFromJSON, ExtractionViewMetaOutDTOFromJSONTyped, ExtractionViewMetaOutDTOToJSON, ExtractionViewMetaOutDTOToJSONTyped, type ExtractionViewOutDTO, ExtractionViewOutDTOFromJSON, ExtractionViewOutDTOFromJSONTyped, ExtractionViewOutDTOToJSON, ExtractionViewOutDTOToJSONTyped, type ExtractionsViewOutDTO, ExtractionsViewOutDTOFromJSON, ExtractionsViewOutDTOFromJSONTyped, ExtractionsViewOutDTOToJSON, ExtractionsViewOutDTOToJSONTyped, FeatureType, FeatureTypeFromJSON, FeatureTypeFromJSONTyped, FeatureTypeToJSON, FeatureTypeToJSONTyped, type FetchAPI, FetchError, type FetchParams, type FieldDefinitionDTO, FieldDefinitionDTOFromJSON, FieldDefinitionDTOFromJSONTyped, FieldDefinitionDTOToJSON, FieldDefinitionDTOToJSONTyped, type FieldDifferenceModel, FieldDifferenceModelFromJSON, FieldDifferenceModelFromJSONTyped, FieldDifferenceModelToJSON, FieldDifferenceModelToJSONTyped, FieldType, FieldTypeFromJSON, FieldTypeFromJSONTyped, FieldTypeToJSON, FieldTypeToJSONTyped, FileTagApi, type FileTagBalanceOutDTO, FileTagBalanceOutDTOFromJSON, FileTagBalanceOutDTOFromJSONTyped, FileTagBalanceOutDTOToJSON, FileTagBalanceOutDTOToJSONTyped, type FileTagFilenamePatternsOutDTO, FileTagFilenamePatternsOutDTOFromJSON, FileTagFilenamePatternsOutDTOFromJSONTyped, FileTagFilenamePatternsOutDTOToJSON, FileTagFilenamePatternsOutDTOToJSONTyped, type FileTagMetadataOutDTO, FileTagMetadataOutDTOFromJSON, FileTagMetadataOutDTOFromJSONTyped, FileTagMetadataOutDTOToJSON, FileTagMetadataOutDTOToJSONTyped, type FileTagResultOutDTO, FileTagResultOutDTOFromJSON, FileTagResultOutDTOFromJSONTyped, FileTagResultOutDTOToJSON, FileTagResultOutDTOToJSONTyped, FilesApi, type FilesCreateUploadInDTO, FilesCreateUploadInDTOFromJSON, FilesCreateUploadInDTOFromJSONTyped, FilesCreateUploadInDTOToJSON, FilesCreateUploadInDTOToJSONTyped, type FilesNextToolCallOutDTO, FilesNextToolCallOutDTOFromJSON, FilesNextToolCallOutDTOFromJSONTyped, FilesNextToolCallOutDTOToJSON, FilesNextToolCallOutDTOToJSONTyped, FilesNextToolCallOutDTOToolEnum, type FilesUploadDetailsOutDTO, FilesUploadDetailsOutDTOFromJSON, FilesUploadDetailsOutDTOFromJSONTyped, FilesUploadDetailsOutDTOMethodEnum, FilesUploadDetailsOutDTOToJSON, FilesUploadDetailsOutDTOToJSONTyped, type FilesUploadInstructionsOutDTO, FilesUploadInstructionsOutDTOFromJSON, FilesUploadInstructionsOutDTOFromJSONTyped, FilesUploadInstructionsOutDTOToJSON, FilesUploadInstructionsOutDTOToJSONTyped, type FindDocumentExtractionsByUserRequest, type FindDocumentExtractionsRequest, type FindDocumentsByUserRequest, type FindDocumentsRequest, type FoundationDTO, FoundationDTOFromJSON, FoundationDTOFromJSONTyped, FoundationDTOToJSON, FoundationDTOToJSONTyped, type FoundationMetaDTO, FoundationMetaDTOFromJSON, FoundationMetaDTOFromJSONTyped, FoundationMetaDTOToJSON, FoundationMetaDTOToJSONTyped, FreeTierApi, type FreeTierConfigOutDTO, FreeTierConfigOutDTOFromJSON, FreeTierConfigOutDTOFromJSONTyped, FreeTierConfigOutDTOToJSON, FreeTierConfigOutDTOToJSONTyped, GeminaChatConversation, GeminaClient, type GeminaClientApis, type GeminaClientOptions, GeminaError, GeminaProcessingError, GeminaTimeoutError, GeminaWebhookVerificationError, type GeminaWebhookVerificationReason, type GenerateTemplateAsyncRequest, type GenerateTemplateFromUrlAsyncRequest, type GenerateTemplateFromUrlInDTO, GenerateTemplateFromUrlInDTOFromJSON, GenerateTemplateFromUrlInDTOFromJSONTyped, GenerateTemplateFromUrlInDTOToJSON, GenerateTemplateFromUrlInDTOToJSONTyped, type GenerateTemplateFromUrlRequest, type GenerateTemplateRequest, type GetChatSessionRequest, type GetCreditHistoryRequest, type GetDocumentByUserRequest, type GetDocumentExtractionByUserRequest, type GetDocumentExtractionRequest, type GetDocumentProcessingResultByCorrelationIdByUserRequest, type GetDocumentProcessingResultByCorrelationIdRequest, type GetDocumentRequest, type GetExtractionCostRequest, type GetExtractionCostsRequest, type GetInvoicePdfRequest, type GetInvoiceRequest, type GetMyFiletagCreditHistoryRequest, type GetMyTransactionsRequest, type GetMyUsageRequest, type GetPlanRequest, type GetTemplateRequest, type GetUserInvoicesRequest, type GetWebhookEndpointRequest, type GetWebhookEventRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type HTTPValidationError, HTTPValidationErrorFromJSON, HTTPValidationErrorFromJSONTyped, HTTPValidationErrorToJSON, HTTPValidationErrorToJSONTyped, type InitOverrideFunction, type InvoiceListOutDTO, InvoiceListOutDTOFromJSON, InvoiceListOutDTOFromJSONTyped, InvoiceListOutDTOToJSON, InvoiceListOutDTOToJSONTyped, type InvoiceOutDTO, InvoiceOutDTOFromJSON, InvoiceOutDTOFromJSONTyped, InvoiceOutDTOToJSON, InvoiceOutDTOToJSONTyped, type InvoicePdfOutDTO, InvoicePdfOutDTOFromJSON, InvoicePdfOutDTOFromJSONTyped, InvoicePdfOutDTOToJSON, InvoicePdfOutDTOToJSONTyped, InvoiceStatus, InvoiceStatusFromJSON, InvoiceStatusFromJSONTyped, InvoiceStatusToJSON, InvoiceStatusToJSONTyped, InvoiceType, InvoiceTypeFromJSON, InvoiceTypeFromJSONTyped, InvoiceTypeToJSON, InvoiceTypeToJSONTyped, JSONApiResponse, type Json, LegalApi, type ListActivePlansRequest, type ListChatSessionsRequest, type ListTemplatesByApiKeyRequest, type ListTemplatesRequest, type ListWebhookEventsRequest, ListWebhookEventsStatusEnum, type LocationInner, LocationInnerFromJSON, LocationInnerFromJSONTyped, LocationInnerToJSON, LocationInnerToJSONTyped, type MatchedChunkDTO, MatchedChunkDTOFromJSON, MatchedChunkDTOFromJSONTyped, MatchedChunkDTOToJSON, MatchedChunkDTOToJSONTyped, MetaApi, type Middleware, type MintRetrievalTokenRequest, type MintRetrievalTokenUserRequest, type ModelPropertyNaming, ModelType, ModelTypeFromJSON, ModelTypeFromJSONTyped, ModelTypeToJSON, ModelTypeToJSONTyped, type NextActionOutDTO, NextActionOutDTOActionEnum, NextActionOutDTOFromJSON, NextActionOutDTOFromJSONTyped, NextActionOutDTOToJSON, NextActionOutDTOToJSONTyped, type NumberOfStoredDocumentsOutDTO, NumberOfStoredDocumentsOutDTOFromJSON, NumberOfStoredDocumentsOutDTOFromJSONTyped, NumberOfStoredDocumentsOutDTOToJSON, NumberOfStoredDocumentsOutDTOToJSONTyped, OperationType, OperationTypeFromJSON, OperationTypeFromJSONTyped, OperationTypeToJSON, OperationTypeToJSONTyped, type PaymentMethodUpdateOutDTO, PaymentMethodUpdateOutDTOFromJSON, PaymentMethodUpdateOutDTOFromJSONTyped, PaymentMethodUpdateOutDTOPurposeEnum, PaymentMethodUpdateOutDTOToJSON, PaymentMethodUpdateOutDTOToJSONTyped, PeriodPresetModel, PeriodPresetModelFromJSON, PeriodPresetModelFromJSONTyped, PeriodPresetModelToJSON, PeriodPresetModelToJSONTyped, type PlanCreditCostOutDTO, PlanCreditCostOutDTOFromJSON, PlanCreditCostOutDTOFromJSONTyped, PlanCreditCostOutDTOToJSON, PlanCreditCostOutDTOToJSONTyped, type PlanDetailOutDTO, PlanDetailOutDTOFromJSON, PlanDetailOutDTOFromJSONTyped, PlanDetailOutDTOToJSON, PlanDetailOutDTOToJSONTyped, type PlanListOutDTO, PlanListOutDTOFromJSON, PlanListOutDTOFromJSONTyped, PlanListOutDTOToJSON, PlanListOutDTOToJSONTyped, type PlanOutDTO, PlanOutDTOFromJSON, PlanOutDTOFromJSONTyped, PlanOutDTOToJSON, PlanOutDTOToJSONTyped, type ProcessDocumentOptions, type PurchaseTopUpRequest, type PurgeChatSession422Response, PurgeChatSession422ResponseFromJSON, PurgeChatSession422ResponseFromJSONTyped, PurgeChatSession422ResponseToJSON, PurgeChatSession422ResponseToJSONTyped, type PurgeChatSessionByUserRequest, type PurgeChatSessionRequest, type PurgeDocumentByUserRequest, type PurgeDocumentExtractionByUserRequest, type PurgeDocumentExtractionRequest, type PurgeDocumentRequest, type PurgeDocumentsWithEndUserIdByUserRequest, type PurgeDocumentsWithEndUserIdRequest, type PurgeDocumentsWithExternalIdByUserRequest, type PurgeDocumentsWithExternalIdRequest, PurgeReasonModel, PurgeReasonModelFromJSON, PurgeReasonModelFromJSONTyped, PurgeReasonModelToJSON, PurgeReasonModelToJSONTyped, type PurgedDocumentsDataOutDTO, PurgedDocumentsDataOutDTOFromJSON, PurgedDocumentsDataOutDTOFromJSONTyped, PurgedDocumentsDataOutDTOToJSON, PurgedDocumentsDataOutDTOToJSONTyped, type QueryMetaDTO, QueryMetaDTOFromJSON, QueryMetaDTOFromJSONTyped, QueryMetaDTOIndexingStateEnum, QueryMetaDTOToJSON, QueryMetaDTOToJSONTyped, type QueryResultItemDTO, QueryResultItemDTOFromJSON, QueryResultItemDTOFromJSONTyped, QueryResultItemDTOToJSON, QueryResultItemDTOToJSONTyped, type RateCardOutDTO, RateCardOutDTOFromJSON, RateCardOutDTOFromJSONTyped, RateCardOutDTOToJSON, RateCardOutDTOToJSONTyped, type RequestContext, type RequestOpts, RequiredError, type ResendWebhookEventRequest, type ResponseChangePlan, ResponseChangePlanFromJSON, ResponseChangePlanFromJSONTyped, ResponseChangePlanToJSON, ResponseChangePlanToJSONTyped, type ResponseContext, ResponseError, ResponseStatus, ResponseStatusFromJSON, ResponseStatusFromJSONTyped, ResponseStatusToJSON, ResponseStatusToJSONTyped, type ResponseTransformer, type ResumeTutorialRequestRequest, type RetrievalAggregateInDTO, RetrievalAggregateInDTOFromJSON, RetrievalAggregateInDTOFromJSONTyped, RetrievalAggregateInDTOGroupByEnum, RetrievalAggregateInDTOToJSON, RetrievalAggregateInDTOToJSONTyped, type RetrievalAggregateOutDTO, RetrievalAggregateOutDTOFromJSON, RetrievalAggregateOutDTOFromJSONTyped, RetrievalAggregateOutDTOToJSON, RetrievalAggregateOutDTOToJSONTyped, type RetrievalAggregateRequest, RetrievalApi, type RetrievalFieldItemDTO, RetrievalFieldItemDTOFromJSON, RetrievalFieldItemDTOFromJSONTyped, RetrievalFieldItemDTOToJSON, RetrievalFieldItemDTOToJSONTyped, type RetrievalFieldsOutDTO, RetrievalFieldsOutDTOFromJSON, RetrievalFieldsOutDTOFromJSONTyped, RetrievalFieldsOutDTOToJSON, RetrievalFieldsOutDTOToJSONTyped, type RetrievalFiltersDTO, RetrievalFiltersDTOFromJSON, RetrievalFiltersDTOFromJSONTyped, RetrievalFiltersDTOToJSON, RetrievalFiltersDTOToJSONTyped, type RetrievalQueryInDTO, RetrievalQueryInDTOFromJSON, RetrievalQueryInDTOFromJSONTyped, RetrievalQueryInDTOModeEnum, RetrievalQueryInDTOSortFieldEnum, RetrievalQueryInDTOSortMethodEnum, RetrievalQueryInDTOToJSON, RetrievalQueryInDTOToJSONTyped, type RetrievalQueryOutDTO, RetrievalQueryOutDTOFromJSON, RetrievalQueryOutDTOFromJSONTyped, RetrievalQueryOutDTOToJSON, RetrievalQueryOutDTOToJSONTyped, type RetrievalQueryRequest, type RetrievalStatusOutDTO, RetrievalStatusOutDTOFromJSON, RetrievalStatusOutDTOFromJSONTyped, RetrievalStatusOutDTOToJSON, RetrievalStatusOutDTOToJSONTyped, type RotateWebhookEndpointSecretRequest, type RowMutableTableModel, RowMutableTableModelFromJSON, RowMutableTableModelFromJSONTyped, RowMutableTableModelToJSON, RowMutableTableModelToJSONTyped, type RowSourcesModel, RowSourcesModelFromJSON, RowSourcesModelFromJSONTyped, RowSourcesModelToJSON, RowSourcesModelToJSONTyped, type SavedFiletagResultRequest, type SavedFiletagResultUserRequest, type SendWebhookTestEventRequest, type SessionTokenInDTO, SessionTokenInDTOFromJSON, SessionTokenInDTOFromJSONTyped, SessionTokenInDTOToJSON, SessionTokenInDTOToJSONTyped, type SessionTokenOutDTO, SessionTokenOutDTOFromJSON, SessionTokenOutDTOFromJSONTyped, SessionTokenOutDTOToJSON, SessionTokenOutDTOToJSONTyped, SessionsApi, type SetMySpendLimitRequest, SortMethodModel, SortMethodModelFromJSON, SortMethodModelFromJSONTyped, SortMethodModelToJSON, SortMethodModelToJSONTyped, type SpendLimitOutDTO, SpendLimitOutDTOFromJSON, SpendLimitOutDTOFromJSONTyped, SpendLimitOutDTOToJSON, SpendLimitOutDTOToJSONTyped, type SpendLimitUpdateInDTO, SpendLimitUpdateInDTOFromJSON, SpendLimitUpdateInDTOFromJSONTyped, SpendLimitUpdateInDTOToJSON, SpendLimitUpdateInDTOToJSONTyped, type StorageUsageOutDTO, StorageUsageOutDTOFromJSON, StorageUsageOutDTOFromJSONTyped, StorageUsageOutDTOToJSON, StorageUsageOutDTOToJSONTyped, type StructuredFilterDTO, StructuredFilterDTOFromJSON, StructuredFilterDTOFromJSONTyped, StructuredFilterDTOOpEnum, StructuredFilterDTOToJSON, StructuredFilterDTOToJSONTyped, type SubmitContactFormRequest, type SubscribeInDTO, SubscribeInDTOFromJSON, SubscribeInDTOFromJSONTyped, SubscribeInDTOToJSON, SubscribeInDTOToJSONTyped, type SubscribeRequest, type SubscriptionOutDTO, SubscriptionOutDTOFromJSON, SubscriptionOutDTOFromJSONTyped, SubscriptionOutDTOToJSON, SubscriptionOutDTOToJSONTyped, SubscriptionStatus, SubscriptionStatusFromJSON, SubscriptionStatusFromJSONTyped, SubscriptionStatusToJSON, SubscriptionStatusToJSONTyped, SubscriptionsApi, SupportLevel, SupportLevelFromJSON, SupportLevelFromJSONTyped, SupportLevelToJSON, SupportLevelToJSONTyped, type TOSOutDTO, TOSOutDTOFromJSON, TOSOutDTOFromJSONTyped, TOSOutDTOToJSON, TOSOutDTOToJSONTyped, type TableDefinitionDTOInput, TableDefinitionDTOInputFromJSON, TableDefinitionDTOInputFromJSONTyped, TableDefinitionDTOInputToJSON, TableDefinitionDTOInputToJSONTyped, type TagDocumentByUserRequest, type TagDocumentRequest, type TagFileBodyDTO, TagFileBodyDTOFromJSON, TagFileBodyDTOFromJSONTyped, TagFileBodyDTOToJSON, TagFileBodyDTOToJSONTyped, type TagFileRequest, type TagUrlInDTO, TagUrlInDTOFromJSON, TagUrlInDTOFromJSONTyped, TagUrlInDTOToJSON, TagUrlInDTOToJSONTyped, type TagUrlRequest, type TemplateListOutDTO, TemplateListOutDTOFromJSON, TemplateListOutDTOFromJSONTyped, TemplateListOutDTOToJSON, TemplateListOutDTOToJSONTyped, type TemplateOutDTO, TemplateOutDTOFromJSON, TemplateOutDTOFromJSONTyped, TemplateOutDTOToJSON, TemplateOutDTOToJSONTyped, type TemplateSchemaDTOInput, TemplateSchemaDTOInputFromJSON, TemplateSchemaDTOInputFromJSONTyped, TemplateSchemaDTOInputToJSON, TemplateSchemaDTOInputToJSONTyped, type TemplateSchemaDTOOutput, TemplateSchemaDTOOutputFromJSON, TemplateSchemaDTOOutputFromJSONTyped, TemplateSchemaDTOOutputToJSON, TemplateSchemaDTOOutputToJSONTyped, TemplateStatusModel, TemplateStatusModelFromJSON, TemplateStatusModelFromJSONTyped, TemplateStatusModelToJSON, TemplateStatusModelToJSONTyped, TemplatesApi, TextApiResponse, type TopUpPackListOutDTO, TopUpPackListOutDTOFromJSON, TopUpPackListOutDTOFromJSONTyped, TopUpPackListOutDTOToJSON, TopUpPackListOutDTOToJSONTyped, type TopUpPackOutDTO, TopUpPackOutDTOFromJSON, TopUpPackOutDTOFromJSONTyped, TopUpPackOutDTOToJSON, TopUpPackOutDTOToJSONTyped, type TopUpPurchaseInDTO, TopUpPurchaseInDTOFromJSON, TopUpPurchaseInDTOFromJSONTyped, TopUpPurchaseInDTOToJSON, TopUpPurchaseInDTOToJSONTyped, type TopUpPurchaseOutDTO, TopUpPurchaseOutDTOFromJSON, TopUpPurchaseOutDTOFromJSONTyped, TopUpPurchaseOutDTOToJSON, TopUpPurchaseOutDTOToJSONTyped, type UnwrapWebhookOptions, type UpdateTemplateInDTO, UpdateTemplateInDTOFromJSON, UpdateTemplateInDTOFromJSONTyped, UpdateTemplateInDTOToJSON, UpdateTemplateInDTOToJSONTyped, type UpdateTemplateRequest, type UpdateWebhookEndpointRequest, type UploadDocumentByUserRequest, type UploadDocumentRequest, UploadExtractionTypeEnum, UploadExtractionTypeEnumFromJSON, UploadExtractionTypeEnumFromJSONTyped, UploadExtractionTypeEnumToJSON, UploadExtractionTypeEnumToJSONTyped, type UploadWebDocumentRequest, type UsageBreakdownListOutDTO, UsageBreakdownListOutDTOFromJSON, UsageBreakdownListOutDTOFromJSONTyped, UsageBreakdownListOutDTOToJSON, UsageBreakdownListOutDTOToJSONTyped, type UsageBreakdownOutDTO, UsageBreakdownOutDTOFromJSON, UsageBreakdownOutDTOFromJSONTyped, UsageBreakdownOutDTOToJSON, UsageBreakdownOutDTOToJSONTyped, type UsageLineItemOutDTO, UsageLineItemOutDTOFromJSON, UsageLineItemOutDTOFromJSONTyped, UsageLineItemOutDTOToJSON, UsageLineItemOutDTOToJSONTyped, type UsageSummaryOutDTO, UsageSummaryOutDTOFromJSON, UsageSummaryOutDTOFromJSONTyped, UsageSummaryOutDTOToJSON, UsageSummaryOutDTOToJSONTyped, VERSION, type ValidateDocumentExtractionRequest, type ValidationColumnModel, ValidationColumnModelFromJSON, ValidationColumnModelFromJSONTyped, ValidationColumnModelToJSON, ValidationColumnModelToJSONTyped, ValidationColumnModelTypeEnum, type ValidationError, ValidationErrorFromJSON, ValidationErrorFromJSONTyped, ValidationErrorToJSON, ValidationErrorToJSONTyped, type ValidationFieldModel, ValidationFieldModelFromJSON, ValidationFieldModelFromJSONTyped, ValidationFieldModelToJSON, ValidationFieldModelToJSONTyped, ValidationFieldModelTypeEnum, type ValidationSchemaModel, ValidationSchemaModelFromJSON, ValidationSchemaModelFromJSONTyped, ValidationSchemaModelToJSON, ValidationSchemaModelToJSONTyped, type Value, type ValueAnyOfInner, ValueAnyOfInnerFromJSON, ValueAnyOfInnerFromJSONTyped, ValueAnyOfInnerToJSON, ValueAnyOfInnerToJSONTyped, ValueFromJSON, ValueFromJSONTyped, ValueToJSON, ValueToJSONTyped, type ValuesValue, ValuesValueFromJSON, ValuesValueFromJSONTyped, ValuesValueToJSON, ValuesValueToJSONTyped, type VerifiedDiffEntryOutDTO, VerifiedDiffEntryOutDTOFromJSON, VerifiedDiffEntryOutDTOFromJSONTyped, VerifiedDiffEntryOutDTOStatusEnum, VerifiedDiffEntryOutDTOToJSON, VerifiedDiffEntryOutDTOToJSONTyped, type ViewMetaOutDTO, ViewMetaOutDTOFromJSON, ViewMetaOutDTOFromJSONTyped, ViewMetaOutDTOToJSON, ViewMetaOutDTOToJSONTyped, VoidApiResponse, type VolumeDiscountTierOutDTO, VolumeDiscountTierOutDTOFromJSON, VolumeDiscountTierOutDTOFromJSONTyped, VolumeDiscountTierOutDTOToJSON, VolumeDiscountTierOutDTOToJSONTyped, type WebDocumentUploadInDTO, WebDocumentUploadInDTOFromJSON, WebDocumentUploadInDTOFromJSONTyped, WebDocumentUploadInDTOToJSON, WebDocumentUploadInDTOToJSONTyped, type WebhookAttemptOutDTO, WebhookAttemptOutDTOFromJSON, WebhookAttemptOutDTOFromJSONTyped, WebhookAttemptOutDTOToJSON, WebhookAttemptOutDTOToJSONTyped, type WebhookDeliveryResultOutDTO, WebhookDeliveryResultOutDTOFromJSON, WebhookDeliveryResultOutDTOFromJSONTyped, WebhookDeliveryResultOutDTOToJSON, WebhookDeliveryResultOutDTOToJSONTyped, type WebhookEndpointCreateInDTO, WebhookEndpointCreateInDTOFromJSON, WebhookEndpointCreateInDTOFromJSONTyped, WebhookEndpointCreateInDTOToJSON, WebhookEndpointCreateInDTOToJSONTyped, type WebhookEndpointListOutDTO, WebhookEndpointListOutDTOFromJSON, WebhookEndpointListOutDTOFromJSONTyped, WebhookEndpointListOutDTOToJSON, WebhookEndpointListOutDTOToJSONTyped, type WebhookEndpointOutDTO, WebhookEndpointOutDTODisabledReasonEnum, WebhookEndpointOutDTOFromJSON, WebhookEndpointOutDTOFromJSONTyped, WebhookEndpointOutDTOToJSON, WebhookEndpointOutDTOToJSONTyped, type WebhookEndpointUpdateInDTO, WebhookEndpointUpdateInDTOFromJSON, WebhookEndpointUpdateInDTOFromJSONTyped, WebhookEndpointUpdateInDTOToJSON, WebhookEndpointUpdateInDTOToJSONTyped, type WebhookEvent, type WebhookEventListOutDTO, WebhookEventListOutDTOFromJSON, WebhookEventListOutDTOFromJSONTyped, WebhookEventListOutDTOToJSON, WebhookEventListOutDTOToJSONTyped, type WebhookEventOutDTO, WebhookEventOutDTOFailureReasonEnum, WebhookEventOutDTOFromJSON, WebhookEventOutDTOFromJSONTyped, WebhookEventOutDTOStatusEnum, WebhookEventOutDTOToJSON, WebhookEventOutDTOToJSONTyped, WebhookEventOutDTOTypeEnum, type WebhookHeaders, type WebhookResponseDTO, WebhookResponseDTOFromJSON, WebhookResponseDTOFromJSONTyped, WebhookResponseDTOToJSON, WebhookResponseDTOToJSONTyped, type WebhookTestEvent, type WebhookTestEventData, WebhookTestEventDataFromJSON, WebhookTestEventDataFromJSONTyped, WebhookTestEventDataToJSON, WebhookTestEventDataToJSONTyped, WebhookTestEventFromJSON, WebhookTestEventFromJSONTyped, WebhookTestEventToJSON, WebhookTestEventToJSONTyped, WebhookTestEventTypeEnum, type WebhookTestWebhookEvent, WebhooksApi, canConsumeForm, exists, instanceOfAddExtractionsInDTO, instanceOfAggregateMetaDTO, instanceOfAggregateMetricDTO, instanceOfAggregateRowDTO, instanceOfChatMessageOutDTO, instanceOfChatQueryInDTO, instanceOfChatQueryOutDTO, instanceOfChatSessionListOutDTO, instanceOfChatSessionOutDTO, instanceOfChatTranscriptOutDTO, instanceOfCheckoutOutDTO, instanceOfColumnDefinitionDTO, instanceOfComparisonSummaryModel, instanceOfContactFormInDTO, instanceOfContractOutDTO, instanceOfContractStatus, instanceOfCountBreakdownModel, instanceOfCreateTemplateInDTO, instanceOfCreatedWebhookEndpointOutDTO, instanceOfCreditMeter, instanceOfCreditMeterFilter, instanceOfCreditTransactionListOutDTO, instanceOfCreditTransactionOutDTO, instanceOfCreditTransactionType, instanceOfDataCenterRegionModel, instanceOfDataRetentionPeriodModel, instanceOfDocumentAddExtractionsMetaOutDTO, instanceOfDocumentAddExtractionsOutDTO, instanceOfDocumentDataOutDTO, instanceOfDocumentFileTypeModel, instanceOfDocumentMetaOutDTO, instanceOfDocumentPrimaryViewOutDTO, instanceOfDocumentProcessingMetaOutDTO, instanceOfDocumentProcessingResultOutDTO, instanceOfDocumentPurgingResultOutDTO, instanceOfDocumentViewDataOutDTO, instanceOfDocumentViewMetaOutDTO, instanceOfDocumentViewOutDTO, instanceOfDocumentsViewOutDTO, instanceOfEnterpriseTransactionListOutDTO, instanceOfEnterpriseTransactionOutDTO, instanceOfExtractionCompletedEvent, instanceOfExtractionCompletedEventData, instanceOfExtractionCostOutDTO, instanceOfExtractionCostOutResultDTO, instanceOfExtractionCostStateModel, instanceOfExtractionCostsDataOutDTO, instanceOfExtractionCostsOutDTO, instanceOfExtractionDocumentViewMetaOutDTO, instanceOfExtractionMetaOutDTO, instanceOfExtractionPrimaryViewOutDTO, instanceOfExtractionProcessingResultOutDTO, instanceOfExtractionTypeModel, instanceOfExtractionValidationInDTO, instanceOfExtractionValidationMetaOutDTO, instanceOfExtractionValidationResultOutDTO, instanceOfExtractionViewDataOutDTO, instanceOfExtractionViewMetaOutDTO, instanceOfExtractionViewOutDTO, instanceOfExtractionsViewOutDTO, instanceOfFeatureType, instanceOfFieldDefinitionDTO, instanceOfFieldDifferenceModel, instanceOfFieldType, instanceOfFileTagBalanceOutDTO, instanceOfFileTagFilenamePatternsOutDTO, instanceOfFileTagMetadataOutDTO, instanceOfFileTagResultOutDTO, instanceOfFilesCreateUploadInDTO, instanceOfFilesNextToolCallOutDTO, instanceOfFilesUploadDetailsOutDTO, instanceOfFilesUploadInstructionsOutDTO, instanceOfFoundationDTO, instanceOfFoundationMetaDTO, instanceOfFreeTierConfigOutDTO, instanceOfGenerateTemplateFromUrlInDTO, instanceOfHTTPValidationError, instanceOfInvoiceListOutDTO, instanceOfInvoiceOutDTO, instanceOfInvoicePdfOutDTO, instanceOfInvoiceStatus, instanceOfInvoiceType, instanceOfLocationInner, instanceOfMatchedChunkDTO, instanceOfModelType, instanceOfNextActionOutDTO, instanceOfNumberOfStoredDocumentsOutDTO, instanceOfOperationType, instanceOfPaymentMethodUpdateOutDTO, instanceOfPeriodPresetModel, instanceOfPlanCreditCostOutDTO, instanceOfPlanDetailOutDTO, instanceOfPlanListOutDTO, instanceOfPlanOutDTO, instanceOfPurgeReasonModel, instanceOfPurgedDocumentsDataOutDTO, instanceOfQueryMetaDTO, instanceOfQueryResultItemDTO, instanceOfRateCardOutDTO, instanceOfResponseChangePlan, instanceOfResponseStatus, instanceOfRetrievalAggregateInDTO, instanceOfRetrievalAggregateOutDTO, instanceOfRetrievalFieldItemDTO, instanceOfRetrievalFieldsOutDTO, instanceOfRetrievalFiltersDTO, instanceOfRetrievalQueryInDTO, instanceOfRetrievalQueryOutDTO, instanceOfRetrievalStatusOutDTO, instanceOfRowMutableTableModel, instanceOfRowSourcesModel, instanceOfSessionTokenInDTO, instanceOfSessionTokenOutDTO, instanceOfSortMethodModel, instanceOfSpendLimitOutDTO, instanceOfSpendLimitUpdateInDTO, instanceOfStorageUsageOutDTO, instanceOfStructuredFilterDTO, instanceOfSubscribeInDTO, instanceOfSubscriptionOutDTO, instanceOfSubscriptionStatus, instanceOfSupportLevel, instanceOfTOSOutDTO, instanceOfTableDefinitionDTOInput, instanceOfTagFileBodyDTO, instanceOfTagUrlInDTO, instanceOfTemplateListOutDTO, instanceOfTemplateOutDTO, instanceOfTemplateSchemaDTOInput, instanceOfTemplateSchemaDTOOutput, instanceOfTemplateStatusModel, instanceOfTopUpPackListOutDTO, instanceOfTopUpPackOutDTO, instanceOfTopUpPurchaseInDTO, instanceOfTopUpPurchaseOutDTO, instanceOfUpdateTemplateInDTO, instanceOfUploadExtractionTypeEnum, instanceOfUsageBreakdownListOutDTO, instanceOfUsageBreakdownOutDTO, instanceOfUsageLineItemOutDTO, instanceOfUsageSummaryOutDTO, instanceOfValidationColumnModel, instanceOfValidationError, instanceOfValidationFieldModel, instanceOfValidationSchemaModel, instanceOfValue, instanceOfValueAnyOfInner, instanceOfValuesValue, instanceOfVerifiedDiffEntryOutDTO, instanceOfViewMetaOutDTO, instanceOfVolumeDiscountTierOutDTO, instanceOfWebDocumentUploadInDTO, instanceOfWebhookAttemptOutDTO, instanceOfWebhookDeliveryResultOutDTO, instanceOfWebhookEndpointCreateInDTO, instanceOfWebhookEndpointListOutDTO, instanceOfWebhookEndpointOutDTO, instanceOfWebhookEndpointUpdateInDTO, instanceOfWebhookEventListOutDTO, instanceOfWebhookEventOutDTO, instanceOfWebhookResponseDTO, instanceOfWebhookTestEvent, instanceOfWebhookTestEventData, isExtractionCompleted, isWebhookTest, mapValues, querystring, unwrapWebhook };
package/dist/index.js CHANGED
@@ -11592,9 +11592,10 @@ var GeminaTimeoutError = class extends GeminaError {
11592
11592
  }
11593
11593
  };
11594
11594
  var GeminaWebhookVerificationError = class extends GeminaError {
11595
- constructor(reason, message) {
11595
+ constructor(reason, message, cause) {
11596
11596
  super(message);
11597
11597
  this.reason = reason;
11598
+ if (cause !== void 0) this.cause = cause;
11598
11599
  Object.setPrototypeOf(this, new.target.prototype);
11599
11600
  }
11600
11601
  };
@@ -12005,18 +12006,21 @@ function isExtractionCompleted(event) {
12005
12006
  function isWebhookTest(event) {
12006
12007
  return event.type === "webhook.test";
12007
12008
  }
12008
- var REQUIRED = {
12009
- "extraction.completed": { correlationId: "string", status: "string", resultIncluded: "boolean", resultPath: "string" },
12010
- "webhook.test": { message: "string" }
12009
+ var KNOWN = {
12010
+ "extraction.completed": {
12011
+ required: { correlationId: "string", status: "string", resultIncluded: "boolean", resultPath: "string" },
12012
+ read: ExtractionCompletedEventDataFromJSON
12013
+ },
12014
+ "webhook.test": { required: { message: "string" }, read: WebhookTestEventDataFromJSON }
12011
12015
  };
12012
- var fail = (reason, message) => new GeminaWebhookVerificationError(reason, message);
12016
+ var fail = (reason, message, cause) => new GeminaWebhookVerificationError(reason, message, cause);
12013
12017
  function isObject(value) {
12014
12018
  return value !== null && typeof value === "object" && !Array.isArray(value);
12015
12019
  }
12016
12020
  var asciiLower = (text) => text.replace(/[A-Z]/g, (c) => String.fromCharCode(c.charCodeAt(0) + 32));
12017
12021
  function isComplete(type, data) {
12018
12022
  if (!isObject(data)) return false;
12019
- if (Object.entries(REQUIRED[type]).some(([field, kind]) => typeof data[field] !== kind)) return false;
12023
+ if (Object.entries(KNOWN[type].required).some(([field, kind]) => typeof data[field] !== kind)) return false;
12020
12024
  if (type !== "extraction.completed") return true;
12021
12025
  const result = data.result ?? null;
12022
12026
  const error = data.error ?? null;
@@ -12033,8 +12037,8 @@ function header(headers, name) {
12033
12037
  };
12034
12038
  const fromEntries = (entries) => {
12035
12039
  for (const [key, value] of entries) {
12036
- if (asciiLower(String(key)) !== name || value === void 0 || value === null) continue;
12037
- for (const item of Array.isArray(value) ? value : [value]) add(String(item));
12040
+ if (typeof key !== "string" || asciiLower(key) !== name) continue;
12041
+ for (const item of Array.isArray(value) ? value : [value]) if (typeof item === "string") add(item);
12038
12042
  }
12039
12043
  };
12040
12044
  if (headers === null || headers === void 0) {
@@ -12042,7 +12046,7 @@ function header(headers, name) {
12042
12046
  fromEntries(headers.entries());
12043
12047
  } else if (typeof headers.get === "function") {
12044
12048
  const value = headers.get(name);
12045
- if (value != null) add(String(value));
12049
+ if (typeof value === "string") add(value);
12046
12050
  } else {
12047
12051
  fromEntries(Object.entries(headers));
12048
12052
  }
@@ -12063,13 +12067,24 @@ function constantTimeEqual(a, b) {
12063
12067
  for (let i = 0; i < a.length; i++) difference |= a[i] ^ b[i];
12064
12068
  return difference === 0;
12065
12069
  }
12070
+ function isRawBuffer(value) {
12071
+ const tag = Object.prototype.toString.call(value);
12072
+ return tag === "[object ArrayBuffer]" || tag === "[object SharedArrayBuffer]";
12073
+ }
12066
12074
  function copyBody(body) {
12067
12075
  if (typeof body === "string") return new TextEncoder().encode(body);
12068
12076
  if (body == null) return new Uint8Array(0);
12069
- const source = ArrayBuffer.isView(body) ? new Uint8Array(body.buffer, body.byteOffset, body.byteLength) : new Uint8Array(body);
12070
- const copy = new Uint8Array(source.length);
12071
- copy.set(source);
12072
- return copy;
12077
+ if (!isRawBuffer(body) && !ArrayBuffer.isView(body)) {
12078
+ throw fail("invalid_body", "The webhook body must be the raw request bytes or text, not a parsed value.");
12079
+ }
12080
+ try {
12081
+ const source = ArrayBuffer.isView(body) ? new Uint8Array(body.buffer, body.byteOffset, body.byteLength) : new Uint8Array(body);
12082
+ const copy = new Uint8Array(source.length);
12083
+ copy.set(source);
12084
+ return copy;
12085
+ } catch (error) {
12086
+ throw fail("invalid_body", "The webhook body cannot be read: its buffer was detached.", error);
12087
+ }
12073
12088
  }
12074
12089
  async function subtleCrypto() {
12075
12090
  const global = globalThis.crypto;
@@ -12082,35 +12097,7 @@ async function subtleCrypto() {
12082
12097
  );
12083
12098
  return module.webcrypto.subtle;
12084
12099
  }
12085
- async function unwrapWebhook(body, headers, secret, options = {}) {
12086
- let rawBody;
12087
- try {
12088
- rawBody = copyBody(body);
12089
- } catch (error) {
12090
- if (!(error instanceof TypeError)) throw error;
12091
- throw fail("invalid_body", "The webhook body cannot be read: its buffer was detached.");
12092
- }
12093
- options = options ?? {};
12094
- const id = header(headers, "webhook-id");
12095
- const timestampText = header(headers, "webhook-timestamp");
12096
- const signatureHeader = header(headers, "webhook-signature");
12097
- if (!TIMESTAMP.test(timestampText)) {
12098
- throw fail("invalid_timestamp", "The webhook-timestamp header is not a whole number of seconds.");
12099
- }
12100
- const tolerance = options.toleranceSeconds ?? DEFAULT_TOLERANCE_SECONDS;
12101
- const clock = (options.now ?? (() => Date.now() / 1e3))();
12102
- if (!Number.isFinite(clock) || !Number.isFinite(tolerance) || tolerance < 0) {
12103
- throw fail(
12104
- "timestamp_out_of_tolerance",
12105
- "The clock or the tolerance is not a finite number, so the timestamp cannot be checked."
12106
- );
12107
- }
12108
- if (Math.abs(Math.floor(clock) - Number(timestampText)) > tolerance) {
12109
- throw fail(
12110
- "timestamp_out_of_tolerance",
12111
- `The webhook timestamp is more than ${tolerance} seconds from the current time.`
12112
- );
12113
- }
12100
+ async function verifySignature(rawBody, id, timestampText, signatureHeader, secret) {
12114
12101
  const key = typeof secret === "string" ? decodeBase64(secret.startsWith(SECRET_PREFIX) ? secret.slice(SECRET_PREFIX.length) : secret) : void 0;
12115
12102
  if (key === void 0 || key.length === 0) {
12116
12103
  throw fail("invalid_secret", "The signing secret is not valid: expected whsec_ followed by base64.");
@@ -12120,7 +12107,6 @@ async function unwrapWebhook(body, headers, secret, options = {}) {
12120
12107
  signed.set(prefix, 0);
12121
12108
  signed.set(rawBody, prefix.length);
12122
12109
  const subtle = await subtleCrypto();
12123
- const verifiedBody = signed.subarray(prefix.length);
12124
12110
  const cryptoKey = await subtle.importKey("raw", key, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
12125
12111
  const expected = new Uint8Array(await subtle.sign("HMAC", cryptoKey, signed));
12126
12112
  let matched = false;
@@ -12131,34 +12117,64 @@ async function unwrapWebhook(body, headers, secret, options = {}) {
12131
12117
  if (candidate !== void 0 && constantTimeEqual(candidate, expected)) matched = true;
12132
12118
  }
12133
12119
  if (!matched) throw fail("no_matching_signature", "No signature in the webhook-signature header matches.");
12120
+ return signed.subarray(prefix.length);
12121
+ }
12122
+ function parseBody(verifiedBody) {
12134
12123
  if (verifiedBody.length >= 3 && verifiedBody[0] === 239 && verifiedBody[1] === 187 && verifiedBody[2] === 191) {
12135
12124
  throw fail("invalid_body", "The webhook body starts with a byte order mark.");
12136
12125
  }
12137
12126
  let parsed;
12138
12127
  try {
12139
12128
  parsed = JSON.parse(new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(verifiedBody));
12140
- } catch {
12141
- throw fail("invalid_body", "The webhook body is not valid JSON.");
12129
+ } catch (error) {
12130
+ throw fail("invalid_body", "The webhook body is not valid JSON.", error);
12142
12131
  }
12143
12132
  if (!isObject(parsed)) throw fail("invalid_body", "The webhook body is not a JSON object.");
12133
+ return parsed;
12134
+ }
12135
+ function typeData(type, data) {
12136
+ if (type === null || !Object.prototype.hasOwnProperty.call(KNOWN, type)) return data;
12137
+ if (!isComplete(type, data)) {
12138
+ throw fail("invalid_body", `The data of this ${type} event is missing a required field.`);
12139
+ }
12140
+ try {
12141
+ return KNOWN[type].read(data);
12142
+ } catch (error) {
12143
+ throw fail("invalid_body", `The data of this ${type} event could not be read.`, error);
12144
+ }
12145
+ }
12146
+ async function unwrapWebhook(body, headers, secret, options = {}) {
12147
+ const rawBody = copyBody(body);
12148
+ options = options ?? {};
12149
+ const id = header(headers, "webhook-id");
12150
+ const timestampText = header(headers, "webhook-timestamp");
12151
+ const signatureHeader = header(headers, "webhook-signature");
12152
+ if (!TIMESTAMP.test(timestampText)) {
12153
+ throw fail("invalid_timestamp", "The webhook-timestamp header is not a whole number of seconds.");
12154
+ }
12155
+ const tolerance = options.toleranceSeconds ?? DEFAULT_TOLERANCE_SECONDS;
12156
+ const clock = (options.now ?? (() => Date.now() / 1e3))();
12157
+ if (!Number.isFinite(clock) || !Number.isFinite(tolerance) || tolerance < 0) {
12158
+ throw fail(
12159
+ "timestamp_out_of_tolerance",
12160
+ "The clock or the tolerance is not a finite number, so the timestamp cannot be checked."
12161
+ );
12162
+ }
12163
+ if (Math.abs(Math.floor(clock) - Number(timestampText)) > tolerance) {
12164
+ throw fail(
12165
+ "timestamp_out_of_tolerance",
12166
+ `The webhook timestamp is more than ${tolerance} seconds from the current time.`
12167
+ );
12168
+ }
12169
+ const verifiedBody = await verifySignature(rawBody, id, timestampText, signatureHeader, secret);
12170
+ const parsed = parseBody(verifiedBody);
12144
12171
  const type = typeof parsed.type === "string" ? parsed.type : null;
12145
12172
  const timestamp = typeof parsed.timestamp === "string" ? parsed.timestamp : null;
12146
- let data = parsed.data;
12147
- if (type !== null && Object.prototype.hasOwnProperty.call(REQUIRED, type)) {
12148
- if (!isComplete(type, data)) {
12149
- throw fail("invalid_body", `The data of this ${type} event is missing a required field.`);
12150
- }
12151
- try {
12152
- data = type === "extraction.completed" ? ExtractionCompletedEventDataFromJSON(data) : WebhookTestEventDataFromJSON(data);
12153
- } catch {
12154
- throw fail("invalid_body", `The data of this ${type} event could not be read.`);
12155
- }
12156
- }
12157
- return { id, type, timestamp, data, raw: parsed };
12173
+ return { id, type, timestamp, data: typeData(type, parsed.data ?? null), raw: parsed };
12158
12174
  }
12159
12175
 
12160
12176
  // src/version.ts
12161
- var VERSION = "0.17.0";
12177
+ var VERSION = "0.17.1";
12162
12178
  export {
12163
12179
  AddExtractionsInDTOFromJSON,
12164
12180
  AddExtractionsInDTOFromJSONTyped,