@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/dist/internal.cjs CHANGED
@@ -4239,6 +4239,14 @@ var Users = class {
4239
4239
  async listUserRoles(params) {
4240
4240
  return this.request("POST", "/user/employees", { body: params });
4241
4241
  }
4242
+ /**
4243
+ * The current role's explicit payment-data policy, or `null` when the role
4244
+ * retains its pre-control access. A dashboard hint: every API response
4245
+ * enforces the same policy on its own. `GET /user/role/payment-visibility`
4246
+ */
4247
+ async getRolePaymentVisibility() {
4248
+ return this.request("GET", "/user/role/payment-visibility");
4249
+ }
4242
4250
  /**
4243
4251
  * Change a team member's role. `POST /user/employees/update-role`
4244
4252
  *
@@ -5291,6 +5299,89 @@ var Products = class {
5291
5299
  { ...this.scoped(profileId, options) }
5292
5300
  );
5293
5301
  }
5302
+ // --- add-on selection groups ---------------------------------------
5303
+ /**
5304
+ * Add a group of optional extras to a one-time product, with how many of
5305
+ * them a buyer must and may choose. Each add-on is an active product of kind
5306
+ * `addon` in the same shop. Returns the whole product.
5307
+ * `POST /products/{product_id}/addon-groups`
5308
+ */
5309
+ async createAddonGroup(productId, group, profileId, options) {
5310
+ return this.request("POST", `/products/${encodeURIComponent(productId)}/addon-groups`, {
5311
+ body: group,
5312
+ ...this.scoped(profileId, options)
5313
+ });
5314
+ }
5315
+ /**
5316
+ * Change a group's name, bounds, or the add-ons it offers; a new list
5317
+ * replaces the old one whole.
5318
+ * `POST /products/{product_id}/addon-groups/{group_id}`
5319
+ */
5320
+ async updateAddonGroup(productId, groupId, changes, profileId, options) {
5321
+ return this.request(
5322
+ "POST",
5323
+ `/products/${encodeURIComponent(productId)}/addon-groups/${encodeURIComponent(groupId)}`,
5324
+ { body: changes, ...this.scoped(profileId, options) }
5325
+ );
5326
+ }
5327
+ /**
5328
+ * Remove a group and what it offered. The add-on products themselves stay.
5329
+ * `DELETE /products/{product_id}/addon-groups/{group_id}`
5330
+ */
5331
+ async deleteAddonGroup(productId, groupId, profileId, options) {
5332
+ return this.request(
5333
+ "DELETE",
5334
+ `/products/${encodeURIComponent(productId)}/addon-groups/${encodeURIComponent(groupId)}`,
5335
+ { ...this.scoped(profileId, options) }
5336
+ );
5337
+ }
5338
+ // --- bundles ---------------------------------------------------------
5339
+ /**
5340
+ * Replace what a bundle contains. Its pricing mode is fixed at creation;
5341
+ * past purchases keep their own frozen lines.
5342
+ * `POST /products/{product_id}/bundle`
5343
+ */
5344
+ async replaceBundle(productId, bundle, profileId, options) {
5345
+ return this.request("POST", `/products/${encodeURIComponent(productId)}/bundle`, {
5346
+ body: bundle,
5347
+ ...this.scoped(profileId, options)
5348
+ });
5349
+ }
5350
+ // --- provider import ---------------------------------------------
5351
+ /**
5352
+ * Read a connected billing account's products and say how each relates to
5353
+ * the catalog. Reads only: nothing is written to the provider or the catalog.
5354
+ * `POST /products/import/preview`
5355
+ */
5356
+ async importPreview(request, profileId, options) {
5357
+ return this.request("POST", "/products/import/preview", {
5358
+ body: request,
5359
+ ...this.scoped(profileId, options)
5360
+ });
5361
+ }
5362
+ /**
5363
+ * Create a product for every new item and add the new prices of every
5364
+ * changed one, tied to the provider's ids. Nothing is edited or removed, and
5365
+ * nothing is written to the provider. A failed item is reported with its
5366
+ * reason and can be retried by naming it in `connector_product_ids`.
5367
+ * `POST /products/import/apply`
5368
+ */
5369
+ async importApply(request, profileId, options) {
5370
+ return this.request("POST", "/products/import/apply", {
5371
+ body: request,
5372
+ ...this.scoped(profileId, options)
5373
+ });
5374
+ }
5375
+ /**
5376
+ * The shop's past imports from one connected account, newest first.
5377
+ * `GET /products/import/runs`
5378
+ */
5379
+ async listImportRuns(merchantConnectorId, profileId, options) {
5380
+ return this.request("GET", "/products/import/runs", {
5381
+ query: { merchant_connector_id: merchantConnectorId },
5382
+ ...this.scoped(profileId, options)
5383
+ });
5384
+ }
5294
5385
  };
5295
5386
 
5296
5387
  // src/resources/processorCosts.ts
@@ -5425,6 +5516,16 @@ var CheckoutMethods = class {
5425
5516
  query: { merchant_id: merchantId }
5426
5517
  });
5427
5518
  }
5519
+ /**
5520
+ * The same document as {@link retrieve}, on the route that stays open to a
5521
+ * reader of the checkout's appearance while the role's payment-data
5522
+ * visibility is restricted. `GET /checkout-methods/{profile_id}/preview`
5523
+ */
5524
+ async preview(merchantId, profileId) {
5525
+ return this.request("GET", `/checkout-methods/${encodeURIComponent(profileId)}/preview`, {
5526
+ query: { merchant_id: merchantId }
5527
+ });
5528
+ }
5428
5529
  /**
5429
5530
  * Replace the shop's layout. The router refuses an express item that does
5430
5531
  * not draw its own button, more than two rows of two in the express strip,