@delopay/sdk 0.177.0 → 0.179.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-OBEPMMEL.js → chunk-LCYYPYOP.js} +67 -5
- package/dist/chunk-LCYYPYOP.js.map +1 -0
- package/dist/index.cjs +66 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +212 -18
- package/dist/index.d.ts +212 -18
- package/dist/index.js +1 -1
- package/dist/internal.cjs +66 -4
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/package.json +18 -17
- package/dist/chunk-OBEPMMEL.js.map +0 -1
|
@@ -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
|
|
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
|
-
*
|
|
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
|
-
/**
|
|
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
|
}
|
|
@@ -4387,6 +4406,49 @@ var Analytics = class {
|
|
|
4387
4406
|
query: params
|
|
4388
4407
|
});
|
|
4389
4408
|
}
|
|
4409
|
+
/**
|
|
4410
|
+
* Every analytics exclusion of the merchant, with the payments each one
|
|
4411
|
+
* matched in the lookback window (todos#184).
|
|
4412
|
+
*
|
|
4413
|
+
* These rules change what the merchant's own dashboards count. Financial
|
|
4414
|
+
* records and transaction lists are never filtered by them.
|
|
4415
|
+
*
|
|
4416
|
+
* ⚠️ `matched_payments` **overlaps between rules and must not be summed**:
|
|
4417
|
+
* a payment matched by three rules is counted once by each. The envelope's
|
|
4418
|
+
* `best_effort` and `lookback_days` qualify every row — matching runs on
|
|
4419
|
+
* client signals that may be absent or expired, within that window.
|
|
4420
|
+
* `GET /analytics/exclusions`
|
|
4421
|
+
*/
|
|
4422
|
+
async listExclusions() {
|
|
4423
|
+
return this.request("GET", "/analytics/exclusions");
|
|
4424
|
+
}
|
|
4425
|
+
/**
|
|
4426
|
+
* Write a new exclusion. A shop-scoped user must name their own shop in
|
|
4427
|
+
* `profile_id`; omitting it applies the rule to every shop of the merchant.
|
|
4428
|
+
* Omitting `surfaces` means **all five**, not none.
|
|
4429
|
+
* `POST /analytics/exclusions`
|
|
4430
|
+
*/
|
|
4431
|
+
async createExclusion(rule) {
|
|
4432
|
+
return this.request("POST", "/analytics/exclusions", { body: rule });
|
|
4433
|
+
}
|
|
4434
|
+
/**
|
|
4435
|
+
* Replace a stored exclusion **completely**. This is not a patch: every
|
|
4436
|
+
* field you leave out reverts to its default rather than keeping its stored
|
|
4437
|
+
* value, so send the whole rule — including an explicit `null` for a
|
|
4438
|
+
* `profile_id`, `value`, `valid_from`, `valid_until` or `note` you mean to
|
|
4439
|
+
* clear, and the full `surfaces` list you mean to keep.
|
|
4440
|
+
* `PUT /analytics/exclusions/{id}`
|
|
4441
|
+
*/
|
|
4442
|
+
async updateExclusion(id, rule) {
|
|
4443
|
+
return this.request("PUT", `/analytics/exclusions/${encodeURIComponent(id)}`, { body: rule });
|
|
4444
|
+
}
|
|
4445
|
+
/**
|
|
4446
|
+
* Delete a stored exclusion. Returns the rule as it was, so a caller can
|
|
4447
|
+
* say what it removed. `DELETE /analytics/exclusions/{id}`
|
|
4448
|
+
*/
|
|
4449
|
+
async deleteExclusion(id) {
|
|
4450
|
+
return this.request("DELETE", `/analytics/exclusions/${encodeURIComponent(id)}`);
|
|
4451
|
+
}
|
|
4390
4452
|
/** Global search. `POST /analytics/search` */
|
|
4391
4453
|
async search(params) {
|
|
4392
4454
|
return this.request("POST", "/analytics/search", { body: params });
|
|
@@ -10268,4 +10330,4 @@ export {
|
|
|
10268
10330
|
decodeNativePanes,
|
|
10269
10331
|
encodeNativePanes
|
|
10270
10332
|
};
|
|
10271
|
-
//# sourceMappingURL=chunk-
|
|
10333
|
+
//# sourceMappingURL=chunk-LCYYPYOP.js.map
|