@delopay/sdk 0.171.0 → 0.174.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/{chunk-ZBNUOFNR.js → chunk-7KHTBFO6.js} +57 -4
- package/dist/chunk-7KHTBFO6.js.map +1 -0
- package/dist/index.cjs +56 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +158 -5
- package/dist/index.d.ts +158 -5
- package/dist/index.js +1 -1
- package/dist/internal.cjs +91 -3
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +16 -3
- package/dist/internal.d.ts +16 -3
- package/dist/internal.js +36 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZBNUOFNR.js.map +0 -1
|
@@ -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
|
|
@@ -5022,6 +5044,24 @@ var ProcessorCosts = class {
|
|
|
5022
5044
|
}
|
|
5023
5045
|
};
|
|
5024
5046
|
|
|
5047
|
+
// src/resources/checkoutBrowserInfo.ts
|
|
5048
|
+
var CheckoutBrowserInfo = class {
|
|
5049
|
+
constructor(request) {
|
|
5050
|
+
this.request = request;
|
|
5051
|
+
}
|
|
5052
|
+
/** Read the merchant's own setting and effective collection policy. */
|
|
5053
|
+
async retrieve(merchantId) {
|
|
5054
|
+
return this.request("GET", "/checkout-browser-info", { query: { merchant_id: merchantId } });
|
|
5055
|
+
}
|
|
5056
|
+
/** Replace the merchant setting. An admin refusal still wins; changes are audited. */
|
|
5057
|
+
async update(merchantId, body) {
|
|
5058
|
+
return this.request("PUT", "/checkout-browser-info", {
|
|
5059
|
+
query: { merchant_id: merchantId },
|
|
5060
|
+
body
|
|
5061
|
+
});
|
|
5062
|
+
}
|
|
5063
|
+
};
|
|
5064
|
+
|
|
5025
5065
|
// src/resources/checkoutMethods.ts
|
|
5026
5066
|
var CheckoutMethods = class {
|
|
5027
5067
|
constructor(request) {
|
|
@@ -5077,6 +5117,19 @@ var Subscriptions = class {
|
|
|
5077
5117
|
async create(params, options) {
|
|
5078
5118
|
return this.request("POST", "/subscriptions/create", { body: params, ...options });
|
|
5079
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
|
+
}
|
|
5080
5133
|
/** Retrieve a subscription by ID. `GET /subscriptions/{subscriptionId}` */
|
|
5081
5134
|
async retrieve(subscriptionId, options) {
|
|
5082
5135
|
return this.request("GET", `/subscriptions/${encodeURIComponent(subscriptionId)}`, {
|
|
@@ -6111,6 +6164,7 @@ var Delopay = class {
|
|
|
6111
6164
|
this.externalRecords = new ExternalRecords(request);
|
|
6112
6165
|
this.products = new Products(request);
|
|
6113
6166
|
this.processorCosts = new ProcessorCosts(request);
|
|
6167
|
+
this.checkoutBrowserInfo = new CheckoutBrowserInfo(request);
|
|
6114
6168
|
this.checkoutMethods = new CheckoutMethods(request);
|
|
6115
6169
|
this.analytics = new Analytics(request);
|
|
6116
6170
|
this.analyticsDashboard = new AnalyticsDashboard(request);
|
|
@@ -9127,9 +9181,8 @@ var CheckoutSession = class {
|
|
|
9127
9181
|
*
|
|
9128
9182
|
* Deliberately unauthenticated: a `pay_` link bootstraps before any
|
|
9129
9183
|
* credential exists, so no credential header is ever attached (caller
|
|
9130
|
-
* extras are still stripped of credentials).
|
|
9131
|
-
*
|
|
9132
|
-
* own types and runtime gates — hence the loose return type.
|
|
9184
|
+
* extras are still stripped of credentials). Core fields and the collection
|
|
9185
|
+
* policy are typed; provider-specific fields remain available as unknown.
|
|
9133
9186
|
*
|
|
9134
9187
|
* `theme` (a named checkout variant) and `country` are the route's declared
|
|
9135
9188
|
* query parameters. `country` is a manual override of the buyer country the
|
|
@@ -10186,4 +10239,4 @@ export {
|
|
|
10186
10239
|
decodeNativePanes,
|
|
10187
10240
|
encodeNativePanes
|
|
10188
10241
|
};
|
|
10189
|
-
//# sourceMappingURL=chunk-
|
|
10242
|
+
//# sourceMappingURL=chunk-7KHTBFO6.js.map
|