@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
package/dist/index.cjs
CHANGED
|
@@ -219,8 +219,7 @@ var ApiKeys = class {
|
|
|
219
219
|
// JWT-authenticated routes under `/account/{merchantId}/profile/api-keys`.
|
|
220
220
|
// The caller's shop (business profile) comes from the JWT, never from the
|
|
221
221
|
// request, so a shop-scoped user can only mint/list/manage keys pinned to
|
|
222
|
-
// their own shop. Requires a backend with profile-scoped API key support
|
|
223
|
-
// (DeloPay-net/delopay-backend#344).
|
|
222
|
+
// their own shop. Requires a backend with profile-scoped API key support.
|
|
224
223
|
/**
|
|
225
224
|
* Create a new API key pinned to the caller's shop (business profile).
|
|
226
225
|
* `POST /account/{merchantId}/profile/api-keys`
|
|
@@ -3248,6 +3247,45 @@ var Users = class {
|
|
|
3248
3247
|
async deleteRole(roleId) {
|
|
3249
3248
|
return this.request("DELETE", `/user/role/${encodeURIComponent(roleId)}`);
|
|
3250
3249
|
}
|
|
3250
|
+
/**
|
|
3251
|
+
* Read which individual connector accounts a role may see.
|
|
3252
|
+
*
|
|
3253
|
+
* `GET /user/role/{roleId}/connectors`
|
|
3254
|
+
*
|
|
3255
|
+
* **Check `restricted` before reading `connectors`.** An empty list is
|
|
3256
|
+
* ambiguous by itself, so the backend states which case it is: `false` means
|
|
3257
|
+
* the role holds no grant and sees whatever its entity and profile scope
|
|
3258
|
+
* already allowed. Rendering an empty `connectors` array as "this role sees
|
|
3259
|
+
* nothing" inverts the meaning.
|
|
3260
|
+
*
|
|
3261
|
+
* Requires the permission that *edits a role*, not a connector permission.
|
|
3262
|
+
*/
|
|
3263
|
+
async getRoleConnectors(roleId) {
|
|
3264
|
+
return this.request("GET", `/user/role/${encodeURIComponent(roleId)}/connectors`);
|
|
3265
|
+
}
|
|
3266
|
+
/**
|
|
3267
|
+
* Replace the set of connector accounts a role may see.
|
|
3268
|
+
*
|
|
3269
|
+
* `PUT /user/role/{roleId}/connectors`
|
|
3270
|
+
*
|
|
3271
|
+
* The call **replaces** the whole set rather than adding to it, so send the
|
|
3272
|
+
* complete list every time. An empty `merchant_connector_ids` clears the
|
|
3273
|
+
* grant and returns the role to unrestricted.
|
|
3274
|
+
*
|
|
3275
|
+
* The backend refuses an id that is not a connector account of the caller's
|
|
3276
|
+
* own merchant, an `Organization`-scoped role (a connector account belongs to
|
|
3277
|
+
* exactly one merchant, so an org-spanning role cannot hold one coherently),
|
|
3278
|
+
* and any predefined role (one static entry shared by every tenant).
|
|
3279
|
+
*
|
|
3280
|
+
* Editing a grant invalidates the role cache and blacklists tokens minted
|
|
3281
|
+
* before the edit, so **users holding this role must sign in again**. Worth
|
|
3282
|
+
* saying in the UI before the save, not after.
|
|
3283
|
+
*/
|
|
3284
|
+
async updateRoleConnectors(roleId, params) {
|
|
3285
|
+
return this.request("PUT", `/user/role/${encodeURIComponent(roleId)}/connectors`, {
|
|
3286
|
+
body: params
|
|
3287
|
+
});
|
|
3288
|
+
}
|
|
3251
3289
|
};
|
|
3252
3290
|
|
|
3253
3291
|
// src/resources/verification.ts
|
|
@@ -5686,7 +5724,7 @@ var CheckoutSession = class {
|
|
|
5686
5724
|
* own types and runtime gates — hence the loose return type.
|
|
5687
5725
|
*
|
|
5688
5726
|
* `theme` is the route's one declared query parameter (a named checkout
|
|
5689
|
-
* variant
|
|
5727
|
+
* variant). `locale` travels as `Accept-Language` — the only
|
|
5690
5728
|
* channel the backend's locale resolution reads; a `?locale=` query is
|
|
5691
5729
|
* silently ignored by this route.
|
|
5692
5730
|
*
|
|
@@ -5841,10 +5879,17 @@ var CheckoutSession = class {
|
|
|
5841
5879
|
/**
|
|
5842
5880
|
* A short-lived VGS Collect session for browser-side card capture.
|
|
5843
5881
|
*
|
|
5844
|
-
*
|
|
5845
|
-
*
|
|
5846
|
-
*
|
|
5847
|
-
*
|
|
5882
|
+
* **Exactly one refusal means "this shop has no vault": a 400 carrying
|
|
5883
|
+
* `IR_19`.** Every other refusal means a vault exists and could not be used,
|
|
5884
|
+
* and answering it by falling back to the processor's own card pane sends an
|
|
5885
|
+
* unprotected card number to the very processor the shop pays to hide it
|
|
5886
|
+
* from — the bug this endpoint's error contract exists to prevent.
|
|
5887
|
+
*
|
|
5888
|
+
* A **404 is not benign.** The router answers it when the shop's vault
|
|
5889
|
+
* account cannot be found — the state a shop is left in when its vault
|
|
5890
|
+
* connector is deleted while the profile keeps naming the id: it still
|
|
5891
|
+
* reports the vault as enabled and still expects its cards cloaked. The same
|
|
5892
|
+
* status also covers a payment that does not exist.
|
|
5848
5893
|
*
|
|
5849
5894
|
* `GET /payment-link/{merchantId}/{paymentId}/vault/collect-session`
|
|
5850
5895
|
*/
|