@mitumba/sdk 5.35.0 → 5.37.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 +146 -8
- package/dist/index.d.ts +146 -8
- package/dist/index.js +38 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2111,6 +2111,46 @@ interface Listing {
|
|
|
2111
2111
|
images?: ListingImage[];
|
|
2112
2112
|
image_url?: string | null;
|
|
2113
2113
|
media?: string[];
|
|
2114
|
+
/** Units for sale. */
|
|
2115
|
+
stock_quantity?: number;
|
|
2116
|
+
/** Present on `GET /listings/:id`. */
|
|
2117
|
+
package_size?: PackageSize;
|
|
2118
|
+
package_source?: PackageSource;
|
|
2119
|
+
}
|
|
2120
|
+
/** One piece in a shop's inventory, as its team sees it. */
|
|
2121
|
+
interface InventoryItem {
|
|
2122
|
+
id: string;
|
|
2123
|
+
title: string;
|
|
2124
|
+
price: number;
|
|
2125
|
+
condition: Condition;
|
|
2126
|
+
size: string | null;
|
|
2127
|
+
stock_quantity: number;
|
|
2128
|
+
status: ListingStatus;
|
|
2129
|
+
category_id: string;
|
|
2130
|
+
city_id: string;
|
|
2131
|
+
created_at: string;
|
|
2132
|
+
updated_at: string;
|
|
2133
|
+
package_size: PackageSize;
|
|
2134
|
+
package_source: PackageSource;
|
|
2135
|
+
/** The first photo, or null for a piece without one. */
|
|
2136
|
+
image_url: string | null;
|
|
2137
|
+
media: string[];
|
|
2138
|
+
photo_count: number;
|
|
2139
|
+
}
|
|
2140
|
+
interface InventoryParams {
|
|
2141
|
+
/** One status, or `all` (the default): every status except `removed`. */
|
|
2142
|
+
status?: ListingStatus | 'all';
|
|
2143
|
+
/** Matches part of the title. */
|
|
2144
|
+
q?: string;
|
|
2145
|
+
page?: number;
|
|
2146
|
+
}
|
|
2147
|
+
interface InventoryPage {
|
|
2148
|
+
data: InventoryItem[];
|
|
2149
|
+
/** How many pieces the shop has in each status, whatever the filter. */
|
|
2150
|
+
counts: Record<ListingStatus, number>;
|
|
2151
|
+
page: number;
|
|
2152
|
+
page_size: number;
|
|
2153
|
+
has_more: boolean;
|
|
2114
2154
|
}
|
|
2115
2155
|
interface ListingsFeedParams {
|
|
2116
2156
|
city_id?: string;
|
|
@@ -2122,18 +2162,56 @@ interface ListingsFeedParams {
|
|
|
2122
2162
|
page?: number;
|
|
2123
2163
|
page_size?: number;
|
|
2124
2164
|
}
|
|
2125
|
-
|
|
2165
|
+
/** How big a piece is once packed. Sets the delivery price band. */
|
|
2166
|
+
declare const PACKAGE_SIZES: readonly ["small", "medium", "large", "oversize"];
|
|
2167
|
+
type PackageSize = typeof PACKAGE_SIZES[number];
|
|
2168
|
+
interface ListingInputFields {
|
|
2126
2169
|
store_id: string;
|
|
2127
|
-
title: string;
|
|
2128
2170
|
description?: string;
|
|
2129
2171
|
category_id: string;
|
|
2130
2172
|
city_id: string;
|
|
2131
|
-
price: number;
|
|
2132
2173
|
condition: Condition;
|
|
2133
2174
|
size?: string;
|
|
2175
|
+
/** Units for sale, 1 to 999. Default 1. */
|
|
2176
|
+
stock_quantity?: number;
|
|
2177
|
+
vazi_eligible?: boolean;
|
|
2178
|
+
/** Default: the category's usual size. */
|
|
2179
|
+
package_size?: PackageSize;
|
|
2180
|
+
}
|
|
2181
|
+
/** A piece listed live at once: a title of 3 to 120 characters and a price of at least KES 50. */
|
|
2182
|
+
interface PublishedListingInput extends ListingInputFields {
|
|
2183
|
+
status?: 'active';
|
|
2184
|
+
title: string;
|
|
2185
|
+
price: number;
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* A draft, visible only to the shop's team until it is published. It may have a title of 1
|
|
2189
|
+
* character and no price yet; category, city and condition are still required.
|
|
2190
|
+
*/
|
|
2191
|
+
interface DraftListingInput extends ListingInputFields {
|
|
2192
|
+
status: 'draft';
|
|
2193
|
+
title: string;
|
|
2194
|
+
price?: number;
|
|
2195
|
+
}
|
|
2196
|
+
type CreateListingInput = PublishedListingInput | DraftListingInput;
|
|
2197
|
+
/**
|
|
2198
|
+
* Fields to change. A draft may hold a short title or a price of 0; a live piece keeps a title of
|
|
2199
|
+
* at least 3 characters and a price of at least KES 50.
|
|
2200
|
+
*/
|
|
2201
|
+
interface UpdateListingInput {
|
|
2202
|
+
title?: string;
|
|
2203
|
+
description?: string;
|
|
2204
|
+
category_id?: string;
|
|
2205
|
+
city_id?: string;
|
|
2206
|
+
price?: number;
|
|
2207
|
+
condition?: Condition;
|
|
2208
|
+
size?: string;
|
|
2209
|
+
stock_quantity?: number;
|
|
2134
2210
|
vazi_eligible?: boolean;
|
|
2211
|
+
package_size?: PackageSize;
|
|
2135
2212
|
}
|
|
2136
|
-
|
|
2213
|
+
/** Where a piece's package size came from: the seller, or its category's default. */
|
|
2214
|
+
type PackageSource = 'seller' | 'category_default';
|
|
2137
2215
|
/** Which part of the catalogue a category belongs to. */
|
|
2138
2216
|
type CategorySection = 'fashion' | 'home';
|
|
2139
2217
|
interface Category {
|
|
@@ -3387,6 +3465,37 @@ interface AdminShopLimitRequestsPage {
|
|
|
3387
3465
|
page: number;
|
|
3388
3466
|
has_more: boolean;
|
|
3389
3467
|
}
|
|
3468
|
+
/** An active member of a shop, as operators see it. */
|
|
3469
|
+
interface AdminShopMember {
|
|
3470
|
+
id: string;
|
|
3471
|
+
user_id: string;
|
|
3472
|
+
role: StoreRole;
|
|
3473
|
+
joined_at: string;
|
|
3474
|
+
name: string;
|
|
3475
|
+
email: string | null;
|
|
3476
|
+
}
|
|
3477
|
+
/** One entry of a shop's audit log, as operators see it, with the detail recorded for the change. */
|
|
3478
|
+
interface AdminShopAuditEntry {
|
|
3479
|
+
id: string;
|
|
3480
|
+
actor_id: string;
|
|
3481
|
+
actor_name: string;
|
|
3482
|
+
action: string;
|
|
3483
|
+
target_type: string | null;
|
|
3484
|
+
target_id: string | null;
|
|
3485
|
+
summary: string;
|
|
3486
|
+
/** What changed, as recorded (for example `{ before, after }`), or null. */
|
|
3487
|
+
detail: unknown;
|
|
3488
|
+
created_at: string;
|
|
3489
|
+
}
|
|
3490
|
+
/** A shop's active members and one page of its audit log (50 entries, newest first). */
|
|
3491
|
+
interface AdminShopTeam {
|
|
3492
|
+
members: AdminShopMember[];
|
|
3493
|
+
audit: {
|
|
3494
|
+
data: AdminShopAuditEntry[];
|
|
3495
|
+
page: number;
|
|
3496
|
+
has_more: boolean;
|
|
3497
|
+
};
|
|
3498
|
+
}
|
|
3390
3499
|
type DecideShopLimitInput = {
|
|
3391
3500
|
decision: 'approve';
|
|
3392
3501
|
approved_limit: number;
|
|
@@ -4518,15 +4627,25 @@ declare class ListingsModule {
|
|
|
4518
4627
|
images: ListingImage[];
|
|
4519
4628
|
}>;
|
|
4520
4629
|
/**
|
|
4521
|
-
*
|
|
4630
|
+
* List a piece in a shop, live or as a draft (`status: 'draft'`). Needs `store:listings.manage`
|
|
4631
|
+
* in that shop. A draft is seen only by the shop's team until it is published.
|
|
4632
|
+
*
|
|
4633
|
+
* Errors: 400 invalid_input; 403 store_forbidden, not_a_retail_shop; 404 store_not_found.
|
|
4522
4634
|
*/
|
|
4523
4635
|
create(input: CreateListingInput, options?: RequestOptions): Promise<Listing>;
|
|
4524
4636
|
/**
|
|
4525
|
-
*
|
|
4637
|
+
* Change a piece's details, stock or package size. Sold and removed pieces
|
|
4638
|
+
* cannot be edited.
|
|
4639
|
+
*
|
|
4640
|
+
* Errors: 400 invalid_input, listing_immutable; 403 store_forbidden; 404 not_found.
|
|
4526
4641
|
*/
|
|
4527
4642
|
update(id: string, input: UpdateListingInput, options?: RequestOptions): Promise<Listing>;
|
|
4528
4643
|
/**
|
|
4529
|
-
* Change
|
|
4644
|
+
* Change a piece's status. Publishing a draft (`'active'`) needs a title of 3+ letters, a price
|
|
4645
|
+
* of at least KES 50 and at least one photo; otherwise 422 `not_ready` whose message names what
|
|
4646
|
+
* is missing (see `notReadyToPublish`).
|
|
4647
|
+
*
|
|
4648
|
+
* Errors: 400 invalid_transition; 403 store_forbidden; 404 not_found; 422 not_ready.
|
|
4530
4649
|
*/
|
|
4531
4650
|
updateStatus(id: string, status: ListingStatus, options?: RequestOptions): Promise<{
|
|
4532
4651
|
ok: boolean;
|
|
@@ -4625,6 +4744,8 @@ declare class ListingsModule {
|
|
|
4625
4744
|
data: SimilarListing[];
|
|
4626
4745
|
}>;
|
|
4627
4746
|
}
|
|
4747
|
+
/** Whether an error says a draft is not ready to publish. Its message names what is missing. */
|
|
4748
|
+
declare function notReadyToPublish(error: unknown): boolean;
|
|
4628
4749
|
|
|
4629
4750
|
declare class SearchModule {
|
|
4630
4751
|
private readonly client;
|
|
@@ -5045,6 +5166,14 @@ declare class StoresModule {
|
|
|
5045
5166
|
*/
|
|
5046
5167
|
removePayoutDestination(storeId: string, destinationId: string, options?: RequestOptions): Promise<PayoutDestinationsState>;
|
|
5047
5168
|
private destinationPath;
|
|
5169
|
+
/**
|
|
5170
|
+
* The shop's whole stock for its team: drafts, live, sold and (by filter) removed pieces, most
|
|
5171
|
+
* recently changed first, 24 per page, with counts per status. `store:listings.read`. The public
|
|
5172
|
+
* store page (`getListings`) shows live pieces only.
|
|
5173
|
+
*
|
|
5174
|
+
* Errors: 400 invalid_input; 403 store_forbidden; 404 not_found.
|
|
5175
|
+
*/
|
|
5176
|
+
getInventory(storeId: string, params?: InventoryParams, options?: RequestOptions): Promise<InventoryPage>;
|
|
5048
5177
|
/**
|
|
5049
5178
|
* The shop's members, and the roles the caller may give. `store:members.manage`.
|
|
5050
5179
|
*
|
|
@@ -5609,6 +5738,15 @@ declare class AdminModule {
|
|
|
5609
5738
|
status?: StoreLimitRequestStatus;
|
|
5610
5739
|
page?: number;
|
|
5611
5740
|
}, options?: RequestOptions): Promise<AdminShopLimitRequestsPage>;
|
|
5741
|
+
/**
|
|
5742
|
+
* A shop's active members and one page of its audit log, 50 entries newest first, closed shops
|
|
5743
|
+
* included. `admin:read`.
|
|
5744
|
+
*
|
|
5745
|
+
* Errors: 403 forbidden; 404 not_found.
|
|
5746
|
+
*/
|
|
5747
|
+
getShopTeam(storeId: string, params?: {
|
|
5748
|
+
page?: number;
|
|
5749
|
+
}, options?: RequestOptions): Promise<AdminShopTeam>;
|
|
5612
5750
|
/**
|
|
5613
5751
|
* Approve a request with a new limit (above the current one, at most 50), or reject it with a note
|
|
5614
5752
|
* of at least 10 characters. The owner is told. `sellers:verify`.
|
|
@@ -6335,4 +6473,4 @@ declare class MitumbaClient {
|
|
|
6335
6473
|
isAuthenticated(): Promise<boolean>;
|
|
6336
6474
|
}
|
|
6337
6475
|
|
|
6338
|
-
export { APIClient, APIError, type APIErrorResponse, type AcceptStoreInvitationResult, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type AddPayoutDestinationInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, type AdminMessageReport, type AdminMessageReportDetail, type AdminMessageReportList, type AdminMessageReportThreadMessage, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminRefundItem, type AdminRefundReason, type AdminRefundSendResult, type AdminRefundStatus, type AdminReport, type AdminRolePreset, type AdminShopLimitRequest, type AdminShopLimitRequestsPage, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CancelCheckoutRefusalCode, type CancelCheckoutResponse, type CancelOrderInput, type CancelOrderResult, type CartItem, type CartLineAvailability, CartModule, type CartPartition, type CategoriesBySection, type Category, type CategorySection, type ChangePasswordInput, type ChangePlatformSettingInput, type ChangePlatformSettingResult, type Checkout, type CheckoutMoney, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutRefusal, type CheckoutRefusalCode, type CheckoutShopOrder, type CheckoutState, type CheckoutStatus, type CheckoutStatusResponse, CheckoutsModule, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateCheckoutInput, type CreateCheckoutResponse, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CreatedBaleOrder, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DOCUMENT_PURPOSES, type DecideShopLimitInput, type DecideShopLimitResult, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type DocumentPurpose, DocumentsModule, type EarningsBalance, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, type GetCheckoutResponse, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamSession, type IamSessionsResult, type IamSignIn, type IamSignInFailureReason, type IamSignInsResult, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type InvitableStoreRole, type InviteToStoreInput, type InviteToStoreResult, type Jwk, type Jwks, type KnownPaymentProvider, type KnownShopStep, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LiveUnread, type LiveUnreadOptions, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, type MarketingConsentChange, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportOutcome, type MessageReportReason, type MessageReportStatus, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, type MessagingSide, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type MutableFlashKind, type Notification, type NotificationAction, type NotificationCategory, type NotificationChannel, type NotificationFlash, type NotificationLink, type NotificationPref, type NotificationPreferenceCategory, type NotificationPreferences, type NotificationStream, type NotificationStreamFrame, type NotificationStreamItem, type NotificationStreamOptions, type NotificationStreamState, type NotificationStreamTicket, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryEntry, type OrderHistoryParams, type OrderItem, type OrderItemSummary, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PayoutBankOption, type PayoutDestination, type PayoutDestinationLabel, type PayoutDestinationRejection, type PayoutDestinations, type PayoutDestinationsState, type PayoutMethodOption, type PayoutMethodType, type PayoutState, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PlatformSetting, type PlatformSettingChange, type PlatformSettingDetail, type PlatformSettingGroup, type PlatformSettingKind, type PreferenceCellChange, type PreferenceSettingsChange, type PresignImageResponse, type PrivateDocument, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type QuietHours, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type ReceivedStoreInvitation, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type RequestStoreLimitInput, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, SELLER_VERIFICATION_STATUSES, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SellerVerification, type SellerVerificationStatus, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendTestNotificationResult, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type SettlementLine, type ShareUrlOptions, type ShopCancelReason, type ShopEarnings, type ShopHolder, type ShopNextStep, type ShopOrderFields, type ShopPayout, type ShopPayoutEntriesPage, type ShopPayoutEntriesParams, type ShopPayoutEntry, type ShopSettlement, type ShopStep, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreAuditEntry, type StoreAuditPage, type StoreInvitation, type StoreInvitationListItem, type StoreLimitRequest, type StoreLimitRequestStatus, type StoreLimitState, type StoreMember, type StoreMembers, type StoreMembershipFields, type StorePermission, type StoreResolveThreadInput, type StoreReviewsPage, type StoreRole, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, type UploadDocumentInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, cartLineAvailability, categoriesBySection, categorySection, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConditionAllowed, isConsentRequired, isDocumentId, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, partitionCart, regionById, stepUpRequired, storeShareUrl };
|
|
6476
|
+
export { APIClient, APIError, type APIErrorResponse, type AcceptStoreInvitationResult, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type AddPayoutDestinationInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, type AdminMessageReport, type AdminMessageReportDetail, type AdminMessageReportList, type AdminMessageReportThreadMessage, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminRefundItem, type AdminRefundReason, type AdminRefundSendResult, type AdminRefundStatus, type AdminReport, type AdminRolePreset, type AdminShopAuditEntry, type AdminShopLimitRequest, type AdminShopLimitRequestsPage, type AdminShopMember, type AdminShopTeam, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CancelCheckoutRefusalCode, type CancelCheckoutResponse, type CancelOrderInput, type CancelOrderResult, type CartItem, type CartLineAvailability, CartModule, type CartPartition, type CategoriesBySection, type Category, type CategorySection, type ChangePasswordInput, type ChangePlatformSettingInput, type ChangePlatformSettingResult, type Checkout, type CheckoutMoney, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutRefusal, type CheckoutRefusalCode, type CheckoutShopOrder, type CheckoutState, type CheckoutStatus, type CheckoutStatusResponse, CheckoutsModule, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateCheckoutInput, type CreateCheckoutResponse, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CreatedBaleOrder, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DOCUMENT_PURPOSES, type DecideShopLimitInput, type DecideShopLimitResult, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type DocumentPurpose, DocumentsModule, type DraftListingInput, type EarningsBalance, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, type GetCheckoutResponse, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamSession, type IamSessionsResult, type IamSignIn, type IamSignInFailureReason, type IamSignInsResult, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type InventoryItem, type InventoryPage, type InventoryParams, type InvitableStoreRole, type InviteToStoreInput, type InviteToStoreResult, type Jwk, type Jwks, type KnownPaymentProvider, type KnownShopStep, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LiveUnread, type LiveUnreadOptions, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, type MarketingConsentChange, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportOutcome, type MessageReportReason, type MessageReportStatus, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, type MessagingSide, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type MutableFlashKind, type Notification, type NotificationAction, type NotificationCategory, type NotificationChannel, type NotificationFlash, type NotificationLink, type NotificationPref, type NotificationPreferenceCategory, type NotificationPreferences, type NotificationStream, type NotificationStreamFrame, type NotificationStreamItem, type NotificationStreamOptions, type NotificationStreamState, type NotificationStreamTicket, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryEntry, type OrderHistoryParams, type OrderItem, type OrderItemSummary, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PACKAGE_SIZES, PAYMENT_STATUSES, type PackageSize, type PackageSource, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PayoutBankOption, type PayoutDestination, type PayoutDestinationLabel, type PayoutDestinationRejection, type PayoutDestinations, type PayoutDestinationsState, type PayoutMethodOption, type PayoutMethodType, type PayoutState, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PlatformSetting, type PlatformSettingChange, type PlatformSettingDetail, type PlatformSettingGroup, type PlatformSettingKind, type PreferenceCellChange, type PreferenceSettingsChange, type PresignImageResponse, type PrivateDocument, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type PublishedListingInput, type QuietHours, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type ReceivedStoreInvitation, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type RequestStoreLimitInput, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, SELLER_VERIFICATION_STATUSES, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SellerVerification, type SellerVerificationStatus, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendTestNotificationResult, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type SettlementLine, type ShareUrlOptions, type ShopCancelReason, type ShopEarnings, type ShopHolder, type ShopNextStep, type ShopOrderFields, type ShopPayout, type ShopPayoutEntriesPage, type ShopPayoutEntriesParams, type ShopPayoutEntry, type ShopSettlement, type ShopStep, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreAuditEntry, type StoreAuditPage, type StoreInvitation, type StoreInvitationListItem, type StoreLimitRequest, type StoreLimitRequestStatus, type StoreLimitState, type StoreMember, type StoreMembers, type StoreMembershipFields, type StorePermission, type StoreResolveThreadInput, type StoreReviewsPage, type StoreRole, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, type UploadDocumentInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, cartLineAvailability, categoriesBySection, categorySection, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConditionAllowed, isConsentRequired, isDocumentId, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, notReadyToPublish, partitionCart, regionById, stepUpRequired, storeShareUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -2111,6 +2111,46 @@ interface Listing {
|
|
|
2111
2111
|
images?: ListingImage[];
|
|
2112
2112
|
image_url?: string | null;
|
|
2113
2113
|
media?: string[];
|
|
2114
|
+
/** Units for sale. */
|
|
2115
|
+
stock_quantity?: number;
|
|
2116
|
+
/** Present on `GET /listings/:id`. */
|
|
2117
|
+
package_size?: PackageSize;
|
|
2118
|
+
package_source?: PackageSource;
|
|
2119
|
+
}
|
|
2120
|
+
/** One piece in a shop's inventory, as its team sees it. */
|
|
2121
|
+
interface InventoryItem {
|
|
2122
|
+
id: string;
|
|
2123
|
+
title: string;
|
|
2124
|
+
price: number;
|
|
2125
|
+
condition: Condition;
|
|
2126
|
+
size: string | null;
|
|
2127
|
+
stock_quantity: number;
|
|
2128
|
+
status: ListingStatus;
|
|
2129
|
+
category_id: string;
|
|
2130
|
+
city_id: string;
|
|
2131
|
+
created_at: string;
|
|
2132
|
+
updated_at: string;
|
|
2133
|
+
package_size: PackageSize;
|
|
2134
|
+
package_source: PackageSource;
|
|
2135
|
+
/** The first photo, or null for a piece without one. */
|
|
2136
|
+
image_url: string | null;
|
|
2137
|
+
media: string[];
|
|
2138
|
+
photo_count: number;
|
|
2139
|
+
}
|
|
2140
|
+
interface InventoryParams {
|
|
2141
|
+
/** One status, or `all` (the default): every status except `removed`. */
|
|
2142
|
+
status?: ListingStatus | 'all';
|
|
2143
|
+
/** Matches part of the title. */
|
|
2144
|
+
q?: string;
|
|
2145
|
+
page?: number;
|
|
2146
|
+
}
|
|
2147
|
+
interface InventoryPage {
|
|
2148
|
+
data: InventoryItem[];
|
|
2149
|
+
/** How many pieces the shop has in each status, whatever the filter. */
|
|
2150
|
+
counts: Record<ListingStatus, number>;
|
|
2151
|
+
page: number;
|
|
2152
|
+
page_size: number;
|
|
2153
|
+
has_more: boolean;
|
|
2114
2154
|
}
|
|
2115
2155
|
interface ListingsFeedParams {
|
|
2116
2156
|
city_id?: string;
|
|
@@ -2122,18 +2162,56 @@ interface ListingsFeedParams {
|
|
|
2122
2162
|
page?: number;
|
|
2123
2163
|
page_size?: number;
|
|
2124
2164
|
}
|
|
2125
|
-
|
|
2165
|
+
/** How big a piece is once packed. Sets the delivery price band. */
|
|
2166
|
+
declare const PACKAGE_SIZES: readonly ["small", "medium", "large", "oversize"];
|
|
2167
|
+
type PackageSize = typeof PACKAGE_SIZES[number];
|
|
2168
|
+
interface ListingInputFields {
|
|
2126
2169
|
store_id: string;
|
|
2127
|
-
title: string;
|
|
2128
2170
|
description?: string;
|
|
2129
2171
|
category_id: string;
|
|
2130
2172
|
city_id: string;
|
|
2131
|
-
price: number;
|
|
2132
2173
|
condition: Condition;
|
|
2133
2174
|
size?: string;
|
|
2175
|
+
/** Units for sale, 1 to 999. Default 1. */
|
|
2176
|
+
stock_quantity?: number;
|
|
2177
|
+
vazi_eligible?: boolean;
|
|
2178
|
+
/** Default: the category's usual size. */
|
|
2179
|
+
package_size?: PackageSize;
|
|
2180
|
+
}
|
|
2181
|
+
/** A piece listed live at once: a title of 3 to 120 characters and a price of at least KES 50. */
|
|
2182
|
+
interface PublishedListingInput extends ListingInputFields {
|
|
2183
|
+
status?: 'active';
|
|
2184
|
+
title: string;
|
|
2185
|
+
price: number;
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* A draft, visible only to the shop's team until it is published. It may have a title of 1
|
|
2189
|
+
* character and no price yet; category, city and condition are still required.
|
|
2190
|
+
*/
|
|
2191
|
+
interface DraftListingInput extends ListingInputFields {
|
|
2192
|
+
status: 'draft';
|
|
2193
|
+
title: string;
|
|
2194
|
+
price?: number;
|
|
2195
|
+
}
|
|
2196
|
+
type CreateListingInput = PublishedListingInput | DraftListingInput;
|
|
2197
|
+
/**
|
|
2198
|
+
* Fields to change. A draft may hold a short title or a price of 0; a live piece keeps a title of
|
|
2199
|
+
* at least 3 characters and a price of at least KES 50.
|
|
2200
|
+
*/
|
|
2201
|
+
interface UpdateListingInput {
|
|
2202
|
+
title?: string;
|
|
2203
|
+
description?: string;
|
|
2204
|
+
category_id?: string;
|
|
2205
|
+
city_id?: string;
|
|
2206
|
+
price?: number;
|
|
2207
|
+
condition?: Condition;
|
|
2208
|
+
size?: string;
|
|
2209
|
+
stock_quantity?: number;
|
|
2134
2210
|
vazi_eligible?: boolean;
|
|
2211
|
+
package_size?: PackageSize;
|
|
2135
2212
|
}
|
|
2136
|
-
|
|
2213
|
+
/** Where a piece's package size came from: the seller, or its category's default. */
|
|
2214
|
+
type PackageSource = 'seller' | 'category_default';
|
|
2137
2215
|
/** Which part of the catalogue a category belongs to. */
|
|
2138
2216
|
type CategorySection = 'fashion' | 'home';
|
|
2139
2217
|
interface Category {
|
|
@@ -3387,6 +3465,37 @@ interface AdminShopLimitRequestsPage {
|
|
|
3387
3465
|
page: number;
|
|
3388
3466
|
has_more: boolean;
|
|
3389
3467
|
}
|
|
3468
|
+
/** An active member of a shop, as operators see it. */
|
|
3469
|
+
interface AdminShopMember {
|
|
3470
|
+
id: string;
|
|
3471
|
+
user_id: string;
|
|
3472
|
+
role: StoreRole;
|
|
3473
|
+
joined_at: string;
|
|
3474
|
+
name: string;
|
|
3475
|
+
email: string | null;
|
|
3476
|
+
}
|
|
3477
|
+
/** One entry of a shop's audit log, as operators see it, with the detail recorded for the change. */
|
|
3478
|
+
interface AdminShopAuditEntry {
|
|
3479
|
+
id: string;
|
|
3480
|
+
actor_id: string;
|
|
3481
|
+
actor_name: string;
|
|
3482
|
+
action: string;
|
|
3483
|
+
target_type: string | null;
|
|
3484
|
+
target_id: string | null;
|
|
3485
|
+
summary: string;
|
|
3486
|
+
/** What changed, as recorded (for example `{ before, after }`), or null. */
|
|
3487
|
+
detail: unknown;
|
|
3488
|
+
created_at: string;
|
|
3489
|
+
}
|
|
3490
|
+
/** A shop's active members and one page of its audit log (50 entries, newest first). */
|
|
3491
|
+
interface AdminShopTeam {
|
|
3492
|
+
members: AdminShopMember[];
|
|
3493
|
+
audit: {
|
|
3494
|
+
data: AdminShopAuditEntry[];
|
|
3495
|
+
page: number;
|
|
3496
|
+
has_more: boolean;
|
|
3497
|
+
};
|
|
3498
|
+
}
|
|
3390
3499
|
type DecideShopLimitInput = {
|
|
3391
3500
|
decision: 'approve';
|
|
3392
3501
|
approved_limit: number;
|
|
@@ -4518,15 +4627,25 @@ declare class ListingsModule {
|
|
|
4518
4627
|
images: ListingImage[];
|
|
4519
4628
|
}>;
|
|
4520
4629
|
/**
|
|
4521
|
-
*
|
|
4630
|
+
* List a piece in a shop, live or as a draft (`status: 'draft'`). Needs `store:listings.manage`
|
|
4631
|
+
* in that shop. A draft is seen only by the shop's team until it is published.
|
|
4632
|
+
*
|
|
4633
|
+
* Errors: 400 invalid_input; 403 store_forbidden, not_a_retail_shop; 404 store_not_found.
|
|
4522
4634
|
*/
|
|
4523
4635
|
create(input: CreateListingInput, options?: RequestOptions): Promise<Listing>;
|
|
4524
4636
|
/**
|
|
4525
|
-
*
|
|
4637
|
+
* Change a piece's details, stock or package size. Sold and removed pieces
|
|
4638
|
+
* cannot be edited.
|
|
4639
|
+
*
|
|
4640
|
+
* Errors: 400 invalid_input, listing_immutable; 403 store_forbidden; 404 not_found.
|
|
4526
4641
|
*/
|
|
4527
4642
|
update(id: string, input: UpdateListingInput, options?: RequestOptions): Promise<Listing>;
|
|
4528
4643
|
/**
|
|
4529
|
-
* Change
|
|
4644
|
+
* Change a piece's status. Publishing a draft (`'active'`) needs a title of 3+ letters, a price
|
|
4645
|
+
* of at least KES 50 and at least one photo; otherwise 422 `not_ready` whose message names what
|
|
4646
|
+
* is missing (see `notReadyToPublish`).
|
|
4647
|
+
*
|
|
4648
|
+
* Errors: 400 invalid_transition; 403 store_forbidden; 404 not_found; 422 not_ready.
|
|
4530
4649
|
*/
|
|
4531
4650
|
updateStatus(id: string, status: ListingStatus, options?: RequestOptions): Promise<{
|
|
4532
4651
|
ok: boolean;
|
|
@@ -4625,6 +4744,8 @@ declare class ListingsModule {
|
|
|
4625
4744
|
data: SimilarListing[];
|
|
4626
4745
|
}>;
|
|
4627
4746
|
}
|
|
4747
|
+
/** Whether an error says a draft is not ready to publish. Its message names what is missing. */
|
|
4748
|
+
declare function notReadyToPublish(error: unknown): boolean;
|
|
4628
4749
|
|
|
4629
4750
|
declare class SearchModule {
|
|
4630
4751
|
private readonly client;
|
|
@@ -5045,6 +5166,14 @@ declare class StoresModule {
|
|
|
5045
5166
|
*/
|
|
5046
5167
|
removePayoutDestination(storeId: string, destinationId: string, options?: RequestOptions): Promise<PayoutDestinationsState>;
|
|
5047
5168
|
private destinationPath;
|
|
5169
|
+
/**
|
|
5170
|
+
* The shop's whole stock for its team: drafts, live, sold and (by filter) removed pieces, most
|
|
5171
|
+
* recently changed first, 24 per page, with counts per status. `store:listings.read`. The public
|
|
5172
|
+
* store page (`getListings`) shows live pieces only.
|
|
5173
|
+
*
|
|
5174
|
+
* Errors: 400 invalid_input; 403 store_forbidden; 404 not_found.
|
|
5175
|
+
*/
|
|
5176
|
+
getInventory(storeId: string, params?: InventoryParams, options?: RequestOptions): Promise<InventoryPage>;
|
|
5048
5177
|
/**
|
|
5049
5178
|
* The shop's members, and the roles the caller may give. `store:members.manage`.
|
|
5050
5179
|
*
|
|
@@ -5609,6 +5738,15 @@ declare class AdminModule {
|
|
|
5609
5738
|
status?: StoreLimitRequestStatus;
|
|
5610
5739
|
page?: number;
|
|
5611
5740
|
}, options?: RequestOptions): Promise<AdminShopLimitRequestsPage>;
|
|
5741
|
+
/**
|
|
5742
|
+
* A shop's active members and one page of its audit log, 50 entries newest first, closed shops
|
|
5743
|
+
* included. `admin:read`.
|
|
5744
|
+
*
|
|
5745
|
+
* Errors: 403 forbidden; 404 not_found.
|
|
5746
|
+
*/
|
|
5747
|
+
getShopTeam(storeId: string, params?: {
|
|
5748
|
+
page?: number;
|
|
5749
|
+
}, options?: RequestOptions): Promise<AdminShopTeam>;
|
|
5612
5750
|
/**
|
|
5613
5751
|
* Approve a request with a new limit (above the current one, at most 50), or reject it with a note
|
|
5614
5752
|
* of at least 10 characters. The owner is told. `sellers:verify`.
|
|
@@ -6335,4 +6473,4 @@ declare class MitumbaClient {
|
|
|
6335
6473
|
isAuthenticated(): Promise<boolean>;
|
|
6336
6474
|
}
|
|
6337
6475
|
|
|
6338
|
-
export { APIClient, APIError, type APIErrorResponse, type AcceptStoreInvitationResult, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type AddPayoutDestinationInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, type AdminMessageReport, type AdminMessageReportDetail, type AdminMessageReportList, type AdminMessageReportThreadMessage, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminRefundItem, type AdminRefundReason, type AdminRefundSendResult, type AdminRefundStatus, type AdminReport, type AdminRolePreset, type AdminShopLimitRequest, type AdminShopLimitRequestsPage, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CancelCheckoutRefusalCode, type CancelCheckoutResponse, type CancelOrderInput, type CancelOrderResult, type CartItem, type CartLineAvailability, CartModule, type CartPartition, type CategoriesBySection, type Category, type CategorySection, type ChangePasswordInput, type ChangePlatformSettingInput, type ChangePlatformSettingResult, type Checkout, type CheckoutMoney, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutRefusal, type CheckoutRefusalCode, type CheckoutShopOrder, type CheckoutState, type CheckoutStatus, type CheckoutStatusResponse, CheckoutsModule, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateCheckoutInput, type CreateCheckoutResponse, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CreatedBaleOrder, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DOCUMENT_PURPOSES, type DecideShopLimitInput, type DecideShopLimitResult, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type DocumentPurpose, DocumentsModule, type EarningsBalance, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, type GetCheckoutResponse, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamSession, type IamSessionsResult, type IamSignIn, type IamSignInFailureReason, type IamSignInsResult, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type InvitableStoreRole, type InviteToStoreInput, type InviteToStoreResult, type Jwk, type Jwks, type KnownPaymentProvider, type KnownShopStep, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LiveUnread, type LiveUnreadOptions, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, type MarketingConsentChange, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportOutcome, type MessageReportReason, type MessageReportStatus, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, type MessagingSide, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type MutableFlashKind, type Notification, type NotificationAction, type NotificationCategory, type NotificationChannel, type NotificationFlash, type NotificationLink, type NotificationPref, type NotificationPreferenceCategory, type NotificationPreferences, type NotificationStream, type NotificationStreamFrame, type NotificationStreamItem, type NotificationStreamOptions, type NotificationStreamState, type NotificationStreamTicket, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryEntry, type OrderHistoryParams, type OrderItem, type OrderItemSummary, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PayoutBankOption, type PayoutDestination, type PayoutDestinationLabel, type PayoutDestinationRejection, type PayoutDestinations, type PayoutDestinationsState, type PayoutMethodOption, type PayoutMethodType, type PayoutState, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PlatformSetting, type PlatformSettingChange, type PlatformSettingDetail, type PlatformSettingGroup, type PlatformSettingKind, type PreferenceCellChange, type PreferenceSettingsChange, type PresignImageResponse, type PrivateDocument, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type QuietHours, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type ReceivedStoreInvitation, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type RequestStoreLimitInput, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, SELLER_VERIFICATION_STATUSES, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SellerVerification, type SellerVerificationStatus, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendTestNotificationResult, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type SettlementLine, type ShareUrlOptions, type ShopCancelReason, type ShopEarnings, type ShopHolder, type ShopNextStep, type ShopOrderFields, type ShopPayout, type ShopPayoutEntriesPage, type ShopPayoutEntriesParams, type ShopPayoutEntry, type ShopSettlement, type ShopStep, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreAuditEntry, type StoreAuditPage, type StoreInvitation, type StoreInvitationListItem, type StoreLimitRequest, type StoreLimitRequestStatus, type StoreLimitState, type StoreMember, type StoreMembers, type StoreMembershipFields, type StorePermission, type StoreResolveThreadInput, type StoreReviewsPage, type StoreRole, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, type UploadDocumentInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, cartLineAvailability, categoriesBySection, categorySection, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConditionAllowed, isConsentRequired, isDocumentId, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, partitionCart, regionById, stepUpRequired, storeShareUrl };
|
|
6476
|
+
export { APIClient, APIError, type APIErrorResponse, type AcceptStoreInvitationResult, type ActivateIamUserInput, type ActivateIamUserResult, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddIamPasskeyResult, type AddIamTotpResult, type AddIamTwoFactorMethodInput, type AddPaymentMethodInput, type AddPayoutDestinationInput, type Address, type AdminAuditActor, type AdminAuditEntry, type AdminAuditQuery, type AdminAuthStrength, type AdminListingItem, type AdminMessageReport, type AdminMessageReportDetail, type AdminMessageReportList, type AdminMessageReportThreadMessage, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, type AdminRefundItem, type AdminRefundReason, type AdminRefundSendResult, type AdminRefundStatus, type AdminReport, type AdminRolePreset, type AdminShopAuditEntry, type AdminShopLimitRequest, type AdminShopLimitRequestsPage, type AdminShopMember, type AdminShopTeam, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, type AdminWholesalePendingStore, type ApiResponse, type AttachmentDownloadAuthorization, type AttachmentUploadAuthorization, type AttachmentUploadBody, type AttachmentUploadState, type AttachmentUploadStatus, type AuthCapabilities, AuthModule, type AuthTokens, type AuthenticationResponseJSON, BALE_ORDER_STATUSES, type Bale, type BaleDetail, type BaleFeedItem, type BaleFulfillment, type BaleGrade, type BaleImageUploadResult, type BaleOrder, type BaleOrderEvent, type BaleOrderStatus, type BaleType, type BecomeBaleSellerInput, type BecomeSellerInput, type BlockedIp, type Business, type BusinessType, BusinessesModule, type BuyerResolveThreadInput, type BuyerSummary, CONDITIONS, type CancelCheckoutRefusalCode, type CancelCheckoutResponse, type CancelOrderInput, type CancelOrderResult, type CartItem, type CartLineAvailability, CartModule, type CartPartition, type CategoriesBySection, type Category, type CategorySection, type ChangePasswordInput, type ChangePlatformSettingInput, type ChangePlatformSettingResult, type Checkout, type CheckoutMoney, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutRefusal, type CheckoutRefusalCode, type CheckoutShopOrder, type CheckoutState, type CheckoutStatus, type CheckoutStatusResponse, CheckoutsModule, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateCheckoutInput, type CreateCheckoutResponse, type CreateIamUserInput, type CreateIamUserResult, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateOrganizationInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, type CreatedBaleOrder, type CursorPage, DEFAULT_SHARE_ORIGIN, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, DOCUMENT_PURPOSES, type DecideShopLimitInput, type DecideShopLimitResult, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type DocumentPurpose, DocumentsModule, type DraftListingInput, type EarningsBalance, type EmailLoginInput, type EmailRegisterInput, type FileResponse, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, type GetCheckoutResponse, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamSession, type IamSessionsResult, type IamSignIn, type IamSignInFailureReason, type IamSignInsResult, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type InventoryItem, type InventoryPage, type InventoryParams, type InvitableStoreRole, type InviteToStoreInput, type InviteToStoreResult, type Jwk, type Jwks, type KnownPaymentProvider, type KnownShopStep, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LibraryCadence, type LibraryCompleter, type LibraryDocument, type LibraryDocumentSummary, type LibraryKind, type LibraryListing, type LibraryOccurrence, type LibraryOccurrenceRecorded, type LibraryOccurrenceStatus, type LibraryRoutineState, type LibrarySchedule, type LibraryScheduleRule, type LibrarySeason, type LibraryWeekday, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LiveUnread, type LiveUnreadOptions, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketRegion, type MarketRegionsResponse, type MarketStatus, type MarketingConsentChange, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportOutcome, type MessageReportReason, type MessageReportStatus, type MessageResponse, MessagesModule, type MessagesRealtimeConnection, type MessagesRealtimeEnvelope, type MessagesRealtimeEvent, type MessagesRealtimeOptions, type MessagesRealtimeState, type MessagesRealtimeTicket, type MessagingBlockInput, type MessagingBlockRemovedResult, type MessagingBlockResult, type MessagingCapabilities, type MessagingCursor, type MessagingErrorCode, type MessagingIdempotentRequestOptions, type MessagingInboxes, type MessagingPerspective, type MessagingSide, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type MutableFlashKind, type Notification, type NotificationAction, type NotificationCategory, type NotificationChannel, type NotificationFlash, type NotificationLink, type NotificationPref, type NotificationPreferenceCategory, type NotificationPreferences, type NotificationStream, type NotificationStreamFrame, type NotificationStreamItem, type NotificationStreamOptions, type NotificationStreamState, type NotificationStreamTicket, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthClient, type OAuthClientSummary, type OAuthClientTrustLevel, type OAuthClientType, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OidcSigningKey, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderDocument, type OrderDocumentKind, type OrderEvent, type OrderHistoryEntry, type OrderHistoryParams, type OrderItem, type OrderItemSummary, type OrderStatus, OrdersModule, type Organization, type OrganizationKind, type OrganizationStatus, type OrganizationSummary, PACKAGE_SIZES, PAYMENT_STATUSES, type PackageSize, type PackageSource, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PayoutBankOption, type PayoutDestination, type PayoutDestinationLabel, type PayoutDestinationRejection, type PayoutDestinations, type PayoutDestinationsState, type PayoutMethodOption, type PayoutMethodType, type PayoutState, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PlatformSetting, type PlatformSettingChange, type PlatformSettingDetail, type PlatformSettingGroup, type PlatformSettingKind, type PreferenceCellChange, type PreferenceSettingsChange, type PresignImageResponse, type PrivateDocument, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type PublishedListingInput, type QuietHours, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type ReceivedStoreInvitation, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type RequestStoreLimitInput, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, SELLER_VERIFICATION_STATUSES, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SellerVerification, type SellerVerificationStatus, type SendEmailInput, type SendMessageInput, type SendOtpInput, type SendTestNotificationResult, type SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type SettlementLine, type ShareUrlOptions, type ShopCancelReason, type ShopEarnings, type ShopHolder, type ShopNextStep, type ShopOrderFields, type ShopPayout, type ShopPayoutEntriesPage, type ShopPayoutEntriesParams, type ShopPayoutEntry, type ShopSettlement, type ShopStep, type SilentAuthorizeResult, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreAuditEntry, type StoreAuditPage, type StoreInvitation, type StoreInvitationListItem, type StoreLimitRequest, type StoreLimitRequestStatus, type StoreLimitState, type StoreMember, type StoreMembers, type StoreMembershipFields, type StorePermission, type StoreResolveThreadInput, type StoreReviewsPage, type StoreRole, type StoreSettings, type StoreStats, type StoreSummary, StoresModule, type SubscriptionTier, type SystemStats, TWO_FACTOR_METHOD_TYPES, type ThreadCard, type ThreadId, type ThreadMessage, type ThreadSubject, type ThreadSystemEvent, type ThreadTimelineItem, type ThreadTimelineItemId, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateConversationPreferencesInput, type UpdateListingInput, type UpdateOrganizationInput, type UpdateProfileInput, type UpdateStoreInput, type UpdateThreadPreferencesInput, type UploadDocumentInput, UploadsModule, type UserInfo, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyIamMethodResult, type VerifyIamTwoFactorInput, type VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleReviewStatus, type WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, cartLineAvailability, categoriesBySection, categorySection, checkoutRefusal, createTokenStore, findMarket, findRegion, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isCartLineBuyable, isConditionAllowed, isConsentRequired, isDocumentId, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, notReadyToPublish, partitionCart, regionById, stepUpRequired, storeShareUrl };
|
package/dist/index.js
CHANGED
|
@@ -958,19 +958,29 @@ var ListingsModule = class {
|
|
|
958
958
|
return this.client.get(`/listings/${id}`, void 0, options);
|
|
959
959
|
}
|
|
960
960
|
/**
|
|
961
|
-
*
|
|
961
|
+
* List a piece in a shop, live or as a draft (`status: 'draft'`). Needs `store:listings.manage`
|
|
962
|
+
* in that shop. A draft is seen only by the shop's team until it is published.
|
|
963
|
+
*
|
|
964
|
+
* Errors: 400 invalid_input; 403 store_forbidden, not_a_retail_shop; 404 store_not_found.
|
|
962
965
|
*/
|
|
963
966
|
async create(input, options) {
|
|
964
967
|
return this.client.post("/listings", input, options);
|
|
965
968
|
}
|
|
966
969
|
/**
|
|
967
|
-
*
|
|
970
|
+
* Change a piece's details, stock or package size. Sold and removed pieces
|
|
971
|
+
* cannot be edited.
|
|
972
|
+
*
|
|
973
|
+
* Errors: 400 invalid_input, listing_immutable; 403 store_forbidden; 404 not_found.
|
|
968
974
|
*/
|
|
969
975
|
async update(id, input, options) {
|
|
970
976
|
return this.client.put(`/listings/${id}`, input, options);
|
|
971
977
|
}
|
|
972
978
|
/**
|
|
973
|
-
* Change
|
|
979
|
+
* Change a piece's status. Publishing a draft (`'active'`) needs a title of 3+ letters, a price
|
|
980
|
+
* of at least KES 50 and at least one photo; otherwise 422 `not_ready` whose message names what
|
|
981
|
+
* is missing (see `notReadyToPublish`).
|
|
982
|
+
*
|
|
983
|
+
* Errors: 400 invalid_transition; 403 store_forbidden; 404 not_found; 422 not_ready.
|
|
974
984
|
*/
|
|
975
985
|
async updateStatus(id, status, options) {
|
|
976
986
|
return this.client.patch(`/listings/${id}/status`, { status }, options);
|
|
@@ -1079,6 +1089,9 @@ var ListingsModule = class {
|
|
|
1079
1089
|
);
|
|
1080
1090
|
}
|
|
1081
1091
|
};
|
|
1092
|
+
function notReadyToPublish(error) {
|
|
1093
|
+
return error instanceof APIError && error.code === "not_ready";
|
|
1094
|
+
}
|
|
1082
1095
|
|
|
1083
1096
|
// src/modules/search.ts
|
|
1084
1097
|
var SearchModule = class {
|
|
@@ -2512,6 +2525,16 @@ var StoresModule = class {
|
|
|
2512
2525
|
destinationPath(storeId, destinationId, suffix) {
|
|
2513
2526
|
return `/listings/stores/${encodeURIComponent(storeId)}/payout-destinations/${encodeURIComponent(destinationId)}${suffix}`;
|
|
2514
2527
|
}
|
|
2528
|
+
/**
|
|
2529
|
+
* The shop's whole stock for its team: drafts, live, sold and (by filter) removed pieces, most
|
|
2530
|
+
* recently changed first, 24 per page, with counts per status. `store:listings.read`. The public
|
|
2531
|
+
* store page (`getListings`) shows live pieces only.
|
|
2532
|
+
*
|
|
2533
|
+
* Errors: 400 invalid_input; 403 store_forbidden; 404 not_found.
|
|
2534
|
+
*/
|
|
2535
|
+
async getInventory(storeId, params, options) {
|
|
2536
|
+
return this.client.get(`/listings/stores/${encodeURIComponent(storeId)}/inventory`, params, options);
|
|
2537
|
+
}
|
|
2515
2538
|
// ── Team ──────────────────────────────────────────────────────────────────
|
|
2516
2539
|
/**
|
|
2517
2540
|
* The shop's members, and the roles the caller may give. `store:members.manage`.
|
|
@@ -3086,6 +3109,15 @@ var AdminModule = class {
|
|
|
3086
3109
|
async listShopLimitRequests(params, options) {
|
|
3087
3110
|
return this.client.get("/admin/shop-limit-requests", params, options);
|
|
3088
3111
|
}
|
|
3112
|
+
/**
|
|
3113
|
+
* A shop's active members and one page of its audit log, 50 entries newest first, closed shops
|
|
3114
|
+
* included. `admin:read`.
|
|
3115
|
+
*
|
|
3116
|
+
* Errors: 403 forbidden; 404 not_found.
|
|
3117
|
+
*/
|
|
3118
|
+
async getShopTeam(storeId, params, options) {
|
|
3119
|
+
return this.client.get(`/admin/stores/${encodeURIComponent(storeId)}/team`, params, options);
|
|
3120
|
+
}
|
|
3089
3121
|
/**
|
|
3090
3122
|
* Approve a request with a new limit (above the current one, at most 50), or reject it with a note
|
|
3091
3123
|
* of at least 10 characters. The owner is told. `sellers:verify`.
|
|
@@ -3754,6 +3786,7 @@ var TWO_FACTOR_METHOD_TYPES = ["totp", "sms", "email", "passkey"];
|
|
|
3754
3786
|
// src/types/listings.ts
|
|
3755
3787
|
var CONDITIONS = ["new", "like_new", "good", "fair"];
|
|
3756
3788
|
var LISTING_STATUSES = ["draft", "active", "sold", "removed"];
|
|
3789
|
+
var PACKAGE_SIZES = ["small", "medium", "large", "oversize"];
|
|
3757
3790
|
|
|
3758
3791
|
// src/types/orders.ts
|
|
3759
3792
|
var ORDER_STATUSES = [
|
|
@@ -4091,6 +4124,7 @@ exports.NotificationsModule = NotificationsModule;
|
|
|
4091
4124
|
exports.OAuthModule = OAuthModule;
|
|
4092
4125
|
exports.ORDER_STATUSES = ORDER_STATUSES;
|
|
4093
4126
|
exports.OrdersModule = OrdersModule;
|
|
4127
|
+
exports.PACKAGE_SIZES = PACKAGE_SIZES;
|
|
4094
4128
|
exports.PAYMENT_STATUSES = PAYMENT_STATUSES;
|
|
4095
4129
|
exports.PayModule = PayModule;
|
|
4096
4130
|
exports.RealtimeProtocolError = RealtimeProtocolError;
|
|
@@ -4129,6 +4163,7 @@ exports.isValidPhone = isValidPhone;
|
|
|
4129
4163
|
exports.listingShareUrl = listingShareUrl;
|
|
4130
4164
|
exports.maskPhone = maskPhone;
|
|
4131
4165
|
exports.normalizePhone = normalizePhone;
|
|
4166
|
+
exports.notReadyToPublish = notReadyToPublish;
|
|
4132
4167
|
exports.partitionCart = partitionCart;
|
|
4133
4168
|
exports.regionById = regionById;
|
|
4134
4169
|
exports.stepUpRequired = stepUpRequired;
|