@zyphr-dev/node-sdk 0.1.5 → 0.1.6

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.
Files changed (50) hide show
  1. package/dist/src/models/Device.d.ts +9 -21
  2. package/dist/src/models/Device.d.ts.map +1 -1
  3. package/dist/src/models/Device.js +11 -20
  4. package/dist/src/models/Device.js.map +1 -1
  5. package/dist/src/models/DeviceStats.d.ts +6 -0
  6. package/dist/src/models/DeviceStats.d.ts.map +1 -1
  7. package/dist/src/models/DeviceStats.js +4 -2
  8. package/dist/src/models/DeviceStats.js.map +1 -1
  9. package/dist/src/models/PushMessage.d.ts +35 -14
  10. package/dist/src/models/PushMessage.d.ts.map +1 -1
  11. package/dist/src/models/PushMessage.js +24 -17
  12. package/dist/src/models/PushMessage.js.map +1 -1
  13. package/dist/src/models/PushMessageDetail.d.ts +44 -36
  14. package/dist/src/models/PushMessageDetail.d.ts.map +1 -1
  15. package/dist/src/models/PushMessageDetail.js +29 -25
  16. package/dist/src/models/PushMessageDetail.js.map +1 -1
  17. package/dist/src/models/PushMessageDetailAllOfActionButtons.d.ts +51 -0
  18. package/dist/src/models/PushMessageDetailAllOfActionButtons.d.ts.map +1 -0
  19. package/dist/src/models/PushMessageDetailAllOfActionButtons.js +55 -0
  20. package/dist/src/models/PushMessageDetailAllOfActionButtons.js.map +1 -0
  21. package/dist/src/models/RegisterDeviceRequest.d.ts +7 -35
  22. package/dist/src/models/RegisterDeviceRequest.d.ts.map +1 -1
  23. package/dist/src/models/RegisterDeviceRequest.js +6 -14
  24. package/dist/src/models/RegisterDeviceRequest.js.map +1 -1
  25. package/dist/src/models/SendPushRequest.d.ts +83 -29
  26. package/dist/src/models/SendPushRequest.d.ts.map +1 -1
  27. package/dist/src/models/SendPushRequest.js +35 -27
  28. package/dist/src/models/SendPushRequest.js.map +1 -1
  29. package/dist/src/models/{PushPayload.d.ts → SendPushRequestActionButtonsInner.d.ts} +17 -43
  30. package/dist/src/models/SendPushRequestActionButtonsInner.d.ts.map +1 -0
  31. package/dist/src/models/{PushPayload.js → SendPushRequestActionButtonsInner.js} +22 -30
  32. package/dist/src/models/SendPushRequestActionButtonsInner.js.map +1 -0
  33. package/dist/src/models/index.d.ts +2 -1
  34. package/dist/src/models/index.d.ts.map +1 -1
  35. package/dist/src/models/index.js +2 -1
  36. package/dist/src/models/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/.openapi-generator/FILES +2 -1
  39. package/src/src/models/Device.ts +17 -34
  40. package/src/src/models/DeviceStats.ts +10 -2
  41. package/src/src/models/PushMessage.ts +47 -22
  42. package/src/src/models/PushMessageDetail.ts +66 -50
  43. package/src/src/models/PushMessageDetailAllOfActionButtons.ts +89 -0
  44. package/src/src/models/RegisterDeviceRequest.ts +10 -49
  45. package/src/src/models/SendPushRequest.ts +118 -52
  46. package/src/src/models/SendPushRequestActionButtonsInner.ts +91 -0
  47. package/src/src/models/index.ts +2 -1
  48. package/dist/src/models/PushPayload.d.ts.map +0 -1
  49. package/dist/src/models/PushPayload.js.map +0 -1
  50. package/src/src/models/PushPayload.ts +0 -123
@@ -13,13 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { PushPayload } from './PushPayload';
16
+ import type { SendPushRequestActionButtonsInner } from './SendPushRequestActionButtonsInner';
17
17
  import {
18
- PushPayloadFromJSON,
19
- PushPayloadFromJSONTyped,
20
- PushPayloadToJSON,
21
- PushPayloadToJSONTyped,
22
- } from './PushPayload';
18
+ SendPushRequestActionButtonsInnerFromJSON,
19
+ SendPushRequestActionButtonsInnerFromJSONTyped,
20
+ SendPushRequestActionButtonsInnerToJSON,
21
+ SendPushRequestActionButtonsInnerToJSONTyped,
22
+ } from './SendPushRequestActionButtonsInner';
23
23
 
24
24
  /**
25
25
  *
@@ -28,47 +28,77 @@ import {
28
28
  */
29
29
  export interface SendPushRequest {
30
30
  /**
31
- * Send to specific device
31
+ * Send to all devices for a user
32
+ * @type {string}
33
+ * @memberof SendPushRequest
34
+ */
35
+ userId?: string;
36
+ /**
37
+ * Send to a specific device
32
38
  * @type {string}
33
39
  * @memberof SendPushRequest
34
40
  */
35
41
  deviceId?: string;
36
42
  /**
37
- * Send to multiple devices
38
- * @type {Array<string>}
43
+ * Push notification title
44
+ * @type {string}
39
45
  * @memberof SendPushRequest
40
46
  */
41
- deviceIds?: Array<string>;
47
+ title?: string;
42
48
  /**
43
- * Send to all subscriber devices
49
+ * Push notification body text
44
50
  * @type {string}
45
51
  * @memberof SendPushRequest
46
52
  */
47
- subscriberId?: string;
53
+ body?: string;
48
54
  /**
49
- * Send to topic subscribers
55
+ * Custom data payload
56
+ * @type {{ [key: string]: any; }}
57
+ * @memberof SendPushRequest
58
+ */
59
+ data?: { [key: string]: any; };
60
+ /**
61
+ * Badge count (iOS)
62
+ * @type {number}
63
+ * @memberof SendPushRequest
64
+ */
65
+ badge?: number;
66
+ /**
67
+ * Notification sound
50
68
  * @type {string}
51
69
  * @memberof SendPushRequest
52
70
  */
53
- topic?: string;
71
+ sound?: string;
54
72
  /**
55
- *
56
- * @type {PushPayload}
73
+ * Image URL for rich notifications
74
+ * @type {string}
75
+ * @memberof SendPushRequest
76
+ */
77
+ imageUrl?: string;
78
+ /**
79
+ * Silent/background push notification
80
+ * @type {boolean}
81
+ * @memberof SendPushRequest
82
+ */
83
+ contentAvailable?: boolean;
84
+ /**
85
+ * Interactive notification buttons (max 3)
86
+ * @type {Array<SendPushRequestActionButtonsInner>}
57
87
  * @memberof SendPushRequest
58
88
  */
59
- payload: PushPayload;
89
+ actionButtons?: Array<SendPushRequestActionButtonsInner>;
60
90
  /**
61
91
  *
62
- * @type {string}
92
+ * @type {Array<string>}
63
93
  * @memberof SendPushRequest
64
94
  */
65
- priority?: SendPushRequestPriorityEnum;
95
+ tags?: Array<string>;
66
96
  /**
67
- * Time-to-live in seconds
68
- * @type {number}
97
+ *
98
+ * @type {{ [key: string]: any; }}
69
99
  * @memberof SendPushRequest
70
100
  */
71
- ttl?: number;
101
+ metadata?: { [key: string]: any; };
72
102
  /**
73
103
  * Replace previous notification with same key
74
104
  * @type {string}
@@ -76,31 +106,47 @@ export interface SendPushRequest {
76
106
  */
77
107
  collapseKey?: string;
78
108
  /**
79
- *
109
+ * Subscriber ID for preference checking
110
+ * @type {string}
111
+ * @memberof SendPushRequest
112
+ */
113
+ subscriberId?: string;
114
+ /**
115
+ * Subscriber external ID for preference checking
116
+ * @type {string}
117
+ * @memberof SendPushRequest
118
+ */
119
+ subscriberExternalId?: string;
120
+ /**
121
+ * Notification category for preference checking
122
+ * @type {string}
123
+ * @memberof SendPushRequest
124
+ */
125
+ category?: string;
126
+ /**
127
+ * Skip subscriber preference checks
128
+ * @type {boolean}
129
+ * @memberof SendPushRequest
130
+ */
131
+ force?: boolean;
132
+ /**
133
+ * Schedule for future delivery (ISO 8601)
80
134
  * @type {Date}
81
135
  * @memberof SendPushRequest
82
136
  */
83
- scheduledAt?: Date;
137
+ sendAt?: Date;
138
+ /**
139
+ * Delay in seconds before sending
140
+ * @type {number}
141
+ * @memberof SendPushRequest
142
+ */
143
+ delay?: number;
84
144
  }
85
145
 
86
-
87
- /**
88
- * @export
89
- */
90
- export const SendPushRequestPriorityEnum = {
91
- LOW: 'low',
92
- NORMAL: 'normal',
93
- HIGH: 'high',
94
- URGENT: 'urgent'
95
- } as const;
96
- export type SendPushRequestPriorityEnum = typeof SendPushRequestPriorityEnum[keyof typeof SendPushRequestPriorityEnum];
97
-
98
-
99
146
  /**
100
147
  * Check if a given object implements the SendPushRequest interface.
101
148
  */
102
149
  export function instanceOfSendPushRequest(value: object): value is SendPushRequest {
103
- if (!('payload' in value) || value['payload'] === undefined) return false;
104
150
  return true;
105
151
  }
106
152
 
@@ -114,15 +160,25 @@ export function SendPushRequestFromJSONTyped(json: any, ignoreDiscriminator: boo
114
160
  }
115
161
  return {
116
162
 
163
+ 'userId': json['user_id'] == null ? undefined : json['user_id'],
117
164
  'deviceId': json['device_id'] == null ? undefined : json['device_id'],
118
- 'deviceIds': json['device_ids'] == null ? undefined : json['device_ids'],
119
- 'subscriberId': json['subscriber_id'] == null ? undefined : json['subscriber_id'],
120
- 'topic': json['topic'] == null ? undefined : json['topic'],
121
- 'payload': PushPayloadFromJSON(json['payload']),
122
- 'priority': json['priority'] == null ? undefined : json['priority'],
123
- 'ttl': json['ttl'] == null ? undefined : json['ttl'],
165
+ 'title': json['title'] == null ? undefined : json['title'],
166
+ 'body': json['body'] == null ? undefined : json['body'],
167
+ 'data': json['data'] == null ? undefined : json['data'],
168
+ 'badge': json['badge'] == null ? undefined : json['badge'],
169
+ 'sound': json['sound'] == null ? undefined : json['sound'],
170
+ 'imageUrl': json['image_url'] == null ? undefined : json['image_url'],
171
+ 'contentAvailable': json['content_available'] == null ? undefined : json['content_available'],
172
+ 'actionButtons': json['action_buttons'] == null ? undefined : ((json['action_buttons'] as Array<any>).map(SendPushRequestActionButtonsInnerFromJSON)),
173
+ 'tags': json['tags'] == null ? undefined : json['tags'],
174
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
124
175
  'collapseKey': json['collapse_key'] == null ? undefined : json['collapse_key'],
125
- 'scheduledAt': json['scheduled_at'] == null ? undefined : (new Date(json['scheduled_at'])),
176
+ 'subscriberId': json['subscriber_id'] == null ? undefined : json['subscriber_id'],
177
+ 'subscriberExternalId': json['subscriber_external_id'] == null ? undefined : json['subscriber_external_id'],
178
+ 'category': json['category'] == null ? undefined : json['category'],
179
+ 'force': json['force'] == null ? undefined : json['force'],
180
+ 'sendAt': json['send_at'] == null ? undefined : (new Date(json['send_at'])),
181
+ 'delay': json['delay'] == null ? undefined : json['delay'],
126
182
  };
127
183
  }
128
184
 
@@ -137,15 +193,25 @@ export function SendPushRequestToJSONTyped(value?: SendPushRequest | null, ignor
137
193
 
138
194
  return {
139
195
 
196
+ 'user_id': value['userId'],
140
197
  'device_id': value['deviceId'],
141
- 'device_ids': value['deviceIds'],
142
- 'subscriber_id': value['subscriberId'],
143
- 'topic': value['topic'],
144
- 'payload': PushPayloadToJSON(value['payload']),
145
- 'priority': value['priority'],
146
- 'ttl': value['ttl'],
198
+ 'title': value['title'],
199
+ 'body': value['body'],
200
+ 'data': value['data'],
201
+ 'badge': value['badge'],
202
+ 'sound': value['sound'],
203
+ 'image_url': value['imageUrl'],
204
+ 'content_available': value['contentAvailable'],
205
+ 'action_buttons': value['actionButtons'] == null ? undefined : ((value['actionButtons'] as Array<any>).map(SendPushRequestActionButtonsInnerToJSON)),
206
+ 'tags': value['tags'],
207
+ 'metadata': value['metadata'],
147
208
  'collapse_key': value['collapseKey'],
148
- 'scheduled_at': value['scheduledAt'] == null ? undefined : ((value['scheduledAt']).toISOString()),
209
+ 'subscriber_id': value['subscriberId'],
210
+ 'subscriber_external_id': value['subscriberExternalId'],
211
+ 'category': value['category'],
212
+ 'force': value['force'],
213
+ 'send_at': value['sendAt'] == null ? undefined : ((value['sendAt']).toISOString()),
214
+ 'delay': value['delay'],
149
215
  };
150
216
  }
151
217
 
@@ -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 SendPushRequestActionButtonsInner
20
+ */
21
+ export interface SendPushRequestActionButtonsInner {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SendPushRequestActionButtonsInner
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof SendPushRequestActionButtonsInner
32
+ */
33
+ title: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof SendPushRequestActionButtonsInner
38
+ */
39
+ action?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof SendPushRequestActionButtonsInner
44
+ */
45
+ deepLink?: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the SendPushRequestActionButtonsInner interface.
50
+ */
51
+ export function instanceOfSendPushRequestActionButtonsInner(value: object): value is SendPushRequestActionButtonsInner {
52
+ if (!('id' in value) || value['id'] === undefined) return false;
53
+ if (!('title' in value) || value['title'] === undefined) return false;
54
+ return true;
55
+ }
56
+
57
+ export function SendPushRequestActionButtonsInnerFromJSON(json: any): SendPushRequestActionButtonsInner {
58
+ return SendPushRequestActionButtonsInnerFromJSONTyped(json, false);
59
+ }
60
+
61
+ export function SendPushRequestActionButtonsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendPushRequestActionButtonsInner {
62
+ if (json == null) {
63
+ return json;
64
+ }
65
+ return {
66
+
67
+ 'id': json['id'],
68
+ 'title': json['title'],
69
+ 'action': json['action'] == null ? undefined : json['action'],
70
+ 'deepLink': json['deep_link'] == null ? undefined : json['deep_link'],
71
+ };
72
+ }
73
+
74
+ export function SendPushRequestActionButtonsInnerToJSON(json: any): SendPushRequestActionButtonsInner {
75
+ return SendPushRequestActionButtonsInnerToJSONTyped(json, false);
76
+ }
77
+
78
+ export function SendPushRequestActionButtonsInnerToJSONTyped(value?: SendPushRequestActionButtonsInner | null, ignoreDiscriminator: boolean = false): any {
79
+ if (value == null) {
80
+ return value;
81
+ }
82
+
83
+ return {
84
+
85
+ 'id': value['id'],
86
+ 'title': value['title'],
87
+ 'action': value['action'],
88
+ 'deep_link': value['deepLink'],
89
+ };
90
+ }
91
+
@@ -140,7 +140,7 @@ export * from './PushEvent';
140
140
  export * from './PushListResponse';
141
141
  export * from './PushMessage';
142
142
  export * from './PushMessageDetail';
143
- export * from './PushPayload';
143
+ export * from './PushMessageDetailAllOfActionButtons';
144
144
  export * from './PushStatsData';
145
145
  export * from './PushStatsResponse';
146
146
  export * from './PushTopicDevice';
@@ -186,6 +186,7 @@ export * from './SendInAppMeta';
186
186
  export * from './SendInAppRequest';
187
187
  export * from './SendInAppResponse';
188
188
  export * from './SendPushRequest';
189
+ export * from './SendPushRequestActionButtonsInner';
189
190
  export * from './SendPushResponse';
190
191
  export * from './SendPushResponseData';
191
192
  export * from './SendPushToTopicData';
@@ -1 +0,0 @@
1
- {"version":3,"file":"PushPayload.d.ts","sourceRoot":"","sources":["../../../src/src/models/PushPayload.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KAAE,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB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AE,KAAK,CAAC,OAAO,CAAC;QACvB,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;QACpC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;KACxB,CAAC;AACN,CAAC"}
@@ -1,123 +0,0 @@
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 PushPayload
20
- */
21
- export interface PushPayload {
22
- /**
23
- *
24
- * @type {string}
25
- * @memberof PushPayload
26
- */
27
- title: string;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof PushPayload
32
- */
33
- body: string;
34
- /**
35
- *
36
- * @type {string}
37
- * @memberof PushPayload
38
- */
39
- icon?: string;
40
- /**
41
- *
42
- * @type {string}
43
- * @memberof PushPayload
44
- */
45
- image?: string;
46
- /**
47
- *
48
- * @type {string}
49
- * @memberof PushPayload
50
- */
51
- badge?: string;
52
- /**
53
- *
54
- * @type {string}
55
- * @memberof PushPayload
56
- */
57
- sound?: string;
58
- /**
59
- *
60
- * @type {string}
61
- * @memberof PushPayload
62
- */
63
- clickAction?: string;
64
- /**
65
- *
66
- * @type {{ [key: string]: any; }}
67
- * @memberof PushPayload
68
- */
69
- data?: { [key: string]: any; };
70
- }
71
-
72
- /**
73
- * Check if a given object implements the PushPayload interface.
74
- */
75
- export function instanceOfPushPayload(value: object): value is PushPayload {
76
- if (!('title' in value) || value['title'] === undefined) return false;
77
- if (!('body' in value) || value['body'] === undefined) return false;
78
- return true;
79
- }
80
-
81
- export function PushPayloadFromJSON(json: any): PushPayload {
82
- return PushPayloadFromJSONTyped(json, false);
83
- }
84
-
85
- export function PushPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushPayload {
86
- if (json == null) {
87
- return json;
88
- }
89
- return {
90
-
91
- 'title': json['title'],
92
- 'body': json['body'],
93
- 'icon': json['icon'] == null ? undefined : json['icon'],
94
- 'image': json['image'] == null ? undefined : json['image'],
95
- 'badge': json['badge'] == null ? undefined : json['badge'],
96
- 'sound': json['sound'] == null ? undefined : json['sound'],
97
- 'clickAction': json['click_action'] == null ? undefined : json['click_action'],
98
- 'data': json['data'] == null ? undefined : json['data'],
99
- };
100
- }
101
-
102
- export function PushPayloadToJSON(json: any): PushPayload {
103
- return PushPayloadToJSONTyped(json, false);
104
- }
105
-
106
- export function PushPayloadToJSONTyped(value?: PushPayload | null, ignoreDiscriminator: boolean = false): any {
107
- if (value == null) {
108
- return value;
109
- }
110
-
111
- return {
112
-
113
- 'title': value['title'],
114
- 'body': value['body'],
115
- 'icon': value['icon'],
116
- 'image': value['image'],
117
- 'badge': value['badge'],
118
- 'sound': value['sound'],
119
- 'click_action': value['clickAction'],
120
- 'data': value['data'],
121
- };
122
- }
123
-