@delopay/sdk 0.398.0 → 0.400.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.
@@ -7420,6 +7420,150 @@ function shopPath(profileId) {
7420
7420
  return `/industries/shops/${encodeURIComponent(profileId)}`;
7421
7421
  }
7422
7422
 
7423
+ // src/resources/payoutDestinations.ts
7424
+ var PayoutDestinations = class {
7425
+ constructor(request) {
7426
+ this.request = request;
7427
+ }
7428
+ /**
7429
+ * The caller's own destinations, masked, and the methods offered to them.
7430
+ *
7431
+ * `GET /payout-destinations/me`
7432
+ */
7433
+ async listMine() {
7434
+ return this.request("GET", "/payout-destinations/me");
7435
+ }
7436
+ /**
7437
+ * Save a destination. The method must be offered; at most 20 per member.
7438
+ *
7439
+ * `POST /payout-destinations/me`
7440
+ */
7441
+ async createMine(params) {
7442
+ return this.request("POST", "/payout-destinations/me", { body: params });
7443
+ }
7444
+ /**
7445
+ * Replace a destination's details at the version read.
7446
+ *
7447
+ * `PUT /payout-destinations/me/{destinationId}`
7448
+ */
7449
+ async updateMine(destinationId, params) {
7450
+ return this.request("PUT", `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {
7451
+ body: params
7452
+ });
7453
+ }
7454
+ /**
7455
+ * Make a destination the preferred one; the others lose it.
7456
+ *
7457
+ * `POST /payout-destinations/me/{destinationId}/preferred`
7458
+ */
7459
+ async preferMine(destinationId, version) {
7460
+ return this.request(
7461
+ "POST",
7462
+ `/payout-destinations/me/${encodeURIComponent(destinationId)}/preferred`,
7463
+ { body: { version } }
7464
+ );
7465
+ }
7466
+ /**
7467
+ * Delete a destination. Final: the history keeps who, when and which
7468
+ * fields, never a value.
7469
+ *
7470
+ * `DELETE /payout-destinations/me/{destinationId}?version=`
7471
+ */
7472
+ async deleteMine(destinationId, version) {
7473
+ await this.request("DELETE", `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {
7474
+ query: { version }
7475
+ });
7476
+ }
7477
+ /**
7478
+ * One's own destination in plain text. Recorded in the history first.
7479
+ *
7480
+ * `POST /payout-destinations/me/{destinationId}/reveal`
7481
+ */
7482
+ async revealMine(destinationId) {
7483
+ return this.request(
7484
+ "POST",
7485
+ `/payout-destinations/me/${encodeURIComponent(destinationId)}/reveal`
7486
+ );
7487
+ }
7488
+ /**
7489
+ * The methods offered to the caller.
7490
+ *
7491
+ * `GET /payout-destinations/methods`
7492
+ */
7493
+ async offeredMethods() {
7494
+ return this.request("GET", "/payout-destinations/methods");
7495
+ }
7496
+ /**
7497
+ * The merchant's list and, with `shop_id`, one shop's. A shop role reads
7498
+ * its own shop only.
7499
+ *
7500
+ * `GET /payout-destinations/methods/settings`
7501
+ */
7502
+ async retrieveMethodsSettings(params) {
7503
+ return this.request("GET", "/payout-destinations/methods/settings", {
7504
+ query: params
7505
+ });
7506
+ }
7507
+ /**
7508
+ * Set the methods offered at the merchant or at one shop.
7509
+ *
7510
+ * `PUT /payout-destinations/methods/settings`
7511
+ */
7512
+ async updateMethodsSettings(params) {
7513
+ return this.request("PUT", "/payout-destinations/methods/settings", { body: params });
7514
+ }
7515
+ /**
7516
+ * The team's destinations the caller manages, masked: every member for a
7517
+ * merchant-level role, the members reaching the caller's shop for a shop
7518
+ * role.
7519
+ *
7520
+ * `GET /payout-destinations`
7521
+ */
7522
+ async listTeam(params) {
7523
+ return this.request("GET", "/payout-destinations", { query: params });
7524
+ }
7525
+ /**
7526
+ * A managed member's destination in plain text. Recorded in the history
7527
+ * first.
7528
+ *
7529
+ * `POST /payout-destinations/{destinationId}/reveal`
7530
+ */
7531
+ async revealTeam(destinationId) {
7532
+ return this.request("POST", `/payout-destinations/${encodeURIComponent(destinationId)}/reveal`);
7533
+ }
7534
+ /**
7535
+ * Confirm a changed destination was seen, at the version read.
7536
+ *
7537
+ * `POST /payout-destinations/{destinationId}/acknowledge`
7538
+ */
7539
+ async acknowledgeTeam(destinationId, version) {
7540
+ return this.request(
7541
+ "POST",
7542
+ `/payout-destinations/${encodeURIComponent(destinationId)}/acknowledge`,
7543
+ { body: { version } }
7544
+ );
7545
+ }
7546
+ /**
7547
+ * Link a revenue-share holder to a team member, or unlink it (`null`). The
7548
+ * member must be an active member of the merchant whose role reads Payouts.
7549
+ *
7550
+ * `PUT /revenue-shares/holders/{holderId}/member`
7551
+ */
7552
+ async linkRevenueShareHolder(holderId, userId) {
7553
+ return this.request("PUT", `/revenue-shares/holders/${encodeURIComponent(holderId)}/member`, {
7554
+ body: { user_id: userId }
7555
+ });
7556
+ }
7557
+ /**
7558
+ * The share terms of the holders linked to the caller. Read-only.
7559
+ *
7560
+ * `GET /revenue-shares/mine`
7561
+ */
7562
+ async listMyRevenueShares() {
7563
+ return this.request("GET", "/revenue-shares/mine");
7564
+ }
7565
+ };
7566
+
7423
7567
  // src/resources/checkoutTemplates.ts
7424
7568
  var CheckoutTemplates = class {
7425
7569
  constructor(request) {
@@ -11517,6 +11661,7 @@ var Delopay = class {
11517
11661
  this.persons = new Persons(request);
11518
11662
  this.shopLabels = new ShopLabels(request);
11519
11663
  this.industries = new Industries(request);
11664
+ this.payoutDestinations = new PayoutDestinations(request);
11520
11665
  this.checkoutTemplates = new CheckoutTemplates(request);
11521
11666
  this.buyerConversations = new BuyerConversations(request);
11522
11667
  this.buyerEvidence = new BuyerEvidenceReviews(request);
@@ -17530,6 +17675,7 @@ export {
17530
17675
  Persons,
17531
17676
  ShopLabels,
17532
17677
  Industries,
17678
+ PayoutDestinations,
17533
17679
  CheckoutTemplates,
17534
17680
  BuyerConversations,
17535
17681
  BuyerEvidenceReviews,
@@ -17810,4 +17956,4 @@ export {
17810
17956
  decodeNativePanes,
17811
17957
  encodeNativePanes
17812
17958
  };
17813
- //# sourceMappingURL=chunk-BI74VQSZ.js.map
17959
+ //# sourceMappingURL=chunk-AZRXI3FB.js.map