@delopay/sdk 0.172.0 → 0.175.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.
@@ -3721,6 +3721,28 @@ var Users = class {
3721
3721
  async update(params) {
3722
3722
  return this.request("POST", "/user/update", { body: params });
3723
3723
  }
3724
+ /**
3725
+ * Read a preference owned by the logged-in user. Missing keys return value null.
3726
+ * Works in both dashboards with a login JWT; API keys and impersonation are rejected.
3727
+ * Keys contain 1–128 ASCII letters, digits, dots, underscores or hyphens.
3728
+ * Unknown widget IDs and their order are preserved; consumers choose what to render.
3729
+ */
3730
+ async getPreference(key) {
3731
+ return this.request("GET", `/user/preferences/${encodeURIComponent(key)}`);
3732
+ }
3733
+ /**
3734
+ * Atomically replace one own preference (last write wins). The JSON object is
3735
+ * limited to 16 KiB of compact UTF-8 JSON. For layouts, use one namespaced key
3736
+ * per page (e.g. merchant.analytics.payments) and ordered widget IDs per region,
3737
+ * without titles, fetched metrics or rendered state. Requires a login JWT.
3738
+ */
3739
+ async setPreference(key, params) {
3740
+ return this.request("PUT", `/user/preferences/${encodeURIComponent(key)}`, { body: params });
3741
+ }
3742
+ /** Reset an own preference to defaults. Idempotent; returns value null. Login JWT only. */
3743
+ async deletePreference(key) {
3744
+ return this.request("DELETE", `/user/preferences/${encodeURIComponent(key)}`);
3745
+ }
3724
3746
  /**
3725
3747
  * RFC 7396 merge-patch the caller's own user-scoped metadata bucket.
3726
3748
  * Returns the full user details, so callers can refresh their context
@@ -5095,6 +5117,19 @@ var Subscriptions = class {
5095
5117
  async create(params, options) {
5096
5118
  return this.request("POST", "/subscriptions/create", { body: params, ...options });
5097
5119
  }
5120
+ /**
5121
+ * Adopt an existing Creem subscription. `POST /subscriptions/adopt`
5122
+ *
5123
+ * Requires adoption to be enabled on the deployment and `X-Profile-Id` in
5124
+ * options.headers. Adoption charges nothing and emits no invoice or webhook.
5125
+ * Repeating the processor subscription ID returns the existing DeloPay ID.
5126
+ * Retry when handoff_confirmed is false. That flag confirms persistence,
5127
+ * not the merchant's external switch-over: stop processing Creem events in
5128
+ * your own integration when handing subsequent events to DeloPay.
5129
+ */
5130
+ async adopt(params, options) {
5131
+ return this.request("POST", "/subscriptions/adopt", { body: params, ...options });
5132
+ }
5098
5133
  /** Retrieve a subscription by ID. `GET /subscriptions/{subscriptionId}` */
5099
5134
  async retrieve(subscriptionId, options) {
5100
5135
  return this.request("GET", `/subscriptions/${encodeURIComponent(subscriptionId)}`, {
@@ -10204,4 +10239,4 @@ export {
10204
10239
  decodeNativePanes,
10205
10240
  encodeNativePanes
10206
10241
  };
10207
- //# sourceMappingURL=chunk-AI4BVO55.js.map
10242
+ //# sourceMappingURL=chunk-7KHTBFO6.js.map