@delopay/sdk 0.291.0 → 0.294.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/index.cjs CHANGED
@@ -3560,6 +3560,33 @@ var Profiles = class {
3560
3560
  constructor(request) {
3561
3561
  this.request = request;
3562
3562
  }
3563
+ /**
3564
+ * Hide a shop from ordinary navigation. Its identity, project membership,
3565
+ * settings and retained records remain unchanged. Requires shop write access.
3566
+ * Repeating the same state is safe; use restore() to make it visible again.
3567
+ */
3568
+ async archive(accountId, profileId) {
3569
+ return this.request(
3570
+ "PUT",
3571
+ `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/archive`,
3572
+ { body: { is_archived: true } }
3573
+ );
3574
+ }
3575
+ /** Restore an archived shop to navigation with the same identity and project. */
3576
+ async restore(accountId, profileId) {
3577
+ return this.request(
3578
+ "PUT",
3579
+ `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/archive`,
3580
+ { body: { is_archived: false } }
3581
+ );
3582
+ }
3583
+ /** Archived shop identities in the caller's merchant and shop-read scope. */
3584
+ async listArchived(accountId) {
3585
+ return this.request(
3586
+ "GET",
3587
+ `/account/${encodeURIComponent(accountId)}/business-profile/archived`
3588
+ );
3589
+ }
3563
3590
  async create(accountId, params) {
3564
3591
  return this.request("POST", `/account/${encodeURIComponent(accountId)}/business-profile`, {
3565
3592
  body: params
@@ -5294,6 +5321,52 @@ var Users = class {
5294
5321
  async getTeamMemberDetails(userId) {
5295
5322
  return this.request("GET", `/user/employees/${encodeURIComponent(userId)}/details`);
5296
5323
  }
5324
+ /**
5325
+ * Supplied contacts and internal notes for a visible member in the current
5326
+ * merchant. Requires a session JWT and Users read permission. The returned
5327
+ * revision is required even for the first write; can_edit states write access.
5328
+ * An unknown or invisible member is refused with the same 404 UR_68 response.
5329
+ */
5330
+ async getTeamMemberContactProfile(userId) {
5331
+ return this.request("GET", `/user/employees/${encodeURIComponent(userId)}/contact-profile`);
5332
+ }
5333
+ /**
5334
+ * Replace the supplied contacts, preserving notes and login/recovery identity.
5335
+ * Omitted optional contact fields are cleared. Requires Users write permission
5336
+ * and authority over the whole member. Send the exact last-read revision.
5337
+ * On a changed refusal, keep the draft and read again before resubmitting.
5338
+ * Structured UR_68 data is a TeamMemberRefusal with reason contact_profile.
5339
+ */
5340
+ async updateTeamMemberContacts(userId, params) {
5341
+ return this.request("PUT", `/user/employees/${encodeURIComponent(userId)}/contact-profile`, {
5342
+ body: params
5343
+ });
5344
+ }
5345
+ /** Create a plain-text note with server-authored attribution; requires the current revision. */
5346
+ async createTeamMemberNote(userId, params) {
5347
+ return this.request("POST", `/user/employees/${encodeURIComponent(userId)}/notes`, {
5348
+ body: params
5349
+ });
5350
+ }
5351
+ /** Edit one note, retaining its original author and creation time. Uses the same write scope. */
5352
+ async updateTeamMemberNote(userId, noteId, params) {
5353
+ return this.request(
5354
+ "PUT",
5355
+ `/user/employees/${encodeURIComponent(userId)}/notes/${encodeURIComponent(noteId)}`,
5356
+ { body: params }
5357
+ );
5358
+ }
5359
+ /**
5360
+ * Delete only the named member note. The exact profile revision is sent in the
5361
+ * query; contacts and all other notes remain. Returns the new profile revision.
5362
+ */
5363
+ async deleteTeamMemberNote(userId, noteId, params) {
5364
+ return this.request(
5365
+ "DELETE",
5366
+ `/user/employees/${encodeURIComponent(userId)}/notes/${encodeURIComponent(noteId)}`,
5367
+ { query: { expected_revision: params.expected_revision } }
5368
+ );
5369
+ }
5297
5370
  /**
5298
5371
  * Replace a team member's password with a temporary one, returned once.
5299
5372
  * `POST /user/employees/{user_id}/reset-password`
@@ -5716,6 +5789,80 @@ var IdentityVerifications = class {
5716
5789
  { body: params, ...options }
5717
5790
  );
5718
5791
  }
5792
+ /**
5793
+ * A refund's screening by the transaction monitoring of the shop's
5794
+ * screening account, for a provider that screens refunds. Recorded only: it
5795
+ * never holds or reverses the refund. Answers 404 when the refund has no
5796
+ * screening. Needs permission to read payments.
5797
+ *
5798
+ * `GET /identity-verifications/refund-screenings/{refund_id}`
5799
+ */
5800
+ async refundScreening(refundId, options) {
5801
+ return this.request(
5802
+ "GET",
5803
+ `/identity-verifications/refund-screenings/${encodeURIComponent(refundId)}`,
5804
+ options
5805
+ );
5806
+ }
5807
+ /**
5808
+ * A payout's screening by the transaction monitoring of the shop's
5809
+ * screening account, for a provider that screens payouts. Recorded only: it
5810
+ * never holds or reverses the payout. Answers 404 when the payout has no
5811
+ * screening. Needs permission to read payments.
5812
+ *
5813
+ * `GET /identity-verifications/payout-screenings/{payout_id}`
5814
+ */
5815
+ async payoutScreening(payoutId, options) {
5816
+ return this.request(
5817
+ "GET",
5818
+ `/identity-verifications/payout-screenings/${encodeURIComponent(payoutId)}`,
5819
+ options
5820
+ );
5821
+ }
5822
+ /**
5823
+ * Whether an account assesses its shop's checkout devices. Needs permission
5824
+ * to read connectors.
5825
+ *
5826
+ * `GET /identity-verifications/accounts/{merchant_connector_id}/device-intelligence`
5827
+ */
5828
+ async deviceIntelligenceSetting(merchantConnectorId, options) {
5829
+ return this.request(
5830
+ "GET",
5831
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/device-intelligence`,
5832
+ options
5833
+ );
5834
+ }
5835
+ /**
5836
+ * Switch device intelligence of the account's shop. Switched on, every
5837
+ * checkout of the shop assesses the buyer's device and records the
5838
+ * provider's signal on the payment; it never holds or refuses a payment.
5839
+ * Switching on is refused when the provider has not switched the feature on
5840
+ * for the account. A shop has at most one device intelligence account.
5841
+ * Needs permission to edit connectors.
5842
+ *
5843
+ * `PUT /identity-verifications/accounts/{merchant_connector_id}/device-intelligence`
5844
+ */
5845
+ async updateDeviceIntelligenceSetting(merchantConnectorId, params, options) {
5846
+ return this.request(
5847
+ "PUT",
5848
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/device-intelligence`,
5849
+ { body: params, ...options }
5850
+ );
5851
+ }
5852
+ /**
5853
+ * A payment's device signal from its checkout's device assessment. Recorded
5854
+ * only: it never holds or refuses the payment. Answers 404 when the payment's
5855
+ * checkout was not assessed. Needs permission to read payments.
5856
+ *
5857
+ * `GET /identity-verifications/device-signals/{payment_id}`
5858
+ */
5859
+ async deviceSignal(paymentId, options) {
5860
+ return this.request(
5861
+ "GET",
5862
+ `/identity-verifications/device-signals/${encodeURIComponent(paymentId)}`,
5863
+ options
5864
+ );
5865
+ }
5719
5866
  };
5720
5867
 
5721
5868
  // src/resources/webhooks.ts
@@ -14655,6 +14802,35 @@ var CheckoutSession = class {
14655
14802
  headers: this.bearerHeaders(options?.headers)
14656
14803
  });
14657
14804
  }
14805
+ /**
14806
+ * Start the device assessment of the payment's checkout. `required` is
14807
+ * `false` when the shop assesses no devices, the payment's device is already
14808
+ * assessed, or the provider cannot start a session: go on without it. Run
14809
+ * the named `library` with the `token`, then call
14810
+ * {@link CheckoutSession.completeDeviceSession}.
14811
+ *
14812
+ * `POST /payment-link/{merchantId}/{paymentId}/device-session`
14813
+ */
14814
+ async startDeviceSession(options) {
14815
+ return this.client.request("POST", `${this.linkBase}/device-session`, {
14816
+ ...options,
14817
+ headers: this.bearerHeaders(options?.headers)
14818
+ });
14819
+ }
14820
+ /**
14821
+ * Report the device assessment finished. The router records it with the
14822
+ * provider and stores the signal on the payment. Refused with `400` when the
14823
+ * session and token are not the payment's pending ones.
14824
+ *
14825
+ * `POST /payment-link/{merchantId}/{paymentId}/device-session/complete`
14826
+ */
14827
+ async completeDeviceSession(params, options) {
14828
+ await this.client.request("POST", `${this.linkBase}/device-session/complete`, {
14829
+ body: params,
14830
+ ...options,
14831
+ headers: this.bearerHeaders(options?.headers)
14832
+ });
14833
+ }
14658
14834
  /**
14659
14835
  * Ask whether NomuPay's COPYandPAY widget may submit a card, from the
14660
14836
  * form's pre-submit hook.