@delopay/sdk 0.190.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-YNJUCISZ.js → chunk-72DLUJCI.js} +68 -8
- package/dist/chunk-72DLUJCI.js.map +1 -0
- package/dist/index.cjs +67 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +318 -24
- package/dist/index.d.ts +318 -24
- package/dist/index.js +1 -1
- package/dist/internal.cjs +67 -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-YNJUCISZ.js.map +0 -1
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
|
@@ -3328,6 +3328,12 @@ var Routing = class {
|
|
|
3328
3328
|
* Every account named must belong to this shop; one that does not is refused.
|
|
3329
3329
|
* So is an amount cap without a `currency`, and a payment cap with one.
|
|
3330
3330
|
*
|
|
3331
|
+
* An account may appear twice — a payment count and a budget — and never
|
|
3332
|
+
* twice in one `unit`. Re-send a range with its `limit_max`, or it is stored
|
|
3333
|
+
* as its bottom. Never re-send `current_limit` as `set_current_limit`: the
|
|
3334
|
+
* value read belongs to the window it was read in, and pinning it into a
|
|
3335
|
+
* window that has since reset is a limit nobody chose.
|
|
3336
|
+
*
|
|
3331
3337
|
* `PUT /routing/connector-caps/{profileId}`
|
|
3332
3338
|
*/
|
|
3333
3339
|
async setConnectorCaps(profileId, params) {
|
|
@@ -4120,6 +4126,15 @@ var Users = class {
|
|
|
4120
4126
|
async listProfiles() {
|
|
4121
4127
|
return this.request("GET", "/user/list/profile");
|
|
4122
4128
|
}
|
|
4129
|
+
/**
|
|
4130
|
+
* Invite team members by email. `POST /user/employees/invite`
|
|
4131
|
+
*
|
|
4132
|
+
* `project_ids` grants a shop-level role on every shop of each project, once
|
|
4133
|
+
* the invitation is accepted. A refusal of `project_ids` is a `UR_23` error whose `data.reason` is one of
|
|
4134
|
+
* `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
4135
|
+
* `shop_in_granted_project`, `project_already_granted` or
|
|
4136
|
+
* `project_grant_requires_merchant_level`.
|
|
4137
|
+
*/
|
|
4123
4138
|
async inviteUsers(params) {
|
|
4124
4139
|
return this.request("POST", "/user/employees/invite", { body: params });
|
|
4125
4140
|
}
|
|
@@ -4133,7 +4148,11 @@ var Users = class {
|
|
|
4133
4148
|
* not echoed back. Either way the member must change it on first sign-in.
|
|
4134
4149
|
*
|
|
4135
4150
|
* Same role rules as invite: you cannot grant a role above your own, and a
|
|
4136
|
-
* shop-scoped caller can only target their own shop.
|
|
4151
|
+
* shop-scoped caller can only target their own shop. `project_ids` grants a
|
|
4152
|
+
* 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
|
|
4153
|
+
* `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
4154
|
+
* `shop_in_granted_project`, `project_already_granted` or
|
|
4155
|
+
* `project_grant_requires_merchant_level`.
|
|
4137
4156
|
*/
|
|
4138
4157
|
async addUser(params) {
|
|
4139
4158
|
return this.request("POST", "/user/employees/add", { body: params });
|
|
@@ -4246,6 +4265,12 @@ var Users = class {
|
|
|
4246
4265
|
query: { groups: params.groups, entity_type: params.entity_type }
|
|
4247
4266
|
});
|
|
4248
4267
|
}
|
|
4268
|
+
/**
|
|
4269
|
+
* The roles a member holds, one entry per role. `POST /user/employees`
|
|
4270
|
+
*
|
|
4271
|
+
* A project-level role carries `project`: it applies to every shop of that
|
|
4272
|
+
* project.
|
|
4273
|
+
*/
|
|
4249
4274
|
async listUserRoles(params) {
|
|
4250
4275
|
return this.request("POST", "/user/employees", { body: params });
|
|
4251
4276
|
}
|
|
@@ -4270,7 +4295,9 @@ var Users = class {
|
|
|
4270
4295
|
* Remove a team member. `DELETE /user/employees/delete`
|
|
4271
4296
|
*
|
|
4272
4297
|
* Pass `profile_id` to name the shop when managing a shop's team as a
|
|
4273
|
-
* merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}.
|
|
4298
|
+
* merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}. Pass
|
|
4299
|
+
* `project_id` instead to remove a project-level role, which the member then
|
|
4300
|
+
* loses on every shop of the project.
|
|
4274
4301
|
*/
|
|
4275
4302
|
async deleteUserRole(params) {
|
|
4276
4303
|
return this.request("DELETE", "/user/employees/delete", { body: params });
|
|
@@ -4279,16 +4306,48 @@ var Users = class {
|
|
|
4279
4306
|
* Move a team member between a merchant-level role and shop-level roles.
|
|
4280
4307
|
* `POST /user/employees/change-scope`
|
|
4281
4308
|
*
|
|
4282
|
-
* A merchant-level `role_id` takes no `profile_ids`; a
|
|
4283
|
-
* at least one
|
|
4284
|
-
*
|
|
4309
|
+
* A merchant-level `role_id` takes no `profile_ids` or `project_ids`; a
|
|
4310
|
+
* shop-level one needs at least one shop or project. A project grants the
|
|
4311
|
+
* role on every shop of the project, including shops added later. Every
|
|
4312
|
+
* earlier merchant-, project- and shop-level binding of the member in your
|
|
4313
|
+
* merchant is replaced. When the change takes a scope away, the
|
|
4285
4314
|
* member's sessions end (`sessions_revoked: true`). Needs a caller at
|
|
4286
4315
|
* merchant level or above. A refusal is a `UR_23` error whose `data.reason`
|
|
4287
|
-
* names the rule; an unknown `role_id` is `UR_22`.
|
|
4316
|
+
* names the rule; an unknown `role_id` is `UR_22`. The project rules add the
|
|
4317
|
+
* reasons `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
4318
|
+
* `shop_in_granted_project`, `project_already_granted` and
|
|
4319
|
+
* `project_grant_requires_merchant_level`.
|
|
4288
4320
|
*/
|
|
4289
4321
|
async changeMemberScope(params) {
|
|
4290
4322
|
return this.request("POST", "/user/employees/change-scope", { body: params });
|
|
4291
4323
|
}
|
|
4324
|
+
/**
|
|
4325
|
+
* One member of your merchant, with the person fields the member list
|
|
4326
|
+
* omits. `GET /user/employees/{user_id}/details`
|
|
4327
|
+
*
|
|
4328
|
+
* Answers only for a member `listUsersInLineage` shows you. Any other id,
|
|
4329
|
+
* unknown or not yours, is a 404 `UR_68` with `data.reason:
|
|
4330
|
+
* 'member_not_found'`.
|
|
4331
|
+
*/
|
|
4332
|
+
async getTeamMemberDetails(userId) {
|
|
4333
|
+
return this.request("GET", `/user/employees/${encodeURIComponent(userId)}/details`);
|
|
4334
|
+
}
|
|
4335
|
+
/**
|
|
4336
|
+
* Replace a team member's password with a temporary one, returned once.
|
|
4337
|
+
* `POST /user/employees/{user_id}/reset-password`
|
|
4338
|
+
*
|
|
4339
|
+
* Needs the *Users* write permission and the *Impersonation* permission,
|
|
4340
|
+
* and the member must be one you could sign in as with
|
|
4341
|
+
* `impersonateEmployee`. The member's sessions end, and their next sign-in
|
|
4342
|
+
* asks them to choose a new password. Two-factor authentication is left as
|
|
4343
|
+
* it is. `TeamMemberDetails.can_reset_password` answers the same rule. A
|
|
4344
|
+
* refusal is a `UR_68` error whose `data` is a {@link TeamMemberRefusal}.
|
|
4345
|
+
*/
|
|
4346
|
+
async resetTeamMemberPassword(userId, params) {
|
|
4347
|
+
return this.request("POST", `/user/employees/${encodeURIComponent(userId)}/reset-password`, {
|
|
4348
|
+
body: params
|
|
4349
|
+
});
|
|
4350
|
+
}
|
|
4292
4351
|
/** Sign in via OIDC. `POST /user/oidc` */
|
|
4293
4352
|
async signInOidc(params) {
|
|
4294
4353
|
return this.request("POST", "/user/oidc", { body: params });
|
|
@@ -4301,7 +4360,8 @@ var Users = class {
|
|
|
4301
4360
|
* Invitations still waiting on the caller. `GET /user/list/invitation`
|
|
4302
4361
|
*
|
|
4303
4362
|
* Accepts an `accept_invite` step token as well as a session JWT, so it
|
|
4304
|
-
* can feed `acceptInvitationsPreAuth` during sign-in.
|
|
4363
|
+
* can feed `acceptInvitationsPreAuth` during sign-in. An invitation to a
|
|
4364
|
+
* project carries `project_id`; pass it back unchanged when accepting.
|
|
4305
4365
|
*/
|
|
4306
4366
|
async listInvitations() {
|
|
4307
4367
|
return this.request("GET", "/user/list/invitation");
|