@bsv/dpp-profiles 0.3.0-beta.1
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/LICENSE +58 -0
- package/README.md +64 -0
- package/dist/applicability.d.ts +96 -0
- package/dist/applicability.d.ts.map +1 -0
- package/dist/applicability.js +181 -0
- package/dist/applicability.js.map +1 -0
- package/dist/combinations.d.ts +30 -0
- package/dist/combinations.d.ts.map +1 -0
- package/dist/combinations.js +103 -0
- package/dist/combinations.js.map +1 -0
- package/dist/evidence-shapes.d.ts +198 -0
- package/dist/evidence-shapes.d.ts.map +1 -0
- package/dist/evidence-shapes.js +123 -0
- package/dist/evidence-shapes.js.map +1 -0
- package/dist/gs1-epc-binary.d.ts +81 -0
- package/dist/gs1-epc-binary.d.ts.map +1 -0
- package/dist/gs1-epc-binary.js +252 -0
- package/dist/gs1-epc-binary.js.map +1 -0
- package/dist/gs1-resolution.d.ts +392 -0
- package/dist/gs1-resolution.d.ts.map +1 -0
- package/dist/gs1-resolution.js +696 -0
- package/dist/gs1-resolution.js.map +1 -0
- package/dist/identifiers.d.ts +57 -0
- package/dist/identifiers.d.ts.map +1 -0
- package/dist/identifiers.js +117 -0
- package/dist/identifiers.js.map +1 -0
- package/dist/index.d.ts +235 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +124 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest-v2.d.ts +87 -0
- package/dist/manifest-v2.d.ts.map +1 -0
- package/dist/manifest-v2.js +31 -0
- package/dist/manifest-v2.js.map +1 -0
- package/dist/mapping.d.ts +84 -0
- package/dist/mapping.d.ts.map +1 -0
- package/dist/mapping.js +88 -0
- package/dist/mapping.js.map +1 -0
- package/dist/projections.d.ts +233 -0
- package/dist/projections.d.ts.map +1 -0
- package/dist/projections.js +466 -0
- package/dist/projections.js.map +1 -0
- package/frozen.json +42 -0
- package/generated/consumer/battery-v2.json +2248 -0
- package/generated/consumer/battery-v3.json +4354 -0
- package/generated/consumer/general-v1.json +9 -0
- package/generated/consumer/general-v2.json +714 -0
- package/generated/consumer/textile-v1.json +101 -0
- package/generated/consumer/textile-v2.json +1033 -0
- package/generated/consumer/textile-v3.json +2011 -0
- package/generated/index.json +86 -0
- package/generated/mapping/battery@2.md +116 -0
- package/generated/mapping/battery@3.md +130 -0
- package/generated/mapping/general@2.md +50 -0
- package/generated/mapping/textile@2.md +61 -0
- package/generated/mapping/textile@3.md +73 -0
- package/generated/payload-schema/battery@2.public.schema.json +609 -0
- package/generated/payload-schema/battery@2.restricted.schema.json +377 -0
- package/generated/payload-schema/battery@3.public.schema.json +1364 -0
- package/generated/payload-schema/battery@3.restricted.schema.json +1097 -0
- package/generated/payload-schema/general@1.public.schema.json +37 -0
- package/generated/payload-schema/general@1.restricted.schema.json +9 -0
- package/generated/payload-schema/general@2.public.schema.json +352 -0
- package/generated/payload-schema/general@2.restricted.schema.json +52 -0
- package/generated/payload-schema/textile@1.public.schema.json +82 -0
- package/generated/payload-schema/textile@1.restricted.schema.json +22 -0
- package/generated/payload-schema/textile@2.public.schema.json +464 -0
- package/generated/payload-schema/textile@2.restricted.schema.json +78 -0
- package/generated/payload-schema/textile@3.public.schema.json +1299 -0
- package/generated/payload-schema/textile@3.restricted.schema.json +78 -0
- package/manifests/battery@2.json +4047 -0
- package/manifests/battery@3.json +6164 -0
- package/manifests/exchange/untp-0.7.0-jose@1.json +191 -0
- package/manifests/exchange/vc-di-ecdsa-rdfc-2019@1.json +74 -0
- package/manifests/exchange/vsc-draft-compat@0.1.0.json +64 -0
- package/manifests/general@1.json +148 -0
- package/manifests/general@2.json +1266 -0
- package/manifests/interoperability/epcis-json@1.json +69 -0
- package/manifests/interoperability/epcis-vsc@1.json +64 -0
- package/manifests/interoperability/gs1-digital-link@1.json +71 -0
- package/manifests/operator/federated-operators@1.json +54 -0
- package/manifests/operator/single-operator@1.json +52 -0
- package/manifests/textile@1.json +383 -0
- package/manifests/textile@2.json +1682 -0
- package/manifests/textile@3.json +2763 -0
- package/package.json +59 -0
- package/schemas/exchange-profile.schema.json +134 -0
- package/schemas/gs1/NOTICE.md +11 -0
- package/schemas/gs1/resolver-description-file-schema-1.2.0.json +124 -0
- package/schemas/gs1/resolver-linkset-context-1.2.1.jsonld +39 -0
- package/schemas/gs1/resolver-linkset-schema-1.2.1.json +96 -0
- package/schemas/interoperability-profile.schema.json +347 -0
- package/schemas/operator-profile.schema.json +108 -0
- package/schemas/product-identity.schema.json +45 -0
- package/schemas/profile-manifest-v2.schema.json +1087 -0
- package/schemas/profile-manifest.schema.json +291 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://bsv-blockchain.github.io/dpp/profiles/schemas/profile-manifest.schema.json",
|
|
4
|
+
"title": "DPP industry profile manifest, version 1",
|
|
5
|
+
"description": "The canonical, immutable definition of one industry data profile (spec/profiles.md section 2). Forms, validators, consumer documents and registry endpoints are generated from it and never edit it.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["manifestVersion", "id", "version", "profile", "kind", "status", "title", "regulatoryLine", "baseline", "roles", "applicability", "schemaDialect", "schemaUri", "schemaDigest", "restrictedSchemaUri", "restrictedSchemaDigest", "contextRefs", "extends", "stamps", "fields", "eventMappings", "accessPolicyRef", "accessTiers", "sourceRefs", "identity"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"manifestVersion": { "const": "1" },
|
|
11
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
12
|
+
"version": { "type": "integer", "minimum": 1 },
|
|
13
|
+
"profile": { "type": "string", "pattern": "^[a-z][a-z0-9-]*@[0-9]+$" },
|
|
14
|
+
"kind": { "const": "industry" },
|
|
15
|
+
"status": { "enum": ["draft", "current", "superseded"] },
|
|
16
|
+
"supersededBy": { "type": "string", "pattern": "^[a-z][a-z0-9-]*@[0-9]+$" },
|
|
17
|
+
"title": { "type": "string", "minLength": 1 },
|
|
18
|
+
"description": { "type": "string" },
|
|
19
|
+
"regulatoryLine": { "type": "string", "minLength": 1, "description": "One sentence, aligned with and never compliant." },
|
|
20
|
+
"baseline": { "type": "string", "pattern": "^[a-z][a-z0-9-]*@[0-9]+$" },
|
|
21
|
+
"roles": { "type": "array", "minItems": 1, "items": { "enum": ["passport-writer", "attestation-issuer", "registry", "passport-reader"] } },
|
|
22
|
+
"applicability": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["categories", "jurisdictions", "statements"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"categories": { "type": "array", "items": { "$ref": "#/$defs/option" } },
|
|
28
|
+
"categoryKey": { "type": "string", "description": "The payload key that names the product category the applicability rules read." },
|
|
29
|
+
"jurisdictions": { "type": "array", "items": { "type": "string" } },
|
|
30
|
+
"statements": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["text", "status"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"text": { "type": "string", "minLength": 1 },
|
|
38
|
+
"status": { "enum": ["enacted", "anticipated", "needs-review"] },
|
|
39
|
+
"source": { "type": "string" },
|
|
40
|
+
"effectiveDate": { "type": "string", "format": "date" }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"schemaDialect": { "const": "https://json-schema.org/draft/2020-12/schema" },
|
|
47
|
+
"schemaUri": { "type": "string", "minLength": 1, "description": "The generated JSON Schema for the public payload." },
|
|
48
|
+
"schemaDigest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
49
|
+
"restrictedSchemaUri": { "type": "string", "minLength": 1, "description": "The generated JSON Schema for the off-chain restricted tiers." },
|
|
50
|
+
"restrictedSchemaDigest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
51
|
+
"contextRefs": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["id", "name", "version", "use"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"id": { "type": "string" },
|
|
59
|
+
"name": { "type": "string" },
|
|
60
|
+
"version": { "type": "string" },
|
|
61
|
+
"repository": { "type": "string" },
|
|
62
|
+
"licence": { "type": "string" },
|
|
63
|
+
"retrieved": { "type": "string", "format": "date" },
|
|
64
|
+
"urnPattern": { "type": "string" },
|
|
65
|
+
"use": { "type": "string" }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"extends": { "type": ["string", "null"], "pattern": "^[a-z][a-z0-9-]*@[0-9]+$" },
|
|
70
|
+
"stamps": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"description": "Reserved payload keys the platform writes and a consumer must not read as product data.",
|
|
73
|
+
"items": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["key", "description", "valueType"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"key": { "type": "string" },
|
|
79
|
+
"description": { "type": "string" },
|
|
80
|
+
"valueType": { "enum": ["text", "id", "integer", "enum"] },
|
|
81
|
+
"const": { "type": ["string", "integer"] },
|
|
82
|
+
"codeList": { "$ref": "#/$defs/codeList" },
|
|
83
|
+
"pattern": { "type": "string" }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"fields": { "type": "array", "items": { "$ref": "#/$defs/field" } },
|
|
88
|
+
"eventMappings": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"required": ["nativeOperation", "eventType", "externalEvent", "requires", "withoutEvidence"],
|
|
94
|
+
"properties": {
|
|
95
|
+
"nativeOperation": { "enum": ["ACTIVATE", "SOLD", "RESOLD", "REPAIRED", "RECYCLED", "EDIT", "TRANSFER"] },
|
|
96
|
+
"eventType": { "enum": ["Origin", "Transfer", "Transformation", "Disposition"] },
|
|
97
|
+
"externalEvent": { "type": "string", "description": "The external lifecycle semantics the operation may map to when its evidence condition holds." },
|
|
98
|
+
"requires": { "type": "string", "description": "The evidence without which the mapping is not made." },
|
|
99
|
+
"withoutEvidence": { "enum": ["insufficient-data", "unsupported", "transformed"] }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"accessPolicyRef": { "type": "string" },
|
|
104
|
+
"accessTiers": {
|
|
105
|
+
"type": "array",
|
|
106
|
+
"items": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["id", "description", "storage"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"id": { "enum": ["public", "owner", "legitimate", "authority"] },
|
|
112
|
+
"description": { "type": "string" },
|
|
113
|
+
"storage": { "enum": ["on-chain public payload", "off-chain encrypted"] }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"sourceRefs": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"items": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"required": ["id", "name", "use"],
|
|
123
|
+
"properties": {
|
|
124
|
+
"id": { "type": "string" },
|
|
125
|
+
"name": { "type": "string" },
|
|
126
|
+
"reference": { "type": "string" },
|
|
127
|
+
"version": { "type": "string" },
|
|
128
|
+
"licence": { "type": "string" },
|
|
129
|
+
"licensedText": { "type": "boolean", "description": "True when the text is licensed and is cited by clause only, never reproduced." },
|
|
130
|
+
"use": { "type": "string" },
|
|
131
|
+
"fields": { "type": "array", "items": { "type": "string" } }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"groups": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"description": "Presentation grouping, informative.",
|
|
138
|
+
"items": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"required": ["id", "title"],
|
|
142
|
+
"properties": { "id": { "type": "string" }, "title": { "type": "string" }, "blurb": { "type": "string" } }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"identity": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"additionalProperties": false,
|
|
148
|
+
"required": ["passportIdentifier", "granularities", "parentRelations"],
|
|
149
|
+
"properties": {
|
|
150
|
+
"passportIdentifier": { "type": "string", "description": "How the enduring passport identifier is formed for this profile." },
|
|
151
|
+
"granularities": { "type": "array", "items": { "enum": ["model", "batch", "item"] } },
|
|
152
|
+
"itemIdentifier": { "type": "string", "description": "The field key that identifies the one physical unit, when the profile declares one." },
|
|
153
|
+
"modelIdentifier": { "type": "string" },
|
|
154
|
+
"batchIdentifier": { "type": "string" },
|
|
155
|
+
"parentRelations": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": ["child", "parent"],
|
|
161
|
+
"properties": { "child": { "enum": ["item", "batch"] }, "parent": { "enum": ["model", "batch"] } }
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"$defs": {
|
|
168
|
+
"option": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": ["value", "label"],
|
|
172
|
+
"properties": { "value": { "type": "string" }, "label": { "type": "string" } }
|
|
173
|
+
},
|
|
174
|
+
"codeList": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": ["closed", "options"],
|
|
178
|
+
"properties": {
|
|
179
|
+
"closed": { "type": "boolean", "description": "True: a value outside the options is invalid. False: the list is what is known in practice and a value outside it is valid." },
|
|
180
|
+
"options": { "type": "array", "items": { "$ref": "#/$defs/option" } }
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"valueType": {
|
|
184
|
+
"enum": ["id", "text", "enum", "multi", "decimal", "integer", "percent", "monthYear", "date", "url", "document", "graphic", "country", "record", "any"]
|
|
185
|
+
},
|
|
186
|
+
"constraints": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"additionalProperties": false,
|
|
189
|
+
"properties": {
|
|
190
|
+
"minimum": { "type": "number" },
|
|
191
|
+
"maximum": { "type": "number" },
|
|
192
|
+
"step": { "type": "number" },
|
|
193
|
+
"pattern": { "type": "string" },
|
|
194
|
+
"patternHint": { "type": "string" },
|
|
195
|
+
"maxLength": { "type": "integer", "minimum": 1 }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"part": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"required": ["key", "label", "valueType"],
|
|
202
|
+
"properties": {
|
|
203
|
+
"key": { "type": "string" },
|
|
204
|
+
"label": { "type": "string" },
|
|
205
|
+
"valueType": { "enum": ["text", "decimal", "percent", "integer", "enum", "country"] },
|
|
206
|
+
"unit": { "type": "string" },
|
|
207
|
+
"codeList": { "$ref": "#/$defs/codeList" },
|
|
208
|
+
"constraints": { "$ref": "#/$defs/constraints" },
|
|
209
|
+
"required": { "type": "boolean" }
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"applicabilityRule": {
|
|
213
|
+
"description": "always: the field applies. category-in: it applies only to the named categories. needs-review: an obligation holds only under a condition a form cannot decide, stated in words; a consumer shows it and never reads it as satisfied or as universally required.",
|
|
214
|
+
"oneOf": [
|
|
215
|
+
{
|
|
216
|
+
"type": "object",
|
|
217
|
+
"additionalProperties": false,
|
|
218
|
+
"required": ["rule"],
|
|
219
|
+
"properties": { "rule": { "const": "always" } }
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"type": "object",
|
|
223
|
+
"additionalProperties": false,
|
|
224
|
+
"required": ["rule", "categories"],
|
|
225
|
+
"properties": {
|
|
226
|
+
"rule": { "const": "category-in" },
|
|
227
|
+
"categories": { "type": "array", "minItems": 1, "items": { "type": "string" } }
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"required": ["rule", "condition"],
|
|
234
|
+
"properties": {
|
|
235
|
+
"rule": { "const": "needs-review" },
|
|
236
|
+
"condition": { "type": "string", "minLength": 1 },
|
|
237
|
+
"categories": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "Narrows the categories the review concerns." }
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"field": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"required": ["key", "pointer", "label", "valueType", "cardinality", "granularity", "provenance", "accessTier", "obligation", "legalBasis", "applicability"],
|
|
246
|
+
"properties": {
|
|
247
|
+
"key": { "type": "string", "minLength": 1 },
|
|
248
|
+
"pointer": { "type": "string", "pattern": "^/" },
|
|
249
|
+
"label": { "type": "string" },
|
|
250
|
+
"semanticUri": { "type": "string" },
|
|
251
|
+
"valueType": { "$ref": "#/$defs/valueType" },
|
|
252
|
+
"unit": { "type": "string" },
|
|
253
|
+
"codeList": { "$ref": "#/$defs/codeList" },
|
|
254
|
+
"constraints": { "$ref": "#/$defs/constraints" },
|
|
255
|
+
"cardinality": { "enum": ["one", "many"] },
|
|
256
|
+
"granularity": { "enum": ["model", "batch", "item"] },
|
|
257
|
+
"provenance": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"additionalProperties": false,
|
|
260
|
+
"required": ["capture"],
|
|
261
|
+
"properties": {
|
|
262
|
+
"capture": { "enum": ["form", "brand", "platform", "event", "derived", "deferred"] },
|
|
263
|
+
"dynamic": { "type": "boolean" },
|
|
264
|
+
"prose": { "type": "boolean" },
|
|
265
|
+
"onLabel": { "type": "boolean" },
|
|
266
|
+
"needsBms": { "type": "boolean" },
|
|
267
|
+
"kind": { "enum": ["fact", "declaration", "calculation", "assessment"], "description": "What the value is: a recorded fact, the maker's declaration, a calculated figure or a third party's assessment." }
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"accessTier": { "enum": ["public", "owner", "legitimate", "authority"] },
|
|
271
|
+
"obligation": { "enum": ["required", "recommended", "optional"] },
|
|
272
|
+
"legalBasis": { "type": "string", "minLength": 1, "description": "The instrument that asks for the value, or the plain statement that none does. Separate from obligation." },
|
|
273
|
+
"applicability": { "$ref": "#/$defs/applicabilityRule" },
|
|
274
|
+
"sourceRefs": {
|
|
275
|
+
"type": "array",
|
|
276
|
+
"items": {
|
|
277
|
+
"type": "object",
|
|
278
|
+
"additionalProperties": false,
|
|
279
|
+
"required": ["source"],
|
|
280
|
+
"properties": { "source": { "type": "string" }, "clause": { "type": "string" }, "name": { "type": "string" }, "property": { "type": "string" } }
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"awaitingAct": { "type": "string" },
|
|
284
|
+
"supersedes": { "type": "string", "description": "The previous version's key this field replaces." },
|
|
285
|
+
"group": { "type": "string" },
|
|
286
|
+
"parts": { "type": "array", "items": { "$ref": "#/$defs/part" } },
|
|
287
|
+
"note": { "type": "string" }
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|