@mitumba/sdk 5.17.1 → 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 +339 -81
- package/dist/index.d.ts +339 -81
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +84 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2398,6 +2398,50 @@ var AdminModule = class {
|
|
|
2398
2398
|
async reinstateReview(reviewId, options) {
|
|
2399
2399
|
return this.client.post(`/admin/reviews/${reviewId}/reinstate`, void 0, options);
|
|
2400
2400
|
}
|
|
2401
|
+
// ── Messaging safety reports ──
|
|
2402
|
+
/**
|
|
2403
|
+
* The messaging safety queue: reported conversations and messages, oldest first, 25 per page.
|
|
2404
|
+
* Each report carries the reported side's recent risk signals and a `priority` derived from them;
|
|
2405
|
+
* priority orders the queue and decides nothing. Requires `admin:read`.
|
|
2406
|
+
*/
|
|
2407
|
+
async listMessageReports(params, options) {
|
|
2408
|
+
return this.client.get("/admin/message-reports", params, options);
|
|
2409
|
+
}
|
|
2410
|
+
/**
|
|
2411
|
+
* Open one report for review: the report, up to 100 messages of its thread as delivered, and the
|
|
2412
|
+
* unmasked original of the reported message when one exists and may be released. Requires
|
|
2413
|
+
* `audit:read` and a recent passkey sign-in (403 `reauthentication_required` otherwise). Opening a
|
|
2414
|
+
* report is recorded on the audit trail.
|
|
2415
|
+
*/
|
|
2416
|
+
async getMessageReport(reportId, options) {
|
|
2417
|
+
return this.client.get(`/admin/message-reports/${encodeURIComponent(reportId)}`, void 0, options);
|
|
2418
|
+
}
|
|
2419
|
+
/**
|
|
2420
|
+
* Resolve an open report. `upheld` records a risk signal against the reported side. Requires
|
|
2421
|
+
* `listings:moderate`. Resolving with the same status and outcome again is a safe retry
|
|
2422
|
+
* (`deduplicated: true`); a different resolution of an already resolved report is 409.
|
|
2423
|
+
*/
|
|
2424
|
+
async resolveMessageReport(reportId, input, options) {
|
|
2425
|
+
return this.client.post(`/admin/message-reports/${encodeURIComponent(reportId)}/resolve`, input, options);
|
|
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
|
+
}
|
|
2401
2445
|
// ── VAZI Moderation ──
|
|
2402
2446
|
async listVaziOutfits(params, options) {
|
|
2403
2447
|
return this.client.get("/admin/vazi/outfits", params, options);
|
|
@@ -2808,6 +2852,46 @@ var IamModule = class {
|
|
|
2808
2852
|
async me(options) {
|
|
2809
2853
|
return this.client.get("/auth/iam/me", void 0, options);
|
|
2810
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
|
+
}
|
|
2811
2895
|
/** List this IAM principal's enrolled second-factor methods. */
|
|
2812
2896
|
async listMethods(options) {
|
|
2813
2897
|
return this.client.get("/auth/iam/2fa/methods", void 0, options);
|