@mitumba/sdk 5.33.0 → 5.34.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 +132 -1
- package/dist/index.d.ts +132 -1
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1008,6 +1008,7 @@ interface AdminVerificationItem {
|
|
|
1008
1008
|
display_name: string | null;
|
|
1009
1009
|
email: string | null;
|
|
1010
1010
|
phone: string | null;
|
|
1011
|
+
/** A URL, or a private document id (see `isDocumentId`) read with `admin.getDocument`. */
|
|
1011
1012
|
id_document_url: string | null;
|
|
1012
1013
|
kra_pin: string | null;
|
|
1013
1014
|
}
|
|
@@ -1331,6 +1332,8 @@ interface AdminWholesalePendingStore {
|
|
|
1331
1332
|
reviewed_at?: string | null;
|
|
1332
1333
|
/** Rejection reason, also shown to the seller. */
|
|
1333
1334
|
review_note?: string | null;
|
|
1335
|
+
/** Each a URL, or a private document id (see `isDocumentId`) read with `admin.getDocument`. */
|
|
1336
|
+
verification_photos?: string[];
|
|
1334
1337
|
[key: string]: unknown;
|
|
1335
1338
|
}
|
|
1336
1339
|
/** `public` clients (browser SPAs, mobile) use PKCE and have no secret; `confidential` clients have a server-side secret. */
|
|
@@ -2448,6 +2451,11 @@ interface SaveWholesaleStoreInput {
|
|
|
2448
2451
|
description?: string;
|
|
2449
2452
|
logo_url?: string;
|
|
2450
2453
|
origins?: string[];
|
|
2454
|
+
/**
|
|
2455
|
+
* Up to 8. Each is a URL or a private document id (`documents.upload` with purpose
|
|
2456
|
+
* `wholesale_verification` for this store). Ids are accepted only once the store exists.
|
|
2457
|
+
*/
|
|
2458
|
+
verification_photos?: string[];
|
|
2451
2459
|
}
|
|
2452
2460
|
interface AddDepotInput {
|
|
2453
2461
|
name: string;
|
|
@@ -2887,6 +2895,62 @@ interface LiveUnreadOptions {
|
|
|
2887
2895
|
/** Calls back when the page regains focus or becomes visible. Default: window focus and document visibility in a browser; nothing elsewhere. */
|
|
2888
2896
|
onResume?: (listener: () => void) => () => void;
|
|
2889
2897
|
}
|
|
2898
|
+
/** A way to reach someone. */
|
|
2899
|
+
type NotificationChannel = 'in_app' | 'email' | 'push' | 'whatsapp' | 'telegram' | 'sms';
|
|
2900
|
+
/** Pop-up kinds a person may mute. Security and approval pop-ups can't be muted. */
|
|
2901
|
+
type MutableFlashKind = 'announcement' | 'account_action';
|
|
2902
|
+
/** Quiet hours: `start` and `end` are 24-hour `HH:MM`; an end before the start is an overnight window. */
|
|
2903
|
+
interface QuietHours {
|
|
2904
|
+
enabled: boolean;
|
|
2905
|
+
start: string;
|
|
2906
|
+
end: string;
|
|
2907
|
+
/** IANA time zone, e.g. `Africa/Nairobi`. */
|
|
2908
|
+
timeZone: string;
|
|
2909
|
+
}
|
|
2910
|
+
interface NotificationPreferenceCategory {
|
|
2911
|
+
id: NotificationCategory;
|
|
2912
|
+
label: string;
|
|
2913
|
+
description: string;
|
|
2914
|
+
kind: 'transactional' | 'marketing' | 'either';
|
|
2915
|
+
/** Some events here still arrive by in-app and email when every channel is off: show a lock. */
|
|
2916
|
+
required: boolean;
|
|
2917
|
+
/** Only the channels this category's events use. */
|
|
2918
|
+
channels: Array<{
|
|
2919
|
+
channel: NotificationChannel;
|
|
2920
|
+
enabled: boolean;
|
|
2921
|
+
default: boolean;
|
|
2922
|
+
}>;
|
|
2923
|
+
}
|
|
2924
|
+
/** Everything the notification settings page shows. Every preferences method answers it whole. */
|
|
2925
|
+
interface NotificationPreferences {
|
|
2926
|
+
categories: NotificationPreferenceCategory[];
|
|
2927
|
+
/** Whether each channel can reach the caller right now. */
|
|
2928
|
+
channels: Array<{
|
|
2929
|
+
channel: NotificationChannel;
|
|
2930
|
+
available: boolean;
|
|
2931
|
+
}>;
|
|
2932
|
+
quietHours: QuietHours;
|
|
2933
|
+
mutedFlashKinds: MutableFlashKind[];
|
|
2934
|
+
/** Channels the caller has opted in to marketing on. */
|
|
2935
|
+
marketingConsent: NotificationChannel[];
|
|
2936
|
+
/** Text to show next to each marketing opt-in toggle. */
|
|
2937
|
+
consentWording: Partial<Record<NotificationChannel, string>>;
|
|
2938
|
+
}
|
|
2939
|
+
interface PreferenceCellChange {
|
|
2940
|
+
category: NotificationCategory;
|
|
2941
|
+
channel: NotificationChannel;
|
|
2942
|
+
/** `null` returns the cell to its default. */
|
|
2943
|
+
enabled: boolean | null;
|
|
2944
|
+
}
|
|
2945
|
+
/** At least one field. */
|
|
2946
|
+
interface PreferenceSettingsChange {
|
|
2947
|
+
quietHours?: QuietHours;
|
|
2948
|
+
mutedFlashKinds?: MutableFlashKind[];
|
|
2949
|
+
}
|
|
2950
|
+
interface MarketingConsentChange {
|
|
2951
|
+
channel: NotificationChannel;
|
|
2952
|
+
granted: boolean;
|
|
2953
|
+
}
|
|
2890
2954
|
|
|
2891
2955
|
type SubscriptionTier = 'free' | 'pro' | 'premium';
|
|
2892
2956
|
interface Store {
|
|
@@ -2978,6 +3042,7 @@ interface StoreSettings {
|
|
|
2978
3042
|
operating_days: 'everyday' | 'weekdays' | 'custom';
|
|
2979
3043
|
custom_days: string[];
|
|
2980
3044
|
phone_verified: boolean;
|
|
3045
|
+
/** A URL, or a private document id (`documents.upload` with purpose `identity_document` for this store). */
|
|
2981
3046
|
id_document_url: string | null;
|
|
2982
3047
|
id_verified: boolean;
|
|
2983
3048
|
kra_pin: string | null;
|
|
@@ -3633,6 +3698,7 @@ interface DisputeEvidence {
|
|
|
3633
3698
|
id: string;
|
|
3634
3699
|
uploader_role: 'buyer' | 'seller' | 'admin';
|
|
3635
3700
|
type: 'image' | 'text';
|
|
3701
|
+
/** Text, an image URL, or a private document id (`doc_…`, see `isDocumentId`) read with `documents.get`. */
|
|
3636
3702
|
content: string;
|
|
3637
3703
|
created_at: string;
|
|
3638
3704
|
}
|
|
@@ -3671,11 +3737,15 @@ interface RaiseDisputeInput {
|
|
|
3671
3737
|
description: string;
|
|
3672
3738
|
desired_resolution: DesiredResolution;
|
|
3673
3739
|
evidence_urls?: string[];
|
|
3740
|
+
/** Private document ids (`documents.upload` with purpose `dispute_evidence` for this order). At most 6 items with `evidence_urls`. */
|
|
3741
|
+
evidence_documents?: string[];
|
|
3674
3742
|
}
|
|
3675
3743
|
interface RespondDisputeInput {
|
|
3676
3744
|
accept: boolean;
|
|
3677
3745
|
message?: string;
|
|
3678
3746
|
evidence_urls?: string[];
|
|
3747
|
+
/** Private document ids (`documents.upload` with purpose `dispute_evidence` for this order). At most 6 items with `evidence_urls`. */
|
|
3748
|
+
evidence_documents?: string[];
|
|
3679
3749
|
}
|
|
3680
3750
|
interface ResolveDisputeInput {
|
|
3681
3751
|
resolution: 'refund' | 'release' | 'partial';
|
|
@@ -3690,6 +3760,33 @@ interface DisputeListParams {
|
|
|
3690
3760
|
page?: number;
|
|
3691
3761
|
}
|
|
3692
3762
|
|
|
3763
|
+
/** What a private document is for. Each purpose belongs to one kind of subject. */
|
|
3764
|
+
declare const DOCUMENT_PURPOSES: readonly ["dispute_evidence", "identity_document", "wholesale_verification"];
|
|
3765
|
+
type DocumentPurpose = typeof DOCUMENT_PURPOSES[number];
|
|
3766
|
+
/**
|
|
3767
|
+
* Uploading a private document.
|
|
3768
|
+
*
|
|
3769
|
+
* - `dispute_evidence`: `subjectId` is the order id; photos only.
|
|
3770
|
+
* - `identity_document`: `subjectId` is the retail store id; a photo or a PDF.
|
|
3771
|
+
* - `wholesale_verification`: `subjectId` is the wholesale store id; photos only.
|
|
3772
|
+
*
|
|
3773
|
+
* Photos (JPEG, PNG, WebP, HEIC) are stored re-encoded as WebP. Up to 10 MB.
|
|
3774
|
+
*/
|
|
3775
|
+
interface UploadDocumentInput {
|
|
3776
|
+
file: Blob;
|
|
3777
|
+
purpose: DocumentPurpose;
|
|
3778
|
+
subjectId: string;
|
|
3779
|
+
}
|
|
3780
|
+
/** A stored private document. It is read with `documents.get`; it has no public URL. */
|
|
3781
|
+
interface PrivateDocument {
|
|
3782
|
+
/** `doc_…`. Pass it where a document is referred to by id. */
|
|
3783
|
+
id: string;
|
|
3784
|
+
purpose: DocumentPurpose;
|
|
3785
|
+
content_type: 'image/webp' | 'application/pdf';
|
|
3786
|
+
size_bytes: number;
|
|
3787
|
+
created_at: string;
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3693
3790
|
/** IAM principal lifecycle state. */
|
|
3694
3791
|
type IamUserStatus = 'active' | 'disabled';
|
|
3695
3792
|
/** Organization lifecycle state. */
|
|
@@ -4738,6 +4835,23 @@ declare class NotificationsModule {
|
|
|
4738
4835
|
markRead(ids?: string[], options?: RequestOptions): Promise<{
|
|
4739
4836
|
ok: true;
|
|
4740
4837
|
}>;
|
|
4838
|
+
/**
|
|
4839
|
+
* The caller's notification settings: categories with their channels, which channels can reach
|
|
4840
|
+
* them now, quiet hours, muted pop-ups and marketing consent.
|
|
4841
|
+
*/
|
|
4842
|
+
getPreferences(options?: RequestOptions): Promise<NotificationPreferences>;
|
|
4843
|
+
/**
|
|
4844
|
+
* Set (or, with `enabled: null`, reset to default) 1 to 64 category × channel cells. A cell
|
|
4845
|
+
* applies to every event in its category. Answers the whole updated preferences.
|
|
4846
|
+
*/
|
|
4847
|
+
updatePreferences(cells: PreferenceCellChange[], options?: RequestOptions): Promise<NotificationPreferences>;
|
|
4848
|
+
/** Change quiet hours, muted pop-up kinds, or both. Answers the whole updated preferences. */
|
|
4849
|
+
updatePreferenceSettings(input: PreferenceSettingsChange, options?: RequestOptions): Promise<NotificationPreferences>;
|
|
4850
|
+
/**
|
|
4851
|
+
* Opt in to or out of marketing on one channel. The server records its own consent wording
|
|
4852
|
+
* (shown to the person as `consentWording`). Answers the whole updated preferences.
|
|
4853
|
+
*/
|
|
4854
|
+
setMarketingConsent(input: MarketingConsentChange, options?: RequestOptions): Promise<NotificationPreferences>;
|
|
4741
4855
|
/** Create an inert live notification stream. Register listeners before `start()`. */
|
|
4742
4856
|
stream(options?: NotificationStreamOptions): NotificationStream;
|
|
4743
4857
|
/** Create and start a live notification stream. Resolves once connected. */
|
|
@@ -5345,6 +5459,11 @@ declare class AdminModule {
|
|
|
5345
5459
|
unverifyStore(storeId: string, options?: RequestOptions): Promise<{
|
|
5346
5460
|
ok: true;
|
|
5347
5461
|
}>;
|
|
5462
|
+
/**
|
|
5463
|
+
* Read a private document as an operator. Dispute evidence needs `admin:read`; identity documents
|
|
5464
|
+
* and wholesale verification photos need `sellers:verify`.
|
|
5465
|
+
*/
|
|
5466
|
+
getDocument(documentId: string, options?: RequestOptions): Promise<FileResponse>;
|
|
5348
5467
|
listVerifications(params?: {
|
|
5349
5468
|
status?: 'pending' | 'verified' | 'rejected' | 'unverified';
|
|
5350
5469
|
page?: number;
|
|
@@ -5742,6 +5861,17 @@ declare class UploadsModule {
|
|
|
5742
5861
|
}>;
|
|
5743
5862
|
}
|
|
5744
5863
|
|
|
5864
|
+
/** Whether a stored value refers to a private document (`doc_…`) rather than a URL. */
|
|
5865
|
+
declare function isDocumentId(value: string): boolean;
|
|
5866
|
+
declare class DocumentsModule {
|
|
5867
|
+
private readonly client;
|
|
5868
|
+
constructor(client: APIClient);
|
|
5869
|
+
/** Upload a private document. Returns its id; the file itself is never public. */
|
|
5870
|
+
upload(input: UploadDocumentInput, options?: RequestOptions): Promise<PrivateDocument>;
|
|
5871
|
+
/** Read a private document the signed-in user may see. 404 for any other. */
|
|
5872
|
+
get(documentId: string, options?: RequestOptions): Promise<FileResponse>;
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5745
5875
|
declare class ReportsModule {
|
|
5746
5876
|
private readonly client;
|
|
5747
5877
|
constructor(client: APIClient);
|
|
@@ -6136,6 +6266,7 @@ declare class MitumbaClient {
|
|
|
6136
6266
|
readonly admin: AdminModule;
|
|
6137
6267
|
readonly disputes: DisputesModule;
|
|
6138
6268
|
readonly uploads: UploadsModule;
|
|
6269
|
+
readonly documents: DocumentsModule;
|
|
6139
6270
|
readonly reports: ReportsModule;
|
|
6140
6271
|
readonly wholesale: WholesaleModule;
|
|
6141
6272
|
readonly iam: IamModule;
|
|
@@ -6171,4 +6302,4 @@ declare class MitumbaClient {
|
|
|
6171
6302
|
isAuthenticated(): Promise<boolean>;
|
|
6172
6303
|
}
|
|
6173
6304
|
|
|
6174
|
-
export { APIClient, APIError, type APIErrorResponse, type AcceptStoreInvitationResult, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type AddPayoutDestinationInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, type AdminMessageReport, type AdminMessageReportDetail, type AdminMessageReportList, type AdminMessageReportThreadMessage, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminRefundItem, type AdminRefundReason, type AdminRefundSendResult, type AdminRefundStatus, type AdminReport, type AdminRolePreset, type AdminShopLimitRequest, type AdminShopLimitRequestsPage, 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 CancelCheckoutRefusalCode, type CancelCheckoutResponse, type CancelOrderInput, type CancelOrderResult, type CartItem, type CartLineAvailability, CartModule, type CartPartition, type CategoriesBySection, type Category, type CategorySection, type ChangePasswordInput, type ChangePlatformSettingInput, type ChangePlatformSettingResult, type Checkout, type CheckoutMoney, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutRefusal, type CheckoutRefusalCode, type CheckoutShopOrder, type CheckoutState, type CheckoutStatus, type CheckoutStatusResponse, CheckoutsModule, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateCheckoutInput, type CreateCheckoutResponse, 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 CreatedBaleOrder, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, type DecideShopLimitInput, type DecideShopLimitResult, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type EarningsBalance, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, type GetCheckoutResponse, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamSession, type IamSessionsResult, type IamSignIn, type IamSignInFailureReason, type IamSignInsResult, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type InvitableStoreRole, type InviteToStoreInput, type InviteToStoreResult, type Jwk, type Jwks, type KnownPaymentProvider, type KnownShopStep, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LiveUnread, type LiveUnreadOptions, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportOutcome, type MessageReportReason, type MessageReportStatus, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, type MessagingSide, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationAction, type NotificationCategory, type NotificationFlash, type NotificationLink, type NotificationPref, type NotificationStream, type NotificationStreamFrame, type NotificationStreamItem, type NotificationStreamOptions, type NotificationStreamState, type NotificationStreamTicket, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryEntry, type OrderHistoryParams, type OrderItem, type OrderItemSummary, 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 PayoutBankOption, type PayoutDestination, type PayoutDestinationLabel, type PayoutDestinationRejection, type PayoutDestinations, type PayoutDestinationsState, type PayoutMethodOption, type PayoutMethodType, type PayoutState, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PlatformSetting, type PlatformSettingChange, type PlatformSettingDetail, type PlatformSettingGroup, type PlatformSettingKind, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type ReceivedStoreInvitation, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type RequestStoreLimitInput, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendTestNotificationResult, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type SettlementLine, type ShareUrlOptions, type ShopCancelReason, type ShopEarnings, type ShopHolder, type ShopNextStep, type ShopOrderFields, type ShopPayout, type ShopPayoutEntriesPage, type ShopPayoutEntriesParams, type ShopPayoutEntry, type ShopSettlement, type ShopStep, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreAuditEntry, type StoreAuditPage, type StoreInvitation, type StoreInvitationListItem, type StoreLimitRequest, type StoreLimitRequestStatus, type StoreLimitState, type StoreMember, type StoreMembers, type StoreMembershipFields, type StorePermission, type StoreResolveThreadInput, type StoreReviewsPage, type StoreRole, 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, cartLineAvailability, categoriesBySection, categorySection, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConditionAllowed, isConsentRequired, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, partitionCart, regionById, stepUpRequired, storeShareUrl };
|
|
6305
|
+
export { APIClient, APIError, type APIErrorResponse, type AcceptStoreInvitationResult, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type AddPayoutDestinationInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, type AdminMessageReport, type AdminMessageReportDetail, type AdminMessageReportList, type AdminMessageReportThreadMessage, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminRefundItem, type AdminRefundReason, type AdminRefundSendResult, type AdminRefundStatus, type AdminReport, type AdminRolePreset, type AdminShopLimitRequest, type AdminShopLimitRequestsPage, 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 CancelCheckoutRefusalCode, type CancelCheckoutResponse, type CancelOrderInput, type CancelOrderResult, type CartItem, type CartLineAvailability, CartModule, type CartPartition, type CategoriesBySection, type Category, type CategorySection, type ChangePasswordInput, type ChangePlatformSettingInput, type ChangePlatformSettingResult, type Checkout, type CheckoutMoney, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutRefusal, type CheckoutRefusalCode, type CheckoutShopOrder, type CheckoutState, type CheckoutStatus, type CheckoutStatusResponse, CheckoutsModule, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateCheckoutInput, type CreateCheckoutResponse, 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 CreatedBaleOrder, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DOCUMENT_PURPOSES, type DecideShopLimitInput, type DecideShopLimitResult, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type DocumentPurpose, DocumentsModule, type EarningsBalance, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, type GetCheckoutResponse, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamSession, type IamSessionsResult, type IamSignIn, type IamSignInFailureReason, type IamSignInsResult, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type InvitableStoreRole, type InviteToStoreInput, type InviteToStoreResult, type Jwk, type Jwks, type KnownPaymentProvider, type KnownShopStep, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LiveUnread, type LiveUnreadOptions, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, type MarketingConsentChange, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportOutcome, type MessageReportReason, type MessageReportStatus, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, type MessagingSide, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type MutableFlashKind, type Notification, type NotificationAction, type NotificationCategory, type NotificationChannel, type NotificationFlash, type NotificationLink, type NotificationPref, type NotificationPreferenceCategory, type NotificationPreferences, type NotificationStream, type NotificationStreamFrame, type NotificationStreamItem, type NotificationStreamOptions, type NotificationStreamState, type NotificationStreamTicket, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryEntry, type OrderHistoryParams, type OrderItem, type OrderItemSummary, 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 PayoutBankOption, type PayoutDestination, type PayoutDestinationLabel, type PayoutDestinationRejection, type PayoutDestinations, type PayoutDestinationsState, type PayoutMethodOption, type PayoutMethodType, type PayoutState, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PlatformSetting, type PlatformSettingChange, type PlatformSettingDetail, type PlatformSettingGroup, type PlatformSettingKind, type PreferenceCellChange, type PreferenceSettingsChange, type PresignImageResponse, type PrivateDocument, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type QuietHours, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type ReceivedStoreInvitation, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type RequestStoreLimitInput, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendTestNotificationResult, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type SettlementLine, type ShareUrlOptions, type ShopCancelReason, type ShopEarnings, type ShopHolder, type ShopNextStep, type ShopOrderFields, type ShopPayout, type ShopPayoutEntriesPage, type ShopPayoutEntriesParams, type ShopPayoutEntry, type ShopSettlement, type ShopStep, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreAuditEntry, type StoreAuditPage, type StoreInvitation, type StoreInvitationListItem, type StoreLimitRequest, type StoreLimitRequestStatus, type StoreLimitState, type StoreMember, type StoreMembers, type StoreMembershipFields, type StorePermission, type StoreResolveThreadInput, type StoreReviewsPage, type StoreRole, 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, type UploadDocumentInput, 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, cartLineAvailability, categoriesBySection, categorySection, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConditionAllowed, isConsentRequired, isDocumentId, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, partitionCart, regionById, stepUpRequired, storeShareUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1008,6 +1008,7 @@ interface AdminVerificationItem {
|
|
|
1008
1008
|
display_name: string | null;
|
|
1009
1009
|
email: string | null;
|
|
1010
1010
|
phone: string | null;
|
|
1011
|
+
/** A URL, or a private document id (see `isDocumentId`) read with `admin.getDocument`. */
|
|
1011
1012
|
id_document_url: string | null;
|
|
1012
1013
|
kra_pin: string | null;
|
|
1013
1014
|
}
|
|
@@ -1331,6 +1332,8 @@ interface AdminWholesalePendingStore {
|
|
|
1331
1332
|
reviewed_at?: string | null;
|
|
1332
1333
|
/** Rejection reason, also shown to the seller. */
|
|
1333
1334
|
review_note?: string | null;
|
|
1335
|
+
/** Each a URL, or a private document id (see `isDocumentId`) read with `admin.getDocument`. */
|
|
1336
|
+
verification_photos?: string[];
|
|
1334
1337
|
[key: string]: unknown;
|
|
1335
1338
|
}
|
|
1336
1339
|
/** `public` clients (browser SPAs, mobile) use PKCE and have no secret; `confidential` clients have a server-side secret. */
|
|
@@ -2448,6 +2451,11 @@ interface SaveWholesaleStoreInput {
|
|
|
2448
2451
|
description?: string;
|
|
2449
2452
|
logo_url?: string;
|
|
2450
2453
|
origins?: string[];
|
|
2454
|
+
/**
|
|
2455
|
+
* Up to 8. Each is a URL or a private document id (`documents.upload` with purpose
|
|
2456
|
+
* `wholesale_verification` for this store). Ids are accepted only once the store exists.
|
|
2457
|
+
*/
|
|
2458
|
+
verification_photos?: string[];
|
|
2451
2459
|
}
|
|
2452
2460
|
interface AddDepotInput {
|
|
2453
2461
|
name: string;
|
|
@@ -2887,6 +2895,62 @@ interface LiveUnreadOptions {
|
|
|
2887
2895
|
/** Calls back when the page regains focus or becomes visible. Default: window focus and document visibility in a browser; nothing elsewhere. */
|
|
2888
2896
|
onResume?: (listener: () => void) => () => void;
|
|
2889
2897
|
}
|
|
2898
|
+
/** A way to reach someone. */
|
|
2899
|
+
type NotificationChannel = 'in_app' | 'email' | 'push' | 'whatsapp' | 'telegram' | 'sms';
|
|
2900
|
+
/** Pop-up kinds a person may mute. Security and approval pop-ups can't be muted. */
|
|
2901
|
+
type MutableFlashKind = 'announcement' | 'account_action';
|
|
2902
|
+
/** Quiet hours: `start` and `end` are 24-hour `HH:MM`; an end before the start is an overnight window. */
|
|
2903
|
+
interface QuietHours {
|
|
2904
|
+
enabled: boolean;
|
|
2905
|
+
start: string;
|
|
2906
|
+
end: string;
|
|
2907
|
+
/** IANA time zone, e.g. `Africa/Nairobi`. */
|
|
2908
|
+
timeZone: string;
|
|
2909
|
+
}
|
|
2910
|
+
interface NotificationPreferenceCategory {
|
|
2911
|
+
id: NotificationCategory;
|
|
2912
|
+
label: string;
|
|
2913
|
+
description: string;
|
|
2914
|
+
kind: 'transactional' | 'marketing' | 'either';
|
|
2915
|
+
/** Some events here still arrive by in-app and email when every channel is off: show a lock. */
|
|
2916
|
+
required: boolean;
|
|
2917
|
+
/** Only the channels this category's events use. */
|
|
2918
|
+
channels: Array<{
|
|
2919
|
+
channel: NotificationChannel;
|
|
2920
|
+
enabled: boolean;
|
|
2921
|
+
default: boolean;
|
|
2922
|
+
}>;
|
|
2923
|
+
}
|
|
2924
|
+
/** Everything the notification settings page shows. Every preferences method answers it whole. */
|
|
2925
|
+
interface NotificationPreferences {
|
|
2926
|
+
categories: NotificationPreferenceCategory[];
|
|
2927
|
+
/** Whether each channel can reach the caller right now. */
|
|
2928
|
+
channels: Array<{
|
|
2929
|
+
channel: NotificationChannel;
|
|
2930
|
+
available: boolean;
|
|
2931
|
+
}>;
|
|
2932
|
+
quietHours: QuietHours;
|
|
2933
|
+
mutedFlashKinds: MutableFlashKind[];
|
|
2934
|
+
/** Channels the caller has opted in to marketing on. */
|
|
2935
|
+
marketingConsent: NotificationChannel[];
|
|
2936
|
+
/** Text to show next to each marketing opt-in toggle. */
|
|
2937
|
+
consentWording: Partial<Record<NotificationChannel, string>>;
|
|
2938
|
+
}
|
|
2939
|
+
interface PreferenceCellChange {
|
|
2940
|
+
category: NotificationCategory;
|
|
2941
|
+
channel: NotificationChannel;
|
|
2942
|
+
/** `null` returns the cell to its default. */
|
|
2943
|
+
enabled: boolean | null;
|
|
2944
|
+
}
|
|
2945
|
+
/** At least one field. */
|
|
2946
|
+
interface PreferenceSettingsChange {
|
|
2947
|
+
quietHours?: QuietHours;
|
|
2948
|
+
mutedFlashKinds?: MutableFlashKind[];
|
|
2949
|
+
}
|
|
2950
|
+
interface MarketingConsentChange {
|
|
2951
|
+
channel: NotificationChannel;
|
|
2952
|
+
granted: boolean;
|
|
2953
|
+
}
|
|
2890
2954
|
|
|
2891
2955
|
type SubscriptionTier = 'free' | 'pro' | 'premium';
|
|
2892
2956
|
interface Store {
|
|
@@ -2978,6 +3042,7 @@ interface StoreSettings {
|
|
|
2978
3042
|
operating_days: 'everyday' | 'weekdays' | 'custom';
|
|
2979
3043
|
custom_days: string[];
|
|
2980
3044
|
phone_verified: boolean;
|
|
3045
|
+
/** A URL, or a private document id (`documents.upload` with purpose `identity_document` for this store). */
|
|
2981
3046
|
id_document_url: string | null;
|
|
2982
3047
|
id_verified: boolean;
|
|
2983
3048
|
kra_pin: string | null;
|
|
@@ -3633,6 +3698,7 @@ interface DisputeEvidence {
|
|
|
3633
3698
|
id: string;
|
|
3634
3699
|
uploader_role: 'buyer' | 'seller' | 'admin';
|
|
3635
3700
|
type: 'image' | 'text';
|
|
3701
|
+
/** Text, an image URL, or a private document id (`doc_…`, see `isDocumentId`) read with `documents.get`. */
|
|
3636
3702
|
content: string;
|
|
3637
3703
|
created_at: string;
|
|
3638
3704
|
}
|
|
@@ -3671,11 +3737,15 @@ interface RaiseDisputeInput {
|
|
|
3671
3737
|
description: string;
|
|
3672
3738
|
desired_resolution: DesiredResolution;
|
|
3673
3739
|
evidence_urls?: string[];
|
|
3740
|
+
/** Private document ids (`documents.upload` with purpose `dispute_evidence` for this order). At most 6 items with `evidence_urls`. */
|
|
3741
|
+
evidence_documents?: string[];
|
|
3674
3742
|
}
|
|
3675
3743
|
interface RespondDisputeInput {
|
|
3676
3744
|
accept: boolean;
|
|
3677
3745
|
message?: string;
|
|
3678
3746
|
evidence_urls?: string[];
|
|
3747
|
+
/** Private document ids (`documents.upload` with purpose `dispute_evidence` for this order). At most 6 items with `evidence_urls`. */
|
|
3748
|
+
evidence_documents?: string[];
|
|
3679
3749
|
}
|
|
3680
3750
|
interface ResolveDisputeInput {
|
|
3681
3751
|
resolution: 'refund' | 'release' | 'partial';
|
|
@@ -3690,6 +3760,33 @@ interface DisputeListParams {
|
|
|
3690
3760
|
page?: number;
|
|
3691
3761
|
}
|
|
3692
3762
|
|
|
3763
|
+
/** What a private document is for. Each purpose belongs to one kind of subject. */
|
|
3764
|
+
declare const DOCUMENT_PURPOSES: readonly ["dispute_evidence", "identity_document", "wholesale_verification"];
|
|
3765
|
+
type DocumentPurpose = typeof DOCUMENT_PURPOSES[number];
|
|
3766
|
+
/**
|
|
3767
|
+
* Uploading a private document.
|
|
3768
|
+
*
|
|
3769
|
+
* - `dispute_evidence`: `subjectId` is the order id; photos only.
|
|
3770
|
+
* - `identity_document`: `subjectId` is the retail store id; a photo or a PDF.
|
|
3771
|
+
* - `wholesale_verification`: `subjectId` is the wholesale store id; photos only.
|
|
3772
|
+
*
|
|
3773
|
+
* Photos (JPEG, PNG, WebP, HEIC) are stored re-encoded as WebP. Up to 10 MB.
|
|
3774
|
+
*/
|
|
3775
|
+
interface UploadDocumentInput {
|
|
3776
|
+
file: Blob;
|
|
3777
|
+
purpose: DocumentPurpose;
|
|
3778
|
+
subjectId: string;
|
|
3779
|
+
}
|
|
3780
|
+
/** A stored private document. It is read with `documents.get`; it has no public URL. */
|
|
3781
|
+
interface PrivateDocument {
|
|
3782
|
+
/** `doc_…`. Pass it where a document is referred to by id. */
|
|
3783
|
+
id: string;
|
|
3784
|
+
purpose: DocumentPurpose;
|
|
3785
|
+
content_type: 'image/webp' | 'application/pdf';
|
|
3786
|
+
size_bytes: number;
|
|
3787
|
+
created_at: string;
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3693
3790
|
/** IAM principal lifecycle state. */
|
|
3694
3791
|
type IamUserStatus = 'active' | 'disabled';
|
|
3695
3792
|
/** Organization lifecycle state. */
|
|
@@ -4738,6 +4835,23 @@ declare class NotificationsModule {
|
|
|
4738
4835
|
markRead(ids?: string[], options?: RequestOptions): Promise<{
|
|
4739
4836
|
ok: true;
|
|
4740
4837
|
}>;
|
|
4838
|
+
/**
|
|
4839
|
+
* The caller's notification settings: categories with their channels, which channels can reach
|
|
4840
|
+
* them now, quiet hours, muted pop-ups and marketing consent.
|
|
4841
|
+
*/
|
|
4842
|
+
getPreferences(options?: RequestOptions): Promise<NotificationPreferences>;
|
|
4843
|
+
/**
|
|
4844
|
+
* Set (or, with `enabled: null`, reset to default) 1 to 64 category × channel cells. A cell
|
|
4845
|
+
* applies to every event in its category. Answers the whole updated preferences.
|
|
4846
|
+
*/
|
|
4847
|
+
updatePreferences(cells: PreferenceCellChange[], options?: RequestOptions): Promise<NotificationPreferences>;
|
|
4848
|
+
/** Change quiet hours, muted pop-up kinds, or both. Answers the whole updated preferences. */
|
|
4849
|
+
updatePreferenceSettings(input: PreferenceSettingsChange, options?: RequestOptions): Promise<NotificationPreferences>;
|
|
4850
|
+
/**
|
|
4851
|
+
* Opt in to or out of marketing on one channel. The server records its own consent wording
|
|
4852
|
+
* (shown to the person as `consentWording`). Answers the whole updated preferences.
|
|
4853
|
+
*/
|
|
4854
|
+
setMarketingConsent(input: MarketingConsentChange, options?: RequestOptions): Promise<NotificationPreferences>;
|
|
4741
4855
|
/** Create an inert live notification stream. Register listeners before `start()`. */
|
|
4742
4856
|
stream(options?: NotificationStreamOptions): NotificationStream;
|
|
4743
4857
|
/** Create and start a live notification stream. Resolves once connected. */
|
|
@@ -5345,6 +5459,11 @@ declare class AdminModule {
|
|
|
5345
5459
|
unverifyStore(storeId: string, options?: RequestOptions): Promise<{
|
|
5346
5460
|
ok: true;
|
|
5347
5461
|
}>;
|
|
5462
|
+
/**
|
|
5463
|
+
* Read a private document as an operator. Dispute evidence needs `admin:read`; identity documents
|
|
5464
|
+
* and wholesale verification photos need `sellers:verify`.
|
|
5465
|
+
*/
|
|
5466
|
+
getDocument(documentId: string, options?: RequestOptions): Promise<FileResponse>;
|
|
5348
5467
|
listVerifications(params?: {
|
|
5349
5468
|
status?: 'pending' | 'verified' | 'rejected' | 'unverified';
|
|
5350
5469
|
page?: number;
|
|
@@ -5742,6 +5861,17 @@ declare class UploadsModule {
|
|
|
5742
5861
|
}>;
|
|
5743
5862
|
}
|
|
5744
5863
|
|
|
5864
|
+
/** Whether a stored value refers to a private document (`doc_…`) rather than a URL. */
|
|
5865
|
+
declare function isDocumentId(value: string): boolean;
|
|
5866
|
+
declare class DocumentsModule {
|
|
5867
|
+
private readonly client;
|
|
5868
|
+
constructor(client: APIClient);
|
|
5869
|
+
/** Upload a private document. Returns its id; the file itself is never public. */
|
|
5870
|
+
upload(input: UploadDocumentInput, options?: RequestOptions): Promise<PrivateDocument>;
|
|
5871
|
+
/** Read a private document the signed-in user may see. 404 for any other. */
|
|
5872
|
+
get(documentId: string, options?: RequestOptions): Promise<FileResponse>;
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5745
5875
|
declare class ReportsModule {
|
|
5746
5876
|
private readonly client;
|
|
5747
5877
|
constructor(client: APIClient);
|
|
@@ -6136,6 +6266,7 @@ declare class MitumbaClient {
|
|
|
6136
6266
|
readonly admin: AdminModule;
|
|
6137
6267
|
readonly disputes: DisputesModule;
|
|
6138
6268
|
readonly uploads: UploadsModule;
|
|
6269
|
+
readonly documents: DocumentsModule;
|
|
6139
6270
|
readonly reports: ReportsModule;
|
|
6140
6271
|
readonly wholesale: WholesaleModule;
|
|
6141
6272
|
readonly iam: IamModule;
|
|
@@ -6171,4 +6302,4 @@ declare class MitumbaClient {
|
|
|
6171
6302
|
isAuthenticated(): Promise<boolean>;
|
|
6172
6303
|
}
|
|
6173
6304
|
|
|
6174
|
-
export { APIClient, APIError, type APIErrorResponse, type AcceptStoreInvitationResult, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type AddPayoutDestinationInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, type AdminMessageReport, type AdminMessageReportDetail, type AdminMessageReportList, type AdminMessageReportThreadMessage, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminRefundItem, type AdminRefundReason, type AdminRefundSendResult, type AdminRefundStatus, type AdminReport, type AdminRolePreset, type AdminShopLimitRequest, type AdminShopLimitRequestsPage, 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 CancelCheckoutRefusalCode, type CancelCheckoutResponse, type CancelOrderInput, type CancelOrderResult, type CartItem, type CartLineAvailability, CartModule, type CartPartition, type CategoriesBySection, type Category, type CategorySection, type ChangePasswordInput, type ChangePlatformSettingInput, type ChangePlatformSettingResult, type Checkout, type CheckoutMoney, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutRefusal, type CheckoutRefusalCode, type CheckoutShopOrder, type CheckoutState, type CheckoutStatus, type CheckoutStatusResponse, CheckoutsModule, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateCheckoutInput, type CreateCheckoutResponse, 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 CreatedBaleOrder, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, type DecideShopLimitInput, type DecideShopLimitResult, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type EarningsBalance, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, type GetCheckoutResponse, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamSession, type IamSessionsResult, type IamSignIn, type IamSignInFailureReason, type IamSignInsResult, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type InvitableStoreRole, type InviteToStoreInput, type InviteToStoreResult, type Jwk, type Jwks, type KnownPaymentProvider, type KnownShopStep, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LiveUnread, type LiveUnreadOptions, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportOutcome, type MessageReportReason, type MessageReportStatus, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, type MessagingSide, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationAction, type NotificationCategory, type NotificationFlash, type NotificationLink, type NotificationPref, type NotificationStream, type NotificationStreamFrame, type NotificationStreamItem, type NotificationStreamOptions, type NotificationStreamState, type NotificationStreamTicket, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryEntry, type OrderHistoryParams, type OrderItem, type OrderItemSummary, 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 PayoutBankOption, type PayoutDestination, type PayoutDestinationLabel, type PayoutDestinationRejection, type PayoutDestinations, type PayoutDestinationsState, type PayoutMethodOption, type PayoutMethodType, type PayoutState, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PlatformSetting, type PlatformSettingChange, type PlatformSettingDetail, type PlatformSettingGroup, type PlatformSettingKind, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type ReceivedStoreInvitation, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type RequestStoreLimitInput, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendTestNotificationResult, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type SettlementLine, type ShareUrlOptions, type ShopCancelReason, type ShopEarnings, type ShopHolder, type ShopNextStep, type ShopOrderFields, type ShopPayout, type ShopPayoutEntriesPage, type ShopPayoutEntriesParams, type ShopPayoutEntry, type ShopSettlement, type ShopStep, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreAuditEntry, type StoreAuditPage, type StoreInvitation, type StoreInvitationListItem, type StoreLimitRequest, type StoreLimitRequestStatus, type StoreLimitState, type StoreMember, type StoreMembers, type StoreMembershipFields, type StorePermission, type StoreResolveThreadInput, type StoreReviewsPage, type StoreRole, 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, cartLineAvailability, categoriesBySection, categorySection, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConditionAllowed, isConsentRequired, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, partitionCart, regionById, stepUpRequired, storeShareUrl };
|
|
6305
|
+
export { APIClient, APIError, type APIErrorResponse, type AcceptStoreInvitationResult, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type AddPayoutDestinationInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, type AdminMessageReport, type AdminMessageReportDetail, type AdminMessageReportList, type AdminMessageReportThreadMessage, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminRefundItem, type AdminRefundReason, type AdminRefundSendResult, type AdminRefundStatus, type AdminReport, type AdminRolePreset, type AdminShopLimitRequest, type AdminShopLimitRequestsPage, 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 CancelCheckoutRefusalCode, type CancelCheckoutResponse, type CancelOrderInput, type CancelOrderResult, type CartItem, type CartLineAvailability, CartModule, type CartPartition, type CategoriesBySection, type Category, type CategorySection, type ChangePasswordInput, type ChangePlatformSettingInput, type ChangePlatformSettingResult, type Checkout, type CheckoutMoney, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutRefusal, type CheckoutRefusalCode, type CheckoutShopOrder, type CheckoutState, type CheckoutStatus, type CheckoutStatusResponse, CheckoutsModule, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateCheckoutInput, type CreateCheckoutResponse, 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 CreatedBaleOrder, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DOCUMENT_PURPOSES, type DecideShopLimitInput, type DecideShopLimitResult, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type DocumentPurpose, DocumentsModule, type EarningsBalance, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, type GetCheckoutResponse, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamSession, type IamSessionsResult, type IamSignIn, type IamSignInFailureReason, type IamSignInsResult, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type InvitableStoreRole, type InviteToStoreInput, type InviteToStoreResult, type Jwk, type Jwks, type KnownPaymentProvider, type KnownShopStep, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LiveUnread, type LiveUnreadOptions, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, type MarketingConsentChange, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportOutcome, type MessageReportReason, type MessageReportStatus, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, type MessagingSide, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type MutableFlashKind, type Notification, type NotificationAction, type NotificationCategory, type NotificationChannel, type NotificationFlash, type NotificationLink, type NotificationPref, type NotificationPreferenceCategory, type NotificationPreferences, type NotificationStream, type NotificationStreamFrame, type NotificationStreamItem, type NotificationStreamOptions, type NotificationStreamState, type NotificationStreamTicket, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryEntry, type OrderHistoryParams, type OrderItem, type OrderItemSummary, 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 PayoutBankOption, type PayoutDestination, type PayoutDestinationLabel, type PayoutDestinationRejection, type PayoutDestinations, type PayoutDestinationsState, type PayoutMethodOption, type PayoutMethodType, type PayoutState, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PlatformSetting, type PlatformSettingChange, type PlatformSettingDetail, type PlatformSettingGroup, type PlatformSettingKind, type PreferenceCellChange, type PreferenceSettingsChange, type PresignImageResponse, type PrivateDocument, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type QuietHours, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type ReceivedStoreInvitation, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type RequestStoreLimitInput, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendTestNotificationResult, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type SettlementLine, type ShareUrlOptions, type ShopCancelReason, type ShopEarnings, type ShopHolder, type ShopNextStep, type ShopOrderFields, type ShopPayout, type ShopPayoutEntriesPage, type ShopPayoutEntriesParams, type ShopPayoutEntry, type ShopSettlement, type ShopStep, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreAuditEntry, type StoreAuditPage, type StoreInvitation, type StoreInvitationListItem, type StoreLimitRequest, type StoreLimitRequestStatus, type StoreLimitState, type StoreMember, type StoreMembers, type StoreMembershipFields, type StorePermission, type StoreResolveThreadInput, type StoreReviewsPage, type StoreRole, 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, type UploadDocumentInput, 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, cartLineAvailability, categoriesBySection, categorySection, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConditionAllowed, isConsentRequired, isDocumentId, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, partitionCart, regionById, stepUpRequired, storeShareUrl };
|
package/dist/index.js
CHANGED
|
@@ -2252,6 +2252,31 @@ var NotificationsModule = class {
|
|
|
2252
2252
|
async markRead(ids, options) {
|
|
2253
2253
|
return this.client.post("/notify/notifications/read", ids ? { ids } : {}, options);
|
|
2254
2254
|
}
|
|
2255
|
+
/**
|
|
2256
|
+
* The caller's notification settings: categories with their channels, which channels can reach
|
|
2257
|
+
* them now, quiet hours, muted pop-ups and marketing consent.
|
|
2258
|
+
*/
|
|
2259
|
+
async getPreferences(options) {
|
|
2260
|
+
return this.client.get("/notify/notifications/preferences", void 0, options);
|
|
2261
|
+
}
|
|
2262
|
+
/**
|
|
2263
|
+
* Set (or, with `enabled: null`, reset to default) 1 to 64 category × channel cells. A cell
|
|
2264
|
+
* applies to every event in its category. Answers the whole updated preferences.
|
|
2265
|
+
*/
|
|
2266
|
+
async updatePreferences(cells, options) {
|
|
2267
|
+
return this.client.put("/notify/notifications/preferences", { cells }, options);
|
|
2268
|
+
}
|
|
2269
|
+
/** Change quiet hours, muted pop-up kinds, or both. Answers the whole updated preferences. */
|
|
2270
|
+
async updatePreferenceSettings(input, options) {
|
|
2271
|
+
return this.client.put("/notify/notifications/preferences/settings", input, options);
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2274
|
+
* Opt in to or out of marketing on one channel. The server records its own consent wording
|
|
2275
|
+
* (shown to the person as `consentWording`). Answers the whole updated preferences.
|
|
2276
|
+
*/
|
|
2277
|
+
async setMarketingConsent(input, options) {
|
|
2278
|
+
return this.client.put("/notify/notifications/preferences/consent", { channel: input.channel, granted: input.granted }, options);
|
|
2279
|
+
}
|
|
2255
2280
|
/** Create an inert live notification stream. Register listeners before `start()`. */
|
|
2256
2281
|
stream(options) {
|
|
2257
2282
|
return new ManagedNotificationStream(this.client, options);
|
|
@@ -2965,6 +2990,13 @@ var AdminModule = class {
|
|
|
2965
2990
|
return this.client.post(`/admin/stores/${storeId}/unverify`, void 0, options);
|
|
2966
2991
|
}
|
|
2967
2992
|
// ── Verification Queue ──
|
|
2993
|
+
/**
|
|
2994
|
+
* Read a private document as an operator. Dispute evidence needs `admin:read`; identity documents
|
|
2995
|
+
* and wholesale verification photos need `sellers:verify`.
|
|
2996
|
+
*/
|
|
2997
|
+
async getDocument(documentId, options) {
|
|
2998
|
+
return this.client.getFile(`/admin/documents/${encodeURIComponent(documentId)}`, void 0, options);
|
|
2999
|
+
}
|
|
2968
3000
|
async listVerifications(params, options) {
|
|
2969
3001
|
return this.client.get("/admin/verifications", params, options);
|
|
2970
3002
|
}
|
|
@@ -3326,6 +3358,28 @@ var UploadsModule = class {
|
|
|
3326
3358
|
}
|
|
3327
3359
|
};
|
|
3328
3360
|
|
|
3361
|
+
// src/modules/documents.ts
|
|
3362
|
+
function isDocumentId(value) {
|
|
3363
|
+
return /^doc_[a-z0-9]{1,60}$/.test(value);
|
|
3364
|
+
}
|
|
3365
|
+
var DocumentsModule = class {
|
|
3366
|
+
constructor(client) {
|
|
3367
|
+
this.client = client;
|
|
3368
|
+
}
|
|
3369
|
+
/** Upload a private document. Returns its id; the file itself is never public. */
|
|
3370
|
+
async upload(input, options) {
|
|
3371
|
+
const formData = new FormData();
|
|
3372
|
+
formData.append("purpose", input.purpose);
|
|
3373
|
+
formData.append("subject_id", input.subjectId);
|
|
3374
|
+
formData.append("file", input.file);
|
|
3375
|
+
return this.client.post("/listings/documents", formData, options);
|
|
3376
|
+
}
|
|
3377
|
+
/** Read a private document the signed-in user may see. 404 for any other. */
|
|
3378
|
+
async get(documentId, options) {
|
|
3379
|
+
return this.client.getFile(`/listings/documents/${encodeURIComponent(documentId)}`, void 0, options);
|
|
3380
|
+
}
|
|
3381
|
+
};
|
|
3382
|
+
|
|
3329
3383
|
// src/modules/reports.ts
|
|
3330
3384
|
var ReportsModule = class {
|
|
3331
3385
|
constructor(client) {
|
|
@@ -3706,6 +3760,9 @@ var DISPUTE_REASONS = ["not_received", "not_as_described", "damaged", "counterfe
|
|
|
3706
3760
|
var DESIRED_RESOLUTIONS = ["refund", "replacement", "partial_refund"];
|
|
3707
3761
|
var DISPUTE_STATUSES = ["open", "seller_responded", "under_review", "resolved_refund", "resolved_release", "resolved_partial", "withdrawn"];
|
|
3708
3762
|
|
|
3763
|
+
// src/types/documents.ts
|
|
3764
|
+
var DOCUMENT_PURPOSES = ["dispute_evidence", "identity_document", "wholesale_verification"];
|
|
3765
|
+
|
|
3709
3766
|
// src/types/wholesale.ts
|
|
3710
3767
|
var BALE_ORDER_STATUSES = ["pending_payment", "paid", "confirmed", "in_transit", "delivered", "completed", "cancelled"];
|
|
3711
3768
|
|
|
@@ -3914,6 +3971,7 @@ var MitumbaClient = class {
|
|
|
3914
3971
|
admin;
|
|
3915
3972
|
disputes;
|
|
3916
3973
|
uploads;
|
|
3974
|
+
documents;
|
|
3917
3975
|
reports;
|
|
3918
3976
|
wholesale;
|
|
3919
3977
|
iam;
|
|
@@ -3940,6 +3998,7 @@ var MitumbaClient = class {
|
|
|
3940
3998
|
this.admin = new AdminModule(this.api);
|
|
3941
3999
|
this.disputes = new DisputesModule(this.api);
|
|
3942
4000
|
this.uploads = new UploadsModule(this.api);
|
|
4001
|
+
this.documents = new DocumentsModule(this.api);
|
|
3943
4002
|
this.reports = new ReportsModule(this.api);
|
|
3944
4003
|
this.wholesale = new WholesaleModule(this.api);
|
|
3945
4004
|
this.iam = new IamModule(this.api);
|
|
@@ -3997,7 +4056,9 @@ exports.DEFAULT_SHARE_ORIGIN = DEFAULT_SHARE_ORIGIN;
|
|
|
3997
4056
|
exports.DESIRED_RESOLUTIONS = DESIRED_RESOLUTIONS;
|
|
3998
4057
|
exports.DISPUTE_REASONS = DISPUTE_REASONS;
|
|
3999
4058
|
exports.DISPUTE_STATUSES = DISPUTE_STATUSES;
|
|
4059
|
+
exports.DOCUMENT_PURPOSES = DOCUMENT_PURPOSES;
|
|
4000
4060
|
exports.DisputesModule = DisputesModule;
|
|
4061
|
+
exports.DocumentsModule = DocumentsModule;
|
|
4001
4062
|
exports.IDBTokenStore = IDBTokenStore;
|
|
4002
4063
|
exports.IamModule = IamModule;
|
|
4003
4064
|
exports.LISTING_STATUSES = LISTING_STATUSES;
|
|
@@ -4041,6 +4102,7 @@ exports.formatPhone = formatPhone;
|
|
|
4041
4102
|
exports.isCartLineBuyable = isCartLineBuyable;
|
|
4042
4103
|
exports.isConditionAllowed = isConditionAllowed;
|
|
4043
4104
|
exports.isConsentRequired = isConsentRequired;
|
|
4105
|
+
exports.isDocumentId = isDocumentId;
|
|
4044
4106
|
exports.isMessagingAPIError = isMessagingAPIError;
|
|
4045
4107
|
exports.isNewOnlyCategory = isNewOnlyCategory;
|
|
4046
4108
|
exports.isValidPhone = isValidPhone;
|