@zyphr-dev/node-sdk 0.1.9 → 0.1.12

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.
@@ -0,0 +1,65 @@
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 MarkAllSubscriberNotificationsReadRequest
20
+ */
21
+ export interface MarkAllSubscriberNotificationsReadRequest {
22
+ /**
23
+ * Only mark notifications in this category
24
+ * @type {string}
25
+ * @memberof MarkAllSubscriberNotificationsReadRequest
26
+ */
27
+ category?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the MarkAllSubscriberNotificationsReadRequest interface.
32
+ */
33
+ export function instanceOfMarkAllSubscriberNotificationsReadRequest(value: object): value is MarkAllSubscriberNotificationsReadRequest {
34
+ return true;
35
+ }
36
+
37
+ export function MarkAllSubscriberNotificationsReadRequestFromJSON(json: any): MarkAllSubscriberNotificationsReadRequest {
38
+ return MarkAllSubscriberNotificationsReadRequestFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function MarkAllSubscriberNotificationsReadRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarkAllSubscriberNotificationsReadRequest {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'category': json['category'] == null ? undefined : json['category'],
48
+ };
49
+ }
50
+
51
+ export function MarkAllSubscriberNotificationsReadRequestToJSON(json: any): MarkAllSubscriberNotificationsReadRequest {
52
+ return MarkAllSubscriberNotificationsReadRequestToJSONTyped(json, false);
53
+ }
54
+
55
+ export function MarkAllSubscriberNotificationsReadRequestToJSONTyped(value?: MarkAllSubscriberNotificationsReadRequest | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'category': value['category'],
63
+ };
64
+ }
65
+
@@ -0,0 +1,74 @@
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
+ import type { UpdateSubscriberPreferencesRequestPreferencesInner } from './UpdateSubscriberPreferencesRequestPreferencesInner';
17
+ import {
18
+ UpdateSubscriberPreferencesRequestPreferencesInnerFromJSON,
19
+ UpdateSubscriberPreferencesRequestPreferencesInnerFromJSONTyped,
20
+ UpdateSubscriberPreferencesRequestPreferencesInnerToJSON,
21
+ UpdateSubscriberPreferencesRequestPreferencesInnerToJSONTyped,
22
+ } from './UpdateSubscriberPreferencesRequestPreferencesInner';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UpdateSubscriberPreferencesRequest
28
+ */
29
+ export interface UpdateSubscriberPreferencesRequest {
30
+ /**
31
+ *
32
+ * @type {Array<UpdateSubscriberPreferencesRequestPreferencesInner>}
33
+ * @memberof UpdateSubscriberPreferencesRequest
34
+ */
35
+ preferences: Array<UpdateSubscriberPreferencesRequestPreferencesInner>;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the UpdateSubscriberPreferencesRequest interface.
40
+ */
41
+ export function instanceOfUpdateSubscriberPreferencesRequest(value: object): value is UpdateSubscriberPreferencesRequest {
42
+ if (!('preferences' in value) || value['preferences'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function UpdateSubscriberPreferencesRequestFromJSON(json: any): UpdateSubscriberPreferencesRequest {
47
+ return UpdateSubscriberPreferencesRequestFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function UpdateSubscriberPreferencesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSubscriberPreferencesRequest {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'preferences': ((json['preferences'] as Array<any>).map(UpdateSubscriberPreferencesRequestPreferencesInnerFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function UpdateSubscriberPreferencesRequestToJSON(json: any): UpdateSubscriberPreferencesRequest {
61
+ return UpdateSubscriberPreferencesRequestToJSONTyped(json, false);
62
+ }
63
+
64
+ export function UpdateSubscriberPreferencesRequestToJSONTyped(value?: UpdateSubscriberPreferencesRequest | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'preferences': ((value['preferences'] as Array<any>).map(UpdateSubscriberPreferencesRequestPreferencesInnerToJSON)),
72
+ };
73
+ }
74
+
@@ -0,0 +1,96 @@
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 UpdateSubscriberPreferencesRequestPreferencesInner
20
+ */
21
+ export interface UpdateSubscriberPreferencesRequestPreferencesInner {
22
+ /**
23
+ * Category ID, or null for global preference
24
+ * @type {string}
25
+ * @memberof UpdateSubscriberPreferencesRequestPreferencesInner
26
+ */
27
+ categoryId?: string | null;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof UpdateSubscriberPreferencesRequestPreferencesInner
32
+ */
33
+ channel: UpdateSubscriberPreferencesRequestPreferencesInnerChannelEnum;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof UpdateSubscriberPreferencesRequestPreferencesInner
38
+ */
39
+ enabled: boolean;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const UpdateSubscriberPreferencesRequestPreferencesInnerChannelEnum = {
47
+ EMAIL: 'email',
48
+ PUSH: 'push',
49
+ SMS: 'sms',
50
+ IN_APP: 'in_app'
51
+ } as const;
52
+ export type UpdateSubscriberPreferencesRequestPreferencesInnerChannelEnum = typeof UpdateSubscriberPreferencesRequestPreferencesInnerChannelEnum[keyof typeof UpdateSubscriberPreferencesRequestPreferencesInnerChannelEnum];
53
+
54
+
55
+ /**
56
+ * Check if a given object implements the UpdateSubscriberPreferencesRequestPreferencesInner interface.
57
+ */
58
+ export function instanceOfUpdateSubscriberPreferencesRequestPreferencesInner(value: object): value is UpdateSubscriberPreferencesRequestPreferencesInner {
59
+ if (!('channel' in value) || value['channel'] === undefined) return false;
60
+ if (!('enabled' in value) || value['enabled'] === undefined) return false;
61
+ return true;
62
+ }
63
+
64
+ export function UpdateSubscriberPreferencesRequestPreferencesInnerFromJSON(json: any): UpdateSubscriberPreferencesRequestPreferencesInner {
65
+ return UpdateSubscriberPreferencesRequestPreferencesInnerFromJSONTyped(json, false);
66
+ }
67
+
68
+ export function UpdateSubscriberPreferencesRequestPreferencesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSubscriberPreferencesRequestPreferencesInner {
69
+ if (json == null) {
70
+ return json;
71
+ }
72
+ return {
73
+
74
+ 'categoryId': json['category_id'] == null ? undefined : json['category_id'],
75
+ 'channel': json['channel'],
76
+ 'enabled': json['enabled'],
77
+ };
78
+ }
79
+
80
+ export function UpdateSubscriberPreferencesRequestPreferencesInnerToJSON(json: any): UpdateSubscriberPreferencesRequestPreferencesInner {
81
+ return UpdateSubscriberPreferencesRequestPreferencesInnerToJSONTyped(json, false);
82
+ }
83
+
84
+ export function UpdateSubscriberPreferencesRequestPreferencesInnerToJSONTyped(value?: UpdateSubscriberPreferencesRequestPreferencesInner | null, ignoreDiscriminator: boolean = false): any {
85
+ if (value == null) {
86
+ return value;
87
+ }
88
+
89
+ return {
90
+
91
+ 'category_id': value['categoryId'],
92
+ 'channel': value['channel'],
93
+ 'enabled': value['enabled'],
94
+ };
95
+ }
96
+
@@ -88,6 +88,7 @@ export * from './MagicLinkVerifyResponseData';
88
88
  export * from './MarkAllInboxReadRequest';
89
89
  export * from './MarkAllReadData';
90
90
  export * from './MarkAllReadResponse';
91
+ export * from './MarkAllSubscriberNotificationsReadRequest';
91
92
  export * from './MarkInboxReadRequest';
92
93
  export * from './MfaBackupCodesResponse';
93
94
  export * from './MfaBackupCodesResponseData';
@@ -253,6 +254,8 @@ export * from './UnsubscribeRequest';
253
254
  export * from './UnsubscribeResponse';
254
255
  export * from './UpdateCategoryRequest';
255
256
  export * from './UpdateEndUserRequest';
257
+ export * from './UpdateSubscriberPreferencesRequest';
258
+ export * from './UpdateSubscriberPreferencesRequestPreferencesInner';
256
259
  export * from './UpdateSubscriberRequest';
257
260
  export * from './UpdateTemplateRequest';
258
261
  export * from './UpdateTopicRequest';