@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.
@@ -2309,9 +2309,21 @@ var Users = class {
2309
2309
  async listUserRoles(params) {
2310
2310
  return this.request("POST", "/user/employees", { body: params });
2311
2311
  }
2312
+ /**
2313
+ * Change a team member's role. `POST /user/employees/update-role`
2314
+ *
2315
+ * Pass `profile_id` to name the shop when managing a shop's team as a
2316
+ * merchant-scoped admin — see {@link UpdateUserRoleRequest.profile_id}.
2317
+ */
2312
2318
  async updateUserRole(params) {
2313
2319
  return this.request("POST", "/user/employees/update-role", { body: params });
2314
2320
  }
2321
+ /**
2322
+ * Remove a team member. `DELETE /user/employees/delete`
2323
+ *
2324
+ * Pass `profile_id` to name the shop when managing a shop's team as a
2325
+ * merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}.
2326
+ */
2315
2327
  async deleteUserRole(params) {
2316
2328
  return this.request("DELETE", "/user/employees/delete", { body: params });
2317
2329
  }
@@ -3149,7 +3161,8 @@ var Delopay = class {
3149
3161
  const type = err.error_type ?? err.type ?? "";
3150
3162
  const data = err.data && typeof err.data === "object" && !Array.isArray(err.data) ? err.data : void 0;
3151
3163
  const truncatedRaw = truncateRawBody(rawBody);
3152
- if (response.status === 401) {
3164
+ const isConnectorPassthrough = type === "connector" || code.startsWith("CE_");
3165
+ if (response.status === 401 && !isConnectorPassthrough) {
3153
3166
  throw new DelopayAuthenticationError(message, {
3154
3167
  code,
3155
3168
  type,
@@ -4121,4 +4134,4 @@ export {
4121
4134
  applyBrandingVariables,
4122
4135
  shadowFor
4123
4136
  };
4124
- //# sourceMappingURL=chunk-3NNYGK5Z.js.map
4137
+ //# sourceMappingURL=chunk-7KPAARZE.js.map