@gemina/sdk 0.17.0 → 0.17.2

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>;
@@ -13576,7 +13578,7 @@ declare function isWebhookTest(event: WebhookEvent): event is WebhookTestWebhook
13576
13578
  * cannot be parsed; `reason` says why. No other error leaves this function
13577
13579
  * for any body, header or secret.
13578
13580
  */
13579
- declare function unwrapWebhook(body: string | ArrayBuffer | ArrayBufferView, headers: WebhookHeaders, secret: string, options?: UnwrapWebhookOptions): Promise<WebhookEvent>;
13581
+ declare function unwrapWebhook(body: string | ArrayBufferLike | ArrayBufferView, headers: WebhookHeaders, secret: string, options?: UnwrapWebhookOptions): Promise<WebhookEvent>;
13580
13582
 
13581
13583
  /**
13582
13584
  * Package version — the single hand-written source of truth (mirrors
@@ -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.2";
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>;
@@ -13576,7 +13578,7 @@ declare function isWebhookTest(event: WebhookEvent): event is WebhookTestWebhook
13576
13578
  * cannot be parsed; `reason` says why. No other error leaves this function
13577
13579
  * for any body, header or secret.
13578
13580
  */
13579
- declare function unwrapWebhook(body: string | ArrayBuffer | ArrayBufferView, headers: WebhookHeaders, secret: string, options?: UnwrapWebhookOptions): Promise<WebhookEvent>;
13581
+ declare function unwrapWebhook(body: string | ArrayBufferLike | ArrayBufferView, headers: WebhookHeaders, secret: string, options?: UnwrapWebhookOptions): Promise<WebhookEvent>;
13580
13582
 
13581
13583
  /**
13582
13584
  * Package version — the single hand-written source of truth (mirrors
@@ -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.2";
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
  };
@@ -11835,18 +11836,21 @@ var GeminaClient = class _GeminaClient {
11835
11836
  let submitted;
11836
11837
  if (typeof Blob !== "undefined" && source instanceof Blob) {
11837
11838
  try {
11838
- submitted = await this.documents.createDocumentProcessingRequest({
11839
- file: await normalizeBlobSource(source),
11840
- externalId,
11841
- extractionTypes,
11842
- templateId: options.templateId,
11843
- modelType: options.modelType,
11844
- thinking: options.thinking,
11845
- evaluation: options.evaluation,
11846
- correction: options.correction,
11847
- includeCoordinates: options.includeCoordinates,
11848
- endUserId: options.endUserId
11849
- });
11839
+ submitted = await this.documents.createDocumentProcessingRequest(
11840
+ {
11841
+ file: await normalizeBlobSource(source),
11842
+ externalId,
11843
+ extractionTypes,
11844
+ templateId: options.templateId,
11845
+ modelType: options.modelType,
11846
+ thinking: options.thinking,
11847
+ evaluation: options.evaluation,
11848
+ correction: options.correction,
11849
+ includeCoordinates: options.includeCoordinates,
11850
+ endUserId: options.endUserId
11851
+ },
11852
+ sendExtractionTypesAsSeparateParts(extractionTypes)
11853
+ );
11850
11854
  } catch (error) {
11851
11855
  throw await asProcessingErrorIfFailedResult(error);
11852
11856
  }
@@ -11975,6 +11979,24 @@ function finalizeTerminal(result) {
11975
11979
  }
11976
11980
  return result;
11977
11981
  }
11982
+ function sendExtractionTypesAsSeparateParts(extractionTypes) {
11983
+ return async ({ init }) => {
11984
+ const body = init.body;
11985
+ if (!isFormDataLike(body)) {
11986
+ throw new GeminaError(
11987
+ "Internal error: the generated document upload did not build a FormData body"
11988
+ );
11989
+ }
11990
+ body.delete("extraction_types");
11991
+ for (const extractionType of extractionTypes) {
11992
+ body.append("extraction_types", extractionType);
11993
+ }
11994
+ return { body: init.body };
11995
+ };
11996
+ }
11997
+ function isFormDataLike(body) {
11998
+ return typeof body === "object" && body !== null && typeof body.append === "function" && typeof body.delete === "function";
11999
+ }
11978
12000
  async function asProcessingErrorIfFailedResult(error) {
11979
12001
  if (!(error instanceof ResponseError)) {
11980
12002
  return error;
@@ -12005,18 +12027,21 @@ function isExtractionCompleted(event) {
12005
12027
  function isWebhookTest(event) {
12006
12028
  return event.type === "webhook.test";
12007
12029
  }
12008
- var REQUIRED = {
12009
- "extraction.completed": { correlationId: "string", status: "string", resultIncluded: "boolean", resultPath: "string" },
12010
- "webhook.test": { message: "string" }
12030
+ var KNOWN = {
12031
+ "extraction.completed": {
12032
+ required: { correlationId: "string", status: "string", resultIncluded: "boolean", resultPath: "string" },
12033
+ read: ExtractionCompletedEventDataFromJSON
12034
+ },
12035
+ "webhook.test": { required: { message: "string" }, read: WebhookTestEventDataFromJSON }
12011
12036
  };
12012
- var fail = (reason, message) => new GeminaWebhookVerificationError(reason, message);
12037
+ var fail = (reason, message, cause) => new GeminaWebhookVerificationError(reason, message, cause);
12013
12038
  function isObject(value) {
12014
12039
  return value !== null && typeof value === "object" && !Array.isArray(value);
12015
12040
  }
12016
12041
  var asciiLower = (text) => text.replace(/[A-Z]/g, (c) => String.fromCharCode(c.charCodeAt(0) + 32));
12017
12042
  function isComplete(type, data) {
12018
12043
  if (!isObject(data)) return false;
12019
- if (Object.entries(REQUIRED[type]).some(([field, kind]) => typeof data[field] !== kind)) return false;
12044
+ if (Object.entries(KNOWN[type].required).some(([field, kind]) => typeof data[field] !== kind)) return false;
12020
12045
  if (type !== "extraction.completed") return true;
12021
12046
  const result = data.result ?? null;
12022
12047
  const error = data.error ?? null;
@@ -12033,8 +12058,8 @@ function header(headers, name) {
12033
12058
  };
12034
12059
  const fromEntries = (entries) => {
12035
12060
  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));
12061
+ if (typeof key !== "string" || asciiLower(key) !== name) continue;
12062
+ for (const item of Array.isArray(value) ? value : [value]) if (typeof item === "string") add(item);
12038
12063
  }
12039
12064
  };
12040
12065
  if (headers === null || headers === void 0) {
@@ -12042,7 +12067,7 @@ function header(headers, name) {
12042
12067
  fromEntries(headers.entries());
12043
12068
  } else if (typeof headers.get === "function") {
12044
12069
  const value = headers.get(name);
12045
- if (value != null) add(String(value));
12070
+ if (typeof value === "string") add(value);
12046
12071
  } else {
12047
12072
  fromEntries(Object.entries(headers));
12048
12073
  }
@@ -12063,13 +12088,24 @@ function constantTimeEqual(a, b) {
12063
12088
  for (let i = 0; i < a.length; i++) difference |= a[i] ^ b[i];
12064
12089
  return difference === 0;
12065
12090
  }
12091
+ function isRawBuffer(value) {
12092
+ const tag = Object.prototype.toString.call(value);
12093
+ return tag === "[object ArrayBuffer]" || tag === "[object SharedArrayBuffer]";
12094
+ }
12066
12095
  function copyBody(body) {
12067
12096
  if (typeof body === "string") return new TextEncoder().encode(body);
12068
12097
  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;
12098
+ if (!isRawBuffer(body) && !ArrayBuffer.isView(body)) {
12099
+ throw fail("invalid_body", "The webhook body must be the raw request bytes or text, not a parsed value.");
12100
+ }
12101
+ try {
12102
+ const source = ArrayBuffer.isView(body) ? new Uint8Array(body.buffer, body.byteOffset, body.byteLength) : new Uint8Array(body);
12103
+ const copy = new Uint8Array(source.length);
12104
+ copy.set(source);
12105
+ return copy;
12106
+ } catch (error) {
12107
+ throw fail("invalid_body", "The webhook body cannot be read: its buffer was detached.", error);
12108
+ }
12073
12109
  }
12074
12110
  async function subtleCrypto() {
12075
12111
  const global = globalThis.crypto;
@@ -12082,35 +12118,7 @@ async function subtleCrypto() {
12082
12118
  );
12083
12119
  return module.webcrypto.subtle;
12084
12120
  }
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
- }
12121
+ async function verifySignature(rawBody, id, timestampText, signatureHeader, secret) {
12114
12122
  const key = typeof secret === "string" ? decodeBase64(secret.startsWith(SECRET_PREFIX) ? secret.slice(SECRET_PREFIX.length) : secret) : void 0;
12115
12123
  if (key === void 0 || key.length === 0) {
12116
12124
  throw fail("invalid_secret", "The signing secret is not valid: expected whsec_ followed by base64.");
@@ -12120,7 +12128,6 @@ async function unwrapWebhook(body, headers, secret, options = {}) {
12120
12128
  signed.set(prefix, 0);
12121
12129
  signed.set(rawBody, prefix.length);
12122
12130
  const subtle = await subtleCrypto();
12123
- const verifiedBody = signed.subarray(prefix.length);
12124
12131
  const cryptoKey = await subtle.importKey("raw", key, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
12125
12132
  const expected = new Uint8Array(await subtle.sign("HMAC", cryptoKey, signed));
12126
12133
  let matched = false;
@@ -12131,34 +12138,64 @@ async function unwrapWebhook(body, headers, secret, options = {}) {
12131
12138
  if (candidate !== void 0 && constantTimeEqual(candidate, expected)) matched = true;
12132
12139
  }
12133
12140
  if (!matched) throw fail("no_matching_signature", "No signature in the webhook-signature header matches.");
12141
+ return signed.subarray(prefix.length);
12142
+ }
12143
+ function parseBody(verifiedBody) {
12134
12144
  if (verifiedBody.length >= 3 && verifiedBody[0] === 239 && verifiedBody[1] === 187 && verifiedBody[2] === 191) {
12135
12145
  throw fail("invalid_body", "The webhook body starts with a byte order mark.");
12136
12146
  }
12137
12147
  let parsed;
12138
12148
  try {
12139
12149
  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.");
12150
+ } catch (error) {
12151
+ throw fail("invalid_body", "The webhook body is not valid JSON.", error);
12142
12152
  }
12143
12153
  if (!isObject(parsed)) throw fail("invalid_body", "The webhook body is not a JSON object.");
12154
+ return parsed;
12155
+ }
12156
+ function typeData(type, data) {
12157
+ if (type === null || !Object.prototype.hasOwnProperty.call(KNOWN, type)) return data;
12158
+ if (!isComplete(type, data)) {
12159
+ throw fail("invalid_body", `The data of this ${type} event is missing a required field.`);
12160
+ }
12161
+ try {
12162
+ return KNOWN[type].read(data);
12163
+ } catch (error) {
12164
+ throw fail("invalid_body", `The data of this ${type} event could not be read.`, error);
12165
+ }
12166
+ }
12167
+ async function unwrapWebhook(body, headers, secret, options = {}) {
12168
+ const rawBody = copyBody(body);
12169
+ options = options ?? {};
12170
+ const id = header(headers, "webhook-id");
12171
+ const timestampText = header(headers, "webhook-timestamp");
12172
+ const signatureHeader = header(headers, "webhook-signature");
12173
+ if (!TIMESTAMP.test(timestampText)) {
12174
+ throw fail("invalid_timestamp", "The webhook-timestamp header is not a whole number of seconds.");
12175
+ }
12176
+ const tolerance = options.toleranceSeconds ?? DEFAULT_TOLERANCE_SECONDS;
12177
+ const clock = (options.now ?? (() => Date.now() / 1e3))();
12178
+ if (!Number.isFinite(clock) || !Number.isFinite(tolerance) || tolerance < 0) {
12179
+ throw fail(
12180
+ "timestamp_out_of_tolerance",
12181
+ "The clock or the tolerance is not a finite number, so the timestamp cannot be checked."
12182
+ );
12183
+ }
12184
+ if (Math.abs(Math.floor(clock) - Number(timestampText)) > tolerance) {
12185
+ throw fail(
12186
+ "timestamp_out_of_tolerance",
12187
+ `The webhook timestamp is more than ${tolerance} seconds from the current time.`
12188
+ );
12189
+ }
12190
+ const verifiedBody = await verifySignature(rawBody, id, timestampText, signatureHeader, secret);
12191
+ const parsed = parseBody(verifiedBody);
12144
12192
  const type = typeof parsed.type === "string" ? parsed.type : null;
12145
12193
  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 };
12194
+ return { id, type, timestamp, data: typeData(type, parsed.data ?? null), raw: parsed };
12158
12195
  }
12159
12196
 
12160
12197
  // src/version.ts
12161
- var VERSION = "0.17.0";
12198
+ var VERSION = "0.17.2";
12162
12199
  export {
12163
12200
  AddExtractionsInDTOFromJSON,
12164
12201
  AddExtractionsInDTOFromJSONTyped,