@epilot/message-client 1.0.1 → 1.1.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/openapi.d.ts CHANGED
@@ -36,6 +36,15 @@ declare namespace Components {
36
36
  send_error?: {
37
37
  };
38
38
  }
39
+ /**
40
+ * Message attachments
41
+ */
42
+ export interface AttachmentsRelation {
43
+ /**
44
+ * It's normal entity relation with some additional properties for sending message attachment.
45
+ */
46
+ $relation?: File[];
47
+ }
39
48
  export interface BaseEntity {
40
49
  /**
41
50
  * Entity ID
@@ -81,49 +90,41 @@ declare namespace Components {
81
90
  */
82
91
  _updated_at: string; // date-time
83
92
  }
84
- /**
85
- * Message attachments
86
- */
87
93
  export interface File {
88
94
  /**
89
- * It's normal entity relation with some additional properties for sending message attachment.
95
+ * File entity ID
96
+ * example:
97
+ * f820ce3b-07b0-45ae-bcc6-babb2f53f79f
90
98
  */
91
- $relation?: {
92
- /**
93
- * File entity ID
94
- * example:
95
- * f820ce3b-07b0-45ae-bcc6-babb2f53f79f
96
- */
97
- entity_id: string;
98
- /**
99
- * File name
100
- * example:
101
- * Produktinformationen_epilot360_Double_Opt_in.pdf
102
- */
103
- filename?: string;
104
- /**
105
- * To indicate this file relation is message attachment. If false then this file will not be sent.
106
- */
107
- is_message_attachment?: boolean;
108
- /**
109
- * Content ID
110
- * example:
111
- * fb222496-a1a5-4639-94f2-07b5e35e4068
112
- */
113
- cid?: string;
114
- /**
115
- * If true then this attachment should not be offered for download (at least not in the main attachments list).\
116
- * The usecase is CID embedded image (aka inline image).
117
- *
118
- */
119
- inline?: boolean;
120
- /**
121
- * If true then this attachment is sent via link. The link have to be inserted to email body by API caller.\
122
- * In this case, service doesn't process this attachment.
123
- *
124
- */
125
- send_as_link?: boolean;
126
- }[];
99
+ entity_id: string;
100
+ /**
101
+ * File name
102
+ * example:
103
+ * Produktinformationen_epilot360_Double_Opt_in.pdf
104
+ */
105
+ filename?: string;
106
+ /**
107
+ * To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation.
108
+ */
109
+ is_message_attachment?: boolean;
110
+ /**
111
+ * Content ID (for inline)
112
+ * example:
113
+ * fb222496-a1a5-4639-94f2-07b5e35e4068
114
+ */
115
+ cid?: string;
116
+ /**
117
+ * If true then this attachment should not be offered for download (at least not in the main attachments list).\
118
+ * The usecase is CID embedded image (aka inline image).
119
+ *
120
+ */
121
+ inline?: boolean;
122
+ /**
123
+ * If true then this attachment is sent via link. The link have to be inserted to email body by API caller.\
124
+ * In this case, service doesn't process this attachment.
125
+ *
126
+ */
127
+ send_as_link?: boolean;
127
128
  }
128
129
  export interface Message {
129
130
  /**
@@ -170,7 +171,7 @@ declare namespace Components {
170
171
  * Bcc email addresses
171
172
  */
172
173
  bcc?: Address[];
173
- file?: File;
174
+ file?: AttachmentsRelation;
174
175
  /**
175
176
  * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
176
177
  * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
@@ -272,7 +273,7 @@ declare namespace Components {
272
273
  * Bcc email addresses
273
274
  */
274
275
  bcc?: Address[];
275
- file?: File;
276
+ file?: AttachmentsRelation;
276
277
  }
277
278
  export interface SearchParams {
278
279
  /**
@@ -405,7 +406,7 @@ declare namespace Paths {
405
406
  * Bcc email addresses
406
407
  */
407
408
  bcc?: Components.Schemas.Address[];
408
- file?: Components.Schemas.File;
409
+ file?: Components.Schemas.AttachmentsRelation;
409
410
  /**
410
411
  * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
411
412
  * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
@@ -664,7 +665,7 @@ declare namespace Paths {
664
665
  * Bcc email addresses
665
666
  */
666
667
  bcc?: Components.Schemas.Address[];
667
- file?: Components.Schemas.File;
668
+ file?: Components.Schemas.AttachmentsRelation;
668
669
  /**
669
670
  * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
670
671
  * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
@@ -793,7 +794,7 @@ declare namespace Paths {
793
794
  * Bcc email addresses
794
795
  */
795
796
  bcc?: Components.Schemas.Address[];
796
- file?: Components.Schemas.File;
797
+ file?: Components.Schemas.AttachmentsRelation;
797
798
  /**
798
799
  * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
799
800
  * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
@@ -953,7 +954,7 @@ declare namespace Paths {
953
954
  * Bcc email addresses
954
955
  */
955
956
  bcc?: Components.Schemas.Address[];
956
- file?: Components.Schemas.File;
957
+ file?: Components.Schemas.AttachmentsRelation;
957
958
  /**
958
959
  * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
959
960
  * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
package/dist/openapi.json CHANGED
@@ -297,11 +297,11 @@
297
297
  },
298
298
  "is_message_attachment": {
299
299
  "type": "boolean",
300
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
300
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
301
301
  },
302
302
  "cid": {
303
303
  "type": "string",
304
- "description": "Content ID",
304
+ "description": "Content ID (for inline)",
305
305
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
306
306
  },
307
307
  "inline": {
@@ -625,11 +625,11 @@
625
625
  },
626
626
  "is_message_attachment": {
627
627
  "type": "boolean",
628
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
628
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
629
629
  },
630
630
  "cid": {
631
631
  "type": "string",
632
- "description": "Content ID",
632
+ "description": "Content ID (for inline)",
633
633
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
634
634
  },
635
635
  "inline": {
@@ -1022,11 +1022,11 @@
1022
1022
  },
1023
1023
  "is_message_attachment": {
1024
1024
  "type": "boolean",
1025
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
1025
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
1026
1026
  },
1027
1027
  "cid": {
1028
1028
  "type": "string",
1029
- "description": "Content ID",
1029
+ "description": "Content ID (for inline)",
1030
1030
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
1031
1031
  },
1032
1032
  "inline": {
@@ -1643,11 +1643,11 @@
1643
1643
  },
1644
1644
  "is_message_attachment": {
1645
1645
  "type": "boolean",
1646
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
1646
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
1647
1647
  },
1648
1648
  "cid": {
1649
1649
  "type": "string",
1650
- "description": "Content ID",
1650
+ "description": "Content ID (for inline)",
1651
1651
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
1652
1652
  },
1653
1653
  "inline": {
@@ -1962,11 +1962,11 @@
1962
1962
  },
1963
1963
  "is_message_attachment": {
1964
1964
  "type": "boolean",
1965
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
1965
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
1966
1966
  },
1967
1967
  "cid": {
1968
1968
  "type": "string",
1969
- "description": "Content ID",
1969
+ "description": "Content ID (for inline)",
1970
1970
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
1971
1971
  },
1972
1972
  "inline": {
@@ -2400,11 +2400,11 @@
2400
2400
  },
2401
2401
  "is_message_attachment": {
2402
2402
  "type": "boolean",
2403
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
2403
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
2404
2404
  },
2405
2405
  "cid": {
2406
2406
  "type": "string",
2407
- "description": "Content ID",
2407
+ "description": "Content ID (for inline)",
2408
2408
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
2409
2409
  },
2410
2410
  "inline": {
@@ -2719,11 +2719,11 @@
2719
2719
  },
2720
2720
  "is_message_attachment": {
2721
2721
  "type": "boolean",
2722
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
2722
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
2723
2723
  },
2724
2724
  "cid": {
2725
2725
  "type": "string",
2726
- "description": "Content ID",
2726
+ "description": "Content ID (for inline)",
2727
2727
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
2728
2728
  },
2729
2729
  "inline": {
@@ -3229,11 +3229,11 @@
3229
3229
  },
3230
3230
  "is_message_attachment": {
3231
3231
  "type": "boolean",
3232
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
3232
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
3233
3233
  },
3234
3234
  "cid": {
3235
3235
  "type": "string",
3236
- "description": "Content ID",
3236
+ "description": "Content ID (for inline)",
3237
3237
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
3238
3238
  },
3239
3239
  "inline": {
@@ -3557,11 +3557,11 @@
3557
3557
  },
3558
3558
  "is_message_attachment": {
3559
3559
  "type": "boolean",
3560
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
3560
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
3561
3561
  },
3562
3562
  "cid": {
3563
3563
  "type": "string",
3564
- "description": "Content ID",
3564
+ "description": "Content ID (for inline)",
3565
3565
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
3566
3566
  },
3567
3567
  "inline": {
@@ -3956,11 +3956,11 @@
3956
3956
  },
3957
3957
  "is_message_attachment": {
3958
3958
  "type": "boolean",
3959
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
3959
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
3960
3960
  },
3961
3961
  "cid": {
3962
3962
  "type": "string",
3963
- "description": "Content ID",
3963
+ "description": "Content ID (for inline)",
3964
3964
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
3965
3965
  },
3966
3966
  "inline": {
@@ -4390,11 +4390,11 @@
4390
4390
  },
4391
4391
  "is_message_attachment": {
4392
4392
  "type": "boolean",
4393
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
4393
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
4394
4394
  },
4395
4395
  "cid": {
4396
4396
  "type": "string",
4397
- "description": "Content ID",
4397
+ "description": "Content ID (for inline)",
4398
4398
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
4399
4399
  },
4400
4400
  "inline": {
@@ -4709,11 +4709,11 @@
4709
4709
  },
4710
4710
  "is_message_attachment": {
4711
4711
  "type": "boolean",
4712
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
4712
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
4713
4713
  },
4714
4714
  "cid": {
4715
4715
  "type": "string",
4716
- "description": "Content ID",
4716
+ "description": "Content ID (for inline)",
4717
4717
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
4718
4718
  },
4719
4719
  "inline": {
@@ -5030,11 +5030,11 @@
5030
5030
  },
5031
5031
  "is_message_attachment": {
5032
5032
  "type": "boolean",
5033
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
5033
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
5034
5034
  },
5035
5035
  "cid": {
5036
5036
  "type": "string",
5037
- "description": "Content ID",
5037
+ "description": "Content ID (for inline)",
5038
5038
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
5039
5039
  },
5040
5040
  "inline": {
@@ -5143,7 +5143,7 @@
5143
5143
  }
5144
5144
  }
5145
5145
  },
5146
- "File": {
5146
+ "AttachmentsRelation": {
5147
5147
  "type": "object",
5148
5148
  "description": "Message attachments",
5149
5149
  "properties": {
@@ -5168,11 +5168,11 @@
5168
5168
  },
5169
5169
  "is_message_attachment": {
5170
5170
  "type": "boolean",
5171
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
5171
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
5172
5172
  },
5173
5173
  "cid": {
5174
5174
  "type": "string",
5175
- "description": "Content ID",
5175
+ "description": "Content ID (for inline)",
5176
5176
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
5177
5177
  },
5178
5178
  "inline": {
@@ -5190,6 +5190,43 @@
5190
5190
  }
5191
5191
  }
5192
5192
  },
5193
+ "File": {
5194
+ "type": "object",
5195
+ "required": [
5196
+ "entity_id"
5197
+ ],
5198
+ "properties": {
5199
+ "entity_id": {
5200
+ "type": "string",
5201
+ "description": "File entity ID",
5202
+ "example": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f"
5203
+ },
5204
+ "filename": {
5205
+ "type": "string",
5206
+ "description": "File name",
5207
+ "example": "Produktinformationen_epilot360_Double_Opt_in.pdf"
5208
+ },
5209
+ "is_message_attachment": {
5210
+ "type": "boolean",
5211
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
5212
+ },
5213
+ "cid": {
5214
+ "type": "string",
5215
+ "description": "Content ID (for inline)",
5216
+ "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
5217
+ },
5218
+ "inline": {
5219
+ "type": "boolean",
5220
+ "description": "If true then this attachment should not be offered for download (at least not in the main attachments list).\\\nThe usecase is CID embedded image (aka inline image).\n",
5221
+ "default": false
5222
+ },
5223
+ "send_as_link": {
5224
+ "type": "boolean",
5225
+ "description": "If true then this attachment is sent via link. The link have to be inserted to email body by API caller.\\\nIn this case, service doesn't process this attachment.\n",
5226
+ "default": false
5227
+ }
5228
+ }
5229
+ },
5193
5230
  "MessageRequestParams": {
5194
5231
  "required": [
5195
5232
  "subject",
@@ -5451,11 +5488,11 @@
5451
5488
  },
5452
5489
  "is_message_attachment": {
5453
5490
  "type": "boolean",
5454
- "description": "To indicate this file relation is message attachment. If false then this file will not be sent."
5491
+ "description": "To indicate this file relation is message attachment. If false then this file will not be sent and simply kept as a file relation."
5455
5492
  },
5456
5493
  "cid": {
5457
5494
  "type": "string",
5458
- "description": "Content ID",
5495
+ "description": "Content ID (for inline)",
5459
5496
  "example": "fb222496-a1a5-4639-94f2-07b5e35e4068"
5460
5497
  },
5461
5498
  "inline": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/message-client",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "description": "API Client for epilot Message API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,8 @@
11
11
  "openapi": "openapi read --json --dereference --bundle ../lambda/HandlerFunction/openapi.yml > src/openapi.json",
12
12
  "typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ../lambda/HandlerFunction/openapi.yml >> src/openapi.d.ts",
13
13
  "build": "npm run openapi && npm run typegen && npm run typescript && npm run bundle-definition",
14
- "eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml"
14
+ "eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml",
15
+ "prepublishOnly": "npm run build"
15
16
  },
16
17
  "files": [
17
18
  "*.js",