@elqora/artifacts 0.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/LICENSE +662 -0
- package/README.md +52 -0
- package/dist/generated/vocabulary.d.ts +10 -0
- package/dist/generated/vocabulary.d.ts.map +1 -0
- package/dist/generated/vocabulary.js +79 -0
- package/dist/generated/vocabulary.js.map +1 -0
- package/dist/generated/wire.d.ts +497 -0
- package/dist/generated/wire.d.ts.map +1 -0
- package/dist/generated/wire.js +3 -0
- package/dist/generated/wire.js.map +1 -0
- package/dist/index.d.ts +363 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# `@elqora/artifacts`
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for the language-neutral Elqora Artifact Protocol. It provides
|
|
4
|
+
typed contracts for artifact identity, immutable versions, physical and
|
|
5
|
+
provider sources, contextual links, specifications, submissions, verification,
|
|
6
|
+
integrity, and declarative policies.
|
|
7
|
+
|
|
8
|
+
The SDK defines protocol data. Applications remain responsible for storage,
|
|
9
|
+
workflows, authorization, provider clients, and user interfaces.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install @elqora/artifacts
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The package is ESM-only and supports Node.js 20 or newer.
|
|
18
|
+
|
|
19
|
+
## Use
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
ARTIFACT_PROTOCOL_VERSION,
|
|
24
|
+
type Artifact,
|
|
25
|
+
type ArtifactSpec,
|
|
26
|
+
type ArtifactVersion,
|
|
27
|
+
} from "@elqora/artifacts";
|
|
28
|
+
|
|
29
|
+
const artifact: Artifact<"delivery_evidence", "image"> = {
|
|
30
|
+
schemaVersion: ARTIFACT_PROTOCOL_VERSION,
|
|
31
|
+
id: "artifact_1",
|
|
32
|
+
kind: "delivery_evidence",
|
|
33
|
+
valueType: "image",
|
|
34
|
+
createdBy: { type: "user", id: "user_1" },
|
|
35
|
+
createdAt: "2026-08-15T09:00:00Z",
|
|
36
|
+
updatedAt: "2026-08-15T09:00:00Z",
|
|
37
|
+
};
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The root export includes the ergonomic TypeScript interfaces, generated
|
|
41
|
+
`Wire*` contracts, and closed-vocabulary constants. Generated contracts follow
|
|
42
|
+
the canonical JSON Schemas in the
|
|
43
|
+
[source repository](https://github.com/elqora/artifacts).
|
|
44
|
+
|
|
45
|
+
## Compatibility
|
|
46
|
+
|
|
47
|
+
During `0.x`, changes are additive by default. Existing public exports and wire
|
|
48
|
+
serialization are preserved unless a documented correction is unavoidable.
|
|
49
|
+
The serialized protocol `schemaVersion` is independent of the npm package
|
|
50
|
+
version.
|
|
51
|
+
|
|
52
|
+
Licensed under AGPL-3.0-only.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ARTIFACT_VALUE_TYPES: readonly ["text", "number", "boolean", "currency", "date", "datetime", "time", "location", "file", "image", "video", "audio", "link", "structured", "reference", "signature", "collection"];
|
|
2
|
+
export declare const ARTIFACT_SOURCE_TYPES: readonly ["inline", "local", "object", "url", "hosted", "provider"];
|
|
3
|
+
export declare const LOCAL_ARTIFACT_SYNC_STATES: readonly ["local_only", "pending_upload", "uploading", "uploaded", "failed"];
|
|
4
|
+
export declare const ARTIFACT_INTEGRITY_ALGORITHMS: readonly ["sha256", "sha384", "sha512"];
|
|
5
|
+
export declare const ARTIFACT_CONDITION_KINDS: readonly ["state", "actor", "artifact_exists", "artifact_value", "and", "or", "not"];
|
|
6
|
+
export declare const ARTIFACT_VALUE_OPERATORS: readonly ["eq", "neq", "gt", "gte", "lt", "lte", "contains", "in"];
|
|
7
|
+
export declare const ARTIFACT_PRIVACY_CLASSIFICATIONS: readonly ["public", "internal", "private", "sensitive", "restricted"];
|
|
8
|
+
export declare const ARTIFACT_PRIVACY_REPRESENTATIONS: readonly ["hidden", "masked", "approximate", "full"];
|
|
9
|
+
export declare const ARTIFACT_VERIFICATION_STATUSES: readonly ["pending", "verified", "rejected", "waived"];
|
|
10
|
+
//# sourceMappingURL=vocabulary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../src/generated/vocabulary.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,oBAAoB,6LAkBvB,CAAC;AACX,eAAO,MAAM,qBAAqB,qEAOxB,CAAC;AACX,eAAO,MAAM,0BAA0B,8EAM7B,CAAC;AACX,eAAO,MAAM,6BAA6B,yCAIhC,CAAC;AACX,eAAO,MAAM,wBAAwB,sFAQ3B,CAAC;AACX,eAAO,MAAM,wBAAwB,oEAS3B,CAAC;AACX,eAAO,MAAM,gCAAgC,uEAMnC,CAAC;AACX,eAAO,MAAM,gCAAgC,sDAKnC,CAAC;AACX,eAAO,MAAM,8BAA8B,wDAKjC,CAAC","sourcesContent":["// Code generated from canonical JSON Schemas; DO NOT EDIT.\nexport const ARTIFACT_VALUE_TYPES = [\n \"text\",\n \"number\",\n \"boolean\",\n \"currency\",\n \"date\",\n \"datetime\",\n \"time\",\n \"location\",\n \"file\",\n \"image\",\n \"video\",\n \"audio\",\n \"link\",\n \"structured\",\n \"reference\",\n \"signature\",\n \"collection\"\n] as const;\nexport const ARTIFACT_SOURCE_TYPES = [\n \"inline\",\n \"local\",\n \"object\",\n \"url\",\n \"hosted\",\n \"provider\"\n] as const;\nexport const LOCAL_ARTIFACT_SYNC_STATES = [\n \"local_only\",\n \"pending_upload\",\n \"uploading\",\n \"uploaded\",\n \"failed\"\n] as const;\nexport const ARTIFACT_INTEGRITY_ALGORITHMS = [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n] as const;\nexport const ARTIFACT_CONDITION_KINDS = [\n \"state\",\n \"actor\",\n \"artifact_exists\",\n \"artifact_value\",\n \"and\",\n \"or\",\n \"not\"\n] as const;\nexport const ARTIFACT_VALUE_OPERATORS = [\n \"eq\",\n \"neq\",\n \"gt\",\n \"gte\",\n \"lt\",\n \"lte\",\n \"contains\",\n \"in\"\n] as const;\nexport const ARTIFACT_PRIVACY_CLASSIFICATIONS = [\n \"public\",\n \"internal\",\n \"private\",\n \"sensitive\",\n \"restricted\"\n] as const;\nexport const ARTIFACT_PRIVACY_REPRESENTATIONS = [\n \"hidden\",\n \"masked\",\n \"approximate\",\n \"full\"\n] as const;\nexport const ARTIFACT_VERIFICATION_STATUSES = [\n \"pending\",\n \"verified\",\n \"rejected\",\n \"waived\"\n] as const;\n"]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Code generated from canonical JSON Schemas; DO NOT EDIT.
|
|
2
|
+
export const ARTIFACT_VALUE_TYPES = [
|
|
3
|
+
"text",
|
|
4
|
+
"number",
|
|
5
|
+
"boolean",
|
|
6
|
+
"currency",
|
|
7
|
+
"date",
|
|
8
|
+
"datetime",
|
|
9
|
+
"time",
|
|
10
|
+
"location",
|
|
11
|
+
"file",
|
|
12
|
+
"image",
|
|
13
|
+
"video",
|
|
14
|
+
"audio",
|
|
15
|
+
"link",
|
|
16
|
+
"structured",
|
|
17
|
+
"reference",
|
|
18
|
+
"signature",
|
|
19
|
+
"collection"
|
|
20
|
+
];
|
|
21
|
+
export const ARTIFACT_SOURCE_TYPES = [
|
|
22
|
+
"inline",
|
|
23
|
+
"local",
|
|
24
|
+
"object",
|
|
25
|
+
"url",
|
|
26
|
+
"hosted",
|
|
27
|
+
"provider"
|
|
28
|
+
];
|
|
29
|
+
export const LOCAL_ARTIFACT_SYNC_STATES = [
|
|
30
|
+
"local_only",
|
|
31
|
+
"pending_upload",
|
|
32
|
+
"uploading",
|
|
33
|
+
"uploaded",
|
|
34
|
+
"failed"
|
|
35
|
+
];
|
|
36
|
+
export const ARTIFACT_INTEGRITY_ALGORITHMS = [
|
|
37
|
+
"sha256",
|
|
38
|
+
"sha384",
|
|
39
|
+
"sha512"
|
|
40
|
+
];
|
|
41
|
+
export const ARTIFACT_CONDITION_KINDS = [
|
|
42
|
+
"state",
|
|
43
|
+
"actor",
|
|
44
|
+
"artifact_exists",
|
|
45
|
+
"artifact_value",
|
|
46
|
+
"and",
|
|
47
|
+
"or",
|
|
48
|
+
"not"
|
|
49
|
+
];
|
|
50
|
+
export const ARTIFACT_VALUE_OPERATORS = [
|
|
51
|
+
"eq",
|
|
52
|
+
"neq",
|
|
53
|
+
"gt",
|
|
54
|
+
"gte",
|
|
55
|
+
"lt",
|
|
56
|
+
"lte",
|
|
57
|
+
"contains",
|
|
58
|
+
"in"
|
|
59
|
+
];
|
|
60
|
+
export const ARTIFACT_PRIVACY_CLASSIFICATIONS = [
|
|
61
|
+
"public",
|
|
62
|
+
"internal",
|
|
63
|
+
"private",
|
|
64
|
+
"sensitive",
|
|
65
|
+
"restricted"
|
|
66
|
+
];
|
|
67
|
+
export const ARTIFACT_PRIVACY_REPRESENTATIONS = [
|
|
68
|
+
"hidden",
|
|
69
|
+
"masked",
|
|
70
|
+
"approximate",
|
|
71
|
+
"full"
|
|
72
|
+
];
|
|
73
|
+
export const ARTIFACT_VERIFICATION_STATUSES = [
|
|
74
|
+
"pending",
|
|
75
|
+
"verified",
|
|
76
|
+
"rejected",
|
|
77
|
+
"waived"
|
|
78
|
+
];
|
|
79
|
+
//# sourceMappingURL=vocabulary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/generated/vocabulary.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,MAAM;IACN,QAAQ;IACR,SAAS;IACT,UAAU;IACV,MAAM;IACN,UAAU;IACV,MAAM;IACN,UAAU;IACV,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,YAAY;IACZ,WAAW;IACX,WAAW;IACX,YAAY;CACJ,CAAC;AACX,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,UAAU;CACF,CAAC;AACX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,YAAY;IACZ,gBAAgB;IAChB,WAAW;IACX,UAAU;IACV,QAAQ;CACA,CAAC;AACX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,QAAQ;IACR,QAAQ;IACR,QAAQ;CACA,CAAC;AACX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,gBAAgB;IAChB,KAAK;IACL,IAAI;IACJ,KAAK;CACG,CAAC;AACX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,UAAU;IACV,IAAI;CACI,CAAC;AACX,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,QAAQ;IACR,UAAU;IACV,SAAS;IACT,WAAW;IACX,YAAY;CACJ,CAAC;AACX,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,QAAQ;IACR,QAAQ;IACR,aAAa;IACb,MAAM;CACE,CAAC;AACX,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,SAAS;IACT,UAAU;IACV,UAAU;IACV,QAAQ;CACA,CAAC","sourcesContent":["// Code generated from canonical JSON Schemas; DO NOT EDIT.\nexport const ARTIFACT_VALUE_TYPES = [\n \"text\",\n \"number\",\n \"boolean\",\n \"currency\",\n \"date\",\n \"datetime\",\n \"time\",\n \"location\",\n \"file\",\n \"image\",\n \"video\",\n \"audio\",\n \"link\",\n \"structured\",\n \"reference\",\n \"signature\",\n \"collection\"\n] as const;\nexport const ARTIFACT_SOURCE_TYPES = [\n \"inline\",\n \"local\",\n \"object\",\n \"url\",\n \"hosted\",\n \"provider\"\n] as const;\nexport const LOCAL_ARTIFACT_SYNC_STATES = [\n \"local_only\",\n \"pending_upload\",\n \"uploading\",\n \"uploaded\",\n \"failed\"\n] as const;\nexport const ARTIFACT_INTEGRITY_ALGORITHMS = [\n \"sha256\",\n \"sha384\",\n \"sha512\"\n] as const;\nexport const ARTIFACT_CONDITION_KINDS = [\n \"state\",\n \"actor\",\n \"artifact_exists\",\n \"artifact_value\",\n \"and\",\n \"or\",\n \"not\"\n] as const;\nexport const ARTIFACT_VALUE_OPERATORS = [\n \"eq\",\n \"neq\",\n \"gt\",\n \"gte\",\n \"lt\",\n \"lte\",\n \"contains\",\n \"in\"\n] as const;\nexport const ARTIFACT_PRIVACY_CLASSIFICATIONS = [\n \"public\",\n \"internal\",\n \"private\",\n \"sensitive\",\n \"restricted\"\n] as const;\nexport const ARTIFACT_PRIVACY_REPRESENTATIONS = [\n \"hidden\",\n \"masked\",\n \"approximate\",\n \"full\"\n] as const;\nexport const ARTIFACT_VERIFICATION_STATUSES = [\n \"pending\",\n \"verified\",\n \"rejected\",\n \"waived\"\n] as const;\n"]}
|
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
export type WireArtifactIntegrity = {
|
|
2
|
+
"algorithm": "sha256" | "sha384" | "sha512";
|
|
3
|
+
"hash": string;
|
|
4
|
+
"size"?: number;
|
|
5
|
+
"verifiedAt"?: WireArtifactProtocolCommonContractsTimestamp;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
export type WireArtifactLink = {
|
|
9
|
+
"schemaVersion": WireArtifactProtocolCommonContractsSchemaVersion;
|
|
10
|
+
"id": WireArtifactProtocolCommonContractsArtifactLinkId;
|
|
11
|
+
"artifactId": WireArtifactProtocolCommonContractsArtifactId;
|
|
12
|
+
"artifactVersionId"?: WireArtifactProtocolCommonContractsArtifactVersionId;
|
|
13
|
+
"subject": WireArtifactProtocolCommonContractsArtifactSubjectReference;
|
|
14
|
+
"role": string;
|
|
15
|
+
"note"?: string;
|
|
16
|
+
"createdBy": WireArtifactProtocolCommonContractsActorReference;
|
|
17
|
+
"createdAt": WireArtifactProtocolCommonContractsTimestamp;
|
|
18
|
+
"metadata"?: WireArtifactProtocolCommonContractsArtifactMetadata;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
export type WireArtifactSource = WireInlineArtifactSource | WireLocalArtifactSource | WireObjectArtifactSource | WireUrlArtifactSource | WireHostedArtifactSource | WireProviderArtifactSource;
|
|
22
|
+
export type WireInlineArtifactSource = {
|
|
23
|
+
"type": "inline";
|
|
24
|
+
"value": unknown;
|
|
25
|
+
"mediaType"?: string;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
export type WireLocalArtifactSource = {
|
|
29
|
+
"type": "local";
|
|
30
|
+
"localId": string;
|
|
31
|
+
"filename"?: string;
|
|
32
|
+
"mediaType"?: string;
|
|
33
|
+
"size"?: number;
|
|
34
|
+
"syncState": "local_only" | "pending_upload" | "uploading" | "uploaded" | "failed";
|
|
35
|
+
"remoteVersionId"?: WireArtifactProtocolCommonContractsArtifactVersionId;
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
};
|
|
38
|
+
export type WireObjectArtifactSource = {
|
|
39
|
+
"type": "object";
|
|
40
|
+
"objectId": string;
|
|
41
|
+
"filename"?: string;
|
|
42
|
+
"mediaType"?: string;
|
|
43
|
+
"size"?: number;
|
|
44
|
+
"storageProvider"?: string;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
};
|
|
47
|
+
export type WireUrlArtifactSource = {
|
|
48
|
+
"type": "url";
|
|
49
|
+
"url": string;
|
|
50
|
+
"provider"?: string;
|
|
51
|
+
"mediaType"?: string;
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
export type WireHostedArtifactSource = {
|
|
55
|
+
"type": "hosted";
|
|
56
|
+
"recordType": string;
|
|
57
|
+
"recordId": string;
|
|
58
|
+
[key: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
export type WireProviderArtifactSource = {
|
|
61
|
+
"type": "provider";
|
|
62
|
+
"provider": string;
|
|
63
|
+
"reference": unknown;
|
|
64
|
+
[key: string]: unknown;
|
|
65
|
+
};
|
|
66
|
+
export type WireArtifactVersion = {
|
|
67
|
+
"schemaVersion": WireArtifactProtocolCommonContractsSchemaVersion;
|
|
68
|
+
"id": WireArtifactProtocolCommonContractsArtifactVersionId;
|
|
69
|
+
"artifactId": WireArtifactProtocolCommonContractsArtifactId;
|
|
70
|
+
"version": number;
|
|
71
|
+
"source": WireArtifactSource;
|
|
72
|
+
"integrity"?: WireArtifactIntegrity;
|
|
73
|
+
"createdBy": WireArtifactProtocolCommonContractsActorReference;
|
|
74
|
+
"createdAt": WireArtifactProtocolCommonContractsTimestamp;
|
|
75
|
+
"note"?: string;
|
|
76
|
+
"metadata"?: WireArtifactProtocolCommonContractsArtifactMetadata;
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
};
|
|
79
|
+
export type WireArtifact = {
|
|
80
|
+
"schemaVersion": WireArtifactProtocolCommonContractsSchemaVersion;
|
|
81
|
+
"id": WireArtifactProtocolCommonContractsArtifactId;
|
|
82
|
+
"scope"?: WireArtifactProtocolCommonContractsArtifactScopeReference;
|
|
83
|
+
"kind": string;
|
|
84
|
+
"valueType": WireArtifactProtocolCommonContractsArtifactValueType;
|
|
85
|
+
"title"?: string;
|
|
86
|
+
"description"?: string;
|
|
87
|
+
"currentVersionId"?: WireArtifactProtocolCommonContractsArtifactVersionId;
|
|
88
|
+
"createdBy": WireArtifactProtocolCommonContractsActorReference;
|
|
89
|
+
"createdAt": WireArtifactProtocolCommonContractsTimestamp;
|
|
90
|
+
"updatedAt": WireArtifactProtocolCommonContractsTimestamp;
|
|
91
|
+
"archivedAt"?: WireArtifactProtocolCommonContractsTimestamp;
|
|
92
|
+
"metadata"?: WireArtifactProtocolCommonContractsArtifactMetadata;
|
|
93
|
+
[key: string]: unknown;
|
|
94
|
+
};
|
|
95
|
+
export type WireArtifactAccessPolicy = {
|
|
96
|
+
"read"?: WireArtifactAccessPolicyRules;
|
|
97
|
+
"write"?: WireArtifactAccessPolicyRules;
|
|
98
|
+
"submit"?: WireArtifactAccessPolicyRules;
|
|
99
|
+
"verify"?: WireArtifactAccessPolicyRules;
|
|
100
|
+
[key: string]: unknown;
|
|
101
|
+
};
|
|
102
|
+
export type WireArtifactAccessPolicyRules = Array<WireArtifactAccessPolicyRule>;
|
|
103
|
+
export type WireArtifactAccessPolicyRule = {
|
|
104
|
+
"actors": Array<string>;
|
|
105
|
+
"condition"?: WireArtifactCondition;
|
|
106
|
+
[key: string]: unknown;
|
|
107
|
+
};
|
|
108
|
+
/** A language-neutral recursive condition AST. Resolution of host identifiers is host-defined. */
|
|
109
|
+
export type WireArtifactCondition = WireArtifactConditionCondition;
|
|
110
|
+
export type WireArtifactConditionCondition = WireArtifactConditionState | WireArtifactConditionActor | WireArtifactConditionArtifactExists | WireArtifactConditionArtifactValue | WireArtifactConditionAnd | WireArtifactConditionOr | WireArtifactConditionNot;
|
|
111
|
+
export type WireArtifactConditionState = {
|
|
112
|
+
"kind": "state";
|
|
113
|
+
"namespace": string;
|
|
114
|
+
"in": Array<string>;
|
|
115
|
+
[key: string]: unknown;
|
|
116
|
+
};
|
|
117
|
+
export type WireArtifactConditionActor = {
|
|
118
|
+
"kind": "actor";
|
|
119
|
+
"in": Array<string>;
|
|
120
|
+
[key: string]: unknown;
|
|
121
|
+
};
|
|
122
|
+
export type WireArtifactConditionArtifactExists = {
|
|
123
|
+
"kind": "artifact_exists";
|
|
124
|
+
"artifact": string;
|
|
125
|
+
[key: string]: unknown;
|
|
126
|
+
};
|
|
127
|
+
export type WireArtifactConditionArtifactValue = {
|
|
128
|
+
"kind": "artifact_value";
|
|
129
|
+
"artifact": string;
|
|
130
|
+
"operator": "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "contains" | "in";
|
|
131
|
+
"value": unknown;
|
|
132
|
+
[key: string]: unknown;
|
|
133
|
+
};
|
|
134
|
+
export type WireArtifactConditionAnd = {
|
|
135
|
+
"kind": "and";
|
|
136
|
+
"conditions": Array<WireArtifactConditionCondition>;
|
|
137
|
+
[key: string]: unknown;
|
|
138
|
+
};
|
|
139
|
+
export type WireArtifactConditionOr = {
|
|
140
|
+
"kind": "or";
|
|
141
|
+
"conditions": Array<WireArtifactConditionCondition>;
|
|
142
|
+
[key: string]: unknown;
|
|
143
|
+
};
|
|
144
|
+
export type WireArtifactConditionNot = {
|
|
145
|
+
"kind": "not";
|
|
146
|
+
"condition": WireArtifactConditionCondition;
|
|
147
|
+
[key: string]: unknown;
|
|
148
|
+
};
|
|
149
|
+
export type WireArtifactLifecyclePolicy = {
|
|
150
|
+
"createAt"?: string;
|
|
151
|
+
"editableDuring"?: Array<string>;
|
|
152
|
+
"submitDuring"?: Array<string>;
|
|
153
|
+
"lockAt"?: string;
|
|
154
|
+
"invalidateOn"?: Array<string>;
|
|
155
|
+
"condition"?: WireArtifactCondition;
|
|
156
|
+
[key: string]: unknown;
|
|
157
|
+
};
|
|
158
|
+
export type WireArtifactPresentationPolicy = {
|
|
159
|
+
"label"?: string;
|
|
160
|
+
"helpText"?: string;
|
|
161
|
+
"order"?: number;
|
|
162
|
+
"display"?: string;
|
|
163
|
+
"config"?: {
|
|
164
|
+
[key: string]: unknown;
|
|
165
|
+
};
|
|
166
|
+
[key: string]: unknown;
|
|
167
|
+
};
|
|
168
|
+
export type WireArtifactPrivacyPolicy = {
|
|
169
|
+
"classification": "public" | "internal" | "private" | "sensitive" | "restricted";
|
|
170
|
+
"reveal"?: Array<WireArtifactRevealRule>;
|
|
171
|
+
"masking"?: WireArtifactMaskingPolicy;
|
|
172
|
+
"encryption"?: WireArtifactEncryptionPolicy;
|
|
173
|
+
[key: string]: unknown;
|
|
174
|
+
};
|
|
175
|
+
export type WireArtifactRevealRule = {
|
|
176
|
+
"actors": Array<string>;
|
|
177
|
+
"when"?: WireArtifactCondition;
|
|
178
|
+
"representation": "hidden" | "masked" | "approximate" | "full";
|
|
179
|
+
[key: string]: unknown;
|
|
180
|
+
};
|
|
181
|
+
export type WireArtifactMaskingPolicy = {
|
|
182
|
+
"strategy": string;
|
|
183
|
+
"config"?: {
|
|
184
|
+
[key: string]: unknown;
|
|
185
|
+
};
|
|
186
|
+
[key: string]: unknown;
|
|
187
|
+
};
|
|
188
|
+
export type WireArtifactEncryptionPolicy = {
|
|
189
|
+
"required": boolean;
|
|
190
|
+
"level"?: string;
|
|
191
|
+
"keyScope"?: string;
|
|
192
|
+
[key: string]: unknown;
|
|
193
|
+
};
|
|
194
|
+
export type WireArtifactProviderPolicy = {
|
|
195
|
+
"actors": Array<string>;
|
|
196
|
+
"mode"?: "single" | "any" | "all";
|
|
197
|
+
"delegation"?: "forbidden" | "allowed";
|
|
198
|
+
[key: string]: unknown;
|
|
199
|
+
};
|
|
200
|
+
export type WireArtifactRequirementPolicy = {
|
|
201
|
+
"mode": "required" | "optional" | "conditional";
|
|
202
|
+
"condition"?: WireArtifactCondition;
|
|
203
|
+
"blocks"?: Array<string>;
|
|
204
|
+
[key: string]: unknown;
|
|
205
|
+
};
|
|
206
|
+
export type WireArtifactRetentionPolicy = WireArtifactRetentionPolicyForever | WireArtifactRetentionPolicyDuration | WireArtifactRetentionPolicyUntil | WireArtifactRetentionPolicyHostDefined;
|
|
207
|
+
export type WireArtifactRetentionPolicyForever = {
|
|
208
|
+
"policy": "forever";
|
|
209
|
+
[key: string]: unknown;
|
|
210
|
+
};
|
|
211
|
+
export type WireArtifactRetentionPolicyDuration = {
|
|
212
|
+
"policy": "duration";
|
|
213
|
+
"days": number;
|
|
214
|
+
[key: string]: unknown;
|
|
215
|
+
};
|
|
216
|
+
export type WireArtifactRetentionPolicyUntil = {
|
|
217
|
+
"policy": "until";
|
|
218
|
+
"date": WireArtifactProtocolCommonContractsDate;
|
|
219
|
+
[key: string]: unknown;
|
|
220
|
+
};
|
|
221
|
+
export type WireArtifactRetentionPolicyHostDefined = {
|
|
222
|
+
"policy": "host_defined";
|
|
223
|
+
"key": string;
|
|
224
|
+
[key: string]: unknown;
|
|
225
|
+
};
|
|
226
|
+
export type WireArtifactValidationPolicy = {
|
|
227
|
+
"mode"?: "strict" | "lenient";
|
|
228
|
+
"rules"?: Array<WireArtifactValidationRule>;
|
|
229
|
+
[key: string]: unknown;
|
|
230
|
+
};
|
|
231
|
+
export type WireArtifactValidationRule = {
|
|
232
|
+
"type": string;
|
|
233
|
+
"config"?: {
|
|
234
|
+
[key: string]: unknown;
|
|
235
|
+
};
|
|
236
|
+
[key: string]: unknown;
|
|
237
|
+
};
|
|
238
|
+
export type WireArtifactVerificationPolicy = {
|
|
239
|
+
"required": boolean;
|
|
240
|
+
"methods"?: Array<string>;
|
|
241
|
+
"actors"?: Array<string>;
|
|
242
|
+
"condition"?: WireArtifactCondition;
|
|
243
|
+
[key: string]: unknown;
|
|
244
|
+
};
|
|
245
|
+
/** The major.minor version of the serialized Artifact Protocol record. */
|
|
246
|
+
export type WireArtifactProtocolCommonContractsSchemaVersion = "1.0";
|
|
247
|
+
/** A non-empty, case-sensitive identifier whose generation and internal form are host-defined. */
|
|
248
|
+
export type WireArtifactProtocolCommonContractsOpaqueIdentifier = string;
|
|
249
|
+
export type WireArtifactProtocolCommonContractsArtifactId = WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
250
|
+
export type WireArtifactProtocolCommonContractsArtifactVersionId = WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
251
|
+
export type WireArtifactProtocolCommonContractsArtifactLinkId = WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
252
|
+
export type WireArtifactProtocolCommonContractsArtifactSpecId = WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
253
|
+
export type WireArtifactProtocolCommonContractsArtifactSubmissionId = WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
254
|
+
export type WireArtifactProtocolCommonContractsArtifactVerificationId = WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
255
|
+
export type WireArtifactProtocolCommonContractsArtifactRequirementId = WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
256
|
+
/** An RFC 3339 full-date string. */
|
|
257
|
+
export type WireArtifactProtocolCommonContractsDate = string;
|
|
258
|
+
/** An RFC 3339 date-time string. */
|
|
259
|
+
export type WireArtifactProtocolCommonContractsTimestamp = string;
|
|
260
|
+
export type WireArtifactProtocolCommonContractsArtifactValueType = "text" | "number" | "boolean" | "currency" | "date" | "datetime" | "time" | "location" | "file" | "image" | "video" | "audio" | "link" | "structured" | "reference" | "signature" | "collection";
|
|
261
|
+
export type WireArtifactProtocolCommonContractsActorReference = {
|
|
262
|
+
"type": string;
|
|
263
|
+
"id"?: WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
264
|
+
"displayName"?: string;
|
|
265
|
+
[key: string]: unknown;
|
|
266
|
+
};
|
|
267
|
+
export type WireArtifactProtocolCommonContractsArtifactScopeReference = {
|
|
268
|
+
"type": string;
|
|
269
|
+
"id": WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
270
|
+
[key: string]: unknown;
|
|
271
|
+
};
|
|
272
|
+
export type WireArtifactProtocolCommonContractsArtifactSubjectReference = {
|
|
273
|
+
"type": string;
|
|
274
|
+
"id": WireArtifactProtocolCommonContractsOpaqueIdentifier;
|
|
275
|
+
"scope"?: {
|
|
276
|
+
[key: string]: string;
|
|
277
|
+
};
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
};
|
|
280
|
+
/** Host extensions represented by arbitrary JSON values. */
|
|
281
|
+
export type WireArtifactProtocolCommonContractsArtifactMetadata = {
|
|
282
|
+
[key: string]: unknown;
|
|
283
|
+
};
|
|
284
|
+
export type WireArtifactSubmission = {
|
|
285
|
+
"schemaVersion": WireArtifactProtocolCommonContractsSchemaVersion;
|
|
286
|
+
"id": WireArtifactProtocolCommonContractsArtifactSubmissionId;
|
|
287
|
+
"artifactId": WireArtifactProtocolCommonContractsArtifactId;
|
|
288
|
+
"artifactVersionId"?: WireArtifactProtocolCommonContractsArtifactVersionId;
|
|
289
|
+
"submittedBy": WireArtifactProtocolCommonContractsActorReference;
|
|
290
|
+
"value"?: unknown;
|
|
291
|
+
"submittedAt": WireArtifactProtocolCommonContractsTimestamp;
|
|
292
|
+
"context"?: WireArtifactSubmissionContext;
|
|
293
|
+
"metadata"?: WireArtifactProtocolCommonContractsArtifactMetadata;
|
|
294
|
+
[key: string]: unknown;
|
|
295
|
+
};
|
|
296
|
+
export type WireArtifactSubmissionContext = {
|
|
297
|
+
"latitude"?: number;
|
|
298
|
+
"longitude"?: number;
|
|
299
|
+
"deviceId"?: string;
|
|
300
|
+
"ipAddress"?: unknown | unknown;
|
|
301
|
+
"userAgent"?: string;
|
|
302
|
+
[key: string]: unknown;
|
|
303
|
+
};
|
|
304
|
+
export type WireArtifactVerification = {
|
|
305
|
+
"schemaVersion": WireArtifactProtocolCommonContractsSchemaVersion;
|
|
306
|
+
"id": WireArtifactProtocolCommonContractsArtifactVerificationId;
|
|
307
|
+
"artifactId": WireArtifactProtocolCommonContractsArtifactId;
|
|
308
|
+
"artifactVersionId"?: WireArtifactProtocolCommonContractsArtifactVersionId;
|
|
309
|
+
"submissionId"?: WireArtifactProtocolCommonContractsArtifactSubmissionId;
|
|
310
|
+
"status": "pending" | "verified" | "rejected" | "waived";
|
|
311
|
+
"method"?: string;
|
|
312
|
+
"verifiedBy"?: WireArtifactProtocolCommonContractsActorReference;
|
|
313
|
+
"reason"?: string;
|
|
314
|
+
"createdAt": WireArtifactProtocolCommonContractsTimestamp;
|
|
315
|
+
"verifiedAt"?: WireArtifactProtocolCommonContractsTimestamp;
|
|
316
|
+
"metadata"?: WireArtifactProtocolCommonContractsArtifactMetadata;
|
|
317
|
+
[key: string]: unknown;
|
|
318
|
+
};
|
|
319
|
+
export type WireArtifactRequirement = {
|
|
320
|
+
"schemaVersion": WireArtifactProtocolCommonContractsSchemaVersion;
|
|
321
|
+
"id": WireArtifactProtocolCommonContractsArtifactRequirementId;
|
|
322
|
+
"key"?: string;
|
|
323
|
+
"allowedKinds"?: Array<string>;
|
|
324
|
+
"allowedValueTypes"?: Array<WireArtifactProtocolCommonContractsArtifactValueType>;
|
|
325
|
+
"minimumCount"?: number;
|
|
326
|
+
"maximumCount"?: number;
|
|
327
|
+
"required": boolean;
|
|
328
|
+
"specId"?: WireArtifactProtocolCommonContractsArtifactSpecId;
|
|
329
|
+
"metadata"?: WireArtifactProtocolCommonContractsArtifactMetadata;
|
|
330
|
+
[key: string]: unknown;
|
|
331
|
+
};
|
|
332
|
+
/** An immutable copy of a specification revision captured by a host. */
|
|
333
|
+
export type WireArtifactSpecSnapshot = {
|
|
334
|
+
"schemaVersion": WireArtifactProtocolCommonContractsSchemaVersion;
|
|
335
|
+
"sourceSpecId": WireArtifactProtocolCommonContractsArtifactSpecId;
|
|
336
|
+
"sourceVersion": number;
|
|
337
|
+
"key": string;
|
|
338
|
+
"name": string;
|
|
339
|
+
"description"?: string;
|
|
340
|
+
"kind": string;
|
|
341
|
+
"valueType": WireArtifactProtocolCommonContractsArtifactValueType;
|
|
342
|
+
"config"?: {
|
|
343
|
+
"valueType"?: WireArtifactProtocolCommonContractsArtifactValueType;
|
|
344
|
+
[key: string]: unknown;
|
|
345
|
+
};
|
|
346
|
+
"provider"?: WireArtifactProviderPolicy;
|
|
347
|
+
"requirement"?: WireArtifactRequirementPolicy;
|
|
348
|
+
"lifecycle"?: WireArtifactLifecyclePolicy;
|
|
349
|
+
"access"?: WireArtifactAccessPolicy;
|
|
350
|
+
"privacy"?: WireArtifactPrivacyPolicy;
|
|
351
|
+
"validation"?: WireArtifactValidationPolicy;
|
|
352
|
+
"verification"?: WireArtifactVerificationPolicy;
|
|
353
|
+
"retention"?: WireArtifactRetentionPolicy;
|
|
354
|
+
"presentation"?: WireArtifactPresentationPolicy;
|
|
355
|
+
"metadata"?: WireArtifactProtocolCommonContractsArtifactMetadata;
|
|
356
|
+
[key: string]: unknown;
|
|
357
|
+
};
|
|
358
|
+
export type WireArtifactSpec = {
|
|
359
|
+
"schemaVersion": WireArtifactProtocolCommonContractsSchemaVersion;
|
|
360
|
+
"id": WireArtifactProtocolCommonContractsArtifactSpecId;
|
|
361
|
+
"key": string;
|
|
362
|
+
"name": string;
|
|
363
|
+
"description"?: string;
|
|
364
|
+
"version": number;
|
|
365
|
+
"kind": string;
|
|
366
|
+
"valueType": WireArtifactProtocolCommonContractsArtifactValueType;
|
|
367
|
+
"config"?: {
|
|
368
|
+
"valueType"?: WireArtifactProtocolCommonContractsArtifactValueType;
|
|
369
|
+
[key: string]: unknown;
|
|
370
|
+
};
|
|
371
|
+
"provider"?: WireArtifactProviderPolicy;
|
|
372
|
+
"requirement"?: WireArtifactRequirementPolicy;
|
|
373
|
+
"lifecycle"?: WireArtifactLifecyclePolicy;
|
|
374
|
+
"access"?: WireArtifactAccessPolicy;
|
|
375
|
+
"privacy"?: WireArtifactPrivacyPolicy;
|
|
376
|
+
"validation"?: WireArtifactValidationPolicy;
|
|
377
|
+
"verification"?: WireArtifactVerificationPolicy;
|
|
378
|
+
"retention"?: WireArtifactRetentionPolicy;
|
|
379
|
+
"presentation"?: WireArtifactPresentationPolicy;
|
|
380
|
+
"metadata"?: WireArtifactProtocolCommonContractsArtifactMetadata;
|
|
381
|
+
[key: string]: unknown;
|
|
382
|
+
};
|
|
383
|
+
/** Standardized representation constraints. Artifact kind remains a separate host-defined semantic identifier. */
|
|
384
|
+
export type WireArtifactValueSchema = WireArtifactValueSchemaText | WireArtifactValueSchemaNumber | WireArtifactValueSchemaBoolean | WireArtifactValueSchemaCurrency | WireArtifactValueSchemaDate | WireArtifactValueSchemaDatetime | WireArtifactValueSchemaTime | WireArtifactValueSchemaLocation | WireArtifactValueSchemaFile | WireArtifactValueSchemaImage | WireArtifactValueSchemaVideo | WireArtifactValueSchemaAudio | WireArtifactValueSchemaLink | WireArtifactValueSchemaStructured | WireArtifactValueSchemaReference | WireArtifactValueSchemaSignature | WireArtifactValueSchemaCollection;
|
|
385
|
+
export type WireArtifactValueSchemaText = {
|
|
386
|
+
"valueType": "text";
|
|
387
|
+
"minLength"?: number;
|
|
388
|
+
"maxLength"?: number;
|
|
389
|
+
"multiline"?: boolean;
|
|
390
|
+
"pattern"?: string;
|
|
391
|
+
[key: string]: unknown;
|
|
392
|
+
};
|
|
393
|
+
export type WireArtifactValueSchemaNumber = {
|
|
394
|
+
"valueType": "number";
|
|
395
|
+
"minimum"?: number;
|
|
396
|
+
"maximum"?: number;
|
|
397
|
+
"integer"?: boolean;
|
|
398
|
+
"multipleOf"?: number;
|
|
399
|
+
[key: string]: unknown;
|
|
400
|
+
};
|
|
401
|
+
export type WireArtifactValueSchemaBoolean = {
|
|
402
|
+
"valueType": "boolean";
|
|
403
|
+
[key: string]: unknown;
|
|
404
|
+
};
|
|
405
|
+
export type WireArtifactValueSchemaCurrency = {
|
|
406
|
+
"valueType": "currency";
|
|
407
|
+
"currencies"?: Array<string>;
|
|
408
|
+
"minimumMinorUnits"?: number;
|
|
409
|
+
"maximumMinorUnits"?: number;
|
|
410
|
+
[key: string]: unknown;
|
|
411
|
+
};
|
|
412
|
+
export type WireArtifactValueSchemaDate = {
|
|
413
|
+
"valueType": "date";
|
|
414
|
+
"minimum"?: WireArtifactProtocolCommonContractsDate;
|
|
415
|
+
"maximum"?: WireArtifactProtocolCommonContractsDate;
|
|
416
|
+
[key: string]: unknown;
|
|
417
|
+
};
|
|
418
|
+
export type WireArtifactValueSchemaDatetime = {
|
|
419
|
+
"valueType": "datetime";
|
|
420
|
+
"minimum"?: WireArtifactProtocolCommonContractsTimestamp;
|
|
421
|
+
"maximum"?: WireArtifactProtocolCommonContractsTimestamp;
|
|
422
|
+
[key: string]: unknown;
|
|
423
|
+
};
|
|
424
|
+
export type WireArtifactValueSchemaTime = {
|
|
425
|
+
"valueType": "time";
|
|
426
|
+
"minimum"?: string;
|
|
427
|
+
"maximum"?: string;
|
|
428
|
+
[key: string]: unknown;
|
|
429
|
+
};
|
|
430
|
+
export type WireArtifactValueSchemaLocation = {
|
|
431
|
+
"valueType": "location";
|
|
432
|
+
"mode": "point" | "address" | "point_and_address";
|
|
433
|
+
"requireCoordinates"?: boolean;
|
|
434
|
+
"allowManualEntry"?: boolean;
|
|
435
|
+
[key: string]: unknown;
|
|
436
|
+
};
|
|
437
|
+
export type WireArtifactValueSchemaFile = WireArtifactValueSchemaFileBase & {
|
|
438
|
+
"valueType": "file";
|
|
439
|
+
[key: string]: unknown;
|
|
440
|
+
};
|
|
441
|
+
export type WireArtifactValueSchemaImage = WireArtifactValueSchemaFileBase & {
|
|
442
|
+
"valueType": "image";
|
|
443
|
+
"requireTimestamp"?: boolean;
|
|
444
|
+
"requireLocation"?: boolean;
|
|
445
|
+
[key: string]: unknown;
|
|
446
|
+
};
|
|
447
|
+
export type WireArtifactValueSchemaVideo = WireArtifactValueSchemaFileBase & {
|
|
448
|
+
"valueType": "video";
|
|
449
|
+
"maxDurationSeconds"?: number;
|
|
450
|
+
[key: string]: unknown;
|
|
451
|
+
};
|
|
452
|
+
export type WireArtifactValueSchemaAudio = WireArtifactValueSchemaFileBase & {
|
|
453
|
+
"valueType": "audio";
|
|
454
|
+
"maxDurationSeconds"?: number;
|
|
455
|
+
[key: string]: unknown;
|
|
456
|
+
};
|
|
457
|
+
export type WireArtifactValueSchemaFileBase = {
|
|
458
|
+
"minFiles"?: number;
|
|
459
|
+
"maxFiles"?: number;
|
|
460
|
+
"acceptedMimeTypes"?: Array<string>;
|
|
461
|
+
"maxSizeBytes"?: number;
|
|
462
|
+
[key: string]: unknown;
|
|
463
|
+
};
|
|
464
|
+
export type WireArtifactValueSchemaLink = {
|
|
465
|
+
"valueType": "link";
|
|
466
|
+
"allowedSchemes"?: Array<string>;
|
|
467
|
+
"allowedHosts"?: Array<string>;
|
|
468
|
+
[key: string]: unknown;
|
|
469
|
+
};
|
|
470
|
+
export type WireArtifactValueSchemaStructured = {
|
|
471
|
+
"valueType": "structured";
|
|
472
|
+
"jsonSchema"?: {
|
|
473
|
+
[key: string]: unknown;
|
|
474
|
+
};
|
|
475
|
+
[key: string]: unknown;
|
|
476
|
+
};
|
|
477
|
+
export type WireArtifactValueSchemaReference = {
|
|
478
|
+
"valueType": "reference";
|
|
479
|
+
"providers"?: Array<string>;
|
|
480
|
+
"resourceTypes"?: Array<string>;
|
|
481
|
+
[key: string]: unknown;
|
|
482
|
+
};
|
|
483
|
+
export type WireArtifactValueSchemaSignature = {
|
|
484
|
+
"valueType": "signature";
|
|
485
|
+
"methods"?: Array<string>;
|
|
486
|
+
"requireTimestamp"?: boolean;
|
|
487
|
+
[key: string]: unknown;
|
|
488
|
+
};
|
|
489
|
+
export type WireArtifactValueSchemaCollection = {
|
|
490
|
+
"valueType": "collection";
|
|
491
|
+
"itemSchema": WireArtifactValueSchema;
|
|
492
|
+
"minItems"?: number;
|
|
493
|
+
"maxItems"?: number;
|
|
494
|
+
"uniqueItems"?: boolean;
|
|
495
|
+
[key: string]: unknown;
|
|
496
|
+
};
|
|
497
|
+
//# sourceMappingURL=wire.d.ts.map
|