@delopay/sdk 0.176.0 → 0.178.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.
@@ -819,8 +819,8 @@ var Customers = class {
819
819
  return this.request("DELETE", `/customers/${encodeURIComponent(customerId)}`);
820
820
  }
821
821
  /**
822
- * List customers, optionally filtered by email, shop (`profile_id`), or
823
- * project (`project_id`).
822
+ * List customers, optionally filtered by customer id/name/email prefix,
823
+ * shop (`profile_id`), or project (`project_id`).
824
824
  *
825
825
  * @param params - Optional filter and pagination parameters.
826
826
  * @returns Array of customer objects.
@@ -3731,7 +3731,8 @@ var Users = class {
3731
3731
  return this.request("GET", `/user/preferences/${encodeURIComponent(key)}`);
3732
3732
  }
3733
3733
  /**
3734
- * Atomically replace one own preference (last write wins). The JSON object is
3734
+ * Save one own preference: omitted/false if_absent replaces it (last write wins);
3735
+ * true preserves an existing object and returns the winner. The JSON object is
3735
3736
  * limited to 16 KiB of compact UTF-8 JSON. For layouts, use one namespaced key
3736
3737
  * per page (e.g. merchant.analytics.payments) and ordered widget IDs per region,
3737
3738
  * without titles, fetched metrics or rendered state. Requires a login JWT.
@@ -3739,7 +3740,25 @@ var Users = class {
3739
3740
  async setPreference(key, params) {
3740
3741
  return this.request("PUT", `/user/preferences/${encodeURIComponent(key)}`, { body: params });
3741
3742
  }
3742
- /** Reset an own preference to defaults. Idempotent; returns value null. Login JWT only. */
3743
+ /**
3744
+ * Initialize only a missing preference. Existing objects, including a client
3745
+ * reset marker saved with setPreference (for example { reset: true }), win. Render/cache the returned value, which may differ from
3746
+ * the proposed value. Safe for migration retries after a lost response.
3747
+ * Explicit edits and reset markers use setPreference with no if_absent flag.
3748
+ * DELETE removes the key; it leaves no marker and permits initialization again.
3749
+ * Requires a login JWT and the same key/object limits as setPreference.
3750
+ */
3751
+ async initializePreference(key, value) {
3752
+ return this.request("PUT", `/user/preferences/${encodeURIComponent(key)}`, {
3753
+ body: { value, if_absent: true }
3754
+ });
3755
+ }
3756
+ /**
3757
+ * Remove an own preference. Idempotent; returns value null, without storing a
3758
+ * tombstone. Later initialization may import a value again. To suppress legacy
3759
+ * migration after a reset, save a client reset-marker object with setPreference.
3760
+ * Login JWT only.
3761
+ */
3743
3762
  async deletePreference(key) {
3744
3763
  return this.request("DELETE", `/user/preferences/${encodeURIComponent(key)}`);
3745
3764
  }
@@ -10268,4 +10287,4 @@ export {
10268
10287
  decodeNativePanes,
10269
10288
  encodeNativePanes
10270
10289
  };
10271
- //# sourceMappingURL=chunk-OBEPMMEL.js.map
10290
+ //# sourceMappingURL=chunk-ZMQAKTXQ.js.map