@zyphr-dev/node-sdk 0.1.19 → 0.1.21

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 (44) hide show
  1. package/dist/index.cjs +1964 -190
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +3178 -1137
  4. package/dist/index.d.ts +3178 -1137
  5. package/dist/index.js +1811 -185
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/.openapi-generator/FILES +31 -1
  9. package/src/client.ts +3 -0
  10. package/src/src/apis/AuthEmailTemplatesApi.ts +734 -0
  11. package/src/src/apis/SlackApi.ts +264 -0
  12. package/src/src/apis/index.ts +2 -0
  13. package/src/src/models/AuthEmailTemplate.ts +181 -0
  14. package/src/src/models/AuthEmailTemplateDefault.ts +107 -0
  15. package/src/src/models/AuthEmailTemplateDefaultResponse.ts +88 -0
  16. package/src/src/models/AuthEmailTemplateDeleteResponse.ts +88 -0
  17. package/src/src/models/{SuccessResultData.ts → AuthEmailTemplateDeleteResponseData.ts} +11 -11
  18. package/src/src/models/AuthEmailTemplateListResponse.ts +88 -0
  19. package/src/src/models/AuthEmailTemplatePreviewDraft.ts +108 -0
  20. package/src/src/models/AuthEmailTemplatePreviewRequest.ts +81 -0
  21. package/src/src/models/AuthEmailTemplatePreviewResponse.ts +88 -0
  22. package/src/src/models/AuthEmailTemplatePreviewResult.ts +97 -0
  23. package/src/src/models/AuthEmailTemplateResponse.ts +88 -0
  24. package/src/src/models/AuthEmailTemplateTestRequest.ts +74 -0
  25. package/src/src/models/AuthEmailTemplateTestResponse.ts +88 -0
  26. package/src/src/models/AuthEmailTemplateTestResult.ts +73 -0
  27. package/src/src/models/AuthEmailTemplateVersion.ts +157 -0
  28. package/src/src/models/AuthEmailTemplateVersionsResponse.ts +88 -0
  29. package/src/src/models/AuthEmailType.ts +54 -0
  30. package/src/src/models/BulkUpsertAuthEmailTemplatesRequest.ts +91 -0
  31. package/src/src/models/BulkUpsertAuthEmailTemplatesResponse.ts +88 -0
  32. package/src/src/models/ResubscribeResponse.ts +10 -10
  33. package/src/src/models/SendSlackMessageRequest.ts +156 -0
  34. package/src/src/models/SendSlackMessageResponse.ts +88 -0
  35. package/src/src/models/SendSlackMessageResult.ts +115 -0
  36. package/src/src/models/SlackMessage.ts +203 -0
  37. package/src/src/models/SlackMessageListResponse.ts +88 -0
  38. package/src/src/models/SlackMessageListResponseMeta.ts +89 -0
  39. package/src/src/models/SlackMessageResponse.ts +88 -0
  40. package/src/src/models/SlackMessageStatus.ts +56 -0
  41. package/src/src/models/SlackMessageSummary.ts +155 -0
  42. package/src/src/models/SuccessResult.ts +10 -10
  43. package/src/src/models/UpsertAuthEmailTemplateRequest.ts +143 -0
  44. package/src/src/models/index.ts +29 -1
@@ -0,0 +1,203 @@
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 { SlackMessageStatus } from './SlackMessageStatus';
17
+ import {
18
+ SlackMessageStatusFromJSON,
19
+ SlackMessageStatusFromJSONTyped,
20
+ SlackMessageStatusToJSON,
21
+ SlackMessageStatusToJSONTyped,
22
+ } from './SlackMessageStatus';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface SlackMessage
28
+ */
29
+ export interface SlackMessage {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof SlackMessage
34
+ */
35
+ id?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof SlackMessage
40
+ */
41
+ slackConnectionId?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof SlackMessage
46
+ */
47
+ channelId?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof SlackMessage
52
+ */
53
+ channelName?: string | null;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof SlackMessage
58
+ */
59
+ text?: string | null;
60
+ /**
61
+ *
62
+ * @type {Array<{ [key: string]: any; }>}
63
+ * @memberof SlackMessage
64
+ */
65
+ blocks?: Array<{ [key: string]: any; }> | null;
66
+ /**
67
+ *
68
+ * @type {Array<{ [key: string]: any; }>}
69
+ * @memberof SlackMessage
70
+ */
71
+ attachments?: Array<{ [key: string]: any; }> | null;
72
+ /**
73
+ *
74
+ * @type {string}
75
+ * @memberof SlackMessage
76
+ */
77
+ messageTs?: string | null;
78
+ /**
79
+ *
80
+ * @type {string}
81
+ * @memberof SlackMessage
82
+ */
83
+ threadTs?: string | null;
84
+ /**
85
+ *
86
+ * @type {SlackMessageStatus}
87
+ * @memberof SlackMessage
88
+ */
89
+ status?: SlackMessageStatus;
90
+ /**
91
+ *
92
+ * @type {string}
93
+ * @memberof SlackMessage
94
+ */
95
+ statusReason?: string | null;
96
+ /**
97
+ *
98
+ * @type {Array<string>}
99
+ * @memberof SlackMessage
100
+ */
101
+ tags?: Array<string> | null;
102
+ /**
103
+ *
104
+ * @type {{ [key: string]: any; }}
105
+ * @memberof SlackMessage
106
+ */
107
+ metadata?: { [key: string]: any; } | null;
108
+ /**
109
+ *
110
+ * @type {Date}
111
+ * @memberof SlackMessage
112
+ */
113
+ createdAt?: Date;
114
+ /**
115
+ *
116
+ * @type {Date}
117
+ * @memberof SlackMessage
118
+ */
119
+ queuedAt?: Date | null;
120
+ /**
121
+ *
122
+ * @type {Date}
123
+ * @memberof SlackMessage
124
+ */
125
+ sentAt?: Date | null;
126
+ /**
127
+ *
128
+ * @type {Date}
129
+ * @memberof SlackMessage
130
+ */
131
+ failedAt?: Date | null;
132
+ }
133
+
134
+
135
+
136
+ /**
137
+ * Check if a given object implements the SlackMessage interface.
138
+ */
139
+ export function instanceOfSlackMessage(value: object): value is SlackMessage {
140
+ return true;
141
+ }
142
+
143
+ export function SlackMessageFromJSON(json: any): SlackMessage {
144
+ return SlackMessageFromJSONTyped(json, false);
145
+ }
146
+
147
+ export function SlackMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): SlackMessage {
148
+ if (json == null) {
149
+ return json;
150
+ }
151
+ return {
152
+
153
+ 'id': json['id'] == null ? undefined : json['id'],
154
+ 'slackConnectionId': json['slack_connection_id'] == null ? undefined : json['slack_connection_id'],
155
+ 'channelId': json['channel_id'] == null ? undefined : json['channel_id'],
156
+ 'channelName': json['channel_name'] == null ? undefined : json['channel_name'],
157
+ 'text': json['text'] == null ? undefined : json['text'],
158
+ 'blocks': json['blocks'] == null ? undefined : json['blocks'],
159
+ 'attachments': json['attachments'] == null ? undefined : json['attachments'],
160
+ 'messageTs': json['message_ts'] == null ? undefined : json['message_ts'],
161
+ 'threadTs': json['thread_ts'] == null ? undefined : json['thread_ts'],
162
+ 'status': json['status'] == null ? undefined : SlackMessageStatusFromJSON(json['status']),
163
+ 'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
164
+ 'tags': json['tags'] == null ? undefined : json['tags'],
165
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
166
+ 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
167
+ 'queuedAt': json['queued_at'] == null ? undefined : (new Date(json['queued_at'])),
168
+ 'sentAt': json['sent_at'] == null ? undefined : (new Date(json['sent_at'])),
169
+ 'failedAt': json['failed_at'] == null ? undefined : (new Date(json['failed_at'])),
170
+ };
171
+ }
172
+
173
+ export function SlackMessageToJSON(json: any): SlackMessage {
174
+ return SlackMessageToJSONTyped(json, false);
175
+ }
176
+
177
+ export function SlackMessageToJSONTyped(value?: SlackMessage | null, ignoreDiscriminator: boolean = false): any {
178
+ if (value == null) {
179
+ return value;
180
+ }
181
+
182
+ return {
183
+
184
+ 'id': value['id'],
185
+ 'slack_connection_id': value['slackConnectionId'],
186
+ 'channel_id': value['channelId'],
187
+ 'channel_name': value['channelName'],
188
+ 'text': value['text'],
189
+ 'blocks': value['blocks'],
190
+ 'attachments': value['attachments'],
191
+ 'message_ts': value['messageTs'],
192
+ 'thread_ts': value['threadTs'],
193
+ 'status': SlackMessageStatusToJSON(value['status']),
194
+ 'status_reason': value['statusReason'],
195
+ 'tags': value['tags'],
196
+ 'metadata': value['metadata'],
197
+ 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
198
+ 'queued_at': value['queuedAt'] == null ? undefined : ((value['queuedAt'] as any).toISOString()),
199
+ 'sent_at': value['sentAt'] == null ? undefined : ((value['sentAt'] as any).toISOString()),
200
+ 'failed_at': value['failedAt'] == null ? undefined : ((value['failedAt'] as any).toISOString()),
201
+ };
202
+ }
203
+
@@ -0,0 +1,88 @@
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 { SlackMessageSummary } from './SlackMessageSummary';
17
+ import {
18
+ SlackMessageSummaryFromJSON,
19
+ SlackMessageSummaryFromJSONTyped,
20
+ SlackMessageSummaryToJSON,
21
+ SlackMessageSummaryToJSONTyped,
22
+ } from './SlackMessageSummary';
23
+ import type { SlackMessageListResponseMeta } from './SlackMessageListResponseMeta';
24
+ import {
25
+ SlackMessageListResponseMetaFromJSON,
26
+ SlackMessageListResponseMetaFromJSONTyped,
27
+ SlackMessageListResponseMetaToJSON,
28
+ SlackMessageListResponseMetaToJSONTyped,
29
+ } from './SlackMessageListResponseMeta';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface SlackMessageListResponse
35
+ */
36
+ export interface SlackMessageListResponse {
37
+ /**
38
+ *
39
+ * @type {Array<SlackMessageSummary>}
40
+ * @memberof SlackMessageListResponse
41
+ */
42
+ data?: Array<SlackMessageSummary>;
43
+ /**
44
+ *
45
+ * @type {SlackMessageListResponseMeta}
46
+ * @memberof SlackMessageListResponse
47
+ */
48
+ meta?: SlackMessageListResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the SlackMessageListResponse interface.
53
+ */
54
+ export function instanceOfSlackMessageListResponse(value: object): value is SlackMessageListResponse {
55
+ return true;
56
+ }
57
+
58
+ export function SlackMessageListResponseFromJSON(json: any): SlackMessageListResponse {
59
+ return SlackMessageListResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function SlackMessageListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SlackMessageListResponse {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(SlackMessageSummaryFromJSON)),
69
+ 'meta': json['meta'] == null ? undefined : SlackMessageListResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function SlackMessageListResponseToJSON(json: any): SlackMessageListResponse {
74
+ return SlackMessageListResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function SlackMessageListResponseToJSONTyped(value?: SlackMessageListResponse | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(SlackMessageSummaryToJSON)),
85
+ 'meta': SlackMessageListResponseMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -0,0 +1,89 @@
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 SlackMessageListResponseMeta
20
+ */
21
+ export interface SlackMessageListResponseMeta {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SlackMessageListResponseMeta
26
+ */
27
+ requestId?: string;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof SlackMessageListResponseMeta
32
+ */
33
+ total?: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof SlackMessageListResponseMeta
38
+ */
39
+ limit?: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof SlackMessageListResponseMeta
44
+ */
45
+ offset?: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the SlackMessageListResponseMeta interface.
50
+ */
51
+ export function instanceOfSlackMessageListResponseMeta(value: object): value is SlackMessageListResponseMeta {
52
+ return true;
53
+ }
54
+
55
+ export function SlackMessageListResponseMetaFromJSON(json: any): SlackMessageListResponseMeta {
56
+ return SlackMessageListResponseMetaFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function SlackMessageListResponseMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): SlackMessageListResponseMeta {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'requestId': json['request_id'] == null ? undefined : json['request_id'],
66
+ 'total': json['total'] == null ? undefined : json['total'],
67
+ 'limit': json['limit'] == null ? undefined : json['limit'],
68
+ 'offset': json['offset'] == null ? undefined : json['offset'],
69
+ };
70
+ }
71
+
72
+ export function SlackMessageListResponseMetaToJSON(json: any): SlackMessageListResponseMeta {
73
+ return SlackMessageListResponseMetaToJSONTyped(json, false);
74
+ }
75
+
76
+ export function SlackMessageListResponseMetaToJSONTyped(value?: SlackMessageListResponseMeta | null, ignoreDiscriminator: boolean = false): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+
81
+ return {
82
+
83
+ 'request_id': value['requestId'],
84
+ 'total': value['total'],
85
+ 'limit': value['limit'],
86
+ 'offset': value['offset'],
87
+ };
88
+ }
89
+
@@ -0,0 +1,88 @@
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 { RequestMeta } from './RequestMeta';
17
+ import {
18
+ RequestMetaFromJSON,
19
+ RequestMetaFromJSONTyped,
20
+ RequestMetaToJSON,
21
+ RequestMetaToJSONTyped,
22
+ } from './RequestMeta';
23
+ import type { SlackMessage } from './SlackMessage';
24
+ import {
25
+ SlackMessageFromJSON,
26
+ SlackMessageFromJSONTyped,
27
+ SlackMessageToJSON,
28
+ SlackMessageToJSONTyped,
29
+ } from './SlackMessage';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface SlackMessageResponse
35
+ */
36
+ export interface SlackMessageResponse {
37
+ /**
38
+ *
39
+ * @type {SlackMessage}
40
+ * @memberof SlackMessageResponse
41
+ */
42
+ data?: SlackMessage;
43
+ /**
44
+ *
45
+ * @type {RequestMeta}
46
+ * @memberof SlackMessageResponse
47
+ */
48
+ meta?: RequestMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the SlackMessageResponse interface.
53
+ */
54
+ export function instanceOfSlackMessageResponse(value: object): value is SlackMessageResponse {
55
+ return true;
56
+ }
57
+
58
+ export function SlackMessageResponseFromJSON(json: any): SlackMessageResponse {
59
+ return SlackMessageResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function SlackMessageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SlackMessageResponse {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : SlackMessageFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function SlackMessageResponseToJSON(json: any): SlackMessageResponse {
74
+ return SlackMessageResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function SlackMessageResponseToJSONTyped(value?: SlackMessageResponse | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': SlackMessageToJSON(value['data']),
85
+ 'meta': RequestMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -0,0 +1,56 @@
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
+
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const SlackMessageStatus = {
21
+ QUEUED: 'queued',
22
+ SENDING: 'sending',
23
+ SENT: 'sent',
24
+ DELIVERED: 'delivered',
25
+ FAILED: 'failed'
26
+ } as const;
27
+ export type SlackMessageStatus = typeof SlackMessageStatus[keyof typeof SlackMessageStatus];
28
+
29
+
30
+ export function instanceOfSlackMessageStatus(value: any): boolean {
31
+ for (const key in SlackMessageStatus) {
32
+ if (Object.prototype.hasOwnProperty.call(SlackMessageStatus, key)) {
33
+ if (SlackMessageStatus[key as keyof typeof SlackMessageStatus] === value) {
34
+ return true;
35
+ }
36
+ }
37
+ }
38
+ return false;
39
+ }
40
+
41
+ export function SlackMessageStatusFromJSON(json: any): SlackMessageStatus {
42
+ return SlackMessageStatusFromJSONTyped(json, false);
43
+ }
44
+
45
+ export function SlackMessageStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SlackMessageStatus {
46
+ return json as SlackMessageStatus;
47
+ }
48
+
49
+ export function SlackMessageStatusToJSON(value?: SlackMessageStatus | null): any {
50
+ return value as any;
51
+ }
52
+
53
+ export function SlackMessageStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): SlackMessageStatus {
54
+ return value as SlackMessageStatus;
55
+ }
56
+
@@ -0,0 +1,155 @@
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 { SlackMessageStatus } from './SlackMessageStatus';
17
+ import {
18
+ SlackMessageStatusFromJSON,
19
+ SlackMessageStatusFromJSONTyped,
20
+ SlackMessageStatusToJSON,
21
+ SlackMessageStatusToJSONTyped,
22
+ } from './SlackMessageStatus';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface SlackMessageSummary
28
+ */
29
+ export interface SlackMessageSummary {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof SlackMessageSummary
34
+ */
35
+ id?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof SlackMessageSummary
40
+ */
41
+ slackConnectionId?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof SlackMessageSummary
46
+ */
47
+ channelId?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof SlackMessageSummary
52
+ */
53
+ channelName?: string | null;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof SlackMessageSummary
58
+ */
59
+ text?: string | null;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof SlackMessageSummary
64
+ */
65
+ messageTs?: string | null;
66
+ /**
67
+ *
68
+ * @type {SlackMessageStatus}
69
+ * @memberof SlackMessageSummary
70
+ */
71
+ status?: SlackMessageStatus;
72
+ /**
73
+ *
74
+ * @type {string}
75
+ * @memberof SlackMessageSummary
76
+ */
77
+ statusReason?: string | null;
78
+ /**
79
+ *
80
+ * @type {Array<string>}
81
+ * @memberof SlackMessageSummary
82
+ */
83
+ tags?: Array<string> | null;
84
+ /**
85
+ *
86
+ * @type {Date}
87
+ * @memberof SlackMessageSummary
88
+ */
89
+ createdAt?: Date;
90
+ /**
91
+ *
92
+ * @type {Date}
93
+ * @memberof SlackMessageSummary
94
+ */
95
+ sentAt?: Date | null;
96
+ }
97
+
98
+
99
+
100
+ /**
101
+ * Check if a given object implements the SlackMessageSummary interface.
102
+ */
103
+ export function instanceOfSlackMessageSummary(value: object): value is SlackMessageSummary {
104
+ return true;
105
+ }
106
+
107
+ export function SlackMessageSummaryFromJSON(json: any): SlackMessageSummary {
108
+ return SlackMessageSummaryFromJSONTyped(json, false);
109
+ }
110
+
111
+ export function SlackMessageSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SlackMessageSummary {
112
+ if (json == null) {
113
+ return json;
114
+ }
115
+ return {
116
+
117
+ 'id': json['id'] == null ? undefined : json['id'],
118
+ 'slackConnectionId': json['slack_connection_id'] == null ? undefined : json['slack_connection_id'],
119
+ 'channelId': json['channel_id'] == null ? undefined : json['channel_id'],
120
+ 'channelName': json['channel_name'] == null ? undefined : json['channel_name'],
121
+ 'text': json['text'] == null ? undefined : json['text'],
122
+ 'messageTs': json['message_ts'] == null ? undefined : json['message_ts'],
123
+ 'status': json['status'] == null ? undefined : SlackMessageStatusFromJSON(json['status']),
124
+ 'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
125
+ 'tags': json['tags'] == null ? undefined : json['tags'],
126
+ 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
127
+ 'sentAt': json['sent_at'] == null ? undefined : (new Date(json['sent_at'])),
128
+ };
129
+ }
130
+
131
+ export function SlackMessageSummaryToJSON(json: any): SlackMessageSummary {
132
+ return SlackMessageSummaryToJSONTyped(json, false);
133
+ }
134
+
135
+ export function SlackMessageSummaryToJSONTyped(value?: SlackMessageSummary | null, ignoreDiscriminator: boolean = false): any {
136
+ if (value == null) {
137
+ return value;
138
+ }
139
+
140
+ return {
141
+
142
+ 'id': value['id'],
143
+ 'slack_connection_id': value['slackConnectionId'],
144
+ 'channel_id': value['channelId'],
145
+ 'channel_name': value['channelName'],
146
+ 'text': value['text'],
147
+ 'message_ts': value['messageTs'],
148
+ 'status': SlackMessageStatusToJSON(value['status']),
149
+ 'status_reason': value['statusReason'],
150
+ 'tags': value['tags'],
151
+ 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
152
+ 'sent_at': value['sentAt'] == null ? undefined : ((value['sentAt'] as any).toISOString()),
153
+ };
154
+ }
155
+