@productminds/article-events 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,10 @@ export declare const InternalArticleEventSchema: Schema.Struct<{
|
|
22
22
|
}>, Schema.Struct<{
|
23
23
|
type: Schema.Literal<["EXTERNAL_ARTICLE_REFERENCE"]>;
|
24
24
|
id: typeof Schema.UUID;
|
25
|
+
}>, Schema.Struct<{
|
26
|
+
type: Schema.Literal<["DRUPAL_EXTERNAL_ID"]>;
|
27
|
+
extID: typeof Schema.UUID;
|
28
|
+
extSource: typeof Schema.String;
|
25
29
|
}>]>>;
|
26
30
|
}>>;
|
27
31
|
status: Schema.Literal<["NEW", "UPDATED"]>;
|
@@ -47,6 +51,10 @@ declare const _default: {
|
|
47
51
|
}[];
|
48
52
|
} & {
|
49
53
|
readonly tags: readonly ({
|
54
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
55
|
+
readonly extID: string;
|
56
|
+
readonly extSource: string;
|
57
|
+
} | {
|
50
58
|
readonly type: "CATEGORY";
|
51
59
|
readonly value: string;
|
52
60
|
} | {
|
@@ -76,6 +84,10 @@ declare const _default: {
|
|
76
84
|
}[];
|
77
85
|
} & {
|
78
86
|
readonly tags: readonly ({
|
87
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
88
|
+
readonly extID: string;
|
89
|
+
readonly extSource: string;
|
90
|
+
} | {
|
79
91
|
readonly type: "CATEGORY";
|
80
92
|
readonly value: string;
|
81
93
|
} | {
|
@@ -105,6 +117,10 @@ declare const _default: {
|
|
105
117
|
}[];
|
106
118
|
} & {
|
107
119
|
readonly tags: readonly ({
|
120
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
121
|
+
readonly extID: string;
|
122
|
+
readonly extSource: string;
|
123
|
+
} | {
|
108
124
|
readonly type: "CATEGORY";
|
109
125
|
readonly value: string;
|
110
126
|
} | {
|
@@ -133,6 +149,10 @@ declare const _default: {
|
|
133
149
|
}[];
|
134
150
|
} & {
|
135
151
|
readonly tags: readonly ({
|
152
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
153
|
+
readonly extID: string;
|
154
|
+
readonly extSource: string;
|
155
|
+
} | {
|
136
156
|
readonly type: "CATEGORY";
|
137
157
|
readonly value: string;
|
138
158
|
} | {
|
@@ -162,6 +182,10 @@ declare const _default: {
|
|
162
182
|
}[];
|
163
183
|
} & {
|
164
184
|
readonly tags: readonly ({
|
185
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
186
|
+
readonly extID: string;
|
187
|
+
readonly extSource: string;
|
188
|
+
} | {
|
165
189
|
readonly type: "CATEGORY";
|
166
190
|
readonly value: string;
|
167
191
|
} | {
|
@@ -190,6 +214,10 @@ declare const _default: {
|
|
190
214
|
}[];
|
191
215
|
} & {
|
192
216
|
readonly tags: readonly ({
|
217
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
218
|
+
readonly extID: string;
|
219
|
+
readonly extSource: string;
|
220
|
+
} | {
|
193
221
|
readonly type: "CATEGORY";
|
194
222
|
readonly value: string;
|
195
223
|
} | {
|
@@ -219,6 +247,10 @@ declare const _default: {
|
|
219
247
|
}[];
|
220
248
|
} & {
|
221
249
|
readonly tags: readonly ({
|
250
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
251
|
+
readonly extID: string;
|
252
|
+
readonly extSource: string;
|
253
|
+
} | {
|
222
254
|
readonly type: "CATEGORY";
|
223
255
|
readonly value: string;
|
224
256
|
} | {
|
@@ -248,6 +280,10 @@ declare const _default: {
|
|
248
280
|
}[];
|
249
281
|
} & {
|
250
282
|
readonly tags: readonly ({
|
283
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
284
|
+
readonly extID: string;
|
285
|
+
readonly extSource: string;
|
286
|
+
} | {
|
251
287
|
readonly type: "CATEGORY";
|
252
288
|
readonly value: string;
|
253
289
|
} | {
|
@@ -277,6 +313,10 @@ declare const _default: {
|
|
277
313
|
}[];
|
278
314
|
} & {
|
279
315
|
readonly tags: readonly ({
|
316
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
317
|
+
readonly extID: string;
|
318
|
+
readonly extSource: string;
|
319
|
+
} | {
|
280
320
|
readonly type: "CATEGORY";
|
281
321
|
readonly value: string;
|
282
322
|
} | {
|
@@ -306,6 +346,10 @@ declare const _default: {
|
|
306
346
|
}[];
|
307
347
|
} & {
|
308
348
|
readonly tags: readonly ({
|
349
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
350
|
+
readonly extID: string;
|
351
|
+
readonly extSource: string;
|
352
|
+
} | {
|
309
353
|
readonly type: "CATEGORY";
|
310
354
|
readonly value: string;
|
311
355
|
} | {
|
@@ -335,6 +379,10 @@ declare const _default: {
|
|
335
379
|
}[];
|
336
380
|
} & {
|
337
381
|
readonly tags: readonly ({
|
382
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
383
|
+
readonly extID: string;
|
384
|
+
readonly extSource: string;
|
385
|
+
} | {
|
338
386
|
readonly type: "CATEGORY";
|
339
387
|
readonly value: string;
|
340
388
|
} | {
|
@@ -364,6 +412,10 @@ declare const _default: {
|
|
364
412
|
}[];
|
365
413
|
} & {
|
366
414
|
readonly tags: readonly ({
|
415
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
416
|
+
readonly extID: string;
|
417
|
+
readonly extSource: string;
|
418
|
+
} | {
|
367
419
|
readonly type: "CATEGORY";
|
368
420
|
readonly value: string;
|
369
421
|
} | {
|
@@ -393,6 +445,10 @@ declare const _default: {
|
|
393
445
|
}[];
|
394
446
|
} & {
|
395
447
|
readonly tags: readonly ({
|
448
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
449
|
+
readonly extID: string;
|
450
|
+
readonly extSource: string;
|
451
|
+
} | {
|
396
452
|
readonly type: "CATEGORY";
|
397
453
|
readonly value: string;
|
398
454
|
} | {
|
@@ -422,6 +478,10 @@ declare const _default: {
|
|
422
478
|
}[];
|
423
479
|
} & {
|
424
480
|
readonly tags: readonly ({
|
481
|
+
readonly type: "DRUPAL_EXTERNAL_ID";
|
482
|
+
readonly extID: string;
|
483
|
+
readonly extSource: string;
|
484
|
+
} | {
|
425
485
|
readonly type: "CATEGORY";
|
426
486
|
readonly value: string;
|
427
487
|
} | {
|
@@ -456,6 +516,10 @@ declare const _default: {
|
|
456
516
|
}>, Schema.Struct<{
|
457
517
|
type: Schema.Literal<["EXTERNAL_ARTICLE_REFERENCE"]>;
|
458
518
|
id: typeof Schema.UUID;
|
519
|
+
}>, Schema.Struct<{
|
520
|
+
type: Schema.Literal<["DRUPAL_EXTERNAL_ID"]>;
|
521
|
+
extID: typeof Schema.UUID;
|
522
|
+
extSource: typeof Schema.String;
|
459
523
|
}>]>>;
|
460
524
|
}>>;
|
461
525
|
status: Schema.Literal<["NEW", "UPDATED"]>;
|
@@ -5,7 +5,7 @@ const schema_1 = require("@effect/schema");
|
|
5
5
|
const Article_1 = require("../types/Article");
|
6
6
|
const makeHelpers_1 = require("../utils/makeHelpers");
|
7
7
|
const InternalArticleSchema = schema_1.Schema.extend(Article_1.BaseArticleSchema, schema_1.Schema.Struct({
|
8
|
-
tags: schema_1.Schema.Array(schema_1.Schema.Union(Article_1.CategoryTagSchema, Article_1.ExternalArticleReferenceTagSchema)),
|
8
|
+
tags: schema_1.Schema.Array(schema_1.Schema.Union(Article_1.CategoryTagSchema, Article_1.ExternalArticleReferenceTagSchema, Article_1.DrupalExternalIDTag)),
|
9
9
|
}));
|
10
10
|
exports.InternalArticleEventSchema = schema_1.Schema.Struct({
|
11
11
|
kind: schema_1.Schema.Literal('INTERNAL_ARTICLE_EVENT'),
|
package/lib/types/Article.d.ts
CHANGED
@@ -8,6 +8,11 @@ export declare const ExternalArticleReferenceTagSchema: Schema.Struct<{
|
|
8
8
|
type: Schema.Literal<["EXTERNAL_ARTICLE_REFERENCE"]>;
|
9
9
|
id: typeof Schema.UUID;
|
10
10
|
}>;
|
11
|
+
export declare const DrupalExternalIDTag: Schema.Struct<{
|
12
|
+
type: Schema.Literal<["DRUPAL_EXTERNAL_ID"]>;
|
13
|
+
extID: typeof Schema.UUID;
|
14
|
+
extSource: typeof Schema.String;
|
15
|
+
}>;
|
11
16
|
export declare const AuthorSchema: Schema.Struct<{
|
12
17
|
name: typeof Schema.NonEmpty;
|
13
18
|
}>;
|
package/lib/types/Article.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.BaseArticleSchema = exports.AuthorSchema = exports.ExternalArticleReferenceTagSchema = exports.CategoryTagSchema = exports.DateTimeSchema = void 0;
|
3
|
+
exports.BaseArticleSchema = exports.AuthorSchema = exports.DrupalExternalIDTag = exports.ExternalArticleReferenceTagSchema = exports.CategoryTagSchema = exports.DateTimeSchema = void 0;
|
4
4
|
const schema_1 = require("@effect/schema");
|
5
5
|
exports.DateTimeSchema = schema_1.Schema.Date.annotations({
|
6
|
-
jsonSchema: { format: 'date-time' },
|
6
|
+
jsonSchema: { type: 'string', format: 'date-time' },
|
7
7
|
});
|
8
8
|
exports.CategoryTagSchema = schema_1.Schema.Struct({
|
9
9
|
type: schema_1.Schema.Literal('CATEGORY'),
|
@@ -13,6 +13,13 @@ exports.ExternalArticleReferenceTagSchema = schema_1.Schema.Struct({
|
|
13
13
|
type: schema_1.Schema.Literal('EXTERNAL_ARTICLE_REFERENCE'),
|
14
14
|
id: schema_1.Schema.UUID,
|
15
15
|
});
|
16
|
+
exports.DrupalExternalIDTag = schema_1.Schema.Struct({
|
17
|
+
type: schema_1.Schema.Literal('DRUPAL_EXTERNAL_ID'),
|
18
|
+
extID: schema_1.Schema.UUID,
|
19
|
+
extSource: schema_1.Schema.String,
|
20
|
+
}).annotations({
|
21
|
+
description: 'A special case tag for tracking where a Drupal article was created from',
|
22
|
+
});
|
16
23
|
exports.AuthorSchema = schema_1.Schema.Struct({
|
17
24
|
name: schema_1.Schema.NonEmpty,
|
18
25
|
});
|