Skip to content

Commit 984baba

Browse files
committed
feat: Added website property to the contact item
1 parent 6904854 commit 984baba

5 files changed

Lines changed: 343 additions & 270 deletions

File tree

‎package.json‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@windingtree/org.json-schema",
3-
"version": "1.0.2",
3+
"version": "1.1.0",
44
"description": "ORG.JSON schema for the ORGiD protocol",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -24,15 +24,15 @@
2424
},
2525
"homepage": "https://github.com/windingtree/org.json-schema#readme",
2626
"devDependencies": {
27-
"@types/node": "17.0.10",
28-
"typescript": "4.5.4",
29-
"ajv": "8.9.0",
27+
"@types/node": "18.11.11",
28+
"typescript": "4.9.3",
29+
"ajv": "8.11.2",
3030
"ajv-formats": "2.1.1",
31-
"chai": "4.3.4",
31+
"chai": "4.3.7",
3232
"js-yaml": "4.1.0",
33-
"json-schema-to-typescript": "10.1.5",
34-
"mocha": "9.1.4",
35-
"eslint": "8.7.0"
33+
"json-schema-to-typescript": "11.0.2",
34+
"mocha": "10.1.0",
35+
"eslint": "8.29.0"
3636
},
3737
"publishConfig": {
3838
"access": "public"

‎src/org.json.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,8 @@ definitions:
584584
ContactReference:
585585
description: Contact reference
586586
type: object
587+
required:
588+
- function
587589
properties:
588590
function:
589591
description: >-
@@ -599,6 +601,10 @@ definitions:
599601
description: Email
600602
type: string
601603
format: email
604+
website:
605+
description: Website URI
606+
type: string
607+
pattern: '^(https|http){1}:\/\/([\w\d.-]+)(:(\d*))?(\/[\w\d.-?=#&%-_]*)?$'
602608
messengers:
603609
description: Messenger accounts
604610
type: array
@@ -613,6 +619,7 @@ definitions:
613619
"name": "John Smith",
614620
"phone": "+1234567890",
615621
"email": "email@spam.com",
622+
"website": "https://website.web",
616623
"messengers": [
617624
{
618625
"type": "whatsapp",

‎types/org.json/index.d.ts‎

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,7 @@ export interface VerificationMethodReference {
138138
* A public key PEM property is used to specify the PEM-encoded version of the public key
139139
*/
140140
publicKeyPem?: string;
141-
/**
142-
* Public key in JWT format (recommended key format)
143-
*/
144-
publicKeyJwk?: {
145-
[k: string]: unknown;
146-
};
141+
publicKeyJwk?: PublicKeyJwkReference;
147142
/**
148143
* Public key in value in Base58 Bitcoin format
149144
*/
@@ -152,27 +147,34 @@ export interface VerificationMethodReference {
152147
* Note about the private key purpose
153148
*/
154149
note?: string;
150+
verificationMethodRevocation?: VerificationMethodRevocationReference;
151+
[k: string]: unknown;
152+
}
153+
/**
154+
* Public key in JWT format (recommended key format)
155+
*/
156+
export interface PublicKeyJwkReference {
157+
[k: string]: unknown;
158+
}
159+
/**
160+
* Verification method revocation status
161+
*/
162+
export interface VerificationMethodRevocationReference {
155163
/**
156-
* Verification method revocation status
157-
*/
158-
verificationMethodRevocation?: {
159-
/**
160-
* Revocation reason according to https://datatracker.ietf.org/doc/html/rfc5280#section-5.3.1
161-
*/
162-
reason?:
163-
| "unspecified"
164-
| "keyCompromise"
165-
| "affiliationChanged"
166-
| "superseded"
167-
| "cessationOfOperation"
168-
| "certificateHold"
169-
| "privilegeWithdrawn";
170-
/**
171-
* Date of the public key invalidation
172-
*/
173-
invalidityDate?: string;
174-
[k: string]: unknown;
175-
};
164+
* Revocation reason according to https://datatracker.ietf.org/doc/html/rfc5280#section-5.3.1
165+
*/
166+
reason?:
167+
| "unspecified"
168+
| "keyCompromise"
169+
| "affiliationChanged"
170+
| "superseded"
171+
| "cessationOfOperation"
172+
| "certificateHold"
173+
| "privilegeWithdrawn";
174+
/**
175+
* Date of the public key invalidation
176+
*/
177+
invalidityDate?: string;
176178
[k: string]: unknown;
177179
}
178180
/**
@@ -447,7 +449,7 @@ export interface ContactReference {
447449
/**
448450
* Contact function: sales, support, accounting, etc.
449451
*/
450-
function?: string;
452+
function: string;
451453
/**
452454
* Contact person or department name
453455
*/
@@ -460,6 +462,10 @@ export interface ContactReference {
460462
* Email
461463
*/
462464
email?: string;
465+
/**
466+
* Website URI
467+
*/
468+
website?: string;
463469
/**
464470
* Messenger accounts
465471
*/

‎types/orgVc/index.d.ts‎

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,7 @@ export interface VerificationMethodReference {
281281
* A public key PEM property is used to specify the PEM-encoded version of the public key
282282
*/
283283
publicKeyPem?: string;
284-
/**
285-
* Public key in JWT format (recommended key format)
286-
*/
287-
publicKeyJwk?: {
288-
[k: string]: unknown;
289-
};
284+
publicKeyJwk?: PublicKeyJwkReference;
290285
/**
291286
* Public key in value in Base58 Bitcoin format
292287
*/
@@ -295,27 +290,34 @@ export interface VerificationMethodReference {
295290
* Note about the private key purpose
296291
*/
297292
note?: string;
293+
verificationMethodRevocation?: VerificationMethodRevocationReference;
294+
[k: string]: unknown;
295+
}
296+
/**
297+
* Public key in JWT format (recommended key format)
298+
*/
299+
export interface PublicKeyJwkReference {
300+
[k: string]: unknown;
301+
}
302+
/**
303+
* Verification method revocation status
304+
*/
305+
export interface VerificationMethodRevocationReference {
298306
/**
299-
* Verification method revocation status
300-
*/
301-
verificationMethodRevocation?: {
302-
/**
303-
* Revocation reason according to https://datatracker.ietf.org/doc/html/rfc5280#section-5.3.1
304-
*/
305-
reason?:
306-
| "unspecified"
307-
| "keyCompromise"
308-
| "affiliationChanged"
309-
| "superseded"
310-
| "cessationOfOperation"
311-
| "certificateHold"
312-
| "privilegeWithdrawn";
313-
/**
314-
* Date of the public key invalidation
315-
*/
316-
invalidityDate?: string;
317-
[k: string]: unknown;
318-
};
307+
* Revocation reason according to https://datatracker.ietf.org/doc/html/rfc5280#section-5.3.1
308+
*/
309+
reason?:
310+
| "unspecified"
311+
| "keyCompromise"
312+
| "affiliationChanged"
313+
| "superseded"
314+
| "cessationOfOperation"
315+
| "certificateHold"
316+
| "privilegeWithdrawn";
317+
/**
318+
* Date of the public key invalidation
319+
*/
320+
invalidityDate?: string;
319321
[k: string]: unknown;
320322
}
321323
/**
@@ -507,7 +509,7 @@ export interface ContactReference {
507509
/**
508510
* Contact function: sales, support, accounting, etc.
509511
*/
510-
function?: string;
512+
function: string;
511513
/**
512514
* Contact person or department name
513515
*/
@@ -520,6 +522,10 @@ export interface ContactReference {
520522
* Email
521523
*/
522524
email?: string;
525+
/**
526+
* Website URI
527+
*/
528+
website?: string;
523529
/**
524530
* Messenger accounts
525531
*/

0 commit comments

Comments
 (0)