@zyphr-dev/node-sdk 0.1.24 → 0.1.25
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 +331 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +333 -1
- package/dist/index.d.ts +333 -1
- package/dist/index.js +300 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +6 -0
- package/src/src/apis/AuthRegistrationApi.ts +126 -0
- package/src/src/models/AuthUser.ts +24 -0
- package/src/src/models/ConvertAnonymousUserRequest.ts +73 -0
- package/src/src/models/ConvertAnonymousUserRequestOneOf.ts +102 -0
- package/src/src/models/ConvertAnonymousUserRequestOneOf1.ts +110 -0
- package/src/src/models/ConvertAnonymousUserRequestOneOf1AppleUser.ts +73 -0
- package/src/src/models/ConvertAnonymousUserRequestOneOf1AppleUserName.ts +73 -0
- package/src/src/models/SignInAnonymouslyRequest.ts +82 -0
- package/src/src/models/index.ts +6 -0
|
@@ -0,0 +1,73 @@
|
|
|
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 ConvertAnonymousUserRequestOneOf1AppleUserName
|
|
20
|
+
*/
|
|
21
|
+
export interface ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ConvertAnonymousUserRequestOneOf1AppleUserName
|
|
26
|
+
*/
|
|
27
|
+
firstName?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ConvertAnonymousUserRequestOneOf1AppleUserName
|
|
32
|
+
*/
|
|
33
|
+
lastName?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ConvertAnonymousUserRequestOneOf1AppleUserName interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfConvertAnonymousUserRequestOneOf1AppleUserName(value: object): value is ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSON(json: any): ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
44
|
+
return ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserNameFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'firstName': json['firstName'] == null ? undefined : json['firstName'],
|
|
54
|
+
'lastName': json['lastName'] == null ? undefined : json['lastName'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserNameToJSON(json: any): ConvertAnonymousUserRequestOneOf1AppleUserName {
|
|
59
|
+
return ConvertAnonymousUserRequestOneOf1AppleUserNameToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ConvertAnonymousUserRequestOneOf1AppleUserNameToJSONTyped(value?: ConvertAnonymousUserRequestOneOf1AppleUserName | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'firstName': value['firstName'],
|
|
70
|
+
'lastName': value['lastName'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
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 SignInAnonymouslyRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SignInAnonymouslyRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Stable per-device identifier supplied by the client. Use a cryptographically-random opaque value persisted to client storage on first run.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SignInAnonymouslyRequest
|
|
26
|
+
*/
|
|
27
|
+
deviceId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional display name. If omitted, the user has no name until conversion.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SignInAnonymouslyRequest
|
|
32
|
+
*/
|
|
33
|
+
name?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {{ [key: string]: any; }}
|
|
37
|
+
* @memberof SignInAnonymouslyRequest
|
|
38
|
+
*/
|
|
39
|
+
metadata?: { [key: string]: any; };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the SignInAnonymouslyRequest interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfSignInAnonymouslyRequest(value: object): value is SignInAnonymouslyRequest {
|
|
46
|
+
if (!('deviceId' in value) || value['deviceId'] === undefined) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function SignInAnonymouslyRequestFromJSON(json: any): SignInAnonymouslyRequest {
|
|
51
|
+
return SignInAnonymouslyRequestFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function SignInAnonymouslyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SignInAnonymouslyRequest {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'deviceId': json['device_id'],
|
|
61
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
62
|
+
'metadata': json['metadata'] == null ? undefined : json['metadata'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function SignInAnonymouslyRequestToJSON(json: any): SignInAnonymouslyRequest {
|
|
67
|
+
return SignInAnonymouslyRequestToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function SignInAnonymouslyRequestToJSONTyped(value?: SignInAnonymouslyRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'device_id': value['deviceId'],
|
|
78
|
+
'name': value['name'],
|
|
79
|
+
'metadata': value['metadata'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
package/src/src/models/index.ts
CHANGED
|
@@ -49,6 +49,11 @@ export * from './ConsentRecordResponseData';
|
|
|
49
49
|
export * from './ConsentStatus';
|
|
50
50
|
export * from './ConsentStatusResponse';
|
|
51
51
|
export * from './ConsentWithdrawResponse';
|
|
52
|
+
export * from './ConvertAnonymousUserRequest';
|
|
53
|
+
export * from './ConvertAnonymousUserRequestOneOf';
|
|
54
|
+
export * from './ConvertAnonymousUserRequestOneOf1';
|
|
55
|
+
export * from './ConvertAnonymousUserRequestOneOf1AppleUser';
|
|
56
|
+
export * from './ConvertAnonymousUserRequestOneOf1AppleUserName';
|
|
52
57
|
export * from './CreateCategoryRequest';
|
|
53
58
|
export * from './CreateSubscriberRequest';
|
|
54
59
|
export * from './CreateTemplateRequest';
|
|
@@ -236,6 +241,7 @@ export * from './SessionListResponseData';
|
|
|
236
241
|
export * from './SessionListResponseDataSessionInfo';
|
|
237
242
|
export * from './SetPreferencesRequest';
|
|
238
243
|
export * from './SetPreferencesRequestPreferencesInner';
|
|
244
|
+
export * from './SignInAnonymouslyRequest';
|
|
239
245
|
export * from './SlackMessage';
|
|
240
246
|
export * from './SlackMessageListResponse';
|
|
241
247
|
export * from './SlackMessageListResponseMeta';
|