@gemina/sdk 0.15.0 → 0.17.0

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.cjs CHANGED
@@ -104,6 +104,11 @@ __export(index_exports, {
104
104
  CreateTemplateInDTOFromJSONTyped: () => CreateTemplateInDTOFromJSONTyped,
105
105
  CreateTemplateInDTOToJSON: () => CreateTemplateInDTOToJSON,
106
106
  CreateTemplateInDTOToJSONTyped: () => CreateTemplateInDTOToJSONTyped,
107
+ CreatedWebhookEndpointOutDTODisabledReasonEnum: () => CreatedWebhookEndpointOutDTODisabledReasonEnum,
108
+ CreatedWebhookEndpointOutDTOFromJSON: () => CreatedWebhookEndpointOutDTOFromJSON,
109
+ CreatedWebhookEndpointOutDTOFromJSONTyped: () => CreatedWebhookEndpointOutDTOFromJSONTyped,
110
+ CreatedWebhookEndpointOutDTOToJSON: () => CreatedWebhookEndpointOutDTOToJSON,
111
+ CreatedWebhookEndpointOutDTOToJSONTyped: () => CreatedWebhookEndpointOutDTOToJSONTyped,
107
112
  CreditMeter: () => CreditMeter,
108
113
  CreditMeterFilter: () => CreditMeterFilter,
109
114
  CreditMeterFilterFromJSON: () => CreditMeterFilterFromJSON,
@@ -202,6 +207,15 @@ __export(index_exports, {
202
207
  EnterpriseTransactionOutDTOFromJSONTyped: () => EnterpriseTransactionOutDTOFromJSONTyped,
203
208
  EnterpriseTransactionOutDTOToJSON: () => EnterpriseTransactionOutDTOToJSON,
204
209
  EnterpriseTransactionOutDTOToJSONTyped: () => EnterpriseTransactionOutDTOToJSONTyped,
210
+ ExtractionCompletedEventDataFromJSON: () => ExtractionCompletedEventDataFromJSON,
211
+ ExtractionCompletedEventDataFromJSONTyped: () => ExtractionCompletedEventDataFromJSONTyped,
212
+ ExtractionCompletedEventDataToJSON: () => ExtractionCompletedEventDataToJSON,
213
+ ExtractionCompletedEventDataToJSONTyped: () => ExtractionCompletedEventDataToJSONTyped,
214
+ ExtractionCompletedEventFromJSON: () => ExtractionCompletedEventFromJSON,
215
+ ExtractionCompletedEventFromJSONTyped: () => ExtractionCompletedEventFromJSONTyped,
216
+ ExtractionCompletedEventToJSON: () => ExtractionCompletedEventToJSON,
217
+ ExtractionCompletedEventToJSONTyped: () => ExtractionCompletedEventToJSONTyped,
218
+ ExtractionCompletedEventTypeEnum: () => ExtractionCompletedEventTypeEnum,
205
219
  ExtractionCostOutDTOFromJSON: () => ExtractionCostOutDTOFromJSON,
206
220
  ExtractionCostOutDTOFromJSONTyped: () => ExtractionCostOutDTOFromJSONTyped,
207
221
  ExtractionCostOutDTOToJSON: () => ExtractionCostOutDTOToJSON,
@@ -345,6 +359,7 @@ __export(index_exports, {
345
359
  GeminaError: () => GeminaError,
346
360
  GeminaProcessingError: () => GeminaProcessingError,
347
361
  GeminaTimeoutError: () => GeminaTimeoutError,
362
+ GeminaWebhookVerificationError: () => GeminaWebhookVerificationError,
348
363
  GenerateTemplateFromUrlInDTOFromJSON: () => GenerateTemplateFromUrlInDTOFromJSON,
349
364
  GenerateTemplateFromUrlInDTOFromJSONTyped: () => GenerateTemplateFromUrlInDTOFromJSONTyped,
350
365
  GenerateTemplateFromUrlInDTOToJSON: () => GenerateTemplateFromUrlInDTOToJSON,
@@ -377,6 +392,7 @@ __export(index_exports, {
377
392
  InvoiceTypeToJSONTyped: () => InvoiceTypeToJSONTyped,
378
393
  JSONApiResponse: () => JSONApiResponse,
379
394
  LegalApi: () => LegalApi,
395
+ ListWebhookEventsStatusEnum: () => ListWebhookEventsStatusEnum,
380
396
  LocationInnerFromJSON: () => LocationInnerFromJSON,
381
397
  LocationInnerFromJSONTyped: () => LocationInnerFromJSONTyped,
382
398
  LocationInnerToJSON: () => LocationInnerToJSON,
@@ -405,6 +421,11 @@ __export(index_exports, {
405
421
  OperationTypeFromJSONTyped: () => OperationTypeFromJSONTyped,
406
422
  OperationTypeToJSON: () => OperationTypeToJSON,
407
423
  OperationTypeToJSONTyped: () => OperationTypeToJSONTyped,
424
+ PaymentMethodUpdateOutDTOFromJSON: () => PaymentMethodUpdateOutDTOFromJSON,
425
+ PaymentMethodUpdateOutDTOFromJSONTyped: () => PaymentMethodUpdateOutDTOFromJSONTyped,
426
+ PaymentMethodUpdateOutDTOPurposeEnum: () => PaymentMethodUpdateOutDTOPurposeEnum,
427
+ PaymentMethodUpdateOutDTOToJSON: () => PaymentMethodUpdateOutDTOToJSON,
428
+ PaymentMethodUpdateOutDTOToJSONTyped: () => PaymentMethodUpdateOutDTOToJSONTyped,
408
429
  PeriodPresetModel: () => PeriodPresetModel,
409
430
  PeriodPresetModelFromJSON: () => PeriodPresetModelFromJSON,
410
431
  PeriodPresetModelFromJSONTyped: () => PeriodPresetModelFromJSONTyped,
@@ -441,6 +462,7 @@ __export(index_exports, {
441
462
  PurgedDocumentsDataOutDTOToJSONTyped: () => PurgedDocumentsDataOutDTOToJSONTyped,
442
463
  QueryMetaDTOFromJSON: () => QueryMetaDTOFromJSON,
443
464
  QueryMetaDTOFromJSONTyped: () => QueryMetaDTOFromJSONTyped,
465
+ QueryMetaDTOIndexingStateEnum: () => QueryMetaDTOIndexingStateEnum,
444
466
  QueryMetaDTOToJSON: () => QueryMetaDTOToJSON,
445
467
  QueryMetaDTOToJSONTyped: () => QueryMetaDTOToJSONTyped,
446
468
  QueryResultItemDTOFromJSON: () => QueryResultItemDTOFromJSON,
@@ -686,10 +708,56 @@ __export(index_exports, {
686
708
  WebDocumentUploadInDTOFromJSONTyped: () => WebDocumentUploadInDTOFromJSONTyped,
687
709
  WebDocumentUploadInDTOToJSON: () => WebDocumentUploadInDTOToJSON,
688
710
  WebDocumentUploadInDTOToJSONTyped: () => WebDocumentUploadInDTOToJSONTyped,
711
+ WebhookAttemptOutDTOFromJSON: () => WebhookAttemptOutDTOFromJSON,
712
+ WebhookAttemptOutDTOFromJSONTyped: () => WebhookAttemptOutDTOFromJSONTyped,
713
+ WebhookAttemptOutDTOToJSON: () => WebhookAttemptOutDTOToJSON,
714
+ WebhookAttemptOutDTOToJSONTyped: () => WebhookAttemptOutDTOToJSONTyped,
715
+ WebhookDeliveryResultOutDTOFromJSON: () => WebhookDeliveryResultOutDTOFromJSON,
716
+ WebhookDeliveryResultOutDTOFromJSONTyped: () => WebhookDeliveryResultOutDTOFromJSONTyped,
717
+ WebhookDeliveryResultOutDTOToJSON: () => WebhookDeliveryResultOutDTOToJSON,
718
+ WebhookDeliveryResultOutDTOToJSONTyped: () => WebhookDeliveryResultOutDTOToJSONTyped,
719
+ WebhookEndpointCreateInDTOFromJSON: () => WebhookEndpointCreateInDTOFromJSON,
720
+ WebhookEndpointCreateInDTOFromJSONTyped: () => WebhookEndpointCreateInDTOFromJSONTyped,
721
+ WebhookEndpointCreateInDTOToJSON: () => WebhookEndpointCreateInDTOToJSON,
722
+ WebhookEndpointCreateInDTOToJSONTyped: () => WebhookEndpointCreateInDTOToJSONTyped,
723
+ WebhookEndpointListOutDTOFromJSON: () => WebhookEndpointListOutDTOFromJSON,
724
+ WebhookEndpointListOutDTOFromJSONTyped: () => WebhookEndpointListOutDTOFromJSONTyped,
725
+ WebhookEndpointListOutDTOToJSON: () => WebhookEndpointListOutDTOToJSON,
726
+ WebhookEndpointListOutDTOToJSONTyped: () => WebhookEndpointListOutDTOToJSONTyped,
727
+ WebhookEndpointOutDTODisabledReasonEnum: () => WebhookEndpointOutDTODisabledReasonEnum,
728
+ WebhookEndpointOutDTOFromJSON: () => WebhookEndpointOutDTOFromJSON,
729
+ WebhookEndpointOutDTOFromJSONTyped: () => WebhookEndpointOutDTOFromJSONTyped,
730
+ WebhookEndpointOutDTOToJSON: () => WebhookEndpointOutDTOToJSON,
731
+ WebhookEndpointOutDTOToJSONTyped: () => WebhookEndpointOutDTOToJSONTyped,
732
+ WebhookEndpointUpdateInDTOFromJSON: () => WebhookEndpointUpdateInDTOFromJSON,
733
+ WebhookEndpointUpdateInDTOFromJSONTyped: () => WebhookEndpointUpdateInDTOFromJSONTyped,
734
+ WebhookEndpointUpdateInDTOToJSON: () => WebhookEndpointUpdateInDTOToJSON,
735
+ WebhookEndpointUpdateInDTOToJSONTyped: () => WebhookEndpointUpdateInDTOToJSONTyped,
736
+ WebhookEventListOutDTOFromJSON: () => WebhookEventListOutDTOFromJSON,
737
+ WebhookEventListOutDTOFromJSONTyped: () => WebhookEventListOutDTOFromJSONTyped,
738
+ WebhookEventListOutDTOToJSON: () => WebhookEventListOutDTOToJSON,
739
+ WebhookEventListOutDTOToJSONTyped: () => WebhookEventListOutDTOToJSONTyped,
740
+ WebhookEventOutDTOFailureReasonEnum: () => WebhookEventOutDTOFailureReasonEnum,
741
+ WebhookEventOutDTOFromJSON: () => WebhookEventOutDTOFromJSON,
742
+ WebhookEventOutDTOFromJSONTyped: () => WebhookEventOutDTOFromJSONTyped,
743
+ WebhookEventOutDTOStatusEnum: () => WebhookEventOutDTOStatusEnum,
744
+ WebhookEventOutDTOToJSON: () => WebhookEventOutDTOToJSON,
745
+ WebhookEventOutDTOToJSONTyped: () => WebhookEventOutDTOToJSONTyped,
746
+ WebhookEventOutDTOTypeEnum: () => WebhookEventOutDTOTypeEnum,
689
747
  WebhookResponseDTOFromJSON: () => WebhookResponseDTOFromJSON,
690
748
  WebhookResponseDTOFromJSONTyped: () => WebhookResponseDTOFromJSONTyped,
691
749
  WebhookResponseDTOToJSON: () => WebhookResponseDTOToJSON,
692
750
  WebhookResponseDTOToJSONTyped: () => WebhookResponseDTOToJSONTyped,
751
+ WebhookTestEventDataFromJSON: () => WebhookTestEventDataFromJSON,
752
+ WebhookTestEventDataFromJSONTyped: () => WebhookTestEventDataFromJSONTyped,
753
+ WebhookTestEventDataToJSON: () => WebhookTestEventDataToJSON,
754
+ WebhookTestEventDataToJSONTyped: () => WebhookTestEventDataToJSONTyped,
755
+ WebhookTestEventFromJSON: () => WebhookTestEventFromJSON,
756
+ WebhookTestEventFromJSONTyped: () => WebhookTestEventFromJSONTyped,
757
+ WebhookTestEventToJSON: () => WebhookTestEventToJSON,
758
+ WebhookTestEventToJSONTyped: () => WebhookTestEventToJSONTyped,
759
+ WebhookTestEventTypeEnum: () => WebhookTestEventTypeEnum,
760
+ WebhooksApi: () => WebhooksApi,
693
761
  canConsumeForm: () => canConsumeForm,
694
762
  exists: () => exists,
695
763
  instanceOfAddExtractionsInDTO: () => instanceOfAddExtractionsInDTO,
@@ -710,6 +778,7 @@ __export(index_exports, {
710
778
  instanceOfContractStatus: () => instanceOfContractStatus,
711
779
  instanceOfCountBreakdownModel: () => instanceOfCountBreakdownModel,
712
780
  instanceOfCreateTemplateInDTO: () => instanceOfCreateTemplateInDTO,
781
+ instanceOfCreatedWebhookEndpointOutDTO: () => instanceOfCreatedWebhookEndpointOutDTO,
713
782
  instanceOfCreditMeter: () => instanceOfCreditMeter,
714
783
  instanceOfCreditMeterFilter: () => instanceOfCreditMeterFilter,
715
784
  instanceOfCreditTransactionListOutDTO: () => instanceOfCreditTransactionListOutDTO,
@@ -732,6 +801,8 @@ __export(index_exports, {
732
801
  instanceOfDocumentsViewOutDTO: () => instanceOfDocumentsViewOutDTO,
733
802
  instanceOfEnterpriseTransactionListOutDTO: () => instanceOfEnterpriseTransactionListOutDTO,
734
803
  instanceOfEnterpriseTransactionOutDTO: () => instanceOfEnterpriseTransactionOutDTO,
804
+ instanceOfExtractionCompletedEvent: () => instanceOfExtractionCompletedEvent,
805
+ instanceOfExtractionCompletedEventData: () => instanceOfExtractionCompletedEventData,
735
806
  instanceOfExtractionCostOutDTO: () => instanceOfExtractionCostOutDTO,
736
807
  instanceOfExtractionCostOutResultDTO: () => instanceOfExtractionCostOutResultDTO,
737
808
  instanceOfExtractionCostStateModel: () => instanceOfExtractionCostStateModel,
@@ -777,6 +848,7 @@ __export(index_exports, {
777
848
  instanceOfNextActionOutDTO: () => instanceOfNextActionOutDTO,
778
849
  instanceOfNumberOfStoredDocumentsOutDTO: () => instanceOfNumberOfStoredDocumentsOutDTO,
779
850
  instanceOfOperationType: () => instanceOfOperationType,
851
+ instanceOfPaymentMethodUpdateOutDTO: () => instanceOfPaymentMethodUpdateOutDTO,
780
852
  instanceOfPeriodPresetModel: () => instanceOfPeriodPresetModel,
781
853
  instanceOfPlanCreditCostOutDTO: () => instanceOfPlanCreditCostOutDTO,
782
854
  instanceOfPlanDetailOutDTO: () => instanceOfPlanDetailOutDTO,
@@ -840,9 +912,22 @@ __export(index_exports, {
840
912
  instanceOfViewMetaOutDTO: () => instanceOfViewMetaOutDTO,
841
913
  instanceOfVolumeDiscountTierOutDTO: () => instanceOfVolumeDiscountTierOutDTO,
842
914
  instanceOfWebDocumentUploadInDTO: () => instanceOfWebDocumentUploadInDTO,
915
+ instanceOfWebhookAttemptOutDTO: () => instanceOfWebhookAttemptOutDTO,
916
+ instanceOfWebhookDeliveryResultOutDTO: () => instanceOfWebhookDeliveryResultOutDTO,
917
+ instanceOfWebhookEndpointCreateInDTO: () => instanceOfWebhookEndpointCreateInDTO,
918
+ instanceOfWebhookEndpointListOutDTO: () => instanceOfWebhookEndpointListOutDTO,
919
+ instanceOfWebhookEndpointOutDTO: () => instanceOfWebhookEndpointOutDTO,
920
+ instanceOfWebhookEndpointUpdateInDTO: () => instanceOfWebhookEndpointUpdateInDTO,
921
+ instanceOfWebhookEventListOutDTO: () => instanceOfWebhookEventListOutDTO,
922
+ instanceOfWebhookEventOutDTO: () => instanceOfWebhookEventOutDTO,
843
923
  instanceOfWebhookResponseDTO: () => instanceOfWebhookResponseDTO,
924
+ instanceOfWebhookTestEvent: () => instanceOfWebhookTestEvent,
925
+ instanceOfWebhookTestEventData: () => instanceOfWebhookTestEventData,
926
+ isExtractionCompleted: () => isExtractionCompleted,
927
+ isWebhookTest: () => isWebhookTest,
844
928
  mapValues: () => mapValues,
845
- querystring: () => querystring
929
+ querystring: () => querystring,
930
+ unwrapWebhook: () => unwrapWebhook
846
931
  });
847
932
  module.exports = __toCommonJS(index_exports);
848
933
 
@@ -5577,6 +5662,63 @@ var DocumentApi = class extends BaseAPI {
5577
5662
  const response = await this.purgeDocumentsWithExternalIdByUserRaw(requestParameters, initOverrides);
5578
5663
  return await response.value();
5579
5664
  }
5665
+ /**
5666
+ * Creates request options for resumeTutorialRequest without sending the request
5667
+ */
5668
+ async resumeTutorialRequestRequestOpts(requestParameters) {
5669
+ if (requestParameters["attemptId"] == null) {
5670
+ throw new RequiredError(
5671
+ "attemptId",
5672
+ 'Required parameter "attemptId" was null or undefined when calling resumeTutorialRequest().'
5673
+ );
5674
+ }
5675
+ const queryParameters = {};
5676
+ const headerParameters = {};
5677
+ if (this.configuration && this.configuration.apiKey) {
5678
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
5679
+ }
5680
+ const consumes = [
5681
+ { contentType: "multipart/form-data" }
5682
+ ];
5683
+ const canConsumeForm2 = canConsumeForm(consumes);
5684
+ let formParams;
5685
+ let useForm = false;
5686
+ useForm = canConsumeForm2;
5687
+ if (useForm) {
5688
+ formParams = new FormData();
5689
+ } else {
5690
+ formParams = new URLSearchParams();
5691
+ }
5692
+ if (requestParameters["file"] != null) {
5693
+ formParams.append("file", requestParameters["file"]);
5694
+ }
5695
+ let urlPath = `/api/v1/documents/tutorials/{attempt_id}/resume`;
5696
+ urlPath = urlPath.replace("{attempt_id}", encodeURIComponent(String(requestParameters["attemptId"])));
5697
+ return {
5698
+ path: urlPath,
5699
+ method: "POST",
5700
+ headers: headerParameters,
5701
+ query: queryParameters,
5702
+ body: formParams
5703
+ };
5704
+ }
5705
+ /**
5706
+ * Explicitly recover an interrupted guided API request, using its original key and file.
5707
+ * Resume Tutorial Request
5708
+ */
5709
+ async resumeTutorialRequestRaw(requestParameters, initOverrides) {
5710
+ const requestOptions = await this.resumeTutorialRequestRequestOpts(requestParameters);
5711
+ const response = await this.request(requestOptions, initOverrides);
5712
+ return new JSONApiResponse(response, (jsonValue) => DocumentProcessingResultOutDTOFromJSON(jsonValue));
5713
+ }
5714
+ /**
5715
+ * Explicitly recover an interrupted guided API request, using its original key and file.
5716
+ * Resume Tutorial Request
5717
+ */
5718
+ async resumeTutorialRequest(requestParameters, initOverrides) {
5719
+ const response = await this.resumeTutorialRequestRaw(requestParameters, initOverrides);
5720
+ return await response.value();
5721
+ }
5580
5722
  /**
5581
5723
  * Creates request options for uploadDocument without sending the request
5582
5724
  */
@@ -6984,6 +7126,87 @@ var FileTagApi = class extends BaseAPI {
6984
7126
  const response = await this.getMyFiletagCreditHistoryRaw(requestParameters, initOverrides);
6985
7127
  return await response.value();
6986
7128
  }
7129
+ /**
7130
+ * Creates request options for savedFiletagResult without sending the request
7131
+ */
7132
+ async savedFiletagResultRequestOpts(requestParameters) {
7133
+ if (requestParameters["documentId"] == null) {
7134
+ throw new RequiredError(
7135
+ "documentId",
7136
+ 'Required parameter "documentId" was null or undefined when calling savedFiletagResult().'
7137
+ );
7138
+ }
7139
+ const queryParameters = {};
7140
+ const headerParameters = {};
7141
+ if (this.configuration && this.configuration.apiKey) {
7142
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
7143
+ }
7144
+ let urlPath = `/api/v1/filetag/results/{document_id}`;
7145
+ urlPath = urlPath.replace("{document_id}", encodeURIComponent(String(requestParameters["documentId"])));
7146
+ return {
7147
+ path: urlPath,
7148
+ method: "GET",
7149
+ headers: headerParameters,
7150
+ query: queryParameters
7151
+ };
7152
+ }
7153
+ /**
7154
+ * Saved Filetag Result
7155
+ */
7156
+ async savedFiletagResultRaw(requestParameters, initOverrides) {
7157
+ const requestOptions = await this.savedFiletagResultRequestOpts(requestParameters);
7158
+ const response = await this.request(requestOptions, initOverrides);
7159
+ return new JSONApiResponse(response, (jsonValue) => FileTagResultOutDTOFromJSON(jsonValue));
7160
+ }
7161
+ /**
7162
+ * Saved Filetag Result
7163
+ */
7164
+ async savedFiletagResult(requestParameters, initOverrides) {
7165
+ const response = await this.savedFiletagResultRaw(requestParameters, initOverrides);
7166
+ return await response.value();
7167
+ }
7168
+ /**
7169
+ * Creates request options for savedFiletagResultUser without sending the request
7170
+ */
7171
+ async savedFiletagResultUserRequestOpts(requestParameters) {
7172
+ if (requestParameters["documentId"] == null) {
7173
+ throw new RequiredError(
7174
+ "documentId",
7175
+ 'Required parameter "documentId" was null or undefined when calling savedFiletagResultUser().'
7176
+ );
7177
+ }
7178
+ const queryParameters = {};
7179
+ const headerParameters = {};
7180
+ if (this.configuration && this.configuration.apiKey) {
7181
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
7182
+ }
7183
+ if (this.configuration && this.configuration.accessToken) {
7184
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
7185
+ }
7186
+ let urlPath = `/api/v1/filetag/results/user/{document_id}`;
7187
+ urlPath = urlPath.replace("{document_id}", encodeURIComponent(String(requestParameters["documentId"])));
7188
+ return {
7189
+ path: urlPath,
7190
+ method: "GET",
7191
+ headers: headerParameters,
7192
+ query: queryParameters
7193
+ };
7194
+ }
7195
+ /**
7196
+ * Saved Filetag Result User
7197
+ */
7198
+ async savedFiletagResultUserRaw(requestParameters, initOverrides) {
7199
+ const requestOptions = await this.savedFiletagResultUserRequestOpts(requestParameters);
7200
+ const response = await this.request(requestOptions, initOverrides);
7201
+ return new JSONApiResponse(response, (jsonValue) => FileTagResultOutDTOFromJSON(jsonValue));
7202
+ }
7203
+ /**
7204
+ * Saved Filetag Result User
7205
+ */
7206
+ async savedFiletagResultUser(requestParameters, initOverrides) {
7207
+ const response = await this.savedFiletagResultUserRaw(requestParameters, initOverrides);
7208
+ return await response.value();
7209
+ }
6987
7210
  /**
6988
7211
  * Creates request options for tagDocument without sending the request
6989
7212
  */
@@ -6995,6 +7218,9 @@ var FileTagApi = class extends BaseAPI {
6995
7218
  );
6996
7219
  }
6997
7220
  const queryParameters = {};
7221
+ if (requestParameters["externalId"] != null) {
7222
+ queryParameters["external_id"] = requestParameters["externalId"];
7223
+ }
6998
7224
  const headerParameters = {};
6999
7225
  if (this.configuration && this.configuration.apiKey) {
7000
7226
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
@@ -7051,6 +7277,9 @@ var FileTagApi = class extends BaseAPI {
7051
7277
  );
7052
7278
  }
7053
7279
  const queryParameters = {};
7280
+ if (requestParameters["externalId"] != null) {
7281
+ queryParameters["external_id"] = requestParameters["externalId"];
7282
+ }
7054
7283
  const headerParameters = {};
7055
7284
  if (this.configuration && this.configuration.apiKey) {
7056
7285
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
@@ -7231,6 +7460,7 @@ function FilesUploadInstructionsOutDTOFromJSONTyped(json, ignoreDiscriminator) {
7231
7460
  }
7232
7461
  return {
7233
7462
  "fileId": json["fileId"],
7463
+ "handoffExpiresAt": json["handoffExpiresAt"] == null ? void 0 : new Date(json["handoffExpiresAt"]),
7234
7464
  "nextToolCall": FilesNextToolCallOutDTOFromJSON(json["nextToolCall"]),
7235
7465
  "upload": FilesUploadDetailsOutDTOFromJSON(json["upload"])
7236
7466
  };
@@ -7244,6 +7474,7 @@ function FilesUploadInstructionsOutDTOToJSONTyped(value, ignoreDiscriminator = f
7244
7474
  }
7245
7475
  return {
7246
7476
  "fileId": value["fileId"],
7477
+ "handoffExpiresAt": value["handoffExpiresAt"] == null ? value["handoffExpiresAt"] : value["handoffExpiresAt"].toISOString(),
7247
7478
  "nextToolCall": FilesNextToolCallOutDTOToJSON(value["nextToolCall"]),
7248
7479
  "upload": FilesUploadDetailsOutDTOToJSON(value["upload"])
7249
7480
  };
@@ -7645,10 +7876,14 @@ function RetrievalFiltersDTOFromJSONTyped(json, ignoreDiscriminator) {
7645
7876
  }
7646
7877
  return {
7647
7878
  "buyerName": json["buyerName"] == null ? void 0 : json["buyerName"],
7879
+ "currencies": json["currencies"] == null ? void 0 : json["currencies"],
7648
7880
  "currency": json["currency"] == null ? void 0 : json["currency"],
7649
7881
  "docNumber": json["docNumber"] == null ? void 0 : json["docNumber"],
7882
+ "docNumbers": json["docNumbers"] == null ? void 0 : json["docNumbers"],
7650
7883
  "documentId": json["documentId"] == null ? void 0 : json["documentId"],
7884
+ "documentIds": json["documentIds"] == null ? void 0 : json["documentIds"],
7651
7885
  "documentType": json["documentType"] == null ? void 0 : json["documentType"],
7886
+ "documentTypes": json["documentTypes"] == null ? void 0 : json["documentTypes"],
7652
7887
  "dueDateFrom": json["dueDateFrom"] == null ? void 0 : new Date(json["dueDateFrom"]),
7653
7888
  "dueDateTo": json["dueDateTo"] == null ? void 0 : new Date(json["dueDateTo"]),
7654
7889
  "endUserId": json["endUserId"] == null ? void 0 : json["endUserId"],
@@ -7660,6 +7895,7 @@ function RetrievalFiltersDTOFromJSONTyped(json, ignoreDiscriminator) {
7660
7895
  "totalAmountMax": json["totalAmountMax"] == null ? void 0 : json["totalAmountMax"],
7661
7896
  "totalAmountMin": json["totalAmountMin"] == null ? void 0 : json["totalAmountMin"],
7662
7897
  "vendorName": json["vendorName"] == null ? void 0 : json["vendorName"],
7898
+ "vendorNames": json["vendorNames"] == null ? void 0 : json["vendorNames"],
7663
7899
  "vendorTaxId": json["vendorTaxId"] == null ? void 0 : json["vendorTaxId"]
7664
7900
  };
7665
7901
  }
@@ -7672,10 +7908,14 @@ function RetrievalFiltersDTOToJSONTyped(value, ignoreDiscriminator = false) {
7672
7908
  }
7673
7909
  return {
7674
7910
  "buyerName": value["buyerName"],
7911
+ "currencies": value["currencies"],
7675
7912
  "currency": value["currency"],
7676
7913
  "docNumber": value["docNumber"],
7914
+ "docNumbers": value["docNumbers"],
7677
7915
  "documentId": value["documentId"],
7916
+ "documentIds": value["documentIds"],
7678
7917
  "documentType": value["documentType"],
7918
+ "documentTypes": value["documentTypes"],
7679
7919
  "dueDateFrom": value["dueDateFrom"] == null ? value["dueDateFrom"] : value["dueDateFrom"].toISOString().substring(0, 10),
7680
7920
  "dueDateTo": value["dueDateTo"] == null ? value["dueDateTo"] : value["dueDateTo"].toISOString().substring(0, 10),
7681
7921
  "endUserId": value["endUserId"],
@@ -7687,6 +7927,7 @@ function RetrievalFiltersDTOToJSONTyped(value, ignoreDiscriminator = false) {
7687
7927
  "totalAmountMax": value["totalAmountMax"],
7688
7928
  "totalAmountMin": value["totalAmountMin"],
7689
7929
  "vendorName": value["vendorName"],
7930
+ "vendorNames": value["vendorNames"],
7690
7931
  "vendorTaxId": value["vendorTaxId"]
7691
7932
  };
7692
7933
  }
@@ -7755,7 +7996,8 @@ var AggregateMetricDTOFieldEnum = {
7755
7996
  TotalAmount: "total_amount",
7756
7997
  NetAmount: "net_amount",
7757
7998
  VatAmount: "vat_amount",
7758
- MeasurableQuantity: "measurable_quantity"
7999
+ MeasurableQuantity: "measurable_quantity",
8000
+ LineTotal: "line_total"
7759
8001
  };
7760
8002
  var AggregateMetricDTOOpEnum = {
7761
8003
  Sum: "sum",
@@ -7806,7 +8048,10 @@ var RetrievalAggregateInDTOGroupByEnum = {
7806
8048
  Month: "month",
7807
8049
  Year: "year",
7808
8050
  MeasurableUom: "measurable_uom",
7809
- Description: "description"
8051
+ Description: "description",
8052
+ DocNumber: "doc_number",
8053
+ IssueDate: "issue_date",
8054
+ DocumentId: "document_id"
7810
8055
  };
7811
8056
  function instanceOfRetrievalAggregateInDTO(value) {
7812
8057
  if (!("metrics" in value) || value["metrics"] === void 0) return false;
@@ -8090,6 +8335,11 @@ function RetrievalQueryInDTOToJSONTyped(value, ignoreDiscriminator = false) {
8090
8335
  }
8091
8336
 
8092
8337
  // src/generated/models/QueryMetaDTO.ts
8338
+ var QueryMetaDTOIndexingStateEnum = {
8339
+ Preparing: "preparing",
8340
+ Ready: "ready",
8341
+ Unavailable: "unavailable"
8342
+ };
8093
8343
  function instanceOfQueryMetaDTO(value) {
8094
8344
  if (!("count" in value) || value["count"] === void 0) return false;
8095
8345
  if (!("mode" in value) || value["mode"] === void 0) return false;
@@ -8104,6 +8354,8 @@ function QueryMetaDTOFromJSONTyped(json, ignoreDiscriminator) {
8104
8354
  }
8105
8355
  return {
8106
8356
  "count": json["count"],
8357
+ "indexingReady": json["indexingReady"] == null ? void 0 : json["indexingReady"],
8358
+ "indexingState": json["indexingState"] == null ? void 0 : json["indexingState"],
8107
8359
  "limit": json["limit"] == null ? void 0 : json["limit"],
8108
8360
  "mode": json["mode"],
8109
8361
  "skip": json["skip"] == null ? void 0 : json["skip"]
@@ -8118,6 +8370,8 @@ function QueryMetaDTOToJSONTyped(value, ignoreDiscriminator = false) {
8118
8370
  }
8119
8371
  return {
8120
8372
  "count": value["count"],
8373
+ "indexingReady": value["indexingReady"],
8374
+ "indexingState": value["indexingState"],
8121
8375
  "limit": value["limit"],
8122
8376
  "mode": value["mode"],
8123
8377
  "skip": value["skip"]
@@ -8671,6 +8925,48 @@ function CheckoutOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
8671
8925
  };
8672
8926
  }
8673
8927
 
8928
+ // src/generated/models/PaymentMethodUpdateOutDTO.ts
8929
+ var PaymentMethodUpdateOutDTOPurposeEnum = {
8930
+ UpdatePaymentMethod: "update_payment_method",
8931
+ PayOverdue: "pay_overdue",
8932
+ ResumeSubscription: "resume_subscription"
8933
+ };
8934
+ function instanceOfPaymentMethodUpdateOutDTO(value) {
8935
+ if (!("paddleTransactionId" in value) || value["paddleTransactionId"] === void 0) return false;
8936
+ if (!("purpose" in value) || value["purpose"] === void 0) return false;
8937
+ return true;
8938
+ }
8939
+ function PaymentMethodUpdateOutDTOFromJSON(json) {
8940
+ return PaymentMethodUpdateOutDTOFromJSONTyped(json, false);
8941
+ }
8942
+ function PaymentMethodUpdateOutDTOFromJSONTyped(json, ignoreDiscriminator) {
8943
+ if (json == null) {
8944
+ return json;
8945
+ }
8946
+ return {
8947
+ "checkoutUrl": json["checkoutUrl"] == null ? void 0 : json["checkoutUrl"],
8948
+ "createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
8949
+ "createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
8950
+ "paddleTransactionId": json["paddleTransactionId"],
8951
+ "purpose": json["purpose"]
8952
+ };
8953
+ }
8954
+ function PaymentMethodUpdateOutDTOToJSON(json) {
8955
+ return PaymentMethodUpdateOutDTOToJSONTyped(json, false);
8956
+ }
8957
+ function PaymentMethodUpdateOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
8958
+ if (value == null) {
8959
+ return value;
8960
+ }
8961
+ return {
8962
+ "checkoutUrl": value["checkoutUrl"],
8963
+ "createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
8964
+ "createdAtTimestamp": value["createdAtTimestamp"],
8965
+ "paddleTransactionId": value["paddleTransactionId"],
8966
+ "purpose": value["purpose"]
8967
+ };
8968
+ }
8969
+
8674
8970
  // src/generated/models/DataRetentionPeriodModel.ts
8675
8971
  var DataRetentionPeriodModel = {
8676
8972
  OneDay: "one_day",
@@ -9925,6 +10221,40 @@ var SubscriptionsApi = class extends BaseAPI {
9925
10221
  const response = await this.purchaseTopUpRaw(requestParameters, initOverrides);
9926
10222
  return await response.value();
9927
10223
  }
10224
+ /**
10225
+ * Creates request options for startPaymentMethodUpdate without sending the request
10226
+ */
10227
+ async startPaymentMethodUpdateRequestOpts() {
10228
+ const queryParameters = {};
10229
+ const headerParameters = {};
10230
+ if (this.configuration && this.configuration.accessToken) {
10231
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
10232
+ }
10233
+ let urlPath = `/api/v1/subscriptions/me/payment-method-update`;
10234
+ return {
10235
+ path: urlPath,
10236
+ method: "POST",
10237
+ headers: headerParameters,
10238
+ query: queryParameters
10239
+ };
10240
+ }
10241
+ /**
10242
+ * Start replacing the card on file for the caller\'s subscription (or enterprise contract). POST, not GET: for an active subscription Paddle creates a new zero-value transaction on every call.
10243
+ * Start Payment Method Update
10244
+ */
10245
+ async startPaymentMethodUpdateRaw(initOverrides) {
10246
+ const requestOptions = await this.startPaymentMethodUpdateRequestOpts();
10247
+ const response = await this.request(requestOptions, initOverrides);
10248
+ return new JSONApiResponse(response, (jsonValue) => PaymentMethodUpdateOutDTOFromJSON(jsonValue));
10249
+ }
10250
+ /**
10251
+ * Start replacing the card on file for the caller\'s subscription (or enterprise contract). POST, not GET: for an active subscription Paddle creates a new zero-value transaction on every call.
10252
+ * Start Payment Method Update
10253
+ */
10254
+ async startPaymentMethodUpdate(initOverrides) {
10255
+ const response = await this.startPaymentMethodUpdateRaw(initOverrides);
10256
+ return await response.value();
10257
+ }
9928
10258
  /**
9929
10259
  * Creates request options for subscribe without sending the request
9930
10260
  */
@@ -10262,6 +10592,7 @@ function TemplateOutDTOFromJSONTyped(json, ignoreDiscriminator) {
10262
10592
  "error": json["error"] == null ? void 0 : json["error"],
10263
10593
  "id": json["id"],
10264
10594
  "isActive": json["isActive"] == null ? void 0 : json["isActive"],
10595
+ "isStarter": json["isStarter"] == null ? void 0 : json["isStarter"],
10265
10596
  "name": json["name"],
10266
10597
  "schema": json["schema"] == null ? void 0 : TemplateSchemaDTOOutputFromJSON(json["schema"]),
10267
10598
  "sourceFilename": json["sourceFilename"] == null ? void 0 : json["sourceFilename"],
@@ -10282,6 +10613,7 @@ function TemplateOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
10282
10613
  "error": value["error"],
10283
10614
  "id": value["id"],
10284
10615
  "isActive": value["isActive"],
10616
+ "isStarter": value["isStarter"],
10285
10617
  "name": value["name"],
10286
10618
  "schema": TemplateSchemaDTOOutputToJSON(value["schema"]),
10287
10619
  "sourceFilename": value["sourceFilename"],
@@ -10892,112 +11224,1085 @@ var TemplatesApi = class extends BaseAPI {
10892
11224
  }
10893
11225
  };
10894
11226
 
10895
- // src/generated/models/CreditMeterFilter.ts
10896
- var CreditMeterFilter = {
10897
- ProcessingCredits: "processing_credits",
10898
- FiletagCredits: "filetag_credits",
10899
- All: "all"
11227
+ // src/generated/models/CreatedWebhookEndpointOutDTO.ts
11228
+ var CreatedWebhookEndpointOutDTODisabledReasonEnum = {
11229
+ User: "user",
11230
+ Gone: "gone",
11231
+ Failing: "failing",
11232
+ AccountDeleted: "account_deleted",
11233
+ Operator: "operator"
10900
11234
  };
10901
- function instanceOfCreditMeterFilter(value) {
10902
- for (const key in CreditMeterFilter) {
10903
- if (Object.prototype.hasOwnProperty.call(CreditMeterFilter, key)) {
10904
- if (CreditMeterFilter[key] === value) {
10905
- return true;
10906
- }
10907
- }
10908
- }
10909
- return false;
11235
+ function instanceOfCreatedWebhookEndpointOutDTO(value) {
11236
+ if (!("enabled" in value) || value["enabled"] === void 0) return false;
11237
+ if (!("id" in value) || value["id"] === void 0) return false;
11238
+ if (!("notBefore" in value) || value["notBefore"] === void 0) return false;
11239
+ if (!("secret" in value) || value["secret"] === void 0) return false;
11240
+ if (!("url" in value) || value["url"] === void 0) return false;
11241
+ return true;
10910
11242
  }
10911
- function CreditMeterFilterFromJSON(json) {
10912
- return CreditMeterFilterFromJSONTyped(json, false);
11243
+ function CreatedWebhookEndpointOutDTOFromJSON(json) {
11244
+ return CreatedWebhookEndpointOutDTOFromJSONTyped(json, false);
10913
11245
  }
10914
- function CreditMeterFilterFromJSONTyped(json, ignoreDiscriminator) {
10915
- return json;
11246
+ function CreatedWebhookEndpointOutDTOFromJSONTyped(json, ignoreDiscriminator) {
11247
+ if (json == null) {
11248
+ return json;
11249
+ }
11250
+ return {
11251
+ "createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
11252
+ "createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
11253
+ "description": json["description"] == null ? void 0 : json["description"],
11254
+ "disabledAt": json["disabledAt"] == null ? void 0 : new Date(json["disabledAt"]),
11255
+ "disabledReason": json["disabledReason"] == null ? void 0 : json["disabledReason"],
11256
+ "enabled": json["enabled"],
11257
+ "failing": json["failing"] == null ? void 0 : json["failing"],
11258
+ "failingSince": json["failingSince"] == null ? void 0 : new Date(json["failingSince"]),
11259
+ "id": json["id"],
11260
+ "lastDeliveredAt": json["lastDeliveredAt"] == null ? void 0 : new Date(json["lastDeliveredAt"]),
11261
+ "lastTestSucceededAt": json["lastTestSucceededAt"] == null ? void 0 : new Date(json["lastTestSucceededAt"]),
11262
+ "notBefore": new Date(json["notBefore"]),
11263
+ "previousSecretExpiresAt": json["previousSecretExpiresAt"] == null ? void 0 : new Date(json["previousSecretExpiresAt"]),
11264
+ "secret": json["secret"],
11265
+ "url": json["url"]
11266
+ };
10916
11267
  }
10917
- function CreditMeterFilterToJSON(value) {
10918
- return value;
11268
+ function CreatedWebhookEndpointOutDTOToJSON(json) {
11269
+ return CreatedWebhookEndpointOutDTOToJSONTyped(json, false);
10919
11270
  }
10920
- function CreditMeterFilterToJSONTyped(value, ignoreDiscriminator) {
10921
- return value;
11271
+ function CreatedWebhookEndpointOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
11272
+ if (value == null) {
11273
+ return value;
11274
+ }
11275
+ return {
11276
+ "createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
11277
+ "createdAtTimestamp": value["createdAtTimestamp"],
11278
+ "description": value["description"],
11279
+ "disabledAt": value["disabledAt"] == null ? value["disabledAt"] : value["disabledAt"].toISOString(),
11280
+ "disabledReason": value["disabledReason"],
11281
+ "enabled": value["enabled"],
11282
+ "failing": value["failing"],
11283
+ "failingSince": value["failingSince"] == null ? value["failingSince"] : value["failingSince"].toISOString(),
11284
+ "id": value["id"],
11285
+ "lastDeliveredAt": value["lastDeliveredAt"] == null ? value["lastDeliveredAt"] : value["lastDeliveredAt"].toISOString(),
11286
+ "lastTestSucceededAt": value["lastTestSucceededAt"] == null ? value["lastTestSucceededAt"] : value["lastTestSucceededAt"].toISOString(),
11287
+ "notBefore": value["notBefore"].toISOString(),
11288
+ "previousSecretExpiresAt": value["previousSecretExpiresAt"] == null ? value["previousSecretExpiresAt"] : value["previousSecretExpiresAt"].toISOString(),
11289
+ "secret": value["secret"],
11290
+ "url": value["url"]
11291
+ };
10922
11292
  }
10923
11293
 
10924
- // src/generated/models/FoundationDTO.ts
10925
- function instanceOfFoundationDTO(value) {
10926
- if (!("status" in value) || value["status"] === void 0) return false;
11294
+ // src/generated/models/WebhookDeliveryResultOutDTO.ts
11295
+ function instanceOfWebhookDeliveryResultOutDTO(value) {
11296
+ if (!("attemptId" in value) || value["attemptId"] === void 0) return false;
11297
+ if (!("eventId" in value) || value["eventId"] === void 0) return false;
10927
11298
  return true;
10928
11299
  }
10929
- function FoundationDTOFromJSON(json) {
10930
- return FoundationDTOFromJSONTyped(json, false);
11300
+ function WebhookDeliveryResultOutDTOFromJSON(json) {
11301
+ return WebhookDeliveryResultOutDTOFromJSONTyped(json, false);
10931
11302
  }
10932
- function FoundationDTOFromJSONTyped(json, ignoreDiscriminator) {
11303
+ function WebhookDeliveryResultOutDTOFromJSONTyped(json, ignoreDiscriminator) {
10933
11304
  if (json == null) {
10934
11305
  return json;
10935
11306
  }
10936
11307
  return {
11308
+ "attemptId": json["attemptId"],
10937
11309
  "createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
10938
11310
  "createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
10939
- "data": json["data"] == null ? void 0 : json["data"],
10940
- "errors": json["errors"] == null ? void 0 : json["errors"],
10941
- "meta": json["meta"] == null ? void 0 : FoundationMetaDTOFromJSON(json["meta"]),
11311
+ "delivered": json["delivered"] == null ? void 0 : json["delivered"],
11312
+ "durationMs": json["durationMs"] == null ? void 0 : json["durationMs"],
11313
+ "error": json["error"] == null ? void 0 : json["error"],
11314
+ "eventId": json["eventId"],
11315
+ "httpStatus": json["httpStatus"] == null ? void 0 : json["httpStatus"],
11316
+ "pending": json["pending"] == null ? void 0 : json["pending"],
11317
+ "responseSnippet": json["responseSnippet"] == null ? void 0 : json["responseSnippet"],
10942
11318
  "servedAt": json["servedAt"] == null ? void 0 : new Date(json["servedAt"]),
10943
- "servedAtTimestamp": json["servedAtTimestamp"] == null ? void 0 : json["servedAtTimestamp"],
10944
- "status": ResponseStatusFromJSON(json["status"])
11319
+ "servedAtTimestamp": json["servedAtTimestamp"] == null ? void 0 : json["servedAtTimestamp"]
10945
11320
  };
10946
11321
  }
10947
- function FoundationDTOToJSON(json) {
10948
- return FoundationDTOToJSONTyped(json, false);
11322
+ function WebhookDeliveryResultOutDTOToJSON(json) {
11323
+ return WebhookDeliveryResultOutDTOToJSONTyped(json, false);
10949
11324
  }
10950
- function FoundationDTOToJSONTyped(value, ignoreDiscriminator = false) {
11325
+ function WebhookDeliveryResultOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
10951
11326
  if (value == null) {
10952
11327
  return value;
10953
11328
  }
10954
11329
  return {
11330
+ "attemptId": value["attemptId"],
10955
11331
  "createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
10956
11332
  "createdAtTimestamp": value["createdAtTimestamp"],
10957
- "data": value["data"],
10958
- "errors": value["errors"],
10959
- "meta": FoundationMetaDTOToJSON(value["meta"]),
11333
+ "delivered": value["delivered"],
11334
+ "durationMs": value["durationMs"],
11335
+ "error": value["error"],
11336
+ "eventId": value["eventId"],
11337
+ "httpStatus": value["httpStatus"],
11338
+ "pending": value["pending"],
11339
+ "responseSnippet": value["responseSnippet"],
10960
11340
  "servedAt": value["servedAt"] == null ? value["servedAt"] : value["servedAt"].toISOString(),
10961
- "servedAtTimestamp": value["servedAtTimestamp"],
10962
- "status": ResponseStatusToJSON(value["status"])
11341
+ "servedAtTimestamp": value["servedAtTimestamp"]
10963
11342
  };
10964
11343
  }
10965
11344
 
10966
- // src/generated/models/LocationInner.ts
10967
- function instanceOfLocationInner(value) {
10968
- return true;
10969
- }
10970
- function LocationInnerFromJSON(json) {
10971
- return LocationInnerFromJSONTyped(json, false);
10972
- }
10973
- function LocationInnerFromJSONTyped(json, ignoreDiscriminator) {
10974
- return json;
10975
- }
10976
- function LocationInnerToJSON(json) {
10977
- return LocationInnerToJSONTyped(json, false);
10978
- }
10979
- function LocationInnerToJSONTyped(value, ignoreDiscriminator = false) {
10980
- return value;
10981
- }
10982
-
10983
- // src/generated/models/ValidationError.ts
10984
- function instanceOfValidationError(value) {
10985
- if (!("loc" in value) || value["loc"] === void 0) return false;
10986
- if (!("msg" in value) || value["msg"] === void 0) return false;
10987
- if (!("type" in value) || value["type"] === void 0) return false;
11345
+ // src/generated/models/WebhookEndpointCreateInDTO.ts
11346
+ function instanceOfWebhookEndpointCreateInDTO(value) {
11347
+ if (!("url" in value) || value["url"] === void 0) return false;
10988
11348
  return true;
10989
11349
  }
10990
- function ValidationErrorFromJSON(json) {
10991
- return ValidationErrorFromJSONTyped(json, false);
11350
+ function WebhookEndpointCreateInDTOFromJSON(json) {
11351
+ return WebhookEndpointCreateInDTOFromJSONTyped(json, false);
10992
11352
  }
10993
- function ValidationErrorFromJSONTyped(json, ignoreDiscriminator) {
11353
+ function WebhookEndpointCreateInDTOFromJSONTyped(json, ignoreDiscriminator) {
10994
11354
  if (json == null) {
10995
11355
  return json;
10996
11356
  }
10997
11357
  return {
10998
- "loc": json["loc"].map(LocationInnerFromJSON),
10999
- "msg": json["msg"],
11000
- "type": json["type"]
11358
+ "description": json["description"] == null ? void 0 : json["description"],
11359
+ "url": json["url"]
11360
+ };
11361
+ }
11362
+ function WebhookEndpointCreateInDTOToJSON(json) {
11363
+ return WebhookEndpointCreateInDTOToJSONTyped(json, false);
11364
+ }
11365
+ function WebhookEndpointCreateInDTOToJSONTyped(value, ignoreDiscriminator = false) {
11366
+ if (value == null) {
11367
+ return value;
11368
+ }
11369
+ return {
11370
+ "description": value["description"],
11371
+ "url": value["url"]
11372
+ };
11373
+ }
11374
+
11375
+ // src/generated/models/WebhookEndpointOutDTO.ts
11376
+ var WebhookEndpointOutDTODisabledReasonEnum = {
11377
+ User: "user",
11378
+ Gone: "gone",
11379
+ Failing: "failing",
11380
+ AccountDeleted: "account_deleted",
11381
+ Operator: "operator"
11382
+ };
11383
+ function instanceOfWebhookEndpointOutDTO(value) {
11384
+ if (!("enabled" in value) || value["enabled"] === void 0) return false;
11385
+ if (!("id" in value) || value["id"] === void 0) return false;
11386
+ if (!("notBefore" in value) || value["notBefore"] === void 0) return false;
11387
+ if (!("url" in value) || value["url"] === void 0) return false;
11388
+ return true;
11389
+ }
11390
+ function WebhookEndpointOutDTOFromJSON(json) {
11391
+ return WebhookEndpointOutDTOFromJSONTyped(json, false);
11392
+ }
11393
+ function WebhookEndpointOutDTOFromJSONTyped(json, ignoreDiscriminator) {
11394
+ if (json == null) {
11395
+ return json;
11396
+ }
11397
+ return {
11398
+ "createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
11399
+ "createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
11400
+ "description": json["description"] == null ? void 0 : json["description"],
11401
+ "disabledAt": json["disabledAt"] == null ? void 0 : new Date(json["disabledAt"]),
11402
+ "disabledReason": json["disabledReason"] == null ? void 0 : json["disabledReason"],
11403
+ "enabled": json["enabled"],
11404
+ "failing": json["failing"] == null ? void 0 : json["failing"],
11405
+ "failingSince": json["failingSince"] == null ? void 0 : new Date(json["failingSince"]),
11406
+ "id": json["id"],
11407
+ "lastDeliveredAt": json["lastDeliveredAt"] == null ? void 0 : new Date(json["lastDeliveredAt"]),
11408
+ "lastTestSucceededAt": json["lastTestSucceededAt"] == null ? void 0 : new Date(json["lastTestSucceededAt"]),
11409
+ "notBefore": new Date(json["notBefore"]),
11410
+ "previousSecretExpiresAt": json["previousSecretExpiresAt"] == null ? void 0 : new Date(json["previousSecretExpiresAt"]),
11411
+ "url": json["url"]
11412
+ };
11413
+ }
11414
+ function WebhookEndpointOutDTOToJSON(json) {
11415
+ return WebhookEndpointOutDTOToJSONTyped(json, false);
11416
+ }
11417
+ function WebhookEndpointOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
11418
+ if (value == null) {
11419
+ return value;
11420
+ }
11421
+ return {
11422
+ "createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
11423
+ "createdAtTimestamp": value["createdAtTimestamp"],
11424
+ "description": value["description"],
11425
+ "disabledAt": value["disabledAt"] == null ? value["disabledAt"] : value["disabledAt"].toISOString(),
11426
+ "disabledReason": value["disabledReason"],
11427
+ "enabled": value["enabled"],
11428
+ "failing": value["failing"],
11429
+ "failingSince": value["failingSince"] == null ? value["failingSince"] : value["failingSince"].toISOString(),
11430
+ "id": value["id"],
11431
+ "lastDeliveredAt": value["lastDeliveredAt"] == null ? value["lastDeliveredAt"] : value["lastDeliveredAt"].toISOString(),
11432
+ "lastTestSucceededAt": value["lastTestSucceededAt"] == null ? value["lastTestSucceededAt"] : value["lastTestSucceededAt"].toISOString(),
11433
+ "notBefore": value["notBefore"].toISOString(),
11434
+ "previousSecretExpiresAt": value["previousSecretExpiresAt"] == null ? value["previousSecretExpiresAt"] : value["previousSecretExpiresAt"].toISOString(),
11435
+ "url": value["url"]
11436
+ };
11437
+ }
11438
+
11439
+ // src/generated/models/WebhookEndpointListOutDTO.ts
11440
+ function instanceOfWebhookEndpointListOutDTO(value) {
11441
+ if (!("count" in value) || value["count"] === void 0) return false;
11442
+ if (!("endpoints" in value) || value["endpoints"] === void 0) return false;
11443
+ return true;
11444
+ }
11445
+ function WebhookEndpointListOutDTOFromJSON(json) {
11446
+ return WebhookEndpointListOutDTOFromJSONTyped(json, false);
11447
+ }
11448
+ function WebhookEndpointListOutDTOFromJSONTyped(json, ignoreDiscriminator) {
11449
+ if (json == null) {
11450
+ return json;
11451
+ }
11452
+ return {
11453
+ "count": json["count"],
11454
+ "createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
11455
+ "createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
11456
+ "endpoints": json["endpoints"].map(WebhookEndpointOutDTOFromJSON),
11457
+ "servedAt": json["servedAt"] == null ? void 0 : new Date(json["servedAt"]),
11458
+ "servedAtTimestamp": json["servedAtTimestamp"] == null ? void 0 : json["servedAtTimestamp"]
11459
+ };
11460
+ }
11461
+ function WebhookEndpointListOutDTOToJSON(json) {
11462
+ return WebhookEndpointListOutDTOToJSONTyped(json, false);
11463
+ }
11464
+ function WebhookEndpointListOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
11465
+ if (value == null) {
11466
+ return value;
11467
+ }
11468
+ return {
11469
+ "count": value["count"],
11470
+ "createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
11471
+ "createdAtTimestamp": value["createdAtTimestamp"],
11472
+ "endpoints": value["endpoints"].map(WebhookEndpointOutDTOToJSON),
11473
+ "servedAt": value["servedAt"] == null ? value["servedAt"] : value["servedAt"].toISOString(),
11474
+ "servedAtTimestamp": value["servedAtTimestamp"]
11475
+ };
11476
+ }
11477
+
11478
+ // src/generated/models/WebhookEndpointUpdateInDTO.ts
11479
+ function instanceOfWebhookEndpointUpdateInDTO(value) {
11480
+ return true;
11481
+ }
11482
+ function WebhookEndpointUpdateInDTOFromJSON(json) {
11483
+ return WebhookEndpointUpdateInDTOFromJSONTyped(json, false);
11484
+ }
11485
+ function WebhookEndpointUpdateInDTOFromJSONTyped(json, ignoreDiscriminator) {
11486
+ if (json == null) {
11487
+ return json;
11488
+ }
11489
+ return {
11490
+ "description": json["description"] == null ? void 0 : json["description"],
11491
+ "enabled": json["enabled"] == null ? void 0 : json["enabled"],
11492
+ "url": json["url"] == null ? void 0 : json["url"]
11493
+ };
11494
+ }
11495
+ function WebhookEndpointUpdateInDTOToJSON(json) {
11496
+ return WebhookEndpointUpdateInDTOToJSONTyped(json, false);
11497
+ }
11498
+ function WebhookEndpointUpdateInDTOToJSONTyped(value, ignoreDiscriminator = false) {
11499
+ if (value == null) {
11500
+ return value;
11501
+ }
11502
+ return {
11503
+ "description": value["description"],
11504
+ "enabled": value["enabled"],
11505
+ "url": value["url"]
11506
+ };
11507
+ }
11508
+
11509
+ // src/generated/models/WebhookAttemptOutDTO.ts
11510
+ function instanceOfWebhookAttemptOutDTO(value) {
11511
+ if (!("attemptNumber" in value) || value["attemptNumber"] === void 0) return false;
11512
+ if (!("attemptedAt" in value) || value["attemptedAt"] === void 0) return false;
11513
+ if (!("durationMs" in value) || value["durationMs"] === void 0) return false;
11514
+ if (!("id" in value) || value["id"] === void 0) return false;
11515
+ return true;
11516
+ }
11517
+ function WebhookAttemptOutDTOFromJSON(json) {
11518
+ return WebhookAttemptOutDTOFromJSONTyped(json, false);
11519
+ }
11520
+ function WebhookAttemptOutDTOFromJSONTyped(json, ignoreDiscriminator) {
11521
+ if (json == null) {
11522
+ return json;
11523
+ }
11524
+ return {
11525
+ "attemptNumber": json["attemptNumber"],
11526
+ "attemptedAt": new Date(json["attemptedAt"]),
11527
+ "createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
11528
+ "createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
11529
+ "durationMs": json["durationMs"],
11530
+ "error": json["error"] == null ? void 0 : json["error"],
11531
+ "httpStatus": json["httpStatus"] == null ? void 0 : json["httpStatus"],
11532
+ "id": json["id"],
11533
+ "responseSnippet": json["responseSnippet"] == null ? void 0 : json["responseSnippet"]
11534
+ };
11535
+ }
11536
+ function WebhookAttemptOutDTOToJSON(json) {
11537
+ return WebhookAttemptOutDTOToJSONTyped(json, false);
11538
+ }
11539
+ function WebhookAttemptOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
11540
+ if (value == null) {
11541
+ return value;
11542
+ }
11543
+ return {
11544
+ "attemptNumber": value["attemptNumber"],
11545
+ "attemptedAt": value["attemptedAt"].toISOString(),
11546
+ "createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
11547
+ "createdAtTimestamp": value["createdAtTimestamp"],
11548
+ "durationMs": value["durationMs"],
11549
+ "error": value["error"],
11550
+ "httpStatus": value["httpStatus"],
11551
+ "id": value["id"],
11552
+ "responseSnippet": value["responseSnippet"]
11553
+ };
11554
+ }
11555
+
11556
+ // src/generated/models/WebhookEventOutDTO.ts
11557
+ var WebhookEventOutDTOFailureReasonEnum = {
11558
+ EndpointDisabled: "endpoint_disabled",
11559
+ RetriesExhausted: "retries_exhausted",
11560
+ Failed: "failed",
11561
+ Gone: "gone",
11562
+ NotFinal: "not_final",
11563
+ Unavailable: "unavailable",
11564
+ Superseded: "superseded"
11565
+ };
11566
+ var WebhookEventOutDTOStatusEnum = {
11567
+ Pending: "pending",
11568
+ Delivered: "delivered",
11569
+ Failed: "failed",
11570
+ Superseded: "superseded"
11571
+ };
11572
+ var WebhookEventOutDTOTypeEnum = {
11573
+ ExtractionCompleted: "extraction.completed",
11574
+ WebhookTest: "webhook.test"
11575
+ };
11576
+ function instanceOfWebhookEventOutDTO(value) {
11577
+ if (!("attemptCount" in value) || value["attemptCount"] === void 0) return false;
11578
+ if (!("endpointId" in value) || value["endpointId"] === void 0) return false;
11579
+ if (!("id" in value) || value["id"] === void 0) return false;
11580
+ if (!("manual" in value) || value["manual"] === void 0) return false;
11581
+ if (!("occurredAt" in value) || value["occurredAt"] === void 0) return false;
11582
+ if (!("status" in value) || value["status"] === void 0) return false;
11583
+ if (!("type" in value) || value["type"] === void 0) return false;
11584
+ if (!("webhookId" in value) || value["webhookId"] === void 0) return false;
11585
+ return true;
11586
+ }
11587
+ function WebhookEventOutDTOFromJSON(json) {
11588
+ return WebhookEventOutDTOFromJSONTyped(json, false);
11589
+ }
11590
+ function WebhookEventOutDTOFromJSONTyped(json, ignoreDiscriminator) {
11591
+ if (json == null) {
11592
+ return json;
11593
+ }
11594
+ return {
11595
+ "attemptCount": json["attemptCount"],
11596
+ "attempts": json["attempts"] == null ? void 0 : json["attempts"].map(WebhookAttemptOutDTOFromJSON),
11597
+ "correlationId": json["correlationId"] == null ? void 0 : json["correlationId"],
11598
+ "createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
11599
+ "createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
11600
+ "deliveredAt": json["deliveredAt"] == null ? void 0 : new Date(json["deliveredAt"]),
11601
+ "documentId": json["documentId"] == null ? void 0 : json["documentId"],
11602
+ "endpointId": json["endpointId"],
11603
+ "externalId": json["externalId"] == null ? void 0 : json["externalId"],
11604
+ "failureReason": json["failureReason"] == null ? void 0 : json["failureReason"],
11605
+ "id": json["id"],
11606
+ "manual": json["manual"],
11607
+ "nextAttemptAt": json["nextAttemptAt"] == null ? void 0 : new Date(json["nextAttemptAt"]),
11608
+ "occurredAt": new Date(json["occurredAt"]),
11609
+ "outcome": json["outcome"] == null ? void 0 : json["outcome"],
11610
+ "status": json["status"],
11611
+ "type": json["type"],
11612
+ "webhookId": json["webhookId"]
11613
+ };
11614
+ }
11615
+ function WebhookEventOutDTOToJSON(json) {
11616
+ return WebhookEventOutDTOToJSONTyped(json, false);
11617
+ }
11618
+ function WebhookEventOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
11619
+ if (value == null) {
11620
+ return value;
11621
+ }
11622
+ return {
11623
+ "attemptCount": value["attemptCount"],
11624
+ "attempts": value["attempts"] == null ? void 0 : value["attempts"].map(WebhookAttemptOutDTOToJSON),
11625
+ "correlationId": value["correlationId"],
11626
+ "createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
11627
+ "createdAtTimestamp": value["createdAtTimestamp"],
11628
+ "deliveredAt": value["deliveredAt"] == null ? value["deliveredAt"] : value["deliveredAt"].toISOString(),
11629
+ "documentId": value["documentId"],
11630
+ "endpointId": value["endpointId"],
11631
+ "externalId": value["externalId"],
11632
+ "failureReason": value["failureReason"],
11633
+ "id": value["id"],
11634
+ "manual": value["manual"],
11635
+ "nextAttemptAt": value["nextAttemptAt"] == null ? value["nextAttemptAt"] : value["nextAttemptAt"].toISOString(),
11636
+ "occurredAt": value["occurredAt"].toISOString(),
11637
+ "outcome": value["outcome"],
11638
+ "status": value["status"],
11639
+ "type": value["type"],
11640
+ "webhookId": value["webhookId"]
11641
+ };
11642
+ }
11643
+
11644
+ // src/generated/models/WebhookEventListOutDTO.ts
11645
+ function instanceOfWebhookEventListOutDTO(value) {
11646
+ if (!("count" in value) || value["count"] === void 0) return false;
11647
+ if (!("events" in value) || value["events"] === void 0) return false;
11648
+ return true;
11649
+ }
11650
+ function WebhookEventListOutDTOFromJSON(json) {
11651
+ return WebhookEventListOutDTOFromJSONTyped(json, false);
11652
+ }
11653
+ function WebhookEventListOutDTOFromJSONTyped(json, ignoreDiscriminator) {
11654
+ if (json == null) {
11655
+ return json;
11656
+ }
11657
+ return {
11658
+ "count": json["count"],
11659
+ "createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
11660
+ "createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
11661
+ "events": json["events"].map(WebhookEventOutDTOFromJSON),
11662
+ "hasMore": json["hasMore"] == null ? void 0 : json["hasMore"],
11663
+ "nextCreatedBefore": json["nextCreatedBefore"] == null ? void 0 : json["nextCreatedBefore"],
11664
+ "servedAt": json["servedAt"] == null ? void 0 : new Date(json["servedAt"]),
11665
+ "servedAtTimestamp": json["servedAtTimestamp"] == null ? void 0 : json["servedAtTimestamp"]
11666
+ };
11667
+ }
11668
+ function WebhookEventListOutDTOToJSON(json) {
11669
+ return WebhookEventListOutDTOToJSONTyped(json, false);
11670
+ }
11671
+ function WebhookEventListOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
11672
+ if (value == null) {
11673
+ return value;
11674
+ }
11675
+ return {
11676
+ "count": value["count"],
11677
+ "createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
11678
+ "createdAtTimestamp": value["createdAtTimestamp"],
11679
+ "events": value["events"].map(WebhookEventOutDTOToJSON),
11680
+ "hasMore": value["hasMore"],
11681
+ "nextCreatedBefore": value["nextCreatedBefore"],
11682
+ "servedAt": value["servedAt"] == null ? value["servedAt"] : value["servedAt"].toISOString(),
11683
+ "servedAtTimestamp": value["servedAtTimestamp"]
11684
+ };
11685
+ }
11686
+
11687
+ // src/generated/apis/WebhooksApi.ts
11688
+ var WebhooksApi = class extends BaseAPI {
11689
+ /**
11690
+ * Creates request options for createWebhookEndpoint without sending the request
11691
+ */
11692
+ async createWebhookEndpointRequestOpts(requestParameters) {
11693
+ if (requestParameters["webhookEndpointCreateInDTO"] == null) {
11694
+ throw new RequiredError(
11695
+ "webhookEndpointCreateInDTO",
11696
+ 'Required parameter "webhookEndpointCreateInDTO" was null or undefined when calling createWebhookEndpoint().'
11697
+ );
11698
+ }
11699
+ const queryParameters = {};
11700
+ const headerParameters = {};
11701
+ headerParameters["Content-Type"] = "application/json";
11702
+ if (this.configuration && this.configuration.accessToken) {
11703
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
11704
+ }
11705
+ let urlPath = `/api/v1/webhooks/endpoints`;
11706
+ return {
11707
+ path: urlPath,
11708
+ method: "POST",
11709
+ headers: headerParameters,
11710
+ query: queryParameters,
11711
+ body: WebhookEndpointCreateInDTOToJSON(requestParameters["webhookEndpointCreateInDTO"])
11712
+ };
11713
+ }
11714
+ /**
11715
+ * Register the account\'s webhook endpoint. The signing secret is returned once, here.
11716
+ * Create Webhook Endpoint
11717
+ */
11718
+ async createWebhookEndpointRaw(requestParameters, initOverrides) {
11719
+ const requestOptions = await this.createWebhookEndpointRequestOpts(requestParameters);
11720
+ const response = await this.request(requestOptions, initOverrides);
11721
+ return new JSONApiResponse(response, (jsonValue) => CreatedWebhookEndpointOutDTOFromJSON(jsonValue));
11722
+ }
11723
+ /**
11724
+ * Register the account\'s webhook endpoint. The signing secret is returned once, here.
11725
+ * Create Webhook Endpoint
11726
+ */
11727
+ async createWebhookEndpoint(requestParameters, initOverrides) {
11728
+ const response = await this.createWebhookEndpointRaw(requestParameters, initOverrides);
11729
+ return await response.value();
11730
+ }
11731
+ /**
11732
+ * Creates request options for deleteWebhookEndpoint without sending the request
11733
+ */
11734
+ async deleteWebhookEndpointRequestOpts(requestParameters) {
11735
+ if (requestParameters["endpointId"] == null) {
11736
+ throw new RequiredError(
11737
+ "endpointId",
11738
+ 'Required parameter "endpointId" was null or undefined when calling deleteWebhookEndpoint().'
11739
+ );
11740
+ }
11741
+ const queryParameters = {};
11742
+ const headerParameters = {};
11743
+ if (this.configuration && this.configuration.accessToken) {
11744
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
11745
+ }
11746
+ let urlPath = `/api/v1/webhooks/endpoints/{endpoint_id}`;
11747
+ urlPath = urlPath.replace("{endpoint_id}", encodeURIComponent(String(requestParameters["endpointId"])));
11748
+ return {
11749
+ path: urlPath,
11750
+ method: "DELETE",
11751
+ headers: headerParameters,
11752
+ query: queryParameters
11753
+ };
11754
+ }
11755
+ /**
11756
+ * Delete the endpoint. Its pending events are failed and nothing more is sent.
11757
+ * Delete Webhook Endpoint
11758
+ */
11759
+ async deleteWebhookEndpointRaw(requestParameters, initOverrides) {
11760
+ const requestOptions = await this.deleteWebhookEndpointRequestOpts(requestParameters);
11761
+ const response = await this.request(requestOptions, initOverrides);
11762
+ return new VoidApiResponse(response);
11763
+ }
11764
+ /**
11765
+ * Delete the endpoint. Its pending events are failed and nothing more is sent.
11766
+ * Delete Webhook Endpoint
11767
+ */
11768
+ async deleteWebhookEndpoint(requestParameters, initOverrides) {
11769
+ await this.deleteWebhookEndpointRaw(requestParameters, initOverrides);
11770
+ }
11771
+ /**
11772
+ * Creates request options for getWebhookEndpoint without sending the request
11773
+ */
11774
+ async getWebhookEndpointRequestOpts(requestParameters) {
11775
+ if (requestParameters["endpointId"] == null) {
11776
+ throw new RequiredError(
11777
+ "endpointId",
11778
+ 'Required parameter "endpointId" was null or undefined when calling getWebhookEndpoint().'
11779
+ );
11780
+ }
11781
+ const queryParameters = {};
11782
+ const headerParameters = {};
11783
+ if (this.configuration && this.configuration.accessToken) {
11784
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
11785
+ }
11786
+ let urlPath = `/api/v1/webhooks/endpoints/{endpoint_id}`;
11787
+ urlPath = urlPath.replace("{endpoint_id}", encodeURIComponent(String(requestParameters["endpointId"])));
11788
+ return {
11789
+ path: urlPath,
11790
+ method: "GET",
11791
+ headers: headerParameters,
11792
+ query: queryParameters
11793
+ };
11794
+ }
11795
+ /**
11796
+ * One webhook endpoint. The signing secret is never returned here.
11797
+ * Get Webhook Endpoint
11798
+ */
11799
+ async getWebhookEndpointRaw(requestParameters, initOverrides) {
11800
+ const requestOptions = await this.getWebhookEndpointRequestOpts(requestParameters);
11801
+ const response = await this.request(requestOptions, initOverrides);
11802
+ return new JSONApiResponse(response, (jsonValue) => WebhookEndpointOutDTOFromJSON(jsonValue));
11803
+ }
11804
+ /**
11805
+ * One webhook endpoint. The signing secret is never returned here.
11806
+ * Get Webhook Endpoint
11807
+ */
11808
+ async getWebhookEndpoint(requestParameters, initOverrides) {
11809
+ const response = await this.getWebhookEndpointRaw(requestParameters, initOverrides);
11810
+ return await response.value();
11811
+ }
11812
+ /**
11813
+ * Creates request options for getWebhookEvent without sending the request
11814
+ */
11815
+ async getWebhookEventRequestOpts(requestParameters) {
11816
+ if (requestParameters["eventId"] == null) {
11817
+ throw new RequiredError(
11818
+ "eventId",
11819
+ 'Required parameter "eventId" was null or undefined when calling getWebhookEvent().'
11820
+ );
11821
+ }
11822
+ const queryParameters = {};
11823
+ const headerParameters = {};
11824
+ if (this.configuration && this.configuration.accessToken) {
11825
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
11826
+ }
11827
+ let urlPath = `/api/v1/webhooks/events/{event_id}`;
11828
+ urlPath = urlPath.replace("{event_id}", encodeURIComponent(String(requestParameters["eventId"])));
11829
+ return {
11830
+ path: urlPath,
11831
+ method: "GET",
11832
+ headers: headerParameters,
11833
+ query: queryParameters
11834
+ };
11835
+ }
11836
+ /**
11837
+ * One event with its delivery attempts. Use it to follow a test or a resend that was still pending.
11838
+ * Get Webhook Event
11839
+ */
11840
+ async getWebhookEventRaw(requestParameters, initOverrides) {
11841
+ const requestOptions = await this.getWebhookEventRequestOpts(requestParameters);
11842
+ const response = await this.request(requestOptions, initOverrides);
11843
+ return new JSONApiResponse(response, (jsonValue) => WebhookEventOutDTOFromJSON(jsonValue));
11844
+ }
11845
+ /**
11846
+ * One event with its delivery attempts. Use it to follow a test or a resend that was still pending.
11847
+ * Get Webhook Event
11848
+ */
11849
+ async getWebhookEvent(requestParameters, initOverrides) {
11850
+ const response = await this.getWebhookEventRaw(requestParameters, initOverrides);
11851
+ return await response.value();
11852
+ }
11853
+ /**
11854
+ * Creates request options for listWebhookEndpoints without sending the request
11855
+ */
11856
+ async listWebhookEndpointsRequestOpts() {
11857
+ const queryParameters = {};
11858
+ const headerParameters = {};
11859
+ if (this.configuration && this.configuration.accessToken) {
11860
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
11861
+ }
11862
+ let urlPath = `/api/v1/webhooks/endpoints`;
11863
+ return {
11864
+ path: urlPath,
11865
+ method: "GET",
11866
+ headers: headerParameters,
11867
+ query: queryParameters
11868
+ };
11869
+ }
11870
+ /**
11871
+ * The account\'s webhook endpoint, as a list (an account has at most one).
11872
+ * List Webhook Endpoints
11873
+ */
11874
+ async listWebhookEndpointsRaw(initOverrides) {
11875
+ const requestOptions = await this.listWebhookEndpointsRequestOpts();
11876
+ const response = await this.request(requestOptions, initOverrides);
11877
+ return new JSONApiResponse(response, (jsonValue) => WebhookEndpointListOutDTOFromJSON(jsonValue));
11878
+ }
11879
+ /**
11880
+ * The account\'s webhook endpoint, as a list (an account has at most one).
11881
+ * List Webhook Endpoints
11882
+ */
11883
+ async listWebhookEndpoints(initOverrides) {
11884
+ const response = await this.listWebhookEndpointsRaw(initOverrides);
11885
+ return await response.value();
11886
+ }
11887
+ /**
11888
+ * Creates request options for listWebhookEvents without sending the request
11889
+ */
11890
+ async listWebhookEventsRequestOpts(requestParameters) {
11891
+ const queryParameters = {};
11892
+ if (requestParameters["status"] != null) {
11893
+ queryParameters["status"] = requestParameters["status"];
11894
+ }
11895
+ if (requestParameters["skip"] != null) {
11896
+ queryParameters["skip"] = requestParameters["skip"];
11897
+ }
11898
+ if (requestParameters["limit"] != null) {
11899
+ queryParameters["limit"] = requestParameters["limit"];
11900
+ }
11901
+ if (requestParameters["createdBefore"] != null) {
11902
+ queryParameters["createdBefore"] = requestParameters["createdBefore"];
11903
+ }
11904
+ const headerParameters = {};
11905
+ if (this.configuration && this.configuration.accessToken) {
11906
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
11907
+ }
11908
+ let urlPath = `/api/v1/webhooks/events`;
11909
+ return {
11910
+ path: urlPath,
11911
+ method: "GET",
11912
+ headers: headerParameters,
11913
+ query: queryParameters
11914
+ };
11915
+ }
11916
+ /**
11917
+ * Events of the last 30 days, newest first, each with its delivery attempts. `count` is the size of this page; `hasMore` says whether another follows. `skip` stops at 100,000; `createdBefore` reaches every event.
11918
+ * List Webhook Events
11919
+ */
11920
+ async listWebhookEventsRaw(requestParameters, initOverrides) {
11921
+ const requestOptions = await this.listWebhookEventsRequestOpts(requestParameters);
11922
+ const response = await this.request(requestOptions, initOverrides);
11923
+ return new JSONApiResponse(response, (jsonValue) => WebhookEventListOutDTOFromJSON(jsonValue));
11924
+ }
11925
+ /**
11926
+ * Events of the last 30 days, newest first, each with its delivery attempts. `count` is the size of this page; `hasMore` says whether another follows. `skip` stops at 100,000; `createdBefore` reaches every event.
11927
+ * List Webhook Events
11928
+ */
11929
+ async listWebhookEvents(requestParameters = {}, initOverrides) {
11930
+ const response = await this.listWebhookEventsRaw(requestParameters, initOverrides);
11931
+ return await response.value();
11932
+ }
11933
+ /**
11934
+ * Creates request options for resendWebhookEvent without sending the request
11935
+ */
11936
+ async resendWebhookEventRequestOpts(requestParameters) {
11937
+ if (requestParameters["eventId"] == null) {
11938
+ throw new RequiredError(
11939
+ "eventId",
11940
+ 'Required parameter "eventId" was null or undefined when calling resendWebhookEvent().'
11941
+ );
11942
+ }
11943
+ const queryParameters = {};
11944
+ const headerParameters = {};
11945
+ if (this.configuration && this.configuration.accessToken) {
11946
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
11947
+ }
11948
+ let urlPath = `/api/v1/webhooks/events/{event_id}/resend`;
11949
+ urlPath = urlPath.replace("{event_id}", encodeURIComponent(String(requestParameters["eventId"])));
11950
+ return {
11951
+ path: urlPath,
11952
+ method: "POST",
11953
+ headers: headerParameters,
11954
+ query: queryParameters
11955
+ };
11956
+ }
11957
+ /**
11958
+ * Deliver a finished event once more and wait up to 20 seconds for the endpoint\'s answer. `pending: true` means the outcome is not known yet: read the event by `eventId` and look for the attempt whose id is `attemptId`.
11959
+ * Resend Webhook Event
11960
+ */
11961
+ async resendWebhookEventRaw(requestParameters, initOverrides) {
11962
+ const requestOptions = await this.resendWebhookEventRequestOpts(requestParameters);
11963
+ const response = await this.request(requestOptions, initOverrides);
11964
+ return new JSONApiResponse(response, (jsonValue) => WebhookDeliveryResultOutDTOFromJSON(jsonValue));
11965
+ }
11966
+ /**
11967
+ * Deliver a finished event once more and wait up to 20 seconds for the endpoint\'s answer. `pending: true` means the outcome is not known yet: read the event by `eventId` and look for the attempt whose id is `attemptId`.
11968
+ * Resend Webhook Event
11969
+ */
11970
+ async resendWebhookEvent(requestParameters, initOverrides) {
11971
+ const response = await this.resendWebhookEventRaw(requestParameters, initOverrides);
11972
+ return await response.value();
11973
+ }
11974
+ /**
11975
+ * Creates request options for rotateWebhookEndpointSecret without sending the request
11976
+ */
11977
+ async rotateWebhookEndpointSecretRequestOpts(requestParameters) {
11978
+ if (requestParameters["endpointId"] == null) {
11979
+ throw new RequiredError(
11980
+ "endpointId",
11981
+ 'Required parameter "endpointId" was null or undefined when calling rotateWebhookEndpointSecret().'
11982
+ );
11983
+ }
11984
+ const queryParameters = {};
11985
+ const headerParameters = {};
11986
+ if (this.configuration && this.configuration.accessToken) {
11987
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
11988
+ }
11989
+ let urlPath = `/api/v1/webhooks/endpoints/{endpoint_id}/rotate-secret`;
11990
+ urlPath = urlPath.replace("{endpoint_id}", encodeURIComponent(String(requestParameters["endpointId"])));
11991
+ return {
11992
+ path: urlPath,
11993
+ method: "POST",
11994
+ headers: headerParameters,
11995
+ query: queryParameters
11996
+ };
11997
+ }
11998
+ /**
11999
+ * Issue a new signing secret. For 24 hours each delivery is signed with both the old and the new one; a second rotation is refused until then.
12000
+ * Rotate Webhook Endpoint Secret
12001
+ */
12002
+ async rotateWebhookEndpointSecretRaw(requestParameters, initOverrides) {
12003
+ const requestOptions = await this.rotateWebhookEndpointSecretRequestOpts(requestParameters);
12004
+ const response = await this.request(requestOptions, initOverrides);
12005
+ return new JSONApiResponse(response, (jsonValue) => CreatedWebhookEndpointOutDTOFromJSON(jsonValue));
12006
+ }
12007
+ /**
12008
+ * Issue a new signing secret. For 24 hours each delivery is signed with both the old and the new one; a second rotation is refused until then.
12009
+ * Rotate Webhook Endpoint Secret
12010
+ */
12011
+ async rotateWebhookEndpointSecret(requestParameters, initOverrides) {
12012
+ const response = await this.rotateWebhookEndpointSecretRaw(requestParameters, initOverrides);
12013
+ return await response.value();
12014
+ }
12015
+ /**
12016
+ * Creates request options for sendWebhookTestEvent without sending the request
12017
+ */
12018
+ async sendWebhookTestEventRequestOpts(requestParameters) {
12019
+ if (requestParameters["endpointId"] == null) {
12020
+ throw new RequiredError(
12021
+ "endpointId",
12022
+ 'Required parameter "endpointId" was null or undefined when calling sendWebhookTestEvent().'
12023
+ );
12024
+ }
12025
+ const queryParameters = {};
12026
+ const headerParameters = {};
12027
+ if (this.configuration && this.configuration.accessToken) {
12028
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
12029
+ }
12030
+ let urlPath = `/api/v1/webhooks/endpoints/{endpoint_id}/test`;
12031
+ urlPath = urlPath.replace("{endpoint_id}", encodeURIComponent(String(requestParameters["endpointId"])));
12032
+ return {
12033
+ path: urlPath,
12034
+ method: "POST",
12035
+ headers: headerParameters,
12036
+ query: queryParameters
12037
+ };
12038
+ }
12039
+ /**
12040
+ * Send one `webhook.test` event and wait up to 20 seconds for the endpoint\'s answer. Not retried. `pending: true` means the outcome is not known yet: read the event by `eventId` and look for the attempt whose id is `attemptId`.
12041
+ * Send Webhook Test Event
12042
+ */
12043
+ async sendWebhookTestEventRaw(requestParameters, initOverrides) {
12044
+ const requestOptions = await this.sendWebhookTestEventRequestOpts(requestParameters);
12045
+ const response = await this.request(requestOptions, initOverrides);
12046
+ return new JSONApiResponse(response, (jsonValue) => WebhookDeliveryResultOutDTOFromJSON(jsonValue));
12047
+ }
12048
+ /**
12049
+ * Send one `webhook.test` event and wait up to 20 seconds for the endpoint\'s answer. Not retried. `pending: true` means the outcome is not known yet: read the event by `eventId` and look for the attempt whose id is `attemptId`.
12050
+ * Send Webhook Test Event
12051
+ */
12052
+ async sendWebhookTestEvent(requestParameters, initOverrides) {
12053
+ const response = await this.sendWebhookTestEventRaw(requestParameters, initOverrides);
12054
+ return await response.value();
12055
+ }
12056
+ /**
12057
+ * Creates request options for updateWebhookEndpoint without sending the request
12058
+ */
12059
+ async updateWebhookEndpointRequestOpts(requestParameters) {
12060
+ if (requestParameters["endpointId"] == null) {
12061
+ throw new RequiredError(
12062
+ "endpointId",
12063
+ 'Required parameter "endpointId" was null or undefined when calling updateWebhookEndpoint().'
12064
+ );
12065
+ }
12066
+ if (requestParameters["webhookEndpointUpdateInDTO"] == null) {
12067
+ throw new RequiredError(
12068
+ "webhookEndpointUpdateInDTO",
12069
+ 'Required parameter "webhookEndpointUpdateInDTO" was null or undefined when calling updateWebhookEndpoint().'
12070
+ );
12071
+ }
12072
+ const queryParameters = {};
12073
+ const headerParameters = {};
12074
+ headerParameters["Content-Type"] = "application/json";
12075
+ if (this.configuration && this.configuration.accessToken) {
12076
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
12077
+ }
12078
+ let urlPath = `/api/v1/webhooks/endpoints/{endpoint_id}`;
12079
+ urlPath = urlPath.replace("{endpoint_id}", encodeURIComponent(String(requestParameters["endpointId"])));
12080
+ return {
12081
+ path: urlPath,
12082
+ method: "PATCH",
12083
+ headers: headerParameters,
12084
+ query: queryParameters,
12085
+ body: WebhookEndpointUpdateInDTOToJSON(requestParameters["webhookEndpointUpdateInDTO"])
12086
+ };
12087
+ }
12088
+ /**
12089
+ * Change the URL or description, or enable or disable the endpoint.
12090
+ * Update Webhook Endpoint
12091
+ */
12092
+ async updateWebhookEndpointRaw(requestParameters, initOverrides) {
12093
+ const requestOptions = await this.updateWebhookEndpointRequestOpts(requestParameters);
12094
+ const response = await this.request(requestOptions, initOverrides);
12095
+ return new JSONApiResponse(response, (jsonValue) => WebhookEndpointOutDTOFromJSON(jsonValue));
12096
+ }
12097
+ /**
12098
+ * Change the URL or description, or enable or disable the endpoint.
12099
+ * Update Webhook Endpoint
12100
+ */
12101
+ async updateWebhookEndpoint(requestParameters, initOverrides) {
12102
+ const response = await this.updateWebhookEndpointRaw(requestParameters, initOverrides);
12103
+ return await response.value();
12104
+ }
12105
+ };
12106
+ var ListWebhookEventsStatusEnum = {
12107
+ Pending: "pending",
12108
+ Delivered: "delivered",
12109
+ Failed: "failed",
12110
+ Superseded: "superseded"
12111
+ };
12112
+
12113
+ // src/generated/models/CreditMeterFilter.ts
12114
+ var CreditMeterFilter = {
12115
+ ProcessingCredits: "processing_credits",
12116
+ FiletagCredits: "filetag_credits",
12117
+ All: "all"
12118
+ };
12119
+ function instanceOfCreditMeterFilter(value) {
12120
+ for (const key in CreditMeterFilter) {
12121
+ if (Object.prototype.hasOwnProperty.call(CreditMeterFilter, key)) {
12122
+ if (CreditMeterFilter[key] === value) {
12123
+ return true;
12124
+ }
12125
+ }
12126
+ }
12127
+ return false;
12128
+ }
12129
+ function CreditMeterFilterFromJSON(json) {
12130
+ return CreditMeterFilterFromJSONTyped(json, false);
12131
+ }
12132
+ function CreditMeterFilterFromJSONTyped(json, ignoreDiscriminator) {
12133
+ return json;
12134
+ }
12135
+ function CreditMeterFilterToJSON(value) {
12136
+ return value;
12137
+ }
12138
+ function CreditMeterFilterToJSONTyped(value, ignoreDiscriminator) {
12139
+ return value;
12140
+ }
12141
+
12142
+ // src/generated/models/FoundationDTO.ts
12143
+ function instanceOfFoundationDTO(value) {
12144
+ if (!("status" in value) || value["status"] === void 0) return false;
12145
+ return true;
12146
+ }
12147
+ function FoundationDTOFromJSON(json) {
12148
+ return FoundationDTOFromJSONTyped(json, false);
12149
+ }
12150
+ function FoundationDTOFromJSONTyped(json, ignoreDiscriminator) {
12151
+ if (json == null) {
12152
+ return json;
12153
+ }
12154
+ return {
12155
+ "createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
12156
+ "createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
12157
+ "data": json["data"] == null ? void 0 : json["data"],
12158
+ "errors": json["errors"] == null ? void 0 : json["errors"],
12159
+ "meta": json["meta"] == null ? void 0 : FoundationMetaDTOFromJSON(json["meta"]),
12160
+ "servedAt": json["servedAt"] == null ? void 0 : new Date(json["servedAt"]),
12161
+ "servedAtTimestamp": json["servedAtTimestamp"] == null ? void 0 : json["servedAtTimestamp"],
12162
+ "status": ResponseStatusFromJSON(json["status"])
12163
+ };
12164
+ }
12165
+ function FoundationDTOToJSON(json) {
12166
+ return FoundationDTOToJSONTyped(json, false);
12167
+ }
12168
+ function FoundationDTOToJSONTyped(value, ignoreDiscriminator = false) {
12169
+ if (value == null) {
12170
+ return value;
12171
+ }
12172
+ return {
12173
+ "createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
12174
+ "createdAtTimestamp": value["createdAtTimestamp"],
12175
+ "data": value["data"],
12176
+ "errors": value["errors"],
12177
+ "meta": FoundationMetaDTOToJSON(value["meta"]),
12178
+ "servedAt": value["servedAt"] == null ? value["servedAt"] : value["servedAt"].toISOString(),
12179
+ "servedAtTimestamp": value["servedAtTimestamp"],
12180
+ "status": ResponseStatusToJSON(value["status"])
12181
+ };
12182
+ }
12183
+
12184
+ // src/generated/models/ExtractionCompletedEventData.ts
12185
+ function instanceOfExtractionCompletedEventData(value) {
12186
+ if (!("correlationId" in value) || value["correlationId"] === void 0) return false;
12187
+ if (!("resultIncluded" in value) || value["resultIncluded"] === void 0) return false;
12188
+ if (!("resultPath" in value) || value["resultPath"] === void 0) return false;
12189
+ if (!("status" in value) || value["status"] === void 0) return false;
12190
+ return true;
12191
+ }
12192
+ function ExtractionCompletedEventDataFromJSON(json) {
12193
+ return ExtractionCompletedEventDataFromJSONTyped(json, false);
12194
+ }
12195
+ function ExtractionCompletedEventDataFromJSONTyped(json, ignoreDiscriminator) {
12196
+ if (json == null) {
12197
+ return json;
12198
+ }
12199
+ return {
12200
+ "channel": json["channel"] == null ? void 0 : json["channel"],
12201
+ "correlationId": json["correlationId"],
12202
+ "documentId": json["documentId"] == null ? void 0 : json["documentId"],
12203
+ "endUserId": json["endUserId"] == null ? void 0 : json["endUserId"],
12204
+ "error": json["error"] == null ? void 0 : FoundationDTOFromJSON(json["error"]),
12205
+ "externalId": json["externalId"] == null ? void 0 : json["externalId"],
12206
+ "result": json["result"] == null ? void 0 : DocumentProcessingResultOutDTOFromJSON(json["result"]),
12207
+ "resultIncluded": json["resultIncluded"],
12208
+ "resultPath": json["resultPath"],
12209
+ "status": json["status"]
12210
+ };
12211
+ }
12212
+ function ExtractionCompletedEventDataToJSON(json) {
12213
+ return ExtractionCompletedEventDataToJSONTyped(json, false);
12214
+ }
12215
+ function ExtractionCompletedEventDataToJSONTyped(value, ignoreDiscriminator = false) {
12216
+ if (value == null) {
12217
+ return value;
12218
+ }
12219
+ return {
12220
+ "channel": value["channel"],
12221
+ "correlationId": value["correlationId"],
12222
+ "documentId": value["documentId"],
12223
+ "endUserId": value["endUserId"],
12224
+ "error": FoundationDTOToJSON(value["error"]),
12225
+ "externalId": value["externalId"],
12226
+ "result": DocumentProcessingResultOutDTOToJSON(value["result"]),
12227
+ "resultIncluded": value["resultIncluded"],
12228
+ "resultPath": value["resultPath"],
12229
+ "status": value["status"]
12230
+ };
12231
+ }
12232
+
12233
+ // src/generated/models/ExtractionCompletedEvent.ts
12234
+ var ExtractionCompletedEventTypeEnum = {
12235
+ ExtractionCompleted: "extraction.completed"
12236
+ };
12237
+ function instanceOfExtractionCompletedEvent(value) {
12238
+ if (!("data" in value) || value["data"] === void 0) return false;
12239
+ if (!("timestamp" in value) || value["timestamp"] === void 0) return false;
12240
+ if (!("type" in value) || value["type"] === void 0) return false;
12241
+ if (value["type"] !== "extraction.completed") return false;
12242
+ return true;
12243
+ }
12244
+ function ExtractionCompletedEventFromJSON(json) {
12245
+ return ExtractionCompletedEventFromJSONTyped(json, false);
12246
+ }
12247
+ function ExtractionCompletedEventFromJSONTyped(json, ignoreDiscriminator) {
12248
+ if (json == null) {
12249
+ return json;
12250
+ }
12251
+ return {
12252
+ "data": ExtractionCompletedEventDataFromJSON(json["data"]),
12253
+ "timestamp": new Date(json["timestamp"]),
12254
+ "type": json["type"]
12255
+ };
12256
+ }
12257
+ function ExtractionCompletedEventToJSON(json) {
12258
+ return ExtractionCompletedEventToJSONTyped(json, false);
12259
+ }
12260
+ function ExtractionCompletedEventToJSONTyped(value, ignoreDiscriminator = false) {
12261
+ if (value == null) {
12262
+ return value;
12263
+ }
12264
+ return {
12265
+ "data": ExtractionCompletedEventDataToJSON(value["data"]),
12266
+ "timestamp": value["timestamp"].toISOString(),
12267
+ "type": value["type"]
12268
+ };
12269
+ }
12270
+
12271
+ // src/generated/models/LocationInner.ts
12272
+ function instanceOfLocationInner(value) {
12273
+ return true;
12274
+ }
12275
+ function LocationInnerFromJSON(json) {
12276
+ return LocationInnerFromJSONTyped(json, false);
12277
+ }
12278
+ function LocationInnerFromJSONTyped(json, ignoreDiscriminator) {
12279
+ return json;
12280
+ }
12281
+ function LocationInnerToJSON(json) {
12282
+ return LocationInnerToJSONTyped(json, false);
12283
+ }
12284
+ function LocationInnerToJSONTyped(value, ignoreDiscriminator = false) {
12285
+ return value;
12286
+ }
12287
+
12288
+ // src/generated/models/ValidationError.ts
12289
+ function instanceOfValidationError(value) {
12290
+ if (!("loc" in value) || value["loc"] === void 0) return false;
12291
+ if (!("msg" in value) || value["msg"] === void 0) return false;
12292
+ if (!("type" in value) || value["type"] === void 0) return false;
12293
+ return true;
12294
+ }
12295
+ function ValidationErrorFromJSON(json) {
12296
+ return ValidationErrorFromJSONTyped(json, false);
12297
+ }
12298
+ function ValidationErrorFromJSONTyped(json, ignoreDiscriminator) {
12299
+ if (json == null) {
12300
+ return json;
12301
+ }
12302
+ return {
12303
+ "loc": json["loc"].map(LocationInnerFromJSON),
12304
+ "msg": json["msg"],
12305
+ "type": json["type"]
11001
12306
  };
11002
12307
  }
11003
12308
  function ValidationErrorToJSON(json) {
@@ -11128,6 +12433,72 @@ function ValueAnyOfInnerToJSONTyped(value, ignoreDiscriminator = false) {
11128
12433
  return value;
11129
12434
  }
11130
12435
 
12436
+ // src/generated/models/WebhookTestEventData.ts
12437
+ function instanceOfWebhookTestEventData(value) {
12438
+ if (!("message" in value) || value["message"] === void 0) return false;
12439
+ return true;
12440
+ }
12441
+ function WebhookTestEventDataFromJSON(json) {
12442
+ return WebhookTestEventDataFromJSONTyped(json, false);
12443
+ }
12444
+ function WebhookTestEventDataFromJSONTyped(json, ignoreDiscriminator) {
12445
+ if (json == null) {
12446
+ return json;
12447
+ }
12448
+ return {
12449
+ "message": json["message"]
12450
+ };
12451
+ }
12452
+ function WebhookTestEventDataToJSON(json) {
12453
+ return WebhookTestEventDataToJSONTyped(json, false);
12454
+ }
12455
+ function WebhookTestEventDataToJSONTyped(value, ignoreDiscriminator = false) {
12456
+ if (value == null) {
12457
+ return value;
12458
+ }
12459
+ return {
12460
+ "message": value["message"]
12461
+ };
12462
+ }
12463
+
12464
+ // src/generated/models/WebhookTestEvent.ts
12465
+ var WebhookTestEventTypeEnum = {
12466
+ WebhookTest: "webhook.test"
12467
+ };
12468
+ function instanceOfWebhookTestEvent(value) {
12469
+ if (!("data" in value) || value["data"] === void 0) return false;
12470
+ if (!("timestamp" in value) || value["timestamp"] === void 0) return false;
12471
+ if (!("type" in value) || value["type"] === void 0) return false;
12472
+ if (value["type"] !== "webhook.test") return false;
12473
+ return true;
12474
+ }
12475
+ function WebhookTestEventFromJSON(json) {
12476
+ return WebhookTestEventFromJSONTyped(json, false);
12477
+ }
12478
+ function WebhookTestEventFromJSONTyped(json, ignoreDiscriminator) {
12479
+ if (json == null) {
12480
+ return json;
12481
+ }
12482
+ return {
12483
+ "data": WebhookTestEventDataFromJSON(json["data"]),
12484
+ "timestamp": new Date(json["timestamp"]),
12485
+ "type": json["type"]
12486
+ };
12487
+ }
12488
+ function WebhookTestEventToJSON(json) {
12489
+ return WebhookTestEventToJSONTyped(json, false);
12490
+ }
12491
+ function WebhookTestEventToJSONTyped(value, ignoreDiscriminator = false) {
12492
+ if (value == null) {
12493
+ return value;
12494
+ }
12495
+ return {
12496
+ "data": WebhookTestEventDataToJSON(value["data"]),
12497
+ "timestamp": value["timestamp"].toISOString(),
12498
+ "type": value["type"]
12499
+ };
12500
+ }
12501
+
11131
12502
  // src/errors.ts
11132
12503
  var GeminaError = class extends Error {
11133
12504
  constructor(message) {
@@ -11153,6 +12524,13 @@ var GeminaTimeoutError = class extends GeminaError {
11153
12524
  Object.setPrototypeOf(this, new.target.prototype);
11154
12525
  }
11155
12526
  };
12527
+ var GeminaWebhookVerificationError = class extends GeminaError {
12528
+ constructor(reason, message) {
12529
+ super(message);
12530
+ this.reason = reason;
12531
+ Object.setPrototypeOf(this, new.target.prototype);
12532
+ }
12533
+ };
11156
12534
 
11157
12535
  // src/helpers.ts
11158
12536
  var DEFAULT_BASE_URL = "https://api.gemina.co";
@@ -11289,6 +12667,10 @@ var GeminaClient = class _GeminaClient {
11289
12667
  * Build a client authenticated with a short-lived session token
11290
12668
  * (`OAuth2PasswordBearer` bearer scheme) instead of an API key. Use this
11291
12669
  * in browser/session contexts — never ship the API key to a browser.
12670
+ *
12671
+ * The factory sends whatever bearer token it is given. A retrieval token
12672
+ * from `sessions` does not reach the `webhooks` group, which needs the
12673
+ * account-login JWT (the token the console signs in with).
11292
12674
  */
11293
12675
  static withSessionToken(token, baseUrl = DEFAULT_BASE_URL, options = {}) {
11294
12676
  const headerValue = token.startsWith("Bearer ") ? token : `Bearer ${token}`;
@@ -11338,6 +12720,15 @@ var GeminaClient = class _GeminaClient {
11338
12720
  var _a;
11339
12721
  return (_a = this.apiCache).billing ?? (_a.billing = this.apiOverrides.billing ?? new BillingApi(this.configuration));
11340
12722
  }
12723
+ /**
12724
+ * Webhook endpoints and their delivery log. These routes need the
12725
+ * account-login token (build the client with {@link GeminaClient.withSessionToken});
12726
+ * an API key is refused.
12727
+ */
12728
+ get webhooks() {
12729
+ var _a;
12730
+ return (_a = this.apiCache).webhooks ?? (_a.webhooks = this.apiOverrides.webhooks ?? new WebhooksApi(this.configuration));
12731
+ }
11341
12732
  // --- Stateful chat convenience ---
11342
12733
  /**
11343
12734
  * Start a stateful chat {@link GeminaChatConversation} that threads the
@@ -11536,8 +12927,171 @@ async function asProcessingErrorIfFailedResult(error) {
11536
12927
  return new GeminaProcessingError(DocumentProcessingResultOutDTOFromJSON(json));
11537
12928
  }
11538
12929
 
12930
+ // src/webhooks.ts
12931
+ var SECRET_PREFIX = "whsec_";
12932
+ var DEFAULT_TOLERANCE_SECONDS = 300;
12933
+ var BASE64 = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
12934
+ var TIMESTAMP = /^[0-9]{1,12}$/;
12935
+ function isExtractionCompleted(event) {
12936
+ return event.type === "extraction.completed";
12937
+ }
12938
+ function isWebhookTest(event) {
12939
+ return event.type === "webhook.test";
12940
+ }
12941
+ var REQUIRED = {
12942
+ "extraction.completed": { correlationId: "string", status: "string", resultIncluded: "boolean", resultPath: "string" },
12943
+ "webhook.test": { message: "string" }
12944
+ };
12945
+ var fail = (reason, message) => new GeminaWebhookVerificationError(reason, message);
12946
+ function isObject(value) {
12947
+ return value !== null && typeof value === "object" && !Array.isArray(value);
12948
+ }
12949
+ var asciiLower = (text) => text.replace(/[A-Z]/g, (c) => String.fromCharCode(c.charCodeAt(0) + 32));
12950
+ function isComplete(type, data) {
12951
+ if (!isObject(data)) return false;
12952
+ if (Object.entries(REQUIRED[type]).some(([field, kind]) => typeof data[field] !== kind)) return false;
12953
+ if (type !== "extraction.completed") return true;
12954
+ const result = data.result ?? null;
12955
+ const error = data.error ?? null;
12956
+ if (result !== null && error !== null) return false;
12957
+ if (result !== null && !(isObject(result) && typeof result.status === "string" && isObject(result.meta) && "data" in result)) {
12958
+ return false;
12959
+ }
12960
+ return error === null || isObject(error) && typeof error.status === "string";
12961
+ }
12962
+ function header(headers, name) {
12963
+ const values = [];
12964
+ const add = (value) => {
12965
+ for (const part of value.split(", ")) if (!values.includes(part)) values.push(part);
12966
+ };
12967
+ const fromEntries = (entries) => {
12968
+ for (const [key, value] of entries) {
12969
+ if (asciiLower(String(key)) !== name || value === void 0 || value === null) continue;
12970
+ for (const item of Array.isArray(value) ? value : [value]) add(String(item));
12971
+ }
12972
+ };
12973
+ if (headers === null || headers === void 0) {
12974
+ } else if (headers instanceof Map) {
12975
+ fromEntries(headers.entries());
12976
+ } else if (typeof headers.get === "function") {
12977
+ const value = headers.get(name);
12978
+ if (value != null) add(String(value));
12979
+ } else {
12980
+ fromEntries(Object.entries(headers));
12981
+ }
12982
+ if (values.length === 0) throw fail("missing_header", `The ${name} header is missing.`);
12983
+ if (values.length > 1) throw fail("ambiguous_header", `The ${name} header was sent more than once with different values.`);
12984
+ return values[0];
12985
+ }
12986
+ function decodeBase64(text) {
12987
+ if (!BASE64.test(text)) return void 0;
12988
+ const binary = atob(text);
12989
+ const bytes = new Uint8Array(binary.length);
12990
+ for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
12991
+ return bytes;
12992
+ }
12993
+ function constantTimeEqual(a, b) {
12994
+ if (a.length !== b.length) return false;
12995
+ let difference = 0;
12996
+ for (let i = 0; i < a.length; i++) difference |= a[i] ^ b[i];
12997
+ return difference === 0;
12998
+ }
12999
+ function copyBody(body) {
13000
+ if (typeof body === "string") return new TextEncoder().encode(body);
13001
+ if (body == null) return new Uint8Array(0);
13002
+ const source = ArrayBuffer.isView(body) ? new Uint8Array(body.buffer, body.byteOffset, body.byteLength) : new Uint8Array(body);
13003
+ const copy = new Uint8Array(source.length);
13004
+ copy.set(source);
13005
+ return copy;
13006
+ }
13007
+ async function subtleCrypto() {
13008
+ const global = globalThis.crypto;
13009
+ if (global?.subtle) return global.subtle;
13010
+ const nodeCrypto = "node:crypto";
13011
+ const module2 = await import(
13012
+ /* @vite-ignore */
13013
+ /* webpackIgnore: true */
13014
+ nodeCrypto
13015
+ );
13016
+ return module2.webcrypto.subtle;
13017
+ }
13018
+ async function unwrapWebhook(body, headers, secret, options = {}) {
13019
+ let rawBody;
13020
+ try {
13021
+ rawBody = copyBody(body);
13022
+ } catch (error) {
13023
+ if (!(error instanceof TypeError)) throw error;
13024
+ throw fail("invalid_body", "The webhook body cannot be read: its buffer was detached.");
13025
+ }
13026
+ options = options ?? {};
13027
+ const id = header(headers, "webhook-id");
13028
+ const timestampText = header(headers, "webhook-timestamp");
13029
+ const signatureHeader = header(headers, "webhook-signature");
13030
+ if (!TIMESTAMP.test(timestampText)) {
13031
+ throw fail("invalid_timestamp", "The webhook-timestamp header is not a whole number of seconds.");
13032
+ }
13033
+ const tolerance = options.toleranceSeconds ?? DEFAULT_TOLERANCE_SECONDS;
13034
+ const clock = (options.now ?? (() => Date.now() / 1e3))();
13035
+ if (!Number.isFinite(clock) || !Number.isFinite(tolerance) || tolerance < 0) {
13036
+ throw fail(
13037
+ "timestamp_out_of_tolerance",
13038
+ "The clock or the tolerance is not a finite number, so the timestamp cannot be checked."
13039
+ );
13040
+ }
13041
+ if (Math.abs(Math.floor(clock) - Number(timestampText)) > tolerance) {
13042
+ throw fail(
13043
+ "timestamp_out_of_tolerance",
13044
+ `The webhook timestamp is more than ${tolerance} seconds from the current time.`
13045
+ );
13046
+ }
13047
+ const key = typeof secret === "string" ? decodeBase64(secret.startsWith(SECRET_PREFIX) ? secret.slice(SECRET_PREFIX.length) : secret) : void 0;
13048
+ if (key === void 0 || key.length === 0) {
13049
+ throw fail("invalid_secret", "The signing secret is not valid: expected whsec_ followed by base64.");
13050
+ }
13051
+ const prefix = new TextEncoder().encode(`${id}.${timestampText}.`);
13052
+ const signed = new Uint8Array(prefix.length + rawBody.length);
13053
+ signed.set(prefix, 0);
13054
+ signed.set(rawBody, prefix.length);
13055
+ const subtle = await subtleCrypto();
13056
+ const verifiedBody = signed.subarray(prefix.length);
13057
+ const cryptoKey = await subtle.importKey("raw", key, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
13058
+ const expected = new Uint8Array(await subtle.sign("HMAC", cryptoKey, signed));
13059
+ let matched = false;
13060
+ for (const entry of signatureHeader.split(" ")) {
13061
+ const comma = entry.indexOf(",");
13062
+ if (comma < 0 || entry.slice(0, comma) !== "v1") continue;
13063
+ const candidate = decodeBase64(entry.slice(comma + 1));
13064
+ if (candidate !== void 0 && constantTimeEqual(candidate, expected)) matched = true;
13065
+ }
13066
+ if (!matched) throw fail("no_matching_signature", "No signature in the webhook-signature header matches.");
13067
+ if (verifiedBody.length >= 3 && verifiedBody[0] === 239 && verifiedBody[1] === 187 && verifiedBody[2] === 191) {
13068
+ throw fail("invalid_body", "The webhook body starts with a byte order mark.");
13069
+ }
13070
+ let parsed;
13071
+ try {
13072
+ parsed = JSON.parse(new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(verifiedBody));
13073
+ } catch {
13074
+ throw fail("invalid_body", "The webhook body is not valid JSON.");
13075
+ }
13076
+ if (!isObject(parsed)) throw fail("invalid_body", "The webhook body is not a JSON object.");
13077
+ const type = typeof parsed.type === "string" ? parsed.type : null;
13078
+ const timestamp = typeof parsed.timestamp === "string" ? parsed.timestamp : null;
13079
+ let data = parsed.data;
13080
+ if (type !== null && Object.prototype.hasOwnProperty.call(REQUIRED, type)) {
13081
+ if (!isComplete(type, data)) {
13082
+ throw fail("invalid_body", `The data of this ${type} event is missing a required field.`);
13083
+ }
13084
+ try {
13085
+ data = type === "extraction.completed" ? ExtractionCompletedEventDataFromJSON(data) : WebhookTestEventDataFromJSON(data);
13086
+ } catch {
13087
+ throw fail("invalid_body", `The data of this ${type} event could not be read.`);
13088
+ }
13089
+ }
13090
+ return { id, type, timestamp, data, raw: parsed };
13091
+ }
13092
+
11539
13093
  // src/version.ts
11540
- var VERSION = "0.15.0";
13094
+ var VERSION = "0.17.0";
11541
13095
  // Annotate the CommonJS export names for ESM import in node:
11542
13096
  0 && (module.exports = {
11543
13097
  AddExtractionsInDTOFromJSON,
@@ -11624,6 +13178,11 @@ var VERSION = "0.15.0";
11624
13178
  CreateTemplateInDTOFromJSONTyped,
11625
13179
  CreateTemplateInDTOToJSON,
11626
13180
  CreateTemplateInDTOToJSONTyped,
13181
+ CreatedWebhookEndpointOutDTODisabledReasonEnum,
13182
+ CreatedWebhookEndpointOutDTOFromJSON,
13183
+ CreatedWebhookEndpointOutDTOFromJSONTyped,
13184
+ CreatedWebhookEndpointOutDTOToJSON,
13185
+ CreatedWebhookEndpointOutDTOToJSONTyped,
11627
13186
  CreditMeter,
11628
13187
  CreditMeterFilter,
11629
13188
  CreditMeterFilterFromJSON,
@@ -11722,6 +13281,15 @@ var VERSION = "0.15.0";
11722
13281
  EnterpriseTransactionOutDTOFromJSONTyped,
11723
13282
  EnterpriseTransactionOutDTOToJSON,
11724
13283
  EnterpriseTransactionOutDTOToJSONTyped,
13284
+ ExtractionCompletedEventDataFromJSON,
13285
+ ExtractionCompletedEventDataFromJSONTyped,
13286
+ ExtractionCompletedEventDataToJSON,
13287
+ ExtractionCompletedEventDataToJSONTyped,
13288
+ ExtractionCompletedEventFromJSON,
13289
+ ExtractionCompletedEventFromJSONTyped,
13290
+ ExtractionCompletedEventToJSON,
13291
+ ExtractionCompletedEventToJSONTyped,
13292
+ ExtractionCompletedEventTypeEnum,
11725
13293
  ExtractionCostOutDTOFromJSON,
11726
13294
  ExtractionCostOutDTOFromJSONTyped,
11727
13295
  ExtractionCostOutDTOToJSON,
@@ -11865,6 +13433,7 @@ var VERSION = "0.15.0";
11865
13433
  GeminaError,
11866
13434
  GeminaProcessingError,
11867
13435
  GeminaTimeoutError,
13436
+ GeminaWebhookVerificationError,
11868
13437
  GenerateTemplateFromUrlInDTOFromJSON,
11869
13438
  GenerateTemplateFromUrlInDTOFromJSONTyped,
11870
13439
  GenerateTemplateFromUrlInDTOToJSON,
@@ -11897,6 +13466,7 @@ var VERSION = "0.15.0";
11897
13466
  InvoiceTypeToJSONTyped,
11898
13467
  JSONApiResponse,
11899
13468
  LegalApi,
13469
+ ListWebhookEventsStatusEnum,
11900
13470
  LocationInnerFromJSON,
11901
13471
  LocationInnerFromJSONTyped,
11902
13472
  LocationInnerToJSON,
@@ -11925,6 +13495,11 @@ var VERSION = "0.15.0";
11925
13495
  OperationTypeFromJSONTyped,
11926
13496
  OperationTypeToJSON,
11927
13497
  OperationTypeToJSONTyped,
13498
+ PaymentMethodUpdateOutDTOFromJSON,
13499
+ PaymentMethodUpdateOutDTOFromJSONTyped,
13500
+ PaymentMethodUpdateOutDTOPurposeEnum,
13501
+ PaymentMethodUpdateOutDTOToJSON,
13502
+ PaymentMethodUpdateOutDTOToJSONTyped,
11928
13503
  PeriodPresetModel,
11929
13504
  PeriodPresetModelFromJSON,
11930
13505
  PeriodPresetModelFromJSONTyped,
@@ -11961,6 +13536,7 @@ var VERSION = "0.15.0";
11961
13536
  PurgedDocumentsDataOutDTOToJSONTyped,
11962
13537
  QueryMetaDTOFromJSON,
11963
13538
  QueryMetaDTOFromJSONTyped,
13539
+ QueryMetaDTOIndexingStateEnum,
11964
13540
  QueryMetaDTOToJSON,
11965
13541
  QueryMetaDTOToJSONTyped,
11966
13542
  QueryResultItemDTOFromJSON,
@@ -12206,10 +13782,56 @@ var VERSION = "0.15.0";
12206
13782
  WebDocumentUploadInDTOFromJSONTyped,
12207
13783
  WebDocumentUploadInDTOToJSON,
12208
13784
  WebDocumentUploadInDTOToJSONTyped,
13785
+ WebhookAttemptOutDTOFromJSON,
13786
+ WebhookAttemptOutDTOFromJSONTyped,
13787
+ WebhookAttemptOutDTOToJSON,
13788
+ WebhookAttemptOutDTOToJSONTyped,
13789
+ WebhookDeliveryResultOutDTOFromJSON,
13790
+ WebhookDeliveryResultOutDTOFromJSONTyped,
13791
+ WebhookDeliveryResultOutDTOToJSON,
13792
+ WebhookDeliveryResultOutDTOToJSONTyped,
13793
+ WebhookEndpointCreateInDTOFromJSON,
13794
+ WebhookEndpointCreateInDTOFromJSONTyped,
13795
+ WebhookEndpointCreateInDTOToJSON,
13796
+ WebhookEndpointCreateInDTOToJSONTyped,
13797
+ WebhookEndpointListOutDTOFromJSON,
13798
+ WebhookEndpointListOutDTOFromJSONTyped,
13799
+ WebhookEndpointListOutDTOToJSON,
13800
+ WebhookEndpointListOutDTOToJSONTyped,
13801
+ WebhookEndpointOutDTODisabledReasonEnum,
13802
+ WebhookEndpointOutDTOFromJSON,
13803
+ WebhookEndpointOutDTOFromJSONTyped,
13804
+ WebhookEndpointOutDTOToJSON,
13805
+ WebhookEndpointOutDTOToJSONTyped,
13806
+ WebhookEndpointUpdateInDTOFromJSON,
13807
+ WebhookEndpointUpdateInDTOFromJSONTyped,
13808
+ WebhookEndpointUpdateInDTOToJSON,
13809
+ WebhookEndpointUpdateInDTOToJSONTyped,
13810
+ WebhookEventListOutDTOFromJSON,
13811
+ WebhookEventListOutDTOFromJSONTyped,
13812
+ WebhookEventListOutDTOToJSON,
13813
+ WebhookEventListOutDTOToJSONTyped,
13814
+ WebhookEventOutDTOFailureReasonEnum,
13815
+ WebhookEventOutDTOFromJSON,
13816
+ WebhookEventOutDTOFromJSONTyped,
13817
+ WebhookEventOutDTOStatusEnum,
13818
+ WebhookEventOutDTOToJSON,
13819
+ WebhookEventOutDTOToJSONTyped,
13820
+ WebhookEventOutDTOTypeEnum,
12209
13821
  WebhookResponseDTOFromJSON,
12210
13822
  WebhookResponseDTOFromJSONTyped,
12211
13823
  WebhookResponseDTOToJSON,
12212
13824
  WebhookResponseDTOToJSONTyped,
13825
+ WebhookTestEventDataFromJSON,
13826
+ WebhookTestEventDataFromJSONTyped,
13827
+ WebhookTestEventDataToJSON,
13828
+ WebhookTestEventDataToJSONTyped,
13829
+ WebhookTestEventFromJSON,
13830
+ WebhookTestEventFromJSONTyped,
13831
+ WebhookTestEventToJSON,
13832
+ WebhookTestEventToJSONTyped,
13833
+ WebhookTestEventTypeEnum,
13834
+ WebhooksApi,
12213
13835
  canConsumeForm,
12214
13836
  exists,
12215
13837
  instanceOfAddExtractionsInDTO,
@@ -12230,6 +13852,7 @@ var VERSION = "0.15.0";
12230
13852
  instanceOfContractStatus,
12231
13853
  instanceOfCountBreakdownModel,
12232
13854
  instanceOfCreateTemplateInDTO,
13855
+ instanceOfCreatedWebhookEndpointOutDTO,
12233
13856
  instanceOfCreditMeter,
12234
13857
  instanceOfCreditMeterFilter,
12235
13858
  instanceOfCreditTransactionListOutDTO,
@@ -12252,6 +13875,8 @@ var VERSION = "0.15.0";
12252
13875
  instanceOfDocumentsViewOutDTO,
12253
13876
  instanceOfEnterpriseTransactionListOutDTO,
12254
13877
  instanceOfEnterpriseTransactionOutDTO,
13878
+ instanceOfExtractionCompletedEvent,
13879
+ instanceOfExtractionCompletedEventData,
12255
13880
  instanceOfExtractionCostOutDTO,
12256
13881
  instanceOfExtractionCostOutResultDTO,
12257
13882
  instanceOfExtractionCostStateModel,
@@ -12297,6 +13922,7 @@ var VERSION = "0.15.0";
12297
13922
  instanceOfNextActionOutDTO,
12298
13923
  instanceOfNumberOfStoredDocumentsOutDTO,
12299
13924
  instanceOfOperationType,
13925
+ instanceOfPaymentMethodUpdateOutDTO,
12300
13926
  instanceOfPeriodPresetModel,
12301
13927
  instanceOfPlanCreditCostOutDTO,
12302
13928
  instanceOfPlanDetailOutDTO,
@@ -12360,8 +13986,21 @@ var VERSION = "0.15.0";
12360
13986
  instanceOfViewMetaOutDTO,
12361
13987
  instanceOfVolumeDiscountTierOutDTO,
12362
13988
  instanceOfWebDocumentUploadInDTO,
13989
+ instanceOfWebhookAttemptOutDTO,
13990
+ instanceOfWebhookDeliveryResultOutDTO,
13991
+ instanceOfWebhookEndpointCreateInDTO,
13992
+ instanceOfWebhookEndpointListOutDTO,
13993
+ instanceOfWebhookEndpointOutDTO,
13994
+ instanceOfWebhookEndpointUpdateInDTO,
13995
+ instanceOfWebhookEventListOutDTO,
13996
+ instanceOfWebhookEventOutDTO,
12363
13997
  instanceOfWebhookResponseDTO,
13998
+ instanceOfWebhookTestEvent,
13999
+ instanceOfWebhookTestEventData,
14000
+ isExtractionCompleted,
14001
+ isWebhookTest,
12364
14002
  mapValues,
12365
- querystring
14003
+ querystring,
14004
+ unwrapWebhook
12366
14005
  });
12367
14006
  //# sourceMappingURL=index.cjs.map