@delopay/sdk 0.52.0 → 0.53.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-7EHSQIPR.js → chunk-QH5ESES3.js} +37 -8
- package/dist/chunk-QH5ESES3.js.map +1 -0
- package/dist/index.cjs +36 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -2
- package/dist/index.d.ts +42 -2
- package/dist/index.js +1 -1
- package/dist/internal.cjs +36 -7
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-7EHSQIPR.js.map +0 -1
|
@@ -450,10 +450,17 @@ var Customers = class {
|
|
|
450
450
|
return this.request("DELETE", `/customers/${encodeURIComponent(customerId)}`);
|
|
451
451
|
}
|
|
452
452
|
/**
|
|
453
|
-
* List customers, optionally filtered by email
|
|
453
|
+
* List customers, optionally filtered by email, shop (`profile_id`), or
|
|
454
|
+
* project (`project_id`).
|
|
454
455
|
*
|
|
455
456
|
* @param params - Optional filter and pagination parameters.
|
|
456
457
|
* @returns Array of customer objects.
|
|
458
|
+
*
|
|
459
|
+
* @example
|
|
460
|
+
* ```typescript
|
|
461
|
+
* // Customers who have transacted in a specific shop.
|
|
462
|
+
* const customers = await delopay.customers.list({ profile_id: 'pro_abc123' });
|
|
463
|
+
* ```
|
|
457
464
|
*/
|
|
458
465
|
async list(params) {
|
|
459
466
|
return this.request("GET", "/customers/list", {
|
|
@@ -461,12 +468,38 @@ var Customers = class {
|
|
|
461
468
|
});
|
|
462
469
|
}
|
|
463
470
|
// --- OLAP extensions (Task 4.6) ---
|
|
464
|
-
/**
|
|
471
|
+
/**
|
|
472
|
+
* List customers with count. Supports the same `profile_id` / `project_id`
|
|
473
|
+
* shop filters as {@link list}. `GET /customers/list-with-count`
|
|
474
|
+
*/
|
|
465
475
|
async listWithCount(params) {
|
|
466
476
|
return this.request("GET", "/customers/list-with-count", {
|
|
467
477
|
query: params
|
|
468
478
|
});
|
|
469
479
|
}
|
|
480
|
+
/**
|
|
481
|
+
* List customers scoped to the authenticated dashboard user's shop
|
|
482
|
+
* (business profile). The JWT auto-scopes to its own `profile`; an explicit
|
|
483
|
+
* `profile_id` / `project_id` outside that scope is rejected with
|
|
484
|
+
* `AccessForbidden`. `GET /customers/profile/list`
|
|
485
|
+
*
|
|
486
|
+
* @param params - Optional filter and pagination parameters.
|
|
487
|
+
* @returns Array of customer objects.
|
|
488
|
+
*/
|
|
489
|
+
async listByProfile(params) {
|
|
490
|
+
return this.request("GET", "/customers/profile/list", {
|
|
491
|
+
query: params
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Profile-scoped variant of {@link listWithCount}.
|
|
496
|
+
* `GET /customers/profile/list-with-count`
|
|
497
|
+
*/
|
|
498
|
+
async listByProfileWithCount(params) {
|
|
499
|
+
return this.request("GET", "/customers/profile/list-with-count", {
|
|
500
|
+
query: params
|
|
501
|
+
});
|
|
502
|
+
}
|
|
470
503
|
/** List mandates for a customer. `GET /customers/{customerId}/mandates` */
|
|
471
504
|
async listMandates(customerId) {
|
|
472
505
|
return this.request("GET", `/customers/${encodeURIComponent(customerId)}/mandates`);
|
|
@@ -1085,11 +1118,7 @@ var Payments = class {
|
|
|
1085
1118
|
* ```
|
|
1086
1119
|
*/
|
|
1087
1120
|
async listAttempts(paymentId, options) {
|
|
1088
|
-
return this.request(
|
|
1089
|
-
"GET",
|
|
1090
|
-
`/payments/${encodeURIComponent(paymentId)}/attempts`,
|
|
1091
|
-
options
|
|
1092
|
-
);
|
|
1121
|
+
return this.request("GET", `/payments/${encodeURIComponent(paymentId)}/attempts`, options);
|
|
1093
1122
|
}
|
|
1094
1123
|
/**
|
|
1095
1124
|
* Update an existing payment intent before it is confirmed.
|
|
@@ -4055,4 +4084,4 @@ export {
|
|
|
4055
4084
|
applyBrandingVariables,
|
|
4056
4085
|
shadowFor
|
|
4057
4086
|
};
|
|
4058
|
-
//# sourceMappingURL=chunk-
|
|
4087
|
+
//# sourceMappingURL=chunk-QH5ESES3.js.map
|