@zyphr-dev/node-sdk 0.1.34 → 0.1.36
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 +307 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +288 -1
- package/dist/index.d.ts +288 -1
- package/dist/index.js +291 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/src/.openapi-generator/FILES +4 -0
- package/src/client.ts +3 -0
- package/src/src/apis/AuthEmailOTPApi.ts +371 -0
- package/src/src/apis/index.ts +1 -0
- 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 +3 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface VerifyEmailOtpRegistrationRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface VerifyEmailOtpRegistrationRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof VerifyEmailOtpRegistrationRequest
|
|
26
|
+
*/
|
|
27
|
+
email: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof VerifyEmailOtpRegistrationRequest
|
|
32
|
+
*/
|
|
33
|
+
code: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof VerifyEmailOtpRegistrationRequest
|
|
38
|
+
*/
|
|
39
|
+
name?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {object}
|
|
43
|
+
* @memberof VerifyEmailOtpRegistrationRequest
|
|
44
|
+
*/
|
|
45
|
+
metadata?: object;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the VerifyEmailOtpRegistrationRequest interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfVerifyEmailOtpRegistrationRequest(value: object): value is VerifyEmailOtpRegistrationRequest {
|
|
52
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
53
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function VerifyEmailOtpRegistrationRequestFromJSON(json: any): VerifyEmailOtpRegistrationRequest {
|
|
58
|
+
return VerifyEmailOtpRegistrationRequestFromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function VerifyEmailOtpRegistrationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerifyEmailOtpRegistrationRequest {
|
|
62
|
+
if (json == null) {
|
|
63
|
+
return json;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'email': json['email'],
|
|
68
|
+
'code': json['code'],
|
|
69
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
70
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function VerifyEmailOtpRegistrationRequestToJSON(json: any): VerifyEmailOtpRegistrationRequest {
|
|
75
|
+
return VerifyEmailOtpRegistrationRequestToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function VerifyEmailOtpRegistrationRequestToJSONTyped(value?: VerifyEmailOtpRegistrationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
79
|
+
if (value == null) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'email': value['email'],
|
|
86
|
+
'code': value['code'],
|
|
87
|
+
'name': value['name'],
|
|
88
|
+
'metadata': value['metadata'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
package/src/src/models/index.ts
CHANGED
|
@@ -243,6 +243,7 @@ export * from './SendBatchInAppResponse';
|
|
|
243
243
|
export * from './SendBatchSmsData';
|
|
244
244
|
export * from './SendBatchSmsRequest';
|
|
245
245
|
export * from './SendBatchSmsResponse';
|
|
246
|
+
export * from './SendEmailOtpRegistrationRequest';
|
|
246
247
|
export * from './SendEmailRequest';
|
|
247
248
|
export * from './SendEmailResponse';
|
|
248
249
|
export * from './SendEmailResponseData';
|
|
@@ -354,6 +355,8 @@ export * from './VerificationStatusResponse';
|
|
|
354
355
|
export * from './VerificationStatusResponseData';
|
|
355
356
|
export * from './VerifyDomainResponse';
|
|
356
357
|
export * from './VerifyDomainResponseData';
|
|
358
|
+
export * from './VerifyEmailOtpLoginRequest';
|
|
359
|
+
export * from './VerifyEmailOtpRegistrationRequest';
|
|
357
360
|
export * from './VerifySmsConfigData';
|
|
358
361
|
export * from './VerifySmsConfigResponse';
|
|
359
362
|
export * from './WaaSApplication';
|