@delopay/sdk 0.99.0 → 0.100.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.
@@ -3134,6 +3134,45 @@ var Users = class {
3134
3134
  async deleteRole(roleId) {
3135
3135
  return this.request("DELETE", `/user/role/${encodeURIComponent(roleId)}`);
3136
3136
  }
3137
+ /**
3138
+ * Read which individual connector accounts a role may see.
3139
+ *
3140
+ * `GET /user/role/{roleId}/connectors`
3141
+ *
3142
+ * **Check `restricted` before reading `connectors`.** An empty list is
3143
+ * ambiguous by itself, so the backend states which case it is: `false` means
3144
+ * the role holds no grant and sees whatever its entity and profile scope
3145
+ * already allowed. Rendering an empty `connectors` array as "this role sees
3146
+ * nothing" inverts the meaning.
3147
+ *
3148
+ * Requires the permission that *edits a role*, not a connector permission.
3149
+ */
3150
+ async getRoleConnectors(roleId) {
3151
+ return this.request("GET", `/user/role/${encodeURIComponent(roleId)}/connectors`);
3152
+ }
3153
+ /**
3154
+ * Replace the set of connector accounts a role may see.
3155
+ *
3156
+ * `PUT /user/role/{roleId}/connectors`
3157
+ *
3158
+ * The call **replaces** the whole set rather than adding to it, so send the
3159
+ * complete list every time. An empty `merchant_connector_ids` clears the
3160
+ * grant and returns the role to unrestricted.
3161
+ *
3162
+ * The backend refuses an id that is not a connector account of the caller's
3163
+ * own merchant, an `Organization`-scoped role (a connector account belongs to
3164
+ * exactly one merchant, so an org-spanning role cannot hold one coherently),
3165
+ * and any predefined role (one static entry shared by every tenant).
3166
+ *
3167
+ * Editing a grant invalidates the role cache and blacklists tokens minted
3168
+ * before the edit, so **users holding this role must sign in again**. Worth
3169
+ * saying in the UI before the save, not after.
3170
+ */
3171
+ async updateRoleConnectors(roleId, params) {
3172
+ return this.request("PUT", `/user/role/${encodeURIComponent(roleId)}/connectors`, {
3173
+ body: params
3174
+ });
3175
+ }
3137
3176
  };
3138
3177
 
3139
3178
  // src/resources/verification.ts
@@ -6129,4 +6168,4 @@ export {
6129
6168
  focusedCheckoutUrl,
6130
6169
  CHECKOUT_EVENT_KINDS
6131
6170
  };
6132
- //# sourceMappingURL=chunk-MUP6NKMP.js.map
6171
+ //# sourceMappingURL=chunk-HK4S2SQB.js.map