@productminds/article-events 4.1.1 → 5.1.1

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,35 @@ 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
+ }, {
24
+ readonly title?: string | undefined;
25
+ readonly teaser?: string | undefined;
26
+ readonly publishedAt?: string | undefined;
27
+ readonly updatedAt?: string | undefined;
28
+ readonly authors?: readonly {
29
+ readonly name: string;
30
+ }[] | undefined;
31
+ readonly tags?: readonly {
32
+ readonly type: "CATEGORY";
33
+ readonly value: string;
34
+ }[] | undefined;
35
+ }, never>>;
24
36
  status: Schema.Literal<["NEW", "UPDATED"]>;
25
37
  source: Schema.Literal<["EXTERNAL"]>;
26
38
  }>;
@@ -31,22 +43,22 @@ declare const _default: {
31
43
  readonly payload: {
32
44
  readonly article: {
33
45
  readonly id: string;
34
- readonly title: string;
35
- readonly teaser: string;
36
46
  readonly content: string;
37
- readonly publishedAt: import("effect/DateTime").Utc;
38
- readonly updatedAt: import("effect/DateTime").Utc;
39
47
  readonly retrievedAt: import("effect/DateTime").Utc;
40
48
  readonly url: string;
41
49
  readonly site: string;
42
- readonly authors: readonly {
43
- readonly name: string;
44
- }[];
45
50
  } & {
46
- readonly tags: readonly {
51
+ readonly title?: string | undefined;
52
+ readonly teaser?: string | undefined;
53
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
54
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
55
+ readonly authors?: readonly {
56
+ readonly name: string;
57
+ }[] | undefined;
58
+ readonly tags?: readonly {
47
59
  readonly type: "CATEGORY";
48
60
  readonly value: string;
49
- }[];
61
+ }[] | undefined;
50
62
  };
51
63
  readonly status: "NEW" | "UPDATED";
52
64
  readonly source: "EXTERNAL";
@@ -57,22 +69,22 @@ declare const _default: {
57
69
  readonly payload: {
58
70
  readonly article: {
59
71
  readonly id: string;
60
- readonly title: string;
61
- readonly teaser: string;
62
72
  readonly content: string;
63
- readonly publishedAt: import("effect/DateTime").Utc;
64
- readonly updatedAt: import("effect/DateTime").Utc;
65
73
  readonly retrievedAt: import("effect/DateTime").Utc;
66
74
  readonly url: string;
67
75
  readonly site: string;
68
- readonly authors: readonly {
69
- readonly name: string;
70
- }[];
71
76
  } & {
72
- readonly tags: readonly {
77
+ readonly title?: string | undefined;
78
+ readonly teaser?: string | undefined;
79
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
80
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
81
+ readonly authors?: readonly {
82
+ readonly name: string;
83
+ }[] | undefined;
84
+ readonly tags?: readonly {
73
85
  readonly type: "CATEGORY";
74
86
  readonly value: string;
75
- }[];
87
+ }[] | undefined;
76
88
  };
77
89
  readonly status: "NEW" | "UPDATED";
78
90
  readonly source: "EXTERNAL";
@@ -83,22 +95,22 @@ declare const _default: {
83
95
  readonly payload: {
84
96
  readonly article: {
85
97
  readonly id: string;
86
- readonly title: string;
87
- readonly teaser: string;
88
98
  readonly content: string;
89
- readonly publishedAt: import("effect/DateTime").Utc;
90
- readonly updatedAt: import("effect/DateTime").Utc;
91
99
  readonly retrievedAt: import("effect/DateTime").Utc;
92
100
  readonly url: string;
93
101
  readonly site: string;
94
- readonly authors: readonly {
95
- readonly name: string;
96
- }[];
97
102
  } & {
98
- readonly tags: readonly {
103
+ readonly title?: string | undefined;
104
+ readonly teaser?: string | undefined;
105
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
106
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
107
+ readonly authors?: readonly {
108
+ readonly name: string;
109
+ }[] | undefined;
110
+ readonly tags?: readonly {
99
111
  readonly type: "CATEGORY";
100
112
  readonly value: string;
101
- }[];
113
+ }[] | undefined;
102
114
  };
103
115
  readonly status: "NEW" | "UPDATED";
104
116
  readonly source: "EXTERNAL";
@@ -108,22 +120,22 @@ declare const _default: {
108
120
  readonly payload: {
109
121
  readonly article: {
110
122
  readonly id: string;
111
- readonly title: string;
112
- readonly teaser: string;
113
123
  readonly content: string;
114
- readonly publishedAt: string;
115
- readonly updatedAt: string;
116
124
  readonly retrievedAt: string;
117
125
  readonly url: string;
118
126
  readonly site: string;
119
- readonly authors: readonly {
120
- readonly name: string;
121
- }[];
122
127
  } & {
123
- readonly tags: readonly {
128
+ readonly title?: string | undefined;
129
+ readonly teaser?: string | undefined;
130
+ readonly publishedAt?: string | undefined;
131
+ readonly updatedAt?: string | undefined;
132
+ readonly authors?: readonly {
133
+ readonly name: string;
134
+ }[] | undefined;
135
+ readonly tags?: readonly {
124
136
  readonly type: "CATEGORY";
125
137
  readonly value: string;
126
- }[];
138
+ }[] | undefined;
127
139
  };
128
140
  readonly status: "NEW" | "UPDATED";
129
141
  readonly source: "EXTERNAL";
@@ -134,22 +146,22 @@ declare const _default: {
134
146
  readonly payload: {
135
147
  readonly article: {
136
148
  readonly id: string;
137
- readonly title: string;
138
- readonly teaser: string;
139
149
  readonly content: string;
140
- readonly publishedAt: import("effect/DateTime").Utc;
141
- readonly updatedAt: import("effect/DateTime").Utc;
142
150
  readonly retrievedAt: import("effect/DateTime").Utc;
143
151
  readonly url: string;
144
152
  readonly site: string;
145
- readonly authors: readonly {
146
- readonly name: string;
147
- }[];
148
153
  } & {
149
- readonly tags: readonly {
154
+ readonly title?: string | undefined;
155
+ readonly teaser?: string | undefined;
156
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
157
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
158
+ readonly authors?: readonly {
159
+ readonly name: string;
160
+ }[] | undefined;
161
+ readonly tags?: readonly {
150
162
  readonly type: "CATEGORY";
151
163
  readonly value: string;
152
- }[];
164
+ }[] | undefined;
153
165
  };
154
166
  readonly status: "NEW" | "UPDATED";
155
167
  readonly source: "EXTERNAL";
@@ -159,22 +171,22 @@ declare const _default: {
159
171
  readonly payload: {
160
172
  readonly article: {
161
173
  readonly id: string;
162
- readonly title: string;
163
- readonly teaser: string;
164
174
  readonly content: string;
165
- readonly publishedAt: string;
166
- readonly updatedAt: string;
167
175
  readonly retrievedAt: string;
168
176
  readonly url: string;
169
177
  readonly site: string;
170
- readonly authors: readonly {
171
- readonly name: string;
172
- }[];
173
178
  } & {
174
- readonly tags: readonly {
179
+ readonly title?: string | undefined;
180
+ readonly teaser?: string | undefined;
181
+ readonly publishedAt?: string | undefined;
182
+ readonly updatedAt?: string | undefined;
183
+ readonly authors?: readonly {
184
+ readonly name: string;
185
+ }[] | undefined;
186
+ readonly tags?: readonly {
175
187
  readonly type: "CATEGORY";
176
188
  readonly value: string;
177
- }[];
189
+ }[] | undefined;
178
190
  };
179
191
  readonly status: "NEW" | "UPDATED";
180
192
  readonly source: "EXTERNAL";
@@ -185,22 +197,22 @@ declare const _default: {
185
197
  readonly payload: {
186
198
  readonly article: {
187
199
  readonly id: string;
188
- readonly title: string;
189
- readonly teaser: string;
190
200
  readonly content: string;
191
- readonly publishedAt: import("effect/DateTime").Utc;
192
- readonly updatedAt: import("effect/DateTime").Utc;
193
201
  readonly retrievedAt: import("effect/DateTime").Utc;
194
202
  readonly url: string;
195
203
  readonly site: string;
196
- readonly authors: readonly {
197
- readonly name: string;
198
- }[];
199
204
  } & {
200
- readonly tags: readonly {
205
+ readonly title?: string | undefined;
206
+ readonly teaser?: string | undefined;
207
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
208
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
209
+ readonly authors?: readonly {
210
+ readonly name: string;
211
+ }[] | undefined;
212
+ readonly tags?: readonly {
201
213
  readonly type: "CATEGORY";
202
214
  readonly value: string;
203
- }[];
215
+ }[] | undefined;
204
216
  };
205
217
  readonly status: "NEW" | "UPDATED";
206
218
  readonly source: "EXTERNAL";
@@ -211,22 +223,22 @@ declare const _default: {
211
223
  readonly payload: {
212
224
  readonly article: {
213
225
  readonly id: string;
214
- readonly title: string;
215
- readonly teaser: string;
216
226
  readonly content: string;
217
- readonly publishedAt: import("effect/DateTime").Utc;
218
- readonly updatedAt: import("effect/DateTime").Utc;
219
227
  readonly retrievedAt: import("effect/DateTime").Utc;
220
228
  readonly url: string;
221
229
  readonly site: string;
222
- readonly authors: readonly {
223
- readonly name: string;
224
- }[];
225
230
  } & {
226
- readonly tags: readonly {
231
+ readonly title?: string | undefined;
232
+ readonly teaser?: string | undefined;
233
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
234
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
235
+ readonly authors?: readonly {
236
+ readonly name: string;
237
+ }[] | undefined;
238
+ readonly tags?: readonly {
227
239
  readonly type: "CATEGORY";
228
240
  readonly value: string;
229
- }[];
241
+ }[] | undefined;
230
242
  };
231
243
  readonly status: "NEW" | "UPDATED";
232
244
  readonly source: "EXTERNAL";
@@ -237,22 +249,22 @@ declare const _default: {
237
249
  readonly payload: {
238
250
  readonly article: {
239
251
  readonly id: string;
240
- readonly title: string;
241
- readonly teaser: string;
242
252
  readonly content: string;
243
- readonly publishedAt: import("effect/DateTime").Utc;
244
- readonly updatedAt: import("effect/DateTime").Utc;
245
253
  readonly retrievedAt: import("effect/DateTime").Utc;
246
254
  readonly url: string;
247
255
  readonly site: string;
248
- readonly authors: readonly {
249
- readonly name: string;
250
- }[];
251
256
  } & {
252
- readonly tags: readonly {
257
+ readonly title?: string | undefined;
258
+ readonly teaser?: string | undefined;
259
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
260
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
261
+ readonly authors?: readonly {
262
+ readonly name: string;
263
+ }[] | undefined;
264
+ readonly tags?: readonly {
253
265
  readonly type: "CATEGORY";
254
266
  readonly value: string;
255
- }[];
267
+ }[] | undefined;
256
268
  };
257
269
  readonly status: "NEW" | "UPDATED";
258
270
  readonly source: "EXTERNAL";
@@ -263,22 +275,22 @@ declare const _default: {
263
275
  readonly payload: {
264
276
  readonly article: {
265
277
  readonly id: string;
266
- readonly title: string;
267
- readonly teaser: string;
268
278
  readonly content: string;
269
- readonly publishedAt: import("effect/DateTime").Utc;
270
- readonly updatedAt: import("effect/DateTime").Utc;
271
279
  readonly retrievedAt: import("effect/DateTime").Utc;
272
280
  readonly url: string;
273
281
  readonly site: string;
274
- readonly authors: readonly {
275
- readonly name: string;
276
- }[];
277
282
  } & {
278
- readonly tags: readonly {
283
+ readonly title?: string | undefined;
284
+ readonly teaser?: string | undefined;
285
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
286
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
287
+ readonly authors?: readonly {
288
+ readonly name: string;
289
+ }[] | undefined;
290
+ readonly tags?: readonly {
279
291
  readonly type: "CATEGORY";
280
292
  readonly value: string;
281
- }[];
293
+ }[] | undefined;
282
294
  };
283
295
  readonly status: "NEW" | "UPDATED";
284
296
  readonly source: "EXTERNAL";
@@ -289,22 +301,22 @@ declare const _default: {
289
301
  readonly payload: {
290
302
  readonly article: {
291
303
  readonly id: string;
292
- readonly title: string;
293
- readonly teaser: string;
294
304
  readonly content: string;
295
- readonly publishedAt: import("effect/DateTime").Utc;
296
- readonly updatedAt: import("effect/DateTime").Utc;
297
305
  readonly retrievedAt: import("effect/DateTime").Utc;
298
306
  readonly url: string;
299
307
  readonly site: string;
300
- readonly authors: readonly {
301
- readonly name: string;
302
- }[];
303
308
  } & {
304
- readonly tags: readonly {
309
+ readonly title?: string | undefined;
310
+ readonly teaser?: string | undefined;
311
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
312
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
313
+ readonly authors?: readonly {
314
+ readonly name: string;
315
+ }[] | undefined;
316
+ readonly tags?: readonly {
305
317
  readonly type: "CATEGORY";
306
318
  readonly value: string;
307
- }[];
319
+ }[] | undefined;
308
320
  };
309
321
  readonly status: "NEW" | "UPDATED";
310
322
  readonly source: "EXTERNAL";
@@ -315,22 +327,22 @@ declare const _default: {
315
327
  readonly payload: {
316
328
  readonly article: {
317
329
  readonly id: string;
318
- readonly title: string;
319
- readonly teaser: string;
320
330
  readonly content: string;
321
- readonly publishedAt: import("effect/DateTime").Utc;
322
- readonly updatedAt: import("effect/DateTime").Utc;
323
331
  readonly retrievedAt: import("effect/DateTime").Utc;
324
332
  readonly url: string;
325
333
  readonly site: string;
326
- readonly authors: readonly {
327
- readonly name: string;
328
- }[];
329
334
  } & {
330
- readonly tags: readonly {
335
+ readonly title?: string | undefined;
336
+ readonly teaser?: string | undefined;
337
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
338
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
339
+ readonly authors?: readonly {
340
+ readonly name: string;
341
+ }[] | undefined;
342
+ readonly tags?: readonly {
331
343
  readonly type: "CATEGORY";
332
344
  readonly value: string;
333
- }[];
345
+ }[] | undefined;
334
346
  };
335
347
  readonly status: "NEW" | "UPDATED";
336
348
  readonly source: "EXTERNAL";
@@ -341,22 +353,22 @@ declare const _default: {
341
353
  readonly payload: {
342
354
  readonly article: {
343
355
  readonly id: string;
344
- readonly title: string;
345
- readonly teaser: string;
346
356
  readonly content: string;
347
- readonly publishedAt: import("effect/DateTime").Utc;
348
- readonly updatedAt: import("effect/DateTime").Utc;
349
357
  readonly retrievedAt: import("effect/DateTime").Utc;
350
358
  readonly url: string;
351
359
  readonly site: string;
352
- readonly authors: readonly {
353
- readonly name: string;
354
- }[];
355
360
  } & {
356
- readonly tags: readonly {
361
+ readonly title?: string | undefined;
362
+ readonly teaser?: string | undefined;
363
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
364
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
365
+ readonly authors?: readonly {
366
+ readonly name: string;
367
+ }[] | undefined;
368
+ readonly tags?: readonly {
357
369
  readonly type: "CATEGORY";
358
370
  readonly value: string;
359
- }[];
371
+ }[] | undefined;
360
372
  };
361
373
  readonly status: "NEW" | "UPDATED";
362
374
  readonly source: "EXTERNAL";
@@ -367,22 +379,22 @@ declare const _default: {
367
379
  readonly payload: {
368
380
  readonly article: {
369
381
  readonly id: string;
370
- readonly title: string;
371
- readonly teaser: string;
372
382
  readonly content: string;
373
- readonly publishedAt: import("effect/DateTime").Utc;
374
- readonly updatedAt: import("effect/DateTime").Utc;
375
383
  readonly retrievedAt: import("effect/DateTime").Utc;
376
384
  readonly url: string;
377
385
  readonly site: string;
378
- readonly authors: readonly {
379
- readonly name: string;
380
- }[];
381
386
  } & {
382
- readonly tags: readonly {
387
+ readonly title?: string | undefined;
388
+ readonly teaser?: string | undefined;
389
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
390
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
391
+ readonly authors?: readonly {
392
+ readonly name: string;
393
+ }[] | undefined;
394
+ readonly tags?: readonly {
383
395
  readonly type: "CATEGORY";
384
396
  readonly value: string;
385
- }[];
397
+ }[] | undefined;
386
398
  };
387
399
  readonly status: "NEW" | "UPDATED";
388
400
  readonly source: "EXTERNAL";
@@ -393,23 +405,35 @@ declare const _default: {
393
405
  payload: Schema.Struct<{
394
406
  article: Schema.extend<Schema.Struct<{
395
407
  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
408
  url: typeof Schema.NonEmptyString;
403
409
  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
- }>>;
410
+ content: typeof Schema.NonEmptyString;
411
+ retrievedAt: Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf, never>;
412
+ }>, Schema.SchemaClass<{
413
+ readonly title?: string | undefined;
414
+ readonly teaser?: string | undefined;
415
+ readonly publishedAt?: import("effect/DateTime").Utc | undefined;
416
+ readonly updatedAt?: import("effect/DateTime").Utc | undefined;
417
+ readonly authors?: readonly {
418
+ readonly name: string;
419
+ }[] | undefined;
420
+ readonly tags?: readonly {
421
+ readonly type: "CATEGORY";
422
+ readonly value: string;
423
+ }[] | undefined;
424
+ }, {
425
+ readonly title?: string | undefined;
426
+ readonly teaser?: string | undefined;
427
+ readonly publishedAt?: string | undefined;
428
+ readonly updatedAt?: string | undefined;
429
+ readonly authors?: readonly {
430
+ readonly name: string;
431
+ }[] | undefined;
432
+ readonly tags?: readonly {
433
+ readonly type: "CATEGORY";
434
+ readonly value: string;
435
+ }[] | undefined;
436
+ }, never>>;
413
437
  status: Schema.Literal<["NEW", "UPDATED"]>;
414
438
  source: Schema.Literal<["EXTERNAL"]>;
415
439
  }>;
@@ -4,9 +4,22 @@ 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, // legacy name, it is actually feed name
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
+ })));
10
23
  exports.ExternalArticleEventSchema = schema_1.Schema.Struct({
11
24
  kind: schema_1.Schema.Literal('EXTERNAL_ARTICLE_EVENT'),
12
25
  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.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,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;
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const schema_1 = require("@effect/schema");
4
- const InternalArticleEvent_1 = require("../events/InternalArticleEvent");
5
- const ExternalArticleEvent_1 = require("../events/ExternalArticleEvent");
6
- const fs_1 = require("fs");
7
- const dir = './jsonSchemas';
8
- if (!(0, fs_1.existsSync)(dir)) {
9
- (0, fs_1.mkdirSync)(dir);
10
- }
11
- const jsonSchemaInternal = schema_1.JSONSchema.make(InternalArticleEvent_1.InternalArticleEventSchema);
12
- (0, fs_1.writeFileSync)(`${dir}/internalArticleEventSchema.json`, JSON.stringify(jsonSchemaInternal, null, 2));
13
- const jsonSchemaExternal = schema_1.JSONSchema.make(ExternalArticleEvent_1.ExternalArticleEventSchema);
14
- (0, fs_1.writeFileSync)(`${dir}/externalArticleEventSchema.json`, JSON.stringify(jsonSchemaExternal, null, 2));