@mitumba/sdk 5.18.0 → 5.19.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/index.d.mts +128 -1
- package/dist/index.d.ts +128 -1
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2424,6 +2424,24 @@ var AdminModule = class {
|
|
|
2424
2424
|
async resolveMessageReport(reportId, input, options) {
|
|
2425
2425
|
return this.client.post(`/admin/message-reports/${encodeURIComponent(reportId)}/resolve`, input, options);
|
|
2426
2426
|
}
|
|
2427
|
+
// ── Platform settings ──
|
|
2428
|
+
/** Every platform setting with its current value and whether it can be changed here. Requires `admin:read`. */
|
|
2429
|
+
async listSettings(options) {
|
|
2430
|
+
return this.client.get("/admin/settings", void 0, options);
|
|
2431
|
+
}
|
|
2432
|
+
/** One setting and its change history, newest first. Requires `admin:read`. */
|
|
2433
|
+
async getSetting(key, options) {
|
|
2434
|
+
return this.client.get(`/admin/settings/${encodeURIComponent(key)}`, void 0, options);
|
|
2435
|
+
}
|
|
2436
|
+
/**
|
|
2437
|
+
* Change an editable setting. Requires `roles:grant` and a recent passkey (403
|
|
2438
|
+
* `reauthentication_required` otherwise). Errors: 403 `not_editable` for payment and messaging
|
|
2439
|
+
* settings, 400 `invalid_value`, 409 `would_lock_you_out` when an operator-domain change would
|
|
2440
|
+
* remove the caller's own domain. Recorded on the audit trail as `config.changed`.
|
|
2441
|
+
*/
|
|
2442
|
+
async changeSetting(key, input, options) {
|
|
2443
|
+
return this.client.put(`/admin/settings/${encodeURIComponent(key)}`, input, options);
|
|
2444
|
+
}
|
|
2427
2445
|
// ── VAZI Moderation ──
|
|
2428
2446
|
async listVaziOutfits(params, options) {
|
|
2429
2447
|
return this.client.get("/admin/vazi/outfits", params, options);
|
|
@@ -2834,6 +2852,46 @@ var IamModule = class {
|
|
|
2834
2852
|
async me(options) {
|
|
2835
2853
|
return this.client.get("/auth/iam/me", void 0, options);
|
|
2836
2854
|
}
|
|
2855
|
+
// ── Sessions and sign-in history ──
|
|
2856
|
+
/** This IAM user's live sessions, most recently active first; `current` marks this one. */
|
|
2857
|
+
async listSessions(options) {
|
|
2858
|
+
return this.client.get("/auth/iam/sessions", void 0, options);
|
|
2859
|
+
}
|
|
2860
|
+
/**
|
|
2861
|
+
* End one of this IAM user's sessions. It can no longer be renewed; its current access lapses
|
|
2862
|
+
* within 15 minutes. 404 for a session that does not exist or is not this user's.
|
|
2863
|
+
*/
|
|
2864
|
+
async endSession(sessionId, options) {
|
|
2865
|
+
return this.client.post(`/auth/iam/sessions/${encodeURIComponent(sessionId)}/revoke`, void 0, options);
|
|
2866
|
+
}
|
|
2867
|
+
/** This IAM user's recent sign-in attempts, newest first, successful and refused (at most 100). */
|
|
2868
|
+
async listSignIns(params, options) {
|
|
2869
|
+
return this.client.get("/auth/iam/signins", params, options);
|
|
2870
|
+
}
|
|
2871
|
+
/** An IAM user's live sessions. Requires `roles:grant`; IAM users cannot call it. */
|
|
2872
|
+
async listUserSessions(orgId, iamUserId, options) {
|
|
2873
|
+
return this.client.get(`/auth/orgs/${encodeURIComponent(orgId)}/iam-users/${encodeURIComponent(iamUserId)}/sessions`, void 0, options);
|
|
2874
|
+
}
|
|
2875
|
+
/** End one of an IAM user's sessions (its current access lapses within 15 minutes). Requires `roles:grant`. */
|
|
2876
|
+
async endUserSession(orgId, iamUserId, sessionId, options) {
|
|
2877
|
+
return this.client.post(
|
|
2878
|
+
`/auth/orgs/${encodeURIComponent(orgId)}/iam-users/${encodeURIComponent(iamUserId)}/sessions/${encodeURIComponent(sessionId)}/revoke`,
|
|
2879
|
+
void 0,
|
|
2880
|
+
options
|
|
2881
|
+
);
|
|
2882
|
+
}
|
|
2883
|
+
/** Sign an IAM user out of every device now, without disabling them. Requires `roles:grant`. */
|
|
2884
|
+
async endAllUserSessions(orgId, iamUserId, options) {
|
|
2885
|
+
return this.client.post(`/auth/orgs/${encodeURIComponent(orgId)}/iam-users/${encodeURIComponent(iamUserId)}/sessions/revoke-all`, void 0, options);
|
|
2886
|
+
}
|
|
2887
|
+
/** An IAM user's recent sign-in attempts, successful and refused. Requires `roles:grant`. */
|
|
2888
|
+
async listUserSignIns(orgId, iamUserId, params, options) {
|
|
2889
|
+
return this.client.get(
|
|
2890
|
+
`/auth/orgs/${encodeURIComponent(orgId)}/iam-users/${encodeURIComponent(iamUserId)}/signins`,
|
|
2891
|
+
params,
|
|
2892
|
+
options
|
|
2893
|
+
);
|
|
2894
|
+
}
|
|
2837
2895
|
/** List this IAM principal's enrolled second-factor methods. */
|
|
2838
2896
|
async listMethods(options) {
|
|
2839
2897
|
return this.client.get("/auth/iam/2fa/methods", void 0, options);
|