@hypercerts-org/lexicon 0.10.0-beta.5 → 0.10.0-beta.7
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/CHANGELOG.md +75 -0
- package/README.md +46 -0
- package/SCHEMAS.md +104 -90
- package/dist/exports.d.ts +109 -26
- package/dist/exports.d.ts.map +1 -1
- package/dist/generated/exports.d.ts +109 -26
- package/dist/generated/exports.d.ts.map +1 -1
- package/dist/generated/lexicons.d.ts +226 -70
- package/dist/generated/lexicons.d.ts.map +1 -1
- package/dist/generated/types/app/bsky/richtext/facet.d.ts +8 -0
- package/dist/generated/types/app/bsky/richtext/facet.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/activity.d.ts +25 -11
- package/dist/generated/types/org/hypercerts/claim/activity.d.ts.map +1 -1
- package/dist/generated/types/org/hypercerts/claim/collection.d.ts +18 -2
- package/dist/generated/types/org/hypercerts/claim/collection.d.ts.map +1 -1
- package/dist/generated/types/org/hypercerts/claim/contributionDetails.d.ts +22 -0
- package/dist/generated/types/org/hypercerts/claim/contributionDetails.d.ts.map +1 -0
- package/dist/generated/types/org/hypercerts/claim/{contributor.d.ts → contributorInformation.d.ts} +3 -11
- package/dist/generated/types/org/hypercerts/claim/contributorInformation.d.ts.map +1 -0
- package/dist/index.cjs +427 -203
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +415 -195
- package/dist/index.mjs.map +1 -1
- package/dist/lexicons.cjs +130 -39
- package/dist/lexicons.cjs.map +1 -1
- package/dist/lexicons.d.ts +226 -70
- package/dist/lexicons.d.ts.map +1 -1
- package/dist/lexicons.mjs +130 -39
- package/dist/lexicons.mjs.map +1 -1
- package/dist/types/app/bsky/richtext/facet.d.ts +8 -0
- package/dist/types/app/bsky/richtext/facet.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/activity.d.ts +25 -11
- package/dist/types/org/hypercerts/claim/activity.d.ts.map +1 -1
- package/dist/types/org/hypercerts/claim/collection.d.ts +18 -2
- package/dist/types/org/hypercerts/claim/collection.d.ts.map +1 -1
- package/dist/types/org/hypercerts/claim/contributionDetails.d.ts +22 -0
- package/dist/types/org/hypercerts/claim/contributionDetails.d.ts.map +1 -0
- package/dist/types/org/hypercerts/claim/{contributor.d.ts → contributorInformation.d.ts} +3 -11
- package/dist/types/org/hypercerts/claim/contributorInformation.d.ts.map +1 -0
- package/lexicons/org/hypercerts/claim/activity.json +44 -13
- package/lexicons/org/hypercerts/claim/collection.json +33 -2
- package/lexicons/org/hypercerts/claim/{contributor.json → contributionDetails.json} +5 -22
- package/lexicons/org/hypercerts/claim/contributorInformation.json +39 -0
- package/package.json +5 -2
- package/dist/generated/types/org/hypercerts/claim/contributor.d.ts.map +0 -1
- package/dist/types/org/hypercerts/claim/contributor.d.ts.map +0 -1
|
@@ -3,16 +3,21 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { type ValidationResult } from '@atproto/lexicon';
|
|
5
5
|
import { type $Typed } from '../../../../util';
|
|
6
|
+
import type * as AppBskyRichtextFacet from '../../../app/bsky/richtext/facet.js';
|
|
6
7
|
import type * as OrgHypercertsDefs from '../defs.js';
|
|
7
8
|
import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js';
|
|
8
9
|
export interface Main {
|
|
9
10
|
$type: 'org.hypercerts.claim.activity';
|
|
10
11
|
/** Title of the hypercert. */
|
|
11
12
|
title: string;
|
|
12
|
-
/** Short
|
|
13
|
+
/** Short summary of this activity claim, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`. */
|
|
13
14
|
shortDescription: string;
|
|
14
|
-
/**
|
|
15
|
+
/** Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc). */
|
|
16
|
+
shortDescriptionFacets?: AppBskyRichtextFacet.Main[];
|
|
17
|
+
/** Optional longer description of this activity claim, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`. */
|
|
15
18
|
description?: string;
|
|
19
|
+
/** Rich text annotations for `description` (mentions, URLs, hashtags, etc). */
|
|
20
|
+
descriptionFacets?: AppBskyRichtextFacet.Main[];
|
|
16
21
|
image?: $Typed<OrgHypercertsDefs.Uri> | $Typed<OrgHypercertsDefs.SmallImage> | {
|
|
17
22
|
$type: string;
|
|
18
23
|
};
|
|
@@ -21,8 +26,8 @@ export interface Main {
|
|
|
21
26
|
startDate?: string;
|
|
22
27
|
/** When the work ended */
|
|
23
28
|
endDate?: string;
|
|
24
|
-
/**
|
|
25
|
-
|
|
29
|
+
/** An array of contributor objects, each containing contributor information, weight, and contribution details. */
|
|
30
|
+
contributors?: Contributor[];
|
|
26
31
|
rights?: ComAtprotoRepoStrongRef.Main;
|
|
27
32
|
/** An array of strong references to the location where activity was performed. The record referenced must conform with the lexicon app.certified.location. */
|
|
28
33
|
locations?: ComAtprotoRepoStrongRef.Main[];
|
|
@@ -33,12 +38,21 @@ export interface Main {
|
|
|
33
38
|
export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.claim.activity", "main">;
|
|
34
39
|
export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
|
|
35
40
|
export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
|
|
36
|
-
export interface
|
|
37
|
-
$type?: 'org.hypercerts.claim.activity#
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
export interface Contributor {
|
|
42
|
+
$type?: 'org.hypercerts.claim.activity#contributor';
|
|
43
|
+
contributorIdentity: $Typed<ContributorIdentity> | $Typed<ComAtprotoRepoStrongRef.Main> | {
|
|
44
|
+
$type: string;
|
|
45
|
+
};
|
|
46
|
+
/** The relative weight/importance of this contribution (stored as a string to avoid float precision issues). Must be a positive numeric value. Weights do not need to sum to a specific total; normalization can be performed by the consuming application as needed. */
|
|
47
|
+
contributionWeight?: string;
|
|
48
|
+
contributionDetails?: $Typed<ContributorRole> | $Typed<ComAtprotoRepoStrongRef.Main> | {
|
|
49
|
+
$type: string;
|
|
50
|
+
};
|
|
41
51
|
}
|
|
42
|
-
export declare function
|
|
43
|
-
export declare function
|
|
52
|
+
export declare function isContributor<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.claim.activity", "contributor">;
|
|
53
|
+
export declare function validateContributor<V>(v: V): ValidationResult<Contributor & V>;
|
|
54
|
+
/** Contributor information as a string (DID or identifier). */
|
|
55
|
+
export type ContributorIdentity = string;
|
|
56
|
+
/** Contribution details as a string. */
|
|
57
|
+
export type ContributorRole = string;
|
|
44
58
|
//# sourceMappingURL=activity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/claim/activity.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,KAAK,iBAAiB,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,KAAK,uBAAuB,MAAM,wCAAwC,CAAA;AAMtF,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,+BAA+B,CAAA;IACtC,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/claim/activity.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,KAAK,oBAAoB,MAAM,qCAAqC,CAAA;AAChF,OAAO,KAAK,KAAK,iBAAiB,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,KAAK,uBAAuB,MAAM,wCAAwC,CAAA;AAMtF,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,+BAA+B,CAAA;IAC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,CAAC,uBAAuB,CAAC,IAAI,CAAC,GACpC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACrB,yQAAyQ;IACzQ,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,mBAAmB,CAAC,EAChB,MAAM,CAAC,eAAe,CAAC,GACvB,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,GACpC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CACtB;AAID,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,mGAEpC;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,qCAE1C;AAED,+DAA+D;AAC/D,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAA;AACxC,wCAAwC;AACxC,MAAM,MAAM,eAAe,GAAG,MAAM,CAAA"}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* GENERATED CODE - DO NOT MODIFY
|
|
3
3
|
*/
|
|
4
4
|
import { type ValidationResult } from '@atproto/lexicon';
|
|
5
|
+
import { type $Typed } from '../../../../util';
|
|
5
6
|
import type * as PubLeafletPagesLinearDocument from '../../../pub/leaflet/pages/linearDocument.js';
|
|
7
|
+
import type * as OrgHypercertsDefs from '../defs.js';
|
|
6
8
|
import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js';
|
|
7
9
|
export interface Main {
|
|
8
10
|
$type: 'org.hypercerts.claim.collection';
|
|
@@ -13,8 +15,14 @@ export interface Main {
|
|
|
13
15
|
/** Short summary of this collection, suitable for previews and list views */
|
|
14
16
|
shortDescription?: string;
|
|
15
17
|
description?: PubLeafletPagesLinearDocument.Main;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
avatar?: $Typed<OrgHypercertsDefs.Uri> | $Typed<OrgHypercertsDefs.SmallImage> | {
|
|
19
|
+
$type: string;
|
|
20
|
+
};
|
|
21
|
+
banner?: $Typed<OrgHypercertsDefs.Uri> | $Typed<OrgHypercertsDefs.LargeImage> | {
|
|
22
|
+
$type: string;
|
|
23
|
+
};
|
|
24
|
+
/** Array of items in this collection with optional weights. */
|
|
25
|
+
items: Item[];
|
|
18
26
|
/** Client-declared timestamp when this record was originally created */
|
|
19
27
|
createdAt: string;
|
|
20
28
|
[k: string]: unknown;
|
|
@@ -22,4 +30,12 @@ export interface Main {
|
|
|
22
30
|
export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.claim.collection", "main">;
|
|
23
31
|
export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
|
|
24
32
|
export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
|
|
33
|
+
export interface Item {
|
|
34
|
+
$type?: 'org.hypercerts.claim.collection#item';
|
|
35
|
+
itemIdentifier: ComAtprotoRepoStrongRef.Main;
|
|
36
|
+
/** Optional weight for this item (positive numeric value stored as string). Weights do not need to sum to a specific total; normalization can be performed by the consuming application as needed. */
|
|
37
|
+
itemWeight?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function isItem<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.claim.collection", "item">;
|
|
40
|
+
export declare function validateItem<V>(v: V): ValidationResult<Item & V>;
|
|
25
41
|
//# sourceMappingURL=collection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/claim/collection.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/claim/collection.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,KAAK,6B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;CACpB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8FAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult } from '@atproto/lexicon';
|
|
5
|
+
export interface Main {
|
|
6
|
+
$type: 'org.hypercerts.claim.contributionDetails';
|
|
7
|
+
/** Role or title of the contributor. */
|
|
8
|
+
role?: string;
|
|
9
|
+
/** What the contribution concretely was. */
|
|
10
|
+
contributionDescription?: string;
|
|
11
|
+
/** When this contribution started. This should be a subset of the hypercert timeframe. */
|
|
12
|
+
startDate?: string;
|
|
13
|
+
/** When this contribution finished. This should be a subset of the hypercert timeframe. */
|
|
14
|
+
endDate?: string;
|
|
15
|
+
/** Client-declared timestamp when this record was originally created. */
|
|
16
|
+
createdAt: string;
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.claim.contributionDetails", "main">;
|
|
20
|
+
export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
|
|
21
|
+
export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
|
|
22
|
+
//# sourceMappingURL=contributionDetails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributionDetails.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/claim/contributionDetails.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAajE,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,0CAA0C,CAAA;IACjD,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,uGAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC;AAED,OAAO,EACL,KAAK,IAAI,IAAI,MAAM,EACnB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,cAAc,GAC/B,CAAA"}
|
|
@@ -5,7 +5,7 @@ import { type ValidationResult } from '@atproto/lexicon';
|
|
|
5
5
|
import { type $Typed } from '../../../../util';
|
|
6
6
|
import type * as OrgHypercertsDefs from '../defs.js';
|
|
7
7
|
export interface Main {
|
|
8
|
-
$type: 'org.hypercerts.claim.
|
|
8
|
+
$type: 'org.hypercerts.claim.contributorInformation';
|
|
9
9
|
/** DID or a URI to a social profile of the contributor. */
|
|
10
10
|
identifier?: string;
|
|
11
11
|
/** Display name of the contributor. */
|
|
@@ -13,19 +13,11 @@ export interface Main {
|
|
|
13
13
|
image?: $Typed<OrgHypercertsDefs.Uri> | $Typed<OrgHypercertsDefs.SmallImage> | {
|
|
14
14
|
$type: string;
|
|
15
15
|
};
|
|
16
|
-
/** Role or title of the contributor. */
|
|
17
|
-
role?: string;
|
|
18
|
-
/** What the contribution concretely achieved. */
|
|
19
|
-
contributionDescription?: string;
|
|
20
|
-
/** When this contribution started. This should be a subset of the hypercert timeframe. */
|
|
21
|
-
startDate?: string;
|
|
22
|
-
/** When this contribution finished. This should be a subset of the hypercert timeframe. */
|
|
23
|
-
endDate?: string;
|
|
24
16
|
/** Client-declared timestamp when this record was originally created. */
|
|
25
17
|
createdAt: string;
|
|
26
18
|
[k: string]: unknown;
|
|
27
19
|
}
|
|
28
|
-
export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.claim.
|
|
20
|
+
export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.claim.contributorInformation", "main">;
|
|
29
21
|
export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
|
|
30
22
|
export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
|
|
31
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=contributorInformation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributorInformation.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/claim/contributorInformation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,KAAK,iBAAiB,MAAM,YAAY,CAAA;AAMpD,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,6CAA6C,CAAA;IACpD,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EACF,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAC7B,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,GACpC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACrB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,0GAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC;AAED,OAAO,EACL,KAAK,IAAI,IAAI,MAAM,EACnB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,cAAc,GAC/B,CAAA"}
|
|
@@ -17,16 +17,32 @@
|
|
|
17
17
|
},
|
|
18
18
|
"shortDescription": {
|
|
19
19
|
"type": "string",
|
|
20
|
-
"description": "Short
|
|
20
|
+
"description": "Short summary of this activity claim, suitable for previews and list views. Rich text annotations may be provided via `shortDescriptionFacets`.",
|
|
21
21
|
"maxLength": 3000,
|
|
22
22
|
"maxGraphemes": 300
|
|
23
23
|
},
|
|
24
|
+
"shortDescriptionFacets": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"description": "Rich text annotations for `shortDescription` (mentions, URLs, hashtags, etc).",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "ref",
|
|
29
|
+
"ref": "app.bsky.richtext.facet"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
24
32
|
"description": {
|
|
25
33
|
"type": "string",
|
|
26
|
-
"description": "Optional longer description of
|
|
34
|
+
"description": "Optional longer description of this activity claim, including context or interpretation. Rich text annotations may be provided via `descriptionFacets`.",
|
|
27
35
|
"maxLength": 30000,
|
|
28
36
|
"maxGraphemes": 3000
|
|
29
37
|
},
|
|
38
|
+
"descriptionFacets": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"description": "Rich text annotations for `description` (mentions, URLs, hashtags, etc).",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "ref",
|
|
43
|
+
"ref": "app.bsky.richtext.facet"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
30
46
|
"image": {
|
|
31
47
|
"type": "union",
|
|
32
48
|
"refs": [
|
|
@@ -50,12 +66,12 @@
|
|
|
50
66
|
"format": "datetime",
|
|
51
67
|
"description": "When the work ended"
|
|
52
68
|
},
|
|
53
|
-
"
|
|
69
|
+
"contributors": {
|
|
54
70
|
"type": "array",
|
|
55
|
-
"description": "
|
|
71
|
+
"description": "An array of contributor objects, each containing contributor information, weight, and contribution details.",
|
|
56
72
|
"items": {
|
|
57
73
|
"type": "ref",
|
|
58
|
-
"ref": "
|
|
74
|
+
"ref": "#contributor"
|
|
59
75
|
}
|
|
60
76
|
},
|
|
61
77
|
"rights": {
|
|
@@ -79,20 +95,35 @@
|
|
|
79
95
|
}
|
|
80
96
|
}
|
|
81
97
|
},
|
|
82
|
-
"
|
|
98
|
+
"contributor": {
|
|
83
99
|
"type": "object",
|
|
84
|
-
"required": ["
|
|
100
|
+
"required": ["contributorIdentity"],
|
|
85
101
|
"properties": {
|
|
86
|
-
"
|
|
87
|
-
"type": "
|
|
88
|
-
"
|
|
89
|
-
"description": "
|
|
102
|
+
"contributorIdentity": {
|
|
103
|
+
"type": "union",
|
|
104
|
+
"refs": ["#contributorIdentity", "com.atproto.repo.strongRef"],
|
|
105
|
+
"description": "Contributor identity as a string (DID or identifier) via org.hypercerts.claim.activity#contributorIdentity, or a strong reference to a contributor information record."
|
|
90
106
|
},
|
|
91
|
-
"
|
|
107
|
+
"contributionWeight": {
|
|
92
108
|
"type": "string",
|
|
93
|
-
"description": "The relative weight/importance of this
|
|
109
|
+
"description": "The relative weight/importance of this contribution (stored as a string to avoid float precision issues). Must be a positive numeric value. Weights do not need to sum to a specific total; normalization can be performed by the consuming application as needed."
|
|
110
|
+
},
|
|
111
|
+
"contributionDetails": {
|
|
112
|
+
"type": "union",
|
|
113
|
+
"refs": ["#contributorRole", "com.atproto.repo.strongRef"],
|
|
114
|
+
"description": "Contribution details as a string via org.hypercerts.claim.activity#contributorRole, or a strong reference to a contribution details record."
|
|
94
115
|
}
|
|
95
116
|
}
|
|
117
|
+
},
|
|
118
|
+
"contributorIdentity": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Contributor information as a string (DID or identifier)."
|
|
121
|
+
},
|
|
122
|
+
"contributorRole": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "Contribution details as a string.",
|
|
125
|
+
"maxLength": 10000,
|
|
126
|
+
"maxGraphemes": 1000
|
|
96
127
|
}
|
|
97
128
|
}
|
|
98
129
|
}
|
|
@@ -31,12 +31,28 @@
|
|
|
31
31
|
"ref": "pub.leaflet.pages.linearDocument#main",
|
|
32
32
|
"description": "Rich-text description, represented as a Leaflet linear document."
|
|
33
33
|
},
|
|
34
|
+
"avatar": {
|
|
35
|
+
"type": "union",
|
|
36
|
+
"refs": [
|
|
37
|
+
"org.hypercerts.defs#uri",
|
|
38
|
+
"org.hypercerts.defs#smallImage"
|
|
39
|
+
],
|
|
40
|
+
"description": "The collection's avatar/profile image as a URI or image blob."
|
|
41
|
+
},
|
|
42
|
+
"banner": {
|
|
43
|
+
"type": "union",
|
|
44
|
+
"refs": [
|
|
45
|
+
"org.hypercerts.defs#uri",
|
|
46
|
+
"org.hypercerts.defs#largeImage"
|
|
47
|
+
],
|
|
48
|
+
"description": "Larger horizontal image to display behind the collection view."
|
|
49
|
+
},
|
|
34
50
|
"items": {
|
|
35
51
|
"type": "array",
|
|
36
|
-
"description": "Array of
|
|
52
|
+
"description": "Array of items in this collection with optional weights.",
|
|
37
53
|
"items": {
|
|
38
54
|
"type": "ref",
|
|
39
|
-
"ref": "
|
|
55
|
+
"ref": "#item"
|
|
40
56
|
}
|
|
41
57
|
},
|
|
42
58
|
"createdAt": {
|
|
@@ -46,6 +62,21 @@
|
|
|
46
62
|
}
|
|
47
63
|
}
|
|
48
64
|
}
|
|
65
|
+
},
|
|
66
|
+
"item": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["itemIdentifier"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"itemIdentifier": {
|
|
71
|
+
"type": "ref",
|
|
72
|
+
"ref": "com.atproto.repo.strongRef",
|
|
73
|
+
"description": "Strong reference to an item in this collection. Items can be activities (org.hypercerts.claim.activity) and/or other collections (org.hypercerts.claim.collection)."
|
|
74
|
+
},
|
|
75
|
+
"itemWeight": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "Optional weight for this item (positive numeric value stored as string). Weights do not need to sum to a specific total; normalization can be performed by the consuming application as needed."
|
|
78
|
+
}
|
|
79
|
+
}
|
|
49
80
|
}
|
|
50
81
|
}
|
|
51
82
|
}
|
|
@@ -1,32 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"lexicon": 1,
|
|
3
|
-
"id": "org.hypercerts.claim.
|
|
3
|
+
"id": "org.hypercerts.claim.contributionDetails",
|
|
4
4
|
"defs": {
|
|
5
5
|
"main": {
|
|
6
6
|
"type": "record",
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Details about a specific contribution including role, description, and timeframe.",
|
|
8
8
|
"key": "tid",
|
|
9
9
|
"record": {
|
|
10
10
|
"type": "object",
|
|
11
11
|
"required": ["createdAt"],
|
|
12
12
|
"properties": {
|
|
13
|
-
"identifier": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"description": "DID or a URI to a social profile of the contributor."
|
|
16
|
-
},
|
|
17
|
-
"displayName": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "Display name of the contributor.",
|
|
20
|
-
"maxLength": 100
|
|
21
|
-
},
|
|
22
|
-
"image": {
|
|
23
|
-
"type": "union",
|
|
24
|
-
"refs": [
|
|
25
|
-
"org.hypercerts.defs#uri",
|
|
26
|
-
"org.hypercerts.defs#smallImage"
|
|
27
|
-
],
|
|
28
|
-
"description": "The contributor visual representation as a URI or image blob."
|
|
29
|
-
},
|
|
30
13
|
"role": {
|
|
31
14
|
"type": "string",
|
|
32
15
|
"description": "Role or title of the contributor.",
|
|
@@ -34,9 +17,9 @@
|
|
|
34
17
|
},
|
|
35
18
|
"contributionDescription": {
|
|
36
19
|
"type": "string",
|
|
37
|
-
"description": "What the contribution concretely
|
|
38
|
-
"maxLength":
|
|
39
|
-
"maxGraphemes":
|
|
20
|
+
"description": "What the contribution concretely was.",
|
|
21
|
+
"maxLength": 10000,
|
|
22
|
+
"maxGraphemes": 1000
|
|
40
23
|
},
|
|
41
24
|
"startDate": {
|
|
42
25
|
"type": "string",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "org.hypercerts.claim.contributorInformation",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "record",
|
|
7
|
+
"description": "Contributor information including identifier, display name, and image.",
|
|
8
|
+
"key": "tid",
|
|
9
|
+
"record": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["createdAt"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"identifier": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "DID or a URI to a social profile of the contributor."
|
|
16
|
+
},
|
|
17
|
+
"displayName": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Display name of the contributor.",
|
|
20
|
+
"maxLength": 100
|
|
21
|
+
},
|
|
22
|
+
"image": {
|
|
23
|
+
"type": "union",
|
|
24
|
+
"refs": [
|
|
25
|
+
"org.hypercerts.defs#uri",
|
|
26
|
+
"org.hypercerts.defs#smallImage"
|
|
27
|
+
],
|
|
28
|
+
"description": "The contributor visual representation as a URI or image blob."
|
|
29
|
+
},
|
|
30
|
+
"createdAt": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"format": "datetime",
|
|
33
|
+
"description": "Client-declared timestamp when this record was originally created."
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypercerts-org/lexicon",
|
|
3
|
-
"version": "0.10.0-beta.
|
|
3
|
+
"version": "0.10.0-beta.7",
|
|
4
4
|
"description": "ATProto lexicon definitions and TypeScript types for the Hypercerts protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"list": "find ./lexicons -name '*.json'",
|
|
42
|
-
"check": "npm run gen-
|
|
42
|
+
"check": "npm run gen-api && npm run lint && npm run typecheck && npm run build && npm run test",
|
|
43
43
|
"build": "rollup -c && npm run build:types",
|
|
44
44
|
"build:types": "tsc --project tsconfig.build.json",
|
|
45
45
|
"gen-api": "find ./lexicons -name '*.json' | xargs lex gen-api --yes ./generated && ./scripts/create-shims.sh && npm run gen-index",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"eslint": "eslint generated/exports.ts",
|
|
58
58
|
"typecheck": "tsc --noEmit",
|
|
59
59
|
"clean": "rm -rf dist generated",
|
|
60
|
+
"style:check": "node ./scripts/check-lexicon-style.js",
|
|
60
61
|
"prepublishOnly": "npm run check",
|
|
61
62
|
"changeset": "changeset",
|
|
62
63
|
"version-packages": "changeset version && npm install --package-lock-only",
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"prepare": "husky && ./scripts/setup-merge-driver.sh"
|
|
65
66
|
},
|
|
66
67
|
"dependencies": {
|
|
68
|
+
"@atcute/bluesky": "^3.2.15",
|
|
67
69
|
"@atcute/leaflet": "^1.0.15",
|
|
68
70
|
"@atproto/lexicon": "^0.6.0",
|
|
69
71
|
"multiformats": "^13.3.6"
|
|
@@ -83,6 +85,7 @@
|
|
|
83
85
|
"husky": "^9.1.7",
|
|
84
86
|
"prettier": "^3.2.5",
|
|
85
87
|
"rollup": "^4.53.3",
|
|
88
|
+
"string-width": "^8.1.0",
|
|
86
89
|
"tslib": "^2.8.1",
|
|
87
90
|
"typescript": "^5.7.2",
|
|
88
91
|
"typescript-eslint": "^8.51.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contributor.d.ts","sourceRoot":"","sources":["../../../../../../generated/types/org/hypercerts/claim/contributor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,KAAK,iBAAiB,MAAM,YAAY,CAAA;AAMpD,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,kCAAkC,CAAA;IACzC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EACF,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAC7B,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,GACpC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACrB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,+FAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC;AAED,OAAO,EACL,KAAK,IAAI,IAAI,MAAM,EACnB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,cAAc,GAC/B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contributor.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/claim/contributor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,KAAK,iBAAiB,MAAM,YAAY,CAAA;AAMpD,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,kCAAkC,CAAA;IACzC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EACF,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAC7B,MAAM,CAAC,iBAAiB,CAAC,UAAU,CAAC,GACpC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACrB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,+FAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC;AAED,OAAO,EACL,KAAK,IAAI,IAAI,MAAM,EACnB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,cAAc,GAC/B,CAAA"}
|