@numen-crypto/contract 0.11.0 → 0.12.1

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.cts CHANGED
@@ -22,6 +22,9 @@ declare const ERROR_CODE: {
22
22
  readonly TOTP_INVALID: "TOTP_INVALID";
23
23
  readonly CAPTCHA_REQUIRED: "CAPTCHA_REQUIRED";
24
24
  readonly CAPTCHA_INVALID: "CAPTCHA_INVALID";
25
+ readonly CONFIRMATION_CODE_REQUIRED: "CONFIRMATION_CODE_REQUIRED";
26
+ readonly CONFIRMATION_CODE_INVALID: "CONFIRMATION_CODE_INVALID";
27
+ readonly SAME_PASSWORD: "SAME_PASSWORD";
25
28
  readonly INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE";
26
29
  readonly PURCHASE_LIMIT_EXCEEDED: "PURCHASE_LIMIT_EXCEEDED";
27
30
  readonly PURCHASE_CAP_EXCEEDED: "PURCHASE_CAP_EXCEEDED";
@@ -2981,6 +2984,50 @@ declare namespace ConfirmEmailChangeCommand {
2981
2984
  }>;
2982
2985
  type Response = z.infer<typeof ResponseSchema>;
2983
2986
  }
2987
+ declare namespace RequestPasswordChangeCommand {
2988
+ const endpointDetails: EndpointDetails;
2989
+ const RequestSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2990
+ type Request = z.infer<typeof RequestSchema>;
2991
+ const ResponseSchema: z.ZodObject<{
2992
+ method: z.ZodEnum<["totp", "email"]>;
2993
+ sent: z.ZodBoolean;
2994
+ }, "strip", z.ZodTypeAny, {
2995
+ sent: boolean;
2996
+ method: "email" | "totp";
2997
+ }, {
2998
+ sent: boolean;
2999
+ method: "email" | "totp";
3000
+ }>;
3001
+ type Response = z.infer<typeof ResponseSchema>;
3002
+ }
3003
+ declare namespace ChangePasswordCommand {
3004
+ const endpointDetails: EndpointDetails;
3005
+ const RequestSchema: z.ZodObject<{
3006
+ currentPassword: z.ZodString;
3007
+ newPassword: z.ZodString;
3008
+ totp: z.ZodOptional<z.ZodString>;
3009
+ code: z.ZodOptional<z.ZodString>;
3010
+ }, "strip", z.ZodTypeAny, {
3011
+ currentPassword: string;
3012
+ newPassword: string;
3013
+ code?: string | undefined;
3014
+ totp?: string | undefined;
3015
+ }, {
3016
+ currentPassword: string;
3017
+ newPassword: string;
3018
+ code?: string | undefined;
3019
+ totp?: string | undefined;
3020
+ }>;
3021
+ type Request = z.infer<typeof RequestSchema>;
3022
+ const ResponseSchema: z.ZodObject<{
3023
+ changed: z.ZodBoolean;
3024
+ }, "strip", z.ZodTypeAny, {
3025
+ changed: boolean;
3026
+ }, {
3027
+ changed: boolean;
3028
+ }>;
3029
+ type Response = z.infer<typeof ResponseSchema>;
3030
+ }
2984
3031
  declare namespace DisableTotpCommand {
2985
3032
  const endpointDetails: EndpointDetails;
2986
3033
  const RequestSchema: z.ZodObject<{
@@ -4388,6 +4435,8 @@ declare const REST_API: {
4388
4435
  readonly SETTINGS: {
4389
4436
  readonly EMAIL_REQUEST: "/settings/email/request";
4390
4437
  readonly EMAIL_CONFIRM: "/settings/email/confirm";
4438
+ readonly PASSWORD_REQUEST: "/settings/password/request";
4439
+ readonly PASSWORD_CHANGE: "/settings/password";
4391
4440
  readonly TOTP_DISABLE: "/auth/totp/disable";
4392
4441
  readonly PROFILE: "/settings/profile";
4393
4442
  readonly AVATAR_UPLOAD_URL: "/settings/avatar/upload-url";
@@ -4422,4 +4471,4 @@ declare const REST_API: {
4422
4471
  declare const API_PREFIX = "/api";
4423
4472
  declare const API_VERSION = "v1";
4424
4473
 
4425
- export { API_PREFIX, API_VERSION, ASSET_DECIMALS, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, type AssetBalance, AssetBalanceSchema, type AssetSymbol, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, CaptchaPolicyCommand, type ChartPeriod, ChartPeriodSchema, type ChartPoint, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, type DailyBonusClaimResult, DailyBonusClaimResultSchema, type DailyBonusDay, DailyBonusDaySchema, type DailyBonusStatus, DailyBonusStatusSchema, type DepositAddress, DepositAddressCommand, DepositAddressSchema, type DepositEntry, DepositEntrySchema, type DepositStatus, DepositStatusSchema, type DepositableAsset, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, type EarningsOverview, EarningsOverviewSchema, type EndpointDetails, type ErrorCode, type ErrorResponse, ErrorResponseSchema, FUNDING_ASSET, ForgotPasswordCommand, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, type HttpMethod, type IncomeOverview, IncomeOverviewSchema, type IncomePeriod, IncomePeriodSchema, type Leaderboard, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardPeriod, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, type LinkProvider, LinkProviderSchema, LinkTelegramCommand, type LinkedAccount, LinkedAccountSchema, ListDepositsCommand, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, type MonthlyPricePoint, MonthlyPricePointSchema, NMN_PRICE_DECIMALS, type Notification, NotificationSchema, type NotificationType, NotificationTypeSchema, type Order, type OrderBook, type OrderBookLevel, OrderBookLevelSchema, OrderBookSchema, OrderSchema, type OrderSide, OrderSideSchema, type OrderStatus, OrderStatusSchema, type OrderType, OrderTypeSchema, type Package, PackageSchema, type PackageStatus, PackageStatusSchema, type PackagesOverview, PackagesOverviewSchema, PaginatedSchema, type PaginationQuery, PaginationQuerySchema, type PartnerAccrual, PartnerAccrualSchema, type PartnerLevel, PartnerLevelSchema, type PartnersOverview, PartnersOverviewSchema, type Period, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, type PublicTrade, PublicTradeSchema, REST_API, type RankDef, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestWithdrawalCommand, ResendVerificationCommand, ResetPasswordCommand, type SessionInfo, SessionInfoSchema, SetupTotpCommand, type Slide, type SlideButtonStyle, SlideButtonStyleSchema, type SlideKind, SlideKindSchema, type SlideLinkTarget, SlideLinkTargetSchema, SlideSchema, type SlidesResponse, SlidesResponseSchema, SwapCommand, type SwapSide, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, type ThreatLevel, ThreatLevelSchema, type TicketAttachment, type TicketAttachmentInput, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, type TicketAuthorType, TicketAuthorTypeSchema, TicketBodySchema, type TicketCategory, TicketCategorySchema, type TicketDetail, TicketDetailSchema, type TicketMessage, TicketMessageSchema, type TicketStatus, TicketStatusSchema, type TicketSummary, TicketSummarySchema, type TokenPrice, TokenPriceSchema, type TradeLimits, TradeLimitsSchema, type TradeResult, TradeResultSchema, type Transaction, TransactionSchema, type TransactionStatus, TransactionStatusSchema, type TransactionType, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, UpgradePackageCommand, type UserProfile, UserProfileSchema, type UserRank, UserRankSchema, type UserSettings, UserSettingsSchema, type UserStatus, UserStatusSchema, UuidSchema, VerifyEmailCommand, type WalletOverview, WalletOverviewSchema, type Withdrawal, WithdrawalSchema, type WithdrawalStatus, WithdrawalStatusSchema, assetDecimals, endpoint };
4474
+ export { API_PREFIX, API_VERSION, ASSET_DECIMALS, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, type AssetBalance, AssetBalanceSchema, type AssetSymbol, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, CaptchaPolicyCommand, ChangePasswordCommand, type ChartPeriod, ChartPeriodSchema, type ChartPoint, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, type DailyBonusClaimResult, DailyBonusClaimResultSchema, type DailyBonusDay, DailyBonusDaySchema, type DailyBonusStatus, DailyBonusStatusSchema, type DepositAddress, DepositAddressCommand, DepositAddressSchema, type DepositEntry, DepositEntrySchema, type DepositStatus, DepositStatusSchema, type DepositableAsset, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, type EarningsOverview, EarningsOverviewSchema, type EndpointDetails, type ErrorCode, type ErrorResponse, ErrorResponseSchema, FUNDING_ASSET, ForgotPasswordCommand, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, type HttpMethod, type IncomeOverview, IncomeOverviewSchema, type IncomePeriod, IncomePeriodSchema, type Leaderboard, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardPeriod, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, type LinkProvider, LinkProviderSchema, LinkTelegramCommand, type LinkedAccount, LinkedAccountSchema, ListDepositsCommand, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, type MonthlyPricePoint, MonthlyPricePointSchema, NMN_PRICE_DECIMALS, type Notification, NotificationSchema, type NotificationType, NotificationTypeSchema, type Order, type OrderBook, type OrderBookLevel, OrderBookLevelSchema, OrderBookSchema, OrderSchema, type OrderSide, OrderSideSchema, type OrderStatus, OrderStatusSchema, type OrderType, OrderTypeSchema, type Package, PackageSchema, type PackageStatus, PackageStatusSchema, type PackagesOverview, PackagesOverviewSchema, PaginatedSchema, type PaginationQuery, PaginationQuerySchema, type PartnerAccrual, PartnerAccrualSchema, type PartnerLevel, PartnerLevelSchema, type PartnersOverview, PartnersOverviewSchema, type Period, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, type PublicTrade, PublicTradeSchema, REST_API, type RankDef, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestPasswordChangeCommand, RequestWithdrawalCommand, ResendVerificationCommand, ResetPasswordCommand, type SessionInfo, SessionInfoSchema, SetupTotpCommand, type Slide, type SlideButtonStyle, SlideButtonStyleSchema, type SlideKind, SlideKindSchema, type SlideLinkTarget, SlideLinkTargetSchema, SlideSchema, type SlidesResponse, SlidesResponseSchema, SwapCommand, type SwapSide, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, type ThreatLevel, ThreatLevelSchema, type TicketAttachment, type TicketAttachmentInput, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, type TicketAuthorType, TicketAuthorTypeSchema, TicketBodySchema, type TicketCategory, TicketCategorySchema, type TicketDetail, TicketDetailSchema, type TicketMessage, TicketMessageSchema, type TicketStatus, TicketStatusSchema, type TicketSummary, TicketSummarySchema, type TokenPrice, TokenPriceSchema, type TradeLimits, TradeLimitsSchema, type TradeResult, TradeResultSchema, type Transaction, TransactionSchema, type TransactionStatus, TransactionStatusSchema, type TransactionType, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, UpgradePackageCommand, type UserProfile, UserProfileSchema, type UserRank, UserRankSchema, type UserSettings, UserSettingsSchema, type UserStatus, UserStatusSchema, UuidSchema, VerifyEmailCommand, type WalletOverview, WalletOverviewSchema, type Withdrawal, WithdrawalSchema, type WithdrawalStatus, WithdrawalStatusSchema, assetDecimals, endpoint };
package/dist/index.d.ts CHANGED
@@ -22,6 +22,9 @@ declare const ERROR_CODE: {
22
22
  readonly TOTP_INVALID: "TOTP_INVALID";
23
23
  readonly CAPTCHA_REQUIRED: "CAPTCHA_REQUIRED";
24
24
  readonly CAPTCHA_INVALID: "CAPTCHA_INVALID";
25
+ readonly CONFIRMATION_CODE_REQUIRED: "CONFIRMATION_CODE_REQUIRED";
26
+ readonly CONFIRMATION_CODE_INVALID: "CONFIRMATION_CODE_INVALID";
27
+ readonly SAME_PASSWORD: "SAME_PASSWORD";
25
28
  readonly INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE";
26
29
  readonly PURCHASE_LIMIT_EXCEEDED: "PURCHASE_LIMIT_EXCEEDED";
27
30
  readonly PURCHASE_CAP_EXCEEDED: "PURCHASE_CAP_EXCEEDED";
@@ -2981,6 +2984,50 @@ declare namespace ConfirmEmailChangeCommand {
2981
2984
  }>;
2982
2985
  type Response = z.infer<typeof ResponseSchema>;
2983
2986
  }
2987
+ declare namespace RequestPasswordChangeCommand {
2988
+ const endpointDetails: EndpointDetails;
2989
+ const RequestSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2990
+ type Request = z.infer<typeof RequestSchema>;
2991
+ const ResponseSchema: z.ZodObject<{
2992
+ method: z.ZodEnum<["totp", "email"]>;
2993
+ sent: z.ZodBoolean;
2994
+ }, "strip", z.ZodTypeAny, {
2995
+ sent: boolean;
2996
+ method: "email" | "totp";
2997
+ }, {
2998
+ sent: boolean;
2999
+ method: "email" | "totp";
3000
+ }>;
3001
+ type Response = z.infer<typeof ResponseSchema>;
3002
+ }
3003
+ declare namespace ChangePasswordCommand {
3004
+ const endpointDetails: EndpointDetails;
3005
+ const RequestSchema: z.ZodObject<{
3006
+ currentPassword: z.ZodString;
3007
+ newPassword: z.ZodString;
3008
+ totp: z.ZodOptional<z.ZodString>;
3009
+ code: z.ZodOptional<z.ZodString>;
3010
+ }, "strip", z.ZodTypeAny, {
3011
+ currentPassword: string;
3012
+ newPassword: string;
3013
+ code?: string | undefined;
3014
+ totp?: string | undefined;
3015
+ }, {
3016
+ currentPassword: string;
3017
+ newPassword: string;
3018
+ code?: string | undefined;
3019
+ totp?: string | undefined;
3020
+ }>;
3021
+ type Request = z.infer<typeof RequestSchema>;
3022
+ const ResponseSchema: z.ZodObject<{
3023
+ changed: z.ZodBoolean;
3024
+ }, "strip", z.ZodTypeAny, {
3025
+ changed: boolean;
3026
+ }, {
3027
+ changed: boolean;
3028
+ }>;
3029
+ type Response = z.infer<typeof ResponseSchema>;
3030
+ }
2984
3031
  declare namespace DisableTotpCommand {
2985
3032
  const endpointDetails: EndpointDetails;
2986
3033
  const RequestSchema: z.ZodObject<{
@@ -4388,6 +4435,8 @@ declare const REST_API: {
4388
4435
  readonly SETTINGS: {
4389
4436
  readonly EMAIL_REQUEST: "/settings/email/request";
4390
4437
  readonly EMAIL_CONFIRM: "/settings/email/confirm";
4438
+ readonly PASSWORD_REQUEST: "/settings/password/request";
4439
+ readonly PASSWORD_CHANGE: "/settings/password";
4391
4440
  readonly TOTP_DISABLE: "/auth/totp/disable";
4392
4441
  readonly PROFILE: "/settings/profile";
4393
4442
  readonly AVATAR_UPLOAD_URL: "/settings/avatar/upload-url";
@@ -4422,4 +4471,4 @@ declare const REST_API: {
4422
4471
  declare const API_PREFIX = "/api";
4423
4472
  declare const API_VERSION = "v1";
4424
4473
 
4425
- export { API_PREFIX, API_VERSION, ASSET_DECIMALS, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, type AssetBalance, AssetBalanceSchema, type AssetSymbol, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, CaptchaPolicyCommand, type ChartPeriod, ChartPeriodSchema, type ChartPoint, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, type DailyBonusClaimResult, DailyBonusClaimResultSchema, type DailyBonusDay, DailyBonusDaySchema, type DailyBonusStatus, DailyBonusStatusSchema, type DepositAddress, DepositAddressCommand, DepositAddressSchema, type DepositEntry, DepositEntrySchema, type DepositStatus, DepositStatusSchema, type DepositableAsset, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, type EarningsOverview, EarningsOverviewSchema, type EndpointDetails, type ErrorCode, type ErrorResponse, ErrorResponseSchema, FUNDING_ASSET, ForgotPasswordCommand, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, type HttpMethod, type IncomeOverview, IncomeOverviewSchema, type IncomePeriod, IncomePeriodSchema, type Leaderboard, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardPeriod, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, type LinkProvider, LinkProviderSchema, LinkTelegramCommand, type LinkedAccount, LinkedAccountSchema, ListDepositsCommand, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, type MonthlyPricePoint, MonthlyPricePointSchema, NMN_PRICE_DECIMALS, type Notification, NotificationSchema, type NotificationType, NotificationTypeSchema, type Order, type OrderBook, type OrderBookLevel, OrderBookLevelSchema, OrderBookSchema, OrderSchema, type OrderSide, OrderSideSchema, type OrderStatus, OrderStatusSchema, type OrderType, OrderTypeSchema, type Package, PackageSchema, type PackageStatus, PackageStatusSchema, type PackagesOverview, PackagesOverviewSchema, PaginatedSchema, type PaginationQuery, PaginationQuerySchema, type PartnerAccrual, PartnerAccrualSchema, type PartnerLevel, PartnerLevelSchema, type PartnersOverview, PartnersOverviewSchema, type Period, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, type PublicTrade, PublicTradeSchema, REST_API, type RankDef, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestWithdrawalCommand, ResendVerificationCommand, ResetPasswordCommand, type SessionInfo, SessionInfoSchema, SetupTotpCommand, type Slide, type SlideButtonStyle, SlideButtonStyleSchema, type SlideKind, SlideKindSchema, type SlideLinkTarget, SlideLinkTargetSchema, SlideSchema, type SlidesResponse, SlidesResponseSchema, SwapCommand, type SwapSide, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, type ThreatLevel, ThreatLevelSchema, type TicketAttachment, type TicketAttachmentInput, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, type TicketAuthorType, TicketAuthorTypeSchema, TicketBodySchema, type TicketCategory, TicketCategorySchema, type TicketDetail, TicketDetailSchema, type TicketMessage, TicketMessageSchema, type TicketStatus, TicketStatusSchema, type TicketSummary, TicketSummarySchema, type TokenPrice, TokenPriceSchema, type TradeLimits, TradeLimitsSchema, type TradeResult, TradeResultSchema, type Transaction, TransactionSchema, type TransactionStatus, TransactionStatusSchema, type TransactionType, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, UpgradePackageCommand, type UserProfile, UserProfileSchema, type UserRank, UserRankSchema, type UserSettings, UserSettingsSchema, type UserStatus, UserStatusSchema, UuidSchema, VerifyEmailCommand, type WalletOverview, WalletOverviewSchema, type Withdrawal, WithdrawalSchema, type WithdrawalStatus, WithdrawalStatusSchema, assetDecimals, endpoint };
4474
+ export { API_PREFIX, API_VERSION, ASSET_DECIMALS, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, type AssetBalance, AssetBalanceSchema, type AssetSymbol, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, CaptchaPolicyCommand, ChangePasswordCommand, type ChartPeriod, ChartPeriodSchema, type ChartPoint, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, type DailyBonusClaimResult, DailyBonusClaimResultSchema, type DailyBonusDay, DailyBonusDaySchema, type DailyBonusStatus, DailyBonusStatusSchema, type DepositAddress, DepositAddressCommand, DepositAddressSchema, type DepositEntry, DepositEntrySchema, type DepositStatus, DepositStatusSchema, type DepositableAsset, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, type EarningsOverview, EarningsOverviewSchema, type EndpointDetails, type ErrorCode, type ErrorResponse, ErrorResponseSchema, FUNDING_ASSET, ForgotPasswordCommand, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, type HttpMethod, type IncomeOverview, IncomeOverviewSchema, type IncomePeriod, IncomePeriodSchema, type Leaderboard, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardPeriod, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, type LinkProvider, LinkProviderSchema, LinkTelegramCommand, type LinkedAccount, LinkedAccountSchema, ListDepositsCommand, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, type MonthlyPricePoint, MonthlyPricePointSchema, NMN_PRICE_DECIMALS, type Notification, NotificationSchema, type NotificationType, NotificationTypeSchema, type Order, type OrderBook, type OrderBookLevel, OrderBookLevelSchema, OrderBookSchema, OrderSchema, type OrderSide, OrderSideSchema, type OrderStatus, OrderStatusSchema, type OrderType, OrderTypeSchema, type Package, PackageSchema, type PackageStatus, PackageStatusSchema, type PackagesOverview, PackagesOverviewSchema, PaginatedSchema, type PaginationQuery, PaginationQuerySchema, type PartnerAccrual, PartnerAccrualSchema, type PartnerLevel, PartnerLevelSchema, type PartnersOverview, PartnersOverviewSchema, type Period, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, type PublicTrade, PublicTradeSchema, REST_API, type RankDef, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestPasswordChangeCommand, RequestWithdrawalCommand, ResendVerificationCommand, ResetPasswordCommand, type SessionInfo, SessionInfoSchema, SetupTotpCommand, type Slide, type SlideButtonStyle, SlideButtonStyleSchema, type SlideKind, SlideKindSchema, type SlideLinkTarget, SlideLinkTargetSchema, SlideSchema, type SlidesResponse, SlidesResponseSchema, SwapCommand, type SwapSide, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, type ThreatLevel, ThreatLevelSchema, type TicketAttachment, type TicketAttachmentInput, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, type TicketAuthorType, TicketAuthorTypeSchema, TicketBodySchema, type TicketCategory, TicketCategorySchema, type TicketDetail, TicketDetailSchema, type TicketMessage, TicketMessageSchema, type TicketStatus, TicketStatusSchema, type TicketSummary, TicketSummarySchema, type TokenPrice, TokenPriceSchema, type TradeLimits, TradeLimitsSchema, type TradeResult, TradeResultSchema, type Transaction, TransactionSchema, type TransactionStatus, TransactionStatusSchema, type TransactionType, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, UpgradePackageCommand, type UserProfile, UserProfileSchema, type UserRank, UserRankSchema, type UserSettings, UserSettingsSchema, type UserStatus, UserStatusSchema, UuidSchema, VerifyEmailCommand, type WalletOverview, WalletOverviewSchema, type Withdrawal, WithdrawalSchema, type WithdrawalStatus, WithdrawalStatusSchema, assetDecimals, endpoint };
package/dist/index.js CHANGED
@@ -22,6 +22,9 @@ var ERROR_CODE = {
22
22
  TOTP_INVALID: "TOTP_INVALID",
23
23
  CAPTCHA_REQUIRED: "CAPTCHA_REQUIRED",
24
24
  CAPTCHA_INVALID: "CAPTCHA_INVALID",
25
+ CONFIRMATION_CODE_REQUIRED: "CONFIRMATION_CODE_REQUIRED",
26
+ CONFIRMATION_CODE_INVALID: "CONFIRMATION_CODE_INVALID",
27
+ SAME_PASSWORD: "SAME_PASSWORD",
25
28
  INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE",
26
29
  PURCHASE_LIMIT_EXCEEDED: "PURCHASE_LIMIT_EXCEEDED",
27
30
  PURCHASE_CAP_EXCEEDED: "PURCHASE_CAP_EXCEEDED",
@@ -475,7 +478,11 @@ var ResetPasswordCommand;
475
478
  var ThreatLevelSchema = z.enum(["calm", "elevated", "high", "attack"]);
476
479
  var CaptchaPolicyCommand;
477
480
  ((CaptchaPolicyCommand2) => {
478
- CaptchaPolicyCommand2.endpointDetails = endpoint("GET", "/auth/captcha-policy", "Whether the auth forms must show a captcha");
481
+ CaptchaPolicyCommand2.endpointDetails = endpoint(
482
+ "GET",
483
+ "/auth/captcha-policy",
484
+ "Whether the auth forms must show a captcha"
485
+ );
479
486
  CaptchaPolicyCommand2.ResponseSchema = z.object({
480
487
  provider: z.enum(["turnstile", "none"]),
481
488
  siteKey: z.string().nullable(),
@@ -769,6 +776,30 @@ var ConfirmEmailChangeCommand;
769
776
  });
770
777
  ConfirmEmailChangeCommand2.ResponseSchema = z.object({ email: z.string().email() });
771
778
  })(ConfirmEmailChangeCommand || (ConfirmEmailChangeCommand = {}));
779
+ var RequestPasswordChangeCommand;
780
+ ((RequestPasswordChangeCommand2) => {
781
+ RequestPasswordChangeCommand2.endpointDetails = endpoint(
782
+ "POST",
783
+ "/settings/password/request",
784
+ "Start a password change and learn which second factor is required"
785
+ );
786
+ RequestPasswordChangeCommand2.RequestSchema = z.object({});
787
+ RequestPasswordChangeCommand2.ResponseSchema = z.object({
788
+ method: z.enum(["totp", "email"]),
789
+ sent: z.boolean()
790
+ });
791
+ })(RequestPasswordChangeCommand || (RequestPasswordChangeCommand = {}));
792
+ var ChangePasswordCommand;
793
+ ((ChangePasswordCommand2) => {
794
+ ChangePasswordCommand2.endpointDetails = endpoint("POST", "/settings/password", "Change the password of the signed-in user");
795
+ ChangePasswordCommand2.RequestSchema = z.object({
796
+ currentPassword: z.string().min(8).max(128),
797
+ newPassword: z.string().min(8).max(128),
798
+ totp: z.string().regex(/^\d{6}$/).optional(),
799
+ code: z.string().regex(/^\d{6}$/).optional()
800
+ });
801
+ ChangePasswordCommand2.ResponseSchema = z.object({ changed: z.boolean() });
802
+ })(ChangePasswordCommand || (ChangePasswordCommand = {}));
772
803
  var DisableTotpCommand;
773
804
  ((DisableTotpCommand2) => {
774
805
  DisableTotpCommand2.endpointDetails = endpoint("POST", "/auth/totp/disable", "Disable TOTP two-factor auth");
@@ -1043,6 +1074,8 @@ var REST_API = {
1043
1074
  SETTINGS: {
1044
1075
  EMAIL_REQUEST: "/settings/email/request",
1045
1076
  EMAIL_CONFIRM: "/settings/email/confirm",
1077
+ PASSWORD_REQUEST: "/settings/password/request",
1078
+ PASSWORD_CHANGE: "/settings/password",
1046
1079
  TOTP_DISABLE: "/auth/totp/disable",
1047
1080
  PROFILE: "/settings/profile",
1048
1081
  AVATAR_UPLOAD_URL: "/settings/avatar/upload-url",
@@ -1077,6 +1110,6 @@ var REST_API = {
1077
1110
  var API_PREFIX = "/api";
1078
1111
  var API_VERSION = "v1";
1079
1112
 
1080
- export { API_PREFIX, API_VERSION, ASSET_DECIMALS, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, AssetBalanceSchema, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, CaptchaPolicyCommand, ChartPeriodSchema, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, DailyBonusClaimResultSchema, DailyBonusDaySchema, DailyBonusStatusSchema, DepositAddressCommand, DepositAddressSchema, DepositEntrySchema, DepositStatusSchema, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, EarningsOverviewSchema, ErrorResponseSchema, FUNDING_ASSET, ForgotPasswordCommand, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, IncomeOverviewSchema, IncomePeriodSchema, LeaderboardEntrySchema, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, LinkProviderSchema, LinkTelegramCommand, LinkedAccountSchema, ListDepositsCommand, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, MonthlyPricePointSchema, NMN_PRICE_DECIMALS, NotificationSchema, NotificationTypeSchema, OrderBookLevelSchema, OrderBookSchema, OrderSchema, OrderSideSchema, OrderStatusSchema, OrderTypeSchema, PackageSchema, PackageStatusSchema, PackagesOverviewSchema, PaginatedSchema, PaginationQuerySchema, PartnerAccrualSchema, PartnerLevelSchema, PartnersOverviewSchema, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, PublicTradeSchema, REST_API, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestWithdrawalCommand, ResendVerificationCommand, ResetPasswordCommand, SessionInfoSchema, SetupTotpCommand, SlideButtonStyleSchema, SlideKindSchema, SlideLinkTargetSchema, SlideSchema, SlidesResponseSchema, SwapCommand, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, ThreatLevelSchema, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, TicketAuthorTypeSchema, TicketBodySchema, TicketCategorySchema, TicketDetailSchema, TicketMessageSchema, TicketStatusSchema, TicketSummarySchema, TokenPriceSchema, TradeLimitsSchema, TradeResultSchema, TransactionSchema, TransactionStatusSchema, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, UpgradePackageCommand, UserProfileSchema, UserRankSchema, UserSettingsSchema, UserStatusSchema, UuidSchema, VerifyEmailCommand, WalletOverviewSchema, WithdrawalSchema, WithdrawalStatusSchema, assetDecimals, endpoint };
1113
+ export { API_PREFIX, API_VERSION, ASSET_DECIMALS, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, AssetBalanceSchema, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, CaptchaPolicyCommand, ChangePasswordCommand, ChartPeriodSchema, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, DailyBonusClaimResultSchema, DailyBonusDaySchema, DailyBonusStatusSchema, DepositAddressCommand, DepositAddressSchema, DepositEntrySchema, DepositStatusSchema, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, EarningsOverviewSchema, ErrorResponseSchema, FUNDING_ASSET, ForgotPasswordCommand, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, IncomeOverviewSchema, IncomePeriodSchema, LeaderboardEntrySchema, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, LinkProviderSchema, LinkTelegramCommand, LinkedAccountSchema, ListDepositsCommand, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, MonthlyPricePointSchema, NMN_PRICE_DECIMALS, NotificationSchema, NotificationTypeSchema, OrderBookLevelSchema, OrderBookSchema, OrderSchema, OrderSideSchema, OrderStatusSchema, OrderTypeSchema, PackageSchema, PackageStatusSchema, PackagesOverviewSchema, PaginatedSchema, PaginationQuerySchema, PartnerAccrualSchema, PartnerLevelSchema, PartnersOverviewSchema, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, PublicTradeSchema, REST_API, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestPasswordChangeCommand, RequestWithdrawalCommand, ResendVerificationCommand, ResetPasswordCommand, SessionInfoSchema, SetupTotpCommand, SlideButtonStyleSchema, SlideKindSchema, SlideLinkTargetSchema, SlideSchema, SlidesResponseSchema, SwapCommand, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, ThreatLevelSchema, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, TicketAuthorTypeSchema, TicketBodySchema, TicketCategorySchema, TicketDetailSchema, TicketMessageSchema, TicketStatusSchema, TicketSummarySchema, TokenPriceSchema, TradeLimitsSchema, TradeResultSchema, TransactionSchema, TransactionStatusSchema, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, UpgradePackageCommand, UserProfileSchema, UserRankSchema, UserSettingsSchema, UserStatusSchema, UuidSchema, VerifyEmailCommand, WalletOverviewSchema, WithdrawalSchema, WithdrawalStatusSchema, assetDecimals, endpoint };
1081
1114
  //# sourceMappingURL=index.js.map
1082
1115
  //# sourceMappingURL=index.js.map