@takuhon/core 0.25.0 → 1.1.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/index.d.ts +143 -53
- package/dist/index.js +3448 -2619
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/takuhon.schema.json +62 -39
package/package.json
CHANGED
package/takuhon.schema.json
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://takuhon.example/schemas/
|
|
3
|
+
"$id": "https://takuhon.example/schemas/1.1.0/takuhon.schema.json",
|
|
4
4
|
"title": "Takuhon Profile",
|
|
5
5
|
"description": "Portable profile data format consumed by @takuhon/core. The canonical contract for profile content authored as takuhon.json.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
|
-
"required": [
|
|
9
|
-
"schemaVersion",
|
|
10
|
-
"profile",
|
|
11
|
-
"links",
|
|
12
|
-
"careers",
|
|
13
|
-
"projects",
|
|
14
|
-
"skills",
|
|
15
|
-
"contact",
|
|
16
|
-
"settings",
|
|
17
|
-
"meta"
|
|
18
|
-
],
|
|
8
|
+
"required": ["schemaVersion", "profile", "contact", "settings", "meta"],
|
|
19
9
|
"properties": {
|
|
20
10
|
"schemaVersion": {
|
|
21
11
|
"type": "string",
|
|
@@ -157,9 +147,10 @@
|
|
|
157
147
|
"additionalProperties": {
|
|
158
148
|
"type": "string",
|
|
159
149
|
"minLength": 1,
|
|
160
|
-
"maxLength": 200
|
|
150
|
+
"maxLength": 200,
|
|
151
|
+
"pattern": "\\S"
|
|
161
152
|
},
|
|
162
|
-
"description": "Map of BCP-47 locale tag to short title-like string (max 200 chars per value)."
|
|
153
|
+
"description": "Map of BCP-47 locale tag to short title-like string (max 200 chars per value). Each value must contain at least one non-whitespace character."
|
|
163
154
|
},
|
|
164
155
|
"LocalizedBody": {
|
|
165
156
|
"type": "object",
|
|
@@ -171,9 +162,10 @@
|
|
|
171
162
|
"additionalProperties": {
|
|
172
163
|
"type": "string",
|
|
173
164
|
"minLength": 1,
|
|
174
|
-
"maxLength": 5000
|
|
165
|
+
"maxLength": 5000,
|
|
166
|
+
"pattern": "\\S"
|
|
175
167
|
},
|
|
176
|
-
"description": "Map of BCP-47 locale tag to body-length string (max 5000 chars per value)."
|
|
168
|
+
"description": "Map of BCP-47 locale tag to body-length string (max 5000 chars per value). Each value must contain at least one non-whitespace character."
|
|
177
169
|
},
|
|
178
170
|
"LinkType": {
|
|
179
171
|
"type": "string",
|
|
@@ -198,7 +190,7 @@
|
|
|
198
190
|
},
|
|
199
191
|
"Profile": {
|
|
200
192
|
"type": "object",
|
|
201
|
-
"additionalProperties":
|
|
193
|
+
"additionalProperties": false,
|
|
202
194
|
"required": ["displayName"],
|
|
203
195
|
"properties": {
|
|
204
196
|
"displayName": { "$ref": "#/$defs/LocalizedTitle" },
|
|
@@ -210,7 +202,7 @@
|
|
|
210
202
|
},
|
|
211
203
|
"Avatar": {
|
|
212
204
|
"type": "object",
|
|
213
|
-
"additionalProperties":
|
|
205
|
+
"additionalProperties": false,
|
|
214
206
|
"required": ["url"],
|
|
215
207
|
"properties": {
|
|
216
208
|
"url": {
|
|
@@ -224,7 +216,7 @@
|
|
|
224
216
|
},
|
|
225
217
|
"Address": {
|
|
226
218
|
"type": "object",
|
|
227
|
-
"additionalProperties":
|
|
219
|
+
"additionalProperties": false,
|
|
228
220
|
"properties": {
|
|
229
221
|
"country": { "$ref": "#/$defs/Iso3166Alpha2" },
|
|
230
222
|
"region": { "type": "string", "maxLength": 100 },
|
|
@@ -261,7 +253,7 @@
|
|
|
261
253
|
},
|
|
262
254
|
"Career": {
|
|
263
255
|
"type": "object",
|
|
264
|
-
"additionalProperties":
|
|
256
|
+
"additionalProperties": false,
|
|
265
257
|
"required": ["id", "organization", "role", "startDate"],
|
|
266
258
|
"properties": {
|
|
267
259
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -281,7 +273,7 @@
|
|
|
281
273
|
},
|
|
282
274
|
"Project": {
|
|
283
275
|
"type": "object",
|
|
284
|
-
"additionalProperties":
|
|
276
|
+
"additionalProperties": false,
|
|
285
277
|
"required": ["id", "title"],
|
|
286
278
|
"properties": {
|
|
287
279
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -305,7 +297,7 @@
|
|
|
305
297
|
},
|
|
306
298
|
"Skill": {
|
|
307
299
|
"type": "object",
|
|
308
|
-
"additionalProperties":
|
|
300
|
+
"additionalProperties": false,
|
|
309
301
|
"required": ["id", "label"],
|
|
310
302
|
"properties": {
|
|
311
303
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -322,7 +314,7 @@
|
|
|
322
314
|
},
|
|
323
315
|
"Contact": {
|
|
324
316
|
"type": "object",
|
|
325
|
-
"additionalProperties":
|
|
317
|
+
"additionalProperties": false,
|
|
326
318
|
"properties": {
|
|
327
319
|
"email": { "$ref": "#/$defs/Email" },
|
|
328
320
|
"showEmail": { "type": "boolean", "default": false },
|
|
@@ -331,7 +323,7 @@
|
|
|
331
323
|
},
|
|
332
324
|
"Settings": {
|
|
333
325
|
"type": "object",
|
|
334
|
-
"additionalProperties":
|
|
326
|
+
"additionalProperties": false,
|
|
335
327
|
"required": ["defaultLocale", "availableLocales"],
|
|
336
328
|
"properties": {
|
|
337
329
|
"defaultLocale": { "$ref": "#/$defs/LocaleTag" },
|
|
@@ -370,7 +362,38 @@
|
|
|
370
362
|
"description": "Opt-in flag for first-party analytics. Default is false to keep takuhon privacy-respecting by default."
|
|
371
363
|
},
|
|
372
364
|
"activity": { "$ref": "#/$defs/ActivitySettings" },
|
|
373
|
-
"publicVisibility": { "$ref": "#/$defs/PublicVisibility" }
|
|
365
|
+
"publicVisibility": { "$ref": "#/$defs/PublicVisibility" },
|
|
366
|
+
"contact": { "$ref": "#/$defs/ContactSettings" }
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"ContactSettings": {
|
|
370
|
+
"type": "object",
|
|
371
|
+
"additionalProperties": false,
|
|
372
|
+
"description": "Opt-in contact form configuration (added in 1.1.0). Only public values live here; the Turnstile site key is safe to embed in the page. The Turnstile secret, the recipient address, and the From label are provisioned out of band as environment configuration and are never stored in takuhon.json. Adapters that support the form mount the widget and a POST endpoint when 'enabled' is true.",
|
|
373
|
+
"properties": {
|
|
374
|
+
"enabled": {
|
|
375
|
+
"type": "boolean",
|
|
376
|
+
"default": false,
|
|
377
|
+
"description": "Master switch. When false (the default), no contact form is mounted even if a site key is present."
|
|
378
|
+
},
|
|
379
|
+
"turnstileSiteKey": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"minLength": 1,
|
|
382
|
+
"maxLength": 128,
|
|
383
|
+
"description": "Public Cloudflare Turnstile site key, safe to embed in the page. Without it the widget is not mounted."
|
|
384
|
+
},
|
|
385
|
+
"endpoint": {
|
|
386
|
+
"type": "string",
|
|
387
|
+
"minLength": 1,
|
|
388
|
+
"maxLength": 2048,
|
|
389
|
+
"description": "Override the POST endpoint the widget submits to. Defaults to /api/contact on the same origin."
|
|
390
|
+
},
|
|
391
|
+
"subjectPrefix": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"minLength": 1,
|
|
394
|
+
"maxLength": 128,
|
|
395
|
+
"description": "Subject prefix for the delivered email, e.g. '[example.com contact]'."
|
|
396
|
+
}
|
|
374
397
|
}
|
|
375
398
|
},
|
|
376
399
|
"PublicVisibility": {
|
|
@@ -498,7 +521,7 @@
|
|
|
498
521
|
},
|
|
499
522
|
"Meta": {
|
|
500
523
|
"type": "object",
|
|
501
|
-
"additionalProperties":
|
|
524
|
+
"additionalProperties": false,
|
|
502
525
|
"required": ["contentLicense"],
|
|
503
526
|
"properties": {
|
|
504
527
|
"createdAt": { "$ref": "#/$defs/IsoDateTime" },
|
|
@@ -543,7 +566,7 @@
|
|
|
543
566
|
},
|
|
544
567
|
"MetaPrivacy": {
|
|
545
568
|
"type": "object",
|
|
546
|
-
"additionalProperties":
|
|
569
|
+
"additionalProperties": false,
|
|
547
570
|
"description": "Opt-out flags that strip personally identifying fields from public API output (GET /api/profile, /api/jsonld, /takuhon.json). Admin endpoints (PUT /api/admin/*, GET /api/admin/export) ignore these flags. Privacy-by-default: omitting the object or individual flags is equivalent to true.",
|
|
548
571
|
"properties": {
|
|
549
572
|
"hideCredentialIds": {
|
|
@@ -560,7 +583,7 @@
|
|
|
560
583
|
},
|
|
561
584
|
"Certification": {
|
|
562
585
|
"type": "object",
|
|
563
|
-
"additionalProperties":
|
|
586
|
+
"additionalProperties": false,
|
|
564
587
|
"required": ["id", "title", "issuingOrganization", "issueDate"],
|
|
565
588
|
"properties": {
|
|
566
589
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -584,7 +607,7 @@
|
|
|
584
607
|
},
|
|
585
608
|
"Membership": {
|
|
586
609
|
"type": "object",
|
|
587
|
-
"additionalProperties":
|
|
610
|
+
"additionalProperties": false,
|
|
588
611
|
"required": ["id", "organization", "startDate"],
|
|
589
612
|
"properties": {
|
|
590
613
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -604,7 +627,7 @@
|
|
|
604
627
|
},
|
|
605
628
|
"Volunteering": {
|
|
606
629
|
"type": "object",
|
|
607
|
-
"additionalProperties":
|
|
630
|
+
"additionalProperties": false,
|
|
608
631
|
"required": ["id", "organization", "role", "startDate"],
|
|
609
632
|
"properties": {
|
|
610
633
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -624,7 +647,7 @@
|
|
|
624
647
|
},
|
|
625
648
|
"Honor": {
|
|
626
649
|
"type": "object",
|
|
627
|
-
"additionalProperties":
|
|
650
|
+
"additionalProperties": false,
|
|
628
651
|
"required": ["id", "title", "issuer", "date"],
|
|
629
652
|
"properties": {
|
|
630
653
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -639,7 +662,7 @@
|
|
|
639
662
|
},
|
|
640
663
|
"Education": {
|
|
641
664
|
"type": "object",
|
|
642
|
-
"additionalProperties":
|
|
665
|
+
"additionalProperties": false,
|
|
643
666
|
"required": ["id", "institution", "startDate"],
|
|
644
667
|
"properties": {
|
|
645
668
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -666,7 +689,7 @@
|
|
|
666
689
|
},
|
|
667
690
|
"Publication": {
|
|
668
691
|
"type": "object",
|
|
669
|
-
"additionalProperties":
|
|
692
|
+
"additionalProperties": false,
|
|
670
693
|
"required": ["id", "title", "date"],
|
|
671
694
|
"properties": {
|
|
672
695
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -693,7 +716,7 @@
|
|
|
693
716
|
},
|
|
694
717
|
"Language": {
|
|
695
718
|
"type": "object",
|
|
696
|
-
"additionalProperties":
|
|
719
|
+
"additionalProperties": false,
|
|
697
720
|
"required": ["id", "language", "proficiency"],
|
|
698
721
|
"properties": {
|
|
699
722
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -710,7 +733,7 @@
|
|
|
710
733
|
},
|
|
711
734
|
"Course": {
|
|
712
735
|
"type": "object",
|
|
713
|
-
"additionalProperties":
|
|
736
|
+
"additionalProperties": false,
|
|
714
737
|
"required": ["id", "title"],
|
|
715
738
|
"properties": {
|
|
716
739
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -730,7 +753,7 @@
|
|
|
730
753
|
},
|
|
731
754
|
"Patent": {
|
|
732
755
|
"type": "object",
|
|
733
|
-
"additionalProperties":
|
|
756
|
+
"additionalProperties": false,
|
|
734
757
|
"required": ["id", "title", "patentNumber", "status"],
|
|
735
758
|
"properties": {
|
|
736
759
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -760,7 +783,7 @@
|
|
|
760
783
|
},
|
|
761
784
|
"TestScore": {
|
|
762
785
|
"type": "object",
|
|
763
|
-
"additionalProperties":
|
|
786
|
+
"additionalProperties": false,
|
|
764
787
|
"required": ["id", "title", "score", "date"],
|
|
765
788
|
"properties": {
|
|
766
789
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -784,7 +807,7 @@
|
|
|
784
807
|
},
|
|
785
808
|
"Recommendation": {
|
|
786
809
|
"type": "object",
|
|
787
|
-
"additionalProperties":
|
|
810
|
+
"additionalProperties": false,
|
|
788
811
|
"required": ["id", "body", "author"],
|
|
789
812
|
"properties": {
|
|
790
813
|
"id": { "$ref": "#/$defs/Slug" },
|
|
@@ -809,7 +832,7 @@
|
|
|
809
832
|
},
|
|
810
833
|
"RecommendationAuthor": {
|
|
811
834
|
"type": "object",
|
|
812
|
-
"additionalProperties":
|
|
835
|
+
"additionalProperties": false,
|
|
813
836
|
"required": ["name"],
|
|
814
837
|
"properties": {
|
|
815
838
|
"name": {
|