@delopay/sdk 0.99.0 → 0.100.2
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-6ULG3SLG.js} +53 -8
- package/dist/chunk-6ULG3SLG.js.map +1 -0
- package/dist/index.cjs +52 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +94 -11
- package/dist/index.d.ts +94 -11
- package/dist/index.js +1 -1
- package/dist/internal.cjs +52 -7
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-MUP6NKMP.js.map +0 -1
|
@@ -105,8 +105,7 @@ var ApiKeys = class {
|
|
|
105
105
|
// JWT-authenticated routes under `/account/{merchantId}/profile/api-keys`.
|
|
106
106
|
// The caller's shop (business profile) comes from the JWT, never from the
|
|
107
107
|
// request, so a shop-scoped user can only mint/list/manage keys pinned to
|
|
108
|
-
// their own shop. Requires a backend with profile-scoped API key support
|
|
109
|
-
// (DeloPay-net/delopay-backend#344).
|
|
108
|
+
// their own shop. Requires a backend with profile-scoped API key support.
|
|
110
109
|
/**
|
|
111
110
|
* Create a new API key pinned to the caller's shop (business profile).
|
|
112
111
|
* `POST /account/{merchantId}/profile/api-keys`
|
|
@@ -3134,6 +3133,45 @@ var Users = class {
|
|
|
3134
3133
|
async deleteRole(roleId) {
|
|
3135
3134
|
return this.request("DELETE", `/user/role/${encodeURIComponent(roleId)}`);
|
|
3136
3135
|
}
|
|
3136
|
+
/**
|
|
3137
|
+
* Read which individual connector accounts a role may see.
|
|
3138
|
+
*
|
|
3139
|
+
* `GET /user/role/{roleId}/connectors`
|
|
3140
|
+
*
|
|
3141
|
+
* **Check `restricted` before reading `connectors`.** An empty list is
|
|
3142
|
+
* ambiguous by itself, so the backend states which case it is: `false` means
|
|
3143
|
+
* the role holds no grant and sees whatever its entity and profile scope
|
|
3144
|
+
* already allowed. Rendering an empty `connectors` array as "this role sees
|
|
3145
|
+
* nothing" inverts the meaning.
|
|
3146
|
+
*
|
|
3147
|
+
* Requires the permission that *edits a role*, not a connector permission.
|
|
3148
|
+
*/
|
|
3149
|
+
async getRoleConnectors(roleId) {
|
|
3150
|
+
return this.request("GET", `/user/role/${encodeURIComponent(roleId)}/connectors`);
|
|
3151
|
+
}
|
|
3152
|
+
/**
|
|
3153
|
+
* Replace the set of connector accounts a role may see.
|
|
3154
|
+
*
|
|
3155
|
+
* `PUT /user/role/{roleId}/connectors`
|
|
3156
|
+
*
|
|
3157
|
+
* The call **replaces** the whole set rather than adding to it, so send the
|
|
3158
|
+
* complete list every time. An empty `merchant_connector_ids` clears the
|
|
3159
|
+
* grant and returns the role to unrestricted.
|
|
3160
|
+
*
|
|
3161
|
+
* The backend refuses an id that is not a connector account of the caller's
|
|
3162
|
+
* own merchant, an `Organization`-scoped role (a connector account belongs to
|
|
3163
|
+
* exactly one merchant, so an org-spanning role cannot hold one coherently),
|
|
3164
|
+
* and any predefined role (one static entry shared by every tenant).
|
|
3165
|
+
*
|
|
3166
|
+
* Editing a grant invalidates the role cache and blacklists tokens minted
|
|
3167
|
+
* before the edit, so **users holding this role must sign in again**. Worth
|
|
3168
|
+
* saying in the UI before the save, not after.
|
|
3169
|
+
*/
|
|
3170
|
+
async updateRoleConnectors(roleId, params) {
|
|
3171
|
+
return this.request("PUT", `/user/role/${encodeURIComponent(roleId)}/connectors`, {
|
|
3172
|
+
body: params
|
|
3173
|
+
});
|
|
3174
|
+
}
|
|
3137
3175
|
};
|
|
3138
3176
|
|
|
3139
3177
|
// src/resources/verification.ts
|
|
@@ -5572,7 +5610,7 @@ var CheckoutSession = class {
|
|
|
5572
5610
|
* own types and runtime gates — hence the loose return type.
|
|
5573
5611
|
*
|
|
5574
5612
|
* `theme` is the route's one declared query parameter (a named checkout
|
|
5575
|
-
* variant
|
|
5613
|
+
* variant). `locale` travels as `Accept-Language` — the only
|
|
5576
5614
|
* channel the backend's locale resolution reads; a `?locale=` query is
|
|
5577
5615
|
* silently ignored by this route.
|
|
5578
5616
|
*
|
|
@@ -5727,10 +5765,17 @@ var CheckoutSession = class {
|
|
|
5727
5765
|
/**
|
|
5728
5766
|
* A short-lived VGS Collect session for browser-side card capture.
|
|
5729
5767
|
*
|
|
5730
|
-
*
|
|
5731
|
-
*
|
|
5732
|
-
*
|
|
5733
|
-
*
|
|
5768
|
+
* **Exactly one refusal means "this shop has no vault": a 400 carrying
|
|
5769
|
+
* `IR_19`.** Every other refusal means a vault exists and could not be used,
|
|
5770
|
+
* and answering it by falling back to the processor's own card pane sends an
|
|
5771
|
+
* unprotected card number to the very processor the shop pays to hide it
|
|
5772
|
+
* from — the bug this endpoint's error contract exists to prevent.
|
|
5773
|
+
*
|
|
5774
|
+
* A **404 is not benign.** The router answers it when the shop's vault
|
|
5775
|
+
* account cannot be found — the state a shop is left in when its vault
|
|
5776
|
+
* connector is deleted while the profile keeps naming the id: it still
|
|
5777
|
+
* reports the vault as enabled and still expects its cards cloaked. The same
|
|
5778
|
+
* status also covers a payment that does not exist.
|
|
5734
5779
|
*
|
|
5735
5780
|
* `GET /payment-link/{merchantId}/{paymentId}/vault/collect-session`
|
|
5736
5781
|
*/
|
|
@@ -6129,4 +6174,4 @@ export {
|
|
|
6129
6174
|
focusedCheckoutUrl,
|
|
6130
6175
|
CHECKOUT_EVENT_KINDS
|
|
6131
6176
|
};
|
|
6132
|
-
//# sourceMappingURL=chunk-
|
|
6177
|
+
//# sourceMappingURL=chunk-6ULG3SLG.js.map
|