@juhuu/sdk-ts 1.3.3 → 1.3.5
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 +161 -5
- package/dist/index.d.ts +161 -5
- package/dist/index.js +228 -49
- package/dist/index.mjs +228 -49
- package/package.json +1 -1
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,25 @@ 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
|
+
changePhoneRequest(AuthChangePhoneRequestParams: JUHUU.User.ChangePhoneRequest.Params, AuthChangePhoneRequestOptions?: JUHUU.User.ChangePhoneRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangePhoneRequest.Response>>;
|
|
1769
|
+
changePhoneVerify(AuthChangePhoneVerifyParams: JUHUU.User.ChangePhoneVerify.Params, AuthChangePhoneVerifyOptions?: JUHUU.User.ChangePhoneVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangePhoneVerify.Response>>;
|
|
1770
|
+
removePhone(AuthRemovePhoneParams: JUHUU.User.RemovePhone.Params, AuthRemovePhoneOptions?: JUHUU.User.RemovePhone.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemovePhone.Response>>;
|
|
1771
|
+
changeEmailRequest(AuthChangeEmailRequestParams: JUHUU.User.ChangeEmailRequest.Params, AuthChangeEmailRequestOptions?: JUHUU.User.ChangeEmailRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangeEmailRequest.Response>>;
|
|
1772
|
+
changeEmailVerify(AuthChangeEmailVerifyParams: JUHUU.User.ChangeEmailVerify.Params, AuthChangeEmailVerifyOptions?: JUHUU.User.ChangeEmailVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangeEmailVerify.Response>>;
|
|
1773
|
+
removeEmail(AuthRemoveEmailParams: JUHUU.User.RemoveEmail.Params, AuthRemoveEmailOptions?: JUHUU.User.RemoveEmail.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemoveEmail.Response>>;
|
|
1774
|
+
getAvailableEmails(AuthGetAvailableEmailsParams: JUHUU.User.GetAvailableEmails.Params, AuthGetAvailableEmailsOptions?: JUHUU.User.GetAvailableEmails.Options): Promise<JUHUU.HttpResponse<JUHUU.User.GetAvailableEmails.Response>>;
|
|
1775
|
+
setPrimaryEmail(AuthSetPrimaryEmailParams: JUHUU.User.SetPrimaryEmail.Params, AuthSetPrimaryEmailOptions?: JUHUU.User.SetPrimaryEmail.Options): Promise<JUHUU.HttpResponse<JUHUU.User.SetPrimaryEmail.Response>>;
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1757
1778
|
declare class SessionService extends Service {
|
|
1758
1779
|
constructor(config: JUHUU.SetupConfig);
|
|
1759
1780
|
create(SessionCreateParams: JUHUU.Session.Create.Params, SessionCreateOptions?: JUHUU.Session.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.Create.Response>>;
|
|
@@ -1785,10 +1806,7 @@ declare class UsersService extends Service {
|
|
|
1785
1806
|
constructor(config: JUHUU.SetupConfig);
|
|
1786
1807
|
create(UserCreateParams: JUHUU.User.Create.Params, UserCreateOptions?: JUHUU.User.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Create.Response>>;
|
|
1787
1808
|
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
1809
|
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
1810
|
list(UserListParams: JUHUU.User.List.Params, UserListOptions?: JUHUU.User.List.Options): Promise<JUHUU.HttpResponse<JUHUU.User.List.Response>>;
|
|
1793
1811
|
update(UserUpdateParams: JUHUU.User.Update.Params, UserUpdateOptions?: JUHUU.User.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Update.Response>>;
|
|
1794
1812
|
memberCreate(UserInviteMemberParams: JUHUU.User.InviteMember.Params, UserInviteMemberOptions?: JUHUU.User.InviteMember.Options): Promise<JUHUU.HttpResponse<JUHUU.User.InviteMember.Response>>;
|
|
@@ -2225,6 +2243,7 @@ declare class Juhuu {
|
|
|
2225
2243
|
* Top Level Resources
|
|
2226
2244
|
*/
|
|
2227
2245
|
readonly achievements: AchievementsService;
|
|
2246
|
+
readonly auth: AuthService;
|
|
2228
2247
|
readonly sessions: SessionService;
|
|
2229
2248
|
readonly links: LinkService;
|
|
2230
2249
|
readonly users: UsersService;
|
|
@@ -2554,7 +2573,7 @@ declare namespace JUHUU {
|
|
|
2554
2573
|
userId: string;
|
|
2555
2574
|
propertyId?: string;
|
|
2556
2575
|
scheduledReadyAt?: Date;
|
|
2557
|
-
metadata
|
|
2576
|
+
metadata?: Record<string, any>;
|
|
2558
2577
|
};
|
|
2559
2578
|
type Options = JUHUU.RequestOptions;
|
|
2560
2579
|
type Response = {
|
|
@@ -2686,6 +2705,7 @@ declare namespace JUHUU {
|
|
|
2686
2705
|
locationId: string;
|
|
2687
2706
|
tariffId: string;
|
|
2688
2707
|
autoRenew: boolean;
|
|
2708
|
+
scheduledReadyAt?: Date;
|
|
2689
2709
|
};
|
|
2690
2710
|
type Options = JUHUU.RequestOptions;
|
|
2691
2711
|
type Response = {
|
|
@@ -2712,6 +2732,8 @@ declare namespace JUHUU {
|
|
|
2712
2732
|
billingAddress: DeepNullable<Address>;
|
|
2713
2733
|
billingEmail: string | null;
|
|
2714
2734
|
billingEmailVerified: boolean;
|
|
2735
|
+
billingPhone: string | null;
|
|
2736
|
+
billingPhoneVerified: boolean;
|
|
2715
2737
|
taxCodeArray: TaxCode[];
|
|
2716
2738
|
expoPushTokenArray: string[];
|
|
2717
2739
|
group: UserGroup;
|
|
@@ -2886,6 +2908,140 @@ declare namespace JUHUU {
|
|
|
2886
2908
|
url: string;
|
|
2887
2909
|
};
|
|
2888
2910
|
}
|
|
2911
|
+
export namespace Identify {
|
|
2912
|
+
type Params = {
|
|
2913
|
+
identifier: string;
|
|
2914
|
+
};
|
|
2915
|
+
type Options = JUHUU.RequestOptions;
|
|
2916
|
+
type Response = {
|
|
2917
|
+
exists: boolean;
|
|
2918
|
+
type: "email" | "phone";
|
|
2919
|
+
availableMethods: AuthMethodType[];
|
|
2920
|
+
preferredMethod: AuthMethodType | null;
|
|
2921
|
+
canRegister: boolean;
|
|
2922
|
+
};
|
|
2923
|
+
}
|
|
2924
|
+
export namespace OtpRequest {
|
|
2925
|
+
type Params = {
|
|
2926
|
+
destination: string;
|
|
2927
|
+
countryCode: PhoneCountryCode;
|
|
2928
|
+
nationalNumber: string;
|
|
2929
|
+
purpose: "login" | "register" | "verify";
|
|
2930
|
+
};
|
|
2931
|
+
type Options = JUHUU.RequestOptions;
|
|
2932
|
+
type Response = {
|
|
2933
|
+
message: string;
|
|
2934
|
+
type: "email" | "phone";
|
|
2935
|
+
destination: string;
|
|
2936
|
+
};
|
|
2937
|
+
}
|
|
2938
|
+
export namespace OtpVerify {
|
|
2939
|
+
type Params = {
|
|
2940
|
+
destination: string;
|
|
2941
|
+
countryCode: PhoneCountryCode;
|
|
2942
|
+
nationalNumber: string;
|
|
2943
|
+
code: string;
|
|
2944
|
+
purpose: "login" | "register" | "verify";
|
|
2945
|
+
name: string;
|
|
2946
|
+
billingAddress: DeepNullable<Address>;
|
|
2947
|
+
};
|
|
2948
|
+
type Options = JUHUU.RequestOptions;
|
|
2949
|
+
type Response = {
|
|
2950
|
+
accessToken: string;
|
|
2951
|
+
refreshToken: string;
|
|
2952
|
+
isNewUser: boolean;
|
|
2953
|
+
};
|
|
2954
|
+
}
|
|
2955
|
+
export namespace SetPassword {
|
|
2956
|
+
type Params = {
|
|
2957
|
+
password: string;
|
|
2958
|
+
};
|
|
2959
|
+
type Options = JUHUU.RequestOptions;
|
|
2960
|
+
type Response = {
|
|
2961
|
+
message: string;
|
|
2962
|
+
success: boolean;
|
|
2963
|
+
};
|
|
2964
|
+
}
|
|
2965
|
+
export namespace ChangePhoneRequest {
|
|
2966
|
+
type Params = {
|
|
2967
|
+
phone: string;
|
|
2968
|
+
countryCode: PhoneCountryCode;
|
|
2969
|
+
nationalNumber: string;
|
|
2970
|
+
};
|
|
2971
|
+
type Options = JUHUU.RequestOptions;
|
|
2972
|
+
type Response = {
|
|
2973
|
+
message: string;
|
|
2974
|
+
destination: string;
|
|
2975
|
+
};
|
|
2976
|
+
}
|
|
2977
|
+
export namespace ChangePhoneVerify {
|
|
2978
|
+
type Params = {
|
|
2979
|
+
phone: string;
|
|
2980
|
+
countryCode: PhoneCountryCode;
|
|
2981
|
+
nationalNumber: string;
|
|
2982
|
+
code: string;
|
|
2983
|
+
};
|
|
2984
|
+
type Options = JUHUU.RequestOptions;
|
|
2985
|
+
type Response = {
|
|
2986
|
+
message: string;
|
|
2987
|
+
success: boolean;
|
|
2988
|
+
};
|
|
2989
|
+
}
|
|
2990
|
+
export namespace RemovePhone {
|
|
2991
|
+
type Params = {};
|
|
2992
|
+
type Options = JUHUU.RequestOptions;
|
|
2993
|
+
type Response = {
|
|
2994
|
+
message: string;
|
|
2995
|
+
success: boolean;
|
|
2996
|
+
};
|
|
2997
|
+
}
|
|
2998
|
+
export namespace ChangeEmailRequest {
|
|
2999
|
+
type Params = {
|
|
3000
|
+
email: string;
|
|
3001
|
+
};
|
|
3002
|
+
type Options = JUHUU.RequestOptions;
|
|
3003
|
+
type Response = {
|
|
3004
|
+
message: string;
|
|
3005
|
+
destination: string;
|
|
3006
|
+
};
|
|
3007
|
+
}
|
|
3008
|
+
export namespace ChangeEmailVerify {
|
|
3009
|
+
type Params = {
|
|
3010
|
+
email: string;
|
|
3011
|
+
code: string;
|
|
3012
|
+
};
|
|
3013
|
+
type Options = JUHUU.RequestOptions;
|
|
3014
|
+
type Response = {
|
|
3015
|
+
message: string;
|
|
3016
|
+
success: boolean;
|
|
3017
|
+
};
|
|
3018
|
+
}
|
|
3019
|
+
export namespace RemoveEmail {
|
|
3020
|
+
type Params = {};
|
|
3021
|
+
type Options = JUHUU.RequestOptions;
|
|
3022
|
+
type Response = {
|
|
3023
|
+
message: string;
|
|
3024
|
+
success: boolean;
|
|
3025
|
+
};
|
|
3026
|
+
}
|
|
3027
|
+
export namespace GetAvailableEmails {
|
|
3028
|
+
type Params = {};
|
|
3029
|
+
type Options = JUHUU.RequestOptions;
|
|
3030
|
+
type Response = {
|
|
3031
|
+
emails: string[];
|
|
3032
|
+
primaryEmail: string | null;
|
|
3033
|
+
};
|
|
3034
|
+
}
|
|
3035
|
+
export namespace SetPrimaryEmail {
|
|
3036
|
+
type Params = {
|
|
3037
|
+
email: string;
|
|
3038
|
+
};
|
|
3039
|
+
type Options = JUHUU.RequestOptions;
|
|
3040
|
+
type Response = {
|
|
3041
|
+
success: boolean;
|
|
3042
|
+
message: string;
|
|
3043
|
+
};
|
|
3044
|
+
}
|
|
2889
3045
|
export { };
|
|
2890
3046
|
}
|
|
2891
3047
|
namespace Emz {
|
|
@@ -7118,4 +7274,4 @@ declare namespace JUHUU {
|
|
|
7118
7274
|
}
|
|
7119
7275
|
}
|
|
7120
7276
|
|
|
7121
|
-
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 };
|
|
7277
|
+
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,25 @@ 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
|
+
changePhoneRequest(AuthChangePhoneRequestParams: JUHUU.User.ChangePhoneRequest.Params, AuthChangePhoneRequestOptions?: JUHUU.User.ChangePhoneRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangePhoneRequest.Response>>;
|
|
1769
|
+
changePhoneVerify(AuthChangePhoneVerifyParams: JUHUU.User.ChangePhoneVerify.Params, AuthChangePhoneVerifyOptions?: JUHUU.User.ChangePhoneVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangePhoneVerify.Response>>;
|
|
1770
|
+
removePhone(AuthRemovePhoneParams: JUHUU.User.RemovePhone.Params, AuthRemovePhoneOptions?: JUHUU.User.RemovePhone.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemovePhone.Response>>;
|
|
1771
|
+
changeEmailRequest(AuthChangeEmailRequestParams: JUHUU.User.ChangeEmailRequest.Params, AuthChangeEmailRequestOptions?: JUHUU.User.ChangeEmailRequest.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangeEmailRequest.Response>>;
|
|
1772
|
+
changeEmailVerify(AuthChangeEmailVerifyParams: JUHUU.User.ChangeEmailVerify.Params, AuthChangeEmailVerifyOptions?: JUHUU.User.ChangeEmailVerify.Options): Promise<JUHUU.HttpResponse<JUHUU.User.ChangeEmailVerify.Response>>;
|
|
1773
|
+
removeEmail(AuthRemoveEmailParams: JUHUU.User.RemoveEmail.Params, AuthRemoveEmailOptions?: JUHUU.User.RemoveEmail.Options): Promise<JUHUU.HttpResponse<JUHUU.User.RemoveEmail.Response>>;
|
|
1774
|
+
getAvailableEmails(AuthGetAvailableEmailsParams: JUHUU.User.GetAvailableEmails.Params, AuthGetAvailableEmailsOptions?: JUHUU.User.GetAvailableEmails.Options): Promise<JUHUU.HttpResponse<JUHUU.User.GetAvailableEmails.Response>>;
|
|
1775
|
+
setPrimaryEmail(AuthSetPrimaryEmailParams: JUHUU.User.SetPrimaryEmail.Params, AuthSetPrimaryEmailOptions?: JUHUU.User.SetPrimaryEmail.Options): Promise<JUHUU.HttpResponse<JUHUU.User.SetPrimaryEmail.Response>>;
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1757
1778
|
declare class SessionService extends Service {
|
|
1758
1779
|
constructor(config: JUHUU.SetupConfig);
|
|
1759
1780
|
create(SessionCreateParams: JUHUU.Session.Create.Params, SessionCreateOptions?: JUHUU.Session.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Session.Create.Response>>;
|
|
@@ -1785,10 +1806,7 @@ declare class UsersService extends Service {
|
|
|
1785
1806
|
constructor(config: JUHUU.SetupConfig);
|
|
1786
1807
|
create(UserCreateParams: JUHUU.User.Create.Params, UserCreateOptions?: JUHUU.User.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Create.Response>>;
|
|
1787
1808
|
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
1809
|
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
1810
|
list(UserListParams: JUHUU.User.List.Params, UserListOptions?: JUHUU.User.List.Options): Promise<JUHUU.HttpResponse<JUHUU.User.List.Response>>;
|
|
1793
1811
|
update(UserUpdateParams: JUHUU.User.Update.Params, UserUpdateOptions?: JUHUU.User.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.User.Update.Response>>;
|
|
1794
1812
|
memberCreate(UserInviteMemberParams: JUHUU.User.InviteMember.Params, UserInviteMemberOptions?: JUHUU.User.InviteMember.Options): Promise<JUHUU.HttpResponse<JUHUU.User.InviteMember.Response>>;
|
|
@@ -2225,6 +2243,7 @@ declare class Juhuu {
|
|
|
2225
2243
|
* Top Level Resources
|
|
2226
2244
|
*/
|
|
2227
2245
|
readonly achievements: AchievementsService;
|
|
2246
|
+
readonly auth: AuthService;
|
|
2228
2247
|
readonly sessions: SessionService;
|
|
2229
2248
|
readonly links: LinkService;
|
|
2230
2249
|
readonly users: UsersService;
|
|
@@ -2554,7 +2573,7 @@ declare namespace JUHUU {
|
|
|
2554
2573
|
userId: string;
|
|
2555
2574
|
propertyId?: string;
|
|
2556
2575
|
scheduledReadyAt?: Date;
|
|
2557
|
-
metadata
|
|
2576
|
+
metadata?: Record<string, any>;
|
|
2558
2577
|
};
|
|
2559
2578
|
type Options = JUHUU.RequestOptions;
|
|
2560
2579
|
type Response = {
|
|
@@ -2686,6 +2705,7 @@ declare namespace JUHUU {
|
|
|
2686
2705
|
locationId: string;
|
|
2687
2706
|
tariffId: string;
|
|
2688
2707
|
autoRenew: boolean;
|
|
2708
|
+
scheduledReadyAt?: Date;
|
|
2689
2709
|
};
|
|
2690
2710
|
type Options = JUHUU.RequestOptions;
|
|
2691
2711
|
type Response = {
|
|
@@ -2712,6 +2732,8 @@ declare namespace JUHUU {
|
|
|
2712
2732
|
billingAddress: DeepNullable<Address>;
|
|
2713
2733
|
billingEmail: string | null;
|
|
2714
2734
|
billingEmailVerified: boolean;
|
|
2735
|
+
billingPhone: string | null;
|
|
2736
|
+
billingPhoneVerified: boolean;
|
|
2715
2737
|
taxCodeArray: TaxCode[];
|
|
2716
2738
|
expoPushTokenArray: string[];
|
|
2717
2739
|
group: UserGroup;
|
|
@@ -2886,6 +2908,140 @@ declare namespace JUHUU {
|
|
|
2886
2908
|
url: string;
|
|
2887
2909
|
};
|
|
2888
2910
|
}
|
|
2911
|
+
export namespace Identify {
|
|
2912
|
+
type Params = {
|
|
2913
|
+
identifier: string;
|
|
2914
|
+
};
|
|
2915
|
+
type Options = JUHUU.RequestOptions;
|
|
2916
|
+
type Response = {
|
|
2917
|
+
exists: boolean;
|
|
2918
|
+
type: "email" | "phone";
|
|
2919
|
+
availableMethods: AuthMethodType[];
|
|
2920
|
+
preferredMethod: AuthMethodType | null;
|
|
2921
|
+
canRegister: boolean;
|
|
2922
|
+
};
|
|
2923
|
+
}
|
|
2924
|
+
export namespace OtpRequest {
|
|
2925
|
+
type Params = {
|
|
2926
|
+
destination: string;
|
|
2927
|
+
countryCode: PhoneCountryCode;
|
|
2928
|
+
nationalNumber: string;
|
|
2929
|
+
purpose: "login" | "register" | "verify";
|
|
2930
|
+
};
|
|
2931
|
+
type Options = JUHUU.RequestOptions;
|
|
2932
|
+
type Response = {
|
|
2933
|
+
message: string;
|
|
2934
|
+
type: "email" | "phone";
|
|
2935
|
+
destination: string;
|
|
2936
|
+
};
|
|
2937
|
+
}
|
|
2938
|
+
export namespace OtpVerify {
|
|
2939
|
+
type Params = {
|
|
2940
|
+
destination: string;
|
|
2941
|
+
countryCode: PhoneCountryCode;
|
|
2942
|
+
nationalNumber: string;
|
|
2943
|
+
code: string;
|
|
2944
|
+
purpose: "login" | "register" | "verify";
|
|
2945
|
+
name: string;
|
|
2946
|
+
billingAddress: DeepNullable<Address>;
|
|
2947
|
+
};
|
|
2948
|
+
type Options = JUHUU.RequestOptions;
|
|
2949
|
+
type Response = {
|
|
2950
|
+
accessToken: string;
|
|
2951
|
+
refreshToken: string;
|
|
2952
|
+
isNewUser: boolean;
|
|
2953
|
+
};
|
|
2954
|
+
}
|
|
2955
|
+
export namespace SetPassword {
|
|
2956
|
+
type Params = {
|
|
2957
|
+
password: string;
|
|
2958
|
+
};
|
|
2959
|
+
type Options = JUHUU.RequestOptions;
|
|
2960
|
+
type Response = {
|
|
2961
|
+
message: string;
|
|
2962
|
+
success: boolean;
|
|
2963
|
+
};
|
|
2964
|
+
}
|
|
2965
|
+
export namespace ChangePhoneRequest {
|
|
2966
|
+
type Params = {
|
|
2967
|
+
phone: string;
|
|
2968
|
+
countryCode: PhoneCountryCode;
|
|
2969
|
+
nationalNumber: string;
|
|
2970
|
+
};
|
|
2971
|
+
type Options = JUHUU.RequestOptions;
|
|
2972
|
+
type Response = {
|
|
2973
|
+
message: string;
|
|
2974
|
+
destination: string;
|
|
2975
|
+
};
|
|
2976
|
+
}
|
|
2977
|
+
export namespace ChangePhoneVerify {
|
|
2978
|
+
type Params = {
|
|
2979
|
+
phone: string;
|
|
2980
|
+
countryCode: PhoneCountryCode;
|
|
2981
|
+
nationalNumber: string;
|
|
2982
|
+
code: string;
|
|
2983
|
+
};
|
|
2984
|
+
type Options = JUHUU.RequestOptions;
|
|
2985
|
+
type Response = {
|
|
2986
|
+
message: string;
|
|
2987
|
+
success: boolean;
|
|
2988
|
+
};
|
|
2989
|
+
}
|
|
2990
|
+
export namespace RemovePhone {
|
|
2991
|
+
type Params = {};
|
|
2992
|
+
type Options = JUHUU.RequestOptions;
|
|
2993
|
+
type Response = {
|
|
2994
|
+
message: string;
|
|
2995
|
+
success: boolean;
|
|
2996
|
+
};
|
|
2997
|
+
}
|
|
2998
|
+
export namespace ChangeEmailRequest {
|
|
2999
|
+
type Params = {
|
|
3000
|
+
email: string;
|
|
3001
|
+
};
|
|
3002
|
+
type Options = JUHUU.RequestOptions;
|
|
3003
|
+
type Response = {
|
|
3004
|
+
message: string;
|
|
3005
|
+
destination: string;
|
|
3006
|
+
};
|
|
3007
|
+
}
|
|
3008
|
+
export namespace ChangeEmailVerify {
|
|
3009
|
+
type Params = {
|
|
3010
|
+
email: string;
|
|
3011
|
+
code: string;
|
|
3012
|
+
};
|
|
3013
|
+
type Options = JUHUU.RequestOptions;
|
|
3014
|
+
type Response = {
|
|
3015
|
+
message: string;
|
|
3016
|
+
success: boolean;
|
|
3017
|
+
};
|
|
3018
|
+
}
|
|
3019
|
+
export namespace RemoveEmail {
|
|
3020
|
+
type Params = {};
|
|
3021
|
+
type Options = JUHUU.RequestOptions;
|
|
3022
|
+
type Response = {
|
|
3023
|
+
message: string;
|
|
3024
|
+
success: boolean;
|
|
3025
|
+
};
|
|
3026
|
+
}
|
|
3027
|
+
export namespace GetAvailableEmails {
|
|
3028
|
+
type Params = {};
|
|
3029
|
+
type Options = JUHUU.RequestOptions;
|
|
3030
|
+
type Response = {
|
|
3031
|
+
emails: string[];
|
|
3032
|
+
primaryEmail: string | null;
|
|
3033
|
+
};
|
|
3034
|
+
}
|
|
3035
|
+
export namespace SetPrimaryEmail {
|
|
3036
|
+
type Params = {
|
|
3037
|
+
email: string;
|
|
3038
|
+
};
|
|
3039
|
+
type Options = JUHUU.RequestOptions;
|
|
3040
|
+
type Response = {
|
|
3041
|
+
success: boolean;
|
|
3042
|
+
message: string;
|
|
3043
|
+
};
|
|
3044
|
+
}
|
|
2889
3045
|
export { };
|
|
2890
3046
|
}
|
|
2891
3047
|
namespace Emz {
|
|
@@ -7118,4 +7274,4 @@ declare namespace JUHUU {
|
|
|
7118
7274
|
}
|
|
7119
7275
|
}
|
|
7120
7276
|
|
|
7121
|
-
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 };
|
|
7277
|
+
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,220 @@ 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 changePhoneRequest(AuthChangePhoneRequestParams, AuthChangePhoneRequestOptions) {
|
|
626
|
+
return await super.sendRequest(
|
|
627
|
+
{
|
|
628
|
+
method: "POST",
|
|
629
|
+
url: "auth/phone/change",
|
|
630
|
+
body: {
|
|
631
|
+
phone: AuthChangePhoneRequestParams.phone,
|
|
632
|
+
countryCode: AuthChangePhoneRequestParams.countryCode,
|
|
633
|
+
nationalNumber: AuthChangePhoneRequestParams.nationalNumber
|
|
634
|
+
},
|
|
635
|
+
authenticationNotOptional: true
|
|
636
|
+
},
|
|
637
|
+
AuthChangePhoneRequestOptions
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
async changePhoneVerify(AuthChangePhoneVerifyParams, AuthChangePhoneVerifyOptions) {
|
|
641
|
+
return await super.sendRequest(
|
|
642
|
+
{
|
|
643
|
+
method: "POST",
|
|
644
|
+
url: "auth/phone/verify",
|
|
645
|
+
body: {
|
|
646
|
+
phone: AuthChangePhoneVerifyParams.phone,
|
|
647
|
+
countryCode: AuthChangePhoneVerifyParams.countryCode,
|
|
648
|
+
nationalNumber: AuthChangePhoneVerifyParams.nationalNumber,
|
|
649
|
+
code: AuthChangePhoneVerifyParams.code
|
|
650
|
+
},
|
|
651
|
+
authenticationNotOptional: true
|
|
652
|
+
},
|
|
653
|
+
AuthChangePhoneVerifyOptions
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
async removePhone(AuthRemovePhoneParams, AuthRemovePhoneOptions) {
|
|
657
|
+
return await super.sendRequest(
|
|
658
|
+
{
|
|
659
|
+
method: "DELETE",
|
|
660
|
+
url: "auth/phone",
|
|
661
|
+
authenticationNotOptional: true,
|
|
662
|
+
body: void 0
|
|
663
|
+
},
|
|
664
|
+
AuthRemovePhoneOptions
|
|
665
|
+
);
|
|
666
|
+
}
|
|
667
|
+
async changeEmailRequest(AuthChangeEmailRequestParams, AuthChangeEmailRequestOptions) {
|
|
668
|
+
return await super.sendRequest(
|
|
669
|
+
{
|
|
670
|
+
method: "POST",
|
|
671
|
+
url: "auth/email/change",
|
|
672
|
+
body: {
|
|
673
|
+
email: AuthChangeEmailRequestParams.email
|
|
674
|
+
},
|
|
675
|
+
authenticationNotOptional: true
|
|
676
|
+
},
|
|
677
|
+
AuthChangeEmailRequestOptions
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
async changeEmailVerify(AuthChangeEmailVerifyParams, AuthChangeEmailVerifyOptions) {
|
|
681
|
+
return await super.sendRequest(
|
|
682
|
+
{
|
|
683
|
+
method: "POST",
|
|
684
|
+
url: "auth/email/verify",
|
|
685
|
+
body: {
|
|
686
|
+
email: AuthChangeEmailVerifyParams.email,
|
|
687
|
+
code: AuthChangeEmailVerifyParams.code
|
|
688
|
+
},
|
|
689
|
+
authenticationNotOptional: true
|
|
690
|
+
},
|
|
691
|
+
AuthChangeEmailVerifyOptions
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
async removeEmail(AuthRemoveEmailParams, AuthRemoveEmailOptions) {
|
|
695
|
+
return await super.sendRequest(
|
|
696
|
+
{
|
|
697
|
+
method: "DELETE",
|
|
698
|
+
url: "auth/email",
|
|
699
|
+
authenticationNotOptional: true,
|
|
700
|
+
body: void 0
|
|
701
|
+
},
|
|
702
|
+
AuthRemoveEmailOptions
|
|
703
|
+
);
|
|
704
|
+
}
|
|
705
|
+
async getAvailableEmails(AuthGetAvailableEmailsParams, AuthGetAvailableEmailsOptions) {
|
|
706
|
+
return await super.sendRequest(
|
|
707
|
+
{
|
|
708
|
+
method: "GET",
|
|
709
|
+
url: "auth/emails",
|
|
710
|
+
authenticationNotOptional: true,
|
|
711
|
+
body: void 0
|
|
712
|
+
},
|
|
713
|
+
AuthGetAvailableEmailsOptions
|
|
714
|
+
);
|
|
715
|
+
}
|
|
716
|
+
async setPrimaryEmail(AuthSetPrimaryEmailParams, AuthSetPrimaryEmailOptions) {
|
|
717
|
+
return await super.sendRequest(
|
|
718
|
+
{
|
|
719
|
+
method: "POST",
|
|
720
|
+
url: "auth/email/primary",
|
|
721
|
+
authenticationNotOptional: true,
|
|
722
|
+
body: {
|
|
723
|
+
email: AuthSetPrimaryEmailParams.email
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
AuthSetPrimaryEmailOptions
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
|
|
517
731
|
// src/sessions/sessions.service.ts
|
|
518
732
|
var SessionService = class extends Service {
|
|
519
733
|
constructor(config) {
|
|
@@ -713,15 +927,20 @@ var SessionService = class extends Service {
|
|
|
713
927
|
};
|
|
714
928
|
}
|
|
715
929
|
async checkAvailability(SessionCheckAvailabilityParams, SessionCheckAvailabilityOptions) {
|
|
930
|
+
const queryArray = [];
|
|
931
|
+
queryArray.push("locationId=" + SessionCheckAvailabilityParams.locationId);
|
|
932
|
+
queryArray.push("tariffId=" + SessionCheckAvailabilityParams.tariffId);
|
|
933
|
+
queryArray.push("autoRenew=" + SessionCheckAvailabilityParams.autoRenew);
|
|
934
|
+
if (SessionCheckAvailabilityParams.scheduledReadyAt !== void 0) {
|
|
935
|
+
queryArray.push(
|
|
936
|
+
"scheduledReadyAt=" + SessionCheckAvailabilityParams.scheduledReadyAt.toISOString()
|
|
937
|
+
);
|
|
938
|
+
}
|
|
716
939
|
return await super.sendRequest(
|
|
717
940
|
{
|
|
718
|
-
method: "
|
|
719
|
-
url: "sessions/checkAvailability",
|
|
720
|
-
body:
|
|
721
|
-
locationId: SessionCheckAvailabilityParams.locationId,
|
|
722
|
-
tariffId: SessionCheckAvailabilityParams.tariffId,
|
|
723
|
-
autoRenew: SessionCheckAvailabilityParams.autoRenew
|
|
724
|
-
},
|
|
941
|
+
method: "GET",
|
|
942
|
+
url: "sessions/checkAvailability?" + queryArray.join("&"),
|
|
943
|
+
body: void 0,
|
|
725
944
|
authenticationNotOptional: false
|
|
726
945
|
},
|
|
727
946
|
SessionCheckAvailabilityOptions
|
|
@@ -860,34 +1079,6 @@ var UsersService = class extends Service {
|
|
|
860
1079
|
UserRetrieveOptions
|
|
861
1080
|
);
|
|
862
1081
|
}
|
|
863
|
-
async registerEmailPassword(UserRegisterEmailPasswordParams, UserRegisterEmailPasswordOptions) {
|
|
864
|
-
return await super.sendRequest(
|
|
865
|
-
{
|
|
866
|
-
method: "POST",
|
|
867
|
-
url: "auth/emailPassword/register",
|
|
868
|
-
body: {
|
|
869
|
-
email: UserRegisterEmailPasswordParams.email,
|
|
870
|
-
password: UserRegisterEmailPasswordParams.password
|
|
871
|
-
},
|
|
872
|
-
authenticationNotOptional: false
|
|
873
|
-
},
|
|
874
|
-
UserRegisterEmailPasswordOptions
|
|
875
|
-
);
|
|
876
|
-
}
|
|
877
|
-
async loginEmailPassword(UserLoginEmailPasswordParams, UserLoginEmailPasswordOptions) {
|
|
878
|
-
return await super.sendRequest(
|
|
879
|
-
{
|
|
880
|
-
method: "POST",
|
|
881
|
-
url: "auth/emailPassword/login",
|
|
882
|
-
body: {
|
|
883
|
-
email: UserLoginEmailPasswordParams.email,
|
|
884
|
-
password: UserLoginEmailPasswordParams.password
|
|
885
|
-
},
|
|
886
|
-
authenticationNotOptional: false
|
|
887
|
-
},
|
|
888
|
-
UserLoginEmailPasswordOptions
|
|
889
|
-
);
|
|
890
|
-
}
|
|
891
1082
|
async paymentMethodTokens(UserPaymentMethodTokensParams, UserPaymentMethodTokensOptions) {
|
|
892
1083
|
return await super.sendRequest(
|
|
893
1084
|
{
|
|
@@ -899,20 +1090,6 @@ var UsersService = class extends Service {
|
|
|
899
1090
|
UserPaymentMethodTokensOptions
|
|
900
1091
|
);
|
|
901
1092
|
}
|
|
902
|
-
async refreshAccessToken(UserRefreshAccessTokenParams, UserRefreshAccessTokenOptions) {
|
|
903
|
-
return await super.sendRequest(
|
|
904
|
-
{
|
|
905
|
-
method: "GET",
|
|
906
|
-
url: "auth/refresh",
|
|
907
|
-
body: void 0,
|
|
908
|
-
authenticationNotOptional: true
|
|
909
|
-
},
|
|
910
|
-
{
|
|
911
|
-
accessToken: UserRefreshAccessTokenParams?.refreshToken,
|
|
912
|
-
...UserRefreshAccessTokenOptions
|
|
913
|
-
}
|
|
914
|
-
);
|
|
915
|
-
}
|
|
916
1093
|
async list(UserListParams, UserListOptions) {
|
|
917
1094
|
const queryArray = [];
|
|
918
1095
|
if (UserListParams.managementUserId !== void 0) {
|
|
@@ -5789,6 +5966,7 @@ var ConditionType = /* @__PURE__ */ ((ConditionType2) => {
|
|
|
5789
5966
|
var Juhuu = class {
|
|
5790
5967
|
constructor(config) {
|
|
5791
5968
|
this.achievements = new AchievementsService(config);
|
|
5969
|
+
this.auth = new AuthService(config);
|
|
5792
5970
|
this.sessions = new SessionService(config);
|
|
5793
5971
|
this.links = new LinkService(config);
|
|
5794
5972
|
this.users = new UsersService(config);
|
|
@@ -5843,6 +6021,7 @@ var Juhuu = class {
|
|
|
5843
6021
|
* Top Level Resources
|
|
5844
6022
|
*/
|
|
5845
6023
|
achievements;
|
|
6024
|
+
auth;
|
|
5846
6025
|
sessions;
|
|
5847
6026
|
links;
|
|
5848
6027
|
users;
|
package/dist/index.mjs
CHANGED
|
@@ -470,6 +470,220 @@ 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 changePhoneRequest(AuthChangePhoneRequestParams, AuthChangePhoneRequestOptions) {
|
|
582
|
+
return await super.sendRequest(
|
|
583
|
+
{
|
|
584
|
+
method: "POST",
|
|
585
|
+
url: "auth/phone/change",
|
|
586
|
+
body: {
|
|
587
|
+
phone: AuthChangePhoneRequestParams.phone,
|
|
588
|
+
countryCode: AuthChangePhoneRequestParams.countryCode,
|
|
589
|
+
nationalNumber: AuthChangePhoneRequestParams.nationalNumber
|
|
590
|
+
},
|
|
591
|
+
authenticationNotOptional: true
|
|
592
|
+
},
|
|
593
|
+
AuthChangePhoneRequestOptions
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
async changePhoneVerify(AuthChangePhoneVerifyParams, AuthChangePhoneVerifyOptions) {
|
|
597
|
+
return await super.sendRequest(
|
|
598
|
+
{
|
|
599
|
+
method: "POST",
|
|
600
|
+
url: "auth/phone/verify",
|
|
601
|
+
body: {
|
|
602
|
+
phone: AuthChangePhoneVerifyParams.phone,
|
|
603
|
+
countryCode: AuthChangePhoneVerifyParams.countryCode,
|
|
604
|
+
nationalNumber: AuthChangePhoneVerifyParams.nationalNumber,
|
|
605
|
+
code: AuthChangePhoneVerifyParams.code
|
|
606
|
+
},
|
|
607
|
+
authenticationNotOptional: true
|
|
608
|
+
},
|
|
609
|
+
AuthChangePhoneVerifyOptions
|
|
610
|
+
);
|
|
611
|
+
}
|
|
612
|
+
async removePhone(AuthRemovePhoneParams, AuthRemovePhoneOptions) {
|
|
613
|
+
return await super.sendRequest(
|
|
614
|
+
{
|
|
615
|
+
method: "DELETE",
|
|
616
|
+
url: "auth/phone",
|
|
617
|
+
authenticationNotOptional: true,
|
|
618
|
+
body: void 0
|
|
619
|
+
},
|
|
620
|
+
AuthRemovePhoneOptions
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
async changeEmailRequest(AuthChangeEmailRequestParams, AuthChangeEmailRequestOptions) {
|
|
624
|
+
return await super.sendRequest(
|
|
625
|
+
{
|
|
626
|
+
method: "POST",
|
|
627
|
+
url: "auth/email/change",
|
|
628
|
+
body: {
|
|
629
|
+
email: AuthChangeEmailRequestParams.email
|
|
630
|
+
},
|
|
631
|
+
authenticationNotOptional: true
|
|
632
|
+
},
|
|
633
|
+
AuthChangeEmailRequestOptions
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
async changeEmailVerify(AuthChangeEmailVerifyParams, AuthChangeEmailVerifyOptions) {
|
|
637
|
+
return await super.sendRequest(
|
|
638
|
+
{
|
|
639
|
+
method: "POST",
|
|
640
|
+
url: "auth/email/verify",
|
|
641
|
+
body: {
|
|
642
|
+
email: AuthChangeEmailVerifyParams.email,
|
|
643
|
+
code: AuthChangeEmailVerifyParams.code
|
|
644
|
+
},
|
|
645
|
+
authenticationNotOptional: true
|
|
646
|
+
},
|
|
647
|
+
AuthChangeEmailVerifyOptions
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
async removeEmail(AuthRemoveEmailParams, AuthRemoveEmailOptions) {
|
|
651
|
+
return await super.sendRequest(
|
|
652
|
+
{
|
|
653
|
+
method: "DELETE",
|
|
654
|
+
url: "auth/email",
|
|
655
|
+
authenticationNotOptional: true,
|
|
656
|
+
body: void 0
|
|
657
|
+
},
|
|
658
|
+
AuthRemoveEmailOptions
|
|
659
|
+
);
|
|
660
|
+
}
|
|
661
|
+
async getAvailableEmails(AuthGetAvailableEmailsParams, AuthGetAvailableEmailsOptions) {
|
|
662
|
+
return await super.sendRequest(
|
|
663
|
+
{
|
|
664
|
+
method: "GET",
|
|
665
|
+
url: "auth/emails",
|
|
666
|
+
authenticationNotOptional: true,
|
|
667
|
+
body: void 0
|
|
668
|
+
},
|
|
669
|
+
AuthGetAvailableEmailsOptions
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
async setPrimaryEmail(AuthSetPrimaryEmailParams, AuthSetPrimaryEmailOptions) {
|
|
673
|
+
return await super.sendRequest(
|
|
674
|
+
{
|
|
675
|
+
method: "POST",
|
|
676
|
+
url: "auth/email/primary",
|
|
677
|
+
authenticationNotOptional: true,
|
|
678
|
+
body: {
|
|
679
|
+
email: AuthSetPrimaryEmailParams.email
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
AuthSetPrimaryEmailOptions
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
|
|
473
687
|
// src/sessions/sessions.service.ts
|
|
474
688
|
var SessionService = class extends Service {
|
|
475
689
|
constructor(config) {
|
|
@@ -669,15 +883,20 @@ var SessionService = class extends Service {
|
|
|
669
883
|
};
|
|
670
884
|
}
|
|
671
885
|
async checkAvailability(SessionCheckAvailabilityParams, SessionCheckAvailabilityOptions) {
|
|
886
|
+
const queryArray = [];
|
|
887
|
+
queryArray.push("locationId=" + SessionCheckAvailabilityParams.locationId);
|
|
888
|
+
queryArray.push("tariffId=" + SessionCheckAvailabilityParams.tariffId);
|
|
889
|
+
queryArray.push("autoRenew=" + SessionCheckAvailabilityParams.autoRenew);
|
|
890
|
+
if (SessionCheckAvailabilityParams.scheduledReadyAt !== void 0) {
|
|
891
|
+
queryArray.push(
|
|
892
|
+
"scheduledReadyAt=" + SessionCheckAvailabilityParams.scheduledReadyAt.toISOString()
|
|
893
|
+
);
|
|
894
|
+
}
|
|
672
895
|
return await super.sendRequest(
|
|
673
896
|
{
|
|
674
|
-
method: "
|
|
675
|
-
url: "sessions/checkAvailability",
|
|
676
|
-
body:
|
|
677
|
-
locationId: SessionCheckAvailabilityParams.locationId,
|
|
678
|
-
tariffId: SessionCheckAvailabilityParams.tariffId,
|
|
679
|
-
autoRenew: SessionCheckAvailabilityParams.autoRenew
|
|
680
|
-
},
|
|
897
|
+
method: "GET",
|
|
898
|
+
url: "sessions/checkAvailability?" + queryArray.join("&"),
|
|
899
|
+
body: void 0,
|
|
681
900
|
authenticationNotOptional: false
|
|
682
901
|
},
|
|
683
902
|
SessionCheckAvailabilityOptions
|
|
@@ -816,34 +1035,6 @@ var UsersService = class extends Service {
|
|
|
816
1035
|
UserRetrieveOptions
|
|
817
1036
|
);
|
|
818
1037
|
}
|
|
819
|
-
async registerEmailPassword(UserRegisterEmailPasswordParams, UserRegisterEmailPasswordOptions) {
|
|
820
|
-
return await super.sendRequest(
|
|
821
|
-
{
|
|
822
|
-
method: "POST",
|
|
823
|
-
url: "auth/emailPassword/register",
|
|
824
|
-
body: {
|
|
825
|
-
email: UserRegisterEmailPasswordParams.email,
|
|
826
|
-
password: UserRegisterEmailPasswordParams.password
|
|
827
|
-
},
|
|
828
|
-
authenticationNotOptional: false
|
|
829
|
-
},
|
|
830
|
-
UserRegisterEmailPasswordOptions
|
|
831
|
-
);
|
|
832
|
-
}
|
|
833
|
-
async loginEmailPassword(UserLoginEmailPasswordParams, UserLoginEmailPasswordOptions) {
|
|
834
|
-
return await super.sendRequest(
|
|
835
|
-
{
|
|
836
|
-
method: "POST",
|
|
837
|
-
url: "auth/emailPassword/login",
|
|
838
|
-
body: {
|
|
839
|
-
email: UserLoginEmailPasswordParams.email,
|
|
840
|
-
password: UserLoginEmailPasswordParams.password
|
|
841
|
-
},
|
|
842
|
-
authenticationNotOptional: false
|
|
843
|
-
},
|
|
844
|
-
UserLoginEmailPasswordOptions
|
|
845
|
-
);
|
|
846
|
-
}
|
|
847
1038
|
async paymentMethodTokens(UserPaymentMethodTokensParams, UserPaymentMethodTokensOptions) {
|
|
848
1039
|
return await super.sendRequest(
|
|
849
1040
|
{
|
|
@@ -855,20 +1046,6 @@ var UsersService = class extends Service {
|
|
|
855
1046
|
UserPaymentMethodTokensOptions
|
|
856
1047
|
);
|
|
857
1048
|
}
|
|
858
|
-
async refreshAccessToken(UserRefreshAccessTokenParams, UserRefreshAccessTokenOptions) {
|
|
859
|
-
return await super.sendRequest(
|
|
860
|
-
{
|
|
861
|
-
method: "GET",
|
|
862
|
-
url: "auth/refresh",
|
|
863
|
-
body: void 0,
|
|
864
|
-
authenticationNotOptional: true
|
|
865
|
-
},
|
|
866
|
-
{
|
|
867
|
-
accessToken: UserRefreshAccessTokenParams?.refreshToken,
|
|
868
|
-
...UserRefreshAccessTokenOptions
|
|
869
|
-
}
|
|
870
|
-
);
|
|
871
|
-
}
|
|
872
1049
|
async list(UserListParams, UserListOptions) {
|
|
873
1050
|
const queryArray = [];
|
|
874
1051
|
if (UserListParams.managementUserId !== void 0) {
|
|
@@ -5745,6 +5922,7 @@ var ConditionType = /* @__PURE__ */ ((ConditionType2) => {
|
|
|
5745
5922
|
var Juhuu = class {
|
|
5746
5923
|
constructor(config) {
|
|
5747
5924
|
this.achievements = new AchievementsService(config);
|
|
5925
|
+
this.auth = new AuthService(config);
|
|
5748
5926
|
this.sessions = new SessionService(config);
|
|
5749
5927
|
this.links = new LinkService(config);
|
|
5750
5928
|
this.users = new UsersService(config);
|
|
@@ -5799,6 +5977,7 @@ var Juhuu = class {
|
|
|
5799
5977
|
* Top Level Resources
|
|
5800
5978
|
*/
|
|
5801
5979
|
achievements;
|
|
5980
|
+
auth;
|
|
5802
5981
|
sessions;
|
|
5803
5982
|
links;
|
|
5804
5983
|
users;
|