@mitumba/sdk 5.13.0 → 5.14.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/README.md CHANGED
@@ -30,7 +30,7 @@ Initialize the client with the environment's base URL:
30
30
  import { MitumbaClient } from '@mitumba/sdk'
31
31
 
32
32
  const mitumba = new MitumbaClient({
33
- baseUrl: 'https://api.mitumba.stanl.ink'
33
+ baseUrl: 'https://api.mitumba.africa'
34
34
  })
35
35
  ```
36
36
 
package/dist/index.d.mts CHANGED
@@ -1018,7 +1018,7 @@ interface CreateReportInput {
1018
1018
  reason: 'counterfeit' | 'offensive' | 'spam' | 'scam' | 'other';
1019
1019
  detail?: string;
1020
1020
  }
1021
- type AdminPermission = 'admin:read' | 'users:moderate' | 'ip:block' | 'listings:moderate' | 'orders:transition' | 'payouts:disburse' | 'sellers:verify' | 'recovery:review' | 'broadcast:send' | 'roles:grant' | 'audit:read';
1021
+ type AdminPermission = 'admin:read' | 'users:moderate' | 'ip:block' | 'listings:moderate' | 'orders:transition' | 'payouts:disburse' | 'sellers:verify' | 'recovery:review' | 'broadcast:send' | 'clients:manage' | 'oidc:rotate_keys' | 'roles:grant' | 'audit:read';
1022
1022
  type AdminAuthStrength = 'password' | 'sms' | 'email' | 'totp' | 'passkey';
1023
1023
  interface AdminRolePreset {
1024
1024
  id: string;
@@ -1113,6 +1113,50 @@ interface AdminWholesalePendingStore {
1113
1113
  review_note?: string | null;
1114
1114
  [key: string]: unknown;
1115
1115
  }
1116
+ /** `public` clients (browser SPAs, mobile) use PKCE and have no secret; `confidential` clients have a server-side secret. */
1117
+ type OAuthClientType = 'public' | 'confidential';
1118
+ /** `first_party_implicit` skips the consent screen; `first_party_consent` shows it. */
1119
+ type OAuthClientTrustLevel = 'first_party_implicit' | 'first_party_consent';
1120
+ /** A registered sign-in (relying-party) client as listed by `admin.listOAuthClients()`. Never carries a secret. */
1121
+ interface OAuthClientSummary {
1122
+ client_id: string;
1123
+ name: string;
1124
+ client_type: OAuthClientType;
1125
+ trust_level: OAuthClientTrustLevel;
1126
+ is_active: boolean;
1127
+ created_at: string;
1128
+ updated_at: string;
1129
+ }
1130
+ /** A client with its exact-match redirect-URI allow-list and permitted scopes. */
1131
+ interface OAuthClient extends OAuthClientSummary {
1132
+ redirect_uris: string[];
1133
+ scopes: string[];
1134
+ }
1135
+ interface RegisterOAuthClientInput {
1136
+ name: string;
1137
+ client_type: OAuthClientType;
1138
+ trust_level: OAuthClientTrustLevel;
1139
+ /** Exact-match allow-list. Can be set later with `setOAuthClientRedirectUris()`. */
1140
+ redirect_uris?: string[];
1141
+ /** Scopes the client may request. Can be set later with `setOAuthClientScopes()`. */
1142
+ scopes?: string[];
1143
+ }
1144
+ /**
1145
+ * A newly registered client. `client_secret` is present only for a confidential client and is
1146
+ * returned exactly once — it is stored hashed and can never be read back.
1147
+ */
1148
+ interface RegisteredOAuthClient extends OAuthClient {
1149
+ client_secret?: string;
1150
+ }
1151
+ /** One OIDC signing key's metadata. Key material is never exposed. */
1152
+ interface OidcSigningKey {
1153
+ kid: string;
1154
+ alg: string;
1155
+ /** `current` signs; `previous` still verifies (published in JWKS); `retired` is neither. */
1156
+ status: 'current' | 'previous' | 'retired';
1157
+ created_at: string;
1158
+ rotated_at: string | null;
1159
+ }
1116
1160
 
1117
1161
  interface AuthTokens {
1118
1162
  access_token: string;
@@ -4211,6 +4255,45 @@ declare class AdminModule {
4211
4255
  entries: AdminAuditEntry[];
4212
4256
  next_cursor: string | null;
4213
4257
  }>;
4258
+ /** Every registered sign-in client, oldest first. Secrets are never included. */
4259
+ listOAuthClients(options?: RequestOptions): Promise<{
4260
+ clients: OAuthClientSummary[];
4261
+ }>;
4262
+ /** One client with its redirect-URI allow-list and permitted scopes. */
4263
+ getOAuthClient(clientId: string, options?: RequestOptions): Promise<OAuthClient>;
4264
+ /**
4265
+ * Register a client. A confidential client's `client_secret` is in this response only — it is
4266
+ * stored hashed and cannot be retrieved again, so hand it to the client's owner immediately.
4267
+ */
4268
+ registerOAuthClient(input: RegisterOAuthClientInput, options?: RequestOptions): Promise<RegisteredOAuthClient>;
4269
+ /** Stop a client authorising. Clients are deactivated, never deleted, so their history stays auditable. */
4270
+ deactivateOAuthClient(clientId: string, options?: RequestOptions): Promise<{
4271
+ ok: true;
4272
+ is_active: false;
4273
+ }>;
4274
+ /** Replace a client's whole redirect-URI allow-list. URIs match exactly: no wildcards or prefixes. */
4275
+ setOAuthClientRedirectUris(clientId: string, redirectUris: string[], options?: RequestOptions): Promise<{
4276
+ ok: true;
4277
+ redirect_uris: string[];
4278
+ }>;
4279
+ /** Replace the set of scopes a client may request. */
4280
+ setOAuthClientScopes(clientId: string, scopes: string[], options?: RequestOptions): Promise<{
4281
+ ok: true;
4282
+ scopes: string[];
4283
+ }>;
4284
+ /** The signing-key window — current, previous, retired — as metadata only. */
4285
+ listOidcSigningKeys(options?: RequestOptions): Promise<{
4286
+ keys: OidcSigningKey[];
4287
+ }>;
4288
+ /**
4289
+ * Run the rotation ceremony: a new key becomes current, the current key becomes previous (still
4290
+ * verifying), and the old previous is retired. Do not rotate twice within an id_token lifetime
4291
+ * (one hour), or tokens signed by the retired key stop verifying.
4292
+ */
4293
+ rotateOidcSigningKey(options?: RequestOptions): Promise<{
4294
+ ok: true;
4295
+ kid: string;
4296
+ }>;
4214
4297
  listPayoutsAwaitingApproval(options?: RequestOptions): Promise<{
4215
4298
  payouts: PendingPayoutApproval[];
4216
4299
  }>;
@@ -4689,4 +4772,4 @@ declare class MitumbaClient {
4689
4772
  isAuthenticated(): Promise<boolean>;
4690
4773
  }
4691
4774
 
4692
- 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 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 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 OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, 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 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 };
4775
+ 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 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 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 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 };
package/dist/index.d.ts CHANGED
@@ -1018,7 +1018,7 @@ interface CreateReportInput {
1018
1018
  reason: 'counterfeit' | 'offensive' | 'spam' | 'scam' | 'other';
1019
1019
  detail?: string;
1020
1020
  }
1021
- type AdminPermission = 'admin:read' | 'users:moderate' | 'ip:block' | 'listings:moderate' | 'orders:transition' | 'payouts:disburse' | 'sellers:verify' | 'recovery:review' | 'broadcast:send' | 'roles:grant' | 'audit:read';
1021
+ type AdminPermission = 'admin:read' | 'users:moderate' | 'ip:block' | 'listings:moderate' | 'orders:transition' | 'payouts:disburse' | 'sellers:verify' | 'recovery:review' | 'broadcast:send' | 'clients:manage' | 'oidc:rotate_keys' | 'roles:grant' | 'audit:read';
1022
1022
  type AdminAuthStrength = 'password' | 'sms' | 'email' | 'totp' | 'passkey';
1023
1023
  interface AdminRolePreset {
1024
1024
  id: string;
@@ -1113,6 +1113,50 @@ interface AdminWholesalePendingStore {
1113
1113
  review_note?: string | null;
1114
1114
  [key: string]: unknown;
1115
1115
  }
1116
+ /** `public` clients (browser SPAs, mobile) use PKCE and have no secret; `confidential` clients have a server-side secret. */
1117
+ type OAuthClientType = 'public' | 'confidential';
1118
+ /** `first_party_implicit` skips the consent screen; `first_party_consent` shows it. */
1119
+ type OAuthClientTrustLevel = 'first_party_implicit' | 'first_party_consent';
1120
+ /** A registered sign-in (relying-party) client as listed by `admin.listOAuthClients()`. Never carries a secret. */
1121
+ interface OAuthClientSummary {
1122
+ client_id: string;
1123
+ name: string;
1124
+ client_type: OAuthClientType;
1125
+ trust_level: OAuthClientTrustLevel;
1126
+ is_active: boolean;
1127
+ created_at: string;
1128
+ updated_at: string;
1129
+ }
1130
+ /** A client with its exact-match redirect-URI allow-list and permitted scopes. */
1131
+ interface OAuthClient extends OAuthClientSummary {
1132
+ redirect_uris: string[];
1133
+ scopes: string[];
1134
+ }
1135
+ interface RegisterOAuthClientInput {
1136
+ name: string;
1137
+ client_type: OAuthClientType;
1138
+ trust_level: OAuthClientTrustLevel;
1139
+ /** Exact-match allow-list. Can be set later with `setOAuthClientRedirectUris()`. */
1140
+ redirect_uris?: string[];
1141
+ /** Scopes the client may request. Can be set later with `setOAuthClientScopes()`. */
1142
+ scopes?: string[];
1143
+ }
1144
+ /**
1145
+ * A newly registered client. `client_secret` is present only for a confidential client and is
1146
+ * returned exactly once — it is stored hashed and can never be read back.
1147
+ */
1148
+ interface RegisteredOAuthClient extends OAuthClient {
1149
+ client_secret?: string;
1150
+ }
1151
+ /** One OIDC signing key's metadata. Key material is never exposed. */
1152
+ interface OidcSigningKey {
1153
+ kid: string;
1154
+ alg: string;
1155
+ /** `current` signs; `previous` still verifies (published in JWKS); `retired` is neither. */
1156
+ status: 'current' | 'previous' | 'retired';
1157
+ created_at: string;
1158
+ rotated_at: string | null;
1159
+ }
1116
1160
 
1117
1161
  interface AuthTokens {
1118
1162
  access_token: string;
@@ -4211,6 +4255,45 @@ declare class AdminModule {
4211
4255
  entries: AdminAuditEntry[];
4212
4256
  next_cursor: string | null;
4213
4257
  }>;
4258
+ /** Every registered sign-in client, oldest first. Secrets are never included. */
4259
+ listOAuthClients(options?: RequestOptions): Promise<{
4260
+ clients: OAuthClientSummary[];
4261
+ }>;
4262
+ /** One client with its redirect-URI allow-list and permitted scopes. */
4263
+ getOAuthClient(clientId: string, options?: RequestOptions): Promise<OAuthClient>;
4264
+ /**
4265
+ * Register a client. A confidential client's `client_secret` is in this response only — it is
4266
+ * stored hashed and cannot be retrieved again, so hand it to the client's owner immediately.
4267
+ */
4268
+ registerOAuthClient(input: RegisterOAuthClientInput, options?: RequestOptions): Promise<RegisteredOAuthClient>;
4269
+ /** Stop a client authorising. Clients are deactivated, never deleted, so their history stays auditable. */
4270
+ deactivateOAuthClient(clientId: string, options?: RequestOptions): Promise<{
4271
+ ok: true;
4272
+ is_active: false;
4273
+ }>;
4274
+ /** Replace a client's whole redirect-URI allow-list. URIs match exactly: no wildcards or prefixes. */
4275
+ setOAuthClientRedirectUris(clientId: string, redirectUris: string[], options?: RequestOptions): Promise<{
4276
+ ok: true;
4277
+ redirect_uris: string[];
4278
+ }>;
4279
+ /** Replace the set of scopes a client may request. */
4280
+ setOAuthClientScopes(clientId: string, scopes: string[], options?: RequestOptions): Promise<{
4281
+ ok: true;
4282
+ scopes: string[];
4283
+ }>;
4284
+ /** The signing-key window — current, previous, retired — as metadata only. */
4285
+ listOidcSigningKeys(options?: RequestOptions): Promise<{
4286
+ keys: OidcSigningKey[];
4287
+ }>;
4288
+ /**
4289
+ * Run the rotation ceremony: a new key becomes current, the current key becomes previous (still
4290
+ * verifying), and the old previous is retired. Do not rotate twice within an id_token lifetime
4291
+ * (one hour), or tokens signed by the retired key stop verifying.
4292
+ */
4293
+ rotateOidcSigningKey(options?: RequestOptions): Promise<{
4294
+ ok: true;
4295
+ kid: string;
4296
+ }>;
4214
4297
  listPayoutsAwaitingApproval(options?: RequestOptions): Promise<{
4215
4298
  payouts: PendingPayoutApproval[];
4216
4299
  }>;
@@ -4689,4 +4772,4 @@ declare class MitumbaClient {
4689
4772
  isAuthenticated(): Promise<boolean>;
4690
4773
  }
4691
4774
 
4692
- 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 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 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 OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, 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 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 };
4775
+ 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 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 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 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 };
package/dist/index.js CHANGED
@@ -2383,6 +2383,47 @@ var AdminModule = class {
2383
2383
  async listAuditLog(query2 = {}, options) {
2384
2384
  return this.client.get("/admin/audit", query2, options);
2385
2385
  }
2386
+ // ── Identity provider: sign-in clients (requires clients:manage) ──
2387
+ /** Every registered sign-in client, oldest first. Secrets are never included. */
2388
+ async listOAuthClients(options) {
2389
+ return this.client.get("/admin/clients", void 0, options);
2390
+ }
2391
+ /** One client with its redirect-URI allow-list and permitted scopes. */
2392
+ async getOAuthClient(clientId, options) {
2393
+ return this.client.get(`/admin/clients/${encodeURIComponent(clientId)}`, void 0, options);
2394
+ }
2395
+ /**
2396
+ * Register a client. A confidential client's `client_secret` is in this response only — it is
2397
+ * stored hashed and cannot be retrieved again, so hand it to the client's owner immediately.
2398
+ */
2399
+ async registerOAuthClient(input, options) {
2400
+ return this.client.post("/admin/clients", input, options);
2401
+ }
2402
+ /** Stop a client authorising. Clients are deactivated, never deleted, so their history stays auditable. */
2403
+ async deactivateOAuthClient(clientId, options) {
2404
+ return this.client.post(`/admin/clients/${encodeURIComponent(clientId)}/deactivate`, void 0, options);
2405
+ }
2406
+ /** Replace a client's whole redirect-URI allow-list. URIs match exactly: no wildcards or prefixes. */
2407
+ async setOAuthClientRedirectUris(clientId, redirectUris, options) {
2408
+ return this.client.put(`/admin/clients/${encodeURIComponent(clientId)}/redirect-uris`, { redirect_uris: redirectUris }, options);
2409
+ }
2410
+ /** Replace the set of scopes a client may request. */
2411
+ async setOAuthClientScopes(clientId, scopes, options) {
2412
+ return this.client.put(`/admin/clients/${encodeURIComponent(clientId)}/scopes`, { scopes }, options);
2413
+ }
2414
+ // ── Identity provider: signing keys (requires oidc:rotate_keys) ──
2415
+ /** The signing-key window — current, previous, retired — as metadata only. */
2416
+ async listOidcSigningKeys(options) {
2417
+ return this.client.get("/auth/oidc/keys", void 0, options);
2418
+ }
2419
+ /**
2420
+ * Run the rotation ceremony: a new key becomes current, the current key becomes previous (still
2421
+ * verifying), and the old previous is retired. Do not rotate twice within an id_token lifetime
2422
+ * (one hour), or tokens signed by the retired key stop verifying.
2423
+ */
2424
+ async rotateOidcSigningKey(options) {
2425
+ return this.client.post("/auth/oidc/keys/rotate", void 0, options);
2426
+ }
2386
2427
  // ── Payout approval ──
2387
2428
  async listPayoutsAwaitingApproval(options) {
2388
2429
  return this.client.get("/admin/payouts/pending-approval", void 0, options);