@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.
- package/dist/{chunk-MUP6NKMP.js → chunk-HK4S2SQB.js} +40 -1
- package/dist/chunk-HK4S2SQB.js.map +1 -0
- package/dist/index.cjs +39 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +77 -1
- package/dist/index.d.ts +77 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +39 -0
- 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-MUP6NKMP.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -3248,6 +3248,45 @@ var Users = class {
|
|
|
3248
3248
|
async deleteRole(roleId) {
|
|
3249
3249
|
return this.request("DELETE", `/user/role/${encodeURIComponent(roleId)}`);
|
|
3250
3250
|
}
|
|
3251
|
+
/**
|
|
3252
|
+
* Read which individual connector accounts a role may see.
|
|
3253
|
+
*
|
|
3254
|
+
* `GET /user/role/{roleId}/connectors`
|
|
3255
|
+
*
|
|
3256
|
+
* **Check `restricted` before reading `connectors`.** An empty list is
|
|
3257
|
+
* ambiguous by itself, so the backend states which case it is: `false` means
|
|
3258
|
+
* the role holds no grant and sees whatever its entity and profile scope
|
|
3259
|
+
* already allowed. Rendering an empty `connectors` array as "this role sees
|
|
3260
|
+
* nothing" inverts the meaning.
|
|
3261
|
+
*
|
|
3262
|
+
* Requires the permission that *edits a role*, not a connector permission.
|
|
3263
|
+
*/
|
|
3264
|
+
async getRoleConnectors(roleId) {
|
|
3265
|
+
return this.request("GET", `/user/role/${encodeURIComponent(roleId)}/connectors`);
|
|
3266
|
+
}
|
|
3267
|
+
/**
|
|
3268
|
+
* Replace the set of connector accounts a role may see.
|
|
3269
|
+
*
|
|
3270
|
+
* `PUT /user/role/{roleId}/connectors`
|
|
3271
|
+
*
|
|
3272
|
+
* The call **replaces** the whole set rather than adding to it, so send the
|
|
3273
|
+
* complete list every time. An empty `merchant_connector_ids` clears the
|
|
3274
|
+
* grant and returns the role to unrestricted.
|
|
3275
|
+
*
|
|
3276
|
+
* The backend refuses an id that is not a connector account of the caller's
|
|
3277
|
+
* own merchant, an `Organization`-scoped role (a connector account belongs to
|
|
3278
|
+
* exactly one merchant, so an org-spanning role cannot hold one coherently),
|
|
3279
|
+
* and any predefined role (one static entry shared by every tenant).
|
|
3280
|
+
*
|
|
3281
|
+
* Editing a grant invalidates the role cache and blacklists tokens minted
|
|
3282
|
+
* before the edit, so **users holding this role must sign in again**. Worth
|
|
3283
|
+
* saying in the UI before the save, not after.
|
|
3284
|
+
*/
|
|
3285
|
+
async updateRoleConnectors(roleId, params) {
|
|
3286
|
+
return this.request("PUT", `/user/role/${encodeURIComponent(roleId)}/connectors`, {
|
|
3287
|
+
body: params
|
|
3288
|
+
});
|
|
3289
|
+
}
|
|
3251
3290
|
};
|
|
3252
3291
|
|
|
3253
3292
|
// src/resources/verification.ts
|