@delopay/sdk 0.192.0 → 0.193.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-BIAYMQN7.js → chunk-72DLUJCI.js} +35 -8
- package/dist/chunk-72DLUJCI.js.map +1 -0
- package/dist/index.cjs +34 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +139 -17
- package/dist/index.d.ts +139 -17
- package/dist/index.js +1 -1
- package/dist/internal.cjs +34 -7
- 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-BIAYMQN7.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -4113,6 +4113,15 @@ var Users = class {
|
|
|
4113
4113
|
async listProfiles() {
|
|
4114
4114
|
return this.request("GET", "/user/list/profile");
|
|
4115
4115
|
}
|
|
4116
|
+
/**
|
|
4117
|
+
* Invite team members by email. `POST /user/employees/invite`
|
|
4118
|
+
*
|
|
4119
|
+
* `project_ids` grants a shop-level role on every shop of each project, once
|
|
4120
|
+
* the invitation is accepted. A refusal of `project_ids` is a `UR_23` error whose `data.reason` is one of
|
|
4121
|
+
* `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
4122
|
+
* `shop_in_granted_project`, `project_already_granted` or
|
|
4123
|
+
* `project_grant_requires_merchant_level`.
|
|
4124
|
+
*/
|
|
4116
4125
|
async inviteUsers(params) {
|
|
4117
4126
|
return this.request("POST", "/user/employees/invite", { body: params });
|
|
4118
4127
|
}
|
|
@@ -4126,7 +4135,11 @@ var Users = class {
|
|
|
4126
4135
|
* not echoed back. Either way the member must change it on first sign-in.
|
|
4127
4136
|
*
|
|
4128
4137
|
* Same role rules as invite: you cannot grant a role above your own, and a
|
|
4129
|
-
* shop-scoped caller can only target their own shop.
|
|
4138
|
+
* shop-scoped caller can only target their own shop. `project_ids` grants a
|
|
4139
|
+
* shop-level role on every shop of each project. A refusal of `project_ids` is a `UR_23` error whose `data.reason` is one of
|
|
4140
|
+
* `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
4141
|
+
* `shop_in_granted_project`, `project_already_granted` or
|
|
4142
|
+
* `project_grant_requires_merchant_level`.
|
|
4130
4143
|
*/
|
|
4131
4144
|
async addUser(params) {
|
|
4132
4145
|
return this.request("POST", "/user/employees/add", { body: params });
|
|
@@ -4239,6 +4252,12 @@ var Users = class {
|
|
|
4239
4252
|
query: { groups: params.groups, entity_type: params.entity_type }
|
|
4240
4253
|
});
|
|
4241
4254
|
}
|
|
4255
|
+
/**
|
|
4256
|
+
* The roles a member holds, one entry per role. `POST /user/employees`
|
|
4257
|
+
*
|
|
4258
|
+
* A project-level role carries `project`: it applies to every shop of that
|
|
4259
|
+
* project.
|
|
4260
|
+
*/
|
|
4242
4261
|
async listUserRoles(params) {
|
|
4243
4262
|
return this.request("POST", "/user/employees", { body: params });
|
|
4244
4263
|
}
|
|
@@ -4263,7 +4282,9 @@ var Users = class {
|
|
|
4263
4282
|
* Remove a team member. `DELETE /user/employees/delete`
|
|
4264
4283
|
*
|
|
4265
4284
|
* Pass `profile_id` to name the shop when managing a shop's team as a
|
|
4266
|
-
* merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}.
|
|
4285
|
+
* merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}. Pass
|
|
4286
|
+
* `project_id` instead to remove a project-level role, which the member then
|
|
4287
|
+
* loses on every shop of the project.
|
|
4267
4288
|
*/
|
|
4268
4289
|
async deleteUserRole(params) {
|
|
4269
4290
|
return this.request("DELETE", "/user/employees/delete", { body: params });
|
|
@@ -4272,12 +4293,17 @@ var Users = class {
|
|
|
4272
4293
|
* Move a team member between a merchant-level role and shop-level roles.
|
|
4273
4294
|
* `POST /user/employees/change-scope`
|
|
4274
4295
|
*
|
|
4275
|
-
* A merchant-level `role_id` takes no `profile_ids`; a
|
|
4276
|
-
* at least one
|
|
4277
|
-
*
|
|
4296
|
+
* A merchant-level `role_id` takes no `profile_ids` or `project_ids`; a
|
|
4297
|
+
* shop-level one needs at least one shop or project. A project grants the
|
|
4298
|
+
* role on every shop of the project, including shops added later. Every
|
|
4299
|
+
* earlier merchant-, project- and shop-level binding of the member in your
|
|
4300
|
+
* merchant is replaced. When the change takes a scope away, the
|
|
4278
4301
|
* member's sessions end (`sessions_revoked: true`). Needs a caller at
|
|
4279
4302
|
* merchant level or above. A refusal is a `UR_23` error whose `data.reason`
|
|
4280
|
-
* names the rule; an unknown `role_id` is `UR_22`.
|
|
4303
|
+
* names the rule; an unknown `role_id` is `UR_22`. The project rules add the
|
|
4304
|
+
* reasons `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
4305
|
+
* `shop_in_granted_project`, `project_already_granted` and
|
|
4306
|
+
* `project_grant_requires_merchant_level`.
|
|
4281
4307
|
*/
|
|
4282
4308
|
async changeMemberScope(params) {
|
|
4283
4309
|
return this.request("POST", "/user/employees/change-scope", { body: params });
|
|
@@ -4321,7 +4347,8 @@ var Users = class {
|
|
|
4321
4347
|
* Invitations still waiting on the caller. `GET /user/list/invitation`
|
|
4322
4348
|
*
|
|
4323
4349
|
* Accepts an `accept_invite` step token as well as a session JWT, so it
|
|
4324
|
-
* can feed `acceptInvitationsPreAuth` during sign-in.
|
|
4350
|
+
* can feed `acceptInvitationsPreAuth` during sign-in. An invitation to a
|
|
4351
|
+
* project carries `project_id`; pass it back unchanged when accepting.
|
|
4325
4352
|
*/
|
|
4326
4353
|
async listInvitations() {
|
|
4327
4354
|
return this.request("GET", "/user/list/invitation");
|