@mitumba/sdk 5.4.0 → 5.6.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 +367 -1
- package/dist/index.d.ts +367 -1
- package/dist/index.js +275 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +265 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2019,6 +2019,64 @@ interface CheckoutStatusResponse {
|
|
|
2019
2019
|
poll_after_ms: number;
|
|
2020
2020
|
}
|
|
2021
2021
|
|
|
2022
|
+
/**
|
|
2023
|
+
* Platform markets: the countries Mitumba operates in (or plans to).
|
|
2024
|
+
*
|
|
2025
|
+
* The backend owns the registry and serves it at `GET /markets`. Clients read it at runtime and
|
|
2026
|
+
* never hardcode a country, a currency, a calling code or a region name.
|
|
2027
|
+
*
|
|
2028
|
+
* `code` is UPPERCASE ISO 3166-1 alpha-2 (`"KE"`). `slug` is the lowercase URL form (`"ke"`).
|
|
2029
|
+
*/
|
|
2030
|
+
type MarketStatus = 'active' | 'coming_soon';
|
|
2031
|
+
interface MarketCurrency {
|
|
2032
|
+
/** ISO 4217 alpha-3, e.g. `"KES"`. */
|
|
2033
|
+
code: string;
|
|
2034
|
+
/** The currency's real exponent: 2 for KES, 0 for UGX. */
|
|
2035
|
+
minor_unit: number;
|
|
2036
|
+
symbol: string;
|
|
2037
|
+
/** A locale that formats this currency correctly, e.g. `"en-KE"`. */
|
|
2038
|
+
locale: string;
|
|
2039
|
+
}
|
|
2040
|
+
interface MarketPhone {
|
|
2041
|
+
/** With the plus, e.g. `"+254"`. */
|
|
2042
|
+
calling_code: string;
|
|
2043
|
+
/** Allowed digit counts after the calling code, without a trunk `0`. */
|
|
2044
|
+
national_length: number[];
|
|
2045
|
+
/** A valid example in E.164, for placeholders. */
|
|
2046
|
+
example: string;
|
|
2047
|
+
}
|
|
2048
|
+
interface Market {
|
|
2049
|
+
code: string;
|
|
2050
|
+
slug: string;
|
|
2051
|
+
name: string;
|
|
2052
|
+
/** Only `active` markets can transact. `coming_soon` markets are discoverable only. */
|
|
2053
|
+
status: MarketStatus;
|
|
2054
|
+
currency: MarketCurrency;
|
|
2055
|
+
locale: {
|
|
2056
|
+
/** BCP 47 tag, e.g. `"en-KE"`. */
|
|
2057
|
+
default: string;
|
|
2058
|
+
/** IANA zone, e.g. `"Africa/Nairobi"`. */
|
|
2059
|
+
timezone: string;
|
|
2060
|
+
};
|
|
2061
|
+
phone: MarketPhone;
|
|
2062
|
+
/** What the market calls its first-level administrative region, e.g. County / Counties. */
|
|
2063
|
+
regions: {
|
|
2064
|
+
label: string;
|
|
2065
|
+
plural: string;
|
|
2066
|
+
};
|
|
2067
|
+
/** Buyer-visible payment rails, never a provider name. */
|
|
2068
|
+
payments: {
|
|
2069
|
+
method_types: string[];
|
|
2070
|
+
};
|
|
2071
|
+
/** Fulfilment methods offered in this market. */
|
|
2072
|
+
fulfilment_methods: string[];
|
|
2073
|
+
}
|
|
2074
|
+
interface MarketsResponse {
|
|
2075
|
+
version: 1;
|
|
2076
|
+
markets: Market[];
|
|
2077
|
+
updated_at: string;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2022
2080
|
interface VAZIOutfitItem {
|
|
2023
2081
|
id: string;
|
|
2024
2082
|
title: string;
|
|
@@ -2529,6 +2587,172 @@ interface DisputeListParams {
|
|
|
2529
2587
|
page?: number;
|
|
2530
2588
|
}
|
|
2531
2589
|
|
|
2590
|
+
/** IAM principal lifecycle state. */
|
|
2591
|
+
type IamUserStatus = 'active' | 'disabled';
|
|
2592
|
+
/** Organization lifecycle state. */
|
|
2593
|
+
type OrganizationStatus = 'active' | 'suspended';
|
|
2594
|
+
/** Organization category. */
|
|
2595
|
+
type OrganizationKind = 'product' | 'department' | 'team';
|
|
2596
|
+
/** Organization returned by organization-management and IAM profile endpoints. */
|
|
2597
|
+
interface Organization {
|
|
2598
|
+
id: string;
|
|
2599
|
+
display_id: string;
|
|
2600
|
+
alias: string;
|
|
2601
|
+
name: string;
|
|
2602
|
+
kind: OrganizationKind;
|
|
2603
|
+
status: OrganizationStatus;
|
|
2604
|
+
parent_id: string | null;
|
|
2605
|
+
created_at: string;
|
|
2606
|
+
updated_at: string;
|
|
2607
|
+
}
|
|
2608
|
+
/** Organization list row, including its IAM-user count. */
|
|
2609
|
+
interface OrganizationSummary extends Organization {
|
|
2610
|
+
iam_user_count: number;
|
|
2611
|
+
}
|
|
2612
|
+
/** Tokens issued for an IAM principal. */
|
|
2613
|
+
interface IamTokens {
|
|
2614
|
+
access_token: string;
|
|
2615
|
+
refresh_token: string;
|
|
2616
|
+
expires_in: number;
|
|
2617
|
+
principal_type: 'iam';
|
|
2618
|
+
org_id: string;
|
|
2619
|
+
second_factor_enrolled: boolean;
|
|
2620
|
+
}
|
|
2621
|
+
/** Start IAM sign-in with an organization ID or alias. */
|
|
2622
|
+
interface IamLoginInput {
|
|
2623
|
+
org: string;
|
|
2624
|
+
email: string;
|
|
2625
|
+
password: string;
|
|
2626
|
+
}
|
|
2627
|
+
/** Second-factor method offered during IAM sign-in. */
|
|
2628
|
+
interface IamLoginMethod {
|
|
2629
|
+
id: string;
|
|
2630
|
+
type: 'totp' | 'passkey';
|
|
2631
|
+
label: string | null;
|
|
2632
|
+
}
|
|
2633
|
+
/** Password accepted; finish sign-in with one of the returned methods. */
|
|
2634
|
+
interface IamTwoFactorRequired {
|
|
2635
|
+
requires_2fa: true;
|
|
2636
|
+
temp_token: string;
|
|
2637
|
+
methods: IamLoginMethod[];
|
|
2638
|
+
}
|
|
2639
|
+
/** Finish IAM sign-in with an authenticator or backup code. */
|
|
2640
|
+
interface VerifyIamTwoFactorInput {
|
|
2641
|
+
temp_token: string;
|
|
2642
|
+
code: string;
|
|
2643
|
+
method_id?: string;
|
|
2644
|
+
}
|
|
2645
|
+
/** Activate an invited IAM principal and choose its password. */
|
|
2646
|
+
interface ActivateIamUserInput {
|
|
2647
|
+
org: string;
|
|
2648
|
+
email: string;
|
|
2649
|
+
code: string;
|
|
2650
|
+
password: string;
|
|
2651
|
+
}
|
|
2652
|
+
/** Result of activating an IAM principal. */
|
|
2653
|
+
interface ActivateIamUserResult {
|
|
2654
|
+
ok: true;
|
|
2655
|
+
next_step: string;
|
|
2656
|
+
}
|
|
2657
|
+
/** Current IAM principal and its organization-scoped access. */
|
|
2658
|
+
interface IamProfile {
|
|
2659
|
+
id: string;
|
|
2660
|
+
email: string;
|
|
2661
|
+
display_name: string | null;
|
|
2662
|
+
status: IamUserStatus;
|
|
2663
|
+
organization: Organization;
|
|
2664
|
+
permissions: AdminPermission[];
|
|
2665
|
+
two_factor_methods_count: number;
|
|
2666
|
+
backup_codes_remaining: number;
|
|
2667
|
+
admin_enrolment_required: boolean;
|
|
2668
|
+
}
|
|
2669
|
+
/** Add an IAM authenticator or passkey. */
|
|
2670
|
+
interface AddIamTwoFactorMethodInput {
|
|
2671
|
+
type: 'totp' | 'passkey';
|
|
2672
|
+
label?: string;
|
|
2673
|
+
}
|
|
2674
|
+
/** TOTP enrollment response. */
|
|
2675
|
+
interface AddIamTotpResult {
|
|
2676
|
+
id: string;
|
|
2677
|
+
otpauth_uri: string;
|
|
2678
|
+
secret: string;
|
|
2679
|
+
}
|
|
2680
|
+
/** Passkey enrollment response. */
|
|
2681
|
+
interface AddIamPasskeyResult {
|
|
2682
|
+
method_id: string;
|
|
2683
|
+
options: PublicKeyCredentialCreationOptionsJSON;
|
|
2684
|
+
}
|
|
2685
|
+
/** IAM factor verification response. Backup codes appear only for the first factor. */
|
|
2686
|
+
interface VerifyIamMethodResult {
|
|
2687
|
+
ok: true;
|
|
2688
|
+
backup_codes?: string[];
|
|
2689
|
+
}
|
|
2690
|
+
/** Create an organization. */
|
|
2691
|
+
interface CreateOrganizationInput {
|
|
2692
|
+
alias: string;
|
|
2693
|
+
name: string;
|
|
2694
|
+
kind: OrganizationKind;
|
|
2695
|
+
parent_id?: string;
|
|
2696
|
+
}
|
|
2697
|
+
/** Update mutable organization fields. */
|
|
2698
|
+
interface UpdateOrganizationInput {
|
|
2699
|
+
name?: string;
|
|
2700
|
+
status?: OrganizationStatus;
|
|
2701
|
+
}
|
|
2702
|
+
/** IAM user shown in an organization's operator list. */
|
|
2703
|
+
interface IamUser {
|
|
2704
|
+
id: string;
|
|
2705
|
+
org_id?: string;
|
|
2706
|
+
email: string;
|
|
2707
|
+
display_name: string | null;
|
|
2708
|
+
status: IamUserStatus;
|
|
2709
|
+
activated: boolean;
|
|
2710
|
+
second_factor_enrolled?: boolean;
|
|
2711
|
+
permissions: AdminPermission[];
|
|
2712
|
+
last_active_at?: string | null;
|
|
2713
|
+
created_at?: string;
|
|
2714
|
+
}
|
|
2715
|
+
/** Create an IAM principal in an organization. */
|
|
2716
|
+
interface CreateIamUserInput {
|
|
2717
|
+
email: string;
|
|
2718
|
+
display_name?: string;
|
|
2719
|
+
permissions?: AdminPermission[];
|
|
2720
|
+
}
|
|
2721
|
+
/** One-time IAM activation credential returned to the provisioning administrator. */
|
|
2722
|
+
interface IamActivation {
|
|
2723
|
+
code: string;
|
|
2724
|
+
expires_at: string;
|
|
2725
|
+
org_id: string;
|
|
2726
|
+
org_alias: string | null;
|
|
2727
|
+
org_display_id: string;
|
|
2728
|
+
}
|
|
2729
|
+
/** Result of provisioning an IAM principal. */
|
|
2730
|
+
interface CreateIamUserResult {
|
|
2731
|
+
iam_user: IamUser;
|
|
2732
|
+
activation: IamActivation;
|
|
2733
|
+
}
|
|
2734
|
+
/** Result of listing one organization's IAM principals. */
|
|
2735
|
+
interface ListIamUsersResult {
|
|
2736
|
+
organization: Organization;
|
|
2737
|
+
iam_users: IamUser[];
|
|
2738
|
+
grantable_permissions: AdminPermission[];
|
|
2739
|
+
}
|
|
2740
|
+
/** Input to finish IAM passkey sign-in. */
|
|
2741
|
+
interface FinishIamPasskeyLoginInput {
|
|
2742
|
+
temp_token: string;
|
|
2743
|
+
credential: AuthenticationResponseJSON;
|
|
2744
|
+
}
|
|
2745
|
+
/** Input to finish IAM passkey enrollment. */
|
|
2746
|
+
type FinishIamPasskeyEnrollmentInput = RegistrationResponseJSON;
|
|
2747
|
+
/** IAM passkey assertion options. */
|
|
2748
|
+
interface IamPasskeyLoginOptions {
|
|
2749
|
+
options: PublicKeyCredentialRequestOptionsJSON;
|
|
2750
|
+
}
|
|
2751
|
+
/** IAM second-factor methods response. */
|
|
2752
|
+
interface IamMethodsResult {
|
|
2753
|
+
methods: TwoFactorMethod[];
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2532
2756
|
interface MitumbaClientConfig {
|
|
2533
2757
|
baseUrl: string;
|
|
2534
2758
|
debug?: boolean;
|
|
@@ -4087,6 +4311,146 @@ declare class WholesaleModule {
|
|
|
4087
4311
|
getAnalytics(period?: 'daily' | 'weekly' | 'monthly', options?: RequestOptions): Promise<WholesaleAnalytics>;
|
|
4088
4312
|
}
|
|
4089
4313
|
|
|
4314
|
+
/**
|
|
4315
|
+
* Organization-scoped operator identity and access.
|
|
4316
|
+
*
|
|
4317
|
+
* Root continues to use {@link AuthModule}. IAM users use this module for organization-aware sign-in,
|
|
4318
|
+
* activation, second factors and session lifecycle. Organization administration methods require a
|
|
4319
|
+
* root/global-operator session with the corresponding server-side permission.
|
|
4320
|
+
*/
|
|
4321
|
+
declare class IamModule {
|
|
4322
|
+
private readonly client;
|
|
4323
|
+
constructor(client: APIClient);
|
|
4324
|
+
/** Start IAM sign-in with an organization ID or alias, email and password. */
|
|
4325
|
+
login(input: IamLoginInput, options?: RequestOptions): Promise<IamTokens | IamTwoFactorRequired>;
|
|
4326
|
+
/** Finish IAM sign-in with a TOTP or one-time backup code. */
|
|
4327
|
+
verifyTwoFactor(input: VerifyIamTwoFactorInput, options?: RequestOptions): Promise<IamTokens>;
|
|
4328
|
+
/** Get WebAuthn assertion options for a pending IAM sign-in. */
|
|
4329
|
+
startPasskeyLogin(tempToken: string, options?: RequestOptions): Promise<IamPasskeyLoginOptions>;
|
|
4330
|
+
/** Finish IAM passkey sign-in and persist the returned IAM session. */
|
|
4331
|
+
finishPasskeyLogin(input: FinishIamPasskeyLoginInput, options?: RequestOptions): Promise<IamTokens>;
|
|
4332
|
+
/** Activate an invited IAM user and choose its password. */
|
|
4333
|
+
activate(input: ActivateIamUserInput, options?: RequestOptions): Promise<ActivateIamUserResult>;
|
|
4334
|
+
/** Rotate an IAM refresh token and persist the returned session. */
|
|
4335
|
+
refresh(refreshToken: string, options?: RequestOptions): Promise<IamTokens>;
|
|
4336
|
+
/** End the current IAM session and clear locally stored credentials. */
|
|
4337
|
+
logout(options?: RequestOptions): Promise<{
|
|
4338
|
+
ok: true;
|
|
4339
|
+
}>;
|
|
4340
|
+
/** Get the current IAM principal, organization and effective access state. */
|
|
4341
|
+
me(options?: RequestOptions): Promise<IamProfile>;
|
|
4342
|
+
/** List this IAM principal's enrolled second-factor methods. */
|
|
4343
|
+
listMethods(options?: RequestOptions): Promise<IamMethodsResult>;
|
|
4344
|
+
/** Begin adding an authenticator app or passkey. */
|
|
4345
|
+
addMethod(input: AddIamTwoFactorMethodInput, options?: RequestOptions): Promise<AddIamTotpResult | AddIamPasskeyResult>;
|
|
4346
|
+
/** Verify and enable a pending IAM authenticator method. */
|
|
4347
|
+
verifyMethod(methodId: string, code: string, options?: RequestOptions): Promise<VerifyIamMethodResult>;
|
|
4348
|
+
/** Finish and enable a pending IAM passkey method. */
|
|
4349
|
+
finishPasskeyEnrollment(methodId: string, credential: FinishIamPasskeyEnrollmentInput, options?: RequestOptions): Promise<VerifyIamMethodResult>;
|
|
4350
|
+
/** List organizations the current root/global operator may administer. */
|
|
4351
|
+
listOrganizations(options?: RequestOptions): Promise<{
|
|
4352
|
+
organizations: OrganizationSummary[];
|
|
4353
|
+
kinds: OrganizationKind[];
|
|
4354
|
+
}>;
|
|
4355
|
+
/** Create an organization. */
|
|
4356
|
+
createOrganization(input: CreateOrganizationInput, options?: RequestOptions): Promise<{
|
|
4357
|
+
organization: Organization;
|
|
4358
|
+
}>;
|
|
4359
|
+
/** Update an organization's name or lifecycle state. */
|
|
4360
|
+
updateOrganization(orgId: string, input: UpdateOrganizationInput, options?: RequestOptions): Promise<{
|
|
4361
|
+
organization: Organization;
|
|
4362
|
+
}>;
|
|
4363
|
+
/** List IAM users and grantable permissions in one organization. */
|
|
4364
|
+
listUsers(orgId: string, options?: RequestOptions): Promise<ListIamUsersResult>;
|
|
4365
|
+
/** Provision an IAM user. The activation code is returned once. */
|
|
4366
|
+
createUser(orgId: string, input: CreateIamUserInput, options?: RequestOptions): Promise<CreateIamUserResult>;
|
|
4367
|
+
/** Grant one organization-scoped permission to an IAM user. */
|
|
4368
|
+
grantPermission(orgId: string, iamUserId: string, permission: AdminPermission, options?: RequestOptions): Promise<{
|
|
4369
|
+
ok: true;
|
|
4370
|
+
permissions: AdminPermission[];
|
|
4371
|
+
}>;
|
|
4372
|
+
/** Revoke one permission and immediately end the IAM user's sessions. */
|
|
4373
|
+
revokePermission(orgId: string, iamUserId: string, permission: AdminPermission, options?: RequestOptions): Promise<{
|
|
4374
|
+
ok: true;
|
|
4375
|
+
revoked: boolean;
|
|
4376
|
+
permissions: AdminPermission[];
|
|
4377
|
+
}>;
|
|
4378
|
+
/** Enable or disable an IAM user. Disabling immediately ends its sessions. */
|
|
4379
|
+
setUserStatus(orgId: string, iamUserId: string, status: IamUserStatus, options?: RequestOptions): Promise<{
|
|
4380
|
+
ok: true;
|
|
4381
|
+
status: IamUserStatus;
|
|
4382
|
+
}>;
|
|
4383
|
+
/** Reissue the one-time activation credential for an unactivated IAM user. */
|
|
4384
|
+
reissueActivation(orgId: string, iamUserId: string, options?: RequestOptions): Promise<{
|
|
4385
|
+
activation: IamActivation;
|
|
4386
|
+
}>;
|
|
4387
|
+
}
|
|
4388
|
+
|
|
4389
|
+
declare class MarketsModule {
|
|
4390
|
+
private readonly client;
|
|
4391
|
+
constructor(client: APIClient);
|
|
4392
|
+
/**
|
|
4393
|
+
* List the platform's markets: the countries Mitumba operates in or plans to, with each
|
|
4394
|
+
* market's currency, locale, phone rules, region naming and payment rails.
|
|
4395
|
+
*
|
|
4396
|
+
* Public (no sign-in needed) and cacheable for a few minutes. Read this at runtime instead of
|
|
4397
|
+
* hardcoding a country, and pair it with the helpers exported from the package root
|
|
4398
|
+
* (`formatMoney`, `normalizePhone`, `findMarket`, ...).
|
|
4399
|
+
*/
|
|
4400
|
+
list(options?: RequestOptions): Promise<MarketsResponse>;
|
|
4401
|
+
}
|
|
4402
|
+
|
|
4403
|
+
/**
|
|
4404
|
+
* Market-aware formatting and validation. Everything here is driven by a `Market` read from
|
|
4405
|
+
* `sdk.markets.list()`: no country, currency or calling code is hardcoded, so adding a market
|
|
4406
|
+
* needs no client change.
|
|
4407
|
+
*
|
|
4408
|
+
* Amounts are WHOLE major units (1850 means KES 1,850), exactly as the platform stores catalogue
|
|
4409
|
+
* and order prices. Phone numbers are stored in E.164.
|
|
4410
|
+
*
|
|
4411
|
+
* Pure and isomorphic: no network, no Node or browser APIs beyond `Intl.NumberFormat` for
|
|
4412
|
+
* digit grouping.
|
|
4413
|
+
*/
|
|
4414
|
+
type CurrencyMarket = Pick<Market, 'currency'>;
|
|
4415
|
+
type PhoneMarket = Pick<Market, 'phone'>;
|
|
4416
|
+
/**
|
|
4417
|
+
* `1850` reads as `KES 1,850`. The currency code leads and a space follows it on purpose:
|
|
4418
|
+
* `KES1,850` misreads, and a symbol like `Ksh` is ambiguous across markets. A non-finite amount
|
|
4419
|
+
* renders as `KES —` rather than a believable-looking number.
|
|
4420
|
+
*/
|
|
4421
|
+
declare function formatMoney(amount: number, market: CurrencyMarket): string;
|
|
4422
|
+
/** The number alone, for rows that already say what currency they are in. */
|
|
4423
|
+
declare function formatAmount(amount: number, market: CurrencyMarket): string;
|
|
4424
|
+
/**
|
|
4425
|
+
* For dashboard figures where the magnitude matters more than the exact amount: `13500` reads as
|
|
4426
|
+
* `KES 13.5K`, `2400000` as `KES 2.4M`. Below 10,000 it falls back to the full amount.
|
|
4427
|
+
*/
|
|
4428
|
+
declare function formatMoneyCompact(amount: number, market: CurrencyMarket): string;
|
|
4429
|
+
/**
|
|
4430
|
+
* Turn what a person typed into E.164 for this market, or `null` if it cannot be a number here.
|
|
4431
|
+
* Accepts `0712 345 678`, `712345678`, `254712345678` and `+254 712-345-678`. A leading `+` is
|
|
4432
|
+
* taken literally: it must carry this market's calling code. Without one, a trunk `0`, then the
|
|
4433
|
+
* calling code, then a bare national number are tried in that order.
|
|
4434
|
+
*/
|
|
4435
|
+
declare function normalizePhone(input: string, market: PhoneMarket): string | null;
|
|
4436
|
+
/** True when `input` can be normalized to a number in this market. */
|
|
4437
|
+
declare function isValidPhone(input: string, market: PhoneMarket): boolean;
|
|
4438
|
+
/**
|
|
4439
|
+
* Reads an E.164 number in groups of three: `+254712345678` becomes `+254 712 345 678`. Anything
|
|
4440
|
+
* that is not a stored number for this market is returned untouched, because a half-formatted
|
|
4441
|
+
* number is worse than a raw one.
|
|
4442
|
+
*/
|
|
4443
|
+
declare function formatPhone(value: string, market: PhoneMarket): string;
|
|
4444
|
+
/**
|
|
4445
|
+
* Hides the middle of a number where it only needs to prove which number it is:
|
|
4446
|
+
* `+254712345678` becomes `+254 712 ••• 678`. Untouched if it is not a stored number here.
|
|
4447
|
+
*/
|
|
4448
|
+
declare function maskPhone(value: string, market: PhoneMarket): string;
|
|
4449
|
+
/** Find a market by UPPERCASE ISO 3166-1 alpha-2 code in a list read from `sdk.markets.list()`. */
|
|
4450
|
+
declare function findMarket(markets: readonly Market[], code: string): Market | undefined;
|
|
4451
|
+
/** Markets that can transact. A `coming_soon` market is for discovery only. */
|
|
4452
|
+
declare function activeMarkets(markets: readonly Market[]): Market[];
|
|
4453
|
+
|
|
4090
4454
|
/**
|
|
4091
4455
|
* Canonical go.mitumba.africa share URLs — the one place clients build listing, store and bale share links.
|
|
4092
4456
|
*
|
|
@@ -4132,6 +4496,8 @@ declare class MitumbaClient {
|
|
|
4132
4496
|
readonly uploads: UploadsModule;
|
|
4133
4497
|
readonly reports: ReportsModule;
|
|
4134
4498
|
readonly wholesale: WholesaleModule;
|
|
4499
|
+
readonly iam: IamModule;
|
|
4500
|
+
readonly markets: MarketsModule;
|
|
4135
4501
|
constructor(config: MitumbaClientConfig);
|
|
4136
4502
|
/**
|
|
4137
4503
|
* Set the access token for authenticated requests.
|
|
@@ -4163,4 +4529,4 @@ declare class MitumbaClient {
|
|
|
4163
4529
|
isAuthenticated(): Promise<boolean>;
|
|
4164
4530
|
}
|
|
4165
4531
|
|
|
4166
|
-
export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, type AddAddressInput, type AddDepotInput, type AddPaymentMethodInput, type Address, type AdminAuditEntry, type AdminAuthStrength, type AdminListingItem, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, 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 CartItem, CartModule, type Category, type ChangePasswordInput, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutStatus, type CheckoutStatusResponse, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, type CreateListingInput, type CreateMessageBlockInput, type CreateMessageBlockResult, type CreateMessageReportInput, type CreateMessageReportResult, type CreateOrderInput, type CreateReportInput, type CreateReviewInput, type CreateStoreInput, 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 EmailLoginInput, type EmailRegisterInput, type FollowedStore, type ForgotPasswordInput, IDBTokenStore, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type Jwk, type Jwks, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportReason, 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, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderEvent, type OrderHistoryParams, type OrderStatus, OrdersModule, PAYMENT_STATUSES, type PaginatedResponse, PayModule, type PaymentAttemptStatus, type PaymentMethod, type PaymentMethodType, type PaymentProvider, type PaymentStatus, type PaymentStatusResponse, type PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegisterInput, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type ResetPasswordInput, type ResolveDisputeInput, 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 SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type ShareUrlOptions, 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 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 VerifyOtpInput, type WebSocketCloseEventLike, type WebSocketFactory, type WebSocketLike, type WebSocketMessageEventLike, type WholesaleAnalytics, type WholesaleDepot, type WholesaleFeedParams, WholesaleModule, type WholesaleStore, type WishlistListing, WishlistsModule, baleShareUrl, createTokenStore, isConsentRequired, isMessagingAPIError, listingShareUrl, storeShareUrl };
|
|
4532
|
+
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 Address, type AdminAuditEntry, type AdminAuthStrength, type AdminListingItem, AdminModule, type AdminOperator, type AdminOrderDetail, type AdminOrderListItem, type AdminPayoutItem, type AdminPermission, type AdminPermissionDescription, type AdminRecoveryEvent, type AdminRecoveryRequest, 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 CartItem, CartModule, type Category, type ChangePasswordInput, type CheckoutNextAction, type CheckoutOrder, type CheckoutPaymentMethod, type CheckoutStatus, type CheckoutStatusResponse, type City, type CompleteOnboardingInput, type CompleteRecoveryResult, type Condition, type Conversation, type ConversationId, type ConversationSummary, type CreateAttachmentUploadInput, type CreateBaleInput, type CreateBaleOrderInput, 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 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 EmailLoginInput, type EmailRegisterInput, type FinishIamPasskeyEnrollmentInput, type FinishIamPasskeyLoginInput, type FollowedStore, type ForgotPasswordInput, IDBTokenStore, type IamActivation, type IamLoginInput, type IamLoginMethod, type IamMethodsResult, IamModule, type IamPasskeyLoginOptions, type IamProfile, type IamTokens, type IamTwoFactorRequired, type IamUser, type IamUserStatus, type InboxRealtimeEvent, type InitiateCheckoutInput, type InitiateCheckoutResponse, type Jwk, type Jwks, type KnownPaymentProvider, LISTING_STATUSES, type LegacyLinkResolution, type LegacyMessageArchiveSummary, type LegacyMessagePage, type LegacyMessageRecord, type LinkedAccount, type LinkedAccountProvider, type ListConversationsParams, type ListIamUsersResult, type ListThreadMessagesParams, type ListThreadsParams, type Listing, type ListingImage, type ListingStatus, type ListingsFeedParams, ListingsModule, type LoginInput, MailerModule, type MailerTemplate, type Market, type MarketCurrency, type MarketPhone, type MarketStatus, MarketsModule, type MarketsResponse, MemoryTokenStore, type Message, type MessageAttachment, type MessageAuthor, type MessageId, type MessagePage, type MessageReportReason, 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, MitumbaClient, type MitumbaClientConfig, type MpesaInput, type Notification, type NotificationPref, type NotificationType, NotificationsModule, type OAuthAuthorizeInput, type OAuthAuthorizeResult, type OAuthConsent, type OAuthConsentInput, type OAuthConsentRequired, type OAuthConsentRevokeResult, OAuthModule, type OAuthTokenExchangeInput, type OAuthTokenResult, ORDER_STATUSES, type OpenIdConfiguration, type OperatorPermissionGrant, type Order, type OrderEvent, type OrderHistoryParams, 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 PaystackInitResponse, type PaystackInput, type PendingPayoutApproval, type PhoneLoginInput, type PhoneRegisterInput, type PresignImageResponse, type ProviderId, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialRequestOptionsJSON, type RaiseDisputeInput, type ReadCursorResult, RealtimeProtocolError, RealtimeUnavailableError, type RecoveryStatus, type RecoveryStatusResult, type RegenerateBackupCodesResult, type RegisterInput, type RegistrationResponseJSON, ReportsModule, type RequestOptions, type RequestRecoveryInput, type RequestRecoveryResult, type ResetPasswordInput, type ResolveDisputeInput, 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 SendThreadMessageInput, type SendThreadMessageResult, type Session, SettingsModule, type ShareUrlOptions, 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 WholesaleStore, type WishlistListing, WishlistsModule, activeMarkets, baleShareUrl, createTokenStore, findMarket, formatAmount, formatMoney, formatMoneyCompact, formatPhone, isConsentRequired, isMessagingAPIError, isValidPhone, listingShareUrl, maskPhone, normalizePhone, storeShareUrl };
|