@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 CHANGED
@@ -52,6 +52,7 @@ __export(index_exports, {
52
52
  ApiErrorMetaToJSONTyped: () => ApiErrorMetaToJSONTyped,
53
53
  ApiErrorToJSON: () => ApiErrorToJSON,
54
54
  ApiErrorToJSONTyped: () => ApiErrorToJSONTyped,
55
+ AuthEmailOTPApi: () => AuthEmailOTPApi,
55
56
  AuthEmailTemplateDefaultFromJSON: () => AuthEmailTemplateDefaultFromJSON,
56
57
  AuthEmailTemplateDefaultFromJSONTyped: () => AuthEmailTemplateDefaultFromJSONTyped,
57
58
  AuthEmailTemplateDefaultResponseFromJSON: () => AuthEmailTemplateDefaultResponseFromJSON,
@@ -214,6 +215,14 @@ __export(index_exports, {
214
215
  CategoryResponseToJSONTyped: () => CategoryResponseToJSONTyped,
215
216
  CategoryToJSON: () => CategoryToJSON,
216
217
  CategoryToJSONTyped: () => CategoryToJSONTyped,
218
+ CheckEmailOtpAvailability200ResponseDataFromJSON: () => CheckEmailOtpAvailability200ResponseDataFromJSON,
219
+ CheckEmailOtpAvailability200ResponseDataFromJSONTyped: () => CheckEmailOtpAvailability200ResponseDataFromJSONTyped,
220
+ CheckEmailOtpAvailability200ResponseDataToJSON: () => CheckEmailOtpAvailability200ResponseDataToJSON,
221
+ CheckEmailOtpAvailability200ResponseDataToJSONTyped: () => CheckEmailOtpAvailability200ResponseDataToJSONTyped,
222
+ CheckEmailOtpAvailability200ResponseFromJSON: () => CheckEmailOtpAvailability200ResponseFromJSON,
223
+ CheckEmailOtpAvailability200ResponseFromJSONTyped: () => CheckEmailOtpAvailability200ResponseFromJSONTyped,
224
+ CheckEmailOtpAvailability200ResponseToJSON: () => CheckEmailOtpAvailability200ResponseToJSON,
225
+ CheckEmailOtpAvailability200ResponseToJSONTyped: () => CheckEmailOtpAvailability200ResponseToJSONTyped,
217
226
  Configuration: () => Configuration,
218
227
  ConfirmEmailVerificationRequestFromJSON: () => ConfirmEmailVerificationRequestFromJSON,
219
228
  ConfirmEmailVerificationRequestFromJSONTyped: () => ConfirmEmailVerificationRequestFromJSONTyped,
@@ -853,10 +862,6 @@ __export(index_exports, {
853
862
  PayloadTooLargeErrorFromJSONTyped: () => PayloadTooLargeErrorFromJSONTyped,
854
863
  PayloadTooLargeErrorToJSON: () => PayloadTooLargeErrorToJSON,
855
864
  PayloadTooLargeErrorToJSONTyped: () => PayloadTooLargeErrorToJSONTyped,
856
- PhoneAuthAvailabilityResponseDataFromJSON: () => PhoneAuthAvailabilityResponseDataFromJSON,
857
- PhoneAuthAvailabilityResponseDataFromJSONTyped: () => PhoneAuthAvailabilityResponseDataFromJSONTyped,
858
- PhoneAuthAvailabilityResponseDataToJSON: () => PhoneAuthAvailabilityResponseDataToJSON,
859
- PhoneAuthAvailabilityResponseDataToJSONTyped: () => PhoneAuthAvailabilityResponseDataToJSONTyped,
860
865
  PhoneAuthAvailabilityResponseFromJSON: () => PhoneAuthAvailabilityResponseFromJSON,
861
866
  PhoneAuthAvailabilityResponseFromJSONTyped: () => PhoneAuthAvailabilityResponseFromJSONTyped,
862
867
  PhoneAuthAvailabilityResponseToJSON: () => PhoneAuthAvailabilityResponseToJSON,
@@ -1069,6 +1074,10 @@ __export(index_exports, {
1069
1074
  SendBatchSmsResponseFromJSONTyped: () => SendBatchSmsResponseFromJSONTyped,
1070
1075
  SendBatchSmsResponseToJSON: () => SendBatchSmsResponseToJSON,
1071
1076
  SendBatchSmsResponseToJSONTyped: () => SendBatchSmsResponseToJSONTyped,
1077
+ SendEmailOtpRegistrationRequestFromJSON: () => SendEmailOtpRegistrationRequestFromJSON,
1078
+ SendEmailOtpRegistrationRequestFromJSONTyped: () => SendEmailOtpRegistrationRequestFromJSONTyped,
1079
+ SendEmailOtpRegistrationRequestToJSON: () => SendEmailOtpRegistrationRequestToJSON,
1080
+ SendEmailOtpRegistrationRequestToJSONTyped: () => SendEmailOtpRegistrationRequestToJSONTyped,
1072
1081
  SendEmailRequestFromJSON: () => SendEmailRequestFromJSON,
1073
1082
  SendEmailRequestFromJSONTyped: () => SendEmailRequestFromJSONTyped,
1074
1083
  SendEmailRequestToJSON: () => SendEmailRequestToJSON,
@@ -1537,6 +1546,14 @@ __export(index_exports, {
1537
1546
  VerifyDomainResponseFromJSONTyped: () => VerifyDomainResponseFromJSONTyped,
1538
1547
  VerifyDomainResponseToJSON: () => VerifyDomainResponseToJSON,
1539
1548
  VerifyDomainResponseToJSONTyped: () => VerifyDomainResponseToJSONTyped,
1549
+ VerifyEmailOtpLoginRequestFromJSON: () => VerifyEmailOtpLoginRequestFromJSON,
1550
+ VerifyEmailOtpLoginRequestFromJSONTyped: () => VerifyEmailOtpLoginRequestFromJSONTyped,
1551
+ VerifyEmailOtpLoginRequestToJSON: () => VerifyEmailOtpLoginRequestToJSON,
1552
+ VerifyEmailOtpLoginRequestToJSONTyped: () => VerifyEmailOtpLoginRequestToJSONTyped,
1553
+ VerifyEmailOtpRegistrationRequestFromJSON: () => VerifyEmailOtpRegistrationRequestFromJSON,
1554
+ VerifyEmailOtpRegistrationRequestFromJSONTyped: () => VerifyEmailOtpRegistrationRequestFromJSONTyped,
1555
+ VerifyEmailOtpRegistrationRequestToJSON: () => VerifyEmailOtpRegistrationRequestToJSON,
1556
+ VerifyEmailOtpRegistrationRequestToJSONTyped: () => VerifyEmailOtpRegistrationRequestToJSONTyped,
1540
1557
  VerifySmsConfigDataFromJSON: () => VerifySmsConfigDataFromJSON,
1541
1558
  VerifySmsConfigDataFromJSONTyped: () => VerifySmsConfigDataFromJSONTyped,
1542
1559
  VerifySmsConfigDataToJSON: () => VerifySmsConfigDataToJSON,
@@ -1892,6 +1909,8 @@ __export(index_exports, {
1892
1909
  instanceOfCategory: () => instanceOfCategory,
1893
1910
  instanceOfCategoryListResponse: () => instanceOfCategoryListResponse,
1894
1911
  instanceOfCategoryResponse: () => instanceOfCategoryResponse,
1912
+ instanceOfCheckEmailOtpAvailability200Response: () => instanceOfCheckEmailOtpAvailability200Response,
1913
+ instanceOfCheckEmailOtpAvailability200ResponseData: () => instanceOfCheckEmailOtpAvailability200ResponseData,
1895
1914
  instanceOfConfirmEmailVerificationRequest: () => instanceOfConfirmEmailVerificationRequest,
1896
1915
  instanceOfConfirmEmailVerificationResponse: () => instanceOfConfirmEmailVerificationResponse,
1897
1916
  instanceOfConfirmEmailVerificationResponseData: () => instanceOfConfirmEmailVerificationResponseData,
@@ -2041,7 +2060,6 @@ __export(index_exports, {
2041
2060
  instanceOfPayloadTooLargeErrorError: () => instanceOfPayloadTooLargeErrorError,
2042
2061
  instanceOfPayloadTooLargeErrorErrorDetails: () => instanceOfPayloadTooLargeErrorErrorDetails,
2043
2062
  instanceOfPhoneAuthAvailabilityResponse: () => instanceOfPhoneAuthAvailabilityResponse,
2044
- instanceOfPhoneAuthAvailabilityResponseData: () => instanceOfPhoneAuthAvailabilityResponseData,
2045
2063
  instanceOfPhoneLoginVerifyRequest: () => instanceOfPhoneLoginVerifyRequest,
2046
2064
  instanceOfPhoneOtpSendRequest: () => instanceOfPhoneOtpSendRequest,
2047
2065
  instanceOfPhoneOtpSentResponse: () => instanceOfPhoneOtpSentResponse,
@@ -2091,6 +2109,7 @@ __export(index_exports, {
2091
2109
  instanceOfSendBatchSmsData: () => instanceOfSendBatchSmsData,
2092
2110
  instanceOfSendBatchSmsRequest: () => instanceOfSendBatchSmsRequest,
2093
2111
  instanceOfSendBatchSmsResponse: () => instanceOfSendBatchSmsResponse,
2112
+ instanceOfSendEmailOtpRegistrationRequest: () => instanceOfSendEmailOtpRegistrationRequest,
2094
2113
  instanceOfSendEmailRequest: () => instanceOfSendEmailRequest,
2095
2114
  instanceOfSendEmailResponse: () => instanceOfSendEmailResponse,
2096
2115
  instanceOfSendEmailResponseData: () => instanceOfSendEmailResponseData,
@@ -2202,6 +2221,8 @@ __export(index_exports, {
2202
2221
  instanceOfVerificationStatusResponseData: () => instanceOfVerificationStatusResponseData,
2203
2222
  instanceOfVerifyDomainResponse: () => instanceOfVerifyDomainResponse,
2204
2223
  instanceOfVerifyDomainResponseData: () => instanceOfVerifyDomainResponseData,
2224
+ instanceOfVerifyEmailOtpLoginRequest: () => instanceOfVerifyEmailOtpLoginRequest,
2225
+ instanceOfVerifyEmailOtpRegistrationRequest: () => instanceOfVerifyEmailOtpRegistrationRequest,
2205
2226
  instanceOfVerifySmsConfigData: () => instanceOfVerifySmsConfigData,
2206
2227
  instanceOfVerifySmsConfigResponse: () => instanceOfVerifySmsConfigResponse,
2207
2228
  instanceOfWaaSApplication: () => instanceOfWaaSApplication,
@@ -4196,6 +4217,62 @@ function CategoryResponseToJSONTyped(value, ignoreDiscriminator = false) {
4196
4217
  };
4197
4218
  }
4198
4219
 
4220
+ // src/src/models/CheckEmailOtpAvailability200ResponseData.ts
4221
+ function instanceOfCheckEmailOtpAvailability200ResponseData(value) {
4222
+ return true;
4223
+ }
4224
+ function CheckEmailOtpAvailability200ResponseDataFromJSON(json) {
4225
+ return CheckEmailOtpAvailability200ResponseDataFromJSONTyped(json, false);
4226
+ }
4227
+ function CheckEmailOtpAvailability200ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4228
+ if (json == null) {
4229
+ return json;
4230
+ }
4231
+ return {
4232
+ "available": json["available"] == null ? void 0 : json["available"],
4233
+ "message": json["message"] == null ? void 0 : json["message"]
4234
+ };
4235
+ }
4236
+ function CheckEmailOtpAvailability200ResponseDataToJSON(json) {
4237
+ return CheckEmailOtpAvailability200ResponseDataToJSONTyped(json, false);
4238
+ }
4239
+ function CheckEmailOtpAvailability200ResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
4240
+ if (value == null) {
4241
+ return value;
4242
+ }
4243
+ return {
4244
+ "available": value["available"],
4245
+ "message": value["message"]
4246
+ };
4247
+ }
4248
+
4249
+ // src/src/models/CheckEmailOtpAvailability200Response.ts
4250
+ function instanceOfCheckEmailOtpAvailability200Response(value) {
4251
+ return true;
4252
+ }
4253
+ function CheckEmailOtpAvailability200ResponseFromJSON(json) {
4254
+ return CheckEmailOtpAvailability200ResponseFromJSONTyped(json, false);
4255
+ }
4256
+ function CheckEmailOtpAvailability200ResponseFromJSONTyped(json, ignoreDiscriminator) {
4257
+ if (json == null) {
4258
+ return json;
4259
+ }
4260
+ return {
4261
+ "data": json["data"] == null ? void 0 : CheckEmailOtpAvailability200ResponseDataFromJSON(json["data"])
4262
+ };
4263
+ }
4264
+ function CheckEmailOtpAvailability200ResponseToJSON(json) {
4265
+ return CheckEmailOtpAvailability200ResponseToJSONTyped(json, false);
4266
+ }
4267
+ function CheckEmailOtpAvailability200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
4268
+ if (value == null) {
4269
+ return value;
4270
+ }
4271
+ return {
4272
+ "data": CheckEmailOtpAvailability200ResponseDataToJSON(value["data"])
4273
+ };
4274
+ }
4275
+
4199
4276
  // src/src/models/ConfirmEmailVerificationRequest.ts
4200
4277
  function instanceOfConfirmEmailVerificationRequest(value) {
4201
4278
  if (!("token" in value) || value["token"] === void 0) return false;
@@ -9423,35 +9500,6 @@ function PayloadTooLargeErrorToJSONTyped(value, ignoreDiscriminator = false) {
9423
9500
  };
9424
9501
  }
9425
9502
 
9426
- // src/src/models/PhoneAuthAvailabilityResponseData.ts
9427
- function instanceOfPhoneAuthAvailabilityResponseData(value) {
9428
- return true;
9429
- }
9430
- function PhoneAuthAvailabilityResponseDataFromJSON(json) {
9431
- return PhoneAuthAvailabilityResponseDataFromJSONTyped(json, false);
9432
- }
9433
- function PhoneAuthAvailabilityResponseDataFromJSONTyped(json, ignoreDiscriminator) {
9434
- if (json == null) {
9435
- return json;
9436
- }
9437
- return {
9438
- "available": json["available"] == null ? void 0 : json["available"],
9439
- "message": json["message"] == null ? void 0 : json["message"]
9440
- };
9441
- }
9442
- function PhoneAuthAvailabilityResponseDataToJSON(json) {
9443
- return PhoneAuthAvailabilityResponseDataToJSONTyped(json, false);
9444
- }
9445
- function PhoneAuthAvailabilityResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
9446
- if (value == null) {
9447
- return value;
9448
- }
9449
- return {
9450
- "available": value["available"],
9451
- "message": value["message"]
9452
- };
9453
- }
9454
-
9455
9503
  // src/src/models/PhoneAuthAvailabilityResponse.ts
9456
9504
  function instanceOfPhoneAuthAvailabilityResponse(value) {
9457
9505
  return true;
@@ -9464,7 +9512,7 @@ function PhoneAuthAvailabilityResponseFromJSONTyped(json, ignoreDiscriminator) {
9464
9512
  return json;
9465
9513
  }
9466
9514
  return {
9467
- "data": json["data"] == null ? void 0 : PhoneAuthAvailabilityResponseDataFromJSON(json["data"]),
9515
+ "data": json["data"] == null ? void 0 : CheckEmailOtpAvailability200ResponseDataFromJSON(json["data"]),
9468
9516
  "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
9469
9517
  };
9470
9518
  }
@@ -9476,7 +9524,7 @@ function PhoneAuthAvailabilityResponseToJSONTyped(value, ignoreDiscriminator = f
9476
9524
  return value;
9477
9525
  }
9478
9526
  return {
9479
- "data": PhoneAuthAvailabilityResponseDataToJSON(value["data"]),
9527
+ "data": CheckEmailOtpAvailability200ResponseDataToJSON(value["data"]),
9480
9528
  "meta": RequestMetaToJSON(value["meta"])
9481
9529
  };
9482
9530
  }
@@ -11279,6 +11327,34 @@ function SendBatchSmsResponseToJSONTyped(value, ignoreDiscriminator = false) {
11279
11327
  };
11280
11328
  }
11281
11329
 
11330
+ // src/src/models/SendEmailOtpRegistrationRequest.ts
11331
+ function instanceOfSendEmailOtpRegistrationRequest(value) {
11332
+ if (!("email" in value) || value["email"] === void 0) return false;
11333
+ return true;
11334
+ }
11335
+ function SendEmailOtpRegistrationRequestFromJSON(json) {
11336
+ return SendEmailOtpRegistrationRequestFromJSONTyped(json, false);
11337
+ }
11338
+ function SendEmailOtpRegistrationRequestFromJSONTyped(json, ignoreDiscriminator) {
11339
+ if (json == null) {
11340
+ return json;
11341
+ }
11342
+ return {
11343
+ "email": json["email"]
11344
+ };
11345
+ }
11346
+ function SendEmailOtpRegistrationRequestToJSON(json) {
11347
+ return SendEmailOtpRegistrationRequestToJSONTyped(json, false);
11348
+ }
11349
+ function SendEmailOtpRegistrationRequestToJSONTyped(value, ignoreDiscriminator = false) {
11350
+ if (value == null) {
11351
+ return value;
11352
+ }
11353
+ return {
11354
+ "email": value["email"]
11355
+ };
11356
+ }
11357
+
11282
11358
  // src/src/models/SendEmailRequest.ts
11283
11359
  function instanceOfSendEmailRequest(value) {
11284
11360
  if (!("to" in value) || value["to"] === void 0) return false;
@@ -14812,6 +14888,74 @@ function VerifyDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
14812
14888
  };
14813
14889
  }
14814
14890
 
14891
+ // src/src/models/VerifyEmailOtpLoginRequest.ts
14892
+ function instanceOfVerifyEmailOtpLoginRequest(value) {
14893
+ if (!("email" in value) || value["email"] === void 0) return false;
14894
+ if (!("code" in value) || value["code"] === void 0) return false;
14895
+ return true;
14896
+ }
14897
+ function VerifyEmailOtpLoginRequestFromJSON(json) {
14898
+ return VerifyEmailOtpLoginRequestFromJSONTyped(json, false);
14899
+ }
14900
+ function VerifyEmailOtpLoginRequestFromJSONTyped(json, ignoreDiscriminator) {
14901
+ if (json == null) {
14902
+ return json;
14903
+ }
14904
+ return {
14905
+ "email": json["email"],
14906
+ "code": json["code"],
14907
+ "customClaims": json["custom_claims"] == null ? void 0 : json["custom_claims"]
14908
+ };
14909
+ }
14910
+ function VerifyEmailOtpLoginRequestToJSON(json) {
14911
+ return VerifyEmailOtpLoginRequestToJSONTyped(json, false);
14912
+ }
14913
+ function VerifyEmailOtpLoginRequestToJSONTyped(value, ignoreDiscriminator = false) {
14914
+ if (value == null) {
14915
+ return value;
14916
+ }
14917
+ return {
14918
+ "email": value["email"],
14919
+ "code": value["code"],
14920
+ "custom_claims": value["customClaims"]
14921
+ };
14922
+ }
14923
+
14924
+ // src/src/models/VerifyEmailOtpRegistrationRequest.ts
14925
+ function instanceOfVerifyEmailOtpRegistrationRequest(value) {
14926
+ if (!("email" in value) || value["email"] === void 0) return false;
14927
+ if (!("code" in value) || value["code"] === void 0) return false;
14928
+ return true;
14929
+ }
14930
+ function VerifyEmailOtpRegistrationRequestFromJSON(json) {
14931
+ return VerifyEmailOtpRegistrationRequestFromJSONTyped(json, false);
14932
+ }
14933
+ function VerifyEmailOtpRegistrationRequestFromJSONTyped(json, ignoreDiscriminator) {
14934
+ if (json == null) {
14935
+ return json;
14936
+ }
14937
+ return {
14938
+ "email": json["email"],
14939
+ "code": json["code"],
14940
+ "name": json["name"] == null ? void 0 : json["name"],
14941
+ "metadata": json["metadata"] == null ? void 0 : json["metadata"]
14942
+ };
14943
+ }
14944
+ function VerifyEmailOtpRegistrationRequestToJSON(json) {
14945
+ return VerifyEmailOtpRegistrationRequestToJSONTyped(json, false);
14946
+ }
14947
+ function VerifyEmailOtpRegistrationRequestToJSONTyped(value, ignoreDiscriminator = false) {
14948
+ if (value == null) {
14949
+ return value;
14950
+ }
14951
+ return {
14952
+ "email": value["email"],
14953
+ "code": value["code"],
14954
+ "name": value["name"],
14955
+ "metadata": value["metadata"]
14956
+ };
14957
+ }
14958
+
14815
14959
  // src/src/models/VerifySmsConfigData.ts
14816
14960
  function instanceOfVerifySmsConfigData(value) {
14817
14961
  return true;
@@ -16696,6 +16840,184 @@ function WithdrawSubscriberConsentRequestToJSONTyped(value, ignoreDiscriminator
16696
16840
  };
16697
16841
  }
16698
16842
 
16843
+ // src/src/apis/AuthEmailOTPApi.ts
16844
+ var AuthEmailOTPApi = class extends BaseAPI {
16845
+ /**
16846
+ * Check if numeric email OTP authentication is available for this application. Requires a verified sending domain on the project.
16847
+ * Check email OTP availability
16848
+ */
16849
+ async checkEmailOtpAvailabilityRaw(initOverrides) {
16850
+ const queryParameters = {};
16851
+ const headerParameters = {};
16852
+ if (this.configuration && this.configuration.apiKey) {
16853
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
16854
+ }
16855
+ const response = await this.request({
16856
+ path: `/auth/email-otp/available`,
16857
+ method: "GET",
16858
+ headers: headerParameters,
16859
+ query: queryParameters
16860
+ }, initOverrides);
16861
+ return new JSONApiResponse(response, (jsonValue) => CheckEmailOtpAvailability200ResponseFromJSON(jsonValue));
16862
+ }
16863
+ /**
16864
+ * Check if numeric email OTP authentication is available for this application. Requires a verified sending domain on the project.
16865
+ * Check email OTP availability
16866
+ */
16867
+ async checkEmailOtpAvailability(initOverrides) {
16868
+ const response = await this.checkEmailOtpAvailabilityRaw(initOverrides);
16869
+ return await response.value();
16870
+ }
16871
+ /**
16872
+ * Send a numeric verification code to an existing user\'s email address for login.
16873
+ * Send email OTP for login
16874
+ */
16875
+ async sendEmailOtpLoginRaw(requestParameters, initOverrides) {
16876
+ if (requestParameters["sendEmailOtpRegistrationRequest"] == null) {
16877
+ throw new RequiredError(
16878
+ "sendEmailOtpRegistrationRequest",
16879
+ 'Required parameter "sendEmailOtpRegistrationRequest" was null or undefined when calling sendEmailOtpLogin().'
16880
+ );
16881
+ }
16882
+ const queryParameters = {};
16883
+ const headerParameters = {};
16884
+ headerParameters["Content-Type"] = "application/json";
16885
+ if (this.configuration && this.configuration.apiKey) {
16886
+ headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
16887
+ }
16888
+ if (this.configuration && this.configuration.apiKey) {
16889
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
16890
+ }
16891
+ const response = await this.request({
16892
+ path: `/auth/email-otp/login/send`,
16893
+ method: "POST",
16894
+ headers: headerParameters,
16895
+ query: queryParameters,
16896
+ body: SendEmailOtpRegistrationRequestToJSON(requestParameters["sendEmailOtpRegistrationRequest"])
16897
+ }, initOverrides);
16898
+ return new JSONApiResponse(response, (jsonValue) => PhoneOtpSentResponseFromJSON(jsonValue));
16899
+ }
16900
+ /**
16901
+ * Send a numeric verification code to an existing user\'s email address for login.
16902
+ * Send email OTP for login
16903
+ */
16904
+ async sendEmailOtpLogin(sendEmailOtpRegistrationRequest, initOverrides) {
16905
+ const response = await this.sendEmailOtpLoginRaw({ sendEmailOtpRegistrationRequest }, initOverrides);
16906
+ return await response.value();
16907
+ }
16908
+ /**
16909
+ * Send a numeric verification code to an email address for new user registration.
16910
+ * Send email OTP for registration
16911
+ */
16912
+ async sendEmailOtpRegistrationRaw(requestParameters, initOverrides) {
16913
+ if (requestParameters["sendEmailOtpRegistrationRequest"] == null) {
16914
+ throw new RequiredError(
16915
+ "sendEmailOtpRegistrationRequest",
16916
+ 'Required parameter "sendEmailOtpRegistrationRequest" was null or undefined when calling sendEmailOtpRegistration().'
16917
+ );
16918
+ }
16919
+ const queryParameters = {};
16920
+ const headerParameters = {};
16921
+ headerParameters["Content-Type"] = "application/json";
16922
+ if (this.configuration && this.configuration.apiKey) {
16923
+ headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
16924
+ }
16925
+ if (this.configuration && this.configuration.apiKey) {
16926
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
16927
+ }
16928
+ const response = await this.request({
16929
+ path: `/auth/email-otp/register/send`,
16930
+ method: "POST",
16931
+ headers: headerParameters,
16932
+ query: queryParameters,
16933
+ body: SendEmailOtpRegistrationRequestToJSON(requestParameters["sendEmailOtpRegistrationRequest"])
16934
+ }, initOverrides);
16935
+ return new JSONApiResponse(response, (jsonValue) => PhoneOtpSentResponseFromJSON(jsonValue));
16936
+ }
16937
+ /**
16938
+ * Send a numeric verification code to an email address for new user registration.
16939
+ * Send email OTP for registration
16940
+ */
16941
+ async sendEmailOtpRegistration(sendEmailOtpRegistrationRequest, initOverrides) {
16942
+ const response = await this.sendEmailOtpRegistrationRaw({ sendEmailOtpRegistrationRequest }, initOverrides);
16943
+ return await response.value();
16944
+ }
16945
+ /**
16946
+ * Verify the numeric code and login an existing user. If MFA is enabled, returns mfa_required with a challenge token.
16947
+ * Verify email OTP login
16948
+ */
16949
+ async verifyEmailOtpLoginRaw(requestParameters, initOverrides) {
16950
+ if (requestParameters["verifyEmailOtpLoginRequest"] == null) {
16951
+ throw new RequiredError(
16952
+ "verifyEmailOtpLoginRequest",
16953
+ 'Required parameter "verifyEmailOtpLoginRequest" was null or undefined when calling verifyEmailOtpLogin().'
16954
+ );
16955
+ }
16956
+ const queryParameters = {};
16957
+ const headerParameters = {};
16958
+ headerParameters["Content-Type"] = "application/json";
16959
+ if (this.configuration && this.configuration.apiKey) {
16960
+ headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
16961
+ }
16962
+ if (this.configuration && this.configuration.apiKey) {
16963
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
16964
+ }
16965
+ const response = await this.request({
16966
+ path: `/auth/email-otp/login/verify`,
16967
+ method: "POST",
16968
+ headers: headerParameters,
16969
+ query: queryParameters,
16970
+ body: VerifyEmailOtpLoginRequestToJSON(requestParameters["verifyEmailOtpLoginRequest"])
16971
+ }, initOverrides);
16972
+ return new JSONApiResponse(response, (jsonValue) => AuthLoginResponseFromJSON(jsonValue));
16973
+ }
16974
+ /**
16975
+ * Verify the numeric code and login an existing user. If MFA is enabled, returns mfa_required with a challenge token.
16976
+ * Verify email OTP login
16977
+ */
16978
+ async verifyEmailOtpLogin(verifyEmailOtpLoginRequest, initOverrides) {
16979
+ const response = await this.verifyEmailOtpLoginRaw({ verifyEmailOtpLoginRequest }, initOverrides);
16980
+ return await response.value();
16981
+ }
16982
+ /**
16983
+ * Verify the numeric code and create a new user account with the email address.
16984
+ * Verify email OTP registration
16985
+ */
16986
+ async verifyEmailOtpRegistrationRaw(requestParameters, initOverrides) {
16987
+ if (requestParameters["verifyEmailOtpRegistrationRequest"] == null) {
16988
+ throw new RequiredError(
16989
+ "verifyEmailOtpRegistrationRequest",
16990
+ 'Required parameter "verifyEmailOtpRegistrationRequest" was null or undefined when calling verifyEmailOtpRegistration().'
16991
+ );
16992
+ }
16993
+ const queryParameters = {};
16994
+ const headerParameters = {};
16995
+ headerParameters["Content-Type"] = "application/json";
16996
+ if (this.configuration && this.configuration.apiKey) {
16997
+ headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret");
16998
+ }
16999
+ if (this.configuration && this.configuration.apiKey) {
17000
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
17001
+ }
17002
+ const response = await this.request({
17003
+ path: `/auth/email-otp/register/verify`,
17004
+ method: "POST",
17005
+ headers: headerParameters,
17006
+ query: queryParameters,
17007
+ body: VerifyEmailOtpRegistrationRequestToJSON(requestParameters["verifyEmailOtpRegistrationRequest"])
17008
+ }, initOverrides);
17009
+ return new JSONApiResponse(response, (jsonValue) => AuthResultResponseFromJSON(jsonValue));
17010
+ }
17011
+ /**
17012
+ * Verify the numeric code and create a new user account with the email address.
17013
+ * Verify email OTP registration
17014
+ */
17015
+ async verifyEmailOtpRegistration(verifyEmailOtpRegistrationRequest, initOverrides) {
17016
+ const response = await this.verifyEmailOtpRegistrationRaw({ verifyEmailOtpRegistrationRequest }, initOverrides);
17017
+ return await response.value();
17018
+ }
17019
+ };
17020
+
16699
17021
  // src/src/apis/AuthEmailTemplatesApi.ts
16700
17022
  var AuthEmailTemplatesApi = class extends BaseAPI {
16701
17023
  /**
@@ -25258,6 +25580,7 @@ var SDK_VERSION = "0.1.0";
25258
25580
  ApiErrorMetaToJSONTyped,
25259
25581
  ApiErrorToJSON,
25260
25582
  ApiErrorToJSONTyped,
25583
+ AuthEmailOTPApi,
25261
25584
  AuthEmailTemplateDefaultFromJSON,
25262
25585
  AuthEmailTemplateDefaultFromJSONTyped,
25263
25586
  AuthEmailTemplateDefaultResponseFromJSON,
@@ -25420,6 +25743,14 @@ var SDK_VERSION = "0.1.0";
25420
25743
  CategoryResponseToJSONTyped,
25421
25744
  CategoryToJSON,
25422
25745
  CategoryToJSONTyped,
25746
+ CheckEmailOtpAvailability200ResponseDataFromJSON,
25747
+ CheckEmailOtpAvailability200ResponseDataFromJSONTyped,
25748
+ CheckEmailOtpAvailability200ResponseDataToJSON,
25749
+ CheckEmailOtpAvailability200ResponseDataToJSONTyped,
25750
+ CheckEmailOtpAvailability200ResponseFromJSON,
25751
+ CheckEmailOtpAvailability200ResponseFromJSONTyped,
25752
+ CheckEmailOtpAvailability200ResponseToJSON,
25753
+ CheckEmailOtpAvailability200ResponseToJSONTyped,
25423
25754
  Configuration,
25424
25755
  ConfirmEmailVerificationRequestFromJSON,
25425
25756
  ConfirmEmailVerificationRequestFromJSONTyped,
@@ -26059,10 +26390,6 @@ var SDK_VERSION = "0.1.0";
26059
26390
  PayloadTooLargeErrorFromJSONTyped,
26060
26391
  PayloadTooLargeErrorToJSON,
26061
26392
  PayloadTooLargeErrorToJSONTyped,
26062
- PhoneAuthAvailabilityResponseDataFromJSON,
26063
- PhoneAuthAvailabilityResponseDataFromJSONTyped,
26064
- PhoneAuthAvailabilityResponseDataToJSON,
26065
- PhoneAuthAvailabilityResponseDataToJSONTyped,
26066
26393
  PhoneAuthAvailabilityResponseFromJSON,
26067
26394
  PhoneAuthAvailabilityResponseFromJSONTyped,
26068
26395
  PhoneAuthAvailabilityResponseToJSON,
@@ -26275,6 +26602,10 @@ var SDK_VERSION = "0.1.0";
26275
26602
  SendBatchSmsResponseFromJSONTyped,
26276
26603
  SendBatchSmsResponseToJSON,
26277
26604
  SendBatchSmsResponseToJSONTyped,
26605
+ SendEmailOtpRegistrationRequestFromJSON,
26606
+ SendEmailOtpRegistrationRequestFromJSONTyped,
26607
+ SendEmailOtpRegistrationRequestToJSON,
26608
+ SendEmailOtpRegistrationRequestToJSONTyped,
26278
26609
  SendEmailRequestFromJSON,
26279
26610
  SendEmailRequestFromJSONTyped,
26280
26611
  SendEmailRequestToJSON,
@@ -26743,6 +27074,14 @@ var SDK_VERSION = "0.1.0";
26743
27074
  VerifyDomainResponseFromJSONTyped,
26744
27075
  VerifyDomainResponseToJSON,
26745
27076
  VerifyDomainResponseToJSONTyped,
27077
+ VerifyEmailOtpLoginRequestFromJSON,
27078
+ VerifyEmailOtpLoginRequestFromJSONTyped,
27079
+ VerifyEmailOtpLoginRequestToJSON,
27080
+ VerifyEmailOtpLoginRequestToJSONTyped,
27081
+ VerifyEmailOtpRegistrationRequestFromJSON,
27082
+ VerifyEmailOtpRegistrationRequestFromJSONTyped,
27083
+ VerifyEmailOtpRegistrationRequestToJSON,
27084
+ VerifyEmailOtpRegistrationRequestToJSONTyped,
26746
27085
  VerifySmsConfigDataFromJSON,
26747
27086
  VerifySmsConfigDataFromJSONTyped,
26748
27087
  VerifySmsConfigDataToJSON,
@@ -27098,6 +27437,8 @@ var SDK_VERSION = "0.1.0";
27098
27437
  instanceOfCategory,
27099
27438
  instanceOfCategoryListResponse,
27100
27439
  instanceOfCategoryResponse,
27440
+ instanceOfCheckEmailOtpAvailability200Response,
27441
+ instanceOfCheckEmailOtpAvailability200ResponseData,
27101
27442
  instanceOfConfirmEmailVerificationRequest,
27102
27443
  instanceOfConfirmEmailVerificationResponse,
27103
27444
  instanceOfConfirmEmailVerificationResponseData,
@@ -27247,7 +27588,6 @@ var SDK_VERSION = "0.1.0";
27247
27588
  instanceOfPayloadTooLargeErrorError,
27248
27589
  instanceOfPayloadTooLargeErrorErrorDetails,
27249
27590
  instanceOfPhoneAuthAvailabilityResponse,
27250
- instanceOfPhoneAuthAvailabilityResponseData,
27251
27591
  instanceOfPhoneLoginVerifyRequest,
27252
27592
  instanceOfPhoneOtpSendRequest,
27253
27593
  instanceOfPhoneOtpSentResponse,
@@ -27297,6 +27637,7 @@ var SDK_VERSION = "0.1.0";
27297
27637
  instanceOfSendBatchSmsData,
27298
27638
  instanceOfSendBatchSmsRequest,
27299
27639
  instanceOfSendBatchSmsResponse,
27640
+ instanceOfSendEmailOtpRegistrationRequest,
27300
27641
  instanceOfSendEmailRequest,
27301
27642
  instanceOfSendEmailResponse,
27302
27643
  instanceOfSendEmailResponseData,
@@ -27408,6 +27749,8 @@ var SDK_VERSION = "0.1.0";
27408
27749
  instanceOfVerificationStatusResponseData,
27409
27750
  instanceOfVerifyDomainResponse,
27410
27751
  instanceOfVerifyDomainResponseData,
27752
+ instanceOfVerifyEmailOtpLoginRequest,
27753
+ instanceOfVerifyEmailOtpRegistrationRequest,
27411
27754
  instanceOfVerifySmsConfigData,
27412
27755
  instanceOfVerifySmsConfigResponse,
27413
27756
  instanceOfWaaSApplication,