@epilot/email-settings-client 0.4.0 → 0.4.1

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/client.d.ts CHANGED
File without changes
package/dist/client.js CHANGED
File without changes
File without changes
File without changes
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
package/dist/openapi.d.ts CHANGED
@@ -16,23 +16,63 @@ declare namespace Components {
16
16
  */
17
17
  domain?: string;
18
18
  }
19
+ /**
20
+ * Setting that allows to add an email address on the custom domain. For e.g; john@doe.com
21
+ */
22
+ export type EmailAddressSetting = "email_address";
23
+ /**
24
+ * Setting that allows to add a custom domain. For e.g; doe.com
25
+ */
26
+ export type EmailDomainSetting = "email_domain";
27
+ /**
28
+ * - Restrict duplicates within:
29
+ * * 10s
30
+ * * 5m
31
+ * * 1d
32
+ * * 5000 // It converts to 5 seconds.When expressed as a numerical value, it will be interpreted as being in milliseconds.
33
+ * - Defaults to 3 minutes
34
+ *
35
+ */
36
+ export type RestrictDuplicatesWithinSetting = "restrict_duplicates_within";
19
37
  export interface Setting {
20
38
  [name: string]: any;
21
39
  id?: string;
22
40
  name?: string;
23
41
  org_id?: string;
24
- /**
25
- * example:
26
- * signature
27
- */
28
- type: "signature" | "email_domain" | "email_address" | "whitelist_email_address";
42
+ type: SettingType;
43
+ value?: string;
29
44
  html?: string;
30
45
  created_at?: string;
31
46
  updated_at?: string;
32
47
  created_by?: string;
33
48
  updated_by?: string;
34
49
  }
50
+ export type SettingType = /* Setting that allows to add a signature. */ SignatureSetting | /* Setting that allows to add a custom domain. For e.g; doe.com */ EmailDomainSetting | /* Setting that allows to add an email address on the custom domain. For e.g; john@doe.com */ EmailAddressSetting | /**
51
+ * - Setting that specifies a list of addresses exempt from being flagged as duplicate emails.
52
+ * - An email will be flagged as a duplicate if it has the same content and is sent to the same recipient within the time frame specified in the RestrictDuplicatesWithinSetting.
53
+ *
54
+ */
55
+ WhitelistEmailAddressSetting | /**
56
+ * - Restrict duplicates within:
57
+ * * 10s
58
+ * * 5m
59
+ * * 1d
60
+ * * 5000 // It converts to 5 seconds.When expressed as a numerical value, it will be interpreted as being in milliseconds.
61
+ * - Defaults to 3 minutes
62
+ *
63
+ */
64
+ RestrictDuplicatesWithinSetting;
35
65
  export type SettingsResponse = Setting[];
66
+ /**
67
+ * Setting that allows to add a signature.
68
+ */
69
+ export type SignatureSetting = "signature";
70
+ /**
71
+ * - Setting that specifies a list of addresses exempt from being flagged as duplicate emails.
72
+ * - An email will be flagged as a duplicate if it has the same content and is sent to the same recipient within the time frame specified in the RestrictDuplicatesWithinSetting.
73
+ *
74
+ */
75
+ export type WhitelistEmailAddressSetting = "whitelist_email_address";
36
76
  }
37
77
  }
38
78
  declare namespace Paths {
@@ -69,11 +109,7 @@ declare namespace Paths {
69
109
  }
70
110
  namespace DeleteSetting {
71
111
  export interface RequestBody {
72
- /**
73
- * example:
74
- * signature
75
- */
76
- type: "signature" | "email_domain" | "email_address" | "whitelist_email_address";
112
+ type: Components.Schemas.SettingType;
77
113
  }
78
114
  namespace Responses {
79
115
  export type $200 = Components.Schemas.Setting;
@@ -86,7 +122,7 @@ declare namespace Paths {
86
122
  namespace GetSettings {
87
123
  namespace Parameters {
88
124
  export type Id = string;
89
- export type Type = "signature" | "email_domain" | "email_address" | "whitelist_email_address";
125
+ export type Type = Components.Schemas.SettingType;
90
126
  }
91
127
  export interface QueryParameters {
92
128
  type: Parameters.Type;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/email-settings-client",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "API Client for epilot Email Settings API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -61,7 +61,7 @@
61
61
  "jest": "^26.6.3",
62
62
  "json-loader": "^0.5.7",
63
63
  "openapi-client-axios-typegen": "^7.4.1",
64
- "openapicmd": "^1.16.2",
64
+ "openapicmd": "^2.1.0",
65
65
  "ts-jest": "^26.5.0",
66
66
  "ts-loader": "^8.0.14",
67
67
  "ts-node": "^10.9.1",
@@ -69,5 +69,5 @@
69
69
  "webpack": "^5.18.0",
70
70
  "webpack-cli": "^4.4.0"
71
71
  },
72
- "gitHead": "87e13b737363092db3b30c32df8e0507f7348697"
73
- }
72
+ "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
73
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2022 epilot GmbH
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
package/src/openapi.d.ts DELETED
@@ -1,317 +0,0 @@
1
- /* eslint-disable */
2
- import type {
3
- OpenAPIClient,
4
- Parameters,
5
- UnknownParamsObject,
6
- OperationResponse,
7
- AxiosRequestConfig,
8
- } from 'openapi-client-axios';
9
-
10
- declare namespace Components {
11
- namespace Schemas {
12
- export interface Domain {
13
- /**
14
- * example:
15
- * subdomain.epilot.cloud
16
- */
17
- domain?: string;
18
- }
19
- export interface Setting {
20
- [name: string]: any;
21
- id?: string;
22
- name?: string;
23
- org_id?: string;
24
- /**
25
- * example:
26
- * signature
27
- */
28
- type: "signature" | "email_domain" | "email_address" | "whitelist_email_address";
29
- html?: string;
30
- created_at?: string;
31
- updated_at?: string;
32
- created_by?: string;
33
- updated_by?: string;
34
- }
35
- export type SettingsResponse = Setting[];
36
- }
37
- }
38
- declare namespace Paths {
39
- namespace AddDomain {
40
- export type RequestBody = Components.Schemas.Domain;
41
- namespace Responses {
42
- export type $200 = Components.Schemas.SettingsResponse;
43
- export interface $403 {
44
- }
45
- export interface $404 {
46
- }
47
- }
48
- }
49
- namespace AddSetting {
50
- export type RequestBody = Components.Schemas.Setting;
51
- namespace Responses {
52
- export type $200 = Components.Schemas.SettingsResponse;
53
- export interface $403 {
54
- }
55
- export interface $404 {
56
- }
57
- }
58
- }
59
- namespace DeleteDomain {
60
- export type RequestBody = Components.Schemas.Domain;
61
- namespace Responses {
62
- export interface $204 {
63
- }
64
- export interface $403 {
65
- }
66
- export interface $404 {
67
- }
68
- }
69
- }
70
- namespace DeleteSetting {
71
- export interface RequestBody {
72
- /**
73
- * example:
74
- * signature
75
- */
76
- type: "signature" | "email_domain" | "email_address" | "whitelist_email_address";
77
- }
78
- namespace Responses {
79
- export type $200 = Components.Schemas.Setting;
80
- export interface $403 {
81
- }
82
- export interface $404 {
83
- }
84
- }
85
- }
86
- namespace GetSettings {
87
- namespace Parameters {
88
- export type Id = string;
89
- export type Type = "signature" | "email_domain" | "email_address" | "whitelist_email_address";
90
- }
91
- export interface QueryParameters {
92
- type: Parameters.Type;
93
- id?: Parameters.Id;
94
- }
95
- namespace Responses {
96
- export type $200 = Components.Schemas.SettingsResponse;
97
- export interface $403 {
98
- }
99
- export interface $404 {
100
- }
101
- }
102
- }
103
- namespace UpdateSetting {
104
- namespace Parameters {
105
- export type Id = string;
106
- }
107
- export interface PathParameters {
108
- id: Parameters.Id;
109
- }
110
- export type RequestBody = Components.Schemas.Setting;
111
- namespace Responses {
112
- export type $200 = Components.Schemas.Setting;
113
- export interface $403 {
114
- }
115
- export interface $404 {
116
- }
117
- }
118
- }
119
- namespace VerifyDomain {
120
- export type RequestBody = Components.Schemas.Domain;
121
- namespace Responses {
122
- export type $200 = Components.Schemas.SettingsResponse;
123
- export interface $403 {
124
- }
125
- export interface $404 {
126
- }
127
- }
128
- }
129
- namespace VerifyNameServers {
130
- export type RequestBody = Components.Schemas.Domain;
131
- namespace Responses {
132
- export type $200 = Components.Schemas.SettingsResponse;
133
- export interface $403 {
134
- }
135
- export interface $404 {
136
- }
137
- }
138
- }
139
- }
140
-
141
- export interface OperationMethods {
142
- /**
143
- * getSettings - getSettings
144
- *
145
- * Get all settings by type
146
- */
147
- 'getSettings'(
148
- parameters?: Parameters<Paths.GetSettings.QueryParameters> | null,
149
- data?: any,
150
- config?: AxiosRequestConfig
151
- ): OperationResponse<Paths.GetSettings.Responses.$200>
152
- /**
153
- * addSetting - addSetting
154
- *
155
- * Add setting
156
- */
157
- 'addSetting'(
158
- parameters?: Parameters<UnknownParamsObject> | null,
159
- data?: Paths.AddSetting.RequestBody,
160
- config?: AxiosRequestConfig
161
- ): OperationResponse<Paths.AddSetting.Responses.$200>
162
- /**
163
- * deleteSetting - deleteSetting
164
- *
165
- * delete setting by ID and type
166
- */
167
- 'deleteSetting'(
168
- parameters?: Parameters<UnknownParamsObject> | null,
169
- data?: Paths.DeleteSetting.RequestBody,
170
- config?: AxiosRequestConfig
171
- ): OperationResponse<Paths.DeleteSetting.Responses.$200>
172
- /**
173
- * updateSetting - updateSetting
174
- *
175
- * Update setting by ID
176
- */
177
- 'updateSetting'(
178
- parameters?: Parameters<Paths.UpdateSetting.PathParameters> | null,
179
- data?: Paths.UpdateSetting.RequestBody,
180
- config?: AxiosRequestConfig
181
- ): OperationResponse<Paths.UpdateSetting.Responses.$200>
182
- /**
183
- * addDomain - addDomain
184
- *
185
- * Add domain
186
- */
187
- 'addDomain'(
188
- parameters?: Parameters<UnknownParamsObject> | null,
189
- data?: Paths.AddDomain.RequestBody,
190
- config?: AxiosRequestConfig
191
- ): OperationResponse<Paths.AddDomain.Responses.$200>
192
- /**
193
- * deleteDomain - deleteDomain
194
- *
195
- * Delete domain
196
- */
197
- 'deleteDomain'(
198
- parameters?: Parameters<UnknownParamsObject> | null,
199
- data?: Paths.DeleteDomain.RequestBody,
200
- config?: AxiosRequestConfig
201
- ): OperationResponse<Paths.DeleteDomain.Responses.$204>
202
- /**
203
- * verifyNameServers - verifyNameServers
204
- *
205
- * Verify name servers
206
- */
207
- 'verifyNameServers'(
208
- parameters?: Parameters<UnknownParamsObject> | null,
209
- data?: Paths.VerifyNameServers.RequestBody,
210
- config?: AxiosRequestConfig
211
- ): OperationResponse<Paths.VerifyNameServers.Responses.$200>
212
- /**
213
- * verifyDomain - verifyDomain
214
- *
215
- * Verify domain
216
- */
217
- 'verifyDomain'(
218
- parameters?: Parameters<UnknownParamsObject> | null,
219
- data?: Paths.VerifyDomain.RequestBody,
220
- config?: AxiosRequestConfig
221
- ): OperationResponse<Paths.VerifyDomain.Responses.$200>
222
- }
223
-
224
- export interface PathsDictionary {
225
- ['/v1/email-settings']: {
226
- /**
227
- * getSettings - getSettings
228
- *
229
- * Get all settings by type
230
- */
231
- 'get'(
232
- parameters?: Parameters<Paths.GetSettings.QueryParameters> | null,
233
- data?: any,
234
- config?: AxiosRequestConfig
235
- ): OperationResponse<Paths.GetSettings.Responses.$200>
236
- /**
237
- * addSetting - addSetting
238
- *
239
- * Add setting
240
- */
241
- 'post'(
242
- parameters?: Parameters<UnknownParamsObject> | null,
243
- data?: Paths.AddSetting.RequestBody,
244
- config?: AxiosRequestConfig
245
- ): OperationResponse<Paths.AddSetting.Responses.$200>
246
- /**
247
- * deleteSetting - deleteSetting
248
- *
249
- * delete setting by ID and type
250
- */
251
- 'delete'(
252
- parameters?: Parameters<UnknownParamsObject> | null,
253
- data?: Paths.DeleteSetting.RequestBody,
254
- config?: AxiosRequestConfig
255
- ): OperationResponse<Paths.DeleteSetting.Responses.$200>
256
- }
257
- ['/v1/email-settings/{id}']: {
258
- /**
259
- * updateSetting - updateSetting
260
- *
261
- * Update setting by ID
262
- */
263
- 'post'(
264
- parameters?: Parameters<Paths.UpdateSetting.PathParameters> | null,
265
- data?: Paths.UpdateSetting.RequestBody,
266
- config?: AxiosRequestConfig
267
- ): OperationResponse<Paths.UpdateSetting.Responses.$200>
268
- }
269
- ['/v1/email-settings/domain']: {
270
- /**
271
- * addDomain - addDomain
272
- *
273
- * Add domain
274
- */
275
- 'post'(
276
- parameters?: Parameters<UnknownParamsObject> | null,
277
- data?: Paths.AddDomain.RequestBody,
278
- config?: AxiosRequestConfig
279
- ): OperationResponse<Paths.AddDomain.Responses.$200>
280
- /**
281
- * deleteDomain - deleteDomain
282
- *
283
- * Delete domain
284
- */
285
- 'delete'(
286
- parameters?: Parameters<UnknownParamsObject> | null,
287
- data?: Paths.DeleteDomain.RequestBody,
288
- config?: AxiosRequestConfig
289
- ): OperationResponse<Paths.DeleteDomain.Responses.$204>
290
- }
291
- ['/v1/email-settings/domain/name-servers:verify']: {
292
- /**
293
- * verifyNameServers - verifyNameServers
294
- *
295
- * Verify name servers
296
- */
297
- 'post'(
298
- parameters?: Parameters<UnknownParamsObject> | null,
299
- data?: Paths.VerifyNameServers.RequestBody,
300
- config?: AxiosRequestConfig
301
- ): OperationResponse<Paths.VerifyNameServers.Responses.$200>
302
- }
303
- ['/v1/email-settings/domain:verify']: {
304
- /**
305
- * verifyDomain - verifyDomain
306
- *
307
- * Verify domain
308
- */
309
- 'post'(
310
- parameters?: Parameters<UnknownParamsObject> | null,
311
- data?: Paths.VerifyDomain.RequestBody,
312
- config?: AxiosRequestConfig
313
- ): OperationResponse<Paths.VerifyDomain.Responses.$200>
314
- }
315
- }
316
-
317
- export type Client = OpenAPIClient<OperationMethods, PathsDictionary>