@zyphr-dev/node-sdk 0.1.34 → 0.1.35
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.cjs +384 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +362 -42
- package/dist/index.d.ts +362 -42
- package/dist/index.js +358 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +6 -1
- package/src/src/apis/AuthEmailOTPApi.ts +371 -0
- package/src/src/apis/index.ts +1 -0
- package/src/src/models/CheckEmailOtpAvailability200Response.ts +73 -0
- package/src/src/models/{PhoneAuthAvailabilityResponseData.ts → CheckEmailOtpAvailability200ResponseData.ts} +12 -12
- package/src/src/models/PhoneAuthAvailabilityResponse.ts +10 -10
- package/src/src/models/SendEmailOtpRegistrationRequest.ts +66 -0
- package/src/src/models/VerifyEmailOtpLoginRequest.ts +83 -0
- package/src/src/models/VerifyEmailOtpRegistrationRequest.ts +91 -0
- package/src/src/models/index.ts +5 -1
package/dist/index.js
CHANGED
|
@@ -1916,6 +1916,62 @@ function CategoryResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
1916
1916
|
};
|
|
1917
1917
|
}
|
|
1918
1918
|
|
|
1919
|
+
// src/src/models/CheckEmailOtpAvailability200ResponseData.ts
|
|
1920
|
+
function instanceOfCheckEmailOtpAvailability200ResponseData(value) {
|
|
1921
|
+
return true;
|
|
1922
|
+
}
|
|
1923
|
+
function CheckEmailOtpAvailability200ResponseDataFromJSON(json) {
|
|
1924
|
+
return CheckEmailOtpAvailability200ResponseDataFromJSONTyped(json, false);
|
|
1925
|
+
}
|
|
1926
|
+
function CheckEmailOtpAvailability200ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
1927
|
+
if (json == null) {
|
|
1928
|
+
return json;
|
|
1929
|
+
}
|
|
1930
|
+
return {
|
|
1931
|
+
"available": json["available"] == null ? void 0 : json["available"],
|
|
1932
|
+
"message": json["message"] == null ? void 0 : json["message"]
|
|
1933
|
+
};
|
|
1934
|
+
}
|
|
1935
|
+
function CheckEmailOtpAvailability200ResponseDataToJSON(json) {
|
|
1936
|
+
return CheckEmailOtpAvailability200ResponseDataToJSONTyped(json, false);
|
|
1937
|
+
}
|
|
1938
|
+
function CheckEmailOtpAvailability200ResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1939
|
+
if (value == null) {
|
|
1940
|
+
return value;
|
|
1941
|
+
}
|
|
1942
|
+
return {
|
|
1943
|
+
"available": value["available"],
|
|
1944
|
+
"message": value["message"]
|
|
1945
|
+
};
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
// src/src/models/CheckEmailOtpAvailability200Response.ts
|
|
1949
|
+
function instanceOfCheckEmailOtpAvailability200Response(value) {
|
|
1950
|
+
return true;
|
|
1951
|
+
}
|
|
1952
|
+
function CheckEmailOtpAvailability200ResponseFromJSON(json) {
|
|
1953
|
+
return CheckEmailOtpAvailability200ResponseFromJSONTyped(json, false);
|
|
1954
|
+
}
|
|
1955
|
+
function CheckEmailOtpAvailability200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
1956
|
+
if (json == null) {
|
|
1957
|
+
return json;
|
|
1958
|
+
}
|
|
1959
|
+
return {
|
|
1960
|
+
"data": json["data"] == null ? void 0 : CheckEmailOtpAvailability200ResponseDataFromJSON(json["data"])
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1963
|
+
function CheckEmailOtpAvailability200ResponseToJSON(json) {
|
|
1964
|
+
return CheckEmailOtpAvailability200ResponseToJSONTyped(json, false);
|
|
1965
|
+
}
|
|
1966
|
+
function CheckEmailOtpAvailability200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1967
|
+
if (value == null) {
|
|
1968
|
+
return value;
|
|
1969
|
+
}
|
|
1970
|
+
return {
|
|
1971
|
+
"data": CheckEmailOtpAvailability200ResponseDataToJSON(value["data"])
|
|
1972
|
+
};
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1919
1975
|
// src/src/models/ConfirmEmailVerificationRequest.ts
|
|
1920
1976
|
function instanceOfConfirmEmailVerificationRequest(value) {
|
|
1921
1977
|
if (!("token" in value) || value["token"] === void 0) return false;
|
|
@@ -7143,35 +7199,6 @@ function PayloadTooLargeErrorToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
7143
7199
|
};
|
|
7144
7200
|
}
|
|
7145
7201
|
|
|
7146
|
-
// src/src/models/PhoneAuthAvailabilityResponseData.ts
|
|
7147
|
-
function instanceOfPhoneAuthAvailabilityResponseData(value) {
|
|
7148
|
-
return true;
|
|
7149
|
-
}
|
|
7150
|
-
function PhoneAuthAvailabilityResponseDataFromJSON(json) {
|
|
7151
|
-
return PhoneAuthAvailabilityResponseDataFromJSONTyped(json, false);
|
|
7152
|
-
}
|
|
7153
|
-
function PhoneAuthAvailabilityResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
7154
|
-
if (json == null) {
|
|
7155
|
-
return json;
|
|
7156
|
-
}
|
|
7157
|
-
return {
|
|
7158
|
-
"available": json["available"] == null ? void 0 : json["available"],
|
|
7159
|
-
"message": json["message"] == null ? void 0 : json["message"]
|
|
7160
|
-
};
|
|
7161
|
-
}
|
|
7162
|
-
function PhoneAuthAvailabilityResponseDataToJSON(json) {
|
|
7163
|
-
return PhoneAuthAvailabilityResponseDataToJSONTyped(json, false);
|
|
7164
|
-
}
|
|
7165
|
-
function PhoneAuthAvailabilityResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
7166
|
-
if (value == null) {
|
|
7167
|
-
return value;
|
|
7168
|
-
}
|
|
7169
|
-
return {
|
|
7170
|
-
"available": value["available"],
|
|
7171
|
-
"message": value["message"]
|
|
7172
|
-
};
|
|
7173
|
-
}
|
|
7174
|
-
|
|
7175
7202
|
// src/src/models/PhoneAuthAvailabilityResponse.ts
|
|
7176
7203
|
function instanceOfPhoneAuthAvailabilityResponse(value) {
|
|
7177
7204
|
return true;
|
|
@@ -7184,7 +7211,7 @@ function PhoneAuthAvailabilityResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
7184
7211
|
return json;
|
|
7185
7212
|
}
|
|
7186
7213
|
return {
|
|
7187
|
-
"data": json["data"] == null ? void 0 :
|
|
7214
|
+
"data": json["data"] == null ? void 0 : CheckEmailOtpAvailability200ResponseDataFromJSON(json["data"]),
|
|
7188
7215
|
"meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
|
|
7189
7216
|
};
|
|
7190
7217
|
}
|
|
@@ -7196,7 +7223,7 @@ function PhoneAuthAvailabilityResponseToJSONTyped(value, ignoreDiscriminator = f
|
|
|
7196
7223
|
return value;
|
|
7197
7224
|
}
|
|
7198
7225
|
return {
|
|
7199
|
-
"data":
|
|
7226
|
+
"data": CheckEmailOtpAvailability200ResponseDataToJSON(value["data"]),
|
|
7200
7227
|
"meta": RequestMetaToJSON(value["meta"])
|
|
7201
7228
|
};
|
|
7202
7229
|
}
|
|
@@ -8999,6 +9026,34 @@ function SendBatchSmsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
8999
9026
|
};
|
|
9000
9027
|
}
|
|
9001
9028
|
|
|
9029
|
+
// src/src/models/SendEmailOtpRegistrationRequest.ts
|
|
9030
|
+
function instanceOfSendEmailOtpRegistrationRequest(value) {
|
|
9031
|
+
if (!("email" in value) || value["email"] === void 0) return false;
|
|
9032
|
+
return true;
|
|
9033
|
+
}
|
|
9034
|
+
function SendEmailOtpRegistrationRequestFromJSON(json) {
|
|
9035
|
+
return SendEmailOtpRegistrationRequestFromJSONTyped(json, false);
|
|
9036
|
+
}
|
|
9037
|
+
function SendEmailOtpRegistrationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
9038
|
+
if (json == null) {
|
|
9039
|
+
return json;
|
|
9040
|
+
}
|
|
9041
|
+
return {
|
|
9042
|
+
"email": json["email"]
|
|
9043
|
+
};
|
|
9044
|
+
}
|
|
9045
|
+
function SendEmailOtpRegistrationRequestToJSON(json) {
|
|
9046
|
+
return SendEmailOtpRegistrationRequestToJSONTyped(json, false);
|
|
9047
|
+
}
|
|
9048
|
+
function SendEmailOtpRegistrationRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
9049
|
+
if (value == null) {
|
|
9050
|
+
return value;
|
|
9051
|
+
}
|
|
9052
|
+
return {
|
|
9053
|
+
"email": value["email"]
|
|
9054
|
+
};
|
|
9055
|
+
}
|
|
9056
|
+
|
|
9002
9057
|
// src/src/models/SendEmailRequest.ts
|
|
9003
9058
|
function instanceOfSendEmailRequest(value) {
|
|
9004
9059
|
if (!("to" in value) || value["to"] === void 0) return false;
|
|
@@ -12532,6 +12587,74 @@ function VerifyDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
12532
12587
|
};
|
|
12533
12588
|
}
|
|
12534
12589
|
|
|
12590
|
+
// src/src/models/VerifyEmailOtpLoginRequest.ts
|
|
12591
|
+
function instanceOfVerifyEmailOtpLoginRequest(value) {
|
|
12592
|
+
if (!("email" in value) || value["email"] === void 0) return false;
|
|
12593
|
+
if (!("code" in value) || value["code"] === void 0) return false;
|
|
12594
|
+
return true;
|
|
12595
|
+
}
|
|
12596
|
+
function VerifyEmailOtpLoginRequestFromJSON(json) {
|
|
12597
|
+
return VerifyEmailOtpLoginRequestFromJSONTyped(json, false);
|
|
12598
|
+
}
|
|
12599
|
+
function VerifyEmailOtpLoginRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
12600
|
+
if (json == null) {
|
|
12601
|
+
return json;
|
|
12602
|
+
}
|
|
12603
|
+
return {
|
|
12604
|
+
"email": json["email"],
|
|
12605
|
+
"code": json["code"],
|
|
12606
|
+
"customClaims": json["custom_claims"] == null ? void 0 : json["custom_claims"]
|
|
12607
|
+
};
|
|
12608
|
+
}
|
|
12609
|
+
function VerifyEmailOtpLoginRequestToJSON(json) {
|
|
12610
|
+
return VerifyEmailOtpLoginRequestToJSONTyped(json, false);
|
|
12611
|
+
}
|
|
12612
|
+
function VerifyEmailOtpLoginRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
12613
|
+
if (value == null) {
|
|
12614
|
+
return value;
|
|
12615
|
+
}
|
|
12616
|
+
return {
|
|
12617
|
+
"email": value["email"],
|
|
12618
|
+
"code": value["code"],
|
|
12619
|
+
"custom_claims": value["customClaims"]
|
|
12620
|
+
};
|
|
12621
|
+
}
|
|
12622
|
+
|
|
12623
|
+
// src/src/models/VerifyEmailOtpRegistrationRequest.ts
|
|
12624
|
+
function instanceOfVerifyEmailOtpRegistrationRequest(value) {
|
|
12625
|
+
if (!("email" in value) || value["email"] === void 0) return false;
|
|
12626
|
+
if (!("code" in value) || value["code"] === void 0) return false;
|
|
12627
|
+
return true;
|
|
12628
|
+
}
|
|
12629
|
+
function VerifyEmailOtpRegistrationRequestFromJSON(json) {
|
|
12630
|
+
return VerifyEmailOtpRegistrationRequestFromJSONTyped(json, false);
|
|
12631
|
+
}
|
|
12632
|
+
function VerifyEmailOtpRegistrationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
12633
|
+
if (json == null) {
|
|
12634
|
+
return json;
|
|
12635
|
+
}
|
|
12636
|
+
return {
|
|
12637
|
+
"email": json["email"],
|
|
12638
|
+
"code": json["code"],
|
|
12639
|
+
"name": json["name"] == null ? void 0 : json["name"],
|
|
12640
|
+
"metadata": json["metadata"] == null ? void 0 : json["metadata"]
|
|
12641
|
+
};
|
|
12642
|
+
}
|
|
12643
|
+
function VerifyEmailOtpRegistrationRequestToJSON(json) {
|
|
12644
|
+
return VerifyEmailOtpRegistrationRequestToJSONTyped(json, false);
|
|
12645
|
+
}
|
|
12646
|
+
function VerifyEmailOtpRegistrationRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
12647
|
+
if (value == null) {
|
|
12648
|
+
return value;
|
|
12649
|
+
}
|
|
12650
|
+
return {
|
|
12651
|
+
"email": value["email"],
|
|
12652
|
+
"code": value["code"],
|
|
12653
|
+
"name": value["name"],
|
|
12654
|
+
"metadata": value["metadata"]
|
|
12655
|
+
};
|
|
12656
|
+
}
|
|
12657
|
+
|
|
12535
12658
|
// src/src/models/VerifySmsConfigData.ts
|
|
12536
12659
|
function instanceOfVerifySmsConfigData(value) {
|
|
12537
12660
|
return true;
|
|
@@ -14416,6 +14539,184 @@ function WithdrawSubscriberConsentRequestToJSONTyped(value, ignoreDiscriminator
|
|
|
14416
14539
|
};
|
|
14417
14540
|
}
|
|
14418
14541
|
|
|
14542
|
+
// src/src/apis/AuthEmailOTPApi.ts
|
|
14543
|
+
var AuthEmailOTPApi = class extends BaseAPI {
|
|
14544
|
+
/**
|
|
14545
|
+
* Check if numeric email OTP authentication is available for this application. Requires a verified sending domain on the project.
|
|
14546
|
+
* Check email OTP availability
|
|
14547
|
+
*/
|
|
14548
|
+
async checkEmailOtpAvailabilityRaw(initOverrides) {
|
|
14549
|
+
const queryParameters = {};
|
|
14550
|
+
const headerParameters = {};
|
|
14551
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
14552
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
14553
|
+
}
|
|
14554
|
+
const response = await this.request({
|
|
14555
|
+
path: `/auth/email-otp/available`,
|
|
14556
|
+
method: "GET",
|
|
14557
|
+
headers: headerParameters,
|
|
14558
|
+
query: queryParameters
|
|
14559
|
+
}, initOverrides);
|
|
14560
|
+
return new JSONApiResponse(response, (jsonValue) => CheckEmailOtpAvailability200ResponseFromJSON(jsonValue));
|
|
14561
|
+
}
|
|
14562
|
+
/**
|
|
14563
|
+
* Check if numeric email OTP authentication is available for this application. Requires a verified sending domain on the project.
|
|
14564
|
+
* Check email OTP availability
|
|
14565
|
+
*/
|
|
14566
|
+
async checkEmailOtpAvailability(initOverrides) {
|
|
14567
|
+
const response = await this.checkEmailOtpAvailabilityRaw(initOverrides);
|
|
14568
|
+
return await response.value();
|
|
14569
|
+
}
|
|
14570
|
+
/**
|
|
14571
|
+
* Send a numeric verification code to an existing user\'s email address for login.
|
|
14572
|
+
* Send email OTP for login
|
|
14573
|
+
*/
|
|
14574
|
+
async sendEmailOtpLoginRaw(requestParameters, initOverrides) {
|
|
14575
|
+
if (requestParameters["sendEmailOtpRegistrationRequest"] == null) {
|
|
14576
|
+
throw new RequiredError(
|
|
14577
|
+
"sendEmailOtpRegistrationRequest",
|
|
14578
|
+
'Required parameter "sendEmailOtpRegistrationRequest" was null or undefined when calling sendEmailOtpLogin().'
|
|
14579
|
+
);
|
|
14580
|
+
}
|
|
14581
|
+
const queryParameters = {};
|
|
14582
|
+
const headerParameters = {};
|
|
14583
|
+
headerParameters["Content-Type"] = "application/json";
|
|
14584
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
14585
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
14586
|
+
}
|
|
14587
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
14588
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
14589
|
+
}
|
|
14590
|
+
const response = await this.request({
|
|
14591
|
+
path: `/auth/email-otp/login/send`,
|
|
14592
|
+
method: "POST",
|
|
14593
|
+
headers: headerParameters,
|
|
14594
|
+
query: queryParameters,
|
|
14595
|
+
body: SendEmailOtpRegistrationRequestToJSON(requestParameters["sendEmailOtpRegistrationRequest"])
|
|
14596
|
+
}, initOverrides);
|
|
14597
|
+
return new JSONApiResponse(response, (jsonValue) => PhoneOtpSentResponseFromJSON(jsonValue));
|
|
14598
|
+
}
|
|
14599
|
+
/**
|
|
14600
|
+
* Send a numeric verification code to an existing user\'s email address for login.
|
|
14601
|
+
* Send email OTP for login
|
|
14602
|
+
*/
|
|
14603
|
+
async sendEmailOtpLogin(sendEmailOtpRegistrationRequest, initOverrides) {
|
|
14604
|
+
const response = await this.sendEmailOtpLoginRaw({ sendEmailOtpRegistrationRequest }, initOverrides);
|
|
14605
|
+
return await response.value();
|
|
14606
|
+
}
|
|
14607
|
+
/**
|
|
14608
|
+
* Send a numeric verification code to an email address for new user registration.
|
|
14609
|
+
* Send email OTP for registration
|
|
14610
|
+
*/
|
|
14611
|
+
async sendEmailOtpRegistrationRaw(requestParameters, initOverrides) {
|
|
14612
|
+
if (requestParameters["sendEmailOtpRegistrationRequest"] == null) {
|
|
14613
|
+
throw new RequiredError(
|
|
14614
|
+
"sendEmailOtpRegistrationRequest",
|
|
14615
|
+
'Required parameter "sendEmailOtpRegistrationRequest" was null or undefined when calling sendEmailOtpRegistration().'
|
|
14616
|
+
);
|
|
14617
|
+
}
|
|
14618
|
+
const queryParameters = {};
|
|
14619
|
+
const headerParameters = {};
|
|
14620
|
+
headerParameters["Content-Type"] = "application/json";
|
|
14621
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
14622
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
14623
|
+
}
|
|
14624
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
14625
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
14626
|
+
}
|
|
14627
|
+
const response = await this.request({
|
|
14628
|
+
path: `/auth/email-otp/register/send`,
|
|
14629
|
+
method: "POST",
|
|
14630
|
+
headers: headerParameters,
|
|
14631
|
+
query: queryParameters,
|
|
14632
|
+
body: SendEmailOtpRegistrationRequestToJSON(requestParameters["sendEmailOtpRegistrationRequest"])
|
|
14633
|
+
}, initOverrides);
|
|
14634
|
+
return new JSONApiResponse(response, (jsonValue) => PhoneOtpSentResponseFromJSON(jsonValue));
|
|
14635
|
+
}
|
|
14636
|
+
/**
|
|
14637
|
+
* Send a numeric verification code to an email address for new user registration.
|
|
14638
|
+
* Send email OTP for registration
|
|
14639
|
+
*/
|
|
14640
|
+
async sendEmailOtpRegistration(sendEmailOtpRegistrationRequest, initOverrides) {
|
|
14641
|
+
const response = await this.sendEmailOtpRegistrationRaw({ sendEmailOtpRegistrationRequest }, initOverrides);
|
|
14642
|
+
return await response.value();
|
|
14643
|
+
}
|
|
14644
|
+
/**
|
|
14645
|
+
* Verify the numeric code and login an existing user. If MFA is enabled, returns mfa_required with a challenge token.
|
|
14646
|
+
* Verify email OTP login
|
|
14647
|
+
*/
|
|
14648
|
+
async verifyEmailOtpLoginRaw(requestParameters, initOverrides) {
|
|
14649
|
+
if (requestParameters["verifyEmailOtpLoginRequest"] == null) {
|
|
14650
|
+
throw new RequiredError(
|
|
14651
|
+
"verifyEmailOtpLoginRequest",
|
|
14652
|
+
'Required parameter "verifyEmailOtpLoginRequest" was null or undefined when calling verifyEmailOtpLogin().'
|
|
14653
|
+
);
|
|
14654
|
+
}
|
|
14655
|
+
const queryParameters = {};
|
|
14656
|
+
const headerParameters = {};
|
|
14657
|
+
headerParameters["Content-Type"] = "application/json";
|
|
14658
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
14659
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
14660
|
+
}
|
|
14661
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
14662
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
14663
|
+
}
|
|
14664
|
+
const response = await this.request({
|
|
14665
|
+
path: `/auth/email-otp/login/verify`,
|
|
14666
|
+
method: "POST",
|
|
14667
|
+
headers: headerParameters,
|
|
14668
|
+
query: queryParameters,
|
|
14669
|
+
body: VerifyEmailOtpLoginRequestToJSON(requestParameters["verifyEmailOtpLoginRequest"])
|
|
14670
|
+
}, initOverrides);
|
|
14671
|
+
return new JSONApiResponse(response, (jsonValue) => AuthLoginResponseFromJSON(jsonValue));
|
|
14672
|
+
}
|
|
14673
|
+
/**
|
|
14674
|
+
* Verify the numeric code and login an existing user. If MFA is enabled, returns mfa_required with a challenge token.
|
|
14675
|
+
* Verify email OTP login
|
|
14676
|
+
*/
|
|
14677
|
+
async verifyEmailOtpLogin(verifyEmailOtpLoginRequest, initOverrides) {
|
|
14678
|
+
const response = await this.verifyEmailOtpLoginRaw({ verifyEmailOtpLoginRequest }, initOverrides);
|
|
14679
|
+
return await response.value();
|
|
14680
|
+
}
|
|
14681
|
+
/**
|
|
14682
|
+
* Verify the numeric code and create a new user account with the email address.
|
|
14683
|
+
* Verify email OTP registration
|
|
14684
|
+
*/
|
|
14685
|
+
async verifyEmailOtpRegistrationRaw(requestParameters, initOverrides) {
|
|
14686
|
+
if (requestParameters["verifyEmailOtpRegistrationRequest"] == null) {
|
|
14687
|
+
throw new RequiredError(
|
|
14688
|
+
"verifyEmailOtpRegistrationRequest",
|
|
14689
|
+
'Required parameter "verifyEmailOtpRegistrationRequest" was null or undefined when calling verifyEmailOtpRegistration().'
|
|
14690
|
+
);
|
|
14691
|
+
}
|
|
14692
|
+
const queryParameters = {};
|
|
14693
|
+
const headerParameters = {};
|
|
14694
|
+
headerParameters["Content-Type"] = "application/json";
|
|
14695
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
14696
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
|
|
14697
|
+
}
|
|
14698
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
14699
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
|
|
14700
|
+
}
|
|
14701
|
+
const response = await this.request({
|
|
14702
|
+
path: `/auth/email-otp/register/verify`,
|
|
14703
|
+
method: "POST",
|
|
14704
|
+
headers: headerParameters,
|
|
14705
|
+
query: queryParameters,
|
|
14706
|
+
body: VerifyEmailOtpRegistrationRequestToJSON(requestParameters["verifyEmailOtpRegistrationRequest"])
|
|
14707
|
+
}, initOverrides);
|
|
14708
|
+
return new JSONApiResponse(response, (jsonValue) => AuthResultResponseFromJSON(jsonValue));
|
|
14709
|
+
}
|
|
14710
|
+
/**
|
|
14711
|
+
* Verify the numeric code and create a new user account with the email address.
|
|
14712
|
+
* Verify email OTP registration
|
|
14713
|
+
*/
|
|
14714
|
+
async verifyEmailOtpRegistration(verifyEmailOtpRegistrationRequest, initOverrides) {
|
|
14715
|
+
const response = await this.verifyEmailOtpRegistrationRaw({ verifyEmailOtpRegistrationRequest }, initOverrides);
|
|
14716
|
+
return await response.value();
|
|
14717
|
+
}
|
|
14718
|
+
};
|
|
14719
|
+
|
|
14419
14720
|
// src/src/apis/AuthEmailTemplatesApi.ts
|
|
14420
14721
|
var AuthEmailTemplatesApi = class extends BaseAPI {
|
|
14421
14722
|
/**
|
|
@@ -22977,6 +23278,7 @@ export {
|
|
|
22977
23278
|
ApiErrorMetaToJSONTyped,
|
|
22978
23279
|
ApiErrorToJSON,
|
|
22979
23280
|
ApiErrorToJSONTyped,
|
|
23281
|
+
AuthEmailOTPApi,
|
|
22980
23282
|
AuthEmailTemplateDefaultFromJSON,
|
|
22981
23283
|
AuthEmailTemplateDefaultFromJSONTyped,
|
|
22982
23284
|
AuthEmailTemplateDefaultResponseFromJSON,
|
|
@@ -23139,6 +23441,14 @@ export {
|
|
|
23139
23441
|
CategoryResponseToJSONTyped,
|
|
23140
23442
|
CategoryToJSON,
|
|
23141
23443
|
CategoryToJSONTyped,
|
|
23444
|
+
CheckEmailOtpAvailability200ResponseDataFromJSON,
|
|
23445
|
+
CheckEmailOtpAvailability200ResponseDataFromJSONTyped,
|
|
23446
|
+
CheckEmailOtpAvailability200ResponseDataToJSON,
|
|
23447
|
+
CheckEmailOtpAvailability200ResponseDataToJSONTyped,
|
|
23448
|
+
CheckEmailOtpAvailability200ResponseFromJSON,
|
|
23449
|
+
CheckEmailOtpAvailability200ResponseFromJSONTyped,
|
|
23450
|
+
CheckEmailOtpAvailability200ResponseToJSON,
|
|
23451
|
+
CheckEmailOtpAvailability200ResponseToJSONTyped,
|
|
23142
23452
|
Configuration,
|
|
23143
23453
|
ConfirmEmailVerificationRequestFromJSON,
|
|
23144
23454
|
ConfirmEmailVerificationRequestFromJSONTyped,
|
|
@@ -23778,10 +24088,6 @@ export {
|
|
|
23778
24088
|
PayloadTooLargeErrorFromJSONTyped,
|
|
23779
24089
|
PayloadTooLargeErrorToJSON,
|
|
23780
24090
|
PayloadTooLargeErrorToJSONTyped,
|
|
23781
|
-
PhoneAuthAvailabilityResponseDataFromJSON,
|
|
23782
|
-
PhoneAuthAvailabilityResponseDataFromJSONTyped,
|
|
23783
|
-
PhoneAuthAvailabilityResponseDataToJSON,
|
|
23784
|
-
PhoneAuthAvailabilityResponseDataToJSONTyped,
|
|
23785
24091
|
PhoneAuthAvailabilityResponseFromJSON,
|
|
23786
24092
|
PhoneAuthAvailabilityResponseFromJSONTyped,
|
|
23787
24093
|
PhoneAuthAvailabilityResponseToJSON,
|
|
@@ -23994,6 +24300,10 @@ export {
|
|
|
23994
24300
|
SendBatchSmsResponseFromJSONTyped,
|
|
23995
24301
|
SendBatchSmsResponseToJSON,
|
|
23996
24302
|
SendBatchSmsResponseToJSONTyped,
|
|
24303
|
+
SendEmailOtpRegistrationRequestFromJSON,
|
|
24304
|
+
SendEmailOtpRegistrationRequestFromJSONTyped,
|
|
24305
|
+
SendEmailOtpRegistrationRequestToJSON,
|
|
24306
|
+
SendEmailOtpRegistrationRequestToJSONTyped,
|
|
23997
24307
|
SendEmailRequestFromJSON,
|
|
23998
24308
|
SendEmailRequestFromJSONTyped,
|
|
23999
24309
|
SendEmailRequestToJSON,
|
|
@@ -24462,6 +24772,14 @@ export {
|
|
|
24462
24772
|
VerifyDomainResponseFromJSONTyped,
|
|
24463
24773
|
VerifyDomainResponseToJSON,
|
|
24464
24774
|
VerifyDomainResponseToJSONTyped,
|
|
24775
|
+
VerifyEmailOtpLoginRequestFromJSON,
|
|
24776
|
+
VerifyEmailOtpLoginRequestFromJSONTyped,
|
|
24777
|
+
VerifyEmailOtpLoginRequestToJSON,
|
|
24778
|
+
VerifyEmailOtpLoginRequestToJSONTyped,
|
|
24779
|
+
VerifyEmailOtpRegistrationRequestFromJSON,
|
|
24780
|
+
VerifyEmailOtpRegistrationRequestFromJSONTyped,
|
|
24781
|
+
VerifyEmailOtpRegistrationRequestToJSON,
|
|
24782
|
+
VerifyEmailOtpRegistrationRequestToJSONTyped,
|
|
24465
24783
|
VerifySmsConfigDataFromJSON,
|
|
24466
24784
|
VerifySmsConfigDataFromJSONTyped,
|
|
24467
24785
|
VerifySmsConfigDataToJSON,
|
|
@@ -24817,6 +25135,8 @@ export {
|
|
|
24817
25135
|
instanceOfCategory,
|
|
24818
25136
|
instanceOfCategoryListResponse,
|
|
24819
25137
|
instanceOfCategoryResponse,
|
|
25138
|
+
instanceOfCheckEmailOtpAvailability200Response,
|
|
25139
|
+
instanceOfCheckEmailOtpAvailability200ResponseData,
|
|
24820
25140
|
instanceOfConfirmEmailVerificationRequest,
|
|
24821
25141
|
instanceOfConfirmEmailVerificationResponse,
|
|
24822
25142
|
instanceOfConfirmEmailVerificationResponseData,
|
|
@@ -24966,7 +25286,6 @@ export {
|
|
|
24966
25286
|
instanceOfPayloadTooLargeErrorError,
|
|
24967
25287
|
instanceOfPayloadTooLargeErrorErrorDetails,
|
|
24968
25288
|
instanceOfPhoneAuthAvailabilityResponse,
|
|
24969
|
-
instanceOfPhoneAuthAvailabilityResponseData,
|
|
24970
25289
|
instanceOfPhoneLoginVerifyRequest,
|
|
24971
25290
|
instanceOfPhoneOtpSendRequest,
|
|
24972
25291
|
instanceOfPhoneOtpSentResponse,
|
|
@@ -25016,6 +25335,7 @@ export {
|
|
|
25016
25335
|
instanceOfSendBatchSmsData,
|
|
25017
25336
|
instanceOfSendBatchSmsRequest,
|
|
25018
25337
|
instanceOfSendBatchSmsResponse,
|
|
25338
|
+
instanceOfSendEmailOtpRegistrationRequest,
|
|
25019
25339
|
instanceOfSendEmailRequest,
|
|
25020
25340
|
instanceOfSendEmailResponse,
|
|
25021
25341
|
instanceOfSendEmailResponseData,
|
|
@@ -25127,6 +25447,8 @@ export {
|
|
|
25127
25447
|
instanceOfVerificationStatusResponseData,
|
|
25128
25448
|
instanceOfVerifyDomainResponse,
|
|
25129
25449
|
instanceOfVerifyDomainResponseData,
|
|
25450
|
+
instanceOfVerifyEmailOtpLoginRequest,
|
|
25451
|
+
instanceOfVerifyEmailOtpRegistrationRequest,
|
|
25130
25452
|
instanceOfVerifySmsConfigData,
|
|
25131
25453
|
instanceOfVerifySmsConfigResponse,
|
|
25132
25454
|
instanceOfWaaSApplication,
|