@mitumba/sdk 5.0.0 → 5.2.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 +232 -1
- package/dist/index.d.ts +232 -1
- package/dist/index.js +117 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +117 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1356,6 +1356,141 @@ interface RootSetupResult {
|
|
|
1356
1356
|
permissions: AdminPermission[];
|
|
1357
1357
|
next_step: string;
|
|
1358
1358
|
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Request body for the authorize (mint) step. The accounts app calls this once the user is
|
|
1361
|
+
* authenticated to mint a one-time authorization code for the relying party.
|
|
1362
|
+
*
|
|
1363
|
+
* The SDK always sets `code_challenge_method: 'S256'` internally, so callers never supply it.
|
|
1364
|
+
*/
|
|
1365
|
+
interface OAuthAuthorizeInput {
|
|
1366
|
+
/** The relying party's registered client identifier. */
|
|
1367
|
+
client_id: string;
|
|
1368
|
+
/** The registered redirect URI the one-time code is returned to. */
|
|
1369
|
+
redirect_uri: string;
|
|
1370
|
+
/** Optional space-delimited list of requested scopes. */
|
|
1371
|
+
scope?: string;
|
|
1372
|
+
/** Opaque value echoed back unchanged, used by the relying party for CSRF protection. */
|
|
1373
|
+
state: string;
|
|
1374
|
+
/** The PKCE code challenge (base64url SHA-256 of the verifier). */
|
|
1375
|
+
code_challenge: string;
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Result of the authorize (mint) step: a one-time authorization code plus the echoed state.
|
|
1379
|
+
*/
|
|
1380
|
+
interface OAuthAuthorizeResult {
|
|
1381
|
+
/** One-time authorization code to redirect back to the relying party. */
|
|
1382
|
+
code: string;
|
|
1383
|
+
/** The `state` value supplied in the request, echoed back unchanged. */
|
|
1384
|
+
state: string;
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Request body for the token exchange step. The relying party exchanges the one-time code for a
|
|
1388
|
+
* token pair. `grant_type` is set to `'authorization_code'` by the SDK, so callers need not pass it.
|
|
1389
|
+
*/
|
|
1390
|
+
interface OAuthTokenExchangeInput {
|
|
1391
|
+
/** Always `'authorization_code'`. Defaulted by the SDK; callers may omit it. */
|
|
1392
|
+
grant_type?: 'authorization_code';
|
|
1393
|
+
/** The one-time authorization code returned by the authorize step. */
|
|
1394
|
+
code: string;
|
|
1395
|
+
/** The redirect URI used in the authorize step; must match exactly. */
|
|
1396
|
+
redirect_uri: string;
|
|
1397
|
+
/** The relying party's registered client identifier. */
|
|
1398
|
+
client_id: string;
|
|
1399
|
+
/** The PKCE code verifier that matches the earlier code challenge. */
|
|
1400
|
+
code_verifier: string;
|
|
1401
|
+
/** The client secret for confidential clients. Omit for public clients. */
|
|
1402
|
+
client_secret?: string;
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* Result of a successful token exchange: the access/refresh token pair and its metadata.
|
|
1406
|
+
*/
|
|
1407
|
+
interface OAuthTokenResult {
|
|
1408
|
+
/** The access token (JWT) for authenticated requests. */
|
|
1409
|
+
access_token: string;
|
|
1410
|
+
/** The refresh token used to rotate the access token. */
|
|
1411
|
+
refresh_token: string;
|
|
1412
|
+
/** Lifetime of the access token in seconds. */
|
|
1413
|
+
expires_in: number;
|
|
1414
|
+
/** Always `'Bearer'`. */
|
|
1415
|
+
token_type: 'Bearer';
|
|
1416
|
+
/** Space-delimited list of scopes actually granted. */
|
|
1417
|
+
scope: string;
|
|
1418
|
+
}
|
|
1419
|
+
/**
|
|
1420
|
+
* The OpenID Connect discovery document, as served by `GET /auth/oauth/openid-configuration`.
|
|
1421
|
+
*
|
|
1422
|
+
* A relying party reads this once to learn the provider's endpoints and capabilities instead of
|
|
1423
|
+
* hard-coding them. The fields mirror the standard OIDC discovery metadata the backend advertises.
|
|
1424
|
+
*/
|
|
1425
|
+
interface OpenIdConfiguration {
|
|
1426
|
+
/** The issuer identifier that appears in id_token `iss`. */
|
|
1427
|
+
issuer: string;
|
|
1428
|
+
/** Where the authorization code is minted. */
|
|
1429
|
+
authorization_endpoint: string;
|
|
1430
|
+
/** Where a code is exchanged for tokens. */
|
|
1431
|
+
token_endpoint: string;
|
|
1432
|
+
/** Where the consented claims for an access token are read. */
|
|
1433
|
+
userinfo_endpoint: string;
|
|
1434
|
+
/** The JWKS URL whose public keys verify id_token signatures. */
|
|
1435
|
+
jwks_uri: string;
|
|
1436
|
+
/** Supported OAuth response types (e.g. `['code']`). */
|
|
1437
|
+
response_types_supported: string[];
|
|
1438
|
+
/** Supported grant types (e.g. `['authorization_code']`). */
|
|
1439
|
+
grant_types_supported: string[];
|
|
1440
|
+
/** Supported PKCE challenge methods (e.g. `['S256']`). */
|
|
1441
|
+
code_challenge_methods_supported: string[];
|
|
1442
|
+
/** id_token signing algorithms (e.g. `['ES256']`). */
|
|
1443
|
+
id_token_signing_alg_values_supported: string[];
|
|
1444
|
+
/** Requestable scopes (e.g. `['openid','profile','email','phone']`). */
|
|
1445
|
+
scopes_supported: string[];
|
|
1446
|
+
/** Subject identifier types (e.g. `['public']`). */
|
|
1447
|
+
subject_types_supported: string[];
|
|
1448
|
+
/** Supported client authentication methods at the token endpoint. */
|
|
1449
|
+
token_endpoint_auth_methods_supported: string[];
|
|
1450
|
+
}
|
|
1451
|
+
/** A single JSON Web Key, public parameters only (as served by the JWKS endpoint). */
|
|
1452
|
+
interface Jwk {
|
|
1453
|
+
/** Key type, e.g. `'EC'`. */
|
|
1454
|
+
kty: string;
|
|
1455
|
+
/** Intended use, e.g. `'sig'`. */
|
|
1456
|
+
use?: string;
|
|
1457
|
+
/** Algorithm, e.g. `'ES256'`. */
|
|
1458
|
+
alg?: string;
|
|
1459
|
+
/** Key id; matches the id_token header `kid`. */
|
|
1460
|
+
kid?: string;
|
|
1461
|
+
/** Curve for EC keys, e.g. `'P-256'`. */
|
|
1462
|
+
crv?: string;
|
|
1463
|
+
/** EC public x coordinate (base64url). */
|
|
1464
|
+
x?: string;
|
|
1465
|
+
/** EC public y coordinate (base64url). */
|
|
1466
|
+
y?: string;
|
|
1467
|
+
}
|
|
1468
|
+
/** The JWKS document: the set of public keys that verify provider-issued id_tokens. */
|
|
1469
|
+
interface Jwks {
|
|
1470
|
+
keys: Jwk[];
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* The OIDC userinfo claim set, from `GET /auth/oauth/userinfo`.
|
|
1474
|
+
*
|
|
1475
|
+
* `sub` is always present; the identity claims appear per the access token's granted scopes. Extra
|
|
1476
|
+
* claims the provider adds later are tolerated via the index signature rather than dropped.
|
|
1477
|
+
*/
|
|
1478
|
+
interface UserInfo {
|
|
1479
|
+
/** The stable subject identifier (the user id). Always present. */
|
|
1480
|
+
sub: string;
|
|
1481
|
+
/** Primary email, when the `email` scope was granted. */
|
|
1482
|
+
email?: string;
|
|
1483
|
+
/** Whether the email is verified, when present. */
|
|
1484
|
+
email_verified?: boolean;
|
|
1485
|
+
/** Display name, when the `profile` scope was granted. */
|
|
1486
|
+
name?: string;
|
|
1487
|
+
/** Avatar URL, when the `profile` scope was granted. */
|
|
1488
|
+
picture?: string;
|
|
1489
|
+
/** Phone number, when the `phone` scope was granted. */
|
|
1490
|
+
phone_number?: string;
|
|
1491
|
+
/** Additional provider claims are preserved rather than discarded. */
|
|
1492
|
+
[claim: string]: unknown;
|
|
1493
|
+
}
|
|
1359
1494
|
|
|
1360
1495
|
declare const CONDITIONS: readonly ["new", "like_new", "good", "fair"];
|
|
1361
1496
|
type Condition = typeof CONDITIONS[number];
|
|
@@ -2623,6 +2758,101 @@ declare class AuthModule {
|
|
|
2623
2758
|
}>;
|
|
2624
2759
|
}
|
|
2625
2760
|
|
|
2761
|
+
/**
|
|
2762
|
+
* Relying-party OAuth session hand-off.
|
|
2763
|
+
*
|
|
2764
|
+
* Wraps the authorization-code + PKCE flow: the accounts app mints a one-time code with
|
|
2765
|
+
* {@link OAuthModule.authorize}, redirects it back to the relying party, and the relying party
|
|
2766
|
+
* exchanges it for a token pair with {@link OAuthModule.exchangeCode}.
|
|
2767
|
+
*/
|
|
2768
|
+
declare class OAuthModule {
|
|
2769
|
+
private readonly client;
|
|
2770
|
+
constructor(client: APIClient);
|
|
2771
|
+
/**
|
|
2772
|
+
* Mint a one-time authorization code for the relying party.
|
|
2773
|
+
*
|
|
2774
|
+
* This is the authenticated mint step the accounts app calls after the user is signed in. It
|
|
2775
|
+
* returns a one-time code (plus the echoed `state`) that the app then redirects back to the
|
|
2776
|
+
* relying party's `redirect_uri`. The PKCE method is fixed to `'S256'` by the SDK, so callers
|
|
2777
|
+
* cannot supply a weaker value. The returned code is not a session — this method does not
|
|
2778
|
+
* persist anything.
|
|
2779
|
+
*
|
|
2780
|
+
* @param input - The authorize request (client, redirect URI, state, PKCE challenge, scope)
|
|
2781
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2782
|
+
* @returns The one-time authorization code and the echoed `state`
|
|
2783
|
+
* @throws {APIError} On `400` (`invalid_redirect_uri`, `invalid_client`, `invalid_scope`) or other errors
|
|
2784
|
+
*
|
|
2785
|
+
* @example
|
|
2786
|
+
* ```typescript
|
|
2787
|
+
* const { code, state } = await sdk.oauth.authorize({
|
|
2788
|
+
* client_id: 'rp_abc',
|
|
2789
|
+
* redirect_uri: 'https://app.example.com/callback',
|
|
2790
|
+
* scope: 'profile email',
|
|
2791
|
+
* state: csrfState,
|
|
2792
|
+
* code_challenge: challenge,
|
|
2793
|
+
* })
|
|
2794
|
+
* ```
|
|
2795
|
+
*/
|
|
2796
|
+
authorize(input: OAuthAuthorizeInput, options?: RequestOptions): Promise<OAuthAuthorizeResult>;
|
|
2797
|
+
/**
|
|
2798
|
+
* Exchange a one-time authorization code for a token pair.
|
|
2799
|
+
*
|
|
2800
|
+
* The relying party calls this server-to-server (or from its own origin) with the PKCE verifier
|
|
2801
|
+
* that matches the earlier challenge. The authorization code is single-use — a reused, expired,
|
|
2802
|
+
* or tampered code is rejected with `400 invalid_grant`. On success the returned tokens are
|
|
2803
|
+
* persisted into the client session via `setSession`, so the relying party is logged in
|
|
2804
|
+
* immediately after the exchange. `grant_type` is set to `'authorization_code'` by the SDK.
|
|
2805
|
+
*
|
|
2806
|
+
* @param input - The token exchange request (code, redirect URI, client, PKCE verifier, optional secret)
|
|
2807
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2808
|
+
* @returns The access/refresh token pair and granted scope
|
|
2809
|
+
* @throws {APIError} On `400 invalid_grant` (bad/expired/replayed code) or `401 invalid_client` (wrong secret)
|
|
2810
|
+
*
|
|
2811
|
+
* @example
|
|
2812
|
+
* ```typescript
|
|
2813
|
+
* const tokens = await sdk.oauth.exchangeCode({
|
|
2814
|
+
* code,
|
|
2815
|
+
* redirect_uri: 'https://app.example.com/callback',
|
|
2816
|
+
* client_id: 'rp_abc',
|
|
2817
|
+
* code_verifier: verifier,
|
|
2818
|
+
* })
|
|
2819
|
+
* // sdk is now authenticated as the exchanged session
|
|
2820
|
+
* ```
|
|
2821
|
+
*/
|
|
2822
|
+
exchangeCode(input: OAuthTokenExchangeInput, options?: RequestOptions): Promise<OAuthTokenResult>;
|
|
2823
|
+
/**
|
|
2824
|
+
* Fetch the OpenID Connect discovery document.
|
|
2825
|
+
*
|
|
2826
|
+
* A relying party reads this to learn the provider's endpoints and capabilities (issuer, the
|
|
2827
|
+
* authorize/token/userinfo/jwks URLs, supported scopes, signing algorithms) rather than hard-
|
|
2828
|
+
* coding them. Public — no session required.
|
|
2829
|
+
*
|
|
2830
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2831
|
+
* @returns The discovery metadata
|
|
2832
|
+
*/
|
|
2833
|
+
discover(options?: RequestOptions): Promise<OpenIdConfiguration>;
|
|
2834
|
+
/**
|
|
2835
|
+
* Fetch the JWKS — the public keys that verify provider-issued id_token signatures.
|
|
2836
|
+
*
|
|
2837
|
+
* A relying party uses these (matched by the id_token header `kid`) to verify an id_token without
|
|
2838
|
+
* a shared secret. Public — no session required. Serves public key parameters only.
|
|
2839
|
+
*
|
|
2840
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2841
|
+
* @returns The JWKS document
|
|
2842
|
+
*/
|
|
2843
|
+
getJwks(options?: RequestOptions): Promise<Jwks>;
|
|
2844
|
+
/**
|
|
2845
|
+
* Fetch the userinfo claim set for the current session.
|
|
2846
|
+
*
|
|
2847
|
+
* Returns `sub` plus the identity claims the session's granted scopes allow. Requires an
|
|
2848
|
+
* authenticated session — the SDK attaches the bearer token automatically.
|
|
2849
|
+
*
|
|
2850
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2851
|
+
* @returns The userinfo claims
|
|
2852
|
+
*/
|
|
2853
|
+
userinfo(options?: RequestOptions): Promise<UserInfo>;
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2626
2856
|
declare class ListingsModule {
|
|
2627
2857
|
private readonly client;
|
|
2628
2858
|
constructor(client: APIClient);
|
|
@@ -3750,6 +3980,7 @@ declare function baleShareUrl(baleId: string, options?: ShareUrlOptions): string
|
|
|
3750
3980
|
declare class MitumbaClient {
|
|
3751
3981
|
readonly api: APIClient;
|
|
3752
3982
|
readonly auth: AuthModule;
|
|
3983
|
+
readonly oauth: OAuthModule;
|
|
3753
3984
|
readonly listings: ListingsModule;
|
|
3754
3985
|
readonly search: SearchModule;
|
|
3755
3986
|
readonly orders: OrdersModule;
|
|
@@ -3800,4 +4031,4 @@ declare class MitumbaClient {
|
|
|
3800
4031
|
isAuthenticated(): Promise<boolean>;
|
|
3801
4032
|
}
|
|
3802
4033
|
|
|
3803
|
-
export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddPaymentMethodInput, type Address, type AdminAuditEntry, 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 CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, 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 FollowedStore, type ForgotPasswordInput, IDBTokenStore, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, 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, ORDER_STATUSES, type OperatorPermissionGrant, type Order, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, 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 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 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 UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleStore, type WishlistListing, WishlistsModule, baleShareUrl, createTokenStore, isMessagingAPIError, listingShareUrl, storeShareUrl };
|
|
4034
|
+
export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddPaymentMethodInput, type Address, type AdminAuditEntry, 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 CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, 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 FollowedStore, type ForgotPasswordInput, IDBTokenStore, 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 ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, 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, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, 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 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 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 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 VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleStore, type WishlistListing, WishlistsModule, baleShareUrl, createTokenStore, isMessagingAPIError, listingShareUrl, storeShareUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1356,6 +1356,141 @@ interface RootSetupResult {
|
|
|
1356
1356
|
permissions: AdminPermission[];
|
|
1357
1357
|
next_step: string;
|
|
1358
1358
|
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Request body for the authorize (mint) step. The accounts app calls this once the user is
|
|
1361
|
+
* authenticated to mint a one-time authorization code for the relying party.
|
|
1362
|
+
*
|
|
1363
|
+
* The SDK always sets `code_challenge_method: 'S256'` internally, so callers never supply it.
|
|
1364
|
+
*/
|
|
1365
|
+
interface OAuthAuthorizeInput {
|
|
1366
|
+
/** The relying party's registered client identifier. */
|
|
1367
|
+
client_id: string;
|
|
1368
|
+
/** The registered redirect URI the one-time code is returned to. */
|
|
1369
|
+
redirect_uri: string;
|
|
1370
|
+
/** Optional space-delimited list of requested scopes. */
|
|
1371
|
+
scope?: string;
|
|
1372
|
+
/** Opaque value echoed back unchanged, used by the relying party for CSRF protection. */
|
|
1373
|
+
state: string;
|
|
1374
|
+
/** The PKCE code challenge (base64url SHA-256 of the verifier). */
|
|
1375
|
+
code_challenge: string;
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Result of the authorize (mint) step: a one-time authorization code plus the echoed state.
|
|
1379
|
+
*/
|
|
1380
|
+
interface OAuthAuthorizeResult {
|
|
1381
|
+
/** One-time authorization code to redirect back to the relying party. */
|
|
1382
|
+
code: string;
|
|
1383
|
+
/** The `state` value supplied in the request, echoed back unchanged. */
|
|
1384
|
+
state: string;
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Request body for the token exchange step. The relying party exchanges the one-time code for a
|
|
1388
|
+
* token pair. `grant_type` is set to `'authorization_code'` by the SDK, so callers need not pass it.
|
|
1389
|
+
*/
|
|
1390
|
+
interface OAuthTokenExchangeInput {
|
|
1391
|
+
/** Always `'authorization_code'`. Defaulted by the SDK; callers may omit it. */
|
|
1392
|
+
grant_type?: 'authorization_code';
|
|
1393
|
+
/** The one-time authorization code returned by the authorize step. */
|
|
1394
|
+
code: string;
|
|
1395
|
+
/** The redirect URI used in the authorize step; must match exactly. */
|
|
1396
|
+
redirect_uri: string;
|
|
1397
|
+
/** The relying party's registered client identifier. */
|
|
1398
|
+
client_id: string;
|
|
1399
|
+
/** The PKCE code verifier that matches the earlier code challenge. */
|
|
1400
|
+
code_verifier: string;
|
|
1401
|
+
/** The client secret for confidential clients. Omit for public clients. */
|
|
1402
|
+
client_secret?: string;
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* Result of a successful token exchange: the access/refresh token pair and its metadata.
|
|
1406
|
+
*/
|
|
1407
|
+
interface OAuthTokenResult {
|
|
1408
|
+
/** The access token (JWT) for authenticated requests. */
|
|
1409
|
+
access_token: string;
|
|
1410
|
+
/** The refresh token used to rotate the access token. */
|
|
1411
|
+
refresh_token: string;
|
|
1412
|
+
/** Lifetime of the access token in seconds. */
|
|
1413
|
+
expires_in: number;
|
|
1414
|
+
/** Always `'Bearer'`. */
|
|
1415
|
+
token_type: 'Bearer';
|
|
1416
|
+
/** Space-delimited list of scopes actually granted. */
|
|
1417
|
+
scope: string;
|
|
1418
|
+
}
|
|
1419
|
+
/**
|
|
1420
|
+
* The OpenID Connect discovery document, as served by `GET /auth/oauth/openid-configuration`.
|
|
1421
|
+
*
|
|
1422
|
+
* A relying party reads this once to learn the provider's endpoints and capabilities instead of
|
|
1423
|
+
* hard-coding them. The fields mirror the standard OIDC discovery metadata the backend advertises.
|
|
1424
|
+
*/
|
|
1425
|
+
interface OpenIdConfiguration {
|
|
1426
|
+
/** The issuer identifier that appears in id_token `iss`. */
|
|
1427
|
+
issuer: string;
|
|
1428
|
+
/** Where the authorization code is minted. */
|
|
1429
|
+
authorization_endpoint: string;
|
|
1430
|
+
/** Where a code is exchanged for tokens. */
|
|
1431
|
+
token_endpoint: string;
|
|
1432
|
+
/** Where the consented claims for an access token are read. */
|
|
1433
|
+
userinfo_endpoint: string;
|
|
1434
|
+
/** The JWKS URL whose public keys verify id_token signatures. */
|
|
1435
|
+
jwks_uri: string;
|
|
1436
|
+
/** Supported OAuth response types (e.g. `['code']`). */
|
|
1437
|
+
response_types_supported: string[];
|
|
1438
|
+
/** Supported grant types (e.g. `['authorization_code']`). */
|
|
1439
|
+
grant_types_supported: string[];
|
|
1440
|
+
/** Supported PKCE challenge methods (e.g. `['S256']`). */
|
|
1441
|
+
code_challenge_methods_supported: string[];
|
|
1442
|
+
/** id_token signing algorithms (e.g. `['ES256']`). */
|
|
1443
|
+
id_token_signing_alg_values_supported: string[];
|
|
1444
|
+
/** Requestable scopes (e.g. `['openid','profile','email','phone']`). */
|
|
1445
|
+
scopes_supported: string[];
|
|
1446
|
+
/** Subject identifier types (e.g. `['public']`). */
|
|
1447
|
+
subject_types_supported: string[];
|
|
1448
|
+
/** Supported client authentication methods at the token endpoint. */
|
|
1449
|
+
token_endpoint_auth_methods_supported: string[];
|
|
1450
|
+
}
|
|
1451
|
+
/** A single JSON Web Key, public parameters only (as served by the JWKS endpoint). */
|
|
1452
|
+
interface Jwk {
|
|
1453
|
+
/** Key type, e.g. `'EC'`. */
|
|
1454
|
+
kty: string;
|
|
1455
|
+
/** Intended use, e.g. `'sig'`. */
|
|
1456
|
+
use?: string;
|
|
1457
|
+
/** Algorithm, e.g. `'ES256'`. */
|
|
1458
|
+
alg?: string;
|
|
1459
|
+
/** Key id; matches the id_token header `kid`. */
|
|
1460
|
+
kid?: string;
|
|
1461
|
+
/** Curve for EC keys, e.g. `'P-256'`. */
|
|
1462
|
+
crv?: string;
|
|
1463
|
+
/** EC public x coordinate (base64url). */
|
|
1464
|
+
x?: string;
|
|
1465
|
+
/** EC public y coordinate (base64url). */
|
|
1466
|
+
y?: string;
|
|
1467
|
+
}
|
|
1468
|
+
/** The JWKS document: the set of public keys that verify provider-issued id_tokens. */
|
|
1469
|
+
interface Jwks {
|
|
1470
|
+
keys: Jwk[];
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* The OIDC userinfo claim set, from `GET /auth/oauth/userinfo`.
|
|
1474
|
+
*
|
|
1475
|
+
* `sub` is always present; the identity claims appear per the access token's granted scopes. Extra
|
|
1476
|
+
* claims the provider adds later are tolerated via the index signature rather than dropped.
|
|
1477
|
+
*/
|
|
1478
|
+
interface UserInfo {
|
|
1479
|
+
/** The stable subject identifier (the user id). Always present. */
|
|
1480
|
+
sub: string;
|
|
1481
|
+
/** Primary email, when the `email` scope was granted. */
|
|
1482
|
+
email?: string;
|
|
1483
|
+
/** Whether the email is verified, when present. */
|
|
1484
|
+
email_verified?: boolean;
|
|
1485
|
+
/** Display name, when the `profile` scope was granted. */
|
|
1486
|
+
name?: string;
|
|
1487
|
+
/** Avatar URL, when the `profile` scope was granted. */
|
|
1488
|
+
picture?: string;
|
|
1489
|
+
/** Phone number, when the `phone` scope was granted. */
|
|
1490
|
+
phone_number?: string;
|
|
1491
|
+
/** Additional provider claims are preserved rather than discarded. */
|
|
1492
|
+
[claim: string]: unknown;
|
|
1493
|
+
}
|
|
1359
1494
|
|
|
1360
1495
|
declare const CONDITIONS: readonly ["new", "like_new", "good", "fair"];
|
|
1361
1496
|
type Condition = typeof CONDITIONS[number];
|
|
@@ -2623,6 +2758,101 @@ declare class AuthModule {
|
|
|
2623
2758
|
}>;
|
|
2624
2759
|
}
|
|
2625
2760
|
|
|
2761
|
+
/**
|
|
2762
|
+
* Relying-party OAuth session hand-off.
|
|
2763
|
+
*
|
|
2764
|
+
* Wraps the authorization-code + PKCE flow: the accounts app mints a one-time code with
|
|
2765
|
+
* {@link OAuthModule.authorize}, redirects it back to the relying party, and the relying party
|
|
2766
|
+
* exchanges it for a token pair with {@link OAuthModule.exchangeCode}.
|
|
2767
|
+
*/
|
|
2768
|
+
declare class OAuthModule {
|
|
2769
|
+
private readonly client;
|
|
2770
|
+
constructor(client: APIClient);
|
|
2771
|
+
/**
|
|
2772
|
+
* Mint a one-time authorization code for the relying party.
|
|
2773
|
+
*
|
|
2774
|
+
* This is the authenticated mint step the accounts app calls after the user is signed in. It
|
|
2775
|
+
* returns a one-time code (plus the echoed `state`) that the app then redirects back to the
|
|
2776
|
+
* relying party's `redirect_uri`. The PKCE method is fixed to `'S256'` by the SDK, so callers
|
|
2777
|
+
* cannot supply a weaker value. The returned code is not a session — this method does not
|
|
2778
|
+
* persist anything.
|
|
2779
|
+
*
|
|
2780
|
+
* @param input - The authorize request (client, redirect URI, state, PKCE challenge, scope)
|
|
2781
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2782
|
+
* @returns The one-time authorization code and the echoed `state`
|
|
2783
|
+
* @throws {APIError} On `400` (`invalid_redirect_uri`, `invalid_client`, `invalid_scope`) or other errors
|
|
2784
|
+
*
|
|
2785
|
+
* @example
|
|
2786
|
+
* ```typescript
|
|
2787
|
+
* const { code, state } = await sdk.oauth.authorize({
|
|
2788
|
+
* client_id: 'rp_abc',
|
|
2789
|
+
* redirect_uri: 'https://app.example.com/callback',
|
|
2790
|
+
* scope: 'profile email',
|
|
2791
|
+
* state: csrfState,
|
|
2792
|
+
* code_challenge: challenge,
|
|
2793
|
+
* })
|
|
2794
|
+
* ```
|
|
2795
|
+
*/
|
|
2796
|
+
authorize(input: OAuthAuthorizeInput, options?: RequestOptions): Promise<OAuthAuthorizeResult>;
|
|
2797
|
+
/**
|
|
2798
|
+
* Exchange a one-time authorization code for a token pair.
|
|
2799
|
+
*
|
|
2800
|
+
* The relying party calls this server-to-server (or from its own origin) with the PKCE verifier
|
|
2801
|
+
* that matches the earlier challenge. The authorization code is single-use — a reused, expired,
|
|
2802
|
+
* or tampered code is rejected with `400 invalid_grant`. On success the returned tokens are
|
|
2803
|
+
* persisted into the client session via `setSession`, so the relying party is logged in
|
|
2804
|
+
* immediately after the exchange. `grant_type` is set to `'authorization_code'` by the SDK.
|
|
2805
|
+
*
|
|
2806
|
+
* @param input - The token exchange request (code, redirect URI, client, PKCE verifier, optional secret)
|
|
2807
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2808
|
+
* @returns The access/refresh token pair and granted scope
|
|
2809
|
+
* @throws {APIError} On `400 invalid_grant` (bad/expired/replayed code) or `401 invalid_client` (wrong secret)
|
|
2810
|
+
*
|
|
2811
|
+
* @example
|
|
2812
|
+
* ```typescript
|
|
2813
|
+
* const tokens = await sdk.oauth.exchangeCode({
|
|
2814
|
+
* code,
|
|
2815
|
+
* redirect_uri: 'https://app.example.com/callback',
|
|
2816
|
+
* client_id: 'rp_abc',
|
|
2817
|
+
* code_verifier: verifier,
|
|
2818
|
+
* })
|
|
2819
|
+
* // sdk is now authenticated as the exchanged session
|
|
2820
|
+
* ```
|
|
2821
|
+
*/
|
|
2822
|
+
exchangeCode(input: OAuthTokenExchangeInput, options?: RequestOptions): Promise<OAuthTokenResult>;
|
|
2823
|
+
/**
|
|
2824
|
+
* Fetch the OpenID Connect discovery document.
|
|
2825
|
+
*
|
|
2826
|
+
* A relying party reads this to learn the provider's endpoints and capabilities (issuer, the
|
|
2827
|
+
* authorize/token/userinfo/jwks URLs, supported scopes, signing algorithms) rather than hard-
|
|
2828
|
+
* coding them. Public — no session required.
|
|
2829
|
+
*
|
|
2830
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2831
|
+
* @returns The discovery metadata
|
|
2832
|
+
*/
|
|
2833
|
+
discover(options?: RequestOptions): Promise<OpenIdConfiguration>;
|
|
2834
|
+
/**
|
|
2835
|
+
* Fetch the JWKS — the public keys that verify provider-issued id_token signatures.
|
|
2836
|
+
*
|
|
2837
|
+
* A relying party uses these (matched by the id_token header `kid`) to verify an id_token without
|
|
2838
|
+
* a shared secret. Public — no session required. Serves public key parameters only.
|
|
2839
|
+
*
|
|
2840
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2841
|
+
* @returns The JWKS document
|
|
2842
|
+
*/
|
|
2843
|
+
getJwks(options?: RequestOptions): Promise<Jwks>;
|
|
2844
|
+
/**
|
|
2845
|
+
* Fetch the userinfo claim set for the current session.
|
|
2846
|
+
*
|
|
2847
|
+
* Returns `sub` plus the identity claims the session's granted scopes allow. Requires an
|
|
2848
|
+
* authenticated session — the SDK attaches the bearer token automatically.
|
|
2849
|
+
*
|
|
2850
|
+
* @param options - Optional per-request options (abort signal, extra headers)
|
|
2851
|
+
* @returns The userinfo claims
|
|
2852
|
+
*/
|
|
2853
|
+
userinfo(options?: RequestOptions): Promise<UserInfo>;
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2626
2856
|
declare class ListingsModule {
|
|
2627
2857
|
private readonly client;
|
|
2628
2858
|
constructor(client: APIClient);
|
|
@@ -3750,6 +3980,7 @@ declare function baleShareUrl(baleId: string, options?: ShareUrlOptions): string
|
|
|
3750
3980
|
declare class MitumbaClient {
|
|
3751
3981
|
readonly api: APIClient;
|
|
3752
3982
|
readonly auth: AuthModule;
|
|
3983
|
+
readonly oauth: OAuthModule;
|
|
3753
3984
|
readonly listings: ListingsModule;
|
|
3754
3985
|
readonly search: SearchModule;
|
|
3755
3986
|
readonly orders: OrdersModule;
|
|
@@ -3800,4 +4031,4 @@ declare class MitumbaClient {
|
|
|
3800
4031
|
isAuthenticated(): Promise<boolean>;
|
|
3801
4032
|
}
|
|
3802
4033
|
|
|
3803
|
-
export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddPaymentMethodInput, type Address, type AdminAuditEntry, 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 CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, 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 FollowedStore, type ForgotPasswordInput, IDBTokenStore, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, 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, ORDER_STATUSES, type OperatorPermissionGrant, type Order, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, 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 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 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 UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleStore, type WishlistListing, WishlistsModule, baleShareUrl, createTokenStore, isMessagingAPIError, listingShareUrl, storeShareUrl };
|
|
4034
|
+
export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddPaymentMethodInput, type Address, type AdminAuditEntry, 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 CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, 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 FollowedStore, type ForgotPasswordInput, IDBTokenStore, 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 ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, 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, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, 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 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 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 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 VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleStore, type WishlistListing, WishlistsModule, baleShareUrl, createTokenStore, isMessagingAPIError, listingShareUrl, storeShareUrl };
|