@delopay/sdk 0.192.0 → 0.198.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-AUVCCOH6.js} +93 -14
- package/dist/chunk-AUVCCOH6.js.map +1 -0
- package/dist/index.cjs +92 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +405 -44
- package/dist/index.d.ts +405 -44
- package/dist/index.js +1 -1
- package/dist/internal.cjs +104 -13
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +33 -3
- package/dist/internal.d.ts +33 -3
- package/dist/internal.js +13 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-BIAYMQN7.js.map +0 -1
|
@@ -3658,6 +3658,31 @@ var Users = class {
|
|
|
3658
3658
|
async signIn(params) {
|
|
3659
3659
|
return this.request("POST", "/user/signin", { body: params });
|
|
3660
3660
|
}
|
|
3661
|
+
/** Providers currently configured for dashboard sign-in. */
|
|
3662
|
+
async listOAuthProviders() {
|
|
3663
|
+
return this.request("GET", "/user/oauth/providers");
|
|
3664
|
+
}
|
|
3665
|
+
/** Current account's links; disabled providers remain visible. */
|
|
3666
|
+
async listLinkedOAuthProviders() {
|
|
3667
|
+
return this.request("GET", "/user/oauth/linked");
|
|
3668
|
+
}
|
|
3669
|
+
async startOAuthSignIn(params) {
|
|
3670
|
+
return this.request("POST", "/user/oauth/start", { body: params });
|
|
3671
|
+
}
|
|
3672
|
+
async startOAuthLink(params) {
|
|
3673
|
+
return this.request("POST", "/user/oauth/link/start", { body: params });
|
|
3674
|
+
}
|
|
3675
|
+
async completeOAuthSignIn(params) {
|
|
3676
|
+
return this.request("POST", "/user/oauth/complete", { body: params });
|
|
3677
|
+
}
|
|
3678
|
+
async completeOAuthLink(params) {
|
|
3679
|
+
return this.request("POST", "/user/oauth/link/complete", { body: params });
|
|
3680
|
+
}
|
|
3681
|
+
async disconnectOAuthProvider(provider, params) {
|
|
3682
|
+
return this.request("DELETE", `/user/oauth/linked/${encodeURIComponent(provider)}`, {
|
|
3683
|
+
body: params
|
|
3684
|
+
});
|
|
3685
|
+
}
|
|
3661
3686
|
async signOut() {
|
|
3662
3687
|
return this.request("POST", "/user/signout");
|
|
3663
3688
|
}
|
|
@@ -3871,6 +3896,15 @@ var Users = class {
|
|
|
3871
3896
|
async listProfiles() {
|
|
3872
3897
|
return this.request("GET", "/user/list/profile");
|
|
3873
3898
|
}
|
|
3899
|
+
/**
|
|
3900
|
+
* Invite team members by email. `POST /user/employees/invite`
|
|
3901
|
+
*
|
|
3902
|
+
* `project_ids` grants a shop-level role on every shop of each project, once
|
|
3903
|
+
* the invitation is accepted. A refusal of `project_ids` is a `UR_23` error whose `data.reason` is one of
|
|
3904
|
+
* `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
3905
|
+
* `shop_in_granted_project`, `project_already_granted` or
|
|
3906
|
+
* `project_grant_requires_merchant_level`.
|
|
3907
|
+
*/
|
|
3874
3908
|
async inviteUsers(params) {
|
|
3875
3909
|
return this.request("POST", "/user/employees/invite", { body: params });
|
|
3876
3910
|
}
|
|
@@ -3884,7 +3918,11 @@ var Users = class {
|
|
|
3884
3918
|
* not echoed back. Either way the member must change it on first sign-in.
|
|
3885
3919
|
*
|
|
3886
3920
|
* 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.
|
|
3921
|
+
* shop-scoped caller can only target their own shop. `project_ids` grants a
|
|
3922
|
+
* 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
|
|
3923
|
+
* `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
3924
|
+
* `shop_in_granted_project`, `project_already_granted` or
|
|
3925
|
+
* `project_grant_requires_merchant_level`.
|
|
3888
3926
|
*/
|
|
3889
3927
|
async addUser(params) {
|
|
3890
3928
|
return this.request("POST", "/user/employees/add", { body: params });
|
|
@@ -3997,6 +4035,12 @@ var Users = class {
|
|
|
3997
4035
|
query: { groups: params.groups, entity_type: params.entity_type }
|
|
3998
4036
|
});
|
|
3999
4037
|
}
|
|
4038
|
+
/**
|
|
4039
|
+
* The roles a member holds, one entry per role. `POST /user/employees`
|
|
4040
|
+
*
|
|
4041
|
+
* A project-level role carries `project`: it applies to every shop of that
|
|
4042
|
+
* project.
|
|
4043
|
+
*/
|
|
4000
4044
|
async listUserRoles(params) {
|
|
4001
4045
|
return this.request("POST", "/user/employees", { body: params });
|
|
4002
4046
|
}
|
|
@@ -4021,7 +4065,9 @@ var Users = class {
|
|
|
4021
4065
|
* Remove a team member. `DELETE /user/employees/delete`
|
|
4022
4066
|
*
|
|
4023
4067
|
* Pass `profile_id` to name the shop when managing a shop's team as a
|
|
4024
|
-
* merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}.
|
|
4068
|
+
* merchant-scoped admin — see {@link DeleteUserRoleRequest.profile_id}. Pass
|
|
4069
|
+
* `project_id` instead to remove a project-level role, which the member then
|
|
4070
|
+
* loses on every shop of the project.
|
|
4025
4071
|
*/
|
|
4026
4072
|
async deleteUserRole(params) {
|
|
4027
4073
|
return this.request("DELETE", "/user/employees/delete", { body: params });
|
|
@@ -4030,12 +4076,17 @@ var Users = class {
|
|
|
4030
4076
|
* Move a team member between a merchant-level role and shop-level roles.
|
|
4031
4077
|
* `POST /user/employees/change-scope`
|
|
4032
4078
|
*
|
|
4033
|
-
* A merchant-level `role_id` takes no `profile_ids`; a
|
|
4034
|
-
* at least one
|
|
4035
|
-
*
|
|
4079
|
+
* A merchant-level `role_id` takes no `profile_ids` or `project_ids`; a
|
|
4080
|
+
* shop-level one needs at least one shop or project. A project grants the
|
|
4081
|
+
* role on every shop of the project, including shops added later. Every
|
|
4082
|
+
* earlier merchant-, project- and shop-level binding of the member in your
|
|
4083
|
+
* merchant is replaced. When the change takes a scope away, the
|
|
4036
4084
|
* member's sessions end (`sessions_revoked: true`). Needs a caller at
|
|
4037
4085
|
* 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`.
|
|
4086
|
+
* names the rule; an unknown `role_id` is `UR_22`. The project rules add the
|
|
4087
|
+
* reasons `project_not_in_merchant`, `role_not_grantable_on_project`,
|
|
4088
|
+
* `shop_in_granted_project`, `project_already_granted` and
|
|
4089
|
+
* `project_grant_requires_merchant_level`.
|
|
4039
4090
|
*/
|
|
4040
4091
|
async changeMemberScope(params) {
|
|
4041
4092
|
return this.request("POST", "/user/employees/change-scope", { body: params });
|
|
@@ -4079,7 +4130,8 @@ var Users = class {
|
|
|
4079
4130
|
* Invitations still waiting on the caller. `GET /user/list/invitation`
|
|
4080
4131
|
*
|
|
4081
4132
|
* Accepts an `accept_invite` step token as well as a session JWT, so it
|
|
4082
|
-
* can feed `acceptInvitationsPreAuth` during sign-in.
|
|
4133
|
+
* can feed `acceptInvitationsPreAuth` during sign-in. An invitation to a
|
|
4134
|
+
* project carries `project_id`; pass it back unchanged when accepting.
|
|
4083
4135
|
*/
|
|
4084
4136
|
async listInvitations() {
|
|
4085
4137
|
return this.request("GET", "/user/list/invitation");
|
|
@@ -5709,7 +5761,13 @@ var Subscriptions = class {
|
|
|
5709
5761
|
...options
|
|
5710
5762
|
});
|
|
5711
5763
|
}
|
|
5712
|
-
/**
|
|
5764
|
+
/**
|
|
5765
|
+
* Update a subscription's plan/price. `PUT /subscriptions/{subscriptionId}/update`
|
|
5766
|
+
*
|
|
5767
|
+
* From the dashboard this counts against the caller's `subscription_change`
|
|
5768
|
+
* operation limit; an over-limit call fails with `DE_01` and nothing reaches
|
|
5769
|
+
* the processor. Calls made with an API key are not limited.
|
|
5770
|
+
*/
|
|
5713
5771
|
async update(subscriptionId, params, options) {
|
|
5714
5772
|
return this.request("PUT", `/subscriptions/${encodeURIComponent(subscriptionId)}/update`, {
|
|
5715
5773
|
body: params,
|
|
@@ -5765,6 +5823,10 @@ var Subscriptions = class {
|
|
|
5765
5823
|
/**
|
|
5766
5824
|
* Pause a subscription. `POST /subscriptions/{subscriptionId}/pause`
|
|
5767
5825
|
*
|
|
5826
|
+
* From the dashboard this counts against the caller's `subscription_change`
|
|
5827
|
+
* operation limit; an over-limit call fails with `DE_01` and nothing reaches
|
|
5828
|
+
* the processor. Calls made with an API key are not limited.
|
|
5829
|
+
*
|
|
5768
5830
|
* The body defaults to `{}` so the request still carries
|
|
5769
5831
|
* `Content-Type: application/json` even when no params are passed — the
|
|
5770
5832
|
* backend rejects the POST otherwise ("Unsupported content type").
|
|
@@ -5775,7 +5837,13 @@ var Subscriptions = class {
|
|
|
5775
5837
|
...options
|
|
5776
5838
|
});
|
|
5777
5839
|
}
|
|
5778
|
-
/**
|
|
5840
|
+
/**
|
|
5841
|
+
* Resume a paused subscription. `POST /subscriptions/{subscriptionId}/resume`
|
|
5842
|
+
*
|
|
5843
|
+
* From the dashboard this counts against the caller's `subscription_change`
|
|
5844
|
+
* operation limit; an over-limit call fails with `DE_01` and nothing reaches
|
|
5845
|
+
* the processor. Calls made with an API key are not limited.
|
|
5846
|
+
*/
|
|
5779
5847
|
async resume(subscriptionId, params, options) {
|
|
5780
5848
|
return this.request("POST", `/subscriptions/${encodeURIComponent(subscriptionId)}/resume`, {
|
|
5781
5849
|
body: params ?? {},
|
|
@@ -5787,6 +5855,10 @@ var Subscriptions = class {
|
|
|
5787
5855
|
*
|
|
5788
5856
|
* A subscription in a state it cannot be cancelled from is refused with
|
|
5789
5857
|
* `DE_11`; `error.data.reason` then names why (`SubscriptionActionRefusal`).
|
|
5858
|
+
*
|
|
5859
|
+
* From the dashboard this counts against the caller's `subscription_change`
|
|
5860
|
+
* operation limit; an over-limit call fails with `DE_01` and nothing reaches
|
|
5861
|
+
* the processor. Calls made with an API key are not limited.
|
|
5790
5862
|
*/
|
|
5791
5863
|
async cancel(subscriptionId, params, options) {
|
|
5792
5864
|
return this.request("POST", `/subscriptions/${encodeURIComponent(subscriptionId)}/cancel`, {
|
|
@@ -6291,10 +6363,13 @@ var Settlement = class {
|
|
|
6291
6363
|
* Add a manual adjustment to a statement. Positive `amount_usd` charges
|
|
6292
6364
|
* the shop (reducing their payout); negative credits them.
|
|
6293
6365
|
*
|
|
6294
|
-
* Subject to the caller's `settlement_adjustment` operation limit
|
|
6295
|
-
*
|
|
6296
|
-
*
|
|
6297
|
-
*
|
|
6366
|
+
* Subject to the caller's `settlement_adjustment` operation limit: an
|
|
6367
|
+
* over-limit call fails with `DE_01` and no adjustment is added. Both
|
|
6368
|
+
* windows count every add, and a credit counts at its magnitude. A
|
|
6369
|
+
* settlement rule can only block — approval is refund-only, for the reason
|
|
6370
|
+
* given on `updateStatementPayout()`. When another add by the same user
|
|
6371
|
+
* changes the window while this one is being admitted, the call fails with
|
|
6372
|
+
* HTTP 412 and nothing is written; retrying the same request is safe.
|
|
6298
6373
|
*
|
|
6299
6374
|
* `POST /settlement/statements/{statementId}/adjustments`
|
|
6300
6375
|
*/
|
|
@@ -6308,6 +6383,10 @@ var Settlement = class {
|
|
|
6308
6383
|
/**
|
|
6309
6384
|
* Remove a manual adjustment from a statement.
|
|
6310
6385
|
*
|
|
6386
|
+
* The adjustment still counts against the caller's `settlement_adjustment`
|
|
6387
|
+
* limit window it was added in: removing it does not give back its count or
|
|
6388
|
+
* amount.
|
|
6389
|
+
*
|
|
6311
6390
|
* `DELETE /settlement/statements/{statementId}/adjustments/{adjustmentId}`
|
|
6312
6391
|
*/
|
|
6313
6392
|
async deleteStatementAdjustment(statementId, adjustmentId, options) {
|
|
@@ -11098,4 +11177,4 @@ export {
|
|
|
11098
11177
|
decodeNativePanes,
|
|
11099
11178
|
encodeNativePanes
|
|
11100
11179
|
};
|
|
11101
|
-
//# sourceMappingURL=chunk-
|
|
11180
|
+
//# sourceMappingURL=chunk-AUVCCOH6.js.map
|