Skip to content

Commit 494af0b

Browse files
committed
updated definitions
1 parent 6226410 commit 494af0b

18 files changed

+1040
-3
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://identity.foundation/dwn/json-schemas/authorization-payloads/base-authorization-payload.json",
4+
"type": "object",
5+
"additionalProperties": false,
6+
"required": [
7+
"descriptorCid"
8+
],
9+
"properties": {
10+
"descriptorCid": {
11+
"type": "string"
12+
},
13+
"permissionsGrantId": {
14+
"type": "string"
15+
}
16+
}
17+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://identity.foundation/dwn/json-schemas/authorization-payloads/records-write-authorization-payload.json",
4+
"type": "object",
5+
"additionalProperties": false,
6+
"required": [
7+
"descriptorCid",
8+
"recordId"
9+
],
10+
"properties": {
11+
"descriptorCid": {
12+
"type": "string"
13+
},
14+
"recordId": {
15+
"type": "string"
16+
},
17+
"contextId": {
18+
"type": "string"
19+
},
20+
"attestationCid": {
21+
"type": "string"
22+
},
23+
"encryptionCid": {
24+
"type": "string"
25+
}
26+
}
27+
}

schemas/json-schemas/events/events-get.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"additionalProperties": false,
1717
"required": [
1818
"interface",
19-
"method"
19+
"method",
20+
"messageTimestamp"
2021
],
2122
"properties": {
2223
"interface": {
@@ -31,6 +32,9 @@
3132
],
3233
"type": "string"
3334
},
35+
"messageTimestamp": {
36+
"type": "string"
37+
},
3438
"watermark": {
3539
"type": "string"
3640
}

schemas/json-schemas/hooks/hooks-write.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"required": [
1818
"interface",
1919
"method",
20-
"dateCreated",
20+
"messageTimestamp",
2121
"uri",
2222
"filter"
2323
],
@@ -34,7 +34,7 @@
3434
],
3535
"type": "string"
3636
},
37-
"dateCreated": {
37+
"messageTimestamp": {
3838
"$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time"
3939
},
4040
"schema": {
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://identity.foundation/dwn/json-schemas/messages-get.json",
4+
"type": "object",
5+
"additionalProperties": false,
6+
"required": [
7+
"authorization",
8+
"descriptor"
9+
],
10+
"properties": {
11+
"authorization": {
12+
"$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json"
13+
},
14+
"descriptor": {
15+
"type": "object",
16+
"additionalProperties": false,
17+
"required": [
18+
"interface",
19+
"method",
20+
"messageTimestamp"
21+
],
22+
"properties": {
23+
"interface": {
24+
"enum": [
25+
"Messages"
26+
],
27+
"type": "string"
28+
},
29+
"method": {
30+
"enum": [
31+
"Get"
32+
],
33+
"type": "string"
34+
},
35+
"messageTimestamp": {
36+
"type": "string"
37+
},
38+
"messageCids": {
39+
"type": "array",
40+
"items": {
41+
"type": "string"
42+
},
43+
"minItems": 1
44+
}
45+
}
46+
}
47+
}
48+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://identity.foundation/dwn/json-schemas/permissions/defs.json",
4+
"type": "object",
5+
"definitions": {
6+
"grantedTo": {
7+
"$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did"
8+
},
9+
"grantedBy": {
10+
"$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did"
11+
},
12+
"grantedFor": {
13+
"$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did"
14+
},
15+
"scope": {
16+
"type": "object",
17+
"additionalProperties": false,
18+
"required": [
19+
"interface",
20+
"method"
21+
],
22+
"properties": {
23+
"interface": {
24+
"type": "string"
25+
},
26+
"method": {
27+
"type": "string"
28+
}
29+
}
30+
},
31+
"conditions": {
32+
"type": "object",
33+
"additionalProperties": false,
34+
"properties": {
35+
"publication": {
36+
"type": "boolean"
37+
}
38+
}
39+
}
40+
}
41+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://identity.foundation/dwn/json-schemas/permissions-grant.json",
4+
"type": "object",
5+
"required": [
6+
"authorization",
7+
"descriptor"
8+
],
9+
"additionalProperties": false,
10+
"properties": {
11+
"authorization": {
12+
"$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json"
13+
},
14+
"delegationChain": {
15+
"description": "the parent grant",
16+
"$ref": "#"
17+
},
18+
"descriptor": {
19+
"type": "object",
20+
"additionalProperties": false,
21+
"required": [
22+
"interface",
23+
"method",
24+
"messageTimestamp",
25+
"dateExpires"
26+
],
27+
"properties": {
28+
"messageTimestamp": {
29+
"$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time"
30+
},
31+
"dateExpires": {
32+
"$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time"
33+
},
34+
"description": {
35+
"type": "string"
36+
},
37+
"grantedTo": {
38+
"description": "DID of the grantee",
39+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedTo"
40+
},
41+
"grantedBy": {
42+
"description": "DID of the grantor",
43+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedBy"
44+
},
45+
"grantedFor": {
46+
"description": "DID of the DWN to which the grantee is given access",
47+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedFor"
48+
},
49+
"permissionsRequestId": {
50+
"description": "CID of an associated PermissionsRequest message",
51+
"type": "string"
52+
},
53+
"interface": {
54+
"enum": [
55+
"Permissions"
56+
],
57+
"type": "string"
58+
},
59+
"method": {
60+
"enum": [
61+
"Grant"
62+
],
63+
"type": "string"
64+
},
65+
"scope": {
66+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/scope"
67+
},
68+
"conditions": {
69+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/conditions"
70+
}
71+
}
72+
}
73+
}
74+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://identity.foundation/dwn/json-schemas/permissions-request.json",
4+
"additionalProperties": false,
5+
"type": "object",
6+
"required": [
7+
"authorization",
8+
"descriptor"
9+
],
10+
"properties": {
11+
"authorization": {
12+
"$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json"
13+
},
14+
"descriptor": {
15+
"type": "object",
16+
"additionalProperties": false,
17+
"required": [
18+
"interface",
19+
"method",
20+
"messageTimestamp",
21+
"grantedBy",
22+
"grantedTo",
23+
"grantedFor",
24+
"scope"
25+
],
26+
"properties": {
27+
"interface": {
28+
"enum": [
29+
"Permissions"
30+
],
31+
"type": "string"
32+
},
33+
"method": {
34+
"enum": [
35+
"Request"
36+
],
37+
"type": "string"
38+
},
39+
"messageTimestamp": {
40+
"type": "string"
41+
},
42+
"description": {
43+
"type": "string"
44+
},
45+
"grantedTo": {
46+
"description": "DID of the grantee",
47+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedTo"
48+
},
49+
"grantedBy": {
50+
"description": "DID of the grantor",
51+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedBy"
52+
},
53+
"grantedFor": {
54+
"description": "DID of the DWN to which the grantee is given access",
55+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/grantedFor"
56+
},
57+
"scope": {
58+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/scope"
59+
},
60+
"conditions": {
61+
"$ref": "https://identity.foundation/dwn/json-schemas/permissions/defs.json#/definitions/conditions"
62+
}
63+
}
64+
}
65+
}
66+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://identity.foundation/dwn/json-schemas/permissions-revoke.json",
4+
"type": "object",
5+
"required": [
6+
"authorization",
7+
"descriptor"
8+
],
9+
"additionalProperties": false,
10+
"properties": {
11+
"authorization": {
12+
"$ref": "https://identity.foundation/dwn/json-schemas/general-jws.json"
13+
},
14+
"descriptor": {
15+
"type": "object",
16+
"additionalProperties": false,
17+
"required": [
18+
"interface",
19+
"method",
20+
"messageTimestamp",
21+
"permissionsGrantId"
22+
],
23+
"properties": {
24+
"messageTimestamp": {
25+
"type": "string"
26+
},
27+
"permissionsGrantId": {
28+
"type": "string"
29+
},
30+
"interface": {
31+
"enum": [
32+
"Permissions"
33+
],
34+
"type": "string"
35+
},
36+
"method": {
37+
"enum": [
38+
"Revoke"
39+
],
40+
"type": "string"
41+
}
42+
}
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)