@delopay/sdk 0.400.0 → 0.407.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/{chunk-AZRXI3FB.js → chunk-DZK6LFNW.js} +126 -1
- package/dist/chunk-DZK6LFNW.js.map +1 -0
- package/dist/{index-SqGJT_8j.d.cts → index-WArxrQje.d.cts} +811 -15
- package/dist/{index-SqGJT_8j.d.ts → index-WArxrQje.d.ts} +811 -15
- package/dist/index.cjs +126 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/internal.cjs +194 -5
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +199 -7
- package/dist/internal.d.ts +199 -7
- package/dist/internal.js +71 -6
- package/dist/internal.js.map +1 -1
- package/package.json +17 -19
- package/dist/chunk-AZRXI3FB.js.map +0 -1
|
@@ -217,6 +217,23 @@ var ApiKeys = class {
|
|
|
217
217
|
async list(merchantId) {
|
|
218
218
|
return this.request("GET", `/api-keys/${encodeURIComponent(merchantId)}/list`);
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* The key templates the caller may use, with the values each prefills.
|
|
222
|
+
* Create the key with `create`; the template itself is not sent.
|
|
223
|
+
* `GET /api-keys/{merchantId}/templates`
|
|
224
|
+
*
|
|
225
|
+
* @param merchantId - The merchant account ID.
|
|
226
|
+
* @returns The templates, each limited to what the caller may grant.
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```typescript
|
|
230
|
+
* const { templates } = await delopay.apiKeys.listTemplates('merch_123');
|
|
231
|
+
* const readOnly = templates.find((t) => t.id === 'ai_agent_read_only');
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
async listTemplates(merchantId) {
|
|
235
|
+
return this.request("GET", `/api-keys/${encodeURIComponent(merchantId)}/templates`);
|
|
236
|
+
}
|
|
220
237
|
// --- Profile-scoped (shop-level) API keys ---------------------------------
|
|
221
238
|
//
|
|
222
239
|
// JWT-authenticated routes under `/account/{merchantId}/profile/api-keys`.
|
|
@@ -6790,6 +6807,12 @@ var Export = class {
|
|
|
6790
6807
|
options
|
|
6791
6808
|
);
|
|
6792
6809
|
}
|
|
6810
|
+
async vatReport(params, options) {
|
|
6811
|
+
return runExport(this.request, "GET", "/export/vat-report", queried(params), options);
|
|
6812
|
+
}
|
|
6813
|
+
async vatReportForProfile(params, options) {
|
|
6814
|
+
return runExport(this.request, "GET", "/export/profile/vat-report", queried(params), options);
|
|
6815
|
+
}
|
|
6793
6816
|
async auditLog(params, options) {
|
|
6794
6817
|
return runExport(
|
|
6795
6818
|
this.request,
|
|
@@ -7088,6 +7111,24 @@ var SellToRestrictions = class {
|
|
|
7088
7111
|
}
|
|
7089
7112
|
};
|
|
7090
7113
|
|
|
7114
|
+
// src/resources/vatRates.ts
|
|
7115
|
+
var VatRates = class {
|
|
7116
|
+
constructor(request) {
|
|
7117
|
+
this.request = request;
|
|
7118
|
+
}
|
|
7119
|
+
/**
|
|
7120
|
+
* List the rates, by country, category and `valid_from`. With `on`, only
|
|
7121
|
+
* the row in force on that date for each country and category.
|
|
7122
|
+
*
|
|
7123
|
+
* `GET /vat-rates`
|
|
7124
|
+
*/
|
|
7125
|
+
async list(params) {
|
|
7126
|
+
return this.request("GET", "/vat-rates", {
|
|
7127
|
+
query: { country: params?.country, on: params?.on }
|
|
7128
|
+
});
|
|
7129
|
+
}
|
|
7130
|
+
};
|
|
7131
|
+
|
|
7091
7132
|
// src/resources/buyerBlocklist.ts
|
|
7092
7133
|
var BuyerBlocklist = class {
|
|
7093
7134
|
constructor(request) {
|
|
@@ -7554,6 +7595,17 @@ var PayoutDestinations = class {
|
|
|
7554
7595
|
body: { user_id: userId }
|
|
7555
7596
|
});
|
|
7556
7597
|
}
|
|
7598
|
+
/**
|
|
7599
|
+
* The merchant's revenue-share holders, each with the team member it is
|
|
7600
|
+
* linked to, if any.
|
|
7601
|
+
*
|
|
7602
|
+
* `GET /revenue-shares/holders?merchant_id={merchantId}`
|
|
7603
|
+
*/
|
|
7604
|
+
async listRevenueShareHolders(merchantId) {
|
|
7605
|
+
return this.request("GET", "/revenue-shares/holders", {
|
|
7606
|
+
query: { merchant_id: merchantId }
|
|
7607
|
+
});
|
|
7608
|
+
}
|
|
7557
7609
|
/**
|
|
7558
7610
|
* The share terms of the holders linked to the caller. Read-only.
|
|
7559
7611
|
*
|
|
@@ -8178,6 +8230,54 @@ var Products = class {
|
|
|
8178
8230
|
...this.scoped(profileId, options)
|
|
8179
8231
|
});
|
|
8180
8232
|
}
|
|
8233
|
+
/**
|
|
8234
|
+
* Copy a test product to live: its names, active prices under new ids,
|
|
8235
|
+
* image, tax category, category, selection groups and bundle composition.
|
|
8236
|
+
* A test product it contains or offers is replaced by its live copy; one
|
|
8237
|
+
* without a live copy refuses the copy. Nothing at a payment provider is
|
|
8238
|
+
* copied. A repeated copy returns the existing live copy unless `another`
|
|
8239
|
+
* is set (`created` says which).
|
|
8240
|
+
* `POST /products/{product_id}/copy-to-live`
|
|
8241
|
+
*/
|
|
8242
|
+
async copyToLive(productId, params, profileId, options) {
|
|
8243
|
+
return this.request("POST", `/products/${encodeURIComponent(productId)}/copy-to-live`, {
|
|
8244
|
+
body: params,
|
|
8245
|
+
...this.scoped(profileId, options)
|
|
8246
|
+
});
|
|
8247
|
+
}
|
|
8248
|
+
/**
|
|
8249
|
+
* What `copyToLive` would do, with nothing written. A copy that would be
|
|
8250
|
+
* refused answers with the copy's error.
|
|
8251
|
+
* `GET /products/{product_id}/copy-to-live/preview`
|
|
8252
|
+
*/
|
|
8253
|
+
async previewCopyToLive(productId, query, profileId, options) {
|
|
8254
|
+
return this.request("GET", `/products/${encodeURIComponent(productId)}/copy-to-live/preview`, {
|
|
8255
|
+
query: query === void 0 ? void 0 : { ...query },
|
|
8256
|
+
...this.scoped(profileId, options)
|
|
8257
|
+
});
|
|
8258
|
+
}
|
|
8259
|
+
/**
|
|
8260
|
+
* The shop's products from before modes, newest first, each with where it
|
|
8261
|
+
* is in use per mode.
|
|
8262
|
+
* `GET /products/legacy-usage`
|
|
8263
|
+
*/
|
|
8264
|
+
async legacyUsage(params, profileId, options) {
|
|
8265
|
+
return this.request("GET", "/products/legacy-usage", {
|
|
8266
|
+
query: params === void 0 ? void 0 : { ...params },
|
|
8267
|
+
...this.scoped(profileId, options)
|
|
8268
|
+
});
|
|
8269
|
+
}
|
|
8270
|
+
/**
|
|
8271
|
+
* Give a product from before modes the mode it belongs to, once. Refused
|
|
8272
|
+
* while the other mode still uses it, or when it already has a mode.
|
|
8273
|
+
* `POST /products/{product_id}/assign-mode`
|
|
8274
|
+
*/
|
|
8275
|
+
async assignMode(productId, params, profileId, options) {
|
|
8276
|
+
return this.request("POST", `/products/${encodeURIComponent(productId)}/assign-mode`, {
|
|
8277
|
+
body: params,
|
|
8278
|
+
...this.scoped(profileId, options)
|
|
8279
|
+
});
|
|
8280
|
+
}
|
|
8181
8281
|
/**
|
|
8182
8282
|
* Put an archived product back on sale.
|
|
8183
8283
|
* `POST /products/{product_id}/restore`
|
|
@@ -11657,6 +11757,7 @@ var Delopay = class {
|
|
|
11657
11757
|
this.regions = new Regions(request);
|
|
11658
11758
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
11659
11759
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
11760
|
+
this.vatRates = new VatRates(request);
|
|
11660
11761
|
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
11661
11762
|
this.persons = new Persons(request);
|
|
11662
11763
|
this.shopLabels = new ShopLabels(request);
|
|
@@ -16756,6 +16857,29 @@ var CheckoutSession = class {
|
|
|
16756
16857
|
headers: this.bearerHeaders(options?.headers)
|
|
16757
16858
|
});
|
|
16758
16859
|
}
|
|
16860
|
+
/**
|
|
16861
|
+
* Send the buyer's tax country, region and VAT ID while the checkout data's
|
|
16862
|
+
* `tax.step` is `open`, and get the VAT the payment carries for them.
|
|
16863
|
+
*
|
|
16864
|
+
* `close: false` recalculates and keeps the step open, for a live total
|
|
16865
|
+
* while the buyer types; it also opens a confirmed step again while nothing
|
|
16866
|
+
* was prepared at a provider. `close: true` recalculates and confirms: the
|
|
16867
|
+
* payment is charged what the answer says, and the checkout data, fetched
|
|
16868
|
+
* again, answers the payment methods with `tax.step` `closed`. A confirmed
|
|
16869
|
+
* step answers the same closing request again. A change once something was
|
|
16870
|
+
* prepared at a provider is refused with `DE_28` (409), as is one while the
|
|
16871
|
+
* add-on choice is open or after the checkout expired. A malformed country
|
|
16872
|
+
* or region is refused with `IR_06` (400).
|
|
16873
|
+
*
|
|
16874
|
+
* `POST /payment-link/{merchantId}/{paymentId}/tax`
|
|
16875
|
+
*/
|
|
16876
|
+
async submitTax(params, options) {
|
|
16877
|
+
return this.client.request("POST", `${this.linkBase}/tax`, {
|
|
16878
|
+
body: params,
|
|
16879
|
+
...options,
|
|
16880
|
+
headers: this.bearerHeaders(options?.headers)
|
|
16881
|
+
});
|
|
16882
|
+
}
|
|
16759
16883
|
/**
|
|
16760
16884
|
* The payment's identity verification step: whether the payment asked for
|
|
16761
16885
|
* one, its outcome, and the provider's page while it is pending. A pending
|
|
@@ -17671,6 +17795,7 @@ export {
|
|
|
17671
17795
|
Regions,
|
|
17672
17796
|
AvailabilityOverrides,
|
|
17673
17797
|
SellToRestrictions,
|
|
17798
|
+
VatRates,
|
|
17674
17799
|
BuyerBlocklist,
|
|
17675
17800
|
Persons,
|
|
17676
17801
|
ShopLabels,
|
|
@@ -17956,4 +18081,4 @@ export {
|
|
|
17956
18081
|
decodeNativePanes,
|
|
17957
18082
|
encodeNativePanes
|
|
17958
18083
|
};
|
|
17959
|
-
//# sourceMappingURL=chunk-
|
|
18084
|
+
//# sourceMappingURL=chunk-DZK6LFNW.js.map
|