@mitumba/sdk 1.22.0 → 1.24.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 +64 -1
- package/dist/index.d.ts +64 -1
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -74,10 +74,38 @@ interface CompleteOnboardingInput {
|
|
|
74
74
|
interface TwoFactorRequired {
|
|
75
75
|
requires_2fa: true;
|
|
76
76
|
temp_token: string;
|
|
77
|
+
methods?: {
|
|
78
|
+
id: string;
|
|
79
|
+
type: TwoFactorMethodType;
|
|
80
|
+
label: string | null;
|
|
81
|
+
}[];
|
|
77
82
|
}
|
|
78
83
|
interface Verify2FAInput {
|
|
79
84
|
temp_token: string;
|
|
80
85
|
code: string;
|
|
86
|
+
method_id?: string;
|
|
87
|
+
}
|
|
88
|
+
declare const TWO_FACTOR_METHOD_TYPES: readonly ["totp", "sms", "email"];
|
|
89
|
+
type TwoFactorMethodType = typeof TWO_FACTOR_METHOD_TYPES[number];
|
|
90
|
+
interface TwoFactorMethod {
|
|
91
|
+
id: string;
|
|
92
|
+
type: TwoFactorMethodType;
|
|
93
|
+
label: string | null;
|
|
94
|
+
enabled: boolean;
|
|
95
|
+
is_primary: boolean;
|
|
96
|
+
verified_at: string | null;
|
|
97
|
+
created_at: string;
|
|
98
|
+
last_used_at: string | null;
|
|
99
|
+
}
|
|
100
|
+
interface Add2FAMethodInput {
|
|
101
|
+
type: TwoFactorMethodType;
|
|
102
|
+
label?: string;
|
|
103
|
+
target?: string;
|
|
104
|
+
}
|
|
105
|
+
interface Add2FAMethodResult {
|
|
106
|
+
id: string;
|
|
107
|
+
otpauth_uri?: string;
|
|
108
|
+
secret?: string;
|
|
81
109
|
}
|
|
82
110
|
interface BecomeSellerInput {
|
|
83
111
|
seller_type: 'individual' | 'business';
|
|
@@ -104,6 +132,8 @@ interface UserProfile {
|
|
|
104
132
|
email_verified: boolean;
|
|
105
133
|
totp_enabled: boolean;
|
|
106
134
|
totp_configured: boolean;
|
|
135
|
+
two_factor_methods_count?: number;
|
|
136
|
+
sms_2fa_available?: boolean;
|
|
107
137
|
is_active: boolean;
|
|
108
138
|
created_at: string;
|
|
109
139
|
roles: string[];
|
|
@@ -1063,6 +1093,16 @@ declare class AuthModule {
|
|
|
1063
1093
|
* Verify 2FA code during login. Tokens are auto-persisted.
|
|
1064
1094
|
*/
|
|
1065
1095
|
verify2FA(input: Verify2FAInput, options?: RequestOptions): Promise<AuthTokens>;
|
|
1096
|
+
/**
|
|
1097
|
+
* Send a 2FA challenge during login (for SMS/email methods).
|
|
1098
|
+
* Call before verify2FA when the user picks a non-TOTP method.
|
|
1099
|
+
*/
|
|
1100
|
+
sendLogin2FAChallenge(input: {
|
|
1101
|
+
temp_token: string;
|
|
1102
|
+
method_id: string;
|
|
1103
|
+
}, options?: RequestOptions): Promise<{
|
|
1104
|
+
ok: true;
|
|
1105
|
+
}>;
|
|
1066
1106
|
/**
|
|
1067
1107
|
* Send a verification code to the user's email.
|
|
1068
1108
|
*/
|
|
@@ -1651,6 +1691,29 @@ declare class SettingsModule {
|
|
|
1651
1691
|
delete2FA(code: string, options?: RequestOptions): Promise<{
|
|
1652
1692
|
ok: true;
|
|
1653
1693
|
}>;
|
|
1694
|
+
list2FAMethods(options?: RequestOptions): Promise<{
|
|
1695
|
+
methods: TwoFactorMethod[];
|
|
1696
|
+
}>;
|
|
1697
|
+
add2FAMethod(input: Add2FAMethodInput, options?: RequestOptions): Promise<Add2FAMethodResult>;
|
|
1698
|
+
verify2FAMethod(id: string, code: string, options?: RequestOptions): Promise<{
|
|
1699
|
+
ok: true;
|
|
1700
|
+
backup_codes?: string[];
|
|
1701
|
+
}>;
|
|
1702
|
+
enable2FAMethod(id: string, code: string, options?: RequestOptions): Promise<{
|
|
1703
|
+
ok: true;
|
|
1704
|
+
}>;
|
|
1705
|
+
disable2FAMethod(id: string, code: string, options?: RequestOptions): Promise<{
|
|
1706
|
+
ok: true;
|
|
1707
|
+
}>;
|
|
1708
|
+
delete2FAMethod(id: string, code: string, options?: RequestOptions): Promise<{
|
|
1709
|
+
ok: true;
|
|
1710
|
+
}>;
|
|
1711
|
+
setPrimary2FAMethod(id: string, options?: RequestOptions): Promise<{
|
|
1712
|
+
ok: true;
|
|
1713
|
+
}>;
|
|
1714
|
+
challenge2FAMethod(id: string, options?: RequestOptions): Promise<{
|
|
1715
|
+
ok: true;
|
|
1716
|
+
}>;
|
|
1654
1717
|
}
|
|
1655
1718
|
|
|
1656
1719
|
declare class MailerModule {
|
|
@@ -2000,4 +2063,4 @@ declare class MitumbaClient {
|
|
|
2000
2063
|
isAuthenticated(): Promise<boolean>;
|
|
2001
2064
|
}
|
|
2002
2065
|
|
|
2003
|
-
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 FollowedStore, 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 };
|
|
2066
|
+
export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, 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 FollowedStore, 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, TWO_FACTOR_METHOD_TYPES, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateListingInput, type UpdateProfileInput, type UpdateStoreInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WishlistListing, WishlistsModule, createTokenStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -74,10 +74,38 @@ interface CompleteOnboardingInput {
|
|
|
74
74
|
interface TwoFactorRequired {
|
|
75
75
|
requires_2fa: true;
|
|
76
76
|
temp_token: string;
|
|
77
|
+
methods?: {
|
|
78
|
+
id: string;
|
|
79
|
+
type: TwoFactorMethodType;
|
|
80
|
+
label: string | null;
|
|
81
|
+
}[];
|
|
77
82
|
}
|
|
78
83
|
interface Verify2FAInput {
|
|
79
84
|
temp_token: string;
|
|
80
85
|
code: string;
|
|
86
|
+
method_id?: string;
|
|
87
|
+
}
|
|
88
|
+
declare const TWO_FACTOR_METHOD_TYPES: readonly ["totp", "sms", "email"];
|
|
89
|
+
type TwoFactorMethodType = typeof TWO_FACTOR_METHOD_TYPES[number];
|
|
90
|
+
interface TwoFactorMethod {
|
|
91
|
+
id: string;
|
|
92
|
+
type: TwoFactorMethodType;
|
|
93
|
+
label: string | null;
|
|
94
|
+
enabled: boolean;
|
|
95
|
+
is_primary: boolean;
|
|
96
|
+
verified_at: string | null;
|
|
97
|
+
created_at: string;
|
|
98
|
+
last_used_at: string | null;
|
|
99
|
+
}
|
|
100
|
+
interface Add2FAMethodInput {
|
|
101
|
+
type: TwoFactorMethodType;
|
|
102
|
+
label?: string;
|
|
103
|
+
target?: string;
|
|
104
|
+
}
|
|
105
|
+
interface Add2FAMethodResult {
|
|
106
|
+
id: string;
|
|
107
|
+
otpauth_uri?: string;
|
|
108
|
+
secret?: string;
|
|
81
109
|
}
|
|
82
110
|
interface BecomeSellerInput {
|
|
83
111
|
seller_type: 'individual' | 'business';
|
|
@@ -104,6 +132,8 @@ interface UserProfile {
|
|
|
104
132
|
email_verified: boolean;
|
|
105
133
|
totp_enabled: boolean;
|
|
106
134
|
totp_configured: boolean;
|
|
135
|
+
two_factor_methods_count?: number;
|
|
136
|
+
sms_2fa_available?: boolean;
|
|
107
137
|
is_active: boolean;
|
|
108
138
|
created_at: string;
|
|
109
139
|
roles: string[];
|
|
@@ -1063,6 +1093,16 @@ declare class AuthModule {
|
|
|
1063
1093
|
* Verify 2FA code during login. Tokens are auto-persisted.
|
|
1064
1094
|
*/
|
|
1065
1095
|
verify2FA(input: Verify2FAInput, options?: RequestOptions): Promise<AuthTokens>;
|
|
1096
|
+
/**
|
|
1097
|
+
* Send a 2FA challenge during login (for SMS/email methods).
|
|
1098
|
+
* Call before verify2FA when the user picks a non-TOTP method.
|
|
1099
|
+
*/
|
|
1100
|
+
sendLogin2FAChallenge(input: {
|
|
1101
|
+
temp_token: string;
|
|
1102
|
+
method_id: string;
|
|
1103
|
+
}, options?: RequestOptions): Promise<{
|
|
1104
|
+
ok: true;
|
|
1105
|
+
}>;
|
|
1066
1106
|
/**
|
|
1067
1107
|
* Send a verification code to the user's email.
|
|
1068
1108
|
*/
|
|
@@ -1651,6 +1691,29 @@ declare class SettingsModule {
|
|
|
1651
1691
|
delete2FA(code: string, options?: RequestOptions): Promise<{
|
|
1652
1692
|
ok: true;
|
|
1653
1693
|
}>;
|
|
1694
|
+
list2FAMethods(options?: RequestOptions): Promise<{
|
|
1695
|
+
methods: TwoFactorMethod[];
|
|
1696
|
+
}>;
|
|
1697
|
+
add2FAMethod(input: Add2FAMethodInput, options?: RequestOptions): Promise<Add2FAMethodResult>;
|
|
1698
|
+
verify2FAMethod(id: string, code: string, options?: RequestOptions): Promise<{
|
|
1699
|
+
ok: true;
|
|
1700
|
+
backup_codes?: string[];
|
|
1701
|
+
}>;
|
|
1702
|
+
enable2FAMethod(id: string, code: string, options?: RequestOptions): Promise<{
|
|
1703
|
+
ok: true;
|
|
1704
|
+
}>;
|
|
1705
|
+
disable2FAMethod(id: string, code: string, options?: RequestOptions): Promise<{
|
|
1706
|
+
ok: true;
|
|
1707
|
+
}>;
|
|
1708
|
+
delete2FAMethod(id: string, code: string, options?: RequestOptions): Promise<{
|
|
1709
|
+
ok: true;
|
|
1710
|
+
}>;
|
|
1711
|
+
setPrimary2FAMethod(id: string, options?: RequestOptions): Promise<{
|
|
1712
|
+
ok: true;
|
|
1713
|
+
}>;
|
|
1714
|
+
challenge2FAMethod(id: string, options?: RequestOptions): Promise<{
|
|
1715
|
+
ok: true;
|
|
1716
|
+
}>;
|
|
1654
1717
|
}
|
|
1655
1718
|
|
|
1656
1719
|
declare class MailerModule {
|
|
@@ -2000,4 +2063,4 @@ declare class MitumbaClient {
|
|
|
2000
2063
|
isAuthenticated(): Promise<boolean>;
|
|
2001
2064
|
}
|
|
2002
2065
|
|
|
2003
|
-
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 FollowedStore, 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 };
|
|
2066
|
+
export { APIClient, APIError, type APIErrorResponse, type Add2FAMethodInput, type Add2FAMethodResult, 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 FollowedStore, 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, TWO_FACTOR_METHOD_TYPES, type TokenStore, type TransitionOrderInput, type TrendingTerm, type TwoFactorMethod, type TwoFactorMethodType, type TwoFactorRequired, type UpdateBusinessInput, type UpdateListingInput, type UpdateProfileInput, type UpdateStoreInput, UploadsModule, type UserProfile, type VAZIOutfit, type VAZIOutfitDetail, type VAZIOutfitDetailItem, type VAZIOutfitItem, type VaziFeedParams, type VaziFeedResponse, VaziModule, type Verify2FAInput, type VerifyOtpInput, type WishlistListing, WishlistsModule, createTokenStore };
|
package/dist/index.js
CHANGED
|
@@ -411,6 +411,13 @@ var AuthModule = class {
|
|
|
411
411
|
await this.client.setSession(result);
|
|
412
412
|
return result;
|
|
413
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* Send a 2FA challenge during login (for SMS/email methods).
|
|
416
|
+
* Call before verify2FA when the user picks a non-TOTP method.
|
|
417
|
+
*/
|
|
418
|
+
async sendLogin2FAChallenge(input, options) {
|
|
419
|
+
return this.client.post("/auth/2fa/login/challenge", input, options);
|
|
420
|
+
}
|
|
414
421
|
/**
|
|
415
422
|
* Send a verification code to the user's email.
|
|
416
423
|
*/
|
|
@@ -1108,6 +1115,31 @@ var SettingsModule = class {
|
|
|
1108
1115
|
async delete2FA(code, options) {
|
|
1109
1116
|
return this.client.delete("/auth/2fa", { code }, options);
|
|
1110
1117
|
}
|
|
1118
|
+
// ── Multi-Method 2FA ──
|
|
1119
|
+
async list2FAMethods(options) {
|
|
1120
|
+
return this.client.get("/auth/2fa/methods", void 0, options);
|
|
1121
|
+
}
|
|
1122
|
+
async add2FAMethod(input, options) {
|
|
1123
|
+
return this.client.post("/auth/2fa/methods", input, options);
|
|
1124
|
+
}
|
|
1125
|
+
async verify2FAMethod(id, code, options) {
|
|
1126
|
+
return this.client.post(`/auth/2fa/methods/${id}/verify`, { code }, options);
|
|
1127
|
+
}
|
|
1128
|
+
async enable2FAMethod(id, code, options) {
|
|
1129
|
+
return this.client.post(`/auth/2fa/methods/${id}/enable`, { code }, options);
|
|
1130
|
+
}
|
|
1131
|
+
async disable2FAMethod(id, code, options) {
|
|
1132
|
+
return this.client.post(`/auth/2fa/methods/${id}/disable`, { code }, options);
|
|
1133
|
+
}
|
|
1134
|
+
async delete2FAMethod(id, code, options) {
|
|
1135
|
+
return this.client.delete(`/auth/2fa/methods/${id}`, { code }, options);
|
|
1136
|
+
}
|
|
1137
|
+
async setPrimary2FAMethod(id, options) {
|
|
1138
|
+
return this.client.post(`/auth/2fa/methods/${id}/primary`, void 0, options);
|
|
1139
|
+
}
|
|
1140
|
+
async challenge2FAMethod(id, options) {
|
|
1141
|
+
return this.client.post(`/auth/2fa/methods/${id}/challenge`, void 0, options);
|
|
1142
|
+
}
|
|
1111
1143
|
};
|
|
1112
1144
|
|
|
1113
1145
|
// src/modules/mailer.ts
|
|
@@ -1353,6 +1385,9 @@ var ReportsModule = class {
|
|
|
1353
1385
|
}
|
|
1354
1386
|
};
|
|
1355
1387
|
|
|
1388
|
+
// src/types/auth.ts
|
|
1389
|
+
var TWO_FACTOR_METHOD_TYPES = ["totp", "sms", "email"];
|
|
1390
|
+
|
|
1356
1391
|
// src/types/listings.ts
|
|
1357
1392
|
var CONDITIONS = ["new", "like_new", "good", "fair"];
|
|
1358
1393
|
var LISTING_STATUSES = ["draft", "active", "sold", "removed"];
|
|
@@ -1489,6 +1524,7 @@ exports.ReviewsModule = ReviewsModule;
|
|
|
1489
1524
|
exports.SearchModule = SearchModule;
|
|
1490
1525
|
exports.SettingsModule = SettingsModule;
|
|
1491
1526
|
exports.StoresModule = StoresModule;
|
|
1527
|
+
exports.TWO_FACTOR_METHOD_TYPES = TWO_FACTOR_METHOD_TYPES;
|
|
1492
1528
|
exports.UploadsModule = UploadsModule;
|
|
1493
1529
|
exports.VaziModule = VaziModule;
|
|
1494
1530
|
exports.WishlistsModule = WishlistsModule;
|