@delopay/sdk 0.57.0 → 0.59.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-3NNYGK5Z.js → chunk-7KPAARZE.js} +15 -2
- package/dist/chunk-7KPAARZE.js.map +1 -0
- package/dist/index.cjs +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -3
- package/dist/index.d.ts +60 -3
- package/dist/index.js +1 -1
- package/dist/internal.cjs +14 -1
- 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 +1 -1
- package/dist/chunk-3NNYGK5Z.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2384,9 +2384,21 @@ var Users = class {
|
|
|
2384
2384
|
async listUserRoles(params) {
|
|
2385
2385
|
return this.request("POST", "/user/employees", { body: params });
|
|
2386
2386
|
}
|
|
2387
|
+
/**
|
|
2388
|
+
* Change a team member's role. `POST /user/employees/update-role`
|
|
2389
|
+
*
|
|
2390
|
+
* Pass `profile_id` to name the shop when managing a shop's team as a
|
|
2391
|
+
* merchant-scoped admin — see {@link UpdateUserRoleRequest.profile_id}.
|
|
2392
|
+
*/
|
|
2387
2393
|
async updateUserRole(params) {
|
|
2388
2394
|
return this.request("POST", "/user/employees/update-role", { body: params });
|
|
2389
2395
|
}
|
|
2396
|
+
/**
|
|
2397
|
+
* Remove a team member. `DELETE /user/employees/delete`
|
|
2398
|
+
*
|
|
2399
|
+
* Pass `profile_id` to name the shop when managing a shop's team as a
|
|
2400
|
+
* merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}.
|
|
2401
|
+
*/
|
|
2390
2402
|
async deleteUserRole(params) {
|
|
2391
2403
|
return this.request("DELETE", "/user/employees/delete", { body: params });
|
|
2392
2404
|
}
|
|
@@ -3224,7 +3236,8 @@ var Delopay = class {
|
|
|
3224
3236
|
const type = err.error_type ?? err.type ?? "";
|
|
3225
3237
|
const data = err.data && typeof err.data === "object" && !Array.isArray(err.data) ? err.data : void 0;
|
|
3226
3238
|
const truncatedRaw = truncateRawBody(rawBody);
|
|
3227
|
-
|
|
3239
|
+
const isConnectorPassthrough = type === "connector" || code.startsWith("CE_");
|
|
3240
|
+
if (response.status === 401 && !isConnectorPassthrough) {
|
|
3228
3241
|
throw new DelopayAuthenticationError(message, {
|
|
3229
3242
|
code,
|
|
3230
3243
|
type,
|