@mitumba/sdk 5.32.0 → 5.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1008,6 +1008,7 @@ interface AdminVerificationItem {
1008
1008
  display_name: string | null;
1009
1009
  email: string | null;
1010
1010
  phone: string | null;
1011
+ /** A URL, or a private document id (see `isDocumentId`) read with `admin.getDocument`. */
1011
1012
  id_document_url: string | null;
1012
1013
  kra_pin: string | null;
1013
1014
  }
@@ -1331,6 +1332,8 @@ interface AdminWholesalePendingStore {
1331
1332
  reviewed_at?: string | null;
1332
1333
  /** Rejection reason, also shown to the seller. */
1333
1334
  review_note?: string | null;
1335
+ /** Each a URL, or a private document id (see `isDocumentId`) read with `admin.getDocument`. */
1336
+ verification_photos?: string[];
1334
1337
  [key: string]: unknown;
1335
1338
  }
1336
1339
  /** `public` clients (browser SPAs, mobile) use PKCE and have no secret; `confidential` clients have a server-side secret. */
@@ -2448,6 +2451,11 @@ interface SaveWholesaleStoreInput {
2448
2451
  description?: string;
2449
2452
  logo_url?: string;
2450
2453
  origins?: string[];
2454
+ /**
2455
+ * Up to 8. Each is a URL or a private document id (`documents.upload` with purpose
2456
+ * `wholesale_verification` for this store). Ids are accepted only once the store exists.
2457
+ */
2458
+ verification_photos?: string[];
2451
2459
  }
2452
2460
  interface AddDepotInput {
2453
2461
  name: string;
@@ -2887,6 +2895,62 @@ interface LiveUnreadOptions {
2887
2895
  /** Calls back when the page regains focus or becomes visible. Default: window focus and document visibility in a browser; nothing elsewhere. */
2888
2896
  onResume?: (listener: () => void) => () => void;
2889
2897
  }
2898
+ /** A way to reach someone. */
2899
+ type NotificationChannel = 'in_app' | 'email' | 'push' | 'whatsapp' | 'telegram' | 'sms';
2900
+ /** Pop-up kinds a person may mute. Security and approval pop-ups can't be muted. */
2901
+ type MutableFlashKind = 'announcement' | 'account_action';
2902
+ /** Quiet hours: `start` and `end` are 24-hour `HH:MM`; an end before the start is an overnight window. */
2903
+ interface QuietHours {
2904
+ enabled: boolean;
2905
+ start: string;
2906
+ end: string;
2907
+ /** IANA time zone, e.g. `Africa/Nairobi`. */
2908
+ timeZone: string;
2909
+ }
2910
+ interface NotificationPreferenceCategory {
2911
+ id: NotificationCategory;
2912
+ label: string;
2913
+ description: string;
2914
+ kind: 'transactional' | 'marketing' | 'either';
2915
+ /** Some events here still arrive by in-app and email when every channel is off: show a lock. */
2916
+ required: boolean;
2917
+ /** Only the channels this category's events use. */
2918
+ channels: Array<{
2919
+ channel: NotificationChannel;
2920
+ enabled: boolean;
2921
+ default: boolean;
2922
+ }>;
2923
+ }
2924
+ /** Everything the notification settings page shows. Every preferences method answers it whole. */
2925
+ interface NotificationPreferences {
2926
+ categories: NotificationPreferenceCategory[];
2927
+ /** Whether each channel can reach the caller right now. */
2928
+ channels: Array<{
2929
+ channel: NotificationChannel;
2930
+ available: boolean;
2931
+ }>;
2932
+ quietHours: QuietHours;
2933
+ mutedFlashKinds: MutableFlashKind[];
2934
+ /** Channels the caller has opted in to marketing on. */
2935
+ marketingConsent: NotificationChannel[];
2936
+ /** Text to show next to each marketing opt-in toggle. */
2937
+ consentWording: Partial<Record<NotificationChannel, string>>;
2938
+ }
2939
+ interface PreferenceCellChange {
2940
+ category: NotificationCategory;
2941
+ channel: NotificationChannel;
2942
+ /** `null` returns the cell to its default. */
2943
+ enabled: boolean | null;
2944
+ }
2945
+ /** At least one field. */
2946
+ interface PreferenceSettingsChange {
2947
+ quietHours?: QuietHours;
2948
+ mutedFlashKinds?: MutableFlashKind[];
2949
+ }
2950
+ interface MarketingConsentChange {
2951
+ channel: NotificationChannel;
2952
+ granted: boolean;
2953
+ }
2890
2954
 
2891
2955
  type SubscriptionTier = 'free' | 'pro' | 'premium';
2892
2956
  interface Store {
@@ -2978,6 +3042,7 @@ interface StoreSettings {
2978
3042
  operating_days: 'everyday' | 'weekdays' | 'custom';
2979
3043
  custom_days: string[];
2980
3044
  phone_verified: boolean;
3045
+ /** A URL, or a private document id (`documents.upload` with purpose `identity_document` for this store). */
2981
3046
  id_document_url: string | null;
2982
3047
  id_verified: boolean;
2983
3048
  kra_pin: string | null;
@@ -3156,6 +3221,165 @@ type AddPayoutDestinationInput = {
3156
3221
  /** Why a destination was refused on entry, with the field to fix. */
3157
3222
  type PayoutDestinationRejection = 'invalid_phone' | 'invalid_till' | 'invalid_paybill' | 'invalid_account' | 'unknown_bank' | 'method_not_offered';
3158
3223
 
3224
+ /** A permission a member holds in a shop. */
3225
+ type StorePermission = 'store:listings.read' | 'store:listings.manage' | 'store:orders.read' | 'store:orders.fulfil' | 'store:orders.cancel' | 'store:messages.reply' | 'store:reviews.reply' | 'store:earnings.read' | 'store:payouts.manage' | 'store:settings.manage' | 'store:members.manage' | 'store:analytics.read' | 'store:store.close' | 'store:audit.read';
3226
+ /** A member's role in a shop. Each role grants a fixed set of permissions. */
3227
+ type StoreRole = 'owner' | 'manager' | 'fulfilment' | 'stock' | 'support' | 'finance';
3228
+ /** The roles an invitation can offer. */
3229
+ type InvitableStoreRole = Exclude<StoreRole, 'owner'>;
3230
+ /** A shop the caller works in, from `getMyStores`, with the caller's role in it. */
3231
+ interface StoreMembershipFields {
3232
+ my_role: StoreRole;
3233
+ my_permissions: StorePermission[];
3234
+ is_owner: boolean;
3235
+ listing_count: number;
3236
+ }
3237
+ interface StoreMember {
3238
+ id: string;
3239
+ name: string;
3240
+ role: StoreRole;
3241
+ joined_at: string;
3242
+ /** The caller's own row. */
3243
+ is_you: boolean;
3244
+ /** Whether the caller may change this member's role or remove them. */
3245
+ can_manage: boolean;
3246
+ }
3247
+ interface StoreMembers {
3248
+ data: StoreMember[];
3249
+ /** The roles the caller may give, for the invite and change-role forms. */
3250
+ assignable_roles: InvitableStoreRole[];
3251
+ }
3252
+ /** An open invitation, as the shop sees it. `address` is masked. */
3253
+ interface StoreInvitation {
3254
+ id: string;
3255
+ address: string;
3256
+ role: InvitableStoreRole;
3257
+ expires_at: string;
3258
+ created_at: string;
3259
+ }
3260
+ interface StoreInvitationListItem extends StoreInvitation {
3261
+ invited_by: string;
3262
+ can_revoke: boolean;
3263
+ }
3264
+ interface InviteToStoreInput {
3265
+ /** An email address or a Kenyan phone number. */
3266
+ address: string;
3267
+ role: InvitableStoreRole;
3268
+ }
3269
+ /** The answer to an invitation. The same whether or not an account uses the address. */
3270
+ interface InviteToStoreResult {
3271
+ message: string;
3272
+ invitation: StoreInvitation;
3273
+ }
3274
+ /** An invitation the caller received. */
3275
+ interface ReceivedStoreInvitation {
3276
+ id: string;
3277
+ role: InvitableStoreRole;
3278
+ permissions: StorePermission[];
3279
+ expires_at: string;
3280
+ created_at: string;
3281
+ invited_by: string;
3282
+ shop: {
3283
+ id: string;
3284
+ name: string;
3285
+ slug: string;
3286
+ logo_url: string | null;
3287
+ };
3288
+ }
3289
+ interface AcceptStoreInvitationResult {
3290
+ ok: true;
3291
+ store_id: string;
3292
+ role: InvitableStoreRole;
3293
+ permissions: StorePermission[];
3294
+ }
3295
+ interface StoreAuditEntry {
3296
+ id: string;
3297
+ actor_id: string;
3298
+ action: string;
3299
+ target_type: string | null;
3300
+ target_id: string | null;
3301
+ summary: string;
3302
+ created_at: string;
3303
+ actor: {
3304
+ id: string;
3305
+ name: string;
3306
+ is_you: boolean;
3307
+ };
3308
+ }
3309
+ interface StoreAuditPage {
3310
+ data: StoreAuditEntry[];
3311
+ page: number;
3312
+ has_more: boolean;
3313
+ }
3314
+ type StoreLimitRequestStatus = 'pending' | 'approved' | 'rejected';
3315
+ interface StoreLimitRequest {
3316
+ id: string;
3317
+ status: StoreLimitRequestStatus;
3318
+ requested_limit: number;
3319
+ approved_limit: number | null;
3320
+ reason: string;
3321
+ decision_note: string | null;
3322
+ created_at: string;
3323
+ decided_at: string | null;
3324
+ }
3325
+ /** The caller's shop limit, how many shops they own, and their latest request. */
3326
+ interface StoreLimitState {
3327
+ limit: number;
3328
+ open_shops: number;
3329
+ at_limit: boolean;
3330
+ request: StoreLimitRequest | null;
3331
+ }
3332
+ interface RequestStoreLimitInput {
3333
+ requested_limit: number;
3334
+ /** At least 30 characters. */
3335
+ reason: string;
3336
+ }
3337
+ /** A shop limit request in the operators' queue. */
3338
+ interface AdminShopLimitRequest {
3339
+ id: string;
3340
+ user_id: string;
3341
+ current_limit: number;
3342
+ requested_limit: number;
3343
+ reason: string;
3344
+ status: StoreLimitRequestStatus;
3345
+ approved_limit: number | null;
3346
+ decision_note: string | null;
3347
+ decided_by: string | null;
3348
+ created_at: string;
3349
+ decided_at: string | null;
3350
+ account: {
3351
+ id: string;
3352
+ name: string;
3353
+ email: string | null;
3354
+ sti_score: number | null;
3355
+ completed_orders: number;
3356
+ };
3357
+ shops: Array<{
3358
+ id: string;
3359
+ name: string;
3360
+ slug: string;
3361
+ created_at: string;
3362
+ }>;
3363
+ }
3364
+ interface AdminShopLimitRequestsPage {
3365
+ data: AdminShopLimitRequest[];
3366
+ page: number;
3367
+ has_more: boolean;
3368
+ }
3369
+ type DecideShopLimitInput = {
3370
+ decision: 'approve';
3371
+ approved_limit: number;
3372
+ note?: string;
3373
+ } | {
3374
+ decision: 'reject';
3375
+ note: string;
3376
+ };
3377
+ interface DecideShopLimitResult {
3378
+ ok: true;
3379
+ status: 'approved' | 'rejected';
3380
+ approved_limit?: number;
3381
+ }
3382
+
3159
3383
  interface Review {
3160
3384
  id: string;
3161
3385
  store_id: string;
@@ -3474,6 +3698,7 @@ interface DisputeEvidence {
3474
3698
  id: string;
3475
3699
  uploader_role: 'buyer' | 'seller' | 'admin';
3476
3700
  type: 'image' | 'text';
3701
+ /** Text, an image URL, or a private document id (`doc_…`, see `isDocumentId`) read with `documents.get`. */
3477
3702
  content: string;
3478
3703
  created_at: string;
3479
3704
  }
@@ -3512,11 +3737,15 @@ interface RaiseDisputeInput {
3512
3737
  description: string;
3513
3738
  desired_resolution: DesiredResolution;
3514
3739
  evidence_urls?: string[];
3740
+ /** Private document ids (`documents.upload` with purpose `dispute_evidence` for this order). At most 6 items with `evidence_urls`. */
3741
+ evidence_documents?: string[];
3515
3742
  }
3516
3743
  interface RespondDisputeInput {
3517
3744
  accept: boolean;
3518
3745
  message?: string;
3519
3746
  evidence_urls?: string[];
3747
+ /** Private document ids (`documents.upload` with purpose `dispute_evidence` for this order). At most 6 items with `evidence_urls`. */
3748
+ evidence_documents?: string[];
3520
3749
  }
3521
3750
  interface ResolveDisputeInput {
3522
3751
  resolution: 'refund' | 'release' | 'partial';
@@ -3531,6 +3760,33 @@ interface DisputeListParams {
3531
3760
  page?: number;
3532
3761
  }
3533
3762
 
3763
+ /** What a private document is for. Each purpose belongs to one kind of subject. */
3764
+ declare const DOCUMENT_PURPOSES: readonly ["dispute_evidence", "identity_document", "wholesale_verification"];
3765
+ type DocumentPurpose = typeof DOCUMENT_PURPOSES[number];
3766
+ /**
3767
+ * Uploading a private document.
3768
+ *
3769
+ * - `dispute_evidence`: `subjectId` is the order id; photos only.
3770
+ * - `identity_document`: `subjectId` is the retail store id; a photo or a PDF.
3771
+ * - `wholesale_verification`: `subjectId` is the wholesale store id; photos only.
3772
+ *
3773
+ * Photos (JPEG, PNG, WebP, HEIC) are stored re-encoded as WebP. Up to 10 MB.
3774
+ */
3775
+ interface UploadDocumentInput {
3776
+ file: Blob;
3777
+ purpose: DocumentPurpose;
3778
+ subjectId: string;
3779
+ }
3780
+ /** A stored private document. It is read with `documents.get`; it has no public URL. */
3781
+ interface PrivateDocument {
3782
+ /** `doc_…`. Pass it where a document is referred to by id. */
3783
+ id: string;
3784
+ purpose: DocumentPurpose;
3785
+ content_type: 'image/webp' | 'application/pdf';
3786
+ size_bytes: number;
3787
+ created_at: string;
3788
+ }
3789
+
3534
3790
  /** IAM principal lifecycle state. */
3535
3791
  type IamUserStatus = 'active' | 'disabled';
3536
3792
  /** Organization lifecycle state. */
@@ -4579,6 +4835,23 @@ declare class NotificationsModule {
4579
4835
  markRead(ids?: string[], options?: RequestOptions): Promise<{
4580
4836
  ok: true;
4581
4837
  }>;
4838
+ /**
4839
+ * The caller's notification settings: categories with their channels, which channels can reach
4840
+ * them now, quiet hours, muted pop-ups and marketing consent.
4841
+ */
4842
+ getPreferences(options?: RequestOptions): Promise<NotificationPreferences>;
4843
+ /**
4844
+ * Set (or, with `enabled: null`, reset to default) 1 to 64 category × channel cells. A cell
4845
+ * applies to every event in its category. Answers the whole updated preferences.
4846
+ */
4847
+ updatePreferences(cells: PreferenceCellChange[], options?: RequestOptions): Promise<NotificationPreferences>;
4848
+ /** Change quiet hours, muted pop-up kinds, or both. Answers the whole updated preferences. */
4849
+ updatePreferenceSettings(input: PreferenceSettingsChange, options?: RequestOptions): Promise<NotificationPreferences>;
4850
+ /**
4851
+ * Opt in to or out of marketing on one channel. The server records its own consent wording
4852
+ * (shown to the person as `consentWording`). Answers the whole updated preferences.
4853
+ */
4854
+ setMarketingConsent(input: MarketingConsentChange, options?: RequestOptions): Promise<NotificationPreferences>;
4582
4855
  /** Create an inert live notification stream. Register listeners before `start()`. */
4583
4856
  stream(options?: NotificationStreamOptions): NotificationStream;
4584
4857
  /** Create and start a live notification stream. Resolves once connected. */
@@ -4618,10 +4891,11 @@ declare class StoresModule {
4618
4891
  data: Listing[];
4619
4892
  }>;
4620
4893
  /**
4621
- * Get all stores owned by the authenticated user.
4894
+ * The shops the authenticated user works in, owned or joined, each with their role in it and the
4895
+ * permissions it grants. Show only the actions those permissions allow.
4622
4896
  */
4623
4897
  getMyStores(options?: RequestOptions): Promise<{
4624
- data: Store[];
4898
+ data: Array<Store & StoreMembershipFields>;
4625
4899
  }>;
4626
4900
  /**
4627
4901
  * Get stores the authenticated user follows.
@@ -4742,6 +5016,98 @@ declare class StoresModule {
4742
5016
  */
4743
5017
  removePayoutDestination(storeId: string, destinationId: string, options?: RequestOptions): Promise<PayoutDestinationsState>;
4744
5018
  private destinationPath;
5019
+ /**
5020
+ * The shop's members, and the roles the caller may give. `store:members.manage`.
5021
+ *
5022
+ * Errors: 403 store_forbidden; 404 not_found.
5023
+ */
5024
+ getMembers(storeId: string, options?: RequestOptions): Promise<StoreMembers>;
5025
+ /**
5026
+ * Change a member's role. The owner manages every role; a manager, the roles below manager.
5027
+ * Needs a second factor used in the last 10 minutes.
5028
+ *
5029
+ * Errors: 400 invalid_input; 403 store_forbidden, step_up_required, role_not_allowed; 404 member_not_found.
5030
+ */
5031
+ changeMemberRole(storeId: string, memberId: string, role: InvitableStoreRole, options?: RequestOptions): Promise<{
5032
+ ok: true;
5033
+ }>;
5034
+ /**
5035
+ * Remove a member. They lose access on their next request. Needs a recent second factor.
5036
+ *
5037
+ * Errors: 403 store_forbidden, step_up_required, role_not_allowed; 404 member_not_found.
5038
+ */
5039
+ removeMember(storeId: string, memberId: string, options?: RequestOptions): Promise<{
5040
+ ok: true;
5041
+ }>;
5042
+ /**
5043
+ * Leave a shop's team. The owner cannot leave their own shop.
5044
+ *
5045
+ * Errors: 404 member_not_found; 409 owner_cannot_leave.
5046
+ */
5047
+ leave(storeId: string, options?: RequestOptions): Promise<{
5048
+ ok: true;
5049
+ }>;
5050
+ /**
5051
+ * Invite someone by email address or Kenyan phone number. The answer is the same whether or not an
5052
+ * account uses the address. Needs a recent second factor. The invitation lasts 7 days.
5053
+ *
5054
+ * Errors: 400 invalid_input, invalid_address; 403 store_forbidden, step_up_required, role_not_allowed;
5055
+ * 404 not_found; 409 too_many_invitations.
5056
+ */
5057
+ invite(storeId: string, input: InviteToStoreInput, options?: RequestOptions): Promise<InviteToStoreResult>;
5058
+ /**
5059
+ * The shop's open invitations, newest first. `store:members.manage`.
5060
+ *
5061
+ * Errors: 403 store_forbidden; 404 not_found.
5062
+ */
5063
+ getInvitations(storeId: string, options?: RequestOptions): Promise<{
5064
+ data: StoreInvitationListItem[];
5065
+ }>;
5066
+ /**
5067
+ * Revoke an open invitation. Needs a recent second factor.
5068
+ *
5069
+ * Errors: 403 store_forbidden, step_up_required, role_not_allowed; 404 invitation_not_found.
5070
+ */
5071
+ revokeInvitation(storeId: string, invitationId: string, options?: RequestOptions): Promise<{
5072
+ ok: true;
5073
+ }>;
5074
+ /** Invitations the caller received and can still answer, newest first. */
5075
+ getReceivedInvitations(options?: RequestOptions): Promise<{
5076
+ data: ReceivedStoreInvitation[];
5077
+ }>;
5078
+ /**
5079
+ * Join a shop. Needs a verified phone number; the manager role also needs a recent second factor.
5080
+ *
5081
+ * Errors: 403 step_up_required; 404 invitation_not_found, not_found; 409 phone_not_verified,
5082
+ * membership_limit, already_member.
5083
+ */
5084
+ acceptInvitation(invitationId: string, options?: RequestOptions): Promise<AcceptStoreInvitationResult>;
5085
+ /**
5086
+ * Decline an invitation.
5087
+ *
5088
+ * Errors: 404 invitation_not_found.
5089
+ */
5090
+ declineInvitation(invitationId: string, options?: RequestOptions): Promise<{
5091
+ ok: true;
5092
+ }>;
5093
+ /**
5094
+ * The shop's audit log, newest first, 50 per page. `store:audit.read`.
5095
+ *
5096
+ * Errors: 403 store_forbidden; 404 not_found.
5097
+ */
5098
+ getAuditLog(storeId: string, params?: {
5099
+ page?: number;
5100
+ }, options?: RequestOptions): Promise<StoreAuditPage>;
5101
+ /** The caller's shop limit, how many shops they own, and their latest request for more. */
5102
+ getStoreLimit(options?: RequestOptions): Promise<StoreLimitState>;
5103
+ /**
5104
+ * Ask for a higher shop limit, at the limit, with a reason of at least 30 characters. One request
5105
+ * at a time.
5106
+ *
5107
+ * Errors: 400 invalid_input; 403 not_a_retail_seller; 409 not_at_limit, request_pending.
5108
+ */
5109
+ requestStoreLimit(input: RequestStoreLimitInput, options?: RequestOptions): Promise<StoreLimitState>;
5110
+ private storePath;
4745
5111
  }
4746
5112
  /** Whether an error asks the caller to sign in again with a second factor before retrying. */
4747
5113
  declare function stepUpRequired(error: unknown): boolean;
@@ -5093,6 +5459,11 @@ declare class AdminModule {
5093
5459
  unverifyStore(storeId: string, options?: RequestOptions): Promise<{
5094
5460
  ok: true;
5095
5461
  }>;
5462
+ /**
5463
+ * Read a private document as an operator. Dispute evidence needs `admin:read`; identity documents
5464
+ * and wholesale verification photos need `sellers:verify`.
5465
+ */
5466
+ getDocument(documentId: string, options?: RequestOptions): Promise<FileResponse>;
5096
5467
  listVerifications(params?: {
5097
5468
  status?: 'pending' | 'verified' | 'rejected' | 'unverified';
5098
5469
  page?: number;
@@ -5195,6 +5566,23 @@ declare class AdminModule {
5195
5566
  * 503 refund_disbursement_paused, refund_method_unsupported.
5196
5567
  */
5197
5568
  sendRefund(refundId: string, options?: RequestOptions): Promise<AdminRefundSendResult>;
5569
+ /**
5570
+ * Requests for a higher shop limit, 25 per page: pending oldest first, decided latest first.
5571
+ * `admin:read`.
5572
+ *
5573
+ * Errors: 400 invalid_input (unknown status).
5574
+ */
5575
+ listShopLimitRequests(params?: {
5576
+ status?: StoreLimitRequestStatus;
5577
+ page?: number;
5578
+ }, options?: RequestOptions): Promise<AdminShopLimitRequestsPage>;
5579
+ /**
5580
+ * Approve a request with a new limit (above the current one, at most 50), or reject it with a note
5581
+ * of at least 10 characters. The owner is told. `sellers:verify`.
5582
+ *
5583
+ * Errors: 400 invalid_input; 403 forbidden; 404 not_found (not pending).
5584
+ */
5585
+ decideShopLimitRequest(requestId: string, input: DecideShopLimitInput, options?: RequestOptions): Promise<DecideShopLimitResult>;
5198
5586
  listReports(params?: {
5199
5587
  status?: 'open' | 'reviewed' | 'dismissed' | 'actioned';
5200
5588
  type?: 'listing' | 'review' | 'store' | 'user';
@@ -5473,6 +5861,17 @@ declare class UploadsModule {
5473
5861
  }>;
5474
5862
  }
5475
5863
 
5864
+ /** Whether a stored value refers to a private document (`doc_…`) rather than a URL. */
5865
+ declare function isDocumentId(value: string): boolean;
5866
+ declare class DocumentsModule {
5867
+ private readonly client;
5868
+ constructor(client: APIClient);
5869
+ /** Upload a private document. Returns its id; the file itself is never public. */
5870
+ upload(input: UploadDocumentInput, options?: RequestOptions): Promise<PrivateDocument>;
5871
+ /** Read a private document the signed-in user may see. 404 for any other. */
5872
+ get(documentId: string, options?: RequestOptions): Promise<FileResponse>;
5873
+ }
5874
+
5476
5875
  declare class ReportsModule {
5477
5876
  private readonly client;
5478
5877
  constructor(client: APIClient);
@@ -5867,6 +6266,7 @@ declare class MitumbaClient {
5867
6266
  readonly admin: AdminModule;
5868
6267
  readonly disputes: DisputesModule;
5869
6268
  readonly uploads: UploadsModule;
6269
+ readonly documents: DocumentsModule;
5870
6270
  readonly reports: ReportsModule;
5871
6271
  readonly wholesale: WholesaleModule;
5872
6272
  readonly iam: IamModule;
@@ -5902,4 +6302,4 @@ declare class MitumbaClient {
5902
6302
  isAuthenticated(): Promise<boolean>;
5903
6303
  }
5904
6304
 
5905
- export { APIClient, APIError, type APIErrorResponse, 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 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, type DeliveryAddress, type DesiredResolution, type Dispute, type DisputeEvent, type DisputeEvidence, type DisputeListParams, type DisputeReason, type DisputeStatus, DisputesModule, 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 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, 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 Notification, type NotificationAction, type NotificationCategory, type NotificationFlash, type NotificationLink, type NotificationPref, 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 PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegenerateIamBackupCodesResult, type RegisterInput, type RegisterOAuthClientInput, type RegisteredOAuthClient, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type ResetPasswordInput, type ResolveDisputeInput, type ResolveMessageReportInput, type ResolveMessageReportResult, type ResolveThreadResult, type RespondDisputeInput, type Review, type ReviewableOrder, ReviewsModule, type RootSetupInput, type RootSetupResult, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, type SendEmailInput, type SendMessageInput, type SendOtpInput, type 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 StoreResolveThreadInput, type StoreReviewsPage, 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, 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, isMessagingAPIError, isNewOnlyCategory, isValidPhone, listingShareUrl, maskPhone, normalizePhone, partitionCart, regionById, stepUpRequired, storeShareUrl };
6305
+ 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, type SaveSearchInput, type SaveWholesaleStoreInput, type SearchHistoryItem, SearchModule, type SearchParams, type SearchResult, type SellerProfile, type SellerStorefront, type SellerType, 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 };