@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.ts CHANGED
@@ -841,6 +841,86 @@ interface MessagingBlockRemovedResult {
841
841
  active: false;
842
842
  }
843
843
 
844
+ /** @deprecated Use ConversationSummary from Messaging v2. */
845
+ interface Conversation {
846
+ partner_id: string;
847
+ partner_name: string;
848
+ store_name?: string | null;
849
+ body: string;
850
+ created_at: string;
851
+ store_id?: string | null;
852
+ listing_id?: string | null;
853
+ listing_title?: string | null;
854
+ unread_count: number;
855
+ }
856
+ /** @deprecated Use ThreadMessage from Messaging v2. */
857
+ interface Message {
858
+ id: string;
859
+ sender_id: string;
860
+ receiver_id: string;
861
+ body: string;
862
+ listing_id: string | null;
863
+ store_id: string | null;
864
+ order_id?: string | null;
865
+ from_store?: number;
866
+ read_at: string | null;
867
+ created_at: string;
868
+ }
869
+ /** @deprecated Resolve a thread and use SendThreadMessageInput. Context fields are server-validated hints. */
870
+ interface SendMessageInput {
871
+ receiver_id: string;
872
+ body: string;
873
+ listing_id?: string;
874
+ store_id?: string;
875
+ order_id?: string;
876
+ from_store?: boolean;
877
+ }
878
+ /** @deprecated Use validated managed Messaging realtime events. */
879
+ interface InboxRealtimeEvent {
880
+ type: 'message';
881
+ conversation_key: string;
882
+ partner_id: string;
883
+ store_id?: string | null;
884
+ from_store?: boolean;
885
+ preview: string;
886
+ created_at: string;
887
+ unread_count?: number;
888
+ }
889
+ /** Recipient-safe reason for a message or conversation report. */
890
+ type MessageReportReason = 'off_platform_payment' | 'contact_sharing' | 'spam' | 'scam' | 'harassment' | 'counterfeit' | 'offensive' | 'other';
891
+ /** Typed report input for a message or buyer/store conversation. */
892
+ type CreateMessageReportInput = {
893
+ subject_kind: 'message';
894
+ message_id: string;
895
+ reason: MessageReportReason;
896
+ detail?: string;
897
+ } | {
898
+ subject_kind: 'conversation';
899
+ partner_id: string;
900
+ store_id: string;
901
+ reason: MessageReportReason;
902
+ detail?: string;
903
+ };
904
+ /** Idempotent open-report result. */
905
+ interface CreateMessageReportResult {
906
+ id: string;
907
+ status: 'open';
908
+ deduplicated: boolean;
909
+ }
910
+ /** Context used to block one buyer/store relationship. */
911
+ interface CreateMessageBlockInput {
912
+ partner_id: string;
913
+ store_id: string;
914
+ from_store?: boolean;
915
+ reason?: string;
916
+ }
917
+ /** Idempotent active-block result. */
918
+ interface CreateMessageBlockResult {
919
+ id: string;
920
+ active: true;
921
+ deduplicated: boolean;
922
+ }
923
+
844
924
  interface BlockedIp {
845
925
  ip: string;
846
926
  reason: string;
@@ -988,6 +1068,114 @@ interface AdminPayoutItem {
988
1068
  status: 'pending' | 'sent' | 'failed';
989
1069
  on_hold: boolean;
990
1070
  created_at: string;
1071
+ /**
1072
+ * True for a Daraja payout that was submitted (`sent`) but whose provider reference was never
1073
+ * stored, so its result cannot be matched. Repair it with `admin.repairPayoutCorrelation()`.
1074
+ */
1075
+ needs_correlation?: boolean;
1076
+ }
1077
+ type MessageReportStatus = 'open' | 'reviewed' | 'dismissed' | 'actioned';
1078
+ type MessageReportOutcome = 'upheld' | 'not_upheld';
1079
+ type MessagingSide = 'buyer' | 'store';
1080
+ /** One reported conversation or message in the safety queue, from `admin.listMessageReports()`. */
1081
+ interface AdminMessageReport {
1082
+ id: string;
1083
+ reporter_principal_kind: MessagingSide;
1084
+ reporter_principal_id: string;
1085
+ conversation_id: string;
1086
+ thread_id: string;
1087
+ message_id: string | null;
1088
+ subject_kind: 'conversation' | 'message';
1089
+ /** The side of the conversation being reported. */
1090
+ reported_side: MessagingSide;
1091
+ reason: MessageReportReason | string;
1092
+ detail: string | null;
1093
+ status: MessageReportStatus;
1094
+ outcome: MessageReportOutcome | null;
1095
+ created_at: string;
1096
+ thread_kind: string;
1097
+ thread_title: string | null;
1098
+ /** The reported message as delivered (contact details already masked), when one is reported. */
1099
+ message_body: string | null;
1100
+ /** 1 when the platform masked part of the delivered message. */
1101
+ body_modified: number | null;
1102
+ /** The reported principal (a buyer's users.id or a store id). */
1103
+ subject_principal_id: string;
1104
+ /** Masked contact or payment attempts by the reported principal in the last 24 hours. */
1105
+ masked_attempts_24h: number;
1106
+ /** Reports against the reported principal upheld in the last 30 days. */
1107
+ upheld_reports_30d: number;
1108
+ /** `high` once either signal reaches its threshold. It orders the queue; it decides nothing. */
1109
+ priority: 'high' | 'standard';
1110
+ }
1111
+ interface AdminMessageReportList {
1112
+ data: AdminMessageReport[];
1113
+ page: number;
1114
+ page_size: number;
1115
+ thresholds: {
1116
+ masked_attempts_24h: number;
1117
+ upheld_reports_30d: number;
1118
+ effect: 'queue_priority_only';
1119
+ };
1120
+ }
1121
+ /** One message of the reported thread, as delivered. */
1122
+ interface AdminMessageReportThreadMessage {
1123
+ id: string;
1124
+ sender_id: string;
1125
+ receiver_id: string | null;
1126
+ body: string;
1127
+ body_modified: number;
1128
+ body_policy_version: string | null;
1129
+ body_policy_notices: string | null;
1130
+ author_side: MessagingSide | null;
1131
+ sequence: number | null;
1132
+ created_at: string;
1133
+ }
1134
+ /**
1135
+ * A report opened for review, from `admin.getMessageReport()`. Opening one is recorded on the audit
1136
+ * trail, and so is whether the unmasked original was released.
1137
+ */
1138
+ interface AdminMessageReportDetail {
1139
+ id: string;
1140
+ reporter_user_id: string;
1141
+ reporter_principal_kind: MessagingSide;
1142
+ reporter_principal_id: string;
1143
+ conversation_id: string;
1144
+ thread_id: string;
1145
+ message_id: string | null;
1146
+ subject_kind: 'conversation' | 'message';
1147
+ reported_side: MessagingSide;
1148
+ reason: MessageReportReason | string;
1149
+ detail: string | null;
1150
+ status: MessageReportStatus;
1151
+ outcome: MessageReportOutcome | null;
1152
+ resolution_note: string | null;
1153
+ resolved_by: string | null;
1154
+ resolved_at: string | null;
1155
+ created_at: string;
1156
+ thread_kind: string;
1157
+ thread_title: string | null;
1158
+ buyer_id: string;
1159
+ store_id: string;
1160
+ /** Up to 100 messages of the thread, oldest first. */
1161
+ thread: AdminMessageReportThreadMessage[];
1162
+ /** The reported message before masking, when it was masked and may be released; otherwise null. */
1163
+ restricted_original: string | null;
1164
+ restricted_original_available: boolean;
1165
+ }
1166
+ interface ResolveMessageReportInput {
1167
+ status: Exclude<MessageReportStatus, 'open'>;
1168
+ /** `upheld` records a risk signal against the reported side; `not_upheld` records none. */
1169
+ outcome: MessageReportOutcome;
1170
+ /** At most 1000 characters. */
1171
+ note?: string;
1172
+ }
1173
+ interface ResolveMessageReportResult {
1174
+ ok: true;
1175
+ status: Exclude<MessageReportStatus, 'open'>;
1176
+ outcome: MessageReportOutcome;
1177
+ /** True when the same resolution had already been recorded (a safe retry). */
1178
+ deduplicated: boolean;
991
1179
  }
992
1180
  interface AdminReport {
993
1181
  id: string;
@@ -1272,6 +1460,56 @@ interface LibraryListing {
1272
1460
  /** True when the caller holds `library:read_all` and so sees every document. */
1273
1461
  can_read_all: boolean;
1274
1462
  }
1463
+ type PlatformSettingKind = 'boolean' | 'domains' | 'text';
1464
+ type PlatformSettingGroup = 'Sign-in' | 'Operator access' | 'Messaging' | 'Payments' | 'Other';
1465
+ /** One platform setting with its current value, from `admin.listSettings()`. */
1466
+ interface PlatformSetting {
1467
+ key: string;
1468
+ label: string;
1469
+ description: string;
1470
+ group: PlatformSettingGroup;
1471
+ kind: PlatformSettingKind;
1472
+ /** True when `admin.changeSetting()` may change it (with `roles:grant` and a recent passkey). */
1473
+ editable: boolean;
1474
+ /** What changing it does to real people; shown before a change. */
1475
+ warning?: string;
1476
+ /** For read-only settings: where they are changed instead. */
1477
+ managedBy?: string;
1478
+ /** Shown when the setting has never been set. */
1479
+ defaultValue?: string;
1480
+ /** The current value, or null when never set (the default applies). */
1481
+ value: string | null;
1482
+ is_default: boolean;
1483
+ changed_at: string | null;
1484
+ changed_by: string | null;
1485
+ reason: string | null;
1486
+ /** How many times it has been set. */
1487
+ changes: number;
1488
+ }
1489
+ interface PlatformSettingChange {
1490
+ id: string;
1491
+ key: string;
1492
+ value: string;
1493
+ changed_by: string;
1494
+ reason: string | null;
1495
+ effective_at: string;
1496
+ }
1497
+ interface PlatformSettingDetail {
1498
+ setting: PlatformSetting;
1499
+ /** Newest first, at most 50. */
1500
+ history: PlatformSettingChange[];
1501
+ }
1502
+ interface ChangePlatformSettingInput {
1503
+ value: string;
1504
+ /** Why, in 3 to 500 characters. Recorded with the change and on the audit trail. */
1505
+ reason: string;
1506
+ }
1507
+ interface ChangePlatformSettingResult {
1508
+ ok: true;
1509
+ /** True when the value was already this; nothing was recorded. */
1510
+ unchanged: boolean;
1511
+ setting: PlatformSetting;
1512
+ }
1275
1513
 
1276
1514
  interface AuthTokens {
1277
1515
  access_token: string;
@@ -2368,86 +2606,6 @@ interface VaziFeedResponse {
2368
2606
  offset: number;
2369
2607
  }
2370
2608
 
2371
- /** @deprecated Use ConversationSummary from Messaging v2. */
2372
- interface Conversation {
2373
- partner_id: string;
2374
- partner_name: string;
2375
- store_name?: string | null;
2376
- body: string;
2377
- created_at: string;
2378
- store_id?: string | null;
2379
- listing_id?: string | null;
2380
- listing_title?: string | null;
2381
- unread_count: number;
2382
- }
2383
- /** @deprecated Use ThreadMessage from Messaging v2. */
2384
- interface Message {
2385
- id: string;
2386
- sender_id: string;
2387
- receiver_id: string;
2388
- body: string;
2389
- listing_id: string | null;
2390
- store_id: string | null;
2391
- order_id?: string | null;
2392
- from_store?: number;
2393
- read_at: string | null;
2394
- created_at: string;
2395
- }
2396
- /** @deprecated Resolve a thread and use SendThreadMessageInput. Context fields are server-validated hints. */
2397
- interface SendMessageInput {
2398
- receiver_id: string;
2399
- body: string;
2400
- listing_id?: string;
2401
- store_id?: string;
2402
- order_id?: string;
2403
- from_store?: boolean;
2404
- }
2405
- /** @deprecated Use validated managed Messaging realtime events. */
2406
- interface InboxRealtimeEvent {
2407
- type: 'message';
2408
- conversation_key: string;
2409
- partner_id: string;
2410
- store_id?: string | null;
2411
- from_store?: boolean;
2412
- preview: string;
2413
- created_at: string;
2414
- unread_count?: number;
2415
- }
2416
- /** Recipient-safe reason for a message or conversation report. */
2417
- type MessageReportReason = 'off_platform_payment' | 'contact_sharing' | 'spam' | 'scam' | 'harassment' | 'counterfeit' | 'offensive' | 'other';
2418
- /** Typed report input for a message or buyer/store conversation. */
2419
- type CreateMessageReportInput = {
2420
- subject_kind: 'message';
2421
- message_id: string;
2422
- reason: MessageReportReason;
2423
- detail?: string;
2424
- } | {
2425
- subject_kind: 'conversation';
2426
- partner_id: string;
2427
- store_id: string;
2428
- reason: MessageReportReason;
2429
- detail?: string;
2430
- };
2431
- /** Idempotent open-report result. */
2432
- interface CreateMessageReportResult {
2433
- id: string;
2434
- status: 'open';
2435
- deduplicated: boolean;
2436
- }
2437
- /** Context used to block one buyer/store relationship. */
2438
- interface CreateMessageBlockInput {
2439
- partner_id: string;
2440
- store_id: string;
2441
- from_store?: boolean;
2442
- reason?: string;
2443
- }
2444
- /** Idempotent active-block result. */
2445
- interface CreateMessageBlockResult {
2446
- id: string;
2447
- active: true;
2448
- deduplicated: boolean;
2449
- }
2450
-
2451
2609
  type NotificationType = 'order' | 'message' | 'price_drop' | 'offer' | 'payout' | 'system';
2452
2610
  interface Notification {
2453
2611
  id: string;
@@ -3015,6 +3173,43 @@ interface IamPasskeyLoginOptions {
3015
3173
  interface IamMethodsResult {
3016
3174
  methods: TwoFactorMethod[];
3017
3175
  }
3176
+ /** One live sign-in session of an IAM user. */
3177
+ interface IamSession {
3178
+ id: string;
3179
+ /** The browser or device that signed in, as it identified itself. */
3180
+ device: string;
3181
+ ip_address: string | null;
3182
+ created_at: string;
3183
+ /** Updated whenever the session renews its access, roughly every 15 minutes while in use. */
3184
+ last_active_at: string;
3185
+ expires_at: string;
3186
+ /** How the session signed in (`passkey`, `totp`, `password`), when recorded. */
3187
+ strength: string | null;
3188
+ /** True for the session making the request (always false in administration views). */
3189
+ current: boolean;
3190
+ }
3191
+ interface IamSessionsResult {
3192
+ sessions: IamSession[];
3193
+ }
3194
+ /** Why a sign-in was refused. New reasons may be added; treat unknown values as opaque. */
3195
+ type IamSignInFailureReason = 'unknown_user' | 'not_activated' | 'wrong_password' | 'principal_disabled' | 'organization_suspended' | 'invalid_code' | 'passkey_not_recognised' | 'passkey_unverified' | 'too_many_codes';
3196
+ /** One sign-in attempt against an IAM user, successful or refused. */
3197
+ interface IamSignIn {
3198
+ id: string;
3199
+ at: string;
3200
+ outcome: 'ok' | 'failed';
3201
+ /** The step the attempt reached: `password`, `totp` or `passkey`. */
3202
+ step: string | null;
3203
+ reason: IamSignInFailureReason | string | null;
3204
+ strength: string | null;
3205
+ /** This attempt reached the limit; further attempts were refused for a while. */
3206
+ locked: boolean;
3207
+ ip: string | null;
3208
+ device: string | null;
3209
+ }
3210
+ interface IamSignInsResult {
3211
+ signins: IamSignIn[];
3212
+ }
3018
3213
 
3019
3214
  interface MitumbaClientConfig {
3020
3215
  baseUrl: string;
@@ -4327,6 +4522,7 @@ declare class AdminModule {
4327
4522
  listPayouts(params?: {
4328
4523
  status?: 'pending' | 'sent' | 'failed';
4329
4524
  on_hold?: 0 | 1;
4525
+ needs_correlation?: 0 | 1;
4330
4526
  page?: number;
4331
4527
  }, options?: RequestOptions): Promise<{
4332
4528
  data: AdminPayoutItem[];
@@ -4358,6 +4554,41 @@ declare class AdminModule {
4358
4554
  ok: true;
4359
4555
  hidden: false;
4360
4556
  }>;
4557
+ /**
4558
+ * The messaging safety queue: reported conversations and messages, oldest first, 25 per page.
4559
+ * Each report carries the reported side's recent risk signals and a `priority` derived from them;
4560
+ * priority orders the queue and decides nothing. Requires `admin:read`.
4561
+ */
4562
+ listMessageReports(params?: {
4563
+ status?: MessageReportStatus;
4564
+ page?: number;
4565
+ }, options?: RequestOptions): Promise<AdminMessageReportList>;
4566
+ /**
4567
+ * Open one report for review: the report, up to 100 messages of its thread as delivered, and the
4568
+ * unmasked original of the reported message when one exists and may be released. Requires
4569
+ * `audit:read` and a recent passkey sign-in (403 `reauthentication_required` otherwise). Opening a
4570
+ * report is recorded on the audit trail.
4571
+ */
4572
+ getMessageReport(reportId: string, options?: RequestOptions): Promise<AdminMessageReportDetail>;
4573
+ /**
4574
+ * Resolve an open report. `upheld` records a risk signal against the reported side. Requires
4575
+ * `listings:moderate`. Resolving with the same status and outcome again is a safe retry
4576
+ * (`deduplicated: true`); a different resolution of an already resolved report is 409.
4577
+ */
4578
+ resolveMessageReport(reportId: string, input: ResolveMessageReportInput, options?: RequestOptions): Promise<ResolveMessageReportResult>;
4579
+ /** Every platform setting with its current value and whether it can be changed here. Requires `admin:read`. */
4580
+ listSettings(options?: RequestOptions): Promise<{
4581
+ settings: PlatformSetting[];
4582
+ }>;
4583
+ /** One setting and its change history, newest first. Requires `admin:read`. */
4584
+ getSetting(key: string, options?: RequestOptions): Promise<PlatformSettingDetail>;
4585
+ /**
4586
+ * Change an editable setting. Requires `roles:grant` and a recent passkey (403
4587
+ * `reauthentication_required` otherwise). Errors: 403 `not_editable` for payment and messaging
4588
+ * settings, 400 `invalid_value`, 409 `would_lock_you_out` when an operator-domain change would
4589
+ * remove the caller's own domain. Recorded on the audit trail as `config.changed`.
4590
+ */
4591
+ changeSetting(key: string, input: ChangePlatformSettingInput, options?: RequestOptions): Promise<ChangePlatformSettingResult>;
4361
4592
  listVaziOutfits(params?: {
4362
4593
  page?: number;
4363
4594
  }, options?: RequestOptions): Promise<{
@@ -4726,6 +4957,33 @@ declare class IamModule {
4726
4957
  }>;
4727
4958
  /** Get the current IAM principal, organization and effective access state. */
4728
4959
  me(options?: RequestOptions): Promise<IamProfile>;
4960
+ /** This IAM user's live sessions, most recently active first; `current` marks this one. */
4961
+ listSessions(options?: RequestOptions): Promise<IamSessionsResult>;
4962
+ /**
4963
+ * End one of this IAM user's sessions. It can no longer be renewed; its current access lapses
4964
+ * within 15 minutes. 404 for a session that does not exist or is not this user's.
4965
+ */
4966
+ endSession(sessionId: string, options?: RequestOptions): Promise<{
4967
+ ok: true;
4968
+ }>;
4969
+ /** This IAM user's recent sign-in attempts, newest first, successful and refused (at most 100). */
4970
+ listSignIns(params?: {
4971
+ limit?: number;
4972
+ }, options?: RequestOptions): Promise<IamSignInsResult>;
4973
+ /** An IAM user's live sessions. Requires `roles:grant`; IAM users cannot call it. */
4974
+ listUserSessions(orgId: string, iamUserId: string, options?: RequestOptions): Promise<IamSessionsResult>;
4975
+ /** End one of an IAM user's sessions (its current access lapses within 15 minutes). Requires `roles:grant`. */
4976
+ endUserSession(orgId: string, iamUserId: string, sessionId: string, options?: RequestOptions): Promise<{
4977
+ ok: true;
4978
+ }>;
4979
+ /** Sign an IAM user out of every device now, without disabling them. Requires `roles:grant`. */
4980
+ endAllUserSessions(orgId: string, iamUserId: string, options?: RequestOptions): Promise<{
4981
+ ok: true;
4982
+ }>;
4983
+ /** An IAM user's recent sign-in attempts, successful and refused. Requires `roles:grant`. */
4984
+ listUserSignIns(orgId: string, iamUserId: string, params?: {
4985
+ limit?: number;
4986
+ }, options?: RequestOptions): Promise<IamSignInsResult>;
4729
4987
  /** List this IAM principal's enrolled second-factor methods. */
4730
4988
  listMethods(options?: RequestOptions): Promise<IamMethodsResult>;
4731
4989
  /** Begin adding an authenticator app or passkey. */
@@ -4945,4 +5203,4 @@ declare class MitumbaClient {
4945
5203
  isAuthenticated(): Promise<boolean>;
4946
5204
  }
4947
5205
 
4948
- export { APIClient, APIError, type APIErrorResponse, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminReport, type AdminRolePreset, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutStatus, type CheckoutStatusResponse, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type Jwk, type Jwks, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportReason, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type ResetPasswordInput, type ResolveDisputeInput, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type ShareUrlOptions, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreResolveThreadInput, type StoreReviewsPage, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isConsentRequired, isMessagingAPIError, isValidPhone, listingShareUrl, maskPhone, normalizePhone, regionById, storeShareUrl };
5206
+ export { APIClient, APIError, type APIErrorResponse, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, type AdminMessageReport, type AdminMessageReportDetail, type AdminMessageReportList, type AdminMessageReportThreadMessage, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminReport, type AdminRolePreset, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type ChangePlatformSettingInput, type ChangePlatformSettingResult, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutStatus, type CheckoutStatusResponse, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamSession, type IamSessionsResult, type IamSignIn, type IamSignInFailureReason, type IamSignInsResult, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type Jwk, type Jwks, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportOutcome, type MessageReportReason, type MessageReportStatus, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, type MessagingSide, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PlatformSetting, type PlatformSettingChange, type PlatformSettingDetail, type PlatformSettingGroup, type PlatformSettingKind, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type ShareUrlOptions, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreResolveThreadInput, type StoreReviewsPage, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isConsentRequired, isMessagingAPIError, isValidPhone, listingShareUrl, maskPhone, normalizePhone, regionById, storeShareUrl };
package/dist/index.js CHANGED
@@ -2400,6 +2400,50 @@ var AdminModule = class {
2400
2400
  async reinstateReview(reviewId, options) {
2401
2401
  return this.client.post(`/admin/reviews/${reviewId}/reinstate`, void 0, options);
2402
2402
  }
2403
+ // ── Messaging safety reports ──
2404
+ /**
2405
+ * The messaging safety queue: reported conversations and messages, oldest first, 25 per page.
2406
+ * Each report carries the reported side's recent risk signals and a `priority` derived from them;
2407
+ * priority orders the queue and decides nothing. Requires `admin:read`.
2408
+ */
2409
+ async listMessageReports(params, options) {
2410
+ return this.client.get("/admin/message-reports", params, options);
2411
+ }
2412
+ /**
2413
+ * Open one report for review: the report, up to 100 messages of its thread as delivered, and the
2414
+ * unmasked original of the reported message when one exists and may be released. Requires
2415
+ * `audit:read` and a recent passkey sign-in (403 `reauthentication_required` otherwise). Opening a
2416
+ * report is recorded on the audit trail.
2417
+ */
2418
+ async getMessageReport(reportId, options) {
2419
+ return this.client.get(`/admin/message-reports/${encodeURIComponent(reportId)}`, void 0, options);
2420
+ }
2421
+ /**
2422
+ * Resolve an open report. `upheld` records a risk signal against the reported side. Requires
2423
+ * `listings:moderate`. Resolving with the same status and outcome again is a safe retry
2424
+ * (`deduplicated: true`); a different resolution of an already resolved report is 409.
2425
+ */
2426
+ async resolveMessageReport(reportId, input, options) {
2427
+ return this.client.post(`/admin/message-reports/${encodeURIComponent(reportId)}/resolve`, input, options);
2428
+ }
2429
+ // ── Platform settings ──
2430
+ /** Every platform setting with its current value and whether it can be changed here. Requires `admin:read`. */
2431
+ async listSettings(options) {
2432
+ return this.client.get("/admin/settings", void 0, options);
2433
+ }
2434
+ /** One setting and its change history, newest first. Requires `admin:read`. */
2435
+ async getSetting(key, options) {
2436
+ return this.client.get(`/admin/settings/${encodeURIComponent(key)}`, void 0, options);
2437
+ }
2438
+ /**
2439
+ * Change an editable setting. Requires `roles:grant` and a recent passkey (403
2440
+ * `reauthentication_required` otherwise). Errors: 403 `not_editable` for payment and messaging
2441
+ * settings, 400 `invalid_value`, 409 `would_lock_you_out` when an operator-domain change would
2442
+ * remove the caller's own domain. Recorded on the audit trail as `config.changed`.
2443
+ */
2444
+ async changeSetting(key, input, options) {
2445
+ return this.client.put(`/admin/settings/${encodeURIComponent(key)}`, input, options);
2446
+ }
2403
2447
  // ── VAZI Moderation ──
2404
2448
  async listVaziOutfits(params, options) {
2405
2449
  return this.client.get("/admin/vazi/outfits", params, options);
@@ -2810,6 +2854,46 @@ var IamModule = class {
2810
2854
  async me(options) {
2811
2855
  return this.client.get("/auth/iam/me", void 0, options);
2812
2856
  }
2857
+ // ── Sessions and sign-in history ──
2858
+ /** This IAM user's live sessions, most recently active first; `current` marks this one. */
2859
+ async listSessions(options) {
2860
+ return this.client.get("/auth/iam/sessions", void 0, options);
2861
+ }
2862
+ /**
2863
+ * End one of this IAM user's sessions. It can no longer be renewed; its current access lapses
2864
+ * within 15 minutes. 404 for a session that does not exist or is not this user's.
2865
+ */
2866
+ async endSession(sessionId, options) {
2867
+ return this.client.post(`/auth/iam/sessions/${encodeURIComponent(sessionId)}/revoke`, void 0, options);
2868
+ }
2869
+ /** This IAM user's recent sign-in attempts, newest first, successful and refused (at most 100). */
2870
+ async listSignIns(params, options) {
2871
+ return this.client.get("/auth/iam/signins", params, options);
2872
+ }
2873
+ /** An IAM user's live sessions. Requires `roles:grant`; IAM users cannot call it. */
2874
+ async listUserSessions(orgId, iamUserId, options) {
2875
+ return this.client.get(`/auth/orgs/${encodeURIComponent(orgId)}/iam-users/${encodeURIComponent(iamUserId)}/sessions`, void 0, options);
2876
+ }
2877
+ /** End one of an IAM user's sessions (its current access lapses within 15 minutes). Requires `roles:grant`. */
2878
+ async endUserSession(orgId, iamUserId, sessionId, options) {
2879
+ return this.client.post(
2880
+ `/auth/orgs/${encodeURIComponent(orgId)}/iam-users/${encodeURIComponent(iamUserId)}/sessions/${encodeURIComponent(sessionId)}/revoke`,
2881
+ void 0,
2882
+ options
2883
+ );
2884
+ }
2885
+ /** Sign an IAM user out of every device now, without disabling them. Requires `roles:grant`. */
2886
+ async endAllUserSessions(orgId, iamUserId, options) {
2887
+ return this.client.post(`/auth/orgs/${encodeURIComponent(orgId)}/iam-users/${encodeURIComponent(iamUserId)}/sessions/revoke-all`, void 0, options);
2888
+ }
2889
+ /** An IAM user's recent sign-in attempts, successful and refused. Requires `roles:grant`. */
2890
+ async listUserSignIns(orgId, iamUserId, params, options) {
2891
+ return this.client.get(
2892
+ `/auth/orgs/${encodeURIComponent(orgId)}/iam-users/${encodeURIComponent(iamUserId)}/signins`,
2893
+ params,
2894
+ options
2895
+ );
2896
+ }
2813
2897
  /** List this IAM principal's enrolled second-factor methods. */
2814
2898
  async listMethods(options) {
2815
2899
  return this.client.get("/auth/iam/2fa/methods", void 0, options);