@delopay/sdk 0.183.0 → 0.184.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/README.md +26 -0
- package/dist/{chunk-HITQ3SXH.js → chunk-RH4CX4MU.js} +102 -1
- package/dist/chunk-RH4CX4MU.js.map +1 -0
- package/dist/index.cjs +101 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +335 -9
- package/dist/index.d.ts +335 -9
- package/dist/index.js +1 -1
- package/dist/internal.cjs +101 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-HITQ3SXH.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -4226,6 +4226,14 @@ var Users = class {
|
|
|
4226
4226
|
async listUserRoles(params) {
|
|
4227
4227
|
return this.request("POST", "/user/employees", { body: params });
|
|
4228
4228
|
}
|
|
4229
|
+
/**
|
|
4230
|
+
* The current role's explicit payment-data policy, or `null` when the role
|
|
4231
|
+
* retains its pre-control access. A dashboard hint: every API response
|
|
4232
|
+
* enforces the same policy on its own. `GET /user/role/payment-visibility`
|
|
4233
|
+
*/
|
|
4234
|
+
async getRolePaymentVisibility() {
|
|
4235
|
+
return this.request("GET", "/user/role/payment-visibility");
|
|
4236
|
+
}
|
|
4229
4237
|
/**
|
|
4230
4238
|
* Change a team member's role. `POST /user/employees/update-role`
|
|
4231
4239
|
*
|
|
@@ -5278,6 +5286,89 @@ var Products = class {
|
|
|
5278
5286
|
{ ...this.scoped(profileId, options) }
|
|
5279
5287
|
);
|
|
5280
5288
|
}
|
|
5289
|
+
// --- add-on selection groups ---------------------------------------
|
|
5290
|
+
/**
|
|
5291
|
+
* Add a group of optional extras to a one-time product, with how many of
|
|
5292
|
+
* them a buyer must and may choose. Each add-on is an active product of kind
|
|
5293
|
+
* `addon` in the same shop. Returns the whole product.
|
|
5294
|
+
* `POST /products/{product_id}/addon-groups`
|
|
5295
|
+
*/
|
|
5296
|
+
async createAddonGroup(productId, group, profileId, options) {
|
|
5297
|
+
return this.request("POST", `/products/${encodeURIComponent(productId)}/addon-groups`, {
|
|
5298
|
+
body: group,
|
|
5299
|
+
...this.scoped(profileId, options)
|
|
5300
|
+
});
|
|
5301
|
+
}
|
|
5302
|
+
/**
|
|
5303
|
+
* Change a group's name, bounds, or the add-ons it offers; a new list
|
|
5304
|
+
* replaces the old one whole.
|
|
5305
|
+
* `POST /products/{product_id}/addon-groups/{group_id}`
|
|
5306
|
+
*/
|
|
5307
|
+
async updateAddonGroup(productId, groupId, changes, profileId, options) {
|
|
5308
|
+
return this.request(
|
|
5309
|
+
"POST",
|
|
5310
|
+
`/products/${encodeURIComponent(productId)}/addon-groups/${encodeURIComponent(groupId)}`,
|
|
5311
|
+
{ body: changes, ...this.scoped(profileId, options) }
|
|
5312
|
+
);
|
|
5313
|
+
}
|
|
5314
|
+
/**
|
|
5315
|
+
* Remove a group and what it offered. The add-on products themselves stay.
|
|
5316
|
+
* `DELETE /products/{product_id}/addon-groups/{group_id}`
|
|
5317
|
+
*/
|
|
5318
|
+
async deleteAddonGroup(productId, groupId, profileId, options) {
|
|
5319
|
+
return this.request(
|
|
5320
|
+
"DELETE",
|
|
5321
|
+
`/products/${encodeURIComponent(productId)}/addon-groups/${encodeURIComponent(groupId)}`,
|
|
5322
|
+
{ ...this.scoped(profileId, options) }
|
|
5323
|
+
);
|
|
5324
|
+
}
|
|
5325
|
+
// --- bundles ---------------------------------------------------------
|
|
5326
|
+
/**
|
|
5327
|
+
* Replace what a bundle contains. Its pricing mode is fixed at creation;
|
|
5328
|
+
* past purchases keep their own frozen lines.
|
|
5329
|
+
* `POST /products/{product_id}/bundle`
|
|
5330
|
+
*/
|
|
5331
|
+
async replaceBundle(productId, bundle, profileId, options) {
|
|
5332
|
+
return this.request("POST", `/products/${encodeURIComponent(productId)}/bundle`, {
|
|
5333
|
+
body: bundle,
|
|
5334
|
+
...this.scoped(profileId, options)
|
|
5335
|
+
});
|
|
5336
|
+
}
|
|
5337
|
+
// --- provider import ---------------------------------------------
|
|
5338
|
+
/**
|
|
5339
|
+
* Read a connected billing account's products and say how each relates to
|
|
5340
|
+
* the catalog. Reads only: nothing is written to the provider or the catalog.
|
|
5341
|
+
* `POST /products/import/preview`
|
|
5342
|
+
*/
|
|
5343
|
+
async importPreview(request, profileId, options) {
|
|
5344
|
+
return this.request("POST", "/products/import/preview", {
|
|
5345
|
+
body: request,
|
|
5346
|
+
...this.scoped(profileId, options)
|
|
5347
|
+
});
|
|
5348
|
+
}
|
|
5349
|
+
/**
|
|
5350
|
+
* Create a product for every new item and add the new prices of every
|
|
5351
|
+
* changed one, tied to the provider's ids. Nothing is edited or removed, and
|
|
5352
|
+
* nothing is written to the provider. A failed item is reported with its
|
|
5353
|
+
* reason and can be retried by naming it in `connector_product_ids`.
|
|
5354
|
+
* `POST /products/import/apply`
|
|
5355
|
+
*/
|
|
5356
|
+
async importApply(request, profileId, options) {
|
|
5357
|
+
return this.request("POST", "/products/import/apply", {
|
|
5358
|
+
body: request,
|
|
5359
|
+
...this.scoped(profileId, options)
|
|
5360
|
+
});
|
|
5361
|
+
}
|
|
5362
|
+
/**
|
|
5363
|
+
* The shop's past imports from one connected account, newest first.
|
|
5364
|
+
* `GET /products/import/runs`
|
|
5365
|
+
*/
|
|
5366
|
+
async listImportRuns(merchantConnectorId, profileId, options) {
|
|
5367
|
+
return this.request("GET", "/products/import/runs", {
|
|
5368
|
+
query: { merchant_connector_id: merchantConnectorId },
|
|
5369
|
+
...this.scoped(profileId, options)
|
|
5370
|
+
});
|
|
5371
|
+
}
|
|
5281
5372
|
};
|
|
5282
5373
|
|
|
5283
5374
|
// src/resources/processorCosts.ts
|
|
@@ -5412,6 +5503,16 @@ var CheckoutMethods = class {
|
|
|
5412
5503
|
query: { merchant_id: merchantId }
|
|
5413
5504
|
});
|
|
5414
5505
|
}
|
|
5506
|
+
/**
|
|
5507
|
+
* The same document as {@link retrieve}, on the route that stays open to a
|
|
5508
|
+
* reader of the checkout's appearance while the role's payment-data
|
|
5509
|
+
* visibility is restricted. `GET /checkout-methods/{profile_id}/preview`
|
|
5510
|
+
*/
|
|
5511
|
+
async preview(merchantId, profileId) {
|
|
5512
|
+
return this.request("GET", `/checkout-methods/${encodeURIComponent(profileId)}/preview`, {
|
|
5513
|
+
query: { merchant_id: merchantId }
|
|
5514
|
+
});
|
|
5515
|
+
}
|
|
5415
5516
|
/**
|
|
5416
5517
|
* Replace the shop's layout. The router refuses an express item that does
|
|
5417
5518
|
* not draw its own button, more than two rows of two in the express strip,
|