@delopay/sdk 0.393.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.
package/dist/internal.cjs CHANGED
@@ -154,6 +154,7 @@ __export(internal_exports, {
154
154
  PAYPAL_CARD_LAYOUTS: () => PAYPAL_CARD_LAYOUTS,
155
155
  PAYPAL_LABEL_STYLES: () => PAYPAL_LABEL_STYLES,
156
156
  PRESENTATION_CONTRACT_VERSION: () => PRESENTATION_CONTRACT_VERSION,
157
+ PayoutDestinations: () => PayoutDestinations,
157
158
  PaypalDisputes: () => PaypalDisputes,
158
159
  Persons: () => Persons,
159
160
  PlatformBilling: () => PlatformBilling,
@@ -1461,6 +1462,64 @@ var Connectors = class {
1461
1462
  { body: params }
1462
1463
  );
1463
1464
  }
1465
+ /**
1466
+ * Read how the return addresses of a connector's payment provider name the
1467
+ * merchant, per environment.
1468
+ * `GET /account/{merchantId}/connectors/{connectorId}/return-address`
1469
+ *
1470
+ * A return address is where the provider sends the buyer back after a step
1471
+ * it hosts. It belongs to the merchant, the provider and the environment,
1472
+ * so every connector account of that provider follows it.
1473
+ */
1474
+ async getReturnAddress(merchantId, connectorId) {
1475
+ return this.request(
1476
+ "GET",
1477
+ `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`
1478
+ );
1479
+ }
1480
+ /**
1481
+ * Validate a proposed return address without saving it.
1482
+ * `POST /account/{merchantId}/connectors/{connectorId}/return-address/preview`
1483
+ *
1484
+ * Nothing is reserved: a generated identifier in the answer is an example.
1485
+ * Needs the same permission as saving.
1486
+ *
1487
+ * @example
1488
+ * ```typescript
1489
+ * const preview = await delopay.connectors.previewReturnAddress('mer_abc', 'mca_xyz', {
1490
+ * environment: 'live',
1491
+ * mode: 'anonymous',
1492
+ * share_webhook_identifier: true,
1493
+ * });
1494
+ * if (!preview.valid) console.warn(preview.errors);
1495
+ * ```
1496
+ */
1497
+ async previewReturnAddress(merchantId, connectorId, params) {
1498
+ return this.request(
1499
+ "POST",
1500
+ `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address/preview`,
1501
+ { body: params }
1502
+ );
1503
+ }
1504
+ /**
1505
+ * Save the return address of a connector's payment provider for one
1506
+ * environment.
1507
+ * `PUT /account/{merchantId}/connectors/{connectorId}/return-address`
1508
+ *
1509
+ * Payments started afterwards get return addresses of the new form; every
1510
+ * address already handed to the provider keeps working. A refused proposal
1511
+ * answers 422 with error code `IR_06` and the message
1512
+ * `Return address refused: field:code,…`. A caller who may not edit every
1513
+ * connector account of the provider answers 403. Address changes are
1514
+ * limited per provider and environment (`rate_limit`).
1515
+ */
1516
+ async updateReturnAddress(merchantId, connectorId, params) {
1517
+ return this.request(
1518
+ "PUT",
1519
+ `/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,
1520
+ { body: params }
1521
+ );
1522
+ }
1464
1523
  /**
1465
1524
  * Every webhook the connector's payment provider lists for its credentials
1466
1525
  * in one environment: Delopay's own, other connector accounts', former
@@ -3152,6 +3211,23 @@ var Payments = class {
3152
3211
  async buyerRisk(paymentId, options) {
3153
3212
  return this.request("GET", `/payments/${encodeURIComponent(paymentId)}/buyer-risk`, options);
3154
3213
  }
3214
+ /**
3215
+ * Lift the holds put on an authorized payment when a chargeback prevention
3216
+ * alert or an AML hit on the same buyer arrived after it was scored and the
3217
+ * shop's `buyer_risk_source_changes` setting asked to hold it. Until then a
3218
+ * capture is refused with `IR_16`; after the release the payment can be
3219
+ * captured or cancelled as usual. A payment with no hold answers an empty
3220
+ * list. A caller scoped to one shop releases only that shop's payments.
3221
+ *
3222
+ * `POST /payments/{paymentId}/buyer-risk/release`
3223
+ */
3224
+ async releaseBuyerRiskHold(paymentId, options) {
3225
+ return this.request(
3226
+ "POST",
3227
+ `/payments/${encodeURIComponent(paymentId)}/buyer-risk/release`,
3228
+ options
3229
+ );
3230
+ }
3155
3231
  /**
3156
3232
  * What the payment's checkout client was, for AI shopping agents: a
3157
3233
  * verified agent (with its operator, protocol and key), an agent signature
@@ -5915,6 +5991,56 @@ var Users = class {
5915
5991
  body: params
5916
5992
  });
5917
5993
  }
5994
+ /**
5995
+ * One team member's sign-in history: successes and failures with method,
5996
+ * address, location and device, filtered, sorted and paged as
5997
+ * `listLoginActivity` is. `GET /user/employees/{user_id}/login-activity`
5998
+ *
5999
+ * Needs the *Users* write permission. Answers only for a member
6000
+ * `listUsersInLineage` shows you; any other id is a 404 `UR_68` with
6001
+ * `data.reason: 'member_not_found'`. Sign-ins belong to the account, so
6002
+ * they are shown only for an account wholly in this merchant: refused with
6003
+ * a 400 `UR_68` `member_has_access_elsewhere` for an account that also
6004
+ * holds a role elsewhere, and `member_not_activated` for one that is only
6005
+ * invited. `TeamMemberDetails.can_view_sign_ins` answers the same rule.
6006
+ */
6007
+ async listTeamMemberLoginActivity(userId, params) {
6008
+ const path4 = `/user/employees/${encodeURIComponent(userId)}/login-activity`;
6009
+ if (params === void 0) {
6010
+ return this.request("GET", path4);
6011
+ }
6012
+ return this.request("GET", path4, {
6013
+ query: csvQuery(params, ["event_type", "auth_method"])
6014
+ });
6015
+ }
6016
+ /**
6017
+ * One team member's live sessions: neither signed out nor expired.
6018
+ * `is_current` marks the caller's own session only.
6019
+ * `GET /user/employees/{user_id}/sessions`
6020
+ *
6021
+ * Same permission and refusals as `listTeamMemberLoginActivity`.
6022
+ */
6023
+ async listTeamMemberSessions(userId) {
6024
+ return this.request("GET", `/user/employees/${encodeURIComponent(userId)}/sessions`);
6025
+ }
6026
+ /**
6027
+ * Sign a team member out everywhere: ends every session and token of the
6028
+ * member, at this merchant and at every other merchant the account belongs
6029
+ * to. `POST /user/employees/{user_id}/sessions/revoke-all`
6030
+ *
6031
+ * The account stays active and its password unchanged, so the member can
6032
+ * sign in again at once. Allowed on exactly the members whose password you
6033
+ * may reset with `resetTeamMemberPassword`, and refused with the same
6034
+ * `UR_68` reasons ({@link TeamMemberRefusal}).
6035
+ * `TeamMemberDetails.can_sign_out` answers the same rule. Recorded in the
6036
+ * audit log.
6037
+ */
6038
+ async revokeTeamMemberSessions(userId) {
6039
+ return this.request(
6040
+ "POST",
6041
+ `/user/employees/${encodeURIComponent(userId)}/sessions/revoke-all`
6042
+ );
6043
+ }
5918
6044
  /**
5919
6045
  * Which checkout payment methods a member may change in your merchant.
5920
6046
  * `GET /user/employees/{user_id}/method-access`
@@ -7641,6 +7767,150 @@ function shopPath(profileId) {
7641
7767
  return `/industries/shops/${encodeURIComponent(profileId)}`;
7642
7768
  }
7643
7769
 
7770
+ // src/resources/payoutDestinations.ts
7771
+ var PayoutDestinations = class {
7772
+ constructor(request) {
7773
+ this.request = request;
7774
+ }
7775
+ /**
7776
+ * The caller's own destinations, masked, and the methods offered to them.
7777
+ *
7778
+ * `GET /payout-destinations/me`
7779
+ */
7780
+ async listMine() {
7781
+ return this.request("GET", "/payout-destinations/me");
7782
+ }
7783
+ /**
7784
+ * Save a destination. The method must be offered; at most 20 per member.
7785
+ *
7786
+ * `POST /payout-destinations/me`
7787
+ */
7788
+ async createMine(params) {
7789
+ return this.request("POST", "/payout-destinations/me", { body: params });
7790
+ }
7791
+ /**
7792
+ * Replace a destination's details at the version read.
7793
+ *
7794
+ * `PUT /payout-destinations/me/{destinationId}`
7795
+ */
7796
+ async updateMine(destinationId, params) {
7797
+ return this.request("PUT", `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {
7798
+ body: params
7799
+ });
7800
+ }
7801
+ /**
7802
+ * Make a destination the preferred one; the others lose it.
7803
+ *
7804
+ * `POST /payout-destinations/me/{destinationId}/preferred`
7805
+ */
7806
+ async preferMine(destinationId, version) {
7807
+ return this.request(
7808
+ "POST",
7809
+ `/payout-destinations/me/${encodeURIComponent(destinationId)}/preferred`,
7810
+ { body: { version } }
7811
+ );
7812
+ }
7813
+ /**
7814
+ * Delete a destination. Final: the history keeps who, when and which
7815
+ * fields, never a value.
7816
+ *
7817
+ * `DELETE /payout-destinations/me/{destinationId}?version=`
7818
+ */
7819
+ async deleteMine(destinationId, version) {
7820
+ await this.request("DELETE", `/payout-destinations/me/${encodeURIComponent(destinationId)}`, {
7821
+ query: { version }
7822
+ });
7823
+ }
7824
+ /**
7825
+ * One's own destination in plain text. Recorded in the history first.
7826
+ *
7827
+ * `POST /payout-destinations/me/{destinationId}/reveal`
7828
+ */
7829
+ async revealMine(destinationId) {
7830
+ return this.request(
7831
+ "POST",
7832
+ `/payout-destinations/me/${encodeURIComponent(destinationId)}/reveal`
7833
+ );
7834
+ }
7835
+ /**
7836
+ * The methods offered to the caller.
7837
+ *
7838
+ * `GET /payout-destinations/methods`
7839
+ */
7840
+ async offeredMethods() {
7841
+ return this.request("GET", "/payout-destinations/methods");
7842
+ }
7843
+ /**
7844
+ * The merchant's list and, with `shop_id`, one shop's. A shop role reads
7845
+ * its own shop only.
7846
+ *
7847
+ * `GET /payout-destinations/methods/settings`
7848
+ */
7849
+ async retrieveMethodsSettings(params) {
7850
+ return this.request("GET", "/payout-destinations/methods/settings", {
7851
+ query: params
7852
+ });
7853
+ }
7854
+ /**
7855
+ * Set the methods offered at the merchant or at one shop.
7856
+ *
7857
+ * `PUT /payout-destinations/methods/settings`
7858
+ */
7859
+ async updateMethodsSettings(params) {
7860
+ return this.request("PUT", "/payout-destinations/methods/settings", { body: params });
7861
+ }
7862
+ /**
7863
+ * The team's destinations the caller manages, masked: every member for a
7864
+ * merchant-level role, the members reaching the caller's shop for a shop
7865
+ * role.
7866
+ *
7867
+ * `GET /payout-destinations`
7868
+ */
7869
+ async listTeam(params) {
7870
+ return this.request("GET", "/payout-destinations", { query: params });
7871
+ }
7872
+ /**
7873
+ * A managed member's destination in plain text. Recorded in the history
7874
+ * first.
7875
+ *
7876
+ * `POST /payout-destinations/{destinationId}/reveal`
7877
+ */
7878
+ async revealTeam(destinationId) {
7879
+ return this.request("POST", `/payout-destinations/${encodeURIComponent(destinationId)}/reveal`);
7880
+ }
7881
+ /**
7882
+ * Confirm a changed destination was seen, at the version read.
7883
+ *
7884
+ * `POST /payout-destinations/{destinationId}/acknowledge`
7885
+ */
7886
+ async acknowledgeTeam(destinationId, version) {
7887
+ return this.request(
7888
+ "POST",
7889
+ `/payout-destinations/${encodeURIComponent(destinationId)}/acknowledge`,
7890
+ { body: { version } }
7891
+ );
7892
+ }
7893
+ /**
7894
+ * Link a revenue-share holder to a team member, or unlink it (`null`). The
7895
+ * member must be an active member of the merchant whose role reads Payouts.
7896
+ *
7897
+ * `PUT /revenue-shares/holders/{holderId}/member`
7898
+ */
7899
+ async linkRevenueShareHolder(holderId, userId) {
7900
+ return this.request("PUT", `/revenue-shares/holders/${encodeURIComponent(holderId)}/member`, {
7901
+ body: { user_id: userId }
7902
+ });
7903
+ }
7904
+ /**
7905
+ * The share terms of the holders linked to the caller. Read-only.
7906
+ *
7907
+ * `GET /revenue-shares/mine`
7908
+ */
7909
+ async listMyRevenueShares() {
7910
+ return this.request("GET", "/revenue-shares/mine");
7911
+ }
7912
+ };
7913
+
7644
7914
  // src/resources/checkoutTemplates.ts
7645
7915
  var CheckoutTemplates = class {
7646
7916
  constructor(request) {
@@ -11738,6 +12008,7 @@ var Delopay = class {
11738
12008
  this.persons = new Persons(request);
11739
12009
  this.shopLabels = new ShopLabels(request);
11740
12010
  this.industries = new Industries(request);
12011
+ this.payoutDestinations = new PayoutDestinations(request);
11741
12012
  this.checkoutTemplates = new CheckoutTemplates(request);
11742
12013
  this.buyerConversations = new BuyerConversations(request);
11743
12014
  this.buyerEvidence = new BuyerEvidenceReviews(request);
@@ -18065,10 +18336,29 @@ var AdminPortal = class {
18065
18336
  query
18066
18337
  });
18067
18338
  }
18339
+ /**
18340
+ * Persons of every merchant account, connected accounts included, or of the
18341
+ * one merchant named in `merchant_id`. Each row is one merchant's person
18342
+ * and names that merchant; persons of two merchants are never merged,
18343
+ * whatever they share. `search` is matched at every merchant listed.
18344
+ *
18345
+ * A `limit` outside 1 to 100, a `search` longer than 320 characters, or
18346
+ * `sort_by: 'captured'` without a three-letter `captured_currency` is a
18347
+ * `400`.
18348
+ *
18349
+ * `GET /admin-portal/persons`
18350
+ */
18351
+ async listPersonsAcrossMerchants(params) {
18352
+ if (params === void 0) {
18353
+ return this.request("GET", "/admin-portal/persons");
18354
+ }
18355
+ return this.request("GET", "/admin-portal/persons", { query: params });
18356
+ }
18068
18357
  /**
18069
18358
  * One page of ONE merchant's persons: the same query and response as the
18070
- * merchant-facing `persons.list`, admin-authenticated. Persons are never
18071
- * read across merchants.
18359
+ * merchant-facing `persons.list`, admin-authenticated. A person stays one
18360
+ * merchant's; `listPersonsAcrossMerchants` lists several merchants' side by
18361
+ * side.
18072
18362
  *
18073
18363
  * `GET /admin-portal/persons/{merchantId}`
18074
18364
  */
@@ -18114,6 +18404,97 @@ var AdminPortal = class {
18114
18404
  { query: params }
18115
18405
  );
18116
18406
  }
18407
+ /**
18408
+ * Every staff flag of a person, active and removed, newest first, with
18409
+ * those of the persons merged into it. A merged person reads as the person
18410
+ * it merged into. Staff only; a flag changes no payment.
18411
+ *
18412
+ * `GET /admin-portal/persons/{merchantId}/{personId}/flags`
18413
+ */
18414
+ async listPersonFlags(merchantId, personId) {
18415
+ return this.request("GET", personFlags(merchantId, personId));
18416
+ }
18417
+ /**
18418
+ * Flags a person for staff. The flag changes no payment and the merchant
18419
+ * never sees it. A merged person's flag goes on the person it merged into.
18420
+ * A person already flagged is refused with `IR_38` (400); a staff role that
18421
+ * may not flag buyers gets a `403`.
18422
+ *
18423
+ * `POST /admin-portal/persons/{merchantId}/{personId}/flags`
18424
+ */
18425
+ async flagPerson(merchantId, personId, body) {
18426
+ return this.request("POST", personFlags(merchantId, personId), { body });
18427
+ }
18428
+ /**
18429
+ * Replaces an active flag's reason and note at the `version` read. A
18430
+ * colleague's newer change, or a removal, since that read is refused with
18431
+ * `IR_16` (400) rather than overwritten.
18432
+ *
18433
+ * `PUT /admin-portal/persons/{merchantId}/{personId}/flags/{flagId}`
18434
+ */
18435
+ async updatePersonFlag(merchantId, personId, flagId, body) {
18436
+ return this.request(
18437
+ "PUT",
18438
+ `${personFlags(merchantId, personId)}/${encodeURIComponent(flagId)}`,
18439
+ { body }
18440
+ );
18441
+ }
18442
+ /**
18443
+ * Removes a flag at the `version` read: the flag stops and stays in the
18444
+ * history with who removed it and when, which is what this answers. A
18445
+ * colleague's change since that read is refused with `IR_16` (400).
18446
+ *
18447
+ * `DELETE /admin-portal/persons/{merchantId}/{personId}/flags/{flagId}?version=`
18448
+ */
18449
+ async removePersonFlag(merchantId, personId, flagId, version) {
18450
+ return this.request(
18451
+ "DELETE",
18452
+ `${personFlags(merchantId, personId)}/${encodeURIComponent(flagId)}`,
18453
+ { query: { version } }
18454
+ );
18455
+ }
18456
+ /**
18457
+ * One page of a merchant's persons with an active flag, newest flag first.
18458
+ * A flag on a merged person is listed under the person it merged into, and
18459
+ * a person with two active flags is listed once, with the newer one.
18460
+ *
18461
+ * `GET /admin-portal/persons/{merchantId}/flagged`
18462
+ */
18463
+ async listFlaggedPersons(merchantId, params) {
18464
+ if (params === void 0) {
18465
+ return this.request("GET", `${adminPersons(merchantId)}/flagged`);
18466
+ }
18467
+ return this.request("GET", `${adminPersons(merchantId)}/flagged`, {
18468
+ query: params
18469
+ });
18470
+ }
18471
+ /**
18472
+ * Whether each of 1 to 100 persons of a merchant is flagged, one answer
18473
+ * per asked person in the order asked. A merged person answers for the
18474
+ * person it merged into; an unknown person is not flagged. No id, or more
18475
+ * than 100, is a `400`.
18476
+ *
18477
+ * `GET /admin-portal/persons/{merchantId}/flag-status?person_ids=`
18478
+ */
18479
+ async personFlagStatus(merchantId, personIds) {
18480
+ return this.request("GET", `${adminPersons(merchantId)}/flag-status`, {
18481
+ query: { person_ids: personIds.join(",") }
18482
+ });
18483
+ }
18484
+ /**
18485
+ * Persons flagged by staff at other merchants who share an email address
18486
+ * or a device id with this person's 100 most recent payments, each once,
18487
+ * newest flag first. A card, an IP address or device traits never match.
18488
+ * A hint only: the persons stay separate and nothing is written.
18489
+ *
18490
+ * `GET /admin-portal/persons/{merchantId}/{personId}/flagged-elsewhere`
18491
+ */
18492
+ async listFlaggedElsewhere(merchantId, personId) {
18493
+ return this.request(
18494
+ "GET",
18495
+ `${adminPersons(merchantId)}/${encodeURIComponent(personId)}/flagged-elsewhere`
18496
+ );
18497
+ }
18117
18498
  async exportTransactions(params, options) {
18118
18499
  return runExport(
18119
18500
  this.request,
@@ -18134,7 +18515,8 @@ var AdminPortal = class {
18134
18515
  }
18135
18516
  /**
18136
18517
  * Full detail for a single transaction of ANY merchant — the same
18137
- * `PaymentResponse` the merchant `payments.retrieve` returns. Admin-scoped:
18518
+ * `PaymentResponse` the merchant `payments.retrieve` returns, with what only
18519
+ * staff see beside it (`person_flagged`, `flagged_elsewhere`). Admin-scoped:
18138
18520
  * the JWT (or admin API key) does not need to belong to the payment's
18139
18521
  * merchant; the backend resolves the owning merchant and reads it read-only
18140
18522
  * (no connector sync).
@@ -18608,6 +18990,31 @@ var AdminPortal = class {
18608
18990
  query: params
18609
18991
  });
18610
18992
  }
18993
+ /**
18994
+ * How accurate buyer risk scores were in a period, against what later
18995
+ * happened to the payments: fraud, clean, pending and never charged, how
18996
+ * well the flagged bands caught the fraud, each band and signal, and the
18997
+ * buyers the score stopped who later paid with no fraud. Stores nothing.
18998
+ * `GET /admin-portal/buyer-risk/accuracy`
18999
+ */
19000
+ async buyerRiskAccuracy(params = {}) {
19001
+ return this.request("GET", "/admin-portal/buyer-risk/accuracy", {
19002
+ query: params
19003
+ });
19004
+ }
19005
+ /**
19006
+ * The payments behind one number of {@link AdminPortal.buyerRiskAccuracy}:
19007
+ * the payments a signal fired on, those in a band, a flagged × outcome cell,
19008
+ * the interventions or the false declines. Paged, sorted and searchable
19009
+ * like the analytics drills, and answered in the same shape, with each
19010
+ * row's band, score, outcome and applied action.
19011
+ * `GET /admin-portal/buyer-risk/accuracy/payments`
19012
+ */
19013
+ async buyerRiskAccuracyPayments(params = {}) {
19014
+ return this.request("GET", "/admin-portal/buyer-risk/accuracy/payments", {
19015
+ query: params
19016
+ });
19017
+ }
18611
19018
  /**
18612
19019
  * Platform billing dashboard: total balance across all ledger accounts (+
18613
19020
  * the net change), top-ups, fees collected, and the day-by-day ledger flow.
@@ -18689,6 +19096,70 @@ var AdminPortal = class {
18689
19096
  async updateUser(userId, body) {
18690
19097
  return this.request("PATCH", `/admin-portal/users/${encodeURIComponent(userId)}`, { body });
18691
19098
  }
19099
+ /**
19100
+ * One user's account and its health: whether it is active and verified,
19101
+ * whether two-factor authentication is set up, when the password last
19102
+ * changed, the linked single sign-on providers, the newest successful and
19103
+ * failed sign-in, when the user was last seen and how many sessions are
19104
+ * live. Lists every membership the user holds in this tenant, invitations
19105
+ * and expired ones included, with its role and status. Never returns a
19106
+ * credential. `GET /admin-portal/users/{user_id}`
19107
+ *
19108
+ * Needs an internal role holding `ProfileUserRead`, or the admin API key.
19109
+ * A user with no membership in this tenant is a `404`.
19110
+ */
19111
+ async getUser(userId) {
19112
+ return this.request("GET", `/admin-portal/users/${encodeURIComponent(userId)}`);
19113
+ }
19114
+ /**
19115
+ * One user's sign-in history (successes and failures, method, address,
19116
+ * location and device), filtered, sorted and paged as
19117
+ * `users.listLoginActivity` is. Same access and `404` rule as `getUser`.
19118
+ * `GET /admin-portal/users/{user_id}/login-activity`
19119
+ */
19120
+ async listUserLoginActivity(userId, params) {
19121
+ const path4 = `/admin-portal/users/${encodeURIComponent(userId)}/login-activity`;
19122
+ if (params === void 0) {
19123
+ return this.request("GET", path4);
19124
+ }
19125
+ return this.request("GET", path4, {
19126
+ query: csvQuery(params, ["event_type", "auth_method"])
19127
+ });
19128
+ }
19129
+ /**
19130
+ * One user's live sessions: neither signed out nor expired. `is_current`
19131
+ * marks the caller's own session only, when the caller looks at themselves.
19132
+ * Same access and `404` rule as `getUser`.
19133
+ * `GET /admin-portal/users/{user_id}/sessions`
19134
+ */
19135
+ async listUserSessions(userId) {
19136
+ return this.request("GET", `/admin-portal/users/${encodeURIComponent(userId)}/sessions`);
19137
+ }
19138
+ /**
19139
+ * End one session of the user: its token is refused on its next request.
19140
+ * Needs `UsersManage`. Recorded in the audit log. A session that has
19141
+ * already ended answers `revoked: false` and records nothing. A session of
19142
+ * another user is a `404`, as an unknown id is.
19143
+ * `POST /admin-portal/users/{user_id}/sessions/{session_id}/revoke`
19144
+ */
19145
+ async revokeUserSession(userId, sessionId) {
19146
+ return this.request(
19147
+ "POST",
19148
+ `/admin-portal/users/${encodeURIComponent(userId)}/sessions/${encodeURIComponent(sessionId)}/revoke`
19149
+ );
19150
+ }
19151
+ /**
19152
+ * Sign the user out of every session and token, wherever they signed in.
19153
+ * Needs `UsersManage`. The account stays active and the user can sign in
19154
+ * again at once. Answers how many live sessions were ended. Recorded in the
19155
+ * audit log. `POST /admin-portal/users/{user_id}/sessions/revoke-all`
19156
+ */
19157
+ async revokeAllUserSessions(userId) {
19158
+ return this.request(
19159
+ "POST",
19160
+ `/admin-portal/users/${encodeURIComponent(userId)}/sessions/revoke-all`
19161
+ );
19162
+ }
18692
19163
  /**
18693
19164
  * Which checkout payment methods a member of `merchantId` may change.
18694
19165
  * `GET /admin-portal/accounts/{merchant_id}/members/{user_id}/method-access`
@@ -19337,6 +19808,9 @@ function transactionListQuery(params) {
19337
19808
  function adminPersons(merchantId) {
19338
19809
  return `/admin-portal/persons/${encodeURIComponent(merchantId)}`;
19339
19810
  }
19811
+ function personFlags(merchantId, personId) {
19812
+ return `${adminPersons(merchantId)}/${encodeURIComponent(personId)}/flags`;
19813
+ }
19340
19814
  function adminAccount(merchantId) {
19341
19815
  return `/admin-portal/accounts/${encodeURIComponent(merchantId)}`;
19342
19816
  }
@@ -20359,6 +20833,7 @@ var DelopayInternal = class extends Delopay {
20359
20833
  PAYPAL_CARD_LAYOUTS,
20360
20834
  PAYPAL_LABEL_STYLES,
20361
20835
  PRESENTATION_CONTRACT_VERSION,
20836
+ PayoutDestinations,
20362
20837
  PaypalDisputes,
20363
20838
  Persons,
20364
20839
  PlatformBilling,