@juhuu/sdk-ts 1.3.4 → 1.3.6

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
@@ -19,6 +19,8 @@ type ExtractType<T> = T extends {
19
19
  } ? U : never;
20
20
  type UserGroup = "retailer" | "engineer" | "operator" | "user";
21
21
  type Frontend = "dashboard" | "app";
22
+ type AuthMethodType = "password" | "email-otp" | "phone-otp" | "google-oauth" | "apple-oauth";
23
+ type PhoneCountryCode = "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KZ" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "KN" | "LC" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UY" | "UZ" | "VU" | "VA" | "VE" | "VN" | "VG" | "VI" | "YE" | "ZM" | "ZW";
22
24
  type FlowExecutionEnvironment = "dashboard" | "app" | "backend" | "controlKit";
23
25
  type ApiKeyStatus = "enabled" | "disabled";
24
26
  type FlowStatus = "error" | "ready";
@@ -1754,6 +1756,28 @@ declare class AchievementsService extends Service {
1754
1756
  delete(params: JUHUU.Achievement.Delete.Params, options?: JUHUU.Achievement.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Achievement.Delete.Response>>;
1755
1757
  }
1756
1758
 
1759
+ declare class AuthService extends Service {
1760
+ constructor(config: JUHUU.SetupConfig);
1761
+ registerEmailPassword(AuthRegisterEmailPasswordParams: JUHUU.User.RegisterEmailPassword.Params, AuthRegisterEmailPasswordOptions?: JUHUU.User.RegisterEmailPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RegisterEmailPassword.Response>>;
1762
+ loginEmailPassword(AuthLoginEmailPasswordParams: JUHUU.User.LoginEmailPassword.Params, AuthLoginEmailPasswordOptions?: JUHUU.User.LoginEmailPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.LoginEmailPassword.Response>>;
1763
+ refreshAccessToken(AuthRefreshAccessTokenParams: JUHUU.User.RefreshAccessToken.Params, AuthRefreshAccessTokenOptions?: JUHUU.User.RefreshAccessToken.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RefreshAccessToken.Response>>;
1764
+ identify(AuthIdentifyParams: JUHUU.User.Identify.Params, AuthIdentifyOptions?: JUHUU.User.Identify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Identify.Response>>;
1765
+ otpRequest(AuthOtpRequestParams: JUHUU.User.OtpRequest.Params, AuthOtpRequestOptions?: JUHUU.User.OtpRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.OtpRequest.Response>>;
1766
+ otpVerify(AuthOtpVerifyParams: JUHUU.User.OtpVerify.Params, AuthOtpVerifyOptions?: JUHUU.User.OtpVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.OtpVerify.Response>>;
1767
+ setPassword(AuthSetPasswordParams: JUHUU.User.SetPassword.Params, AuthSetPasswordOptions?: JUHUU.User.SetPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.SetPassword.Response>>;
1768
+ removePassword(AuthRemovePasswordParams: JUHUU.User.RemovePassword.Params, AuthRemovePasswordOptions?: JUHUU.User.RemovePassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemovePassword.Response>>;
1769
+ removeGoogle(AuthRemoveGoogleParams: JUHUU.User.RemoveGoogle.Params, AuthRemoveGoogleOptions?: JUHUU.User.RemoveGoogle.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemoveGoogle.Response>>;
1770
+ removeApple(AuthRemoveAppleParams: JUHUU.User.RemoveApple.Params, AuthRemoveAppleOptions?: JUHUU.User.RemoveApple.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemoveApple.Response>>;
1771
+ changePhoneRequest(AuthChangePhoneRequestParams: JUHUU.User.ChangePhoneRequest.Params, AuthChangePhoneRequestOptions?: JUHUU.User.ChangePhoneRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangePhoneRequest.Response>>;
1772
+ changePhoneVerify(AuthChangePhoneVerifyParams: JUHUU.User.ChangePhoneVerify.Params, AuthChangePhoneVerifyOptions?: JUHUU.User.ChangePhoneVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangePhoneVerify.Response>>;
1773
+ removePhone(AuthRemovePhoneParams: JUHUU.User.RemovePhone.Params, AuthRemovePhoneOptions?: JUHUU.User.RemovePhone.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemovePhone.Response>>;
1774
+ changeEmailRequest(AuthChangeEmailRequestParams: JUHUU.User.ChangeEmailRequest.Params, AuthChangeEmailRequestOptions?: JUHUU.User.ChangeEmailRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangeEmailRequest.Response>>;
1775
+ changeEmailVerify(AuthChangeEmailVerifyParams: JUHUU.User.ChangeEmailVerify.Params, AuthChangeEmailVerifyOptions?: JUHUU.User.ChangeEmailVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangeEmailVerify.Response>>;
1776
+ removeEmail(AuthRemoveEmailParams: JUHUU.User.RemoveEmail.Params, AuthRemoveEmailOptions?: JUHUU.User.RemoveEmail.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemoveEmail.Response>>;
1777
+ getAvailableEmails(AuthGetAvailableEmailsParams: JUHUU.User.GetAvailableEmails.Params, AuthGetAvailableEmailsOptions?: JUHUU.User.GetAvailableEmails.Options): Promise<JUHUU.HttpResponse<JUHUU.User.GetAvailableEmails.Response>>;
1778
+ setPrimaryEmail(AuthSetPrimaryEmailParams: JUHUU.User.SetPrimaryEmail.Params, AuthSetPrimaryEmailOptions?: JUHUU.User.SetPrimaryEmail.Options): Promise<JUHUU.HttpResponse<JUHUU.User.SetPrimaryEmail.Response>>;
1779
+ }
1780
+
1757
1781
  declare class SessionService extends Service {
1758
1782
  constructor(config: JUHUU.SetupConfig);
1759
1783
  create(SessionCreateParams: JUHUU.Session.Create.Params, SessionCreateOptions?: JUHUU.Session.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.Create.Response>>;
@@ -1785,10 +1809,7 @@ declare class UsersService extends Service {
1785
1809
  constructor(config: JUHUU.SetupConfig);
1786
1810
  create(UserCreateParams: JUHUU.User.Create.Params, UserCreateOptions?: JUHUU.User.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Create.Response>>;
1787
1811
  retrieve(UserRetrieveParams: JUHUU.User.Retrieve.Params, UserRetrieveOptions?: JUHUU.User.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Retrieve.Response>>;
1788
- registerEmailPassword(UserRegisterEmailPasswordParams: JUHUU.User.RegisterEmailPassword.Params, UserRegisterEmailPasswordOptions?: JUHUU.User.RegisterEmailPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RegisterEmailPassword.Response>>;
1789
- loginEmailPassword(UserLoginEmailPasswordParams: JUHUU.User.LoginEmailPassword.Params, UserLoginEmailPasswordOptions?: JUHUU.User.LoginEmailPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.LoginEmailPassword.Response>>;
1790
1812
  paymentMethodTokens(UserPaymentMethodTokensParams: JUHUU.User.PaymentMethodTokens.Params, UserPaymentMethodTokensOptions?: JUHUU.User.PaymentMethodTokens.Options): Promise<JUHUU.HttpResponse<JUHUU.User.PaymentMethodTokens.Response>>;
1791
- refreshAccessToken(UserRefreshAccessTokenParams: JUHUU.User.RefreshAccessToken.Params, UserRefreshAccessTokenOptions?: JUHUU.User.RefreshAccessToken.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RefreshAccessToken.Response>>;
1792
1813
  list(UserListParams: JUHUU.User.List.Params, UserListOptions?: JUHUU.User.List.Options): Promise<JUHUU.HttpResponse<JUHUU.User.List.Response>>;
1793
1814
  update(UserUpdateParams: JUHUU.User.Update.Params, UserUpdateOptions?: JUHUU.User.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Update.Response>>;
1794
1815
  memberCreate(UserInviteMemberParams: JUHUU.User.InviteMember.Params, UserInviteMemberOptions?: JUHUU.User.InviteMember.Options): Promise<JUHUU.HttpResponse<JUHUU.User.InviteMember.Response>>;
@@ -2225,6 +2246,7 @@ declare class Juhuu {
2225
2246
  * Top Level Resources
2226
2247
  */
2227
2248
  readonly achievements: AchievementsService;
2249
+ readonly auth: AuthService;
2228
2250
  readonly sessions: SessionService;
2229
2251
  readonly links: LinkService;
2230
2252
  readonly users: UsersService;
@@ -2554,7 +2576,7 @@ declare namespace JUHUU {
2554
2576
  userId: string;
2555
2577
  propertyId?: string;
2556
2578
  scheduledReadyAt?: Date;
2557
- metadata: Record<string, any>;
2579
+ metadata?: Record<string, any>;
2558
2580
  };
2559
2581
  type Options = JUHUU.RequestOptions;
2560
2582
  type Response = {
@@ -2713,6 +2735,8 @@ declare namespace JUHUU {
2713
2735
  billingAddress: DeepNullable<Address>;
2714
2736
  billingEmail: string | null;
2715
2737
  billingEmailVerified: boolean;
2738
+ billingPhone: string | null;
2739
+ billingPhoneVerified: boolean;
2716
2740
  taxCodeArray: TaxCode[];
2717
2741
  expoPushTokenArray: string[];
2718
2742
  group: UserGroup;
@@ -2887,6 +2911,164 @@ declare namespace JUHUU {
2887
2911
  url: string;
2888
2912
  };
2889
2913
  }
2914
+ export namespace Identify {
2915
+ type Params = {
2916
+ identifier: string;
2917
+ };
2918
+ type Options = JUHUU.RequestOptions;
2919
+ type Response = {
2920
+ exists: boolean;
2921
+ type: "email" | "phone";
2922
+ availableMethods: AuthMethodType[];
2923
+ preferredMethod: AuthMethodType | null;
2924
+ canRegister: boolean;
2925
+ };
2926
+ }
2927
+ export namespace OtpRequest {
2928
+ type Params = {
2929
+ destination: string;
2930
+ countryCode: PhoneCountryCode;
2931
+ nationalNumber: string;
2932
+ purpose: "login" | "register" | "verify";
2933
+ };
2934
+ type Options = JUHUU.RequestOptions;
2935
+ type Response = {
2936
+ message: string;
2937
+ type: "email" | "phone";
2938
+ destination: string;
2939
+ };
2940
+ }
2941
+ export namespace OtpVerify {
2942
+ type Params = {
2943
+ destination: string;
2944
+ countryCode: PhoneCountryCode;
2945
+ nationalNumber: string;
2946
+ code: string;
2947
+ purpose: "login" | "register" | "verify";
2948
+ name: string;
2949
+ billingAddress: DeepNullable<Address>;
2950
+ };
2951
+ type Options = JUHUU.RequestOptions;
2952
+ type Response = {
2953
+ accessToken: string;
2954
+ refreshToken: string;
2955
+ isNewUser: boolean;
2956
+ };
2957
+ }
2958
+ export namespace SetPassword {
2959
+ type Params = {
2960
+ password: string;
2961
+ };
2962
+ type Options = JUHUU.RequestOptions;
2963
+ type Response = {
2964
+ message: string;
2965
+ success: boolean;
2966
+ };
2967
+ }
2968
+ export namespace RemovePassword {
2969
+ type Params = {};
2970
+ type Options = JUHUU.RequestOptions;
2971
+ type Response = {
2972
+ message: string;
2973
+ success: boolean;
2974
+ };
2975
+ }
2976
+ export namespace RemoveGoogle {
2977
+ type Params = {};
2978
+ type Options = JUHUU.RequestOptions;
2979
+ type Response = {
2980
+ message: string;
2981
+ success: boolean;
2982
+ };
2983
+ }
2984
+ export namespace RemoveApple {
2985
+ type Params = {};
2986
+ type Options = JUHUU.RequestOptions;
2987
+ type Response = {
2988
+ message: string;
2989
+ success: boolean;
2990
+ };
2991
+ }
2992
+ export namespace ChangePhoneRequest {
2993
+ type Params = {
2994
+ phone: string;
2995
+ countryCode: PhoneCountryCode;
2996
+ nationalNumber: string;
2997
+ };
2998
+ type Options = JUHUU.RequestOptions;
2999
+ type Response = {
3000
+ message: string;
3001
+ destination: string;
3002
+ };
3003
+ }
3004
+ export namespace ChangePhoneVerify {
3005
+ type Params = {
3006
+ phone: string;
3007
+ countryCode: PhoneCountryCode;
3008
+ nationalNumber: string;
3009
+ code: string;
3010
+ };
3011
+ type Options = JUHUU.RequestOptions;
3012
+ type Response = {
3013
+ message: string;
3014
+ success: boolean;
3015
+ };
3016
+ }
3017
+ export namespace RemovePhone {
3018
+ type Params = {};
3019
+ type Options = JUHUU.RequestOptions;
3020
+ type Response = {
3021
+ message: string;
3022
+ success: boolean;
3023
+ };
3024
+ }
3025
+ export namespace ChangeEmailRequest {
3026
+ type Params = {
3027
+ email: string;
3028
+ };
3029
+ type Options = JUHUU.RequestOptions;
3030
+ type Response = {
3031
+ message: string;
3032
+ destination: string;
3033
+ };
3034
+ }
3035
+ export namespace ChangeEmailVerify {
3036
+ type Params = {
3037
+ email: string;
3038
+ code: string;
3039
+ };
3040
+ type Options = JUHUU.RequestOptions;
3041
+ type Response = {
3042
+ message: string;
3043
+ success: boolean;
3044
+ };
3045
+ }
3046
+ export namespace RemoveEmail {
3047
+ type Params = {};
3048
+ type Options = JUHUU.RequestOptions;
3049
+ type Response = {
3050
+ message: string;
3051
+ success: boolean;
3052
+ };
3053
+ }
3054
+ export namespace GetAvailableEmails {
3055
+ type Params = {};
3056
+ type Options = JUHUU.RequestOptions;
3057
+ type Response = {
3058
+ emails: string[];
3059
+ primaryEmail: string | null;
3060
+ };
3061
+ }
3062
+ export namespace SetPrimaryEmail {
3063
+ type Params = {
3064
+ email: string;
3065
+ };
3066
+ type Options = JUHUU.RequestOptions;
3067
+ type Response = {
3068
+ success: boolean;
3069
+ message: string;
3070
+ };
3071
+ }
2890
3072
  export { };
2891
3073
  }
2892
3074
  namespace Emz {
@@ -7119,4 +7301,4 @@ declare namespace JUHUU {
7119
7301
  }
7120
7302
  }
7121
7303
 
7122
- export { type AccessControlListElement, type AdditionalSubscriptionItem, type Address, type ApiKeyScope, type ApiKeyStatus, type AppStatus, type ArrayGetBlock, type ArrayGetBlockInputs, type ArrayLengthBlock, type ArrayLengthBlockInputs, type AutoRenewMode, type BaseBlock, type BenefitCardCopyBlock, type BenefitCardCopyBlockInputs, type BenefitCardListBlock, type BenefitCardListBlockInputs, type BenefitCardRetrieveBlock, type BenefitCardRetrieveBlockInputs, type BenefitCardUpdateBlock, type BenefitCardUpdateBlockInputs, type BlockExecutor, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type ConstBooleanBlock, type ConstNumberBlock, type ConstTextBlock, type ControlEdgeConnection, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DataEdgeConnection, type DeepNullable, type DelaySleepBlock, type DelaySleepBlockInputs, type DevicePermission, type DeviceRetrieveBlock, type DeviceRetrieveBlockInputs, type DeviceStatus, type DeviceType, type DeviceUpdateBlock, type DeviceUpdateBlockInputs, type EndCustomBlock, type Environment, type EnvironmentSettings, type ExtractType, type FlowBlock, type FlowBlockInput, type FlowControlEdge, type FlowDataEdge, type FlowEdge, type FlowExecuteBlock, type FlowExecuteBlockInputs, type FlowExecutionEnvironment, type FlowLog, type FlowStatus, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, type HttpDeleteBlock, type HttpDeleteBlockInputs, type HttpGetBlock, type HttpGetBlockInputs, type HttpPatchBlock, type HttpPostBlock, type HttpPostBlockInputs, type HttpPutBlock, type HttpPutBlockInputs, type HttpsPatchBlockInputs, type IfBlock, type IncidentCreateBlock, type IncidentCreateBlockInputs, type IncidentRetrieveBlock, type IncidentRetrieveBlockInputs, JUHUU, type JsonLogic, Juhuu, type KitStatus, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type LocationRetrieveBlock, type LocationRetrieveBlockInputs, type LocationUpdateBlock, type LocationUpdateBlockInputs, type MapConstructBlock, type MapConstructBlockInputs, type MapDestructureBlock, type MapDestructureBlockInputs, type MapFilter, type MathAddBlock, type MathAddBlockInputs, type MathDivideBlock, type MathDivideBlockInputs, type MathMultiplyBlock, type MathMultiplyBlockInputs, type MathSubtractBlock, type MathSubtractBlockInputs, type Modality, type MqttSendBlock, type MqttSendBlockInputs, Offer, type OfferTime, type PanelDisplay, type ParamDefinition, type ParamType, type ParameterRetrieveBlock, type ParameterRetrieveBlockInputs, type ParameterUpdateBlock, type ParameterUpdateBlockInputs, type Party, type PaymentCreateBlock, type PaymentCreateBlockInputs, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PlotData, type PostingRow, type PropertyAgreement, type PropertyRetrieveBlock, type PropertyRetrieveBlockInputs, type PropertyUpdateBlock, type PropertyUpdateBlockInputs, type ProximityStrategy, type Purpose, type QuickAction, type QuickView, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionRetrieveBlock, type SessionRetrieveBlockInputs, type SessionSettings, type SessionStatus, type SessionTerminateBlock, type SessionTerminateBlockInputs, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type StartCustomBlock, type StartLocationUpdateBlock, type StartParameterUpdateBlock, type StartQuickActionLocationBlock, type StartSessionUpdateBlock, type SwitchBlock, type SystemLogBlock, type SystemLogBlockInputs, type TarifType, type TaxCode, type TextMatchBlock, type TextMatchBlockInputs, type TextTemplateBlock, type TextTemplateBlockInputs, type TimeZone, type UiNavigateScreenBlock, type UiNavigateScreenBlockInputs, type Unit, type UserCreateBlock, type UserCreateBlockInputs, type UserGroup, type UserRetrieveBlock, type UserRetrieveBlockInputs, type UserType, type Utilization, type VariableGetBlock, type VariableGetBlockInputs, type VariableSetBlock, type VariableSetBlockInputs, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
7304
+ export { type AccessControlListElement, type AdditionalSubscriptionItem, type Address, type ApiKeyScope, type ApiKeyStatus, type AppStatus, type ArrayGetBlock, type ArrayGetBlockInputs, type ArrayLengthBlock, type ArrayLengthBlockInputs, type AuthMethodType, type AutoRenewMode, type BaseBlock, type BenefitCardCopyBlock, type BenefitCardCopyBlockInputs, type BenefitCardListBlock, type BenefitCardListBlockInputs, type BenefitCardRetrieveBlock, type BenefitCardRetrieveBlockInputs, type BenefitCardUpdateBlock, type BenefitCardUpdateBlockInputs, type BlockExecutor, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type ConstBooleanBlock, type ConstNumberBlock, type ConstTextBlock, type ControlEdgeConnection, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DataEdgeConnection, type DeepNullable, type DelaySleepBlock, type DelaySleepBlockInputs, type DevicePermission, type DeviceRetrieveBlock, type DeviceRetrieveBlockInputs, type DeviceStatus, type DeviceType, type DeviceUpdateBlock, type DeviceUpdateBlockInputs, type EndCustomBlock, type Environment, type EnvironmentSettings, type ExtractType, type FlowBlock, type FlowBlockInput, type FlowControlEdge, type FlowDataEdge, type FlowEdge, type FlowExecuteBlock, type FlowExecuteBlockInputs, type FlowExecutionEnvironment, type FlowLog, type FlowStatus, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, type HttpDeleteBlock, type HttpDeleteBlockInputs, type HttpGetBlock, type HttpGetBlockInputs, type HttpPatchBlock, type HttpPostBlock, type HttpPostBlockInputs, type HttpPutBlock, type HttpPutBlockInputs, type HttpsPatchBlockInputs, type IfBlock, type IncidentCreateBlock, type IncidentCreateBlockInputs, type IncidentRetrieveBlock, type IncidentRetrieveBlockInputs, JUHUU, type JsonLogic, Juhuu, type KitStatus, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type LocationRetrieveBlock, type LocationRetrieveBlockInputs, type LocationUpdateBlock, type LocationUpdateBlockInputs, type MapConstructBlock, type MapConstructBlockInputs, type MapDestructureBlock, type MapDestructureBlockInputs, type MapFilter, type MathAddBlock, type MathAddBlockInputs, type MathDivideBlock, type MathDivideBlockInputs, type MathMultiplyBlock, type MathMultiplyBlockInputs, type MathSubtractBlock, type MathSubtractBlockInputs, type Modality, type MqttSendBlock, type MqttSendBlockInputs, Offer, type OfferTime, type PanelDisplay, type ParamDefinition, type ParamType, type ParameterRetrieveBlock, type ParameterRetrieveBlockInputs, type ParameterUpdateBlock, type ParameterUpdateBlockInputs, type Party, type PaymentCreateBlock, type PaymentCreateBlockInputs, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type PhoneCountryCode, type Platform, type PlatformString, type PlotData, type PostingRow, type PropertyAgreement, type PropertyRetrieveBlock, type PropertyRetrieveBlockInputs, type PropertyUpdateBlock, type PropertyUpdateBlockInputs, type ProximityStrategy, type Purpose, type QuickAction, type QuickView, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionRetrieveBlock, type SessionRetrieveBlockInputs, type SessionSettings, type SessionStatus, type SessionTerminateBlock, type SessionTerminateBlockInputs, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type StartCustomBlock, type StartLocationUpdateBlock, type StartParameterUpdateBlock, type StartQuickActionLocationBlock, type StartSessionUpdateBlock, type SwitchBlock, type SystemLogBlock, type SystemLogBlockInputs, type TarifType, type TaxCode, type TextMatchBlock, type TextMatchBlockInputs, type TextTemplateBlock, type TextTemplateBlockInputs, type TimeZone, type UiNavigateScreenBlock, type UiNavigateScreenBlockInputs, type Unit, type UserCreateBlock, type UserCreateBlockInputs, type UserGroup, type UserRetrieveBlock, type UserRetrieveBlockInputs, type UserType, type Utilization, type VariableGetBlock, type VariableGetBlockInputs, type VariableSetBlock, type VariableSetBlockInputs, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
package/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ type ExtractType<T> = T extends {
19
19
  } ? U : never;
20
20
  type UserGroup = "retailer" | "engineer" | "operator" | "user";
21
21
  type Frontend = "dashboard" | "app";
22
+ type AuthMethodType = "password" | "email-otp" | "phone-otp" | "google-oauth" | "apple-oauth";
23
+ type PhoneCountryCode = "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KZ" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "KN" | "LC" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UY" | "UZ" | "VU" | "VA" | "VE" | "VN" | "VG" | "VI" | "YE" | "ZM" | "ZW";
22
24
  type FlowExecutionEnvironment = "dashboard" | "app" | "backend" | "controlKit";
23
25
  type ApiKeyStatus = "enabled" | "disabled";
24
26
  type FlowStatus = "error" | "ready";
@@ -1754,6 +1756,28 @@ declare class AchievementsService extends Service {
1754
1756
  delete(params: JUHUU.Achievement.Delete.Params, options?: JUHUU.Achievement.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Achievement.Delete.Response>>;
1755
1757
  }
1756
1758
 
1759
+ declare class AuthService extends Service {
1760
+ constructor(config: JUHUU.SetupConfig);
1761
+ registerEmailPassword(AuthRegisterEmailPasswordParams: JUHUU.User.RegisterEmailPassword.Params, AuthRegisterEmailPasswordOptions?: JUHUU.User.RegisterEmailPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RegisterEmailPassword.Response>>;
1762
+ loginEmailPassword(AuthLoginEmailPasswordParams: JUHUU.User.LoginEmailPassword.Params, AuthLoginEmailPasswordOptions?: JUHUU.User.LoginEmailPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.LoginEmailPassword.Response>>;
1763
+ refreshAccessToken(AuthRefreshAccessTokenParams: JUHUU.User.RefreshAccessToken.Params, AuthRefreshAccessTokenOptions?: JUHUU.User.RefreshAccessToken.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RefreshAccessToken.Response>>;
1764
+ identify(AuthIdentifyParams: JUHUU.User.Identify.Params, AuthIdentifyOptions?: JUHUU.User.Identify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Identify.Response>>;
1765
+ otpRequest(AuthOtpRequestParams: JUHUU.User.OtpRequest.Params, AuthOtpRequestOptions?: JUHUU.User.OtpRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.OtpRequest.Response>>;
1766
+ otpVerify(AuthOtpVerifyParams: JUHUU.User.OtpVerify.Params, AuthOtpVerifyOptions?: JUHUU.User.OtpVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.OtpVerify.Response>>;
1767
+ setPassword(AuthSetPasswordParams: JUHUU.User.SetPassword.Params, AuthSetPasswordOptions?: JUHUU.User.SetPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.SetPassword.Response>>;
1768
+ removePassword(AuthRemovePasswordParams: JUHUU.User.RemovePassword.Params, AuthRemovePasswordOptions?: JUHUU.User.RemovePassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemovePassword.Response>>;
1769
+ removeGoogle(AuthRemoveGoogleParams: JUHUU.User.RemoveGoogle.Params, AuthRemoveGoogleOptions?: JUHUU.User.RemoveGoogle.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemoveGoogle.Response>>;
1770
+ removeApple(AuthRemoveAppleParams: JUHUU.User.RemoveApple.Params, AuthRemoveAppleOptions?: JUHUU.User.RemoveApple.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemoveApple.Response>>;
1771
+ changePhoneRequest(AuthChangePhoneRequestParams: JUHUU.User.ChangePhoneRequest.Params, AuthChangePhoneRequestOptions?: JUHUU.User.ChangePhoneRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangePhoneRequest.Response>>;
1772
+ changePhoneVerify(AuthChangePhoneVerifyParams: JUHUU.User.ChangePhoneVerify.Params, AuthChangePhoneVerifyOptions?: JUHUU.User.ChangePhoneVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangePhoneVerify.Response>>;
1773
+ removePhone(AuthRemovePhoneParams: JUHUU.User.RemovePhone.Params, AuthRemovePhoneOptions?: JUHUU.User.RemovePhone.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemovePhone.Response>>;
1774
+ changeEmailRequest(AuthChangeEmailRequestParams: JUHUU.User.ChangeEmailRequest.Params, AuthChangeEmailRequestOptions?: JUHUU.User.ChangeEmailRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangeEmailRequest.Response>>;
1775
+ changeEmailVerify(AuthChangeEmailVerifyParams: JUHUU.User.ChangeEmailVerify.Params, AuthChangeEmailVerifyOptions?: JUHUU.User.ChangeEmailVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangeEmailVerify.Response>>;
1776
+ removeEmail(AuthRemoveEmailParams: JUHUU.User.RemoveEmail.Params, AuthRemoveEmailOptions?: JUHUU.User.RemoveEmail.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemoveEmail.Response>>;
1777
+ getAvailableEmails(AuthGetAvailableEmailsParams: JUHUU.User.GetAvailableEmails.Params, AuthGetAvailableEmailsOptions?: JUHUU.User.GetAvailableEmails.Options): Promise<JUHUU.HttpResponse<JUHUU.User.GetAvailableEmails.Response>>;
1778
+ setPrimaryEmail(AuthSetPrimaryEmailParams: JUHUU.User.SetPrimaryEmail.Params, AuthSetPrimaryEmailOptions?: JUHUU.User.SetPrimaryEmail.Options): Promise<JUHUU.HttpResponse<JUHUU.User.SetPrimaryEmail.Response>>;
1779
+ }
1780
+
1757
1781
  declare class SessionService extends Service {
1758
1782
  constructor(config: JUHUU.SetupConfig);
1759
1783
  create(SessionCreateParams: JUHUU.Session.Create.Params, SessionCreateOptions?: JUHUU.Session.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.Create.Response>>;
@@ -1785,10 +1809,7 @@ declare class UsersService extends Service {
1785
1809
  constructor(config: JUHUU.SetupConfig);
1786
1810
  create(UserCreateParams: JUHUU.User.Create.Params, UserCreateOptions?: JUHUU.User.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Create.Response>>;
1787
1811
  retrieve(UserRetrieveParams: JUHUU.User.Retrieve.Params, UserRetrieveOptions?: JUHUU.User.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Retrieve.Response>>;
1788
- registerEmailPassword(UserRegisterEmailPasswordParams: JUHUU.User.RegisterEmailPassword.Params, UserRegisterEmailPasswordOptions?: JUHUU.User.RegisterEmailPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RegisterEmailPassword.Response>>;
1789
- loginEmailPassword(UserLoginEmailPasswordParams: JUHUU.User.LoginEmailPassword.Params, UserLoginEmailPasswordOptions?: JUHUU.User.LoginEmailPassword.Options): Promise<JUHUU.HttpResponse<JUHUU.User.LoginEmailPassword.Response>>;
1790
1812
  paymentMethodTokens(UserPaymentMethodTokensParams: JUHUU.User.PaymentMethodTokens.Params, UserPaymentMethodTokensOptions?: JUHUU.User.PaymentMethodTokens.Options): Promise<JUHUU.HttpResponse<JUHUU.User.PaymentMethodTokens.Response>>;
1791
- refreshAccessToken(UserRefreshAccessTokenParams: JUHUU.User.RefreshAccessToken.Params, UserRefreshAccessTokenOptions?: JUHUU.User.RefreshAccessToken.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RefreshAccessToken.Response>>;
1792
1813
  list(UserListParams: JUHUU.User.List.Params, UserListOptions?: JUHUU.User.List.Options): Promise<JUHUU.HttpResponse<JUHUU.User.List.Response>>;
1793
1814
  update(UserUpdateParams: JUHUU.User.Update.Params, UserUpdateOptions?: JUHUU.User.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Update.Response>>;
1794
1815
  memberCreate(UserInviteMemberParams: JUHUU.User.InviteMember.Params, UserInviteMemberOptions?: JUHUU.User.InviteMember.Options): Promise<JUHUU.HttpResponse<JUHUU.User.InviteMember.Response>>;
@@ -2225,6 +2246,7 @@ declare class Juhuu {
2225
2246
  * Top Level Resources
2226
2247
  */
2227
2248
  readonly achievements: AchievementsService;
2249
+ readonly auth: AuthService;
2228
2250
  readonly sessions: SessionService;
2229
2251
  readonly links: LinkService;
2230
2252
  readonly users: UsersService;
@@ -2554,7 +2576,7 @@ declare namespace JUHUU {
2554
2576
  userId: string;
2555
2577
  propertyId?: string;
2556
2578
  scheduledReadyAt?: Date;
2557
- metadata: Record<string, any>;
2579
+ metadata?: Record<string, any>;
2558
2580
  };
2559
2581
  type Options = JUHUU.RequestOptions;
2560
2582
  type Response = {
@@ -2713,6 +2735,8 @@ declare namespace JUHUU {
2713
2735
  billingAddress: DeepNullable<Address>;
2714
2736
  billingEmail: string | null;
2715
2737
  billingEmailVerified: boolean;
2738
+ billingPhone: string | null;
2739
+ billingPhoneVerified: boolean;
2716
2740
  taxCodeArray: TaxCode[];
2717
2741
  expoPushTokenArray: string[];
2718
2742
  group: UserGroup;
@@ -2887,6 +2911,164 @@ declare namespace JUHUU {
2887
2911
  url: string;
2888
2912
  };
2889
2913
  }
2914
+ export namespace Identify {
2915
+ type Params = {
2916
+ identifier: string;
2917
+ };
2918
+ type Options = JUHUU.RequestOptions;
2919
+ type Response = {
2920
+ exists: boolean;
2921
+ type: "email" | "phone";
2922
+ availableMethods: AuthMethodType[];
2923
+ preferredMethod: AuthMethodType | null;
2924
+ canRegister: boolean;
2925
+ };
2926
+ }
2927
+ export namespace OtpRequest {
2928
+ type Params = {
2929
+ destination: string;
2930
+ countryCode: PhoneCountryCode;
2931
+ nationalNumber: string;
2932
+ purpose: "login" | "register" | "verify";
2933
+ };
2934
+ type Options = JUHUU.RequestOptions;
2935
+ type Response = {
2936
+ message: string;
2937
+ type: "email" | "phone";
2938
+ destination: string;
2939
+ };
2940
+ }
2941
+ export namespace OtpVerify {
2942
+ type Params = {
2943
+ destination: string;
2944
+ countryCode: PhoneCountryCode;
2945
+ nationalNumber: string;
2946
+ code: string;
2947
+ purpose: "login" | "register" | "verify";
2948
+ name: string;
2949
+ billingAddress: DeepNullable<Address>;
2950
+ };
2951
+ type Options = JUHUU.RequestOptions;
2952
+ type Response = {
2953
+ accessToken: string;
2954
+ refreshToken: string;
2955
+ isNewUser: boolean;
2956
+ };
2957
+ }
2958
+ export namespace SetPassword {
2959
+ type Params = {
2960
+ password: string;
2961
+ };
2962
+ type Options = JUHUU.RequestOptions;
2963
+ type Response = {
2964
+ message: string;
2965
+ success: boolean;
2966
+ };
2967
+ }
2968
+ export namespace RemovePassword {
2969
+ type Params = {};
2970
+ type Options = JUHUU.RequestOptions;
2971
+ type Response = {
2972
+ message: string;
2973
+ success: boolean;
2974
+ };
2975
+ }
2976
+ export namespace RemoveGoogle {
2977
+ type Params = {};
2978
+ type Options = JUHUU.RequestOptions;
2979
+ type Response = {
2980
+ message: string;
2981
+ success: boolean;
2982
+ };
2983
+ }
2984
+ export namespace RemoveApple {
2985
+ type Params = {};
2986
+ type Options = JUHUU.RequestOptions;
2987
+ type Response = {
2988
+ message: string;
2989
+ success: boolean;
2990
+ };
2991
+ }
2992
+ export namespace ChangePhoneRequest {
2993
+ type Params = {
2994
+ phone: string;
2995
+ countryCode: PhoneCountryCode;
2996
+ nationalNumber: string;
2997
+ };
2998
+ type Options = JUHUU.RequestOptions;
2999
+ type Response = {
3000
+ message: string;
3001
+ destination: string;
3002
+ };
3003
+ }
3004
+ export namespace ChangePhoneVerify {
3005
+ type Params = {
3006
+ phone: string;
3007
+ countryCode: PhoneCountryCode;
3008
+ nationalNumber: string;
3009
+ code: string;
3010
+ };
3011
+ type Options = JUHUU.RequestOptions;
3012
+ type Response = {
3013
+ message: string;
3014
+ success: boolean;
3015
+ };
3016
+ }
3017
+ export namespace RemovePhone {
3018
+ type Params = {};
3019
+ type Options = JUHUU.RequestOptions;
3020
+ type Response = {
3021
+ message: string;
3022
+ success: boolean;
3023
+ };
3024
+ }
3025
+ export namespace ChangeEmailRequest {
3026
+ type Params = {
3027
+ email: string;
3028
+ };
3029
+ type Options = JUHUU.RequestOptions;
3030
+ type Response = {
3031
+ message: string;
3032
+ destination: string;
3033
+ };
3034
+ }
3035
+ export namespace ChangeEmailVerify {
3036
+ type Params = {
3037
+ email: string;
3038
+ code: string;
3039
+ };
3040
+ type Options = JUHUU.RequestOptions;
3041
+ type Response = {
3042
+ message: string;
3043
+ success: boolean;
3044
+ };
3045
+ }
3046
+ export namespace RemoveEmail {
3047
+ type Params = {};
3048
+ type Options = JUHUU.RequestOptions;
3049
+ type Response = {
3050
+ message: string;
3051
+ success: boolean;
3052
+ };
3053
+ }
3054
+ export namespace GetAvailableEmails {
3055
+ type Params = {};
3056
+ type Options = JUHUU.RequestOptions;
3057
+ type Response = {
3058
+ emails: string[];
3059
+ primaryEmail: string | null;
3060
+ };
3061
+ }
3062
+ export namespace SetPrimaryEmail {
3063
+ type Params = {
3064
+ email: string;
3065
+ };
3066
+ type Options = JUHUU.RequestOptions;
3067
+ type Response = {
3068
+ success: boolean;
3069
+ message: string;
3070
+ };
3071
+ }
2890
3072
  export { };
2891
3073
  }
2892
3074
  namespace Emz {
@@ -7119,4 +7301,4 @@ declare namespace JUHUU {
7119
7301
  }
7120
7302
  }
7121
7303
 
7122
- export { type AccessControlListElement, type AdditionalSubscriptionItem, type Address, type ApiKeyScope, type ApiKeyStatus, type AppStatus, type ArrayGetBlock, type ArrayGetBlockInputs, type ArrayLengthBlock, type ArrayLengthBlockInputs, type AutoRenewMode, type BaseBlock, type BenefitCardCopyBlock, type BenefitCardCopyBlockInputs, type BenefitCardListBlock, type BenefitCardListBlockInputs, type BenefitCardRetrieveBlock, type BenefitCardRetrieveBlockInputs, type BenefitCardUpdateBlock, type BenefitCardUpdateBlockInputs, type BlockExecutor, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type ConstBooleanBlock, type ConstNumberBlock, type ConstTextBlock, type ControlEdgeConnection, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DataEdgeConnection, type DeepNullable, type DelaySleepBlock, type DelaySleepBlockInputs, type DevicePermission, type DeviceRetrieveBlock, type DeviceRetrieveBlockInputs, type DeviceStatus, type DeviceType, type DeviceUpdateBlock, type DeviceUpdateBlockInputs, type EndCustomBlock, type Environment, type EnvironmentSettings, type ExtractType, type FlowBlock, type FlowBlockInput, type FlowControlEdge, type FlowDataEdge, type FlowEdge, type FlowExecuteBlock, type FlowExecuteBlockInputs, type FlowExecutionEnvironment, type FlowLog, type FlowStatus, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, type HttpDeleteBlock, type HttpDeleteBlockInputs, type HttpGetBlock, type HttpGetBlockInputs, type HttpPatchBlock, type HttpPostBlock, type HttpPostBlockInputs, type HttpPutBlock, type HttpPutBlockInputs, type HttpsPatchBlockInputs, type IfBlock, type IncidentCreateBlock, type IncidentCreateBlockInputs, type IncidentRetrieveBlock, type IncidentRetrieveBlockInputs, JUHUU, type JsonLogic, Juhuu, type KitStatus, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type LocationRetrieveBlock, type LocationRetrieveBlockInputs, type LocationUpdateBlock, type LocationUpdateBlockInputs, type MapConstructBlock, type MapConstructBlockInputs, type MapDestructureBlock, type MapDestructureBlockInputs, type MapFilter, type MathAddBlock, type MathAddBlockInputs, type MathDivideBlock, type MathDivideBlockInputs, type MathMultiplyBlock, type MathMultiplyBlockInputs, type MathSubtractBlock, type MathSubtractBlockInputs, type Modality, type MqttSendBlock, type MqttSendBlockInputs, Offer, type OfferTime, type PanelDisplay, type ParamDefinition, type ParamType, type ParameterRetrieveBlock, type ParameterRetrieveBlockInputs, type ParameterUpdateBlock, type ParameterUpdateBlockInputs, type Party, type PaymentCreateBlock, type PaymentCreateBlockInputs, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PlotData, type PostingRow, type PropertyAgreement, type PropertyRetrieveBlock, type PropertyRetrieveBlockInputs, type PropertyUpdateBlock, type PropertyUpdateBlockInputs, type ProximityStrategy, type Purpose, type QuickAction, type QuickView, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionRetrieveBlock, type SessionRetrieveBlockInputs, type SessionSettings, type SessionStatus, type SessionTerminateBlock, type SessionTerminateBlockInputs, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type StartCustomBlock, type StartLocationUpdateBlock, type StartParameterUpdateBlock, type StartQuickActionLocationBlock, type StartSessionUpdateBlock, type SwitchBlock, type SystemLogBlock, type SystemLogBlockInputs, type TarifType, type TaxCode, type TextMatchBlock, type TextMatchBlockInputs, type TextTemplateBlock, type TextTemplateBlockInputs, type TimeZone, type UiNavigateScreenBlock, type UiNavigateScreenBlockInputs, type Unit, type UserCreateBlock, type UserCreateBlockInputs, type UserGroup, type UserRetrieveBlock, type UserRetrieveBlockInputs, type UserType, type Utilization, type VariableGetBlock, type VariableGetBlockInputs, type VariableSetBlock, type VariableSetBlockInputs, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
7304
+ export { type AccessControlListElement, type AdditionalSubscriptionItem, type Address, type ApiKeyScope, type ApiKeyStatus, type AppStatus, type ArrayGetBlock, type ArrayGetBlockInputs, type ArrayLengthBlock, type ArrayLengthBlockInputs, type AuthMethodType, type AutoRenewMode, type BaseBlock, type BenefitCardCopyBlock, type BenefitCardCopyBlockInputs, type BenefitCardListBlock, type BenefitCardListBlockInputs, type BenefitCardRetrieveBlock, type BenefitCardRetrieveBlockInputs, type BenefitCardUpdateBlock, type BenefitCardUpdateBlockInputs, type BlockExecutor, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type ConstBooleanBlock, type ConstNumberBlock, type ConstTextBlock, type ControlEdgeConnection, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DataEdgeConnection, type DeepNullable, type DelaySleepBlock, type DelaySleepBlockInputs, type DevicePermission, type DeviceRetrieveBlock, type DeviceRetrieveBlockInputs, type DeviceStatus, type DeviceType, type DeviceUpdateBlock, type DeviceUpdateBlockInputs, type EndCustomBlock, type Environment, type EnvironmentSettings, type ExtractType, type FlowBlock, type FlowBlockInput, type FlowControlEdge, type FlowDataEdge, type FlowEdge, type FlowExecuteBlock, type FlowExecuteBlockInputs, type FlowExecutionEnvironment, type FlowLog, type FlowStatus, type Frontend, type GeneralSettings, type GeoPoint, type GraphNode, type HttpDeleteBlock, type HttpDeleteBlockInputs, type HttpGetBlock, type HttpGetBlockInputs, type HttpPatchBlock, type HttpPostBlock, type HttpPostBlockInputs, type HttpPutBlock, type HttpPutBlockInputs, type HttpsPatchBlockInputs, type IfBlock, type IncidentCreateBlock, type IncidentCreateBlockInputs, type IncidentRetrieveBlock, type IncidentRetrieveBlockInputs, JUHUU, type JsonLogic, Juhuu, type KitStatus, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type License, type LicenseTariffIdMap, type LinkType, type LocaleString, type LocationRetrieveBlock, type LocationRetrieveBlockInputs, type LocationUpdateBlock, type LocationUpdateBlockInputs, type MapConstructBlock, type MapConstructBlockInputs, type MapDestructureBlock, type MapDestructureBlockInputs, type MapFilter, type MathAddBlock, type MathAddBlockInputs, type MathDivideBlock, type MathDivideBlockInputs, type MathMultiplyBlock, type MathMultiplyBlockInputs, type MathSubtractBlock, type MathSubtractBlockInputs, type Modality, type MqttSendBlock, type MqttSendBlockInputs, Offer, type OfferTime, type PanelDisplay, type ParamDefinition, type ParamType, type ParameterRetrieveBlock, type ParameterRetrieveBlockInputs, type ParameterUpdateBlock, type ParameterUpdateBlockInputs, type Party, type PaymentCreateBlock, type PaymentCreateBlockInputs, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type PhoneCountryCode, type Platform, type PlatformString, type PlotData, type PostingRow, type PropertyAgreement, type PropertyRetrieveBlock, type PropertyRetrieveBlockInputs, type PropertyUpdateBlock, type PropertyUpdateBlockInputs, type ProximityStrategy, type Purpose, type QuickAction, type QuickView, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionRetrieveBlock, type SessionRetrieveBlockInputs, type SessionSettings, type SessionStatus, type SessionTerminateBlock, type SessionTerminateBlockInputs, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type StartCustomBlock, type StartLocationUpdateBlock, type StartParameterUpdateBlock, type StartQuickActionLocationBlock, type StartSessionUpdateBlock, type SwitchBlock, type SystemLogBlock, type SystemLogBlockInputs, type TarifType, type TaxCode, type TextMatchBlock, type TextMatchBlockInputs, type TextTemplateBlock, type TextTemplateBlockInputs, type TimeZone, type UiNavigateScreenBlock, type UiNavigateScreenBlockInputs, type Unit, type UserCreateBlock, type UserCreateBlockInputs, type UserGroup, type UserRetrieveBlock, type UserRetrieveBlockInputs, type UserType, type Utilization, type VariableGetBlock, type VariableGetBlockInputs, type VariableSetBlock, type VariableSetBlockInputs, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
package/dist/index.js CHANGED
@@ -514,6 +514,253 @@ var AchievementsService = class extends Service {
514
514
  }
515
515
  };
516
516
 
517
+ // src/auth/auth.service.ts
518
+ var AuthService = class extends Service {
519
+ constructor(config) {
520
+ super(config);
521
+ }
522
+ async registerEmailPassword(AuthRegisterEmailPasswordParams, AuthRegisterEmailPasswordOptions) {
523
+ return await super.sendRequest(
524
+ {
525
+ method: "POST",
526
+ url: "auth/emailPassword/register",
527
+ body: {
528
+ email: AuthRegisterEmailPasswordParams.email,
529
+ password: AuthRegisterEmailPasswordParams.password
530
+ },
531
+ authenticationNotOptional: false
532
+ },
533
+ AuthRegisterEmailPasswordOptions
534
+ );
535
+ }
536
+ async loginEmailPassword(AuthLoginEmailPasswordParams, AuthLoginEmailPasswordOptions) {
537
+ return await super.sendRequest(
538
+ {
539
+ method: "POST",
540
+ url: "auth/emailPassword/login",
541
+ body: {
542
+ email: AuthLoginEmailPasswordParams.email,
543
+ password: AuthLoginEmailPasswordParams.password
544
+ },
545
+ authenticationNotOptional: false
546
+ },
547
+ AuthLoginEmailPasswordOptions
548
+ );
549
+ }
550
+ async refreshAccessToken(AuthRefreshAccessTokenParams, AuthRefreshAccessTokenOptions) {
551
+ return await super.sendRequest(
552
+ {
553
+ method: "GET",
554
+ url: "auth/refresh",
555
+ body: void 0,
556
+ authenticationNotOptional: true
557
+ },
558
+ {
559
+ accessToken: AuthRefreshAccessTokenParams?.refreshToken,
560
+ ...AuthRefreshAccessTokenOptions
561
+ }
562
+ );
563
+ }
564
+ async identify(AuthIdentifyParams, AuthIdentifyOptions) {
565
+ return await super.sendRequest(
566
+ {
567
+ method: "POST",
568
+ url: "auth/identify",
569
+ body: {
570
+ identifier: AuthIdentifyParams.identifier
571
+ },
572
+ authenticationNotOptional: false
573
+ },
574
+ AuthIdentifyOptions
575
+ );
576
+ }
577
+ async otpRequest(AuthOtpRequestParams, AuthOtpRequestOptions) {
578
+ return await super.sendRequest(
579
+ {
580
+ method: "POST",
581
+ url: "auth/otp/request",
582
+ body: {
583
+ destination: AuthOtpRequestParams.destination,
584
+ countryCode: AuthOtpRequestParams.countryCode,
585
+ nationalNumber: AuthOtpRequestParams.nationalNumber,
586
+ purpose: AuthOtpRequestParams.purpose
587
+ },
588
+ authenticationNotOptional: false
589
+ },
590
+ AuthOtpRequestOptions
591
+ );
592
+ }
593
+ async otpVerify(AuthOtpVerifyParams, AuthOtpVerifyOptions) {
594
+ return await super.sendRequest(
595
+ {
596
+ method: "POST",
597
+ url: "auth/otp/verify",
598
+ body: {
599
+ destination: AuthOtpVerifyParams.destination,
600
+ countryCode: AuthOtpVerifyParams.countryCode,
601
+ nationalNumber: AuthOtpVerifyParams.nationalNumber,
602
+ purpose: AuthOtpVerifyParams.purpose,
603
+ name: AuthOtpVerifyParams.name,
604
+ billingAddress: AuthOtpVerifyParams.billingAddress,
605
+ code: AuthOtpVerifyParams.code
606
+ },
607
+ authenticationNotOptional: false
608
+ },
609
+ AuthOtpVerifyOptions
610
+ );
611
+ }
612
+ async setPassword(AuthSetPasswordParams, AuthSetPasswordOptions) {
613
+ return await super.sendRequest(
614
+ {
615
+ method: "PATCH",
616
+ url: "auth/password/set",
617
+ body: {
618
+ password: AuthSetPasswordParams.password
619
+ },
620
+ authenticationNotOptional: true
621
+ },
622
+ AuthSetPasswordOptions
623
+ );
624
+ }
625
+ async removePassword(AuthRemovePasswordParams, AuthRemovePasswordOptions) {
626
+ return await super.sendRequest(
627
+ {
628
+ method: "DELETE",
629
+ url: "auth/password",
630
+ body: void 0,
631
+ authenticationNotOptional: true
632
+ },
633
+ AuthRemovePasswordOptions
634
+ );
635
+ }
636
+ async removeGoogle(AuthRemoveGoogleParams, AuthRemoveGoogleOptions) {
637
+ return await super.sendRequest(
638
+ {
639
+ method: "DELETE",
640
+ url: "auth/google",
641
+ body: void 0,
642
+ authenticationNotOptional: true
643
+ },
644
+ AuthRemoveGoogleOptions
645
+ );
646
+ }
647
+ async removeApple(AuthRemoveAppleParams, AuthRemoveAppleOptions) {
648
+ return await super.sendRequest(
649
+ {
650
+ method: "DELETE",
651
+ url: "auth/apple",
652
+ body: void 0,
653
+ authenticationNotOptional: true
654
+ },
655
+ AuthRemoveAppleOptions
656
+ );
657
+ }
658
+ async changePhoneRequest(AuthChangePhoneRequestParams, AuthChangePhoneRequestOptions) {
659
+ return await super.sendRequest(
660
+ {
661
+ method: "POST",
662
+ url: "auth/phone/change",
663
+ body: {
664
+ phone: AuthChangePhoneRequestParams.phone,
665
+ countryCode: AuthChangePhoneRequestParams.countryCode,
666
+ nationalNumber: AuthChangePhoneRequestParams.nationalNumber
667
+ },
668
+ authenticationNotOptional: true
669
+ },
670
+ AuthChangePhoneRequestOptions
671
+ );
672
+ }
673
+ async changePhoneVerify(AuthChangePhoneVerifyParams, AuthChangePhoneVerifyOptions) {
674
+ return await super.sendRequest(
675
+ {
676
+ method: "POST",
677
+ url: "auth/phone/verify",
678
+ body: {
679
+ phone: AuthChangePhoneVerifyParams.phone,
680
+ countryCode: AuthChangePhoneVerifyParams.countryCode,
681
+ nationalNumber: AuthChangePhoneVerifyParams.nationalNumber,
682
+ code: AuthChangePhoneVerifyParams.code
683
+ },
684
+ authenticationNotOptional: true
685
+ },
686
+ AuthChangePhoneVerifyOptions
687
+ );
688
+ }
689
+ async removePhone(AuthRemovePhoneParams, AuthRemovePhoneOptions) {
690
+ return await super.sendRequest(
691
+ {
692
+ method: "DELETE",
693
+ url: "auth/phone",
694
+ authenticationNotOptional: true,
695
+ body: void 0
696
+ },
697
+ AuthRemovePhoneOptions
698
+ );
699
+ }
700
+ async changeEmailRequest(AuthChangeEmailRequestParams, AuthChangeEmailRequestOptions) {
701
+ return await super.sendRequest(
702
+ {
703
+ method: "POST",
704
+ url: "auth/email/change",
705
+ body: {
706
+ email: AuthChangeEmailRequestParams.email
707
+ },
708
+ authenticationNotOptional: true
709
+ },
710
+ AuthChangeEmailRequestOptions
711
+ );
712
+ }
713
+ async changeEmailVerify(AuthChangeEmailVerifyParams, AuthChangeEmailVerifyOptions) {
714
+ return await super.sendRequest(
715
+ {
716
+ method: "POST",
717
+ url: "auth/email/verify",
718
+ body: {
719
+ email: AuthChangeEmailVerifyParams.email,
720
+ code: AuthChangeEmailVerifyParams.code
721
+ },
722
+ authenticationNotOptional: true
723
+ },
724
+ AuthChangeEmailVerifyOptions
725
+ );
726
+ }
727
+ async removeEmail(AuthRemoveEmailParams, AuthRemoveEmailOptions) {
728
+ return await super.sendRequest(
729
+ {
730
+ method: "DELETE",
731
+ url: "auth/email",
732
+ authenticationNotOptional: true,
733
+ body: void 0
734
+ },
735
+ AuthRemoveEmailOptions
736
+ );
737
+ }
738
+ async getAvailableEmails(AuthGetAvailableEmailsParams, AuthGetAvailableEmailsOptions) {
739
+ return await super.sendRequest(
740
+ {
741
+ method: "GET",
742
+ url: "auth/emails",
743
+ authenticationNotOptional: true,
744
+ body: void 0
745
+ },
746
+ AuthGetAvailableEmailsOptions
747
+ );
748
+ }
749
+ async setPrimaryEmail(AuthSetPrimaryEmailParams, AuthSetPrimaryEmailOptions) {
750
+ return await super.sendRequest(
751
+ {
752
+ method: "POST",
753
+ url: "auth/email/primary",
754
+ authenticationNotOptional: true,
755
+ body: {
756
+ email: AuthSetPrimaryEmailParams.email
757
+ }
758
+ },
759
+ AuthSetPrimaryEmailOptions
760
+ );
761
+ }
762
+ };
763
+
517
764
  // src/sessions/sessions.service.ts
518
765
  var SessionService = class extends Service {
519
766
  constructor(config) {
@@ -865,34 +1112,6 @@ var UsersService = class extends Service {
865
1112
  UserRetrieveOptions
866
1113
  );
867
1114
  }
868
- async registerEmailPassword(UserRegisterEmailPasswordParams, UserRegisterEmailPasswordOptions) {
869
- return await super.sendRequest(
870
- {
871
- method: "POST",
872
- url: "auth/emailPassword/register",
873
- body: {
874
- email: UserRegisterEmailPasswordParams.email,
875
- password: UserRegisterEmailPasswordParams.password
876
- },
877
- authenticationNotOptional: false
878
- },
879
- UserRegisterEmailPasswordOptions
880
- );
881
- }
882
- async loginEmailPassword(UserLoginEmailPasswordParams, UserLoginEmailPasswordOptions) {
883
- return await super.sendRequest(
884
- {
885
- method: "POST",
886
- url: "auth/emailPassword/login",
887
- body: {
888
- email: UserLoginEmailPasswordParams.email,
889
- password: UserLoginEmailPasswordParams.password
890
- },
891
- authenticationNotOptional: false
892
- },
893
- UserLoginEmailPasswordOptions
894
- );
895
- }
896
1115
  async paymentMethodTokens(UserPaymentMethodTokensParams, UserPaymentMethodTokensOptions) {
897
1116
  return await super.sendRequest(
898
1117
  {
@@ -904,20 +1123,6 @@ var UsersService = class extends Service {
904
1123
  UserPaymentMethodTokensOptions
905
1124
  );
906
1125
  }
907
- async refreshAccessToken(UserRefreshAccessTokenParams, UserRefreshAccessTokenOptions) {
908
- return await super.sendRequest(
909
- {
910
- method: "GET",
911
- url: "auth/refresh",
912
- body: void 0,
913
- authenticationNotOptional: true
914
- },
915
- {
916
- accessToken: UserRefreshAccessTokenParams?.refreshToken,
917
- ...UserRefreshAccessTokenOptions
918
- }
919
- );
920
- }
921
1126
  async list(UserListParams, UserListOptions) {
922
1127
  const queryArray = [];
923
1128
  if (UserListParams.managementUserId !== void 0) {
@@ -5794,6 +5999,7 @@ var ConditionType = /* @__PURE__ */ ((ConditionType2) => {
5794
5999
  var Juhuu = class {
5795
6000
  constructor(config) {
5796
6001
  this.achievements = new AchievementsService(config);
6002
+ this.auth = new AuthService(config);
5797
6003
  this.sessions = new SessionService(config);
5798
6004
  this.links = new LinkService(config);
5799
6005
  this.users = new UsersService(config);
@@ -5848,6 +6054,7 @@ var Juhuu = class {
5848
6054
  * Top Level Resources
5849
6055
  */
5850
6056
  achievements;
6057
+ auth;
5851
6058
  sessions;
5852
6059
  links;
5853
6060
  users;
package/dist/index.mjs CHANGED
@@ -470,6 +470,253 @@ var AchievementsService = class extends Service {
470
470
  }
471
471
  };
472
472
 
473
+ // src/auth/auth.service.ts
474
+ var AuthService = class extends Service {
475
+ constructor(config) {
476
+ super(config);
477
+ }
478
+ async registerEmailPassword(AuthRegisterEmailPasswordParams, AuthRegisterEmailPasswordOptions) {
479
+ return await super.sendRequest(
480
+ {
481
+ method: "POST",
482
+ url: "auth/emailPassword/register",
483
+ body: {
484
+ email: AuthRegisterEmailPasswordParams.email,
485
+ password: AuthRegisterEmailPasswordParams.password
486
+ },
487
+ authenticationNotOptional: false
488
+ },
489
+ AuthRegisterEmailPasswordOptions
490
+ );
491
+ }
492
+ async loginEmailPassword(AuthLoginEmailPasswordParams, AuthLoginEmailPasswordOptions) {
493
+ return await super.sendRequest(
494
+ {
495
+ method: "POST",
496
+ url: "auth/emailPassword/login",
497
+ body: {
498
+ email: AuthLoginEmailPasswordParams.email,
499
+ password: AuthLoginEmailPasswordParams.password
500
+ },
501
+ authenticationNotOptional: false
502
+ },
503
+ AuthLoginEmailPasswordOptions
504
+ );
505
+ }
506
+ async refreshAccessToken(AuthRefreshAccessTokenParams, AuthRefreshAccessTokenOptions) {
507
+ return await super.sendRequest(
508
+ {
509
+ method: "GET",
510
+ url: "auth/refresh",
511
+ body: void 0,
512
+ authenticationNotOptional: true
513
+ },
514
+ {
515
+ accessToken: AuthRefreshAccessTokenParams?.refreshToken,
516
+ ...AuthRefreshAccessTokenOptions
517
+ }
518
+ );
519
+ }
520
+ async identify(AuthIdentifyParams, AuthIdentifyOptions) {
521
+ return await super.sendRequest(
522
+ {
523
+ method: "POST",
524
+ url: "auth/identify",
525
+ body: {
526
+ identifier: AuthIdentifyParams.identifier
527
+ },
528
+ authenticationNotOptional: false
529
+ },
530
+ AuthIdentifyOptions
531
+ );
532
+ }
533
+ async otpRequest(AuthOtpRequestParams, AuthOtpRequestOptions) {
534
+ return await super.sendRequest(
535
+ {
536
+ method: "POST",
537
+ url: "auth/otp/request",
538
+ body: {
539
+ destination: AuthOtpRequestParams.destination,
540
+ countryCode: AuthOtpRequestParams.countryCode,
541
+ nationalNumber: AuthOtpRequestParams.nationalNumber,
542
+ purpose: AuthOtpRequestParams.purpose
543
+ },
544
+ authenticationNotOptional: false
545
+ },
546
+ AuthOtpRequestOptions
547
+ );
548
+ }
549
+ async otpVerify(AuthOtpVerifyParams, AuthOtpVerifyOptions) {
550
+ return await super.sendRequest(
551
+ {
552
+ method: "POST",
553
+ url: "auth/otp/verify",
554
+ body: {
555
+ destination: AuthOtpVerifyParams.destination,
556
+ countryCode: AuthOtpVerifyParams.countryCode,
557
+ nationalNumber: AuthOtpVerifyParams.nationalNumber,
558
+ purpose: AuthOtpVerifyParams.purpose,
559
+ name: AuthOtpVerifyParams.name,
560
+ billingAddress: AuthOtpVerifyParams.billingAddress,
561
+ code: AuthOtpVerifyParams.code
562
+ },
563
+ authenticationNotOptional: false
564
+ },
565
+ AuthOtpVerifyOptions
566
+ );
567
+ }
568
+ async setPassword(AuthSetPasswordParams, AuthSetPasswordOptions) {
569
+ return await super.sendRequest(
570
+ {
571
+ method: "PATCH",
572
+ url: "auth/password/set",
573
+ body: {
574
+ password: AuthSetPasswordParams.password
575
+ },
576
+ authenticationNotOptional: true
577
+ },
578
+ AuthSetPasswordOptions
579
+ );
580
+ }
581
+ async removePassword(AuthRemovePasswordParams, AuthRemovePasswordOptions) {
582
+ return await super.sendRequest(
583
+ {
584
+ method: "DELETE",
585
+ url: "auth/password",
586
+ body: void 0,
587
+ authenticationNotOptional: true
588
+ },
589
+ AuthRemovePasswordOptions
590
+ );
591
+ }
592
+ async removeGoogle(AuthRemoveGoogleParams, AuthRemoveGoogleOptions) {
593
+ return await super.sendRequest(
594
+ {
595
+ method: "DELETE",
596
+ url: "auth/google",
597
+ body: void 0,
598
+ authenticationNotOptional: true
599
+ },
600
+ AuthRemoveGoogleOptions
601
+ );
602
+ }
603
+ async removeApple(AuthRemoveAppleParams, AuthRemoveAppleOptions) {
604
+ return await super.sendRequest(
605
+ {
606
+ method: "DELETE",
607
+ url: "auth/apple",
608
+ body: void 0,
609
+ authenticationNotOptional: true
610
+ },
611
+ AuthRemoveAppleOptions
612
+ );
613
+ }
614
+ async changePhoneRequest(AuthChangePhoneRequestParams, AuthChangePhoneRequestOptions) {
615
+ return await super.sendRequest(
616
+ {
617
+ method: "POST",
618
+ url: "auth/phone/change",
619
+ body: {
620
+ phone: AuthChangePhoneRequestParams.phone,
621
+ countryCode: AuthChangePhoneRequestParams.countryCode,
622
+ nationalNumber: AuthChangePhoneRequestParams.nationalNumber
623
+ },
624
+ authenticationNotOptional: true
625
+ },
626
+ AuthChangePhoneRequestOptions
627
+ );
628
+ }
629
+ async changePhoneVerify(AuthChangePhoneVerifyParams, AuthChangePhoneVerifyOptions) {
630
+ return await super.sendRequest(
631
+ {
632
+ method: "POST",
633
+ url: "auth/phone/verify",
634
+ body: {
635
+ phone: AuthChangePhoneVerifyParams.phone,
636
+ countryCode: AuthChangePhoneVerifyParams.countryCode,
637
+ nationalNumber: AuthChangePhoneVerifyParams.nationalNumber,
638
+ code: AuthChangePhoneVerifyParams.code
639
+ },
640
+ authenticationNotOptional: true
641
+ },
642
+ AuthChangePhoneVerifyOptions
643
+ );
644
+ }
645
+ async removePhone(AuthRemovePhoneParams, AuthRemovePhoneOptions) {
646
+ return await super.sendRequest(
647
+ {
648
+ method: "DELETE",
649
+ url: "auth/phone",
650
+ authenticationNotOptional: true,
651
+ body: void 0
652
+ },
653
+ AuthRemovePhoneOptions
654
+ );
655
+ }
656
+ async changeEmailRequest(AuthChangeEmailRequestParams, AuthChangeEmailRequestOptions) {
657
+ return await super.sendRequest(
658
+ {
659
+ method: "POST",
660
+ url: "auth/email/change",
661
+ body: {
662
+ email: AuthChangeEmailRequestParams.email
663
+ },
664
+ authenticationNotOptional: true
665
+ },
666
+ AuthChangeEmailRequestOptions
667
+ );
668
+ }
669
+ async changeEmailVerify(AuthChangeEmailVerifyParams, AuthChangeEmailVerifyOptions) {
670
+ return await super.sendRequest(
671
+ {
672
+ method: "POST",
673
+ url: "auth/email/verify",
674
+ body: {
675
+ email: AuthChangeEmailVerifyParams.email,
676
+ code: AuthChangeEmailVerifyParams.code
677
+ },
678
+ authenticationNotOptional: true
679
+ },
680
+ AuthChangeEmailVerifyOptions
681
+ );
682
+ }
683
+ async removeEmail(AuthRemoveEmailParams, AuthRemoveEmailOptions) {
684
+ return await super.sendRequest(
685
+ {
686
+ method: "DELETE",
687
+ url: "auth/email",
688
+ authenticationNotOptional: true,
689
+ body: void 0
690
+ },
691
+ AuthRemoveEmailOptions
692
+ );
693
+ }
694
+ async getAvailableEmails(AuthGetAvailableEmailsParams, AuthGetAvailableEmailsOptions) {
695
+ return await super.sendRequest(
696
+ {
697
+ method: "GET",
698
+ url: "auth/emails",
699
+ authenticationNotOptional: true,
700
+ body: void 0
701
+ },
702
+ AuthGetAvailableEmailsOptions
703
+ );
704
+ }
705
+ async setPrimaryEmail(AuthSetPrimaryEmailParams, AuthSetPrimaryEmailOptions) {
706
+ return await super.sendRequest(
707
+ {
708
+ method: "POST",
709
+ url: "auth/email/primary",
710
+ authenticationNotOptional: true,
711
+ body: {
712
+ email: AuthSetPrimaryEmailParams.email
713
+ }
714
+ },
715
+ AuthSetPrimaryEmailOptions
716
+ );
717
+ }
718
+ };
719
+
473
720
  // src/sessions/sessions.service.ts
474
721
  var SessionService = class extends Service {
475
722
  constructor(config) {
@@ -821,34 +1068,6 @@ var UsersService = class extends Service {
821
1068
  UserRetrieveOptions
822
1069
  );
823
1070
  }
824
- async registerEmailPassword(UserRegisterEmailPasswordParams, UserRegisterEmailPasswordOptions) {
825
- return await super.sendRequest(
826
- {
827
- method: "POST",
828
- url: "auth/emailPassword/register",
829
- body: {
830
- email: UserRegisterEmailPasswordParams.email,
831
- password: UserRegisterEmailPasswordParams.password
832
- },
833
- authenticationNotOptional: false
834
- },
835
- UserRegisterEmailPasswordOptions
836
- );
837
- }
838
- async loginEmailPassword(UserLoginEmailPasswordParams, UserLoginEmailPasswordOptions) {
839
- return await super.sendRequest(
840
- {
841
- method: "POST",
842
- url: "auth/emailPassword/login",
843
- body: {
844
- email: UserLoginEmailPasswordParams.email,
845
- password: UserLoginEmailPasswordParams.password
846
- },
847
- authenticationNotOptional: false
848
- },
849
- UserLoginEmailPasswordOptions
850
- );
851
- }
852
1071
  async paymentMethodTokens(UserPaymentMethodTokensParams, UserPaymentMethodTokensOptions) {
853
1072
  return await super.sendRequest(
854
1073
  {
@@ -860,20 +1079,6 @@ var UsersService = class extends Service {
860
1079
  UserPaymentMethodTokensOptions
861
1080
  );
862
1081
  }
863
- async refreshAccessToken(UserRefreshAccessTokenParams, UserRefreshAccessTokenOptions) {
864
- return await super.sendRequest(
865
- {
866
- method: "GET",
867
- url: "auth/refresh",
868
- body: void 0,
869
- authenticationNotOptional: true
870
- },
871
- {
872
- accessToken: UserRefreshAccessTokenParams?.refreshToken,
873
- ...UserRefreshAccessTokenOptions
874
- }
875
- );
876
- }
877
1082
  async list(UserListParams, UserListOptions) {
878
1083
  const queryArray = [];
879
1084
  if (UserListParams.managementUserId !== void 0) {
@@ -5750,6 +5955,7 @@ var ConditionType = /* @__PURE__ */ ((ConditionType2) => {
5750
5955
  var Juhuu = class {
5751
5956
  constructor(config) {
5752
5957
  this.achievements = new AchievementsService(config);
5958
+ this.auth = new AuthService(config);
5753
5959
  this.sessions = new SessionService(config);
5754
5960
  this.links = new LinkService(config);
5755
5961
  this.users = new UsersService(config);
@@ -5804,6 +6010,7 @@ var Juhuu = class {
5804
6010
  * Top Level Resources
5805
6011
  */
5806
6012
  achievements;
6013
+ auth;
5807
6014
  sessions;
5808
6015
  links;
5809
6016
  users;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "provenance": true
4
4
  },
5
5
  "name": "@juhuu/sdk-ts",
6
- "version": "1.3.4",
6
+ "version": "1.3.6",
7
7
  "description": "Typescript wrapper for JUHUU services",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",