@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
|
@@ -3871,6 +3871,15 @@ var Users = class {
|
|
|
3871
3871
|
async listProfiles() {
|
|
3872
3872
|
return this.request("GET", "/user/list/profile");
|
|
3873
3873
|
}
|
|
3874
|
+
/**
|
|
3875
|
+
* Invite team members by email. `POST /user/employees/invite`
|
|
3876
|
+
*
|
|
3877
|
+
* `project_ids` grants a shop-level role on every shop of each project, once
|
|
3878
|
+
* the invitation is accepted. A refusal of `project_ids` is a `UR_23` error whose `data.reason` is one of
|
|
3879
|
+
* `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
3880
|
+
* `shop_in_granted_project`, `project_already_granted` or
|
|
3881
|
+
* `project_grant_requires_merchant_level`.
|
|
3882
|
+
*/
|
|
3874
3883
|
async inviteUsers(params) {
|
|
3875
3884
|
return this.request("POST", "/user/employees/invite", { body: params });
|
|
3876
3885
|
}
|
|
@@ -3884,7 +3893,11 @@ var Users = class {
|
|
|
3884
3893
|
* not echoed back. Either way the member must change it on first sign-in.
|
|
3885
3894
|
*
|
|
3886
3895
|
* Same role rules as invite: you cannot grant a role above your own, and a
|
|
3887
|
-
* shop-scoped caller can only target their own shop.
|
|
3896
|
+
* shop-scoped caller can only target their own shop. `project_ids` grants a
|
|
3897
|
+
* 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
|
|
3898
|
+
* `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
3899
|
+
* `shop_in_granted_project`, `project_already_granted` or
|
|
3900
|
+
* `project_grant_requires_merchant_level`.
|
|
3888
3901
|
*/
|
|
3889
3902
|
async addUser(params) {
|
|
3890
3903
|
return this.request("POST", "/user/employees/add", { body: params });
|
|
@@ -3997,6 +4010,12 @@ var Users = class {
|
|
|
3997
4010
|
query: { groups: params.groups, entity_type: params.entity_type }
|
|
3998
4011
|
});
|
|
3999
4012
|
}
|
|
4013
|
+
/**
|
|
4014
|
+
* The roles a member holds, one entry per role. `POST /user/employees`
|
|
4015
|
+
*
|
|
4016
|
+
* A project-level role carries `project`: it applies to every shop of that
|
|
4017
|
+
* project.
|
|
4018
|
+
*/
|
|
4000
4019
|
async listUserRoles(params) {
|
|
4001
4020
|
return this.request("POST", "/user/employees", { body: params });
|
|
4002
4021
|
}
|
|
@@ -4021,7 +4040,9 @@ var Users = class {
|
|
|
4021
4040
|
* Remove a team member. `DELETE /user/employees/delete`
|
|
4022
4041
|
*
|
|
4023
4042
|
* Pass `profile_id` to name the shop when managing a shop's team as a
|
|
4024
|
-
* merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}.
|
|
4043
|
+
* merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}. Pass
|
|
4044
|
+
* `project_id` instead to remove a project-level role, which the member then
|
|
4045
|
+
* loses on every shop of the project.
|
|
4025
4046
|
*/
|
|
4026
4047
|
async deleteUserRole(params) {
|
|
4027
4048
|
return this.request("DELETE", "/user/employees/delete", { body: params });
|
|
@@ -4030,12 +4051,17 @@ var Users = class {
|
|
|
4030
4051
|
* Move a team member between a merchant-level role and shop-level roles.
|
|
4031
4052
|
* `POST /user/employees/change-scope`
|
|
4032
4053
|
*
|
|
4033
|
-
* A merchant-level `role_id` takes no `profile_ids`; a
|
|
4034
|
-
* at least one
|
|
4035
|
-
*
|
|
4054
|
+
* A merchant-level `role_id` takes no `profile_ids` or `project_ids`; a
|
|
4055
|
+
* shop-level one needs at least one shop or project. A project grants the
|
|
4056
|
+
* role on every shop of the project, including shops added later. Every
|
|
4057
|
+
* earlier merchant-, project- and shop-level binding of the member in your
|
|
4058
|
+
* merchant is replaced. When the change takes a scope away, the
|
|
4036
4059
|
* member's sessions end (`sessions_revoked: true`). Needs a caller at
|
|
4037
4060
|
* merchant level or above. A refusal is a `UR_23` error whose `data.reason`
|
|
4038
|
-
* names the rule; an unknown `role_id` is `UR_22`.
|
|
4061
|
+
* names the rule; an unknown `role_id` is `UR_22`. The project rules add the
|
|
4062
|
+
* reasons `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
4063
|
+
* `shop_in_granted_project`, `project_already_granted` and
|
|
4064
|
+
* `project_grant_requires_merchant_level`.
|
|
4039
4065
|
*/
|
|
4040
4066
|
async changeMemberScope(params) {
|
|
4041
4067
|
return this.request("POST", "/user/employees/change-scope", { body: params });
|
|
@@ -4079,7 +4105,8 @@ var Users = class {
|
|
|
4079
4105
|
* Invitations still waiting on the caller. `GET /user/list/invitation`
|
|
4080
4106
|
*
|
|
4081
4107
|
* Accepts an `accept_invite` step token as well as a session JWT, so it
|
|
4082
|
-
* can feed `acceptInvitationsPreAuth` during sign-in.
|
|
4108
|
+
* can feed `acceptInvitationsPreAuth` during sign-in. An invitation to a
|
|
4109
|
+
* project carries `project_id`; pass it back unchanged when accepting.
|
|
4083
4110
|
*/
|
|
4084
4111
|
async listInvitations() {
|
|
4085
4112
|
return this.request("GET", "/user/list/invitation");
|
|
@@ -11098,4 +11125,4 @@ export {
|
|
|
11098
11125
|
decodeNativePanes,
|
|
11099
11126
|
encodeNativePanes
|
|
11100
11127
|
};
|
|
11101
|
-
//# sourceMappingURL=chunk-
|
|
11128
|
+
//# sourceMappingURL=chunk-72DLUJCI.js.map
|