@productminds/article-events 4.1.1 → 5.2.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # `article-events`
2
-
3
- > TODO: description
4
-
5
- ## Usage
6
-
7
- ```
8
- const articleEvents = require('article-events');
9
-
10
- // TODO: DEMONSTRATE API
11
- ```
1
+ # `article-events`
2
+
3
+ > TODO: description
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ const articleEvents = require('article-events');
9
+
10
+ // TODO: DEMONSTRATE API
11
+ ```
@@ -4,23 +4,37 @@ export declare const ExternalArticleEventSchema: Schema.Struct<{
4
4
  payload: Schema.Struct<{
5
5
  article: Schema.extend<Schema.Struct<{
6
6
  id: typeof Schema.NonEmptyString;
7
- title: typeof Schema.NonEmptyString;
8
- teaser: typeof Schema.NonEmptyString;
9
- content: typeof Schema.NonEmptyString;
10
- publishedAt: Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf, never>;
11
- updatedAt: Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf, never>;
12
- retrievedAt: Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf, never>;
13
7
  url: typeof Schema.NonEmptyString;
14
8
  site: typeof Schema.NonEmptyString;
15
- authors: Schema.Array$<Schema.Struct<{
16
- name: typeof Schema.NonEmptyString;
17
- }>>;
18
- }>, Schema.Struct<{
19
- tags: Schema.Array$<Schema.Struct<{
20
- type: Schema.Literal<["CATEGORY"]>;
21
- value: typeof Schema.NonEmptyString;
22
- }>>;
23
- }>>;
9
+ content: typeof Schema.NonEmptyString;
10
+ retrievedAt: Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf, never>;
11
+ }>, Schema.SchemaClass<{
12
+ readonly title?: string | undefined;
13
+ readonly teaser?: string | undefined;
14
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
15
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
16
+ readonly authors?: readonly {
17
+ readonly name: string;
18
+ }[] | undefined;
19
+ readonly tags?: readonly {
20
+ readonly type: "CATEGORY";
21
+ readonly value: string;
22
+ }[] | undefined;
23
+ readonly language?: string | undefined;
24
+ }, {
25
+ readonly title?: string | undefined;
26
+ readonly teaser?: string | undefined;
27
+ readonly publishedAt?: string | undefined;
28
+ readonly updatedAt?: string | undefined;
29
+ readonly authors?: readonly {
30
+ readonly name: string;
31
+ }[] | undefined;
32
+ readonly tags?: readonly {
33
+ readonly type: "CATEGORY";
34
+ readonly value: string;
35
+ }[] | undefined;
36
+ readonly language?: string | undefined;
37
+ }, never>>;
24
38
  status: Schema.Literal<["NEW", "UPDATED"]>;
25
39
  source: Schema.Literal<["EXTERNAL"]>;
26
40
  }>;
@@ -31,22 +45,23 @@ declare const _default: {
31
45
  readonly payload: {
32
46
  readonly article: {
33
47
  readonly id: string;
34
- readonly title: string;
35
- readonly teaser: string;
36
48
  readonly content: string;
37
- readonly publishedAt: import("effect/DateTime").Utc;
38
- readonly updatedAt: import("effect/DateTime").Utc;
39
49
  readonly retrievedAt: import("effect/DateTime").Utc;
40
50
  readonly url: string;
41
51
  readonly site: string;
42
- readonly authors: readonly {
43
- readonly name: string;
44
- }[];
45
52
  } & {
46
- readonly tags: readonly {
53
+ readonly title?: string | undefined;
54
+ readonly teaser?: string | undefined;
55
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
56
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
57
+ readonly authors?: readonly {
58
+ readonly name: string;
59
+ }[] | undefined;
60
+ readonly tags?: readonly {
47
61
  readonly type: "CATEGORY";
48
62
  readonly value: string;
49
- }[];
63
+ }[] | undefined;
64
+ readonly language?: string | undefined;
50
65
  };
51
66
  readonly status: "NEW" | "UPDATED";
52
67
  readonly source: "EXTERNAL";
@@ -57,22 +72,23 @@ declare const _default: {
57
72
  readonly payload: {
58
73
  readonly article: {
59
74
  readonly id: string;
60
- readonly title: string;
61
- readonly teaser: string;
62
75
  readonly content: string;
63
- readonly publishedAt: import("effect/DateTime").Utc;
64
- readonly updatedAt: import("effect/DateTime").Utc;
65
76
  readonly retrievedAt: import("effect/DateTime").Utc;
66
77
  readonly url: string;
67
78
  readonly site: string;
68
- readonly authors: readonly {
69
- readonly name: string;
70
- }[];
71
79
  } & {
72
- readonly tags: readonly {
80
+ readonly title?: string | undefined;
81
+ readonly teaser?: string | undefined;
82
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
83
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
84
+ readonly authors?: readonly {
85
+ readonly name: string;
86
+ }[] | undefined;
87
+ readonly tags?: readonly {
73
88
  readonly type: "CATEGORY";
74
89
  readonly value: string;
75
- }[];
90
+ }[] | undefined;
91
+ readonly language?: string | undefined;
76
92
  };
77
93
  readonly status: "NEW" | "UPDATED";
78
94
  readonly source: "EXTERNAL";
@@ -83,22 +99,23 @@ declare const _default: {
83
99
  readonly payload: {
84
100
  readonly article: {
85
101
  readonly id: string;
86
- readonly title: string;
87
- readonly teaser: string;
88
102
  readonly content: string;
89
- readonly publishedAt: import("effect/DateTime").Utc;
90
- readonly updatedAt: import("effect/DateTime").Utc;
91
103
  readonly retrievedAt: import("effect/DateTime").Utc;
92
104
  readonly url: string;
93
105
  readonly site: string;
94
- readonly authors: readonly {
95
- readonly name: string;
96
- }[];
97
106
  } & {
98
- readonly tags: readonly {
107
+ readonly title?: string | undefined;
108
+ readonly teaser?: string | undefined;
109
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
110
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
111
+ readonly authors?: readonly {
112
+ readonly name: string;
113
+ }[] | undefined;
114
+ readonly tags?: readonly {
99
115
  readonly type: "CATEGORY";
100
116
  readonly value: string;
101
- }[];
117
+ }[] | undefined;
118
+ readonly language?: string | undefined;
102
119
  };
103
120
  readonly status: "NEW" | "UPDATED";
104
121
  readonly source: "EXTERNAL";
@@ -108,22 +125,23 @@ declare const _default: {
108
125
  readonly payload: {
109
126
  readonly article: {
110
127
  readonly id: string;
111
- readonly title: string;
112
- readonly teaser: string;
113
128
  readonly content: string;
114
- readonly publishedAt: string;
115
- readonly updatedAt: string;
116
129
  readonly retrievedAt: string;
117
130
  readonly url: string;
118
131
  readonly site: string;
119
- readonly authors: readonly {
120
- readonly name: string;
121
- }[];
122
132
  } & {
123
- readonly tags: readonly {
133
+ readonly title?: string | undefined;
134
+ readonly teaser?: string | undefined;
135
+ readonly publishedAt?: string | undefined;
136
+ readonly updatedAt?: string | undefined;
137
+ readonly authors?: readonly {
138
+ readonly name: string;
139
+ }[] | undefined;
140
+ readonly tags?: readonly {
124
141
  readonly type: "CATEGORY";
125
142
  readonly value: string;
126
- }[];
143
+ }[] | undefined;
144
+ readonly language?: string | undefined;
127
145
  };
128
146
  readonly status: "NEW" | "UPDATED";
129
147
  readonly source: "EXTERNAL";
@@ -134,22 +152,23 @@ declare const _default: {
134
152
  readonly payload: {
135
153
  readonly article: {
136
154
  readonly id: string;
137
- readonly title: string;
138
- readonly teaser: string;
139
155
  readonly content: string;
140
- readonly publishedAt: import("effect/DateTime").Utc;
141
- readonly updatedAt: import("effect/DateTime").Utc;
142
156
  readonly retrievedAt: import("effect/DateTime").Utc;
143
157
  readonly url: string;
144
158
  readonly site: string;
145
- readonly authors: readonly {
146
- readonly name: string;
147
- }[];
148
159
  } & {
149
- readonly tags: readonly {
160
+ readonly title?: string | undefined;
161
+ readonly teaser?: string | undefined;
162
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
163
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
164
+ readonly authors?: readonly {
165
+ readonly name: string;
166
+ }[] | undefined;
167
+ readonly tags?: readonly {
150
168
  readonly type: "CATEGORY";
151
169
  readonly value: string;
152
- }[];
170
+ }[] | undefined;
171
+ readonly language?: string | undefined;
153
172
  };
154
173
  readonly status: "NEW" | "UPDATED";
155
174
  readonly source: "EXTERNAL";
@@ -159,22 +178,23 @@ declare const _default: {
159
178
  readonly payload: {
160
179
  readonly article: {
161
180
  readonly id: string;
162
- readonly title: string;
163
- readonly teaser: string;
164
181
  readonly content: string;
165
- readonly publishedAt: string;
166
- readonly updatedAt: string;
167
182
  readonly retrievedAt: string;
168
183
  readonly url: string;
169
184
  readonly site: string;
170
- readonly authors: readonly {
171
- readonly name: string;
172
- }[];
173
185
  } & {
174
- readonly tags: readonly {
186
+ readonly title?: string | undefined;
187
+ readonly teaser?: string | undefined;
188
+ readonly publishedAt?: string | undefined;
189
+ readonly updatedAt?: string | undefined;
190
+ readonly authors?: readonly {
191
+ readonly name: string;
192
+ }[] | undefined;
193
+ readonly tags?: readonly {
175
194
  readonly type: "CATEGORY";
176
195
  readonly value: string;
177
- }[];
196
+ }[] | undefined;
197
+ readonly language?: string | undefined;
178
198
  };
179
199
  readonly status: "NEW" | "UPDATED";
180
200
  readonly source: "EXTERNAL";
@@ -185,22 +205,23 @@ declare const _default: {
185
205
  readonly payload: {
186
206
  readonly article: {
187
207
  readonly id: string;
188
- readonly title: string;
189
- readonly teaser: string;
190
208
  readonly content: string;
191
- readonly publishedAt: import("effect/DateTime").Utc;
192
- readonly updatedAt: import("effect/DateTime").Utc;
193
209
  readonly retrievedAt: import("effect/DateTime").Utc;
194
210
  readonly url: string;
195
211
  readonly site: string;
196
- readonly authors: readonly {
197
- readonly name: string;
198
- }[];
199
212
  } & {
200
- readonly tags: readonly {
213
+ readonly title?: string | undefined;
214
+ readonly teaser?: string | undefined;
215
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
216
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
217
+ readonly authors?: readonly {
218
+ readonly name: string;
219
+ }[] | undefined;
220
+ readonly tags?: readonly {
201
221
  readonly type: "CATEGORY";
202
222
  readonly value: string;
203
- }[];
223
+ }[] | undefined;
224
+ readonly language?: string | undefined;
204
225
  };
205
226
  readonly status: "NEW" | "UPDATED";
206
227
  readonly source: "EXTERNAL";
@@ -211,22 +232,23 @@ declare const _default: {
211
232
  readonly payload: {
212
233
  readonly article: {
213
234
  readonly id: string;
214
- readonly title: string;
215
- readonly teaser: string;
216
235
  readonly content: string;
217
- readonly publishedAt: import("effect/DateTime").Utc;
218
- readonly updatedAt: import("effect/DateTime").Utc;
219
236
  readonly retrievedAt: import("effect/DateTime").Utc;
220
237
  readonly url: string;
221
238
  readonly site: string;
222
- readonly authors: readonly {
223
- readonly name: string;
224
- }[];
225
239
  } & {
226
- readonly tags: readonly {
240
+ readonly title?: string | undefined;
241
+ readonly teaser?: string | undefined;
242
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
243
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
244
+ readonly authors?: readonly {
245
+ readonly name: string;
246
+ }[] | undefined;
247
+ readonly tags?: readonly {
227
248
  readonly type: "CATEGORY";
228
249
  readonly value: string;
229
- }[];
250
+ }[] | undefined;
251
+ readonly language?: string | undefined;
230
252
  };
231
253
  readonly status: "NEW" | "UPDATED";
232
254
  readonly source: "EXTERNAL";
@@ -237,22 +259,23 @@ declare const _default: {
237
259
  readonly payload: {
238
260
  readonly article: {
239
261
  readonly id: string;
240
- readonly title: string;
241
- readonly teaser: string;
242
262
  readonly content: string;
243
- readonly publishedAt: import("effect/DateTime").Utc;
244
- readonly updatedAt: import("effect/DateTime").Utc;
245
263
  readonly retrievedAt: import("effect/DateTime").Utc;
246
264
  readonly url: string;
247
265
  readonly site: string;
248
- readonly authors: readonly {
249
- readonly name: string;
250
- }[];
251
266
  } & {
252
- readonly tags: readonly {
267
+ readonly title?: string | undefined;
268
+ readonly teaser?: string | undefined;
269
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
270
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
271
+ readonly authors?: readonly {
272
+ readonly name: string;
273
+ }[] | undefined;
274
+ readonly tags?: readonly {
253
275
  readonly type: "CATEGORY";
254
276
  readonly value: string;
255
- }[];
277
+ }[] | undefined;
278
+ readonly language?: string | undefined;
256
279
  };
257
280
  readonly status: "NEW" | "UPDATED";
258
281
  readonly source: "EXTERNAL";
@@ -263,22 +286,23 @@ declare const _default: {
263
286
  readonly payload: {
264
287
  readonly article: {
265
288
  readonly id: string;
266
- readonly title: string;
267
- readonly teaser: string;
268
289
  readonly content: string;
269
- readonly publishedAt: import("effect/DateTime").Utc;
270
- readonly updatedAt: import("effect/DateTime").Utc;
271
290
  readonly retrievedAt: import("effect/DateTime").Utc;
272
291
  readonly url: string;
273
292
  readonly site: string;
274
- readonly authors: readonly {
275
- readonly name: string;
276
- }[];
277
293
  } & {
278
- readonly tags: readonly {
294
+ readonly title?: string | undefined;
295
+ readonly teaser?: string | undefined;
296
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
297
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
298
+ readonly authors?: readonly {
299
+ readonly name: string;
300
+ }[] | undefined;
301
+ readonly tags?: readonly {
279
302
  readonly type: "CATEGORY";
280
303
  readonly value: string;
281
- }[];
304
+ }[] | undefined;
305
+ readonly language?: string | undefined;
282
306
  };
283
307
  readonly status: "NEW" | "UPDATED";
284
308
  readonly source: "EXTERNAL";
@@ -289,22 +313,23 @@ declare const _default: {
289
313
  readonly payload: {
290
314
  readonly article: {
291
315
  readonly id: string;
292
- readonly title: string;
293
- readonly teaser: string;
294
316
  readonly content: string;
295
- readonly publishedAt: import("effect/DateTime").Utc;
296
- readonly updatedAt: import("effect/DateTime").Utc;
297
317
  readonly retrievedAt: import("effect/DateTime").Utc;
298
318
  readonly url: string;
299
319
  readonly site: string;
300
- readonly authors: readonly {
301
- readonly name: string;
302
- }[];
303
320
  } & {
304
- readonly tags: readonly {
321
+ readonly title?: string | undefined;
322
+ readonly teaser?: string | undefined;
323
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
324
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
325
+ readonly authors?: readonly {
326
+ readonly name: string;
327
+ }[] | undefined;
328
+ readonly tags?: readonly {
305
329
  readonly type: "CATEGORY";
306
330
  readonly value: string;
307
- }[];
331
+ }[] | undefined;
332
+ readonly language?: string | undefined;
308
333
  };
309
334
  readonly status: "NEW" | "UPDATED";
310
335
  readonly source: "EXTERNAL";
@@ -315,22 +340,23 @@ declare const _default: {
315
340
  readonly payload: {
316
341
  readonly article: {
317
342
  readonly id: string;
318
- readonly title: string;
319
- readonly teaser: string;
320
343
  readonly content: string;
321
- readonly publishedAt: import("effect/DateTime").Utc;
322
- readonly updatedAt: import("effect/DateTime").Utc;
323
344
  readonly retrievedAt: import("effect/DateTime").Utc;
324
345
  readonly url: string;
325
346
  readonly site: string;
326
- readonly authors: readonly {
327
- readonly name: string;
328
- }[];
329
347
  } & {
330
- readonly tags: readonly {
348
+ readonly title?: string | undefined;
349
+ readonly teaser?: string | undefined;
350
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
351
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
352
+ readonly authors?: readonly {
353
+ readonly name: string;
354
+ }[] | undefined;
355
+ readonly tags?: readonly {
331
356
  readonly type: "CATEGORY";
332
357
  readonly value: string;
333
- }[];
358
+ }[] | undefined;
359
+ readonly language?: string | undefined;
334
360
  };
335
361
  readonly status: "NEW" | "UPDATED";
336
362
  readonly source: "EXTERNAL";
@@ -341,22 +367,23 @@ declare const _default: {
341
367
  readonly payload: {
342
368
  readonly article: {
343
369
  readonly id: string;
344
- readonly title: string;
345
- readonly teaser: string;
346
370
  readonly content: string;
347
- readonly publishedAt: import("effect/DateTime").Utc;
348
- readonly updatedAt: import("effect/DateTime").Utc;
349
371
  readonly retrievedAt: import("effect/DateTime").Utc;
350
372
  readonly url: string;
351
373
  readonly site: string;
352
- readonly authors: readonly {
353
- readonly name: string;
354
- }[];
355
374
  } & {
356
- readonly tags: readonly {
375
+ readonly title?: string | undefined;
376
+ readonly teaser?: string | undefined;
377
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
378
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
379
+ readonly authors?: readonly {
380
+ readonly name: string;
381
+ }[] | undefined;
382
+ readonly tags?: readonly {
357
383
  readonly type: "CATEGORY";
358
384
  readonly value: string;
359
- }[];
385
+ }[] | undefined;
386
+ readonly language?: string | undefined;
360
387
  };
361
388
  readonly status: "NEW" | "UPDATED";
362
389
  readonly source: "EXTERNAL";
@@ -367,22 +394,23 @@ declare const _default: {
367
394
  readonly payload: {
368
395
  readonly article: {
369
396
  readonly id: string;
370
- readonly title: string;
371
- readonly teaser: string;
372
397
  readonly content: string;
373
- readonly publishedAt: import("effect/DateTime").Utc;
374
- readonly updatedAt: import("effect/DateTime").Utc;
375
398
  readonly retrievedAt: import("effect/DateTime").Utc;
376
399
  readonly url: string;
377
400
  readonly site: string;
378
- readonly authors: readonly {
379
- readonly name: string;
380
- }[];
381
401
  } & {
382
- readonly tags: readonly {
402
+ readonly title?: string | undefined;
403
+ readonly teaser?: string | undefined;
404
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
405
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
406
+ readonly authors?: readonly {
407
+ readonly name: string;
408
+ }[] | undefined;
409
+ readonly tags?: readonly {
383
410
  readonly type: "CATEGORY";
384
411
  readonly value: string;
385
- }[];
412
+ }[] | undefined;
413
+ readonly language?: string | undefined;
386
414
  };
387
415
  readonly status: "NEW" | "UPDATED";
388
416
  readonly source: "EXTERNAL";
@@ -393,23 +421,37 @@ declare const _default: {
393
421
  payload: Schema.Struct<{
394
422
  article: Schema.extend<Schema.Struct<{
395
423
  id: typeof Schema.NonEmptyString;
396
- title: typeof Schema.NonEmptyString;
397
- teaser: typeof Schema.NonEmptyString;
398
- content: typeof Schema.NonEmptyString;
399
- publishedAt: Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf, never>;
400
- updatedAt: Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf, never>;
401
- retrievedAt: Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf, never>;
402
424
  url: typeof Schema.NonEmptyString;
403
425
  site: typeof Schema.NonEmptyString;
404
- authors: Schema.Array$<Schema.Struct<{
405
- name: typeof Schema.NonEmptyString;
406
- }>>;
407
- }>, Schema.Struct<{
408
- tags: Schema.Array$<Schema.Struct<{
409
- type: Schema.Literal<["CATEGORY"]>;
410
- value: typeof Schema.NonEmptyString;
411
- }>>;
412
- }>>;
426
+ content: typeof Schema.NonEmptyString;
427
+ retrievedAt: Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf, never>;
428
+ }>, Schema.SchemaClass<{
429
+ readonly title?: string | undefined;
430
+ readonly teaser?: string | undefined;
431
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
432
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
433
+ readonly authors?: readonly {
434
+ readonly name: string;
435
+ }[] | undefined;
436
+ readonly tags?: readonly {
437
+ readonly type: "CATEGORY";
438
+ readonly value: string;
439
+ }[] | undefined;
440
+ readonly language?: string | undefined;
441
+ }, {
442
+ readonly title?: string | undefined;
443
+ readonly teaser?: string | undefined;
444
+ readonly publishedAt?: string | undefined;
445
+ readonly updatedAt?: string | undefined;
446
+ readonly authors?: readonly {
447
+ readonly name: string;
448
+ }[] | undefined;
449
+ readonly tags?: readonly {
450
+ readonly type: "CATEGORY";
451
+ readonly value: string;
452
+ }[] | undefined;
453
+ readonly language?: string | undefined;
454
+ }, never>>;
413
455
  status: Schema.Literal<["NEW", "UPDATED"]>;
414
456
  source: Schema.Literal<["EXTERNAL"]>;
415
457
  }>;
@@ -4,9 +4,23 @@ exports.ExternalArticleEventSchema = void 0;
4
4
  const schema_1 = require("@effect/schema");
5
5
  const Article_1 = require("../types/Article");
6
6
  const makeHelpers_1 = require("../utils/makeHelpers");
7
- const ExternalArticleSchema = schema_1.Schema.extend(Article_1.BaseArticleSchema, schema_1.Schema.Struct({
7
+ const ExternalArticleSchema = schema_1.Schema.extend(schema_1.Schema.Struct({
8
+ id: schema_1.Schema.NonEmptyString,
9
+ url: schema_1.Schema.NonEmptyString,
10
+ site: schema_1.Schema.NonEmptyString,
11
+ content: schema_1.Schema.NonEmptyString,
12
+ retrievedAt: Article_1.DateTimeSchema,
13
+ }), schema_1.Schema.partial(schema_1.Schema.Struct({
14
+ title: schema_1.Schema.NonEmptyString,
15
+ teaser: schema_1.Schema.NonEmptyString,
16
+ publishedAt: Article_1.DateTimeSchema,
17
+ updatedAt: Article_1.DateTimeSchema,
18
+ authors: schema_1.Schema.Array(schema_1.Schema.Struct({
19
+ name: schema_1.Schema.NonEmptyString,
20
+ })),
8
21
  tags: schema_1.Schema.Array(Article_1.CategoryTagSchema),
9
- }));
22
+ language: schema_1.Schema.NonEmptyString,
23
+ })));
10
24
  exports.ExternalArticleEventSchema = schema_1.Schema.Struct({
11
25
  kind: schema_1.Schema.Literal('EXTERNAL_ARTICLE_EVENT'),
12
26
  payload: schema_1.Schema.Struct({
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
- {
2
- "name": "@productminds/article-events",
3
- "version": "4.1.1",
4
- "description": "Article events",
5
- "license": "ISC",
6
- "main": "lib/article-events.js",
7
- "typings": "lib/article-events.d.ts",
8
- "directories": {
9
- "lib": "lib"
10
- },
11
- "files": [
12
- "lib"
13
- ],
14
- "scripts": {
15
- "cmd:generate_json_schema": "tsc && node ./lib/cmd/write-json-schema.js",
16
- "build": "tsc",
17
- "build:watch": "tsc --watch",
18
- "build_and_publish": "npm run build && npm publish"
19
- }
20
- }
1
+ {
2
+ "name": "@productminds/article-events",
3
+ "version": "5.2.0-beta.0",
4
+ "description": "Article events",
5
+ "license": "ISC",
6
+ "main": "lib/article-events.js",
7
+ "typings": "lib/article-events.d.ts",
8
+ "directories": {
9
+ "lib": "lib"
10
+ },
11
+ "files": [
12
+ "lib"
13
+ ],
14
+ "scripts": {
15
+ "cmd:generate_json_schema": "tsc && node ./lib/cmd/write-json-schema.js",
16
+ "build": "tsc",
17
+ "build:watch": "tsc --watch",
18
+ "build_and_publish": "npm run build && npm publish"
19
+ }
20
+ }
@@ -1,3 +0,0 @@
1
- import ExternalArticleEvent from './events/ExternalArticleEvent';
2
- import InternalArticleEvent from './events/InternalArticleEvent';
3
- export { ExternalArticleEvent, InternalArticleEvent };
@@ -1,10 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.InternalArticleEvent = exports.ExternalArticleEvent = void 0;
7
- const ExternalArticleEvent_1 = __importDefault(require("./events/ExternalArticleEvent"));
8
- exports.ExternalArticleEvent = ExternalArticleEvent_1.default;
9
- const InternalArticleEvent_1 = __importDefault(require("./events/InternalArticleEvent"));
10
- exports.InternalArticleEvent = InternalArticleEvent_1.default;