@epilot/email-settings-client 0.6.0 → 0.6.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 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/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
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/email-settings-client",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "API Client for epilot Email Settings API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,18 +18,6 @@
18
18
  "sdk",
19
19
  "email-settings"
20
20
  ],
21
- "scripts": {
22
- "test": "jest",
23
- "typescript": "tsc",
24
- "bundle-definition": "webpack",
25
- "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/email-settings.yaml",
26
- "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
27
- "build": "tsc && npm run build:patch && npm run bundle-definition",
28
- "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
29
- "build:watch": "npm run build && tsc -w",
30
- "prepublishOnly": "npm run typegen && npm run build",
31
- "lint": "pnpm exec eslint src"
32
- },
33
21
  "files": [
34
22
  "*.js",
35
23
  "*.d.ts",
@@ -70,5 +58,16 @@
70
58
  "webpack": "^5.18.0",
71
59
  "webpack-cli": "^4.4.0"
72
60
  },
73
- "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
74
- }
61
+ "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7",
62
+ "scripts": {
63
+ "test": "jest",
64
+ "typescript": "tsc",
65
+ "bundle-definition": "webpack",
66
+ "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/email-settings.yaml",
67
+ "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
68
+ "build": "tsc && npm run build:patch && npm run bundle-definition",
69
+ "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
70
+ "build:watch": "npm run build && tsc -w",
71
+ "lint": "pnpm exec eslint src"
72
+ }
73
+ }
@@ -0,0 +1,380 @@
1
+ /* eslint-disable */
2
+
3
+ import type {
4
+ OpenAPIClient,
5
+ Parameters,
6
+ UnknownParamsObject,
7
+ OperationResponse,
8
+ AxiosRequestConfig,
9
+ } from 'openapi-client-axios';
10
+
11
+ declare namespace Components {
12
+ namespace Schemas {
13
+ export interface Domain {
14
+ /**
15
+ * example:
16
+ * subdomain.epilot.cloud
17
+ */
18
+ domain?: string;
19
+ }
20
+ /**
21
+ * Setting that allows to add an email address on the custom domain. For e.g; john@doe.com
22
+ */
23
+ export type EmailAddressSetting = "email_address";
24
+ /**
25
+ * Setting that allows to add a custom domain. For e.g; doe.com
26
+ */
27
+ export type EmailDomainSetting = "email_domain";
28
+ /**
29
+ * - Restrict duplicates within:
30
+ * * 10s
31
+ * * 5m
32
+ * * 1d
33
+ * * 5000 // It converts to 5 seconds.When expressed as a numerical value, it will be interpreted as being in milliseconds.
34
+ * - Defaults to 3 minutes
35
+ * - Negative values will be treated same as positive values
36
+ * - If not set, defaults to 3 min
37
+ * - If set as 0, then the no email will be treated as a duplicate
38
+ * - Cannot have multiple values
39
+ *
40
+ */
41
+ export type RestrictDuplicatesWithinSetting = "restrict_duplicates_within";
42
+ export interface Setting {
43
+ [name: string]: any;
44
+ id?: string;
45
+ name?: string;
46
+ org_id?: string;
47
+ type: SettingType;
48
+ value?: string;
49
+ html?: string;
50
+ created_at?: string;
51
+ updated_at?: string;
52
+ created_by?: string;
53
+ updated_by?: string;
54
+ }
55
+ 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 | /**
56
+ * - Setting that specifies a list of addresses exempt from being flagged as duplicate emails.
57
+ * - 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.
58
+ *
59
+ */
60
+ WhitelistEmailAddressSetting | /**
61
+ * - Restrict duplicates within:
62
+ * * 10s
63
+ * * 5m
64
+ * * 1d
65
+ * * 5000 // It converts to 5 seconds.When expressed as a numerical value, it will be interpreted as being in milliseconds.
66
+ * - Defaults to 3 minutes
67
+ * - Negative values will be treated same as positive values
68
+ * - If not set, defaults to 3 min
69
+ * - If set as 0, then the no email will be treated as a duplicate
70
+ * - Cannot have multiple values
71
+ *
72
+ */
73
+ RestrictDuplicatesWithinSetting;
74
+ export type SettingsResponse = Setting[] | Setting;
75
+ /**
76
+ * Setting that allows to add a signature.
77
+ */
78
+ export type SignatureSetting = "signature";
79
+ /**
80
+ * - Setting that specifies a list of addresses exempt from being flagged as duplicate emails.
81
+ * - 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.
82
+ *
83
+ */
84
+ export type WhitelistEmailAddressSetting = "whitelist_email_address";
85
+ }
86
+ }
87
+ declare namespace Paths {
88
+ namespace AddDomain {
89
+ export type RequestBody = Components.Schemas.Domain;
90
+ namespace Responses {
91
+ export type $200 = Components.Schemas.SettingsResponse;
92
+ export interface $403 {
93
+ }
94
+ export interface $404 {
95
+ }
96
+ }
97
+ }
98
+ namespace AddSetting {
99
+ export type RequestBody = Components.Schemas.Setting;
100
+ namespace Responses {
101
+ export type $200 = Components.Schemas.SettingsResponse;
102
+ export interface $403 {
103
+ }
104
+ export interface $404 {
105
+ }
106
+ }
107
+ }
108
+ namespace DeleteDomain {
109
+ export type RequestBody = Components.Schemas.Domain;
110
+ namespace Responses {
111
+ export interface $204 {
112
+ }
113
+ export interface $403 {
114
+ }
115
+ export interface $404 {
116
+ }
117
+ }
118
+ }
119
+ namespace DeleteSetting {
120
+ export interface RequestBody {
121
+ type: Components.Schemas.SettingType;
122
+ /**
123
+ * ID of setting
124
+ * example:
125
+ * a10bd0ff-4391-4cfc-88ee-b19d718a9bf7
126
+ */
127
+ id: string;
128
+ }
129
+ namespace Responses {
130
+ export type $200 = Components.Schemas.Setting;
131
+ export interface $403 {
132
+ }
133
+ export interface $404 {
134
+ }
135
+ }
136
+ }
137
+ namespace GetSettings {
138
+ namespace Parameters {
139
+ export type Id = string;
140
+ export type Type = Components.Schemas.SettingType;
141
+ }
142
+ export interface QueryParameters {
143
+ type: Parameters.Type;
144
+ id?: Parameters.Id;
145
+ }
146
+ namespace Responses {
147
+ export type $200 = Components.Schemas.SettingsResponse;
148
+ export interface $403 {
149
+ }
150
+ export interface $404 {
151
+ }
152
+ }
153
+ }
154
+ namespace UpdateSetting {
155
+ namespace Parameters {
156
+ export type Id = string;
157
+ }
158
+ export interface PathParameters {
159
+ id: Parameters.Id;
160
+ }
161
+ export type RequestBody = Components.Schemas.Setting;
162
+ namespace Responses {
163
+ export type $200 = Components.Schemas.Setting;
164
+ export interface $403 {
165
+ }
166
+ export interface $404 {
167
+ }
168
+ }
169
+ }
170
+ namespace VerifyDomain {
171
+ export type RequestBody = Components.Schemas.Domain;
172
+ namespace Responses {
173
+ export type $200 = Components.Schemas.SettingsResponse;
174
+ export interface $403 {
175
+ }
176
+ export interface $404 {
177
+ }
178
+ }
179
+ }
180
+ namespace VerifyNameServers {
181
+ export type RequestBody = Components.Schemas.Domain;
182
+ namespace Responses {
183
+ export type $200 = Components.Schemas.SettingsResponse;
184
+ export interface $403 {
185
+ }
186
+ export interface $404 {
187
+ }
188
+ }
189
+ }
190
+ }
191
+
192
+
193
+ export interface OperationMethods {
194
+ /**
195
+ * getSettings - getSettings
196
+ *
197
+ * Get all settings by type
198
+ */
199
+ 'getSettings'(
200
+ parameters?: Parameters<Paths.GetSettings.QueryParameters> | null,
201
+ data?: any,
202
+ config?: AxiosRequestConfig
203
+ ): OperationResponse<Paths.GetSettings.Responses.$200>
204
+ /**
205
+ * addSetting - addSetting
206
+ *
207
+ * Add setting
208
+ */
209
+ 'addSetting'(
210
+ parameters?: Parameters<UnknownParamsObject> | null,
211
+ data?: Paths.AddSetting.RequestBody,
212
+ config?: AxiosRequestConfig
213
+ ): OperationResponse<Paths.AddSetting.Responses.$200>
214
+ /**
215
+ * deleteSetting - deleteSetting
216
+ *
217
+ * delete setting by ID and type
218
+ */
219
+ 'deleteSetting'(
220
+ parameters?: Parameters<UnknownParamsObject> | null,
221
+ data?: Paths.DeleteSetting.RequestBody,
222
+ config?: AxiosRequestConfig
223
+ ): OperationResponse<Paths.DeleteSetting.Responses.$200>
224
+ /**
225
+ * updateSetting - updateSetting
226
+ *
227
+ * Update setting by ID
228
+ */
229
+ 'updateSetting'(
230
+ parameters?: Parameters<Paths.UpdateSetting.PathParameters> | null,
231
+ data?: Paths.UpdateSetting.RequestBody,
232
+ config?: AxiosRequestConfig
233
+ ): OperationResponse<Paths.UpdateSetting.Responses.$200>
234
+ /**
235
+ * addDomain - addDomain
236
+ *
237
+ * Add domain
238
+ */
239
+ 'addDomain'(
240
+ parameters?: Parameters<UnknownParamsObject> | null,
241
+ data?: Paths.AddDomain.RequestBody,
242
+ config?: AxiosRequestConfig
243
+ ): OperationResponse<Paths.AddDomain.Responses.$200>
244
+ /**
245
+ * deleteDomain - deleteDomain
246
+ *
247
+ * Delete domain
248
+ */
249
+ 'deleteDomain'(
250
+ parameters?: Parameters<UnknownParamsObject> | null,
251
+ data?: Paths.DeleteDomain.RequestBody,
252
+ config?: AxiosRequestConfig
253
+ ): OperationResponse<Paths.DeleteDomain.Responses.$204>
254
+ /**
255
+ * verifyNameServers - verifyNameServers
256
+ *
257
+ * Verify name servers
258
+ */
259
+ 'verifyNameServers'(
260
+ parameters?: Parameters<UnknownParamsObject> | null,
261
+ data?: Paths.VerifyNameServers.RequestBody,
262
+ config?: AxiosRequestConfig
263
+ ): OperationResponse<Paths.VerifyNameServers.Responses.$200>
264
+ /**
265
+ * verifyDomain - verifyDomain
266
+ *
267
+ * Verify domain
268
+ */
269
+ 'verifyDomain'(
270
+ parameters?: Parameters<UnknownParamsObject> | null,
271
+ data?: Paths.VerifyDomain.RequestBody,
272
+ config?: AxiosRequestConfig
273
+ ): OperationResponse<Paths.VerifyDomain.Responses.$200>
274
+ }
275
+
276
+ export interface PathsDictionary {
277
+ ['/v1/email-settings']: {
278
+ /**
279
+ * getSettings - getSettings
280
+ *
281
+ * Get all settings by type
282
+ */
283
+ 'get'(
284
+ parameters?: Parameters<Paths.GetSettings.QueryParameters> | null,
285
+ data?: any,
286
+ config?: AxiosRequestConfig
287
+ ): OperationResponse<Paths.GetSettings.Responses.$200>
288
+ /**
289
+ * addSetting - addSetting
290
+ *
291
+ * Add setting
292
+ */
293
+ 'post'(
294
+ parameters?: Parameters<UnknownParamsObject> | null,
295
+ data?: Paths.AddSetting.RequestBody,
296
+ config?: AxiosRequestConfig
297
+ ): OperationResponse<Paths.AddSetting.Responses.$200>
298
+ /**
299
+ * deleteSetting - deleteSetting
300
+ *
301
+ * delete setting by ID and type
302
+ */
303
+ 'delete'(
304
+ parameters?: Parameters<UnknownParamsObject> | null,
305
+ data?: Paths.DeleteSetting.RequestBody,
306
+ config?: AxiosRequestConfig
307
+ ): OperationResponse<Paths.DeleteSetting.Responses.$200>
308
+ }
309
+ ['/v1/email-settings/{id}']: {
310
+ /**
311
+ * updateSetting - updateSetting
312
+ *
313
+ * Update setting by ID
314
+ */
315
+ 'post'(
316
+ parameters?: Parameters<Paths.UpdateSetting.PathParameters> | null,
317
+ data?: Paths.UpdateSetting.RequestBody,
318
+ config?: AxiosRequestConfig
319
+ ): OperationResponse<Paths.UpdateSetting.Responses.$200>
320
+ }
321
+ ['/v1/email-settings/domain']: {
322
+ /**
323
+ * addDomain - addDomain
324
+ *
325
+ * Add domain
326
+ */
327
+ 'post'(
328
+ parameters?: Parameters<UnknownParamsObject> | null,
329
+ data?: Paths.AddDomain.RequestBody,
330
+ config?: AxiosRequestConfig
331
+ ): OperationResponse<Paths.AddDomain.Responses.$200>
332
+ /**
333
+ * deleteDomain - deleteDomain
334
+ *
335
+ * Delete domain
336
+ */
337
+ 'delete'(
338
+ parameters?: Parameters<UnknownParamsObject> | null,
339
+ data?: Paths.DeleteDomain.RequestBody,
340
+ config?: AxiosRequestConfig
341
+ ): OperationResponse<Paths.DeleteDomain.Responses.$204>
342
+ }
343
+ ['/v1/email-settings/domain/name-servers:verify']: {
344
+ /**
345
+ * verifyNameServers - verifyNameServers
346
+ *
347
+ * Verify name servers
348
+ */
349
+ 'post'(
350
+ parameters?: Parameters<UnknownParamsObject> | null,
351
+ data?: Paths.VerifyNameServers.RequestBody,
352
+ config?: AxiosRequestConfig
353
+ ): OperationResponse<Paths.VerifyNameServers.Responses.$200>
354
+ }
355
+ ['/v1/email-settings/domain:verify']: {
356
+ /**
357
+ * verifyDomain - verifyDomain
358
+ *
359
+ * Verify domain
360
+ */
361
+ 'post'(
362
+ parameters?: Parameters<UnknownParamsObject> | null,
363
+ data?: Paths.VerifyDomain.RequestBody,
364
+ config?: AxiosRequestConfig
365
+ ): OperationResponse<Paths.VerifyDomain.Responses.$200>
366
+ }
367
+ }
368
+
369
+ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
370
+
371
+
372
+ export type Domain = Components.Schemas.Domain;
373
+ export type EmailAddressSetting = Components.Schemas.EmailAddressSetting;
374
+ export type EmailDomainSetting = Components.Schemas.EmailDomainSetting;
375
+ export type RestrictDuplicatesWithinSetting = Components.Schemas.RestrictDuplicatesWithinSetting;
376
+ export type Setting = Components.Schemas.Setting;
377
+ export type SettingType = Components.Schemas.SettingType;
378
+ export type SettingsResponse = Components.Schemas.SettingsResponse;
379
+ export type SignatureSetting = Components.Schemas.SignatureSetting;
380
+ export type WhitelistEmailAddressSetting = Components.Schemas.WhitelistEmailAddressSetting;