@mitumba/sdk 1.15.0 → 1.17.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.ts CHANGED
@@ -145,6 +145,7 @@ interface Listing {
145
145
  seller_type: 'individual' | 'bale';
146
146
  images?: ListingImage[];
147
147
  image_url?: string | null;
148
+ media?: string[];
148
149
  }
149
150
  interface ListingsFeedParams {
150
151
  city_id?: string;
@@ -545,6 +546,7 @@ interface WishlistListing {
545
546
  condition: string;
546
547
  size: string | null;
547
548
  image_url: string | null;
549
+ media?: string[];
548
550
  }
549
551
 
550
552
  interface CartItem {
@@ -667,6 +669,167 @@ interface SystemStats {
667
669
  total_revenue: number;
668
670
  active_today: number;
669
671
  }
672
+ interface AdminUserListItem {
673
+ id: string;
674
+ display_name: string | null;
675
+ email: string | null;
676
+ phone: string | null;
677
+ is_active: boolean;
678
+ roles: string[];
679
+ created_at: string;
680
+ }
681
+ interface AdminUserDetail {
682
+ id: string;
683
+ email: string | null;
684
+ phone: string | null;
685
+ display_name: string | null;
686
+ county: string | null;
687
+ city_id: string | null;
688
+ is_active: boolean;
689
+ suspended_at: string | null;
690
+ suspension_reason: string | null;
691
+ onboarding_completed: number;
692
+ email_verified: number;
693
+ created_at: string;
694
+ roles: string[];
695
+ order_count: number;
696
+ seller: {
697
+ sti_score: number;
698
+ seller_type: string;
699
+ verification_status: string;
700
+ } | null;
701
+ }
702
+ interface AdminStoreListItem {
703
+ id: string;
704
+ name: string;
705
+ slug: string;
706
+ seller_id: string;
707
+ is_verified: boolean;
708
+ subscription_tier: 'free' | 'pro';
709
+ sti_score: number | null;
710
+ created_at: string;
711
+ }
712
+ interface AdminStoreDetail {
713
+ id: string;
714
+ seller_id: string;
715
+ name: string;
716
+ slug: string;
717
+ tagline: string | null;
718
+ description: string | null;
719
+ category: string | null;
720
+ logo_url: string | null;
721
+ banner_url: string | null;
722
+ city_id: string | null;
723
+ subscription_tier: 'free' | 'pro';
724
+ is_verified: boolean;
725
+ created_at: string;
726
+ updated_at: string;
727
+ owner_name: string | null;
728
+ owner_email: string | null;
729
+ sti_score: number | null;
730
+ seller_type: string | null;
731
+ verification_status: string | null;
732
+ listing_count: number;
733
+ order_count: number;
734
+ }
735
+ interface AdminVerificationItem {
736
+ user_id: string;
737
+ seller_type: string;
738
+ verification_status: 'unverified' | 'pending' | 'verified' | 'rejected';
739
+ updated_at: string;
740
+ display_name: string | null;
741
+ email: string | null;
742
+ phone: string | null;
743
+ id_document_url: string | null;
744
+ kra_pin: string | null;
745
+ }
746
+ interface StiEvent {
747
+ trigger_type: string;
748
+ trigger_order_id: string | null;
749
+ score_before: number;
750
+ score_after: number;
751
+ delta: number;
752
+ reason: string;
753
+ created_at: string;
754
+ }
755
+ interface AdminListingItem {
756
+ id: string;
757
+ title: string;
758
+ price: number;
759
+ status: 'draft' | 'active' | 'sold' | 'removed';
760
+ photo_verified: boolean;
761
+ seller_id: string;
762
+ store_id: string | null;
763
+ created_at: string;
764
+ image_url: string | null;
765
+ }
766
+ interface AdminOrderListItem {
767
+ id: string;
768
+ buyer_id: string;
769
+ seller_id: string;
770
+ store_id: string | null;
771
+ total: number;
772
+ status: string;
773
+ created_at: string;
774
+ listing_title: string | null;
775
+ }
776
+ interface AdminOrderDetail {
777
+ id: string;
778
+ buyer_id: string;
779
+ seller_id: string;
780
+ store_id: string | null;
781
+ listing_id: string;
782
+ amount: number;
783
+ delivery_fee: number;
784
+ total: number;
785
+ status: string;
786
+ city_id: string;
787
+ created_at: string;
788
+ updated_at: string;
789
+ events: unknown[];
790
+ payment: unknown | null;
791
+ payout: unknown | null;
792
+ dispute: unknown | null;
793
+ }
794
+ interface AdminPayoutItem {
795
+ id: string;
796
+ order_id: string;
797
+ seller_id: string;
798
+ amount: number;
799
+ provider: string;
800
+ status: 'pending' | 'sent' | 'failed';
801
+ on_hold: boolean;
802
+ created_at: string;
803
+ }
804
+ interface AdminReport {
805
+ id: string;
806
+ reporter_id: string;
807
+ target_type: 'listing' | 'review' | 'store' | 'user';
808
+ target_id: string;
809
+ reason: string;
810
+ detail: string | null;
811
+ status: 'open' | 'reviewed' | 'dismissed' | 'actioned';
812
+ created_at: string;
813
+ }
814
+ interface AdminVaziOutfit {
815
+ id: string;
816
+ name: string;
817
+ seed_listing_id: string;
818
+ render_status: string;
819
+ removed: boolean;
820
+ item_count: number;
821
+ total_price: number;
822
+ engagement_impressions: number;
823
+ engagement_clicks: number;
824
+ engagement_purchases: number;
825
+ assembled_at: string;
826
+ }
827
+ interface CreateReportInput {
828
+ target_type: 'listing' | 'review' | 'store' | 'user';
829
+ target_id: string;
830
+ reason: 'counterfeit' | 'offensive' | 'spam' | 'scam' | 'other';
831
+ detail?: string;
832
+ }
670
833
 
671
834
  declare const DISPUTE_REASONS: readonly ["not_received", "not_as_described", "damaged", "counterfeit", "wrong_item"];
672
835
  type DisputeReason = typeof DISPUTE_REASONS[number];
@@ -1446,39 +1609,202 @@ declare class BusinessesModule {
1446
1609
  declare class AdminModule {
1447
1610
  private readonly client;
1448
1611
  constructor(client: APIClient);
1449
- /** Block an IP address. Default duration: 24 hours. */
1450
1612
  blockIp(ip: string, durationHours?: number, options?: RequestOptions): Promise<{
1451
1613
  ok: true;
1452
1614
  blocked: string;
1453
1615
  hours: number;
1454
1616
  }>;
1455
- /** Unblock an IP address. */
1456
1617
  unblockIp(ip: string, options?: RequestOptions): Promise<{
1457
1618
  ok: true;
1458
1619
  unblocked: string;
1459
1620
  }>;
1460
- /** List currently blocked IPs. */
1461
1621
  getBlockedIps(options?: RequestOptions): Promise<{
1462
1622
  data: BlockedIp[];
1463
1623
  }>;
1464
- /** Get platform-wide statistics. */
1465
1624
  getSystemStats(options?: RequestOptions): Promise<SystemStats>;
1466
- /** Suspend a user account. */
1625
+ getStatsTimeseries(params?: {
1626
+ metric?: 'orders' | 'gmv' | 'users';
1627
+ days?: number;
1628
+ }, options?: RequestOptions): Promise<{
1629
+ metric: string;
1630
+ days: number;
1631
+ data: {
1632
+ day: string;
1633
+ value: number;
1634
+ }[];
1635
+ }>;
1636
+ getStatsByCity(options?: RequestOptions): Promise<{
1637
+ data: {
1638
+ city: string;
1639
+ orders: number;
1640
+ gmv: number;
1641
+ }[];
1642
+ }>;
1643
+ listUsers(params?: {
1644
+ q?: string;
1645
+ page?: number;
1646
+ }, options?: RequestOptions): Promise<{
1647
+ data: AdminUserListItem[];
1648
+ page: number;
1649
+ page_size: number;
1650
+ }>;
1651
+ getUser(userId: string, options?: RequestOptions): Promise<AdminUserDetail>;
1467
1652
  suspendUser(userId: string, reason: string, options?: RequestOptions): Promise<{
1468
1653
  ok: true;
1469
1654
  }>;
1470
- /** Unsuspend a user account. */
1471
1655
  unsuspendUser(userId: string, options?: RequestOptions): Promise<{
1472
1656
  ok: true;
1473
1657
  }>;
1474
- /** Grant verified badge to a store. */
1658
+ setUserRole(userId: string, role: string, action: 'grant' | 'revoke', options?: RequestOptions): Promise<{
1659
+ ok: true;
1660
+ roles: string[];
1661
+ }>;
1662
+ revokeUserSessions(userId: string, options?: RequestOptions): Promise<{
1663
+ ok: true;
1664
+ }>;
1665
+ listStores(params?: {
1666
+ q?: string;
1667
+ verified?: 0 | 1;
1668
+ tier?: 'free' | 'pro';
1669
+ page?: number;
1670
+ }, options?: RequestOptions): Promise<{
1671
+ data: AdminStoreListItem[];
1672
+ page: number;
1673
+ page_size: number;
1674
+ }>;
1675
+ getStore(storeId: string, options?: RequestOptions): Promise<AdminStoreDetail>;
1475
1676
  verifyStore(storeId: string, options?: RequestOptions): Promise<{
1476
1677
  ok: true;
1477
1678
  }>;
1478
- /** Revoke verified badge from a store. */
1479
1679
  unverifyStore(storeId: string, options?: RequestOptions): Promise<{
1480
1680
  ok: true;
1481
1681
  }>;
1682
+ listVerifications(params?: {
1683
+ status?: 'pending' | 'verified' | 'rejected' | 'unverified';
1684
+ page?: number;
1685
+ }, options?: RequestOptions): Promise<{
1686
+ data: AdminVerificationItem[];
1687
+ page: number;
1688
+ page_size: number;
1689
+ }>;
1690
+ approveVerification(userId: string, options?: RequestOptions): Promise<{
1691
+ ok: true;
1692
+ verification_status: 'verified';
1693
+ }>;
1694
+ rejectVerification(userId: string, reason?: string, options?: RequestOptions): Promise<{
1695
+ ok: true;
1696
+ verification_status: 'rejected';
1697
+ }>;
1698
+ adjustSti(userId: string, input: {
1699
+ score?: number;
1700
+ delta?: number;
1701
+ reason: string;
1702
+ }, options?: RequestOptions): Promise<{
1703
+ ok: true;
1704
+ score_before: number;
1705
+ score_after: number;
1706
+ }>;
1707
+ getStiEvents(userId: string, params?: {
1708
+ page?: number;
1709
+ }, options?: RequestOptions): Promise<{
1710
+ data: StiEvent[];
1711
+ page: number;
1712
+ page_size: number;
1713
+ }>;
1714
+ listListings(params?: {
1715
+ status?: string;
1716
+ photo_verified?: 0 | 1;
1717
+ page?: number;
1718
+ }, options?: RequestOptions): Promise<{
1719
+ data: AdminListingItem[];
1720
+ page: number;
1721
+ page_size: number;
1722
+ }>;
1723
+ removeListing(listingId: string, reason?: string, options?: RequestOptions): Promise<{
1724
+ ok: true;
1725
+ status: 'removed';
1726
+ }>;
1727
+ reinstateListing(listingId: string, options?: RequestOptions): Promise<{
1728
+ ok: true;
1729
+ status: 'active';
1730
+ }>;
1731
+ listOrders(params?: {
1732
+ status?: string;
1733
+ q?: string;
1734
+ page?: number;
1735
+ }, options?: RequestOptions): Promise<{
1736
+ data: AdminOrderListItem[];
1737
+ page: number;
1738
+ page_size: number;
1739
+ }>;
1740
+ getOrder(orderId: string, options?: RequestOptions): Promise<AdminOrderDetail>;
1741
+ forceTransitionOrder(orderId: string, status: string, note?: string, options?: RequestOptions): Promise<{
1742
+ ok: true;
1743
+ status: string;
1744
+ }>;
1745
+ getPayoutSummary(options?: RequestOptions): Promise<{
1746
+ owed: number;
1747
+ held: number;
1748
+ sent_today: number;
1749
+ }>;
1750
+ listPayouts(params?: {
1751
+ status?: 'pending' | 'sent' | 'failed';
1752
+ on_hold?: 0 | 1;
1753
+ page?: number;
1754
+ }, options?: RequestOptions): Promise<{
1755
+ data: AdminPayoutItem[];
1756
+ page: number;
1757
+ page_size: number;
1758
+ }>;
1759
+ disbursePayout(payoutId: string, options?: RequestOptions): Promise<{
1760
+ ok: true;
1761
+ result: unknown;
1762
+ }>;
1763
+ listReports(params?: {
1764
+ status?: 'open' | 'reviewed' | 'dismissed' | 'actioned';
1765
+ type?: 'listing' | 'review' | 'store' | 'user';
1766
+ page?: number;
1767
+ }, options?: RequestOptions): Promise<{
1768
+ data: AdminReport[];
1769
+ page: number;
1770
+ page_size: number;
1771
+ }>;
1772
+ resolveReport(reportId: string, status: 'reviewed' | 'dismissed' | 'actioned', note?: string, options?: RequestOptions): Promise<{
1773
+ ok: true;
1774
+ status: string;
1775
+ }>;
1776
+ removeReview(reviewId: string, reason?: string, options?: RequestOptions): Promise<{
1777
+ ok: true;
1778
+ hidden: true;
1779
+ }>;
1780
+ reinstateReview(reviewId: string, options?: RequestOptions): Promise<{
1781
+ ok: true;
1782
+ hidden: false;
1783
+ }>;
1784
+ listVaziOutfits(params?: {
1785
+ page?: number;
1786
+ }, options?: RequestOptions): Promise<{
1787
+ data: AdminVaziOutfit[];
1788
+ page: number;
1789
+ page_size: number;
1790
+ }>;
1791
+ removeVaziOutfit(outfitId: string, reason?: string, options?: RequestOptions): Promise<{
1792
+ ok: true;
1793
+ removed: true;
1794
+ }>;
1795
+ reinstateVaziOutfit(outfitId: string, options?: RequestOptions): Promise<{
1796
+ ok: true;
1797
+ removed: false;
1798
+ }>;
1799
+ broadcast(input: {
1800
+ title: string;
1801
+ body: string;
1802
+ segment?: 'all' | 'sellers' | 'buyers';
1803
+ }, options?: RequestOptions): Promise<{
1804
+ ok: true;
1805
+ segment: string;
1806
+ recipients: number;
1807
+ }>;
1482
1808
  }
1483
1809
 
1484
1810
  declare class DisputesModule {
@@ -1539,6 +1865,16 @@ declare class UploadsModule {
1539
1865
  }>;
1540
1866
  }
1541
1867
 
1868
+ declare class ReportsModule {
1869
+ private readonly client;
1870
+ constructor(client: APIClient);
1871
+ /** Report a listing, review, store, or user for admin review. */
1872
+ create(input: CreateReportInput, options?: RequestOptions): Promise<{
1873
+ ok: true;
1874
+ already_reported?: boolean;
1875
+ }>;
1876
+ }
1877
+
1542
1878
  declare class MitumbaClient {
1543
1879
  readonly api: APIClient;
1544
1880
  readonly auth: AuthModule;
@@ -1559,6 +1895,7 @@ declare class MitumbaClient {
1559
1895
  readonly admin: AdminModule;
1560
1896
  readonly disputes: DisputesModule;
1561
1897
  readonly uploads: UploadsModule;
1898
+ readonly reports: ReportsModule;
1562
1899
  constructor(config: MitumbaClientConfig);
1563
1900
  /**
1564
1901
  * Set the access token for authenticated requests.
@@ -1583,4 +1920,4 @@ declare class MitumbaClient {
1583
1920
  isAuthenticated(): Promise<boolean>;
1584
1921
  }
1585
1922
 
1586
- export { APIClient, APIError, type APIErrorResponse, type AddAddressInput, type AddPaymentMethodInput, type Address, AdminModule, AuthModule, type AuthTokens, type BecomeSellerInput, type BlockedIp, type Business, BusinessesModule, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type City, type CompleteOnboardingInput, type Condition, type Conversation, type CreateListingInput, type CreateOrderInput, type 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 ForgotPasswordInput, IDBTokenStore, 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 RaiseDisputeInput, type RegisterInput, type RequestOptions, type ResetPasswordInput, type ResolveDisputeInput, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type SaveSearchInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SendEmailInput, type SendMessageInput, type SendOtpInput, type Session, SettingsModule, type SimilarListing, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreSettings, type StoreStats, StoresModule, type SubscriptionTier, type SystemStats, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorRequired, type UpdateBusinessInput, type UpdateListingInput, type UpdateProfileInput, type UpdateStoreInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WishlistListing, WishlistsModule, createTokenStore };
1923
+ export { APIClient, APIError, type APIErrorResponse, type AddAddressInput, type AddPaymentMethodInput, type Address, type AdminListingItem, AdminModule, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminReport, type AdminStoreDetail, type AdminStoreListItem, type AdminUserDetail, type AdminUserListItem, type AdminVaziOutfit, type AdminVerificationItem, AuthModule, type AuthTokens, type BecomeSellerInput, type BlockedIp, type Business, BusinessesModule, CONDITIONS, type CartItem, CartModule, type Category, type ChangePasswordInput, type City, type CompleteOnboardingInput, type Condition, type Conversation, type CreateListingInput, type CreateOrderInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, DESIRED_RESOLUTIONS, DISPUTE_REASONS, DISPUTE_STATUSES, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, type EmailLoginInput, type EmailRegisterInput, type ForgotPasswordInput, IDBTokenStore, 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 RaiseDisputeInput, type RegisterInput, ReportsModule, type RequestOptions, type ResetPasswordInput, type ResolveDisputeInput, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type SaveSearchInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SendEmailInput, type SendMessageInput, type SendOtpInput, type Session, SettingsModule, type SimilarListing, type StiEvent, type StkPushInput, type StkPushResponse, type Store, type StoreAnalytics, type StoreSettings, type StoreStats, StoresModule, type SubscriptionTier, type SystemStats, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorRequired, type UpdateBusinessInput, type UpdateListingInput, type UpdateProfileInput, type UpdateStoreInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WishlistListing, WishlistsModule, createTokenStore };
package/dist/index.js CHANGED
@@ -1075,38 +1075,133 @@ var AdminModule = class {
1075
1075
  this.client = client;
1076
1076
  }
1077
1077
  client;
1078
- /** Block an IP address. Default duration: 24 hours. */
1078
+ // ── IP Blocking ──
1079
1079
  async blockIp(ip, durationHours, options) {
1080
1080
  return this.client.post("/admin/block-ip", { ip, duration_hours: durationHours ?? 24 }, options);
1081
1081
  }
1082
- /** Unblock an IP address. */
1083
1082
  async unblockIp(ip, options) {
1084
1083
  return this.client.post("/admin/unblock-ip", { ip }, options);
1085
1084
  }
1086
- /** List currently blocked IPs. */
1087
1085
  async getBlockedIps(options) {
1088
1086
  return this.client.get("/admin/blocked-ips", void 0, options);
1089
1087
  }
1090
- /** Get platform-wide statistics. */
1088
+ // ── Stats ──
1091
1089
  async getSystemStats(options) {
1092
1090
  return this.client.get("/admin/stats", void 0, options);
1093
1091
  }
1094
- /** Suspend a user account. */
1092
+ async getStatsTimeseries(params, options) {
1093
+ return this.client.get("/admin/stats/timeseries", params, options);
1094
+ }
1095
+ async getStatsByCity(options) {
1096
+ return this.client.get("/admin/stats/by-city", void 0, options);
1097
+ }
1098
+ // ── Users ──
1099
+ async listUsers(params, options) {
1100
+ return this.client.get("/admin/users", params, options);
1101
+ }
1102
+ async getUser(userId, options) {
1103
+ return this.client.get(`/admin/users/${userId}`, void 0, options);
1104
+ }
1095
1105
  async suspendUser(userId, reason, options) {
1096
1106
  return this.client.post(`/admin/users/${userId}/suspend`, { reason }, options);
1097
1107
  }
1098
- /** Unsuspend a user account. */
1099
1108
  async unsuspendUser(userId, options) {
1100
1109
  return this.client.post(`/admin/users/${userId}/unsuspend`, void 0, options);
1101
1110
  }
1102
- /** Grant verified badge to a store. */
1111
+ async setUserRole(userId, role, action, options) {
1112
+ return this.client.post(`/admin/users/${userId}/roles`, { role, action }, options);
1113
+ }
1114
+ async revokeUserSessions(userId, options) {
1115
+ return this.client.post(`/admin/users/${userId}/revoke-sessions`, void 0, options);
1116
+ }
1117
+ // ── Stores ──
1118
+ async listStores(params, options) {
1119
+ return this.client.get("/admin/stores", params, options);
1120
+ }
1121
+ async getStore(storeId, options) {
1122
+ return this.client.get(`/admin/stores/${storeId}`, void 0, options);
1123
+ }
1103
1124
  async verifyStore(storeId, options) {
1104
1125
  return this.client.post(`/admin/stores/${storeId}/verify`, void 0, options);
1105
1126
  }
1106
- /** Revoke verified badge from a store. */
1107
1127
  async unverifyStore(storeId, options) {
1108
1128
  return this.client.post(`/admin/stores/${storeId}/unverify`, void 0, options);
1109
1129
  }
1130
+ // ── Verification Queue ──
1131
+ async listVerifications(params, options) {
1132
+ return this.client.get("/admin/verifications", params, options);
1133
+ }
1134
+ async approveVerification(userId, options) {
1135
+ return this.client.post(`/admin/verifications/${userId}/approve`, void 0, options);
1136
+ }
1137
+ async rejectVerification(userId, reason, options) {
1138
+ return this.client.post(`/admin/verifications/${userId}/reject`, reason ? { reason } : void 0, options);
1139
+ }
1140
+ // ── STI ──
1141
+ async adjustSti(userId, input, options) {
1142
+ return this.client.post(`/admin/sellers/${userId}/sti`, input, options);
1143
+ }
1144
+ async getStiEvents(userId, params, options) {
1145
+ return this.client.get(`/admin/sellers/${userId}/sti-events`, params, options);
1146
+ }
1147
+ // ── Listings Moderation ──
1148
+ async listListings(params, options) {
1149
+ return this.client.get("/admin/listings", params, options);
1150
+ }
1151
+ async removeListing(listingId, reason, options) {
1152
+ return this.client.post(`/admin/listings/${listingId}/remove`, reason ? { reason } : void 0, options);
1153
+ }
1154
+ async reinstateListing(listingId, options) {
1155
+ return this.client.post(`/admin/listings/${listingId}/reinstate`, void 0, options);
1156
+ }
1157
+ // ── Orders ──
1158
+ async listOrders(params, options) {
1159
+ return this.client.get("/admin/orders", params, options);
1160
+ }
1161
+ async getOrder(orderId, options) {
1162
+ return this.client.get(`/admin/orders/${orderId}`, void 0, options);
1163
+ }
1164
+ async forceTransitionOrder(orderId, status, note, options) {
1165
+ return this.client.post(`/admin/orders/${orderId}/transition`, { status, note }, options);
1166
+ }
1167
+ // ── Payouts ──
1168
+ async getPayoutSummary(options) {
1169
+ return this.client.get("/admin/payouts/summary", void 0, options);
1170
+ }
1171
+ async listPayouts(params, options) {
1172
+ return this.client.get("/admin/payouts", params, options);
1173
+ }
1174
+ async disbursePayout(payoutId, options) {
1175
+ return this.client.post(`/admin/payouts/${payoutId}/disburse`, void 0, options);
1176
+ }
1177
+ // ── Reports Moderation ──
1178
+ async listReports(params, options) {
1179
+ return this.client.get("/admin/reports", params, options);
1180
+ }
1181
+ async resolveReport(reportId, status, note, options) {
1182
+ return this.client.post(`/admin/reports/${reportId}/resolve`, { status, note }, options);
1183
+ }
1184
+ // ── Review Moderation ──
1185
+ async removeReview(reviewId, reason, options) {
1186
+ return this.client.post(`/admin/reviews/${reviewId}/remove`, reason ? { reason } : void 0, options);
1187
+ }
1188
+ async reinstateReview(reviewId, options) {
1189
+ return this.client.post(`/admin/reviews/${reviewId}/reinstate`, void 0, options);
1190
+ }
1191
+ // ── VAZI Moderation ──
1192
+ async listVaziOutfits(params, options) {
1193
+ return this.client.get("/admin/vazi/outfits", params, options);
1194
+ }
1195
+ async removeVaziOutfit(outfitId, reason, options) {
1196
+ return this.client.post(`/admin/vazi/outfits/${outfitId}/remove`, reason ? { reason } : void 0, options);
1197
+ }
1198
+ async reinstateVaziOutfit(outfitId, options) {
1199
+ return this.client.post(`/admin/vazi/outfits/${outfitId}/reinstate`, void 0, options);
1200
+ }
1201
+ // ── Broadcast ──
1202
+ async broadcast(input, options) {
1203
+ return this.client.post("/admin/broadcast", input, options);
1204
+ }
1110
1205
  };
1111
1206
 
1112
1207
  // src/modules/disputes.ts
@@ -1171,6 +1266,18 @@ var UploadsModule = class {
1171
1266
  }
1172
1267
  };
1173
1268
 
1269
+ // src/modules/reports.ts
1270
+ var ReportsModule = class {
1271
+ constructor(client) {
1272
+ this.client = client;
1273
+ }
1274
+ client;
1275
+ /** Report a listing, review, store, or user for admin review. */
1276
+ async create(input, options) {
1277
+ return this.client.post("/listings/reports", input, options);
1278
+ }
1279
+ };
1280
+
1174
1281
  // src/types/listings.ts
1175
1282
  var CONDITIONS = ["new", "like_new", "good", "fair"];
1176
1283
  var LISTING_STATUSES = ["draft", "active", "sold", "removed"];
@@ -1217,6 +1324,7 @@ var MitumbaClient = class {
1217
1324
  admin;
1218
1325
  disputes;
1219
1326
  uploads;
1327
+ reports;
1220
1328
  constructor(config) {
1221
1329
  this.api = new APIClient(config);
1222
1330
  this.auth = new AuthModule(this.api);
@@ -1237,6 +1345,7 @@ var MitumbaClient = class {
1237
1345
  this.admin = new AdminModule(this.api);
1238
1346
  this.disputes = new DisputesModule(this.api);
1239
1347
  this.uploads = new UploadsModule(this.api);
1348
+ this.reports = new ReportsModule(this.api);
1240
1349
  }
1241
1350
  /**
1242
1351
  * Set the access token for authenticated requests.
@@ -1294,6 +1403,7 @@ exports.ORDER_STATUSES = ORDER_STATUSES;
1294
1403
  exports.OrdersModule = OrdersModule;
1295
1404
  exports.PAYMENT_STATUSES = PAYMENT_STATUSES;
1296
1405
  exports.PayModule = PayModule;
1406
+ exports.ReportsModule = ReportsModule;
1297
1407
  exports.ReviewsModule = ReviewsModule;
1298
1408
  exports.SearchModule = SearchModule;
1299
1409
  exports.SettingsModule = SettingsModule;