@delopay/sdk 0.185.0 → 0.186.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.
@@ -4010,6 +4010,20 @@ var Users = class {
4010
4010
  async deleteUserRole(params) {
4011
4011
  return this.request("DELETE", "/user/employees/delete", { body: params });
4012
4012
  }
4013
+ /**
4014
+ * Move a team member between a merchant-level role and shop-level roles.
4015
+ * `POST /user/employees/change-scope`
4016
+ *
4017
+ * A merchant-level `role_id` takes no `profile_ids`; a shop-level one needs
4018
+ * at least one. Every earlier merchant- and shop-level binding of the member
4019
+ * in your merchant is replaced. When the change takes a scope away, the
4020
+ * member's sessions end (`sessions_revoked: true`). Needs a caller at
4021
+ * merchant level or above. A refusal is a `UR_23` error whose `data.reason`
4022
+ * names the rule; an unknown `role_id` is `UR_22`.
4023
+ */
4024
+ async changeMemberScope(params) {
4025
+ return this.request("POST", "/user/employees/change-scope", { body: params });
4026
+ }
4013
4027
  /** Sign in via OIDC. `POST /user/oidc` */
4014
4028
  async signInOidc(params) {
4015
4029
  return this.request("POST", "/user/oidc", { body: params });
@@ -4559,6 +4573,24 @@ var Export = class {
4559
4573
  options
4560
4574
  );
4561
4575
  }
4576
+ async transactionLines(params, options) {
4577
+ return runExport(
4578
+ this.request,
4579
+ "POST",
4580
+ "/export/transactions/lines",
4581
+ { body: params ?? {} },
4582
+ options
4583
+ );
4584
+ }
4585
+ async transactionLinesForProfile(params, options) {
4586
+ return runExport(
4587
+ this.request,
4588
+ "POST",
4589
+ "/export/profile/transactions/lines",
4590
+ { body: params ?? {} },
4591
+ options
4592
+ );
4593
+ }
4562
4594
  async refunds(params, options) {
4563
4595
  return runExport(this.request, "POST", "/refunds/list/export", { body: params ?? {} }, options);
4564
4596
  }
@@ -4980,6 +5012,20 @@ var Products = class {
4980
5012
  ...this.scoped(profileId, options)
4981
5013
  });
4982
5014
  }
5015
+ /**
5016
+ * What a product sold in a window, per currency, net of the refunds credited
5017
+ * to its lines. Refunds that named no product line are not included.
5018
+ * `GET /products/{product_id}/sales`
5019
+ *
5020
+ * Needs payment read; refused (403) to a caller limited to some connector
5021
+ * accounts.
5022
+ */
5023
+ async sales(productId, query, profileId, options) {
5024
+ return this.request("GET", `/products/${encodeURIComponent(productId)}/sales`, {
5025
+ ...this.scoped(profileId, options),
5026
+ query: { ...query }
5027
+ });
5028
+ }
4983
5029
  /**
4984
5030
  * Change a product's name, description, image, metadata or category
4985
5031
  * (`category_id: null` makes it uncategorized).
@@ -5283,6 +5329,44 @@ var Products = class {
5283
5329
  ...this.scoped(profileId, options)
5284
5330
  });
5285
5331
  }
5332
+ // --- provider sync -----------------------------------------------
5333
+ /**
5334
+ * Compare the product with its copy at every connected account it is tied
5335
+ * to. Reads the providers now; an unreadable provider answers `unknown`,
5336
+ * never `in_sync`.
5337
+ * `GET /products/{product_id}/provider-sync`
5338
+ */
5339
+ async providerSync(productId, profileId, options) {
5340
+ return this.request("GET", `/products/${encodeURIComponent(productId)}/provider-sync`, {
5341
+ ...this.scoped(profileId, options)
5342
+ });
5343
+ }
5344
+ /**
5345
+ * {@link providerSync} for 1 to 50 products at once, such as one page of the
5346
+ * product list. Unknown ids are left out of the answer.
5347
+ * `POST /products/provider-sync`
5348
+ */
5349
+ async providerSyncBatch(request, profileId, options) {
5350
+ return this.request("POST", "/products/provider-sync", {
5351
+ body: request,
5352
+ ...this.scoped(profileId, options)
5353
+ });
5354
+ }
5355
+ /**
5356
+ * Write the catalog's state onto one connected account's copy of the
5357
+ * product, for the differences a push changes and nothing else. When it
5358
+ * would change a difference not named in `confirmed`, nothing is written and
5359
+ * the answer carries `confirmation_outdated: true` with the current
5360
+ * differences in `result`; `nothing_to_push` answers without a provider
5361
+ * write when nothing pushable differs.
5362
+ * `POST /products/{product_id}/provider-sync/push`
5363
+ */
5364
+ async providerPush(productId, request, profileId, options) {
5365
+ return this.request("POST", `/products/${encodeURIComponent(productId)}/provider-sync/push`, {
5366
+ body: request,
5367
+ ...this.scoped(profileId, options)
5368
+ });
5369
+ }
5286
5370
  };
5287
5371
 
5288
5372
  // src/resources/processorCosts.ts
@@ -10732,4 +10816,4 @@ export {
10732
10816
  decodeNativePanes,
10733
10817
  encodeNativePanes
10734
10818
  };
10735
- //# sourceMappingURL=chunk-LA4KAVRD.js.map
10819
+ //# sourceMappingURL=chunk-FRMLBRHG.js.map