@mitumba/sdk 1.33.0 → 2.1.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 +43 -32
- package/dist/index.d.ts +43 -32
- package/dist/index.js +26 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -53
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -818,6 +818,28 @@ interface LegacyMessagePage {
|
|
|
818
818
|
/** Whether older history remains. */
|
|
819
819
|
has_older: boolean;
|
|
820
820
|
}
|
|
821
|
+
/**
|
|
822
|
+
* Create a bilateral block from a v2 inbox perspective. A buyer blocks a store by `store_id`;
|
|
823
|
+
* a store blocks a buyer by `buyer_id`.
|
|
824
|
+
*/
|
|
825
|
+
type MessagingBlockInput = {
|
|
826
|
+
store_id: string;
|
|
827
|
+
reason?: string;
|
|
828
|
+
} | {
|
|
829
|
+
buyer_id: string;
|
|
830
|
+
reason?: string;
|
|
831
|
+
};
|
|
832
|
+
/** Idempotent block result. */
|
|
833
|
+
interface MessagingBlockResult {
|
|
834
|
+
id: string;
|
|
835
|
+
active: boolean;
|
|
836
|
+
deduplicated: boolean;
|
|
837
|
+
}
|
|
838
|
+
/** Result of removing a block. */
|
|
839
|
+
interface MessagingBlockRemovedResult {
|
|
840
|
+
ok: true;
|
|
841
|
+
active: false;
|
|
842
|
+
}
|
|
821
843
|
|
|
822
844
|
interface BlockedIp {
|
|
823
845
|
ip: string;
|
|
@@ -2782,37 +2804,15 @@ declare class VaziModule {
|
|
|
2782
2804
|
declare class MessagesModule {
|
|
2783
2805
|
private readonly client;
|
|
2784
2806
|
constructor(client: APIClient);
|
|
2785
|
-
/**
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
send(input: SendMessageInput, options?: RequestOptions): Promise<{
|
|
2795
|
-
id: string;
|
|
2796
|
-
}>;
|
|
2797
|
-
/** @deprecated Use advanceThreadReadCursor for precise monotonic state. */
|
|
2798
|
-
markRead(partnerId: string, storeId?: string, options?: RequestOptions): Promise<{
|
|
2799
|
-
ok: true;
|
|
2800
|
-
}>;
|
|
2801
|
-
/** @deprecated Use managed messaging realtime. */
|
|
2802
|
-
connectTyping(partnerId: string): WebSocket;
|
|
2803
|
-
/** @deprecated Use managed messaging realtime. */
|
|
2804
|
-
connectInbox(): WebSocket;
|
|
2805
|
-
/** Create a legacy inbox socket only after hydrating/refreshing the access token. */
|
|
2806
|
-
connectInboxFresh(options?: RequestOptions): Promise<WebSocketLike>;
|
|
2807
|
-
/** Create a report for a message or conversation. */
|
|
2808
|
-
createReport(input: CreateMessageReportInput, options?: RequestOptions): Promise<CreateMessageReportResult>;
|
|
2809
|
-
/** Create an idempotent bilateral buyer/store relationship block. */
|
|
2810
|
-
createBlock(input: CreateMessageBlockInput, options?: RequestOptions): Promise<CreateMessageBlockResult>;
|
|
2811
|
-
/** Remove a block created by the current perspective. */
|
|
2812
|
-
removeBlock(blockId: string, options?: RequestOptions): Promise<{
|
|
2813
|
-
ok: true;
|
|
2814
|
-
active: false;
|
|
2815
|
-
}>;
|
|
2807
|
+
/**
|
|
2808
|
+
* Create a bilateral block from a v2 inbox perspective. A buyer blocks a store (`{ store_id }`);
|
|
2809
|
+
* a store blocks a buyer (`{ buyer_id }`). Idempotent.
|
|
2810
|
+
*/
|
|
2811
|
+
createMessagingBlock(perspective: MessagingPerspective, input: MessagingBlockInput, options?: RequestOptions): Promise<MessagingBlockResult>;
|
|
2812
|
+
/** Remove a block the current perspective created. */
|
|
2813
|
+
removeMessagingBlock(perspective: MessagingPerspective, blockId: string, options?: RequestOptions): Promise<MessagingBlockRemovedResult>;
|
|
2814
|
+
/** File a message or conversation report from a v2 inbox perspective. Idempotent on open reports. */
|
|
2815
|
+
createMessagingReport(perspective: MessagingPerspective, input: CreateMessageReportInput, options?: RequestOptions): Promise<CreateMessageReportResult>;
|
|
2816
2816
|
/** Discover server messaging capabilities. */
|
|
2817
2817
|
getMessagingCapabilities(options?: RequestOptions): Promise<MessagingCapabilities>;
|
|
2818
2818
|
/** List buyer and represented-store inbox perspectives. */
|
|
@@ -3597,6 +3597,17 @@ declare class WholesaleModule {
|
|
|
3597
3597
|
* @throws {APIError} On network or server errors
|
|
3598
3598
|
*/
|
|
3599
3599
|
uploadBaleImage(baleId: string, file: Blob, index: number, options?: RequestOptions): Promise<BaleImageUploadResult>;
|
|
3600
|
+
/**
|
|
3601
|
+
* Remove a bale image from its slot (requires the owning wholesale store).
|
|
3602
|
+
*
|
|
3603
|
+
* @param baleId - The bale whose image is being removed
|
|
3604
|
+
* @param index - The slot index; slot 0 is the cover
|
|
3605
|
+
* @returns `{ ok: true }` on success
|
|
3606
|
+
* @throws {APIError} On network or server errors
|
|
3607
|
+
*/
|
|
3608
|
+
removeBaleImage(baleId: string, index: number, options?: RequestOptions): Promise<{
|
|
3609
|
+
ok: true;
|
|
3610
|
+
}>;
|
|
3600
3611
|
/** Browse the wholesale bale feed (public). */
|
|
3601
3612
|
wholesaleFeed(params?: WholesaleFeedParams, options?: RequestOptions): Promise<{
|
|
3602
3613
|
data: BaleFeedItem[];
|
|
@@ -3718,4 +3729,4 @@ declare class MitumbaClient {
|
|
|
3718
3729
|
isAuthenticated(): Promise<boolean>;
|
|
3719
3730
|
}
|
|
3720
3731
|
|
|
3721
|
-
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 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 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 };
|
|
3732
|
+
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 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -818,6 +818,28 @@ interface LegacyMessagePage {
|
|
|
818
818
|
/** Whether older history remains. */
|
|
819
819
|
has_older: boolean;
|
|
820
820
|
}
|
|
821
|
+
/**
|
|
822
|
+
* Create a bilateral block from a v2 inbox perspective. A buyer blocks a store by `store_id`;
|
|
823
|
+
* a store blocks a buyer by `buyer_id`.
|
|
824
|
+
*/
|
|
825
|
+
type MessagingBlockInput = {
|
|
826
|
+
store_id: string;
|
|
827
|
+
reason?: string;
|
|
828
|
+
} | {
|
|
829
|
+
buyer_id: string;
|
|
830
|
+
reason?: string;
|
|
831
|
+
};
|
|
832
|
+
/** Idempotent block result. */
|
|
833
|
+
interface MessagingBlockResult {
|
|
834
|
+
id: string;
|
|
835
|
+
active: boolean;
|
|
836
|
+
deduplicated: boolean;
|
|
837
|
+
}
|
|
838
|
+
/** Result of removing a block. */
|
|
839
|
+
interface MessagingBlockRemovedResult {
|
|
840
|
+
ok: true;
|
|
841
|
+
active: false;
|
|
842
|
+
}
|
|
821
843
|
|
|
822
844
|
interface BlockedIp {
|
|
823
845
|
ip: string;
|
|
@@ -2782,37 +2804,15 @@ declare class VaziModule {
|
|
|
2782
2804
|
declare class MessagesModule {
|
|
2783
2805
|
private readonly client;
|
|
2784
2806
|
constructor(client: APIClient);
|
|
2785
|
-
/**
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
send(input: SendMessageInput, options?: RequestOptions): Promise<{
|
|
2795
|
-
id: string;
|
|
2796
|
-
}>;
|
|
2797
|
-
/** @deprecated Use advanceThreadReadCursor for precise monotonic state. */
|
|
2798
|
-
markRead(partnerId: string, storeId?: string, options?: RequestOptions): Promise<{
|
|
2799
|
-
ok: true;
|
|
2800
|
-
}>;
|
|
2801
|
-
/** @deprecated Use managed messaging realtime. */
|
|
2802
|
-
connectTyping(partnerId: string): WebSocket;
|
|
2803
|
-
/** @deprecated Use managed messaging realtime. */
|
|
2804
|
-
connectInbox(): WebSocket;
|
|
2805
|
-
/** Create a legacy inbox socket only after hydrating/refreshing the access token. */
|
|
2806
|
-
connectInboxFresh(options?: RequestOptions): Promise<WebSocketLike>;
|
|
2807
|
-
/** Create a report for a message or conversation. */
|
|
2808
|
-
createReport(input: CreateMessageReportInput, options?: RequestOptions): Promise<CreateMessageReportResult>;
|
|
2809
|
-
/** Create an idempotent bilateral buyer/store relationship block. */
|
|
2810
|
-
createBlock(input: CreateMessageBlockInput, options?: RequestOptions): Promise<CreateMessageBlockResult>;
|
|
2811
|
-
/** Remove a block created by the current perspective. */
|
|
2812
|
-
removeBlock(blockId: string, options?: RequestOptions): Promise<{
|
|
2813
|
-
ok: true;
|
|
2814
|
-
active: false;
|
|
2815
|
-
}>;
|
|
2807
|
+
/**
|
|
2808
|
+
* Create a bilateral block from a v2 inbox perspective. A buyer blocks a store (`{ store_id }`);
|
|
2809
|
+
* a store blocks a buyer (`{ buyer_id }`). Idempotent.
|
|
2810
|
+
*/
|
|
2811
|
+
createMessagingBlock(perspective: MessagingPerspective, input: MessagingBlockInput, options?: RequestOptions): Promise<MessagingBlockResult>;
|
|
2812
|
+
/** Remove a block the current perspective created. */
|
|
2813
|
+
removeMessagingBlock(perspective: MessagingPerspective, blockId: string, options?: RequestOptions): Promise<MessagingBlockRemovedResult>;
|
|
2814
|
+
/** File a message or conversation report from a v2 inbox perspective. Idempotent on open reports. */
|
|
2815
|
+
createMessagingReport(perspective: MessagingPerspective, input: CreateMessageReportInput, options?: RequestOptions): Promise<CreateMessageReportResult>;
|
|
2816
2816
|
/** Discover server messaging capabilities. */
|
|
2817
2817
|
getMessagingCapabilities(options?: RequestOptions): Promise<MessagingCapabilities>;
|
|
2818
2818
|
/** List buyer and represented-store inbox perspectives. */
|
|
@@ -3597,6 +3597,17 @@ declare class WholesaleModule {
|
|
|
3597
3597
|
* @throws {APIError} On network or server errors
|
|
3598
3598
|
*/
|
|
3599
3599
|
uploadBaleImage(baleId: string, file: Blob, index: number, options?: RequestOptions): Promise<BaleImageUploadResult>;
|
|
3600
|
+
/**
|
|
3601
|
+
* Remove a bale image from its slot (requires the owning wholesale store).
|
|
3602
|
+
*
|
|
3603
|
+
* @param baleId - The bale whose image is being removed
|
|
3604
|
+
* @param index - The slot index; slot 0 is the cover
|
|
3605
|
+
* @returns `{ ok: true }` on success
|
|
3606
|
+
* @throws {APIError} On network or server errors
|
|
3607
|
+
*/
|
|
3608
|
+
removeBaleImage(baleId: string, index: number, options?: RequestOptions): Promise<{
|
|
3609
|
+
ok: true;
|
|
3610
|
+
}>;
|
|
3600
3611
|
/** Browse the wholesale bale feed (public). */
|
|
3601
3612
|
wholesaleFeed(params?: WholesaleFeedParams, options?: RequestOptions): Promise<{
|
|
3602
3613
|
data: BaleFeedItem[];
|
|
@@ -3718,4 +3729,4 @@ declare class MitumbaClient {
|
|
|
3718
3729
|
isAuthenticated(): Promise<boolean>;
|
|
3719
3730
|
}
|
|
3720
3731
|
|
|
3721
|
-
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 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 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 };
|
|
3732
|
+
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 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 };
|
package/dist/index.js
CHANGED
|
@@ -1402,61 +1402,23 @@ var MessagesModule = class {
|
|
|
1402
1402
|
this.client = client;
|
|
1403
1403
|
}
|
|
1404
1404
|
client;
|
|
1405
|
-
/**
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
);
|
|
1405
|
+
/**
|
|
1406
|
+
* Create a bilateral block from a v2 inbox perspective. A buyer blocks a store (`{ store_id }`);
|
|
1407
|
+
* a store blocks a buyer (`{ buyer_id }`). Idempotent.
|
|
1408
|
+
*/
|
|
1409
|
+
async createMessagingBlock(perspective, input, options) {
|
|
1410
|
+
const value = await this.client.post(`${perspectiveBase(perspective)}/blocks`, input, options);
|
|
1411
|
+
return unwrap(value, isIdentified);
|
|
1412
1412
|
}
|
|
1413
|
-
/**
|
|
1414
|
-
async
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
storeId ? { store_id: storeId } : void 0,
|
|
1418
|
-
options
|
|
1419
|
-
);
|
|
1413
|
+
/** Remove a block the current perspective created. */
|
|
1414
|
+
async removeMessagingBlock(perspective, blockId, options) {
|
|
1415
|
+
const value = await this.client.delete(`${perspectiveBase(perspective)}/blocks/${encode(blockId)}`, void 0, options);
|
|
1416
|
+
return unwrap(value, isRecord2);
|
|
1420
1417
|
}
|
|
1421
|
-
/**
|
|
1422
|
-
async
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
/** @deprecated Use advanceThreadReadCursor for precise monotonic state. */
|
|
1426
|
-
async markRead(partnerId, storeId, options) {
|
|
1427
|
-
const path = storeId ? `/notify/messages/${partnerId}/read?store_id=${storeId}` : `/notify/messages/${partnerId}/read`;
|
|
1428
|
-
return this.client.post(path, void 0, options);
|
|
1429
|
-
}
|
|
1430
|
-
/** @deprecated Use managed messaging realtime. */
|
|
1431
|
-
connectTyping(partnerId) {
|
|
1432
|
-
const token = this.client.getToken();
|
|
1433
|
-
const wsUrl = this.client.getBaseUrl().replace(/^http/, "ws") + `/notify/messages/${partnerId}/ws?token=${token}`;
|
|
1434
|
-
return new WebSocket(wsUrl);
|
|
1435
|
-
}
|
|
1436
|
-
/** @deprecated Use managed messaging realtime. */
|
|
1437
|
-
connectInbox() {
|
|
1438
|
-
const token = this.client.getToken();
|
|
1439
|
-
const wsUrl = this.client.getBaseUrl().replace(/^http/, "ws") + `/notify/messages/inbox?token=${token}`;
|
|
1440
|
-
return new WebSocket(wsUrl);
|
|
1441
|
-
}
|
|
1442
|
-
/** Create a legacy inbox socket only after hydrating/refreshing the access token. */
|
|
1443
|
-
async connectInboxFresh(options) {
|
|
1444
|
-
await this.client.ensureFreshToken(options);
|
|
1445
|
-
const token = this.client.getToken() ?? "";
|
|
1446
|
-
const wsUrl = this.client.getBaseUrl().replace(/^http/, "ws") + `/notify/messages/inbox?token=${encode(token)}`;
|
|
1447
|
-
return this.client.createWebSocket(wsUrl, []);
|
|
1448
|
-
}
|
|
1449
|
-
/** Create a report for a message or conversation. */
|
|
1450
|
-
async createReport(input, options) {
|
|
1451
|
-
return this.client.post("/notify/messages/reports", input, options);
|
|
1452
|
-
}
|
|
1453
|
-
/** Create an idempotent bilateral buyer/store relationship block. */
|
|
1454
|
-
async createBlock(input, options) {
|
|
1455
|
-
return this.client.post("/notify/messages/blocks", input, options);
|
|
1456
|
-
}
|
|
1457
|
-
/** Remove a block created by the current perspective. */
|
|
1458
|
-
async removeBlock(blockId, options) {
|
|
1459
|
-
return this.client.delete(`/notify/messages/blocks/${encode(blockId)}`, void 0, options);
|
|
1418
|
+
/** File a message or conversation report from a v2 inbox perspective. Idempotent on open reports. */
|
|
1419
|
+
async createMessagingReport(perspective, input, options) {
|
|
1420
|
+
const value = await this.client.post(`${perspectiveBase(perspective)}/reports`, input, options);
|
|
1421
|
+
return unwrap(value, isIdentified);
|
|
1460
1422
|
}
|
|
1461
1423
|
/** Discover server messaging capabilities. */
|
|
1462
1424
|
async getMessagingCapabilities(options) {
|
|
@@ -2342,6 +2304,17 @@ var WholesaleModule = class {
|
|
|
2342
2304
|
formData.append("index", String(index));
|
|
2343
2305
|
return this.client.post(`/listings/bales/${baleId}/images/upload`, formData, options);
|
|
2344
2306
|
}
|
|
2307
|
+
/**
|
|
2308
|
+
* Remove a bale image from its slot (requires the owning wholesale store).
|
|
2309
|
+
*
|
|
2310
|
+
* @param baleId - The bale whose image is being removed
|
|
2311
|
+
* @param index - The slot index; slot 0 is the cover
|
|
2312
|
+
* @returns `{ ok: true }` on success
|
|
2313
|
+
* @throws {APIError} On network or server errors
|
|
2314
|
+
*/
|
|
2315
|
+
async removeBaleImage(baleId, index, options) {
|
|
2316
|
+
return this.client.delete(`/listings/bales/${baleId}/images/${index}`, void 0, options);
|
|
2317
|
+
}
|
|
2345
2318
|
// ── Feed ──
|
|
2346
2319
|
/** Browse the wholesale bale feed (public). */
|
|
2347
2320
|
async wholesaleFeed(params, options) {
|