@epilot/email-settings-client 0.6.0 → 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.
package/dist/client.d.ts CHANGED
File without changes
package/dist/client.js CHANGED
File without changes
File without changes
@@ -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/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
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.0",
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",
@@ -60,10 +60,10 @@
60
60
  "@types/jest": "^26.0.20",
61
61
  "axios": "^1.11.0",
62
62
  "copy-webpack-plugin": "^7.0.0",
63
- "jest": "^26.6.3",
63
+ "jest": "^29.6.2",
64
64
  "json-loader": "^0.5.7",
65
65
  "openapicmd": "^2.7.0",
66
- "ts-jest": "^26.5.0",
66
+ "ts-jest": "^29.4.1",
67
67
  "ts-loader": "^8.0.14",
68
68
  "ts-node": "^10.9.1",
69
69
  "typescript": "^4.1.3",