@gemina/sdk 0.15.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +264 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +375 -168
- package/dist/index.d.ts +375 -168
- package/dist/index.js +257 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -405,6 +405,11 @@ __export(index_exports, {
|
|
|
405
405
|
OperationTypeFromJSONTyped: () => OperationTypeFromJSONTyped,
|
|
406
406
|
OperationTypeToJSON: () => OperationTypeToJSON,
|
|
407
407
|
OperationTypeToJSONTyped: () => OperationTypeToJSONTyped,
|
|
408
|
+
PaymentMethodUpdateOutDTOFromJSON: () => PaymentMethodUpdateOutDTOFromJSON,
|
|
409
|
+
PaymentMethodUpdateOutDTOFromJSONTyped: () => PaymentMethodUpdateOutDTOFromJSONTyped,
|
|
410
|
+
PaymentMethodUpdateOutDTOPurposeEnum: () => PaymentMethodUpdateOutDTOPurposeEnum,
|
|
411
|
+
PaymentMethodUpdateOutDTOToJSON: () => PaymentMethodUpdateOutDTOToJSON,
|
|
412
|
+
PaymentMethodUpdateOutDTOToJSONTyped: () => PaymentMethodUpdateOutDTOToJSONTyped,
|
|
408
413
|
PeriodPresetModel: () => PeriodPresetModel,
|
|
409
414
|
PeriodPresetModelFromJSON: () => PeriodPresetModelFromJSON,
|
|
410
415
|
PeriodPresetModelFromJSONTyped: () => PeriodPresetModelFromJSONTyped,
|
|
@@ -441,6 +446,7 @@ __export(index_exports, {
|
|
|
441
446
|
PurgedDocumentsDataOutDTOToJSONTyped: () => PurgedDocumentsDataOutDTOToJSONTyped,
|
|
442
447
|
QueryMetaDTOFromJSON: () => QueryMetaDTOFromJSON,
|
|
443
448
|
QueryMetaDTOFromJSONTyped: () => QueryMetaDTOFromJSONTyped,
|
|
449
|
+
QueryMetaDTOIndexingStateEnum: () => QueryMetaDTOIndexingStateEnum,
|
|
444
450
|
QueryMetaDTOToJSON: () => QueryMetaDTOToJSON,
|
|
445
451
|
QueryMetaDTOToJSONTyped: () => QueryMetaDTOToJSONTyped,
|
|
446
452
|
QueryResultItemDTOFromJSON: () => QueryResultItemDTOFromJSON,
|
|
@@ -777,6 +783,7 @@ __export(index_exports, {
|
|
|
777
783
|
instanceOfNextActionOutDTO: () => instanceOfNextActionOutDTO,
|
|
778
784
|
instanceOfNumberOfStoredDocumentsOutDTO: () => instanceOfNumberOfStoredDocumentsOutDTO,
|
|
779
785
|
instanceOfOperationType: () => instanceOfOperationType,
|
|
786
|
+
instanceOfPaymentMethodUpdateOutDTO: () => instanceOfPaymentMethodUpdateOutDTO,
|
|
780
787
|
instanceOfPeriodPresetModel: () => instanceOfPeriodPresetModel,
|
|
781
788
|
instanceOfPlanCreditCostOutDTO: () => instanceOfPlanCreditCostOutDTO,
|
|
782
789
|
instanceOfPlanDetailOutDTO: () => instanceOfPlanDetailOutDTO,
|
|
@@ -5577,6 +5584,63 @@ var DocumentApi = class extends BaseAPI {
|
|
|
5577
5584
|
const response = await this.purgeDocumentsWithExternalIdByUserRaw(requestParameters, initOverrides);
|
|
5578
5585
|
return await response.value();
|
|
5579
5586
|
}
|
|
5587
|
+
/**
|
|
5588
|
+
* Creates request options for resumeTutorialRequest without sending the request
|
|
5589
|
+
*/
|
|
5590
|
+
async resumeTutorialRequestRequestOpts(requestParameters) {
|
|
5591
|
+
if (requestParameters["attemptId"] == null) {
|
|
5592
|
+
throw new RequiredError(
|
|
5593
|
+
"attemptId",
|
|
5594
|
+
'Required parameter "attemptId" was null or undefined when calling resumeTutorialRequest().'
|
|
5595
|
+
);
|
|
5596
|
+
}
|
|
5597
|
+
const queryParameters = {};
|
|
5598
|
+
const headerParameters = {};
|
|
5599
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
5600
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
5601
|
+
}
|
|
5602
|
+
const consumes = [
|
|
5603
|
+
{ contentType: "multipart/form-data" }
|
|
5604
|
+
];
|
|
5605
|
+
const canConsumeForm2 = canConsumeForm(consumes);
|
|
5606
|
+
let formParams;
|
|
5607
|
+
let useForm = false;
|
|
5608
|
+
useForm = canConsumeForm2;
|
|
5609
|
+
if (useForm) {
|
|
5610
|
+
formParams = new FormData();
|
|
5611
|
+
} else {
|
|
5612
|
+
formParams = new URLSearchParams();
|
|
5613
|
+
}
|
|
5614
|
+
if (requestParameters["file"] != null) {
|
|
5615
|
+
formParams.append("file", requestParameters["file"]);
|
|
5616
|
+
}
|
|
5617
|
+
let urlPath = `/api/v1/documents/tutorials/{attempt_id}/resume`;
|
|
5618
|
+
urlPath = urlPath.replace("{attempt_id}", encodeURIComponent(String(requestParameters["attemptId"])));
|
|
5619
|
+
return {
|
|
5620
|
+
path: urlPath,
|
|
5621
|
+
method: "POST",
|
|
5622
|
+
headers: headerParameters,
|
|
5623
|
+
query: queryParameters,
|
|
5624
|
+
body: formParams
|
|
5625
|
+
};
|
|
5626
|
+
}
|
|
5627
|
+
/**
|
|
5628
|
+
* Explicitly recover an interrupted guided API request, using its original key and file.
|
|
5629
|
+
* Resume Tutorial Request
|
|
5630
|
+
*/
|
|
5631
|
+
async resumeTutorialRequestRaw(requestParameters, initOverrides) {
|
|
5632
|
+
const requestOptions = await this.resumeTutorialRequestRequestOpts(requestParameters);
|
|
5633
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
5634
|
+
return new JSONApiResponse(response, (jsonValue) => DocumentProcessingResultOutDTOFromJSON(jsonValue));
|
|
5635
|
+
}
|
|
5636
|
+
/**
|
|
5637
|
+
* Explicitly recover an interrupted guided API request, using its original key and file.
|
|
5638
|
+
* Resume Tutorial Request
|
|
5639
|
+
*/
|
|
5640
|
+
async resumeTutorialRequest(requestParameters, initOverrides) {
|
|
5641
|
+
const response = await this.resumeTutorialRequestRaw(requestParameters, initOverrides);
|
|
5642
|
+
return await response.value();
|
|
5643
|
+
}
|
|
5580
5644
|
/**
|
|
5581
5645
|
* Creates request options for uploadDocument without sending the request
|
|
5582
5646
|
*/
|
|
@@ -6984,6 +7048,87 @@ var FileTagApi = class extends BaseAPI {
|
|
|
6984
7048
|
const response = await this.getMyFiletagCreditHistoryRaw(requestParameters, initOverrides);
|
|
6985
7049
|
return await response.value();
|
|
6986
7050
|
}
|
|
7051
|
+
/**
|
|
7052
|
+
* Creates request options for savedFiletagResult without sending the request
|
|
7053
|
+
*/
|
|
7054
|
+
async savedFiletagResultRequestOpts(requestParameters) {
|
|
7055
|
+
if (requestParameters["documentId"] == null) {
|
|
7056
|
+
throw new RequiredError(
|
|
7057
|
+
"documentId",
|
|
7058
|
+
'Required parameter "documentId" was null or undefined when calling savedFiletagResult().'
|
|
7059
|
+
);
|
|
7060
|
+
}
|
|
7061
|
+
const queryParameters = {};
|
|
7062
|
+
const headerParameters = {};
|
|
7063
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
7064
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
7065
|
+
}
|
|
7066
|
+
let urlPath = `/api/v1/filetag/results/{document_id}`;
|
|
7067
|
+
urlPath = urlPath.replace("{document_id}", encodeURIComponent(String(requestParameters["documentId"])));
|
|
7068
|
+
return {
|
|
7069
|
+
path: urlPath,
|
|
7070
|
+
method: "GET",
|
|
7071
|
+
headers: headerParameters,
|
|
7072
|
+
query: queryParameters
|
|
7073
|
+
};
|
|
7074
|
+
}
|
|
7075
|
+
/**
|
|
7076
|
+
* Saved Filetag Result
|
|
7077
|
+
*/
|
|
7078
|
+
async savedFiletagResultRaw(requestParameters, initOverrides) {
|
|
7079
|
+
const requestOptions = await this.savedFiletagResultRequestOpts(requestParameters);
|
|
7080
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
7081
|
+
return new JSONApiResponse(response, (jsonValue) => FileTagResultOutDTOFromJSON(jsonValue));
|
|
7082
|
+
}
|
|
7083
|
+
/**
|
|
7084
|
+
* Saved Filetag Result
|
|
7085
|
+
*/
|
|
7086
|
+
async savedFiletagResult(requestParameters, initOverrides) {
|
|
7087
|
+
const response = await this.savedFiletagResultRaw(requestParameters, initOverrides);
|
|
7088
|
+
return await response.value();
|
|
7089
|
+
}
|
|
7090
|
+
/**
|
|
7091
|
+
* Creates request options for savedFiletagResultUser without sending the request
|
|
7092
|
+
*/
|
|
7093
|
+
async savedFiletagResultUserRequestOpts(requestParameters) {
|
|
7094
|
+
if (requestParameters["documentId"] == null) {
|
|
7095
|
+
throw new RequiredError(
|
|
7096
|
+
"documentId",
|
|
7097
|
+
'Required parameter "documentId" was null or undefined when calling savedFiletagResultUser().'
|
|
7098
|
+
);
|
|
7099
|
+
}
|
|
7100
|
+
const queryParameters = {};
|
|
7101
|
+
const headerParameters = {};
|
|
7102
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
7103
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
7104
|
+
}
|
|
7105
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
7106
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
|
|
7107
|
+
}
|
|
7108
|
+
let urlPath = `/api/v1/filetag/results/user/{document_id}`;
|
|
7109
|
+
urlPath = urlPath.replace("{document_id}", encodeURIComponent(String(requestParameters["documentId"])));
|
|
7110
|
+
return {
|
|
7111
|
+
path: urlPath,
|
|
7112
|
+
method: "GET",
|
|
7113
|
+
headers: headerParameters,
|
|
7114
|
+
query: queryParameters
|
|
7115
|
+
};
|
|
7116
|
+
}
|
|
7117
|
+
/**
|
|
7118
|
+
* Saved Filetag Result User
|
|
7119
|
+
*/
|
|
7120
|
+
async savedFiletagResultUserRaw(requestParameters, initOverrides) {
|
|
7121
|
+
const requestOptions = await this.savedFiletagResultUserRequestOpts(requestParameters);
|
|
7122
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
7123
|
+
return new JSONApiResponse(response, (jsonValue) => FileTagResultOutDTOFromJSON(jsonValue));
|
|
7124
|
+
}
|
|
7125
|
+
/**
|
|
7126
|
+
* Saved Filetag Result User
|
|
7127
|
+
*/
|
|
7128
|
+
async savedFiletagResultUser(requestParameters, initOverrides) {
|
|
7129
|
+
const response = await this.savedFiletagResultUserRaw(requestParameters, initOverrides);
|
|
7130
|
+
return await response.value();
|
|
7131
|
+
}
|
|
6987
7132
|
/**
|
|
6988
7133
|
* Creates request options for tagDocument without sending the request
|
|
6989
7134
|
*/
|
|
@@ -6995,6 +7140,9 @@ var FileTagApi = class extends BaseAPI {
|
|
|
6995
7140
|
);
|
|
6996
7141
|
}
|
|
6997
7142
|
const queryParameters = {};
|
|
7143
|
+
if (requestParameters["externalId"] != null) {
|
|
7144
|
+
queryParameters["external_id"] = requestParameters["externalId"];
|
|
7145
|
+
}
|
|
6998
7146
|
const headerParameters = {};
|
|
6999
7147
|
if (this.configuration && this.configuration.apiKey) {
|
|
7000
7148
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
@@ -7051,6 +7199,9 @@ var FileTagApi = class extends BaseAPI {
|
|
|
7051
7199
|
);
|
|
7052
7200
|
}
|
|
7053
7201
|
const queryParameters = {};
|
|
7202
|
+
if (requestParameters["externalId"] != null) {
|
|
7203
|
+
queryParameters["external_id"] = requestParameters["externalId"];
|
|
7204
|
+
}
|
|
7054
7205
|
const headerParameters = {};
|
|
7055
7206
|
if (this.configuration && this.configuration.apiKey) {
|
|
7056
7207
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
@@ -7231,6 +7382,7 @@ function FilesUploadInstructionsOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7231
7382
|
}
|
|
7232
7383
|
return {
|
|
7233
7384
|
"fileId": json["fileId"],
|
|
7385
|
+
"handoffExpiresAt": json["handoffExpiresAt"] == null ? void 0 : new Date(json["handoffExpiresAt"]),
|
|
7234
7386
|
"nextToolCall": FilesNextToolCallOutDTOFromJSON(json["nextToolCall"]),
|
|
7235
7387
|
"upload": FilesUploadDetailsOutDTOFromJSON(json["upload"])
|
|
7236
7388
|
};
|
|
@@ -7244,6 +7396,7 @@ function FilesUploadInstructionsOutDTOToJSONTyped(value, ignoreDiscriminator = f
|
|
|
7244
7396
|
}
|
|
7245
7397
|
return {
|
|
7246
7398
|
"fileId": value["fileId"],
|
|
7399
|
+
"handoffExpiresAt": value["handoffExpiresAt"] == null ? value["handoffExpiresAt"] : value["handoffExpiresAt"].toISOString(),
|
|
7247
7400
|
"nextToolCall": FilesNextToolCallOutDTOToJSON(value["nextToolCall"]),
|
|
7248
7401
|
"upload": FilesUploadDetailsOutDTOToJSON(value["upload"])
|
|
7249
7402
|
};
|
|
@@ -7645,10 +7798,14 @@ function RetrievalFiltersDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7645
7798
|
}
|
|
7646
7799
|
return {
|
|
7647
7800
|
"buyerName": json["buyerName"] == null ? void 0 : json["buyerName"],
|
|
7801
|
+
"currencies": json["currencies"] == null ? void 0 : json["currencies"],
|
|
7648
7802
|
"currency": json["currency"] == null ? void 0 : json["currency"],
|
|
7649
7803
|
"docNumber": json["docNumber"] == null ? void 0 : json["docNumber"],
|
|
7804
|
+
"docNumbers": json["docNumbers"] == null ? void 0 : json["docNumbers"],
|
|
7650
7805
|
"documentId": json["documentId"] == null ? void 0 : json["documentId"],
|
|
7806
|
+
"documentIds": json["documentIds"] == null ? void 0 : json["documentIds"],
|
|
7651
7807
|
"documentType": json["documentType"] == null ? void 0 : json["documentType"],
|
|
7808
|
+
"documentTypes": json["documentTypes"] == null ? void 0 : json["documentTypes"],
|
|
7652
7809
|
"dueDateFrom": json["dueDateFrom"] == null ? void 0 : new Date(json["dueDateFrom"]),
|
|
7653
7810
|
"dueDateTo": json["dueDateTo"] == null ? void 0 : new Date(json["dueDateTo"]),
|
|
7654
7811
|
"endUserId": json["endUserId"] == null ? void 0 : json["endUserId"],
|
|
@@ -7660,6 +7817,7 @@ function RetrievalFiltersDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7660
7817
|
"totalAmountMax": json["totalAmountMax"] == null ? void 0 : json["totalAmountMax"],
|
|
7661
7818
|
"totalAmountMin": json["totalAmountMin"] == null ? void 0 : json["totalAmountMin"],
|
|
7662
7819
|
"vendorName": json["vendorName"] == null ? void 0 : json["vendorName"],
|
|
7820
|
+
"vendorNames": json["vendorNames"] == null ? void 0 : json["vendorNames"],
|
|
7663
7821
|
"vendorTaxId": json["vendorTaxId"] == null ? void 0 : json["vendorTaxId"]
|
|
7664
7822
|
};
|
|
7665
7823
|
}
|
|
@@ -7672,10 +7830,14 @@ function RetrievalFiltersDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
7672
7830
|
}
|
|
7673
7831
|
return {
|
|
7674
7832
|
"buyerName": value["buyerName"],
|
|
7833
|
+
"currencies": value["currencies"],
|
|
7675
7834
|
"currency": value["currency"],
|
|
7676
7835
|
"docNumber": value["docNumber"],
|
|
7836
|
+
"docNumbers": value["docNumbers"],
|
|
7677
7837
|
"documentId": value["documentId"],
|
|
7838
|
+
"documentIds": value["documentIds"],
|
|
7678
7839
|
"documentType": value["documentType"],
|
|
7840
|
+
"documentTypes": value["documentTypes"],
|
|
7679
7841
|
"dueDateFrom": value["dueDateFrom"] == null ? value["dueDateFrom"] : value["dueDateFrom"].toISOString().substring(0, 10),
|
|
7680
7842
|
"dueDateTo": value["dueDateTo"] == null ? value["dueDateTo"] : value["dueDateTo"].toISOString().substring(0, 10),
|
|
7681
7843
|
"endUserId": value["endUserId"],
|
|
@@ -7687,6 +7849,7 @@ function RetrievalFiltersDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
7687
7849
|
"totalAmountMax": value["totalAmountMax"],
|
|
7688
7850
|
"totalAmountMin": value["totalAmountMin"],
|
|
7689
7851
|
"vendorName": value["vendorName"],
|
|
7852
|
+
"vendorNames": value["vendorNames"],
|
|
7690
7853
|
"vendorTaxId": value["vendorTaxId"]
|
|
7691
7854
|
};
|
|
7692
7855
|
}
|
|
@@ -7755,7 +7918,8 @@ var AggregateMetricDTOFieldEnum = {
|
|
|
7755
7918
|
TotalAmount: "total_amount",
|
|
7756
7919
|
NetAmount: "net_amount",
|
|
7757
7920
|
VatAmount: "vat_amount",
|
|
7758
|
-
MeasurableQuantity: "measurable_quantity"
|
|
7921
|
+
MeasurableQuantity: "measurable_quantity",
|
|
7922
|
+
LineTotal: "line_total"
|
|
7759
7923
|
};
|
|
7760
7924
|
var AggregateMetricDTOOpEnum = {
|
|
7761
7925
|
Sum: "sum",
|
|
@@ -7806,7 +7970,10 @@ var RetrievalAggregateInDTOGroupByEnum = {
|
|
|
7806
7970
|
Month: "month",
|
|
7807
7971
|
Year: "year",
|
|
7808
7972
|
MeasurableUom: "measurable_uom",
|
|
7809
|
-
Description: "description"
|
|
7973
|
+
Description: "description",
|
|
7974
|
+
DocNumber: "doc_number",
|
|
7975
|
+
IssueDate: "issue_date",
|
|
7976
|
+
DocumentId: "document_id"
|
|
7810
7977
|
};
|
|
7811
7978
|
function instanceOfRetrievalAggregateInDTO(value) {
|
|
7812
7979
|
if (!("metrics" in value) || value["metrics"] === void 0) return false;
|
|
@@ -8090,6 +8257,11 @@ function RetrievalQueryInDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
8090
8257
|
}
|
|
8091
8258
|
|
|
8092
8259
|
// src/generated/models/QueryMetaDTO.ts
|
|
8260
|
+
var QueryMetaDTOIndexingStateEnum = {
|
|
8261
|
+
Preparing: "preparing",
|
|
8262
|
+
Ready: "ready",
|
|
8263
|
+
Unavailable: "unavailable"
|
|
8264
|
+
};
|
|
8093
8265
|
function instanceOfQueryMetaDTO(value) {
|
|
8094
8266
|
if (!("count" in value) || value["count"] === void 0) return false;
|
|
8095
8267
|
if (!("mode" in value) || value["mode"] === void 0) return false;
|
|
@@ -8104,6 +8276,8 @@ function QueryMetaDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
8104
8276
|
}
|
|
8105
8277
|
return {
|
|
8106
8278
|
"count": json["count"],
|
|
8279
|
+
"indexingReady": json["indexingReady"] == null ? void 0 : json["indexingReady"],
|
|
8280
|
+
"indexingState": json["indexingState"] == null ? void 0 : json["indexingState"],
|
|
8107
8281
|
"limit": json["limit"] == null ? void 0 : json["limit"],
|
|
8108
8282
|
"mode": json["mode"],
|
|
8109
8283
|
"skip": json["skip"] == null ? void 0 : json["skip"]
|
|
@@ -8118,6 +8292,8 @@ function QueryMetaDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
8118
8292
|
}
|
|
8119
8293
|
return {
|
|
8120
8294
|
"count": value["count"],
|
|
8295
|
+
"indexingReady": value["indexingReady"],
|
|
8296
|
+
"indexingState": value["indexingState"],
|
|
8121
8297
|
"limit": value["limit"],
|
|
8122
8298
|
"mode": value["mode"],
|
|
8123
8299
|
"skip": value["skip"]
|
|
@@ -8671,6 +8847,48 @@ function CheckoutOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
8671
8847
|
};
|
|
8672
8848
|
}
|
|
8673
8849
|
|
|
8850
|
+
// src/generated/models/PaymentMethodUpdateOutDTO.ts
|
|
8851
|
+
var PaymentMethodUpdateOutDTOPurposeEnum = {
|
|
8852
|
+
UpdatePaymentMethod: "update_payment_method",
|
|
8853
|
+
PayOverdue: "pay_overdue",
|
|
8854
|
+
ResumeSubscription: "resume_subscription"
|
|
8855
|
+
};
|
|
8856
|
+
function instanceOfPaymentMethodUpdateOutDTO(value) {
|
|
8857
|
+
if (!("paddleTransactionId" in value) || value["paddleTransactionId"] === void 0) return false;
|
|
8858
|
+
if (!("purpose" in value) || value["purpose"] === void 0) return false;
|
|
8859
|
+
return true;
|
|
8860
|
+
}
|
|
8861
|
+
function PaymentMethodUpdateOutDTOFromJSON(json) {
|
|
8862
|
+
return PaymentMethodUpdateOutDTOFromJSONTyped(json, false);
|
|
8863
|
+
}
|
|
8864
|
+
function PaymentMethodUpdateOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
8865
|
+
if (json == null) {
|
|
8866
|
+
return json;
|
|
8867
|
+
}
|
|
8868
|
+
return {
|
|
8869
|
+
"checkoutUrl": json["checkoutUrl"] == null ? void 0 : json["checkoutUrl"],
|
|
8870
|
+
"createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
|
|
8871
|
+
"createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
|
|
8872
|
+
"paddleTransactionId": json["paddleTransactionId"],
|
|
8873
|
+
"purpose": json["purpose"]
|
|
8874
|
+
};
|
|
8875
|
+
}
|
|
8876
|
+
function PaymentMethodUpdateOutDTOToJSON(json) {
|
|
8877
|
+
return PaymentMethodUpdateOutDTOToJSONTyped(json, false);
|
|
8878
|
+
}
|
|
8879
|
+
function PaymentMethodUpdateOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
8880
|
+
if (value == null) {
|
|
8881
|
+
return value;
|
|
8882
|
+
}
|
|
8883
|
+
return {
|
|
8884
|
+
"checkoutUrl": value["checkoutUrl"],
|
|
8885
|
+
"createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
|
|
8886
|
+
"createdAtTimestamp": value["createdAtTimestamp"],
|
|
8887
|
+
"paddleTransactionId": value["paddleTransactionId"],
|
|
8888
|
+
"purpose": value["purpose"]
|
|
8889
|
+
};
|
|
8890
|
+
}
|
|
8891
|
+
|
|
8674
8892
|
// src/generated/models/DataRetentionPeriodModel.ts
|
|
8675
8893
|
var DataRetentionPeriodModel = {
|
|
8676
8894
|
OneDay: "one_day",
|
|
@@ -9925,6 +10143,40 @@ var SubscriptionsApi = class extends BaseAPI {
|
|
|
9925
10143
|
const response = await this.purchaseTopUpRaw(requestParameters, initOverrides);
|
|
9926
10144
|
return await response.value();
|
|
9927
10145
|
}
|
|
10146
|
+
/**
|
|
10147
|
+
* Creates request options for startPaymentMethodUpdate without sending the request
|
|
10148
|
+
*/
|
|
10149
|
+
async startPaymentMethodUpdateRequestOpts() {
|
|
10150
|
+
const queryParameters = {};
|
|
10151
|
+
const headerParameters = {};
|
|
10152
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10153
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2PasswordBearer", []);
|
|
10154
|
+
}
|
|
10155
|
+
let urlPath = `/api/v1/subscriptions/me/payment-method-update`;
|
|
10156
|
+
return {
|
|
10157
|
+
path: urlPath,
|
|
10158
|
+
method: "POST",
|
|
10159
|
+
headers: headerParameters,
|
|
10160
|
+
query: queryParameters
|
|
10161
|
+
};
|
|
10162
|
+
}
|
|
10163
|
+
/**
|
|
10164
|
+
* 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.
|
|
10165
|
+
* Start Payment Method Update
|
|
10166
|
+
*/
|
|
10167
|
+
async startPaymentMethodUpdateRaw(initOverrides) {
|
|
10168
|
+
const requestOptions = await this.startPaymentMethodUpdateRequestOpts();
|
|
10169
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
10170
|
+
return new JSONApiResponse(response, (jsonValue) => PaymentMethodUpdateOutDTOFromJSON(jsonValue));
|
|
10171
|
+
}
|
|
10172
|
+
/**
|
|
10173
|
+
* 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.
|
|
10174
|
+
* Start Payment Method Update
|
|
10175
|
+
*/
|
|
10176
|
+
async startPaymentMethodUpdate(initOverrides) {
|
|
10177
|
+
const response = await this.startPaymentMethodUpdateRaw(initOverrides);
|
|
10178
|
+
return await response.value();
|
|
10179
|
+
}
|
|
9928
10180
|
/**
|
|
9929
10181
|
* Creates request options for subscribe without sending the request
|
|
9930
10182
|
*/
|
|
@@ -10262,6 +10514,7 @@ function TemplateOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
10262
10514
|
"error": json["error"] == null ? void 0 : json["error"],
|
|
10263
10515
|
"id": json["id"],
|
|
10264
10516
|
"isActive": json["isActive"] == null ? void 0 : json["isActive"],
|
|
10517
|
+
"isStarter": json["isStarter"] == null ? void 0 : json["isStarter"],
|
|
10265
10518
|
"name": json["name"],
|
|
10266
10519
|
"schema": json["schema"] == null ? void 0 : TemplateSchemaDTOOutputFromJSON(json["schema"]),
|
|
10267
10520
|
"sourceFilename": json["sourceFilename"] == null ? void 0 : json["sourceFilename"],
|
|
@@ -10282,6 +10535,7 @@ function TemplateOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
10282
10535
|
"error": value["error"],
|
|
10283
10536
|
"id": value["id"],
|
|
10284
10537
|
"isActive": value["isActive"],
|
|
10538
|
+
"isStarter": value["isStarter"],
|
|
10285
10539
|
"name": value["name"],
|
|
10286
10540
|
"schema": TemplateSchemaDTOOutputToJSON(value["schema"]),
|
|
10287
10541
|
"sourceFilename": value["sourceFilename"],
|
|
@@ -11537,7 +11791,7 @@ async function asProcessingErrorIfFailedResult(error) {
|
|
|
11537
11791
|
}
|
|
11538
11792
|
|
|
11539
11793
|
// src/version.ts
|
|
11540
|
-
var VERSION = "0.
|
|
11794
|
+
var VERSION = "0.16.1";
|
|
11541
11795
|
// Annotate the CommonJS export names for ESM import in node:
|
|
11542
11796
|
0 && (module.exports = {
|
|
11543
11797
|
AddExtractionsInDTOFromJSON,
|
|
@@ -11925,6 +12179,11 @@ var VERSION = "0.15.0";
|
|
|
11925
12179
|
OperationTypeFromJSONTyped,
|
|
11926
12180
|
OperationTypeToJSON,
|
|
11927
12181
|
OperationTypeToJSONTyped,
|
|
12182
|
+
PaymentMethodUpdateOutDTOFromJSON,
|
|
12183
|
+
PaymentMethodUpdateOutDTOFromJSONTyped,
|
|
12184
|
+
PaymentMethodUpdateOutDTOPurposeEnum,
|
|
12185
|
+
PaymentMethodUpdateOutDTOToJSON,
|
|
12186
|
+
PaymentMethodUpdateOutDTOToJSONTyped,
|
|
11928
12187
|
PeriodPresetModel,
|
|
11929
12188
|
PeriodPresetModelFromJSON,
|
|
11930
12189
|
PeriodPresetModelFromJSONTyped,
|
|
@@ -11961,6 +12220,7 @@ var VERSION = "0.15.0";
|
|
|
11961
12220
|
PurgedDocumentsDataOutDTOToJSONTyped,
|
|
11962
12221
|
QueryMetaDTOFromJSON,
|
|
11963
12222
|
QueryMetaDTOFromJSONTyped,
|
|
12223
|
+
QueryMetaDTOIndexingStateEnum,
|
|
11964
12224
|
QueryMetaDTOToJSON,
|
|
11965
12225
|
QueryMetaDTOToJSONTyped,
|
|
11966
12226
|
QueryResultItemDTOFromJSON,
|
|
@@ -12297,6 +12557,7 @@ var VERSION = "0.15.0";
|
|
|
12297
12557
|
instanceOfNextActionOutDTO,
|
|
12298
12558
|
instanceOfNumberOfStoredDocumentsOutDTO,
|
|
12299
12559
|
instanceOfOperationType,
|
|
12560
|
+
instanceOfPaymentMethodUpdateOutDTO,
|
|
12300
12561
|
instanceOfPeriodPresetModel,
|
|
12301
12562
|
instanceOfPlanCreditCostOutDTO,
|
|
12302
12563
|
instanceOfPlanDetailOutDTO,
|