@mitumba/sdk 1.26.0 → 1.27.1
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 +75 -1
- package/dist/index.d.ts +75 -1
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -197,6 +197,14 @@ interface BecomeSellerInput {
|
|
|
197
197
|
price_range_min?: number;
|
|
198
198
|
price_range_max?: number;
|
|
199
199
|
}
|
|
200
|
+
interface BecomeBaleSellerInput {
|
|
201
|
+
business_type?: BusinessType;
|
|
202
|
+
business_name?: string;
|
|
203
|
+
kra_pin?: string;
|
|
204
|
+
id_number?: string;
|
|
205
|
+
phone?: string;
|
|
206
|
+
county?: string;
|
|
207
|
+
}
|
|
200
208
|
interface UserProfile {
|
|
201
209
|
id: string;
|
|
202
210
|
email: string | null;
|
|
@@ -1125,6 +1133,42 @@ interface AddDepotInput {
|
|
|
1125
1133
|
city_id?: string;
|
|
1126
1134
|
is_primary?: boolean;
|
|
1127
1135
|
}
|
|
1136
|
+
declare const BALE_ORDER_STATUSES: readonly ["pending_payment", "paid", "confirmed", "in_transit", "delivered", "completed", "cancelled"];
|
|
1137
|
+
type BaleOrderStatus = typeof BALE_ORDER_STATUSES[number];
|
|
1138
|
+
type BaleFulfillment = 'pickup' | 'courier';
|
|
1139
|
+
interface BaleOrder {
|
|
1140
|
+
id: string;
|
|
1141
|
+
bale_id: string;
|
|
1142
|
+
buyer_id: string;
|
|
1143
|
+
seller_id: string;
|
|
1144
|
+
store_id: string;
|
|
1145
|
+
title: string;
|
|
1146
|
+
grade: string;
|
|
1147
|
+
origin: string | null;
|
|
1148
|
+
image_url: string | null;
|
|
1149
|
+
qty: number;
|
|
1150
|
+
unit_kes: number;
|
|
1151
|
+
total_kes: number;
|
|
1152
|
+
fulfillment: BaleFulfillment;
|
|
1153
|
+
freight_kes: number | null;
|
|
1154
|
+
status: BaleOrderStatus;
|
|
1155
|
+
city_id: string | null;
|
|
1156
|
+
buyer_name: string | null;
|
|
1157
|
+
store_name: string | null;
|
|
1158
|
+
created_at: string;
|
|
1159
|
+
}
|
|
1160
|
+
interface BaleOrderEvent {
|
|
1161
|
+
actor: string;
|
|
1162
|
+
old_status: string | null;
|
|
1163
|
+
new_status: string;
|
|
1164
|
+
note: string | null;
|
|
1165
|
+
created_at: string;
|
|
1166
|
+
}
|
|
1167
|
+
interface CreateBaleOrderInput {
|
|
1168
|
+
bale_id: string;
|
|
1169
|
+
qty?: number;
|
|
1170
|
+
fulfillment: BaleFulfillment;
|
|
1171
|
+
}
|
|
1128
1172
|
|
|
1129
1173
|
interface MitumbaClientConfig {
|
|
1130
1174
|
baseUrl: string;
|
|
@@ -1306,6 +1350,14 @@ declare class AuthModule {
|
|
|
1306
1350
|
roles: string[];
|
|
1307
1351
|
sti_score: number;
|
|
1308
1352
|
}>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Upgrade the current user to a bale (wholesale) seller role.
|
|
1355
|
+
* Mutually exclusive with retail seller — 409 if already a retail seller.
|
|
1356
|
+
*/
|
|
1357
|
+
becomeBaleSeller(input: BecomeBaleSellerInput, options?: RequestOptions): Promise<{
|
|
1358
|
+
ok: true;
|
|
1359
|
+
roles: string[];
|
|
1360
|
+
}>;
|
|
1309
1361
|
/**
|
|
1310
1362
|
* Check if the account is eligible for deletion and what blockers exist.
|
|
1311
1363
|
*/
|
|
@@ -2270,6 +2322,28 @@ declare class WholesaleModule {
|
|
|
2270
2322
|
limit: number;
|
|
2271
2323
|
offset: number;
|
|
2272
2324
|
}>;
|
|
2325
|
+
/** Create a bale order (buyer). */
|
|
2326
|
+
createBaleOrder(input: CreateBaleOrderInput, options?: RequestOptions): Promise<{
|
|
2327
|
+
id: string;
|
|
2328
|
+
total_kes: number;
|
|
2329
|
+
}>;
|
|
2330
|
+
/** Get the buyer's bale orders. */
|
|
2331
|
+
myBaleOrders(options?: RequestOptions): Promise<{
|
|
2332
|
+
data: BaleOrder[];
|
|
2333
|
+
}>;
|
|
2334
|
+
/** Get incoming bale orders (seller). */
|
|
2335
|
+
incomingBaleOrders(options?: RequestOptions): Promise<{
|
|
2336
|
+
data: BaleOrder[];
|
|
2337
|
+
}>;
|
|
2338
|
+
/** Get a bale order by ID with event timeline. */
|
|
2339
|
+
getBaleOrder(id: string, options?: RequestOptions): Promise<BaleOrder & {
|
|
2340
|
+
events: BaleOrderEvent[];
|
|
2341
|
+
}>;
|
|
2342
|
+
/** Transition a bale order status. */
|
|
2343
|
+
transitionBaleOrder(id: string, action: 'confirm' | 'dispatch' | 'deliver' | 'receive', options?: RequestOptions): Promise<{
|
|
2344
|
+
ok: true;
|
|
2345
|
+
status: BaleOrderStatus;
|
|
2346
|
+
}>;
|
|
2273
2347
|
}
|
|
2274
2348
|
|
|
2275
2349
|
declare class MitumbaClient {
|
|
@@ -2325,4 +2399,4 @@ declare class MitumbaClient {
|
|
|
2325
2399
|
isAuthenticated(): Promise<boolean>;
|
|
2326
2400
|
}
|
|
2327
2401
|
|
|
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 };
|
|
2402
|
+
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, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, 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 CreateBaleOrderInput, 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
|
@@ -197,6 +197,14 @@ interface BecomeSellerInput {
|
|
|
197
197
|
price_range_min?: number;
|
|
198
198
|
price_range_max?: number;
|
|
199
199
|
}
|
|
200
|
+
interface BecomeBaleSellerInput {
|
|
201
|
+
business_type?: BusinessType;
|
|
202
|
+
business_name?: string;
|
|
203
|
+
kra_pin?: string;
|
|
204
|
+
id_number?: string;
|
|
205
|
+
phone?: string;
|
|
206
|
+
county?: string;
|
|
207
|
+
}
|
|
200
208
|
interface UserProfile {
|
|
201
209
|
id: string;
|
|
202
210
|
email: string | null;
|
|
@@ -1125,6 +1133,42 @@ interface AddDepotInput {
|
|
|
1125
1133
|
city_id?: string;
|
|
1126
1134
|
is_primary?: boolean;
|
|
1127
1135
|
}
|
|
1136
|
+
declare const BALE_ORDER_STATUSES: readonly ["pending_payment", "paid", "confirmed", "in_transit", "delivered", "completed", "cancelled"];
|
|
1137
|
+
type BaleOrderStatus = typeof BALE_ORDER_STATUSES[number];
|
|
1138
|
+
type BaleFulfillment = 'pickup' | 'courier';
|
|
1139
|
+
interface BaleOrder {
|
|
1140
|
+
id: string;
|
|
1141
|
+
bale_id: string;
|
|
1142
|
+
buyer_id: string;
|
|
1143
|
+
seller_id: string;
|
|
1144
|
+
store_id: string;
|
|
1145
|
+
title: string;
|
|
1146
|
+
grade: string;
|
|
1147
|
+
origin: string | null;
|
|
1148
|
+
image_url: string | null;
|
|
1149
|
+
qty: number;
|
|
1150
|
+
unit_kes: number;
|
|
1151
|
+
total_kes: number;
|
|
1152
|
+
fulfillment: BaleFulfillment;
|
|
1153
|
+
freight_kes: number | null;
|
|
1154
|
+
status: BaleOrderStatus;
|
|
1155
|
+
city_id: string | null;
|
|
1156
|
+
buyer_name: string | null;
|
|
1157
|
+
store_name: string | null;
|
|
1158
|
+
created_at: string;
|
|
1159
|
+
}
|
|
1160
|
+
interface BaleOrderEvent {
|
|
1161
|
+
actor: string;
|
|
1162
|
+
old_status: string | null;
|
|
1163
|
+
new_status: string;
|
|
1164
|
+
note: string | null;
|
|
1165
|
+
created_at: string;
|
|
1166
|
+
}
|
|
1167
|
+
interface CreateBaleOrderInput {
|
|
1168
|
+
bale_id: string;
|
|
1169
|
+
qty?: number;
|
|
1170
|
+
fulfillment: BaleFulfillment;
|
|
1171
|
+
}
|
|
1128
1172
|
|
|
1129
1173
|
interface MitumbaClientConfig {
|
|
1130
1174
|
baseUrl: string;
|
|
@@ -1306,6 +1350,14 @@ declare class AuthModule {
|
|
|
1306
1350
|
roles: string[];
|
|
1307
1351
|
sti_score: number;
|
|
1308
1352
|
}>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Upgrade the current user to a bale (wholesale) seller role.
|
|
1355
|
+
* Mutually exclusive with retail seller — 409 if already a retail seller.
|
|
1356
|
+
*/
|
|
1357
|
+
becomeBaleSeller(input: BecomeBaleSellerInput, options?: RequestOptions): Promise<{
|
|
1358
|
+
ok: true;
|
|
1359
|
+
roles: string[];
|
|
1360
|
+
}>;
|
|
1309
1361
|
/**
|
|
1310
1362
|
* Check if the account is eligible for deletion and what blockers exist.
|
|
1311
1363
|
*/
|
|
@@ -2270,6 +2322,28 @@ declare class WholesaleModule {
|
|
|
2270
2322
|
limit: number;
|
|
2271
2323
|
offset: number;
|
|
2272
2324
|
}>;
|
|
2325
|
+
/** Create a bale order (buyer). */
|
|
2326
|
+
createBaleOrder(input: CreateBaleOrderInput, options?: RequestOptions): Promise<{
|
|
2327
|
+
id: string;
|
|
2328
|
+
total_kes: number;
|
|
2329
|
+
}>;
|
|
2330
|
+
/** Get the buyer's bale orders. */
|
|
2331
|
+
myBaleOrders(options?: RequestOptions): Promise<{
|
|
2332
|
+
data: BaleOrder[];
|
|
2333
|
+
}>;
|
|
2334
|
+
/** Get incoming bale orders (seller). */
|
|
2335
|
+
incomingBaleOrders(options?: RequestOptions): Promise<{
|
|
2336
|
+
data: BaleOrder[];
|
|
2337
|
+
}>;
|
|
2338
|
+
/** Get a bale order by ID with event timeline. */
|
|
2339
|
+
getBaleOrder(id: string, options?: RequestOptions): Promise<BaleOrder & {
|
|
2340
|
+
events: BaleOrderEvent[];
|
|
2341
|
+
}>;
|
|
2342
|
+
/** Transition a bale order status. */
|
|
2343
|
+
transitionBaleOrder(id: string, action: 'confirm' | 'dispatch' | 'deliver' | 'receive', options?: RequestOptions): Promise<{
|
|
2344
|
+
ok: true;
|
|
2345
|
+
status: BaleOrderStatus;
|
|
2346
|
+
}>;
|
|
2273
2347
|
}
|
|
2274
2348
|
|
|
2275
2349
|
declare class MitumbaClient {
|
|
@@ -2325,4 +2399,4 @@ declare class MitumbaClient {
|
|
|
2325
2399
|
isAuthenticated(): Promise<boolean>;
|
|
2326
2400
|
}
|
|
2327
2401
|
|
|
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 };
|
|
2402
|
+
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, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, 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 CreateBaleOrderInput, 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
|
@@ -436,6 +436,13 @@ var AuthModule = class {
|
|
|
436
436
|
async becomeSeller(input, options) {
|
|
437
437
|
return this.client.post("/auth/become-seller", input, options);
|
|
438
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* Upgrade the current user to a bale (wholesale) seller role.
|
|
441
|
+
* Mutually exclusive with retail seller — 409 if already a retail seller.
|
|
442
|
+
*/
|
|
443
|
+
async becomeBaleSeller(input, options) {
|
|
444
|
+
return this.client.post("/auth/become-bale-seller", input, options);
|
|
445
|
+
}
|
|
439
446
|
/**
|
|
440
447
|
* Check if the account is eligible for deletion and what blockers exist.
|
|
441
448
|
*/
|
|
@@ -1469,6 +1476,27 @@ var WholesaleModule = class {
|
|
|
1469
1476
|
options
|
|
1470
1477
|
);
|
|
1471
1478
|
}
|
|
1479
|
+
// ── Bale Orders ──
|
|
1480
|
+
/** Create a bale order (buyer). */
|
|
1481
|
+
async createBaleOrder(input, options) {
|
|
1482
|
+
return this.client.post("/listings/bale-orders", input, options);
|
|
1483
|
+
}
|
|
1484
|
+
/** Get the buyer's bale orders. */
|
|
1485
|
+
async myBaleOrders(options) {
|
|
1486
|
+
return this.client.get("/listings/bale-orders/mine", void 0, options);
|
|
1487
|
+
}
|
|
1488
|
+
/** Get incoming bale orders (seller). */
|
|
1489
|
+
async incomingBaleOrders(options) {
|
|
1490
|
+
return this.client.get("/listings/wholesale/orders", void 0, options);
|
|
1491
|
+
}
|
|
1492
|
+
/** Get a bale order by ID with event timeline. */
|
|
1493
|
+
async getBaleOrder(id, options) {
|
|
1494
|
+
return this.client.get(`/listings/bale-orders/${id}`, void 0, options);
|
|
1495
|
+
}
|
|
1496
|
+
/** Transition a bale order status. */
|
|
1497
|
+
async transitionBaleOrder(id, action, options) {
|
|
1498
|
+
return this.client.post(`/listings/bale-orders/${id}/transition`, { action }, options);
|
|
1499
|
+
}
|
|
1472
1500
|
};
|
|
1473
1501
|
|
|
1474
1502
|
// src/types/auth.ts
|
|
@@ -1499,6 +1527,9 @@ var DISPUTE_REASONS = ["not_received", "not_as_described", "damaged", "counterfe
|
|
|
1499
1527
|
var DESIRED_RESOLUTIONS = ["refund", "replacement", "partial_refund"];
|
|
1500
1528
|
var DISPUTE_STATUSES = ["open", "seller_responded", "under_review", "resolved_refund", "resolved_release", "resolved_partial", "withdrawn"];
|
|
1501
1529
|
|
|
1530
|
+
// src/types/wholesale.ts
|
|
1531
|
+
var BALE_ORDER_STATUSES = ["pending_payment", "paid", "confirmed", "in_transit", "delivered", "completed", "cancelled"];
|
|
1532
|
+
|
|
1502
1533
|
// src/index.ts
|
|
1503
1534
|
var MitumbaClient = class {
|
|
1504
1535
|
api;
|
|
@@ -1588,6 +1619,7 @@ exports.APIClient = APIClient;
|
|
|
1588
1619
|
exports.APIError = APIError;
|
|
1589
1620
|
exports.AdminModule = AdminModule;
|
|
1590
1621
|
exports.AuthModule = AuthModule;
|
|
1622
|
+
exports.BALE_ORDER_STATUSES = BALE_ORDER_STATUSES;
|
|
1591
1623
|
exports.BusinessesModule = BusinessesModule;
|
|
1592
1624
|
exports.CONDITIONS = CONDITIONS;
|
|
1593
1625
|
exports.CartModule = CartModule;
|