@mitumba/sdk 1.25.0 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -178,9 +178,13 @@ interface AuthenticationResponseJSON {
178
178
  clientExtensionResults?: Record<string, unknown>;
179
179
  authenticatorAttachment?: string;
180
180
  }
181
+ type BusinessType = 'individual' | 'business';
182
+ type SellerType = 'retail' | 'bale';
181
183
  interface BecomeSellerInput {
182
- seller_type: 'individual' | 'business';
183
- sti_score: number;
184
+ business_type?: BusinessType;
185
+ /** @deprecated Use business_type instead */
186
+ seller_type?: 'individual' | 'business';
187
+ sti_score?: number;
184
188
  business_name?: string;
185
189
  id_number?: string;
186
190
  kra_pin?: string;
@@ -1028,6 +1032,100 @@ interface DisputeListParams {
1028
1032
  page?: number;
1029
1033
  }
1030
1034
 
1035
+ type BaleGrade = 'Cream' | 'A' | 'B' | 'C';
1036
+ type BaleType = 'original' | 'sorted';
1037
+ interface WholesaleStore {
1038
+ id: string;
1039
+ name: string;
1040
+ slug: string;
1041
+ tagline: string | null;
1042
+ description: string | null;
1043
+ logo_url: string | null;
1044
+ origins: string[];
1045
+ verified: boolean;
1046
+ }
1047
+ interface WholesaleDepot {
1048
+ id: string;
1049
+ name: string;
1050
+ address: string | null;
1051
+ city_id: string | null;
1052
+ is_primary: boolean;
1053
+ }
1054
+ interface Bale {
1055
+ id: string;
1056
+ store_id: string;
1057
+ seller_id: string;
1058
+ title: string;
1059
+ category: string;
1060
+ grade: BaleGrade;
1061
+ bale_type: BaleType;
1062
+ weight_kg: number;
1063
+ origin: string | null;
1064
+ est_pieces: number | null;
1065
+ price_kes: number;
1066
+ moq: number;
1067
+ mix: string | null;
1068
+ description: string | null;
1069
+ city_id: string | null;
1070
+ status: 'draft' | 'active' | 'sold_out';
1071
+ created_at: string;
1072
+ }
1073
+ interface BaleDetail extends Bale {
1074
+ images: string[];
1075
+ store: {
1076
+ name: string;
1077
+ slug: string;
1078
+ verified: boolean;
1079
+ sti: number | null;
1080
+ };
1081
+ }
1082
+ interface CreateBaleInput {
1083
+ title: string;
1084
+ category: string;
1085
+ grade: BaleGrade;
1086
+ bale_type?: BaleType;
1087
+ weight_kg: number;
1088
+ origin?: string;
1089
+ est_pieces?: number;
1090
+ price_kes: number;
1091
+ moq?: number;
1092
+ mix?: string;
1093
+ description?: string;
1094
+ city_id?: string;
1095
+ status?: 'draft' | 'active' | 'sold_out';
1096
+ }
1097
+ interface WholesaleFeedParams {
1098
+ q?: string;
1099
+ category?: string;
1100
+ grade?: BaleGrade;
1101
+ origin?: string;
1102
+ city_id?: string;
1103
+ limit?: number;
1104
+ offset?: number;
1105
+ }
1106
+ interface BaleFeedItem extends Bale {
1107
+ image_url: string | null;
1108
+ store: {
1109
+ name: string;
1110
+ slug: string;
1111
+ verified: boolean;
1112
+ sti: number | null;
1113
+ };
1114
+ }
1115
+ interface SaveWholesaleStoreInput {
1116
+ name: string;
1117
+ tagline?: string;
1118
+ description?: string;
1119
+ logo_url?: string;
1120
+ origins?: string[];
1121
+ }
1122
+ interface AddDepotInput {
1123
+ name: string;
1124
+ address?: string;
1125
+ city_id?: string;
1126
+ is_primary?: boolean;
1127
+ }
1128
+
1031
1129
  interface MitumbaClientConfig {
1032
1130
  baseUrl: string;
1033
1131
  debug?: boolean;
@@ -2127,6 +2225,53 @@ declare class ReportsModule {
2127
2225
  }>;
2128
2226
  }
2129
2227
 
2228
+ declare class WholesaleModule {
2229
+ private readonly client;
2230
+ constructor(client: APIClient);
2231
+ /** Get the current user's wholesale store and depots. */
2232
+ getWholesaleStore(options?: RequestOptions): Promise<{
2233
+ store: WholesaleStore | null;
2234
+ depots?: WholesaleDepot[];
2235
+ }>;
2236
+ /** Create or update the wholesale store (bale_seller only). */
2237
+ saveWholesaleStore(input: SaveWholesaleStoreInput, options?: RequestOptions): Promise<{
2238
+ id: string;
2239
+ verified?: boolean;
2240
+ }>;
2241
+ /** Add a depot to the wholesale store. */
2242
+ addDepot(input: AddDepotInput, options?: RequestOptions): Promise<{
2243
+ id: string;
2244
+ }>;
2245
+ /** Remove a depot. */
2246
+ removeDepot(id: string, options?: RequestOptions): Promise<{
2247
+ ok: true;
2248
+ }>;
2249
+ /** Create a bale listing (requires verified wholesale store). */
2250
+ createBale(input: CreateBaleInput, options?: RequestOptions): Promise<{
2251
+ id: string;
2252
+ }>;
2253
+ /** Get a bale by ID (public). */
2254
+ getBale(id: string, options?: RequestOptions): Promise<BaleDetail>;
2255
+ /** Update a bale. */
2256
+ updateBale(id: string, input: Partial<CreateBaleInput>, options?: RequestOptions): Promise<{
2257
+ ok: true;
2258
+ }>;
2259
+ /** Soft-delete a bale. */
2260
+ removeBale(id: string, options?: RequestOptions): Promise<{
2261
+ ok: true;
2262
+ }>;
2263
+ /** Get all bales for the current user's wholesale store. */
2264
+ myBales(options?: RequestOptions): Promise<{
2265
+ data: Bale[];
2266
+ }>;
2267
+ /** Browse the wholesale bale feed (public). */
2268
+ wholesaleFeed(params?: WholesaleFeedParams, options?: RequestOptions): Promise<{
2269
+ data: BaleFeedItem[];
2270
+ limit: number;
2271
+ offset: number;
2272
+ }>;
2273
+ }
2274
+
2130
2275
  declare class MitumbaClient {
2131
2276
  readonly api: APIClient;
2132
2277
  readonly auth: AuthModule;
@@ -2148,6 +2293,7 @@ declare class MitumbaClient {
2148
2293
  readonly disputes: DisputesModule;
2149
2294
  readonly uploads: UploadsModule;
2150
2295
  readonly reports: ReportsModule;
2296
+ readonly wholesale: WholesaleModule;
2151
2297
  constructor(config: MitumbaClientConfig);
2152
2298
  /**
2153
2299
  * Set the access token for authenticated requests.
@@ -2179,4 +2325,4 @@ declare class MitumbaClient {
2179
2325
  isAuthenticated(): Promise<boolean>;
2180
2326
  }
2181
2327
 
2182
- export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddPaymentMethodInput, type Address, type AdminListingItem, AdminModule, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminReport, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, AuthModule, type AuthTokens, type AuthenticationResponseJSON, type BecomeSellerInput, type BlockedIp, type Business, BusinessesModule, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type City, type CompleteOnboardingInput, type Condition, type Conversation, type CreateListingInput, type CreateOrderInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, 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, LISTING_STATUSES, type LinkedAccount, type LinkedAccountProvider, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, MemoryTokenStore, type Message, type MessageResponse, MessagesModule, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, ORDER_STATUSES, type Order, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentMethod, type PaymentMethodType, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type RegisterInput, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type ResetPasswordInput, type ResolveDisputeInput, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type SaveSearchInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SendEmailInput, type SendMessageInput, type SendOtpInput, type Session, SettingsModule, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreSettings, type StoreStats, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateListingInput, type UpdateProfileInput, type UpdateStoreInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WishlistListing, WishlistsModule, createTokenStore };
2328
+ export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddPaymentMethodInput, type Address, type AdminListingItem, AdminModule, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminReport, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, AuthModule, type AuthTokens, type AuthenticationResponseJSON, type Bale, type BaleDetail, type BaleFeedItem, type BaleGrade, type BaleType, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type City, type CompleteOnboardingInput, type Condition, type Conversation, type CreateBaleInput, type CreateListingInput, type CreateOrderInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, 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, LISTING_STATUSES, type LinkedAccount, type LinkedAccountProvider, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, MemoryTokenStore, type Message, type MessageResponse, MessagesModule, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, ORDER_STATUSES, type Order, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentMethod, type PaymentMethodType, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type RegisterInput, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type ResetPasswordInput, type ResolveDisputeInput, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type Session, SettingsModule, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreSettings, type StoreStats, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateListingInput, type UpdateProfileInput, type UpdateStoreInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleStore, type WishlistListing, WishlistsModule, createTokenStore };
package/dist/index.d.ts CHANGED
@@ -178,9 +178,13 @@ interface AuthenticationResponseJSON {
178
178
  clientExtensionResults?: Record<string, unknown>;
179
179
  authenticatorAttachment?: string;
180
180
  }
181
+ type BusinessType = 'individual' | 'business';
182
+ type SellerType = 'retail' | 'bale';
181
183
  interface BecomeSellerInput {
182
- seller_type: 'individual' | 'business';
183
- sti_score: number;
184
+ business_type?: BusinessType;
185
+ /** @deprecated Use business_type instead */
186
+ seller_type?: 'individual' | 'business';
187
+ sti_score?: number;
184
188
  business_name?: string;
185
189
  id_number?: string;
186
190
  kra_pin?: string;
@@ -1028,6 +1032,100 @@ interface DisputeListParams {
1028
1032
  page?: number;
1029
1033
  }
1030
1034
 
1035
+ type BaleGrade = 'Cream' | 'A' | 'B' | 'C';
1036
+ type BaleType = 'original' | 'sorted';
1037
+ interface WholesaleStore {
1038
+ id: string;
1039
+ name: string;
1040
+ slug: string;
1041
+ tagline: string | null;
1042
+ description: string | null;
1043
+ logo_url: string | null;
1044
+ origins: string[];
1045
+ verified: boolean;
1046
+ }
1047
+ interface WholesaleDepot {
1048
+ id: string;
1049
+ name: string;
1050
+ address: string | null;
1051
+ city_id: string | null;
1052
+ is_primary: boolean;
1053
+ }
1054
+ interface Bale {
1055
+ id: string;
1056
+ store_id: string;
1057
+ seller_id: string;
1058
+ title: string;
1059
+ category: string;
1060
+ grade: BaleGrade;
1061
+ bale_type: BaleType;
1062
+ weight_kg: number;
1063
+ origin: string | null;
1064
+ est_pieces: number | null;
1065
+ price_kes: number;
1066
+ moq: number;
1067
+ mix: string | null;
1068
+ description: string | null;
1069
+ city_id: string | null;
1070
+ status: 'draft' | 'active' | 'sold_out';
1071
+ created_at: string;
1072
+ }
1073
+ interface BaleDetail extends Bale {
1074
+ images: string[];
1075
+ store: {
1076
+ name: string;
1077
+ slug: string;
1078
+ verified: boolean;
1079
+ sti: number | null;
1080
+ };
1081
+ }
1082
+ interface CreateBaleInput {
1083
+ title: string;
1084
+ category: string;
1085
+ grade: BaleGrade;
1086
+ bale_type?: BaleType;
1087
+ weight_kg: number;
1088
+ origin?: string;
1089
+ est_pieces?: number;
1090
+ price_kes: number;
1091
+ moq?: number;
1092
+ mix?: string;
1093
+ description?: string;
1094
+ city_id?: string;
1095
+ status?: 'draft' | 'active' | 'sold_out';
1096
+ }
1097
+ interface WholesaleFeedParams {
1098
+ q?: string;
1099
+ category?: string;
1100
+ grade?: BaleGrade;
1101
+ origin?: string;
1102
+ city_id?: string;
1103
+ limit?: number;
1104
+ offset?: number;
1105
+ }
1106
+ interface BaleFeedItem extends Bale {
1107
+ image_url: string | null;
1108
+ store: {
1109
+ name: string;
1110
+ slug: string;
1111
+ verified: boolean;
1112
+ sti: number | null;
1113
+ };
1114
+ }
1115
+ interface SaveWholesaleStoreInput {
1116
+ name: string;
1117
+ tagline?: string;
1118
+ description?: string;
1119
+ logo_url?: string;
1120
+ origins?: string[];
1121
+ }
1122
+ interface AddDepotInput {
1123
+ name: string;
1124
+ address?: string;
1125
+ city_id?: string;
1126
+ is_primary?: boolean;
1127
+ }
1128
+
1031
1129
  interface MitumbaClientConfig {
1032
1130
  baseUrl: string;
1033
1131
  debug?: boolean;
@@ -2127,6 +2225,53 @@ declare class ReportsModule {
2127
2225
  }>;
2128
2226
  }
2129
2227
 
2228
+ declare class WholesaleModule {
2229
+ private readonly client;
2230
+ constructor(client: APIClient);
2231
+ /** Get the current user's wholesale store and depots. */
2232
+ getWholesaleStore(options?: RequestOptions): Promise<{
2233
+ store: WholesaleStore | null;
2234
+ depots?: WholesaleDepot[];
2235
+ }>;
2236
+ /** Create or update the wholesale store (bale_seller only). */
2237
+ saveWholesaleStore(input: SaveWholesaleStoreInput, options?: RequestOptions): Promise<{
2238
+ id: string;
2239
+ verified?: boolean;
2240
+ }>;
2241
+ /** Add a depot to the wholesale store. */
2242
+ addDepot(input: AddDepotInput, options?: RequestOptions): Promise<{
2243
+ id: string;
2244
+ }>;
2245
+ /** Remove a depot. */
2246
+ removeDepot(id: string, options?: RequestOptions): Promise<{
2247
+ ok: true;
2248
+ }>;
2249
+ /** Create a bale listing (requires verified wholesale store). */
2250
+ createBale(input: CreateBaleInput, options?: RequestOptions): Promise<{
2251
+ id: string;
2252
+ }>;
2253
+ /** Get a bale by ID (public). */
2254
+ getBale(id: string, options?: RequestOptions): Promise<BaleDetail>;
2255
+ /** Update a bale. */
2256
+ updateBale(id: string, input: Partial<CreateBaleInput>, options?: RequestOptions): Promise<{
2257
+ ok: true;
2258
+ }>;
2259
+ /** Soft-delete a bale. */
2260
+ removeBale(id: string, options?: RequestOptions): Promise<{
2261
+ ok: true;
2262
+ }>;
2263
+ /** Get all bales for the current user's wholesale store. */
2264
+ myBales(options?: RequestOptions): Promise<{
2265
+ data: Bale[];
2266
+ }>;
2267
+ /** Browse the wholesale bale feed (public). */
2268
+ wholesaleFeed(params?: WholesaleFeedParams, options?: RequestOptions): Promise<{
2269
+ data: BaleFeedItem[];
2270
+ limit: number;
2271
+ offset: number;
2272
+ }>;
2273
+ }
2274
+
2130
2275
  declare class MitumbaClient {
2131
2276
  readonly api: APIClient;
2132
2277
  readonly auth: AuthModule;
@@ -2148,6 +2293,7 @@ declare class MitumbaClient {
2148
2293
  readonly disputes: DisputesModule;
2149
2294
  readonly uploads: UploadsModule;
2150
2295
  readonly reports: ReportsModule;
2296
+ readonly wholesale: WholesaleModule;
2151
2297
  constructor(config: MitumbaClientConfig);
2152
2298
  /**
2153
2299
  * Set the access token for authenticated requests.
@@ -2179,4 +2325,4 @@ declare class MitumbaClient {
2179
2325
  isAuthenticated(): Promise<boolean>;
2180
2326
  }
2181
2327
 
2182
- export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddPaymentMethodInput, type Address, type AdminListingItem, AdminModule, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminReport, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, AuthModule, type AuthTokens, type AuthenticationResponseJSON, type BecomeSellerInput, type BlockedIp, type Business, BusinessesModule, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type City, type CompleteOnboardingInput, type Condition, type Conversation, type CreateListingInput, type CreateOrderInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, 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, LISTING_STATUSES, type LinkedAccount, type LinkedAccountProvider, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, MemoryTokenStore, type Message, type MessageResponse, MessagesModule, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, ORDER_STATUSES, type Order, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentMethod, type PaymentMethodType, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type RegisterInput, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type ResetPasswordInput, type ResolveDisputeInput, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type SaveSearchInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SendEmailInput, type SendMessageInput, type SendOtpInput, type Session, SettingsModule, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreSettings, type StoreStats, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateListingInput, type UpdateProfileInput, type UpdateStoreInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WishlistListing, WishlistsModule, createTokenStore };
2328
+ export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddPaymentMethodInput, type Address, type AdminListingItem, AdminModule, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminReport, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, AuthModule, type AuthTokens, type AuthenticationResponseJSON, type Bale, type BaleDetail, type BaleFeedItem, type BaleGrade, type BaleType, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type City, type CompleteOnboardingInput, type Condition, type Conversation, type CreateBaleInput, type CreateListingInput, type CreateOrderInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, 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, LISTING_STATUSES, type LinkedAccount, type LinkedAccountProvider, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, MemoryTokenStore, type Message, type MessageResponse, MessagesModule, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, ORDER_STATUSES, type Order, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentMethod, type PaymentMethodType, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type RegisterInput, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type ResetPasswordInput, type ResolveDisputeInput, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type Session, SettingsModule, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreSettings, type StoreStats, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateListingInput, type UpdateProfileInput, type UpdateStoreInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleStore, type WishlistListing, WishlistsModule, createTokenStore };
package/dist/index.js CHANGED
@@ -1416,6 +1416,61 @@ var ReportsModule = class {
1416
1416
  }
1417
1417
  };
1418
1418
 
1419
+ // src/modules/wholesale.ts
1420
+ var WholesaleModule = class {
1421
+ constructor(client) {
1422
+ this.client = client;
1423
+ }
1424
+ client;
1425
+ // ── Wholesale Store ──
1426
+ /** Get the current user's wholesale store and depots. */
1427
+ async getWholesaleStore(options) {
1428
+ return this.client.get("/listings/wholesale/store", void 0, options);
1429
+ }
1430
+ /** Create or update the wholesale store (bale_seller only). */
1431
+ async saveWholesaleStore(input, options) {
1432
+ return this.client.post("/listings/wholesale/store", input, options);
1433
+ }
1434
+ /** Add a depot to the wholesale store. */
1435
+ async addDepot(input, options) {
1436
+ return this.client.post("/listings/wholesale/store/depots", input, options);
1437
+ }
1438
+ /** Remove a depot. */
1439
+ async removeDepot(id, options) {
1440
+ return this.client.delete(`/listings/wholesale/store/depots/${id}`, void 0, options);
1441
+ }
1442
+ // ── Bales ──
1443
+ /** Create a bale listing (requires verified wholesale store). */
1444
+ async createBale(input, options) {
1445
+ return this.client.post("/listings/bales", input, options);
1446
+ }
1447
+ /** Get a bale by ID (public). */
1448
+ async getBale(id, options) {
1449
+ return this.client.get(`/listings/bales/${id}`, void 0, options);
1450
+ }
1451
+ /** Update a bale. */
1452
+ async updateBale(id, input, options) {
1453
+ return this.client.patch(`/listings/bales/${id}`, input, options);
1454
+ }
1455
+ /** Soft-delete a bale. */
1456
+ async removeBale(id, options) {
1457
+ return this.client.delete(`/listings/bales/${id}`, void 0, options);
1458
+ }
1459
+ /** Get all bales for the current user's wholesale store. */
1460
+ async myBales(options) {
1461
+ return this.client.get("/listings/wholesale/mine/bales", void 0, options);
1462
+ }
1463
+ // ── Feed ──
1464
+ /** Browse the wholesale bale feed (public). */
1465
+ async wholesaleFeed(params, options) {
1466
+ return this.client.get(
1467
+ "/listings/wholesale/feed",
1468
+ params,
1469
+ options
1470
+ );
1471
+ }
1472
+ };
1473
+
1419
1474
  // src/types/auth.ts
1420
1475
  var TWO_FACTOR_METHOD_TYPES = ["totp", "sms", "email", "passkey"];
1421
1476
 
@@ -1466,6 +1521,7 @@ var MitumbaClient = class {
1466
1521
  disputes;
1467
1522
  uploads;
1468
1523
  reports;
1524
+ wholesale;
1469
1525
  constructor(config) {
1470
1526
  this.api = new APIClient(config);
1471
1527
  this.auth = new AuthModule(this.api);
@@ -1487,6 +1543,7 @@ var MitumbaClient = class {
1487
1543
  this.disputes = new DisputesModule(this.api);
1488
1544
  this.uploads = new UploadsModule(this.api);
1489
1545
  this.reports = new ReportsModule(this.api);
1546
+ this.wholesale = new WholesaleModule(this.api);
1490
1547
  }
1491
1548
  /**
1492
1549
  * Set the access token for authenticated requests.
@@ -1558,6 +1615,7 @@ exports.StoresModule = StoresModule;
1558
1615
  exports.TWO_FACTOR_METHOD_TYPES = TWO_FACTOR_METHOD_TYPES;
1559
1616
  exports.UploadsModule = UploadsModule;
1560
1617
  exports.VaziModule = VaziModule;
1618
+ exports.WholesaleModule = WholesaleModule;
1561
1619
  exports.WishlistsModule = WishlistsModule;
1562
1620
  exports.createTokenStore = createTokenStore;
1563
1621
  //# sourceMappingURL=index.js.map