@epilot/email-settings-client 0.6.1 → 0.7.0

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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={390:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(o(466));t.default=i.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/email-settings":{"get":{"operationId":"getSettings","parameters":[{"name":"type","in":"query","required":true},{"name":"id","in":"query"}]},"post":{"operationId":"addSetting","requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteSetting","requestBody":{"content":{"application/json":{}}}}},"/v1/email-settings/{id}":{"post":{"operationId":"updateSetting","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}}}},"/v1/email-settings/domain":{"post":{"operationId":"addDomain","requestBody":{"content":{"application/json":{}}}},"delete":{"operationId":"deleteDomain","requestBody":{"content":{"application/json":{}}}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","requestBody":{"content":{"application/json":{}}}}},"/v1/email-settings/domain:verify":{"post":{"operationId":"verifyDomain","requestBody":{"content":{"application/json":{}}}}}},"components":{},"servers":[{"url":"https://email-settings.sls.epilot.io"}]}')}},t={},o=function o(n){var i=t[n];if(void 0!==i)return i.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,o),r.exports}(390),n=exports;for(var i in o)n[i]=o[i];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={390:function(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(466));t.default=s.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v2/email-settings/shared-inboxes/{id}":{"get":{"operationId":"getSharedInbox","parameters":[{"$ref":"#/components/parameters/SharedInboxId"}],"responses":{}},"delete":{"operationId":"deleteSharedInbox","parameters":[{"$ref":"#/components/parameters/SharedInboxId"}],"responses":{}},"put":{"operationId":"updateSharedInbox","parameters":[{"$ref":"#/components/parameters/SharedInboxId"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/shared-inboxes":{"get":{"operationId":"listSharedInboxes","responses":{}},"post":{"operationId":"addSharedInbox","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings":{"get":{"operationId":"getSettings","parameters":[{"name":"type","in":"query","required":true},{"name":"id","in":"query"}],"responses":{}},"post":{"operationId":"addSetting","requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteSetting","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/{id}":{"post":{"operationId":"updateSetting","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain":{"post":{"operationId":"addDomain","requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteDomain","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain:verify":{"post":{"operationId":"verifyDomain","requestBody":{"content":{"application/json":{}}},"responses":{}}}},"components":{"responses":{"NoContent":{},"CreateSharedInboxSuccessResponse":{"content":{"application/json":{}}},"UpdateSharedInboxSuccessResponse":{"content":{"application/json":{}}},"GetSharedInboxSuccessResponse":{"content":{"application/json":{}}},"ListSharedInboxesSuccessResponse":{"content":{"application/json":{}}},"BadRequest":{"content":{"application/json":{}}},"Forbidden":{"content":{"application/json":{}}},"NotFound":{"content":{"application/json":{}}},"Conflict":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}}},"parameters":{"SharedInboxId":{"name":"id","in":"path","required":true}}},"servers":[{"url":"https://email-settings.sls.epilot.io"}]}')}},t={},n=function n(o){var s=t[o];if(void 0!==s)return s.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}(390),o=exports;for(var s in n)o[s]=n[s];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -9,7 +9,33 @@ import type {
9
9
  } from 'openapi-client-axios';
10
10
 
11
11
  declare namespace Components {
12
+ namespace Parameters {
13
+ export type SharedInboxId = string;
14
+ }
15
+ export interface PathParameters {
16
+ SharedInboxId?: Parameters.SharedInboxId;
17
+ }
18
+ namespace Responses {
19
+ export type BadRequest = Schemas.ErrorResponse;
20
+ export type Conflict = Schemas.ErrorResponse;
21
+ export type CreateSharedInboxSuccessResponse = Schemas.SharedInboxResponse;
22
+ export type Forbidden = Schemas.ErrorResponse;
23
+ export type GetSharedInboxSuccessResponse = Schemas.SharedInboxResponse;
24
+ export type InternalServerError = Schemas.ErrorResponse;
25
+ export type ListSharedInboxesSuccessResponse = Schemas.SharedInboxResponse[];
26
+ export interface NoContent {
27
+ }
28
+ export type NotFound = Schemas.ErrorResponse;
29
+ export type UpdateSharedInboxSuccessResponse = Schemas.SharedInboxResponse;
30
+ }
12
31
  namespace Schemas {
32
+ export interface CreateSharedInboxPayload {
33
+ id?: string;
34
+ color: string;
35
+ name: string;
36
+ assignees?: string[];
37
+ description?: string;
38
+ }
13
39
  export interface Domain {
14
40
  /**
15
41
  * example:
@@ -25,6 +51,10 @@ declare namespace Components {
25
51
  * Setting that allows to add a custom domain. For e.g; doe.com
26
52
  */
27
53
  export type EmailDomainSetting = "email_domain";
54
+ export interface ErrorResponse {
55
+ error: string;
56
+ status: number;
57
+ }
28
58
  /**
29
59
  * - Restrict duplicates within:
30
60
  * * 10s
@@ -52,6 +82,13 @@ declare namespace Components {
52
82
  created_by?: string;
53
83
  updated_by?: string;
54
84
  }
85
+ export interface SettingMeta {
86
+ id: string;
87
+ created_at: string; // date-time
88
+ updated_at?: string; // date-time
89
+ created_by?: string;
90
+ updated_by?: string;
91
+ }
55
92
  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
93
  * - Setting that specifies a list of addresses exempt from being flagged as duplicate emails.
57
94
  * - 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.
@@ -72,10 +109,27 @@ declare namespace Components {
72
109
  */
73
110
  RestrictDuplicatesWithinSetting;
74
111
  export type SettingsResponse = Setting[] | Setting;
112
+ export interface SharedInboxResponse {
113
+ id: string;
114
+ created_at: string; // date-time
115
+ updated_at?: string; // date-time
116
+ created_by?: string;
117
+ updated_by?: string;
118
+ name: string;
119
+ color: string;
120
+ assignees: string[];
121
+ description?: string;
122
+ }
75
123
  /**
76
124
  * Setting that allows to add a signature.
77
125
  */
78
126
  export type SignatureSetting = "signature";
127
+ export interface UpdateSharedInboxPayload {
128
+ color?: string;
129
+ name?: string;
130
+ assignees?: string[];
131
+ description?: string;
132
+ }
79
133
  /**
80
134
  * - Setting that specifies a list of addresses exempt from being flagged as duplicate emails.
81
135
  * - 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.
@@ -105,6 +159,16 @@ declare namespace Paths {
105
159
  }
106
160
  }
107
161
  }
162
+ namespace AddSharedInbox {
163
+ export type RequestBody = Components.Schemas.CreateSharedInboxPayload;
164
+ namespace Responses {
165
+ export type $201 = Components.Responses.CreateSharedInboxSuccessResponse;
166
+ export type $400 = Components.Responses.BadRequest;
167
+ export type $403 = Components.Responses.Forbidden;
168
+ export type $409 = Components.Responses.Conflict;
169
+ export type $500 = Components.Responses.InternalServerError;
170
+ }
171
+ }
108
172
  namespace DeleteDomain {
109
173
  export type RequestBody = Components.Schemas.Domain;
110
174
  namespace Responses {
@@ -134,6 +198,19 @@ declare namespace Paths {
134
198
  }
135
199
  }
136
200
  }
201
+ namespace DeleteSharedInbox {
202
+ namespace Parameters {
203
+ export type Id = string;
204
+ }
205
+ export interface PathParameters {
206
+ id: Parameters.Id;
207
+ }
208
+ namespace Responses {
209
+ export type $204 = Components.Responses.NoContent;
210
+ export type $403 = Components.Responses.Forbidden;
211
+ export type $500 = Components.Responses.InternalServerError;
212
+ }
213
+ }
137
214
  namespace GetSettings {
138
215
  namespace Parameters {
139
216
  export type Id = string;
@@ -151,6 +228,27 @@ declare namespace Paths {
151
228
  }
152
229
  }
153
230
  }
231
+ namespace GetSharedInbox {
232
+ namespace Parameters {
233
+ export type Id = string;
234
+ }
235
+ export interface PathParameters {
236
+ id: Parameters.Id;
237
+ }
238
+ namespace Responses {
239
+ export type $200 = Components.Responses.GetSharedInboxSuccessResponse;
240
+ export type $403 = Components.Responses.Forbidden;
241
+ export type $404 = Components.Responses.NotFound;
242
+ export type $500 = Components.Responses.InternalServerError;
243
+ }
244
+ }
245
+ namespace ListSharedInboxes {
246
+ namespace Responses {
247
+ export type $200 = Components.Responses.ListSharedInboxesSuccessResponse;
248
+ export type $403 = Components.Responses.Forbidden;
249
+ export type $500 = Components.Responses.InternalServerError;
250
+ }
251
+ }
154
252
  namespace UpdateSetting {
155
253
  namespace Parameters {
156
254
  export type Id = string;
@@ -167,6 +265,23 @@ declare namespace Paths {
167
265
  }
168
266
  }
169
267
  }
268
+ namespace UpdateSharedInbox {
269
+ namespace Parameters {
270
+ export type Id = string;
271
+ }
272
+ export interface PathParameters {
273
+ id: Parameters.Id;
274
+ }
275
+ export type RequestBody = Components.Schemas.UpdateSharedInboxPayload;
276
+ namespace Responses {
277
+ export type $200 = Components.Responses.UpdateSharedInboxSuccessResponse;
278
+ export type $400 = Components.Responses.BadRequest;
279
+ export type $403 = Components.Responses.Forbidden;
280
+ export type $404 = Components.Responses.NotFound;
281
+ export type $409 = Components.Responses.Conflict;
282
+ export type $500 = Components.Responses.InternalServerError;
283
+ }
284
+ }
170
285
  namespace VerifyDomain {
171
286
  export type RequestBody = Components.Schemas.Domain;
172
287
  namespace Responses {
@@ -191,6 +306,56 @@ declare namespace Paths {
191
306
 
192
307
 
193
308
  export interface OperationMethods {
309
+ /**
310
+ * getSharedInbox - getSharedInbox
311
+ *
312
+ * Get shared inbox
313
+ */
314
+ 'getSharedInbox'(
315
+ parameters?: Parameters<Paths.GetSharedInbox.PathParameters> | null,
316
+ data?: any,
317
+ config?: AxiosRequestConfig
318
+ ): OperationResponse<Paths.GetSharedInbox.Responses.$200>
319
+ /**
320
+ * updateSharedInbox - updateSharedInbox
321
+ *
322
+ * Update shared inbox
323
+ */
324
+ 'updateSharedInbox'(
325
+ parameters?: Parameters<Paths.UpdateSharedInbox.PathParameters> | null,
326
+ data?: Paths.UpdateSharedInbox.RequestBody,
327
+ config?: AxiosRequestConfig
328
+ ): OperationResponse<Paths.UpdateSharedInbox.Responses.$200>
329
+ /**
330
+ * deleteSharedInbox - deleteSharedInbox
331
+ *
332
+ * Delete shared inbox
333
+ */
334
+ 'deleteSharedInbox'(
335
+ parameters?: Parameters<Paths.DeleteSharedInbox.PathParameters> | null,
336
+ data?: any,
337
+ config?: AxiosRequestConfig
338
+ ): OperationResponse<Paths.DeleteSharedInbox.Responses.$204>
339
+ /**
340
+ * listSharedInboxes - listSharedInboxes
341
+ *
342
+ * List shared inboxes
343
+ */
344
+ 'listSharedInboxes'(
345
+ parameters?: Parameters<UnknownParamsObject> | null,
346
+ data?: any,
347
+ config?: AxiosRequestConfig
348
+ ): OperationResponse<Paths.ListSharedInboxes.Responses.$200>
349
+ /**
350
+ * addSharedInbox - addSharedInbox
351
+ *
352
+ * Add shared inbox
353
+ */
354
+ 'addSharedInbox'(
355
+ parameters?: Parameters<UnknownParamsObject> | null,
356
+ data?: Paths.AddSharedInbox.RequestBody,
357
+ config?: AxiosRequestConfig
358
+ ): OperationResponse<Paths.AddSharedInbox.Responses.$201>
194
359
  /**
195
360
  * getSettings - getSettings
196
361
  *
@@ -274,6 +439,60 @@ export interface OperationMethods {
274
439
  }
275
440
 
276
441
  export interface PathsDictionary {
442
+ ['/v2/email-settings/shared-inboxes/{id}']: {
443
+ /**
444
+ * getSharedInbox - getSharedInbox
445
+ *
446
+ * Get shared inbox
447
+ */
448
+ 'get'(
449
+ parameters?: Parameters<Paths.GetSharedInbox.PathParameters> | null,
450
+ data?: any,
451
+ config?: AxiosRequestConfig
452
+ ): OperationResponse<Paths.GetSharedInbox.Responses.$200>
453
+ /**
454
+ * deleteSharedInbox - deleteSharedInbox
455
+ *
456
+ * Delete shared inbox
457
+ */
458
+ 'delete'(
459
+ parameters?: Parameters<Paths.DeleteSharedInbox.PathParameters> | null,
460
+ data?: any,
461
+ config?: AxiosRequestConfig
462
+ ): OperationResponse<Paths.DeleteSharedInbox.Responses.$204>
463
+ /**
464
+ * updateSharedInbox - updateSharedInbox
465
+ *
466
+ * Update shared inbox
467
+ */
468
+ 'put'(
469
+ parameters?: Parameters<Paths.UpdateSharedInbox.PathParameters> | null,
470
+ data?: Paths.UpdateSharedInbox.RequestBody,
471
+ config?: AxiosRequestConfig
472
+ ): OperationResponse<Paths.UpdateSharedInbox.Responses.$200>
473
+ }
474
+ ['/v2/email-settings/shared-inboxes']: {
475
+ /**
476
+ * listSharedInboxes - listSharedInboxes
477
+ *
478
+ * List shared inboxes
479
+ */
480
+ 'get'(
481
+ parameters?: Parameters<UnknownParamsObject> | null,
482
+ data?: any,
483
+ config?: AxiosRequestConfig
484
+ ): OperationResponse<Paths.ListSharedInboxes.Responses.$200>
485
+ /**
486
+ * addSharedInbox - addSharedInbox
487
+ *
488
+ * Add shared inbox
489
+ */
490
+ 'post'(
491
+ parameters?: Parameters<UnknownParamsObject> | null,
492
+ data?: Paths.AddSharedInbox.RequestBody,
493
+ config?: AxiosRequestConfig
494
+ ): OperationResponse<Paths.AddSharedInbox.Responses.$201>
495
+ }
277
496
  ['/v1/email-settings']: {
278
497
  /**
279
498
  * getSettings - getSettings
@@ -369,12 +588,17 @@ export interface PathsDictionary {
369
588
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
370
589
 
371
590
 
591
+ export type CreateSharedInboxPayload = Components.Schemas.CreateSharedInboxPayload;
372
592
  export type Domain = Components.Schemas.Domain;
373
593
  export type EmailAddressSetting = Components.Schemas.EmailAddressSetting;
374
594
  export type EmailDomainSetting = Components.Schemas.EmailDomainSetting;
595
+ export type ErrorResponse = Components.Schemas.ErrorResponse;
375
596
  export type RestrictDuplicatesWithinSetting = Components.Schemas.RestrictDuplicatesWithinSetting;
376
597
  export type Setting = Components.Schemas.Setting;
598
+ export type SettingMeta = Components.Schemas.SettingMeta;
377
599
  export type SettingType = Components.Schemas.SettingType;
378
600
  export type SettingsResponse = Components.Schemas.SettingsResponse;
601
+ export type SharedInboxResponse = Components.Schemas.SharedInboxResponse;
379
602
  export type SignatureSetting = Components.Schemas.SignatureSetting;
603
+ export type UpdateSharedInboxPayload = Components.Schemas.UpdateSharedInboxPayload;
380
604
  export type WhitelistEmailAddressSetting = Components.Schemas.WhitelistEmailAddressSetting;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/email-settings-client",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "API Client for epilot Email Settings API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,6 +18,18 @@
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
+ },
21
33
  "files": [
22
34
  "*.js",
23
35
  "*.d.ts",
@@ -48,26 +60,15 @@
48
60
  "@types/jest": "^26.0.20",
49
61
  "axios": "^1.11.0",
50
62
  "copy-webpack-plugin": "^7.0.0",
51
- "jest": "^26.6.3",
63
+ "jest": "^29.6.2",
52
64
  "json-loader": "^0.5.7",
53
65
  "openapicmd": "^2.7.0",
54
- "ts-jest": "^26.5.0",
66
+ "ts-jest": "^29.4.1",
55
67
  "ts-loader": "^8.0.14",
56
68
  "ts-node": "^10.9.1",
57
69
  "typescript": "^4.1.3",
58
70
  "webpack": "^5.18.0",
59
71
  "webpack-cli": "^4.4.0"
60
72
  },
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
- }
73
+ "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
74
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
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/src/openapi.d.ts DELETED
@@ -1,380 +0,0 @@
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;