@zyphr-dev/node-sdk 0.1.19 → 0.1.20

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 (43) hide show
  1. package/dist/index.cjs +1915 -190
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +3133 -1165
  4. package/dist/index.d.ts +3133 -1165
  5. package/dist/index.js +1767 -185
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/.openapi-generator/FILES +30 -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/AuthEmailTemplatePreviewRequest.ts +65 -0
  20. package/src/src/models/AuthEmailTemplatePreviewResponse.ts +88 -0
  21. package/src/src/models/AuthEmailTemplatePreviewResult.ts +97 -0
  22. package/src/src/models/AuthEmailTemplateResponse.ts +88 -0
  23. package/src/src/models/AuthEmailTemplateTestRequest.ts +74 -0
  24. package/src/src/models/AuthEmailTemplateTestResponse.ts +88 -0
  25. package/src/src/models/AuthEmailTemplateTestResult.ts +73 -0
  26. package/src/src/models/AuthEmailTemplateVersion.ts +157 -0
  27. package/src/src/models/AuthEmailTemplateVersionsResponse.ts +88 -0
  28. package/src/src/models/AuthEmailType.ts +54 -0
  29. package/src/src/models/BulkUpsertAuthEmailTemplatesRequest.ts +91 -0
  30. package/src/src/models/BulkUpsertAuthEmailTemplatesResponse.ts +88 -0
  31. package/src/src/models/ResubscribeResponse.ts +10 -10
  32. package/src/src/models/SendSlackMessageRequest.ts +156 -0
  33. package/src/src/models/SendSlackMessageResponse.ts +88 -0
  34. package/src/src/models/SendSlackMessageResult.ts +115 -0
  35. package/src/src/models/SlackMessage.ts +203 -0
  36. package/src/src/models/SlackMessageListResponse.ts +88 -0
  37. package/src/src/models/SlackMessageListResponseMeta.ts +89 -0
  38. package/src/src/models/SlackMessageResponse.ts +88 -0
  39. package/src/src/models/SlackMessageStatus.ts +56 -0
  40. package/src/src/models/SlackMessageSummary.ts +155 -0
  41. package/src/src/models/SuccessResult.ts +10 -10
  42. package/src/src/models/UpsertAuthEmailTemplateRequest.ts +143 -0
  43. package/src/src/models/index.ts +28 -1
@@ -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 { AuthEmailTemplateTestResult } from './AuthEmailTemplateTestResult';
24
+ import {
25
+ AuthEmailTemplateTestResultFromJSON,
26
+ AuthEmailTemplateTestResultFromJSONTyped,
27
+ AuthEmailTemplateTestResultToJSON,
28
+ AuthEmailTemplateTestResultToJSONTyped,
29
+ } from './AuthEmailTemplateTestResult';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface AuthEmailTemplateTestResponse
35
+ */
36
+ export interface AuthEmailTemplateTestResponse {
37
+ /**
38
+ *
39
+ * @type {AuthEmailTemplateTestResult}
40
+ * @memberof AuthEmailTemplateTestResponse
41
+ */
42
+ data?: AuthEmailTemplateTestResult;
43
+ /**
44
+ *
45
+ * @type {RequestMeta}
46
+ * @memberof AuthEmailTemplateTestResponse
47
+ */
48
+ meta?: RequestMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the AuthEmailTemplateTestResponse interface.
53
+ */
54
+ export function instanceOfAuthEmailTemplateTestResponse(value: object): value is AuthEmailTemplateTestResponse {
55
+ return true;
56
+ }
57
+
58
+ export function AuthEmailTemplateTestResponseFromJSON(json: any): AuthEmailTemplateTestResponse {
59
+ return AuthEmailTemplateTestResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function AuthEmailTemplateTestResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthEmailTemplateTestResponse {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : AuthEmailTemplateTestResultFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function AuthEmailTemplateTestResponseToJSON(json: any): AuthEmailTemplateTestResponse {
74
+ return AuthEmailTemplateTestResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function AuthEmailTemplateTestResponseToJSONTyped(value?: AuthEmailTemplateTestResponse | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': AuthEmailTemplateTestResultToJSON(value['data']),
85
+ 'meta': RequestMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -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 AuthEmailTemplateTestResult
20
+ */
21
+ export interface AuthEmailTemplateTestResult {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof AuthEmailTemplateTestResult
26
+ */
27
+ success?: boolean;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AuthEmailTemplateTestResult
32
+ */
33
+ messageId?: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the AuthEmailTemplateTestResult interface.
38
+ */
39
+ export function instanceOfAuthEmailTemplateTestResult(value: object): value is AuthEmailTemplateTestResult {
40
+ return true;
41
+ }
42
+
43
+ export function AuthEmailTemplateTestResultFromJSON(json: any): AuthEmailTemplateTestResult {
44
+ return AuthEmailTemplateTestResultFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function AuthEmailTemplateTestResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthEmailTemplateTestResult {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+
53
+ 'success': json['success'] == null ? undefined : json['success'],
54
+ 'messageId': json['message_id'] == null ? undefined : json['message_id'],
55
+ };
56
+ }
57
+
58
+ export function AuthEmailTemplateTestResultToJSON(json: any): AuthEmailTemplateTestResult {
59
+ return AuthEmailTemplateTestResultToJSONTyped(json, false);
60
+ }
61
+
62
+ export function AuthEmailTemplateTestResultToJSONTyped(value?: AuthEmailTemplateTestResult | null, ignoreDiscriminator: boolean = false): any {
63
+ if (value == null) {
64
+ return value;
65
+ }
66
+
67
+ return {
68
+
69
+ 'success': value['success'],
70
+ 'message_id': value['messageId'],
71
+ };
72
+ }
73
+
@@ -0,0 +1,157 @@
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 AuthEmailTemplateVersion
20
+ */
21
+ export interface AuthEmailTemplateVersion {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof AuthEmailTemplateVersion
26
+ */
27
+ version?: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AuthEmailTemplateVersion
32
+ */
33
+ subject?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AuthEmailTemplateVersion
38
+ */
39
+ html?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AuthEmailTemplateVersion
44
+ */
45
+ text?: string | null;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AuthEmailTemplateVersion
50
+ */
51
+ mjmlSource?: string | null;
52
+ /**
53
+ *
54
+ * @type {{ [key: string]: any; }}
55
+ * @memberof AuthEmailTemplateVersion
56
+ */
57
+ designJson?: { [key: string]: any; } | null;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof AuthEmailTemplateVersion
62
+ */
63
+ editorType?: AuthEmailTemplateVersionEditorTypeEnum | null;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof AuthEmailTemplateVersion
68
+ */
69
+ fromName?: string | null;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof AuthEmailTemplateVersion
74
+ */
75
+ replyTo?: string | null;
76
+ /**
77
+ *
78
+ * @type {boolean}
79
+ * @memberof AuthEmailTemplateVersion
80
+ */
81
+ isEnabled?: boolean;
82
+ /**
83
+ *
84
+ * @type {Date}
85
+ * @memberof AuthEmailTemplateVersion
86
+ */
87
+ createdAt?: Date;
88
+ }
89
+
90
+
91
+ /**
92
+ * @export
93
+ */
94
+ export const AuthEmailTemplateVersionEditorTypeEnum = {
95
+ CODE: 'code',
96
+ MJML: 'mjml',
97
+ DESIGN: 'design'
98
+ } as const;
99
+ export type AuthEmailTemplateVersionEditorTypeEnum = typeof AuthEmailTemplateVersionEditorTypeEnum[keyof typeof AuthEmailTemplateVersionEditorTypeEnum];
100
+
101
+
102
+ /**
103
+ * Check if a given object implements the AuthEmailTemplateVersion interface.
104
+ */
105
+ export function instanceOfAuthEmailTemplateVersion(value: object): value is AuthEmailTemplateVersion {
106
+ return true;
107
+ }
108
+
109
+ export function AuthEmailTemplateVersionFromJSON(json: any): AuthEmailTemplateVersion {
110
+ return AuthEmailTemplateVersionFromJSONTyped(json, false);
111
+ }
112
+
113
+ export function AuthEmailTemplateVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthEmailTemplateVersion {
114
+ if (json == null) {
115
+ return json;
116
+ }
117
+ return {
118
+
119
+ 'version': json['version'] == null ? undefined : json['version'],
120
+ 'subject': json['subject'] == null ? undefined : json['subject'],
121
+ 'html': json['html'] == null ? undefined : json['html'],
122
+ 'text': json['text'] == null ? undefined : json['text'],
123
+ 'mjmlSource': json['mjml_source'] == null ? undefined : json['mjml_source'],
124
+ 'designJson': json['design_json'] == null ? undefined : json['design_json'],
125
+ 'editorType': json['editor_type'] == null ? undefined : json['editor_type'],
126
+ 'fromName': json['from_name'] == null ? undefined : json['from_name'],
127
+ 'replyTo': json['reply_to'] == null ? undefined : json['reply_to'],
128
+ 'isEnabled': json['is_enabled'] == null ? undefined : json['is_enabled'],
129
+ 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
130
+ };
131
+ }
132
+
133
+ export function AuthEmailTemplateVersionToJSON(json: any): AuthEmailTemplateVersion {
134
+ return AuthEmailTemplateVersionToJSONTyped(json, false);
135
+ }
136
+
137
+ export function AuthEmailTemplateVersionToJSONTyped(value?: AuthEmailTemplateVersion | null, ignoreDiscriminator: boolean = false): any {
138
+ if (value == null) {
139
+ return value;
140
+ }
141
+
142
+ return {
143
+
144
+ 'version': value['version'],
145
+ 'subject': value['subject'],
146
+ 'html': value['html'],
147
+ 'text': value['text'],
148
+ 'mjml_source': value['mjmlSource'],
149
+ 'design_json': value['designJson'],
150
+ 'editor_type': value['editorType'],
151
+ 'from_name': value['fromName'],
152
+ 'reply_to': value['replyTo'],
153
+ 'is_enabled': value['isEnabled'],
154
+ 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
155
+ };
156
+ }
157
+
@@ -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 { AuthEmailTemplateVersion } from './AuthEmailTemplateVersion';
17
+ import {
18
+ AuthEmailTemplateVersionFromJSON,
19
+ AuthEmailTemplateVersionFromJSONTyped,
20
+ AuthEmailTemplateVersionToJSON,
21
+ AuthEmailTemplateVersionToJSONTyped,
22
+ } from './AuthEmailTemplateVersion';
23
+ import type { RequestMeta } from './RequestMeta';
24
+ import {
25
+ RequestMetaFromJSON,
26
+ RequestMetaFromJSONTyped,
27
+ RequestMetaToJSON,
28
+ RequestMetaToJSONTyped,
29
+ } from './RequestMeta';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface AuthEmailTemplateVersionsResponse
35
+ */
36
+ export interface AuthEmailTemplateVersionsResponse {
37
+ /**
38
+ *
39
+ * @type {Array<AuthEmailTemplateVersion>}
40
+ * @memberof AuthEmailTemplateVersionsResponse
41
+ */
42
+ data?: Array<AuthEmailTemplateVersion>;
43
+ /**
44
+ *
45
+ * @type {RequestMeta}
46
+ * @memberof AuthEmailTemplateVersionsResponse
47
+ */
48
+ meta?: RequestMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the AuthEmailTemplateVersionsResponse interface.
53
+ */
54
+ export function instanceOfAuthEmailTemplateVersionsResponse(value: object): value is AuthEmailTemplateVersionsResponse {
55
+ return true;
56
+ }
57
+
58
+ export function AuthEmailTemplateVersionsResponseFromJSON(json: any): AuthEmailTemplateVersionsResponse {
59
+ return AuthEmailTemplateVersionsResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function AuthEmailTemplateVersionsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthEmailTemplateVersionsResponse {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(AuthEmailTemplateVersionFromJSON)),
69
+ 'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function AuthEmailTemplateVersionsResponseToJSON(json: any): AuthEmailTemplateVersionsResponse {
74
+ return AuthEmailTemplateVersionsResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function AuthEmailTemplateVersionsResponseToJSONTyped(value?: AuthEmailTemplateVersionsResponse | 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(AuthEmailTemplateVersionToJSON)),
85
+ 'meta': RequestMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -0,0 +1,54 @@
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
+ * Type of auth email template
18
+ * @export
19
+ */
20
+ export const AuthEmailType = {
21
+ MAGIC_LINK: 'magic_link',
22
+ PASSWORD_RESET: 'password_reset',
23
+ EMAIL_VERIFICATION: 'email_verification'
24
+ } as const;
25
+ export type AuthEmailType = typeof AuthEmailType[keyof typeof AuthEmailType];
26
+
27
+
28
+ export function instanceOfAuthEmailType(value: any): boolean {
29
+ for (const key in AuthEmailType) {
30
+ if (Object.prototype.hasOwnProperty.call(AuthEmailType, key)) {
31
+ if (AuthEmailType[key as keyof typeof AuthEmailType] === value) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+
39
+ export function AuthEmailTypeFromJSON(json: any): AuthEmailType {
40
+ return AuthEmailTypeFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function AuthEmailTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthEmailType {
44
+ return json as AuthEmailType;
45
+ }
46
+
47
+ export function AuthEmailTypeToJSON(value?: AuthEmailType | null): any {
48
+ return value as any;
49
+ }
50
+
51
+ export function AuthEmailTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): AuthEmailType {
52
+ return value as AuthEmailType;
53
+ }
54
+
@@ -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
+ import type { UpsertAuthEmailTemplateRequest } from './UpsertAuthEmailTemplateRequest';
17
+ import {
18
+ UpsertAuthEmailTemplateRequestFromJSON,
19
+ UpsertAuthEmailTemplateRequestFromJSONTyped,
20
+ UpsertAuthEmailTemplateRequestToJSON,
21
+ UpsertAuthEmailTemplateRequestToJSONTyped,
22
+ } from './UpsertAuthEmailTemplateRequest';
23
+
24
+ /**
25
+ * Atomic upsert of any subset of magic_link, password_reset, email_verification.
26
+ * At least one entry must be provided.
27
+ *
28
+ * @export
29
+ * @interface BulkUpsertAuthEmailTemplatesRequest
30
+ */
31
+ export interface BulkUpsertAuthEmailTemplatesRequest {
32
+ /**
33
+ *
34
+ * @type {UpsertAuthEmailTemplateRequest}
35
+ * @memberof BulkUpsertAuthEmailTemplatesRequest
36
+ */
37
+ magicLink?: UpsertAuthEmailTemplateRequest;
38
+ /**
39
+ *
40
+ * @type {UpsertAuthEmailTemplateRequest}
41
+ * @memberof BulkUpsertAuthEmailTemplatesRequest
42
+ */
43
+ passwordReset?: UpsertAuthEmailTemplateRequest;
44
+ /**
45
+ *
46
+ * @type {UpsertAuthEmailTemplateRequest}
47
+ * @memberof BulkUpsertAuthEmailTemplatesRequest
48
+ */
49
+ emailVerification?: UpsertAuthEmailTemplateRequest;
50
+ }
51
+
52
+ /**
53
+ * Check if a given object implements the BulkUpsertAuthEmailTemplatesRequest interface.
54
+ */
55
+ export function instanceOfBulkUpsertAuthEmailTemplatesRequest(value: object): value is BulkUpsertAuthEmailTemplatesRequest {
56
+ return true;
57
+ }
58
+
59
+ export function BulkUpsertAuthEmailTemplatesRequestFromJSON(json: any): BulkUpsertAuthEmailTemplatesRequest {
60
+ return BulkUpsertAuthEmailTemplatesRequestFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function BulkUpsertAuthEmailTemplatesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkUpsertAuthEmailTemplatesRequest {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'magicLink': json['magic_link'] == null ? undefined : UpsertAuthEmailTemplateRequestFromJSON(json['magic_link']),
70
+ 'passwordReset': json['password_reset'] == null ? undefined : UpsertAuthEmailTemplateRequestFromJSON(json['password_reset']),
71
+ 'emailVerification': json['email_verification'] == null ? undefined : UpsertAuthEmailTemplateRequestFromJSON(json['email_verification']),
72
+ };
73
+ }
74
+
75
+ export function BulkUpsertAuthEmailTemplatesRequestToJSON(json: any): BulkUpsertAuthEmailTemplatesRequest {
76
+ return BulkUpsertAuthEmailTemplatesRequestToJSONTyped(json, false);
77
+ }
78
+
79
+ export function BulkUpsertAuthEmailTemplatesRequestToJSONTyped(value?: BulkUpsertAuthEmailTemplatesRequest | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'magic_link': UpsertAuthEmailTemplateRequestToJSON(value['magicLink']),
87
+ 'password_reset': UpsertAuthEmailTemplateRequestToJSON(value['passwordReset']),
88
+ 'email_verification': UpsertAuthEmailTemplateRequestToJSON(value['emailVerification']),
89
+ };
90
+ }
91
+
@@ -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 { AuthEmailTemplate } from './AuthEmailTemplate';
24
+ import {
25
+ AuthEmailTemplateFromJSON,
26
+ AuthEmailTemplateFromJSONTyped,
27
+ AuthEmailTemplateToJSON,
28
+ AuthEmailTemplateToJSONTyped,
29
+ } from './AuthEmailTemplate';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface BulkUpsertAuthEmailTemplatesResponse
35
+ */
36
+ export interface BulkUpsertAuthEmailTemplatesResponse {
37
+ /**
38
+ *
39
+ * @type {{ [key: string]: AuthEmailTemplate; }}
40
+ * @memberof BulkUpsertAuthEmailTemplatesResponse
41
+ */
42
+ data?: { [key: string]: AuthEmailTemplate; };
43
+ /**
44
+ *
45
+ * @type {RequestMeta}
46
+ * @memberof BulkUpsertAuthEmailTemplatesResponse
47
+ */
48
+ meta?: RequestMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the BulkUpsertAuthEmailTemplatesResponse interface.
53
+ */
54
+ export function instanceOfBulkUpsertAuthEmailTemplatesResponse(value: object): value is BulkUpsertAuthEmailTemplatesResponse {
55
+ return true;
56
+ }
57
+
58
+ export function BulkUpsertAuthEmailTemplatesResponseFromJSON(json: any): BulkUpsertAuthEmailTemplatesResponse {
59
+ return BulkUpsertAuthEmailTemplatesResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function BulkUpsertAuthEmailTemplatesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkUpsertAuthEmailTemplatesResponse {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : (mapValues(json['data'], AuthEmailTemplateFromJSON)),
69
+ 'meta': json['meta'] == null ? undefined : RequestMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function BulkUpsertAuthEmailTemplatesResponseToJSON(json: any): BulkUpsertAuthEmailTemplatesResponse {
74
+ return BulkUpsertAuthEmailTemplatesResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function BulkUpsertAuthEmailTemplatesResponseToJSONTyped(value?: BulkUpsertAuthEmailTemplatesResponse | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': value['data'] == null ? undefined : (mapValues(value['data'], AuthEmailTemplateToJSON)),
85
+ 'meta': RequestMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+