@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 CHANGED
@@ -1460,6 +1460,56 @@ interface LibraryListing {
1460
1460
  /** True when the caller holds `library:read_all` and so sees every document. */
1461
1461
  can_read_all: boolean;
1462
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
+ }
1463
1513
 
1464
1514
  interface AuthTokens {
1465
1515
  access_token: string;
@@ -3123,6 +3173,43 @@ interface IamPasskeyLoginOptions {
3123
3173
  interface IamMethodsResult {
3124
3174
  methods: TwoFactorMethod[];
3125
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
+ }
3126
3213
 
3127
3214
  interface MitumbaClientConfig {
3128
3215
  baseUrl: string;
@@ -4489,6 +4576,19 @@ declare class AdminModule {
4489
4576
  * (`deduplicated: true`); a different resolution of an already resolved report is 409.
4490
4577
  */
4491
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>;
4492
4592
  listVaziOutfits(params?: {
4493
4593
  page?: number;
4494
4594
  }, options?: RequestOptions): Promise<{
@@ -4857,6 +4957,33 @@ declare class IamModule {
4857
4957
  }>;
4858
4958
  /** Get the current IAM principal, organization and effective access state. */
4859
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>;
4860
4987
  /** List this IAM principal's enrolled second-factor methods. */
4861
4988
  listMethods(options?: RequestOptions): Promise<IamMethodsResult>;
4862
4989
  /** Begin adding an authenticator app or passkey. */
@@ -5076,4 +5203,4 @@ declare class MitumbaClient {
5076
5203
  isAuthenticated(): Promise<boolean>;
5077
5204
  }
5078
5205
 
5079
- 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 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 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 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 };
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.d.ts CHANGED
@@ -1460,6 +1460,56 @@ interface LibraryListing {
1460
1460
  /** True when the caller holds `library:read_all` and so sees every document. */
1461
1461
  can_read_all: boolean;
1462
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
+ }
1463
1513
 
1464
1514
  interface AuthTokens {
1465
1515
  access_token: string;
@@ -3123,6 +3173,43 @@ interface IamPasskeyLoginOptions {
3123
3173
  interface IamMethodsResult {
3124
3174
  methods: TwoFactorMethod[];
3125
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
+ }
3126
3213
 
3127
3214
  interface MitumbaClientConfig {
3128
3215
  baseUrl: string;
@@ -4489,6 +4576,19 @@ declare class AdminModule {
4489
4576
  * (`deduplicated: true`); a different resolution of an already resolved report is 409.
4490
4577
  */
4491
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>;
4492
4592
  listVaziOutfits(params?: {
4493
4593
  page?: number;
4494
4594
  }, options?: RequestOptions): Promise<{
@@ -4857,6 +4957,33 @@ declare class IamModule {
4857
4957
  }>;
4858
4958
  /** Get the current IAM principal, organization and effective access state. */
4859
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>;
4860
4987
  /** List this IAM principal's enrolled second-factor methods. */
4861
4988
  listMethods(options?: RequestOptions): Promise<IamMethodsResult>;
4862
4989
  /** Begin adding an authenticator app or passkey. */
@@ -5076,4 +5203,4 @@ declare class MitumbaClient {
5076
5203
  isAuthenticated(): Promise<boolean>;
5077
5204
  }
5078
5205
 
5079
- 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 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 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 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 };
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
@@ -2426,6 +2426,24 @@ var AdminModule = class {
2426
2426
  async resolveMessageReport(reportId, input, options) {
2427
2427
  return this.client.post(`/admin/message-reports/${encodeURIComponent(reportId)}/resolve`, input, options);
2428
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
+ }
2429
2447
  // ── VAZI Moderation ──
2430
2448
  async listVaziOutfits(params, options) {
2431
2449
  return this.client.get("/admin/vazi/outfits", params, options);
@@ -2836,6 +2854,46 @@ var IamModule = class {
2836
2854
  async me(options) {
2837
2855
  return this.client.get("/auth/iam/me", void 0, options);
2838
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
+ }
2839
2897
  /** List this IAM principal's enrolled second-factor methods. */
2840
2898
  async listMethods(options) {
2841
2899
  return this.client.get("/auth/iam/2fa/methods", void 0, options);