@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
package/dist/index.cjs
CHANGED
|
@@ -174,6 +174,7 @@ __export(index_exports, {
|
|
|
174
174
|
Subscriptions: () => Subscriptions,
|
|
175
175
|
Support: () => Support,
|
|
176
176
|
UNKNOWN_SECTION_ORDER: () => UNKNOWN_SECTION_ORDER,
|
|
177
|
+
VatRates: () => VatRates,
|
|
177
178
|
WCAG_AA_TEXT: () => WCAG_AA_TEXT,
|
|
178
179
|
WCAG_AA_UI: () => WCAG_AA_UI,
|
|
179
180
|
WHOP_ACCENT_COLORS: () => WHOP_ACCENT_COLORS,
|
|
@@ -543,6 +544,23 @@ var ApiKeys = class {
|
|
|
543
544
|
async list(merchantId) {
|
|
544
545
|
return this.request("GET", `/api-keys/${encodeURIComponent(merchantId)}/list`);
|
|
545
546
|
}
|
|
547
|
+
/**
|
|
548
|
+
* The key templates the caller may use, with the values each prefills.
|
|
549
|
+
* Create the key with `create`; the template itself is not sent.
|
|
550
|
+
* `GET /api-keys/{merchantId}/templates`
|
|
551
|
+
*
|
|
552
|
+
* @param merchantId - The merchant account ID.
|
|
553
|
+
* @returns The templates, each limited to what the caller may grant.
|
|
554
|
+
*
|
|
555
|
+
* @example
|
|
556
|
+
* ```typescript
|
|
557
|
+
* const { templates } = await delopay.apiKeys.listTemplates('merch_123');
|
|
558
|
+
* const readOnly = templates.find((t) => t.id === 'ai_agent_read_only');
|
|
559
|
+
* ```
|
|
560
|
+
*/
|
|
561
|
+
async listTemplates(merchantId) {
|
|
562
|
+
return this.request("GET", `/api-keys/${encodeURIComponent(merchantId)}/templates`);
|
|
563
|
+
}
|
|
546
564
|
// --- Profile-scoped (shop-level) API keys ---------------------------------
|
|
547
565
|
//
|
|
548
566
|
// JWT-authenticated routes under `/account/{merchantId}/profile/api-keys`.
|
|
@@ -7116,6 +7134,12 @@ var Export = class {
|
|
|
7116
7134
|
options
|
|
7117
7135
|
);
|
|
7118
7136
|
}
|
|
7137
|
+
async vatReport(params, options) {
|
|
7138
|
+
return runExport(this.request, "GET", "/export/vat-report", queried(params), options);
|
|
7139
|
+
}
|
|
7140
|
+
async vatReportForProfile(params, options) {
|
|
7141
|
+
return runExport(this.request, "GET", "/export/profile/vat-report", queried(params), options);
|
|
7142
|
+
}
|
|
7119
7143
|
async auditLog(params, options) {
|
|
7120
7144
|
return runExport(
|
|
7121
7145
|
this.request,
|
|
@@ -7414,6 +7438,24 @@ var SellToRestrictions = class {
|
|
|
7414
7438
|
}
|
|
7415
7439
|
};
|
|
7416
7440
|
|
|
7441
|
+
// src/resources/vatRates.ts
|
|
7442
|
+
var VatRates = class {
|
|
7443
|
+
constructor(request) {
|
|
7444
|
+
this.request = request;
|
|
7445
|
+
}
|
|
7446
|
+
/**
|
|
7447
|
+
* List the rates, by country, category and `valid_from`. With `on`, only
|
|
7448
|
+
* the row in force on that date for each country and category.
|
|
7449
|
+
*
|
|
7450
|
+
* `GET /vat-rates`
|
|
7451
|
+
*/
|
|
7452
|
+
async list(params) {
|
|
7453
|
+
return this.request("GET", "/vat-rates", {
|
|
7454
|
+
query: { country: params?.country, on: params?.on }
|
|
7455
|
+
});
|
|
7456
|
+
}
|
|
7457
|
+
};
|
|
7458
|
+
|
|
7417
7459
|
// src/resources/buyerBlocklist.ts
|
|
7418
7460
|
var BuyerBlocklist = class {
|
|
7419
7461
|
constructor(request) {
|
|
@@ -7880,6 +7922,17 @@ var PayoutDestinations = class {
|
|
|
7880
7922
|
body: { user_id: userId }
|
|
7881
7923
|
});
|
|
7882
7924
|
}
|
|
7925
|
+
/**
|
|
7926
|
+
* The merchant's revenue-share holders, each with the team member it is
|
|
7927
|
+
* linked to, if any.
|
|
7928
|
+
*
|
|
7929
|
+
* `GET /revenue-shares/holders?merchant_id={merchantId}`
|
|
7930
|
+
*/
|
|
7931
|
+
async listRevenueShareHolders(merchantId) {
|
|
7932
|
+
return this.request("GET", "/revenue-shares/holders", {
|
|
7933
|
+
query: { merchant_id: merchantId }
|
|
7934
|
+
});
|
|
7935
|
+
}
|
|
7883
7936
|
/**
|
|
7884
7937
|
* The share terms of the holders linked to the caller. Read-only.
|
|
7885
7938
|
*
|
|
@@ -8504,6 +8557,54 @@ var Products = class {
|
|
|
8504
8557
|
...this.scoped(profileId, options)
|
|
8505
8558
|
});
|
|
8506
8559
|
}
|
|
8560
|
+
/**
|
|
8561
|
+
* Copy a test product to live: its names, active prices under new ids,
|
|
8562
|
+
* image, tax category, category, selection groups and bundle composition.
|
|
8563
|
+
* A test product it contains or offers is replaced by its live copy; one
|
|
8564
|
+
* without a live copy refuses the copy. Nothing at a payment provider is
|
|
8565
|
+
* copied. A repeated copy returns the existing live copy unless `another`
|
|
8566
|
+
* is set (`created` says which).
|
|
8567
|
+
* `POST /products/{product_id}/copy-to-live`
|
|
8568
|
+
*/
|
|
8569
|
+
async copyToLive(productId, params, profileId, options) {
|
|
8570
|
+
return this.request("POST", `/products/${encodeURIComponent(productId)}/copy-to-live`, {
|
|
8571
|
+
body: params,
|
|
8572
|
+
...this.scoped(profileId, options)
|
|
8573
|
+
});
|
|
8574
|
+
}
|
|
8575
|
+
/**
|
|
8576
|
+
* What `copyToLive` would do, with nothing written. A copy that would be
|
|
8577
|
+
* refused answers with the copy's error.
|
|
8578
|
+
* `GET /products/{product_id}/copy-to-live/preview`
|
|
8579
|
+
*/
|
|
8580
|
+
async previewCopyToLive(productId, query, profileId, options) {
|
|
8581
|
+
return this.request("GET", `/products/${encodeURIComponent(productId)}/copy-to-live/preview`, {
|
|
8582
|
+
query: query === void 0 ? void 0 : { ...query },
|
|
8583
|
+
...this.scoped(profileId, options)
|
|
8584
|
+
});
|
|
8585
|
+
}
|
|
8586
|
+
/**
|
|
8587
|
+
* The shop's products from before modes, newest first, each with where it
|
|
8588
|
+
* is in use per mode.
|
|
8589
|
+
* `GET /products/legacy-usage`
|
|
8590
|
+
*/
|
|
8591
|
+
async legacyUsage(params, profileId, options) {
|
|
8592
|
+
return this.request("GET", "/products/legacy-usage", {
|
|
8593
|
+
query: params === void 0 ? void 0 : { ...params },
|
|
8594
|
+
...this.scoped(profileId, options)
|
|
8595
|
+
});
|
|
8596
|
+
}
|
|
8597
|
+
/**
|
|
8598
|
+
* Give a product from before modes the mode it belongs to, once. Refused
|
|
8599
|
+
* while the other mode still uses it, or when it already has a mode.
|
|
8600
|
+
* `POST /products/{product_id}/assign-mode`
|
|
8601
|
+
*/
|
|
8602
|
+
async assignMode(productId, params, profileId, options) {
|
|
8603
|
+
return this.request("POST", `/products/${encodeURIComponent(productId)}/assign-mode`, {
|
|
8604
|
+
body: params,
|
|
8605
|
+
...this.scoped(profileId, options)
|
|
8606
|
+
});
|
|
8607
|
+
}
|
|
8507
8608
|
/**
|
|
8508
8609
|
* Put an archived product back on sale.
|
|
8509
8610
|
* `POST /products/{product_id}/restore`
|
|
@@ -11983,6 +12084,7 @@ var Delopay = class {
|
|
|
11983
12084
|
this.regions = new Regions(request);
|
|
11984
12085
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
11985
12086
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
12087
|
+
this.vatRates = new VatRates(request);
|
|
11986
12088
|
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
11987
12089
|
this.persons = new Persons(request);
|
|
11988
12090
|
this.shopLabels = new ShopLabels(request);
|
|
@@ -17082,6 +17184,29 @@ var CheckoutSession = class {
|
|
|
17082
17184
|
headers: this.bearerHeaders(options?.headers)
|
|
17083
17185
|
});
|
|
17084
17186
|
}
|
|
17187
|
+
/**
|
|
17188
|
+
* Send the buyer's tax country, region and VAT ID while the checkout data's
|
|
17189
|
+
* `tax.step` is `open`, and get the VAT the payment carries for them.
|
|
17190
|
+
*
|
|
17191
|
+
* `close: false` recalculates and keeps the step open, for a live total
|
|
17192
|
+
* while the buyer types; it also opens a confirmed step again while nothing
|
|
17193
|
+
* was prepared at a provider. `close: true` recalculates and confirms: the
|
|
17194
|
+
* payment is charged what the answer says, and the checkout data, fetched
|
|
17195
|
+
* again, answers the payment methods with `tax.step` `closed`. A confirmed
|
|
17196
|
+
* step answers the same closing request again. A change once something was
|
|
17197
|
+
* prepared at a provider is refused with `DE_28` (409), as is one while the
|
|
17198
|
+
* add-on choice is open or after the checkout expired. A malformed country
|
|
17199
|
+
* or region is refused with `IR_06` (400).
|
|
17200
|
+
*
|
|
17201
|
+
* `POST /payment-link/{merchantId}/{paymentId}/tax`
|
|
17202
|
+
*/
|
|
17203
|
+
async submitTax(params, options) {
|
|
17204
|
+
return this.client.request("POST", `${this.linkBase}/tax`, {
|
|
17205
|
+
body: params,
|
|
17206
|
+
...options,
|
|
17207
|
+
headers: this.bearerHeaders(options?.headers)
|
|
17208
|
+
});
|
|
17209
|
+
}
|
|
17085
17210
|
/**
|
|
17086
17211
|
* The payment's identity verification step: whether the payment asked for
|
|
17087
17212
|
* one, its outcome, and the provider's page while it is pending. A pending
|
|
@@ -18128,6 +18253,7 @@ var encodeNativePanes = encodePanes;
|
|
|
18128
18253
|
Subscriptions,
|
|
18129
18254
|
Support,
|
|
18130
18255
|
UNKNOWN_SECTION_ORDER,
|
|
18256
|
+
VatRates,
|
|
18131
18257
|
WCAG_AA_TEXT,
|
|
18132
18258
|
WCAG_AA_UI,
|
|
18133
18259
|
WHOP_ACCENT_COLORS,
|