@delopay/sdk 0.292.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/internal.cjs CHANGED
@@ -3578,6 +3578,33 @@ var Profiles = class {
3578
3578
  constructor(request) {
3579
3579
  this.request = request;
3580
3580
  }
3581
+ /**
3582
+ * Hide a shop from ordinary navigation. Its identity, project membership,
3583
+ * settings and retained records remain unchanged. Requires shop write access.
3584
+ * Repeating the same state is safe; use restore() to make it visible again.
3585
+ */
3586
+ async archive(accountId, profileId) {
3587
+ return this.request(
3588
+ "PUT",
3589
+ `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/archive`,
3590
+ { body: { is_archived: true } }
3591
+ );
3592
+ }
3593
+ /** Restore an archived shop to navigation with the same identity and project. */
3594
+ async restore(accountId, profileId) {
3595
+ return this.request(
3596
+ "PUT",
3597
+ `/account/${encodeURIComponent(accountId)}/business-profile/${encodeURIComponent(profileId)}/archive`,
3598
+ { body: { is_archived: false } }
3599
+ );
3600
+ }
3601
+ /** Archived shop identities in the caller's merchant and shop-read scope. */
3602
+ async listArchived(accountId) {
3603
+ return this.request(
3604
+ "GET",
3605
+ `/account/${encodeURIComponent(accountId)}/business-profile/archived`
3606
+ );
3607
+ }
3581
3608
  async create(accountId, params) {
3582
3609
  return this.request("POST", `/account/${encodeURIComponent(accountId)}/business-profile`, {
3583
3610
  body: params
@@ -5312,6 +5339,52 @@ var Users = class {
5312
5339
  async getTeamMemberDetails(userId) {
5313
5340
  return this.request("GET", `/user/employees/${encodeURIComponent(userId)}/details`);
5314
5341
  }
5342
+ /**
5343
+ * Supplied contacts and internal notes for a visible member in the current
5344
+ * merchant. Requires a session JWT and Users read permission. The returned
5345
+ * revision is required even for the first write; can_edit states write access.
5346
+ * An unknown or invisible member is refused with the same 404 UR_68 response.
5347
+ */
5348
+ async getTeamMemberContactProfile(userId) {
5349
+ return this.request("GET", `/user/employees/${encodeURIComponent(userId)}/contact-profile`);
5350
+ }
5351
+ /**
5352
+ * Replace the supplied contacts, preserving notes and login/recovery identity.
5353
+ * Omitted optional contact fields are cleared. Requires Users write permission
5354
+ * and authority over the whole member. Send the exact last-read revision.
5355
+ * On a changed refusal, keep the draft and read again before resubmitting.
5356
+ * Structured UR_68 data is a TeamMemberRefusal with reason contact_profile.
5357
+ */
5358
+ async updateTeamMemberContacts(userId, params) {
5359
+ return this.request("PUT", `/user/employees/${encodeURIComponent(userId)}/contact-profile`, {
5360
+ body: params
5361
+ });
5362
+ }
5363
+ /** Create a plain-text note with server-authored attribution; requires the current revision. */
5364
+ async createTeamMemberNote(userId, params) {
5365
+ return this.request("POST", `/user/employees/${encodeURIComponent(userId)}/notes`, {
5366
+ body: params
5367
+ });
5368
+ }
5369
+ /** Edit one note, retaining its original author and creation time. Uses the same write scope. */
5370
+ async updateTeamMemberNote(userId, noteId, params) {
5371
+ return this.request(
5372
+ "PUT",
5373
+ `/user/employees/${encodeURIComponent(userId)}/notes/${encodeURIComponent(noteId)}`,
5374
+ { body: params }
5375
+ );
5376
+ }
5377
+ /**
5378
+ * Delete only the named member note. The exact profile revision is sent in the
5379
+ * query; contacts and all other notes remain. Returns the new profile revision.
5380
+ */
5381
+ async deleteTeamMemberNote(userId, noteId, params) {
5382
+ return this.request(
5383
+ "DELETE",
5384
+ `/user/employees/${encodeURIComponent(userId)}/notes/${encodeURIComponent(noteId)}`,
5385
+ { query: { expected_revision: params.expected_revision } }
5386
+ );
5387
+ }
5315
5388
  /**
5316
5389
  * Replace a team member's password with a temporary one, returned once.
5317
5390
  * `POST /user/employees/{user_id}/reset-password`
@@ -5734,6 +5807,80 @@ var IdentityVerifications = class {
5734
5807
  { body: params, ...options }
5735
5808
  );
5736
5809
  }
5810
+ /**
5811
+ * A refund's screening by the transaction monitoring of the shop's
5812
+ * screening account, for a provider that screens refunds. Recorded only: it
5813
+ * never holds or reverses the refund. Answers 404 when the refund has no
5814
+ * screening. Needs permission to read payments.
5815
+ *
5816
+ * `GET /identity-verifications/refund-screenings/{refund_id}`
5817
+ */
5818
+ async refundScreening(refundId, options) {
5819
+ return this.request(
5820
+ "GET",
5821
+ `/identity-verifications/refund-screenings/${encodeURIComponent(refundId)}`,
5822
+ options
5823
+ );
5824
+ }
5825
+ /**
5826
+ * A payout's screening by the transaction monitoring of the shop's
5827
+ * screening account, for a provider that screens payouts. Recorded only: it
5828
+ * never holds or reverses the payout. Answers 404 when the payout has no
5829
+ * screening. Needs permission to read payments.
5830
+ *
5831
+ * `GET /identity-verifications/payout-screenings/{payout_id}`
5832
+ */
5833
+ async payoutScreening(payoutId, options) {
5834
+ return this.request(
5835
+ "GET",
5836
+ `/identity-verifications/payout-screenings/${encodeURIComponent(payoutId)}`,
5837
+ options
5838
+ );
5839
+ }
5840
+ /**
5841
+ * Whether an account assesses its shop's checkout devices. Needs permission
5842
+ * to read connectors.
5843
+ *
5844
+ * `GET /identity-verifications/accounts/{merchant_connector_id}/device-intelligence`
5845
+ */
5846
+ async deviceIntelligenceSetting(merchantConnectorId, options) {
5847
+ return this.request(
5848
+ "GET",
5849
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/device-intelligence`,
5850
+ options
5851
+ );
5852
+ }
5853
+ /**
5854
+ * Switch device intelligence of the account's shop. Switched on, every
5855
+ * checkout of the shop assesses the buyer's device and records the
5856
+ * provider's signal on the payment; it never holds or refuses a payment.
5857
+ * Switching on is refused when the provider has not switched the feature on
5858
+ * for the account. A shop has at most one device intelligence account.
5859
+ * Needs permission to edit connectors.
5860
+ *
5861
+ * `PUT /identity-verifications/accounts/{merchant_connector_id}/device-intelligence`
5862
+ */
5863
+ async updateDeviceIntelligenceSetting(merchantConnectorId, params, options) {
5864
+ return this.request(
5865
+ "PUT",
5866
+ `/identity-verifications/accounts/${encodeURIComponent(merchantConnectorId)}/device-intelligence`,
5867
+ { body: params, ...options }
5868
+ );
5869
+ }
5870
+ /**
5871
+ * A payment's device signal from its checkout's device assessment. Recorded
5872
+ * only: it never holds or refuses the payment. Answers 404 when the payment's
5873
+ * checkout was not assessed. Needs permission to read payments.
5874
+ *
5875
+ * `GET /identity-verifications/device-signals/{payment_id}`
5876
+ */
5877
+ async deviceSignal(paymentId, options) {
5878
+ return this.request(
5879
+ "GET",
5880
+ `/identity-verifications/device-signals/${encodeURIComponent(paymentId)}`,
5881
+ options
5882
+ );
5883
+ }
5737
5884
  };
5738
5885
 
5739
5886
  // src/resources/webhooks.ts
@@ -14673,6 +14820,35 @@ var CheckoutSession = class {
14673
14820
  headers: this.bearerHeaders(options?.headers)
14674
14821
  });
14675
14822
  }
14823
+ /**
14824
+ * Start the device assessment of the payment's checkout. `required` is
14825
+ * `false` when the shop assesses no devices, the payment's device is already
14826
+ * assessed, or the provider cannot start a session: go on without it. Run
14827
+ * the named `library` with the `token`, then call
14828
+ * {@link CheckoutSession.completeDeviceSession}.
14829
+ *
14830
+ * `POST /payment-link/{merchantId}/{paymentId}/device-session`
14831
+ */
14832
+ async startDeviceSession(options) {
14833
+ return this.client.request("POST", `${this.linkBase}/device-session`, {
14834
+ ...options,
14835
+ headers: this.bearerHeaders(options?.headers)
14836
+ });
14837
+ }
14838
+ /**
14839
+ * Report the device assessment finished. The router records it with the
14840
+ * provider and stores the signal on the payment. Refused with `400` when the
14841
+ * session and token are not the payment's pending ones.
14842
+ *
14843
+ * `POST /payment-link/{merchantId}/{paymentId}/device-session/complete`
14844
+ */
14845
+ async completeDeviceSession(params, options) {
14846
+ await this.client.request("POST", `${this.linkBase}/device-session/complete`, {
14847
+ body: params,
14848
+ ...options,
14849
+ headers: this.bearerHeaders(options?.headers)
14850
+ });
14851
+ }
14676
14852
  /**
14677
14853
  * Ask whether NomuPay's COPYandPAY widget may submit a card, from the
14678
14854
  * form's pre-submit hook.