@hypercerts-org/lexicon 0.8.0-beta.0 → 0.10.0-beta.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.
Files changed (45) hide show
  1. package/README.md +249 -180
  2. package/README.md.orig +267 -0
  3. package/lexicons/app/certified/badge/award.json +36 -0
  4. package/lexicons/app/certified/badge/definition.json +53 -0
  5. package/lexicons/app/certified/badge/response.json +36 -0
  6. package/lexicons/app/certified/defs.json +4 -16
  7. package/lexicons/app/certified/location.json +5 -8
  8. package/lexicons/com/atproto/repo/strongRef.json +1 -1
  9. package/lexicons/org/hypercerts/claim/activity.json +135 -0
  10. package/lexicons/org/hypercerts/claim/collection.json +54 -0
  11. package/lexicons/org/hypercerts/claim/contribution.json +4 -11
  12. package/lexicons/org/hypercerts/claim/evaluation.json +50 -9
  13. package/lexicons/org/hypercerts/claim/evidence.json +29 -16
  14. package/lexicons/org/hypercerts/claim/measurement.json +18 -8
  15. package/lexicons/org/hypercerts/claim/project.json +64 -0
  16. package/lexicons/org/hypercerts/claim/rights.json +16 -3
  17. package/lexicons/org/hypercerts/defs.json +71 -0
  18. package/lexicons/org/hypercerts/funding/receipt.json +66 -0
  19. package/package.json +31 -38
  20. package/types/index.ts +1257 -0
  21. package/types/lexicons.ts +1071 -0
  22. package/types/types/app/certified/badge/award.ts +48 -0
  23. package/types/types/app/certified/badge/definition.ts +49 -0
  24. package/types/types/app/certified/badge/response.ts +44 -0
  25. package/types/types/app/certified/defs.ts +14 -0
  26. package/types/types/app/certified/location.ts +49 -0
  27. package/types/types/com/atproto/repo/strongRef.ts +31 -0
  28. package/types/types/org/hypercerts/claim/activity.ts +99 -0
  29. package/types/types/org/hypercerts/claim/collection.ts +49 -0
  30. package/types/types/org/hypercerts/claim/contribution.ts +48 -0
  31. package/types/types/org/hypercerts/claim/evaluation.ts +77 -0
  32. package/types/types/org/hypercerts/claim/evidence.ts +53 -0
  33. package/types/types/org/hypercerts/claim/measurement.ts +54 -0
  34. package/types/types/org/hypercerts/claim/project.ts +53 -0
  35. package/types/types/org/hypercerts/claim/rights.ts +49 -0
  36. package/types/types/org/hypercerts/defs.ts +96 -0
  37. package/types/types/org/hypercerts/funding/receipt.ts +58 -0
  38. package/types/util.ts +82 -0
  39. package/dist/index.cjs +0 -1472
  40. package/dist/index.cjs.map +0 -1
  41. package/dist/index.d.ts +0 -2094
  42. package/dist/index.mjs +0 -1441
  43. package/dist/index.mjs.map +0 -1
  44. package/lexicons/org/hypercerts/claim.json +0 -95
  45. package/lexicons/org/hypercerts/collection.json +0 -62
@@ -0,0 +1,48 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as AppCertifiedBadgeDefinition from './definition.js'
13
+ import type * as AppCertifiedDefs from '../defs.js'
14
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
15
+
16
+ const is$typed = _is$typed,
17
+ validate = _validate
18
+ const id = 'app.certified.badge.award'
19
+
20
+ export interface Main {
21
+ $type: 'app.certified.badge.award'
22
+ badge: AppCertifiedBadgeDefinition.Main
23
+ subject:
24
+ | $Typed<AppCertifiedDefs.Did>
25
+ | $Typed<ComAtprotoRepoStrongRef.Main>
26
+ | { $type: string }
27
+ /** Optional statement explaining the reason for this badge award. */
28
+ note?: string
29
+ /** Client-declared timestamp when this record was originally created */
30
+ createdAt: string
31
+ [k: string]: unknown
32
+ }
33
+
34
+ const hashMain = 'main'
35
+
36
+ export function isMain<V>(v: V) {
37
+ return is$typed(v, id, hashMain)
38
+ }
39
+
40
+ export function validateMain<V>(v: V) {
41
+ return validate<Main & V>(v, id, hashMain, true)
42
+ }
43
+
44
+ export {
45
+ type Main as Record,
46
+ isMain as isRecord,
47
+ validateMain as validateRecord,
48
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as AppCertifiedDefs from '../defs.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'app.certified.badge.definition'
17
+
18
+ export interface Main {
19
+ $type: 'app.certified.badge.definition'
20
+ /** Category of the badge (e.g. endorsement, participation, affiliation). */
21
+ badgeType: string
22
+ /** Human-readable title of the badge. */
23
+ title: string
24
+ /** Icon representing the badge, stored as a blob for compact visual display. */
25
+ icon: BlobRef
26
+ /** Optional short statement describing what the badge represents. */
27
+ description?: string
28
+ /** Optional allowlist of DIDs allowed to issue this badge. If omitted, anyone may issue it. */
29
+ allowedIssuers?: AppCertifiedDefs.Did[]
30
+ /** Client-declared timestamp when this record was originally created */
31
+ createdAt: string
32
+ [k: string]: unknown
33
+ }
34
+
35
+ const hashMain = 'main'
36
+
37
+ export function isMain<V>(v: V) {
38
+ return is$typed(v, id, hashMain)
39
+ }
40
+
41
+ export function validateMain<V>(v: V) {
42
+ return validate<Main & V>(v, id, hashMain, true)
43
+ }
44
+
45
+ export {
46
+ type Main as Record,
47
+ isMain as isRecord,
48
+ validateMain as validateRecord,
49
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as AppCertifiedBadgeAward from './award.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'app.certified.badge.response'
17
+
18
+ export interface Main {
19
+ $type: 'app.certified.badge.response'
20
+ badgeAward: AppCertifiedBadgeAward.Main
21
+ /** The recipient’s response for the badge (accepted or rejected). */
22
+ response: 'accepted' | 'rejected'
23
+ /** Optional relative weight for accepted badges, assigned by the recipient. */
24
+ weight?: string
25
+ /** Client-declared timestamp when this record was originally created */
26
+ createdAt: string
27
+ [k: string]: unknown
28
+ }
29
+
30
+ const hashMain = 'main'
31
+
32
+ export function isMain<V>(v: V) {
33
+ return is$typed(v, id, hashMain)
34
+ }
35
+
36
+ export function validateMain<V>(v: V) {
37
+ return validate<Main & V>(v, id, hashMain, true)
38
+ }
39
+
40
+ export {
41
+ type Main as Record,
42
+ isMain as isRecord,
43
+ validateMain as validateRecord,
44
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../lexicons'
7
+ import { type $Typed, is$typed as _is$typed, type OmitKey } from '../../../util'
8
+
9
+ const is$typed = _is$typed,
10
+ validate = _validate
11
+ const id = 'app.certified.defs'
12
+
13
+ /** A Decentralized Identifier (DID) string. */
14
+ export type Did = string
@@ -0,0 +1,49 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../lexicons'
7
+ import { type $Typed, is$typed as _is$typed, type OmitKey } from '../../../util'
8
+ import type * as OrgHypercertsDefs from '../../org/hypercerts/defs.js'
9
+
10
+ const is$typed = _is$typed,
11
+ validate = _validate
12
+ const id = 'app.certified.location'
13
+
14
+ export interface Main {
15
+ $type: 'app.certified.location'
16
+ /** The version of the Location Protocol */
17
+ lpVersion: string
18
+ /** The Spatial Reference System URI (e.g., http://www.opengis.net/def/crs/OGC/1.3/CRS84) that defines the coordinate system. */
19
+ srs: string
20
+ /** An identifier for the format of the location data (e.g., coordinate-decimal, geojson-point) */
21
+ locationType: 'coordinate-decimal' | 'geojson-point' | (string & {})
22
+ location:
23
+ | $Typed<OrgHypercertsDefs.Uri>
24
+ | $Typed<OrgHypercertsDefs.SmallBlob>
25
+ | { $type: string }
26
+ /** Optional name for this location */
27
+ name?: string
28
+ /** Optional description for this location */
29
+ description?: string
30
+ /** Client-declared timestamp when this record was originally created */
31
+ createdAt: string
32
+ [k: string]: unknown
33
+ }
34
+
35
+ const hashMain = 'main'
36
+
37
+ export function isMain<V>(v: V) {
38
+ return is$typed(v, id, hashMain)
39
+ }
40
+
41
+ export function validateMain<V>(v: V) {
42
+ return validate<Main & V>(v, id, hashMain, true)
43
+ }
44
+
45
+ export {
46
+ type Main as Record,
47
+ isMain as isRecord,
48
+ validateMain as validateRecord,
49
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'com.atproto.repo.strongRef'
16
+
17
+ export interface Main {
18
+ $type?: 'com.atproto.repo.strongRef'
19
+ uri: string
20
+ cid: string
21
+ }
22
+
23
+ const hashMain = 'main'
24
+
25
+ export function isMain<V>(v: V) {
26
+ return is$typed(v, id, hashMain)
27
+ }
28
+
29
+ export function validateMain<V>(v: V) {
30
+ return validate<Main & V>(v, id, hashMain)
31
+ }
@@ -0,0 +1,99 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as OrgHypercertsDefs from '../defs.js'
13
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'org.hypercerts.claim.activity'
18
+
19
+ export interface Main {
20
+ $type: 'org.hypercerts.claim.activity'
21
+ /** Title of the hypercert. */
22
+ title: string
23
+ /** Short blurb of the impact work done. */
24
+ shortDescription: string
25
+ /** Optional longer description of the impact work done. */
26
+ description?: string
27
+ image?:
28
+ | $Typed<OrgHypercertsDefs.Uri>
29
+ | $Typed<OrgHypercertsDefs.SmallImage>
30
+ | { $type: string }
31
+ workScope?: WorkScope
32
+ /** When the work began */
33
+ startDate: string
34
+ /** When the work ended */
35
+ endDate: string
36
+ /** A strong reference to the contributions done to create the impact in the hypercerts. The record referenced must conform with the lexicon org.hypercerts.claim.contribution. */
37
+ contributions?: ComAtprotoRepoStrongRef.Main[]
38
+ rights?: ComAtprotoRepoStrongRef.Main
39
+ location?: ComAtprotoRepoStrongRef.Main
40
+ /** A reference (AT-URI) to the project record that this activity is part of. The record referenced must conform with the lexicon org.hypercerts.claim.project. This activity must also be referenced by the project, establishing a bidirectional link. */
41
+ project?: string
42
+ /** Client-declared timestamp when this record was originally created */
43
+ createdAt: string
44
+ [k: string]: unknown
45
+ }
46
+
47
+ const hashMain = 'main'
48
+
49
+ export function isMain<V>(v: V) {
50
+ return is$typed(v, id, hashMain)
51
+ }
52
+
53
+ export function validateMain<V>(v: V) {
54
+ return validate<Main & V>(v, id, hashMain, true)
55
+ }
56
+
57
+ export {
58
+ type Main as Record,
59
+ isMain as isRecord,
60
+ validateMain as validateRecord,
61
+ }
62
+
63
+ /** Logical scope of the work using label-based conditions. All labels in `withinAllOf` must apply; at least one label in `withinAnyOf` must apply if provided; no label in `withinNoneOf` may apply. */
64
+ export interface WorkScope {
65
+ $type?: 'org.hypercerts.claim.activity#workScope'
66
+ /** Labels that MUST all hold for the scope to apply. */
67
+ withinAllOf?: string[]
68
+ /** Labels of which AT LEAST ONE must hold (optional). If omitted or empty, imposes no additional condition. */
69
+ withinAnyOf?: string[]
70
+ /** Labels that MUST NOT hold for the scope to apply. */
71
+ withinNoneOf?: string[]
72
+ }
73
+
74
+ const hashWorkScope = 'workScope'
75
+
76
+ export function isWorkScope<V>(v: V) {
77
+ return is$typed(v, id, hashWorkScope)
78
+ }
79
+
80
+ export function validateWorkScope<V>(v: V) {
81
+ return validate<WorkScope & V>(v, id, hashWorkScope)
82
+ }
83
+
84
+ export interface ActivityWeight {
85
+ $type?: 'org.hypercerts.claim.activity#activityWeight'
86
+ activity: ComAtprotoRepoStrongRef.Main
87
+ /** The relative weight/importance of this hypercert activity (stored as a string to avoid float precision issues). Weights can be any positive numeric values and do not need to sum to a specific total; normalization can be performed by the consuming application as needed. */
88
+ weight: string
89
+ }
90
+
91
+ const hashActivityWeight = 'activityWeight'
92
+
93
+ export function isActivityWeight<V>(v: V) {
94
+ return is$typed(v, id, hashActivityWeight)
95
+ }
96
+
97
+ export function validateActivityWeight<V>(v: V) {
98
+ return validate<ActivityWeight & V>(v, id, hashActivityWeight)
99
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as OrgHypercertsClaimActivity from './activity.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'org.hypercerts.claim.collection'
17
+
18
+ export interface Main {
19
+ $type: 'org.hypercerts.claim.collection'
20
+ /** The title of this collection */
21
+ title: string
22
+ /** A short description of this collection */
23
+ shortDescription?: string
24
+ /** Primary avatar image representing this collection across apps and views; typically a square image. */
25
+ avatar?: BlobRef
26
+ /** The cover photo of this collection. */
27
+ coverPhoto?: BlobRef
28
+ /** Array of activities with their associated weights in this collection */
29
+ activities: OrgHypercertsClaimActivity.ActivityWeight[]
30
+ /** Client-declared timestamp when this record was originally created */
31
+ createdAt: string
32
+ [k: string]: unknown
33
+ }
34
+
35
+ const hashMain = 'main'
36
+
37
+ export function isMain<V>(v: V) {
38
+ return is$typed(v, id, hashMain)
39
+ }
40
+
41
+ export function validateMain<V>(v: V) {
42
+ return validate<Main & V>(v, id, hashMain, true)
43
+ }
44
+
45
+ export {
46
+ type Main as Record,
47
+ isMain as isRecord,
48
+ validateMain as validateRecord,
49
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'org.hypercerts.claim.contribution'
16
+
17
+ export interface Main {
18
+ $type: 'org.hypercerts.claim.contribution'
19
+ /** Role or title of the contributor(s). */
20
+ role?: string
21
+ /** List of the contributors (names, pseudonyms, or DIDs). If multiple contributors are stored in the same hypercertContribution, then they would have the exact same role. */
22
+ contributors: string[]
23
+ /** What the contribution concretely achieved */
24
+ description?: string
25
+ /** When this contribution started. This should be a subset of the hypercert timeframe. */
26
+ startDate?: string
27
+ /** When this contribution finished. This should be a subset of the hypercert timeframe. */
28
+ endDate?: string
29
+ /** Client-declared timestamp when this record was originally created */
30
+ createdAt: string
31
+ [k: string]: unknown
32
+ }
33
+
34
+ const hashMain = 'main'
35
+
36
+ export function isMain<V>(v: V) {
37
+ return is$typed(v, id, hashMain)
38
+ }
39
+
40
+ export function validateMain<V>(v: V) {
41
+ return validate<Main & V>(v, id, hashMain, true)
42
+ }
43
+
44
+ export {
45
+ type Main as Record,
46
+ isMain as isRecord,
47
+ validateMain as validateRecord,
48
+ }
@@ -0,0 +1,77 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
13
+ import type * as AppCertifiedDefs from '../../../app/certified/defs.js'
14
+ import type * as OrgHypercertsDefs from '../defs.js'
15
+
16
+ const is$typed = _is$typed,
17
+ validate = _validate
18
+ const id = 'org.hypercerts.claim.evaluation'
19
+
20
+ /** Overall score for an evaluation on a numeric scale. */
21
+ export interface Score {
22
+ $type?: 'org.hypercerts.claim.evaluation#score'
23
+ /** Minimum value of the scale, e.g. 0 or 1. */
24
+ min: number
25
+ /** Maximum value of the scale, e.g. 5 or 10. */
26
+ max: number
27
+ /** Score within the inclusive range [min, max]. */
28
+ value: number
29
+ }
30
+
31
+ const hashScore = 'score'
32
+
33
+ export function isScore<V>(v: V) {
34
+ return is$typed(v, id, hashScore)
35
+ }
36
+
37
+ export function validateScore<V>(v: V) {
38
+ return validate<Score & V>(v, id, hashScore)
39
+ }
40
+
41
+ export interface Main {
42
+ $type: 'org.hypercerts.claim.evaluation'
43
+ subject?: ComAtprotoRepoStrongRef.Main
44
+ /** DIDs of the evaluators */
45
+ evaluators: AppCertifiedDefs.Did[]
46
+ /** Evaluation data (URIs or blobs) containing detailed reports or methodology */
47
+ content?: (
48
+ | $Typed<OrgHypercertsDefs.Uri>
49
+ | $Typed<OrgHypercertsDefs.SmallBlob>
50
+ | { $type: string }
51
+ )[]
52
+ /** Optional references to the measurements that contributed to this evaluation. The record(s) referenced must conform with the lexicon org.hypercerts.claim.measurement */
53
+ measurements?: ComAtprotoRepoStrongRef.Main[]
54
+ /** Brief evaluation summary */
55
+ summary: string
56
+ score?: Score
57
+ location?: ComAtprotoRepoStrongRef.Main
58
+ /** Client-declared timestamp when this record was originally created */
59
+ createdAt: string
60
+ [k: string]: unknown
61
+ }
62
+
63
+ const hashMain = 'main'
64
+
65
+ export function isMain<V>(v: V) {
66
+ return is$typed(v, id, hashMain)
67
+ }
68
+
69
+ export function validateMain<V>(v: V) {
70
+ return validate<Main & V>(v, id, hashMain, true)
71
+ }
72
+
73
+ export {
74
+ type Main as Record,
75
+ isMain as isRecord,
76
+ validateMain as validateRecord,
77
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
13
+ import type * as OrgHypercertsDefs from '../defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'org.hypercerts.claim.evidence'
18
+
19
+ export interface Main {
20
+ $type: 'org.hypercerts.claim.evidence'
21
+ subject?: ComAtprotoRepoStrongRef.Main
22
+ content:
23
+ | $Typed<OrgHypercertsDefs.Uri>
24
+ | $Typed<OrgHypercertsDefs.SmallBlob>
25
+ | { $type: string }
26
+ /** Title to describe the nature of the evidence. */
27
+ title: string
28
+ /** Short description explaining what this evidence shows. */
29
+ shortDescription?: string
30
+ /** Longer description describing the evidence in more detail. */
31
+ description?: string
32
+ /** How this evidence relates to the subject. */
33
+ relationType?: 'supports' | 'challenges' | 'clarifies' | (string & {})
34
+ /** Client-declared timestamp when this record was originally created */
35
+ createdAt: string
36
+ [k: string]: unknown
37
+ }
38
+
39
+ const hashMain = 'main'
40
+
41
+ export function isMain<V>(v: V) {
42
+ return is$typed(v, id, hashMain)
43
+ }
44
+
45
+ export function validateMain<V>(v: V) {
46
+ return validate<Main & V>(v, id, hashMain, true)
47
+ }
48
+
49
+ export {
50
+ type Main as Record,
51
+ isMain as isRecord,
52
+ validateMain as validateRecord,
53
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
13
+ import type * as AppCertifiedDefs from '../../../app/certified/defs.js'
14
+
15
+ const is$typed = _is$typed,
16
+ validate = _validate
17
+ const id = 'org.hypercerts.claim.measurement'
18
+
19
+ export interface Main {
20
+ $type: 'org.hypercerts.claim.measurement'
21
+ subject?: ComAtprotoRepoStrongRef.Main
22
+ /** DIDs of the entity (or entities) that measured this data */
23
+ measurers: AppCertifiedDefs.Did[]
24
+ /** The metric being measured */
25
+ metric: string
26
+ /** The measured value */
27
+ value: string
28
+ /** Short identifier for the measurement methodology */
29
+ methodType?: string
30
+ /** URI to methodology documentation, standard protocol, or measurement procedure */
31
+ methodURI?: string
32
+ /** URIs to related evidence or underlying data (e.g. org.hypercerts.claim.evidence records or raw datasets) */
33
+ evidenceURI?: string[]
34
+ location?: ComAtprotoRepoStrongRef.Main
35
+ /** Client-declared timestamp when this record was originally created */
36
+ createdAt: string
37
+ [k: string]: unknown
38
+ }
39
+
40
+ const hashMain = 'main'
41
+
42
+ export function isMain<V>(v: V) {
43
+ return is$typed(v, id, hashMain)
44
+ }
45
+
46
+ export function validateMain<V>(v: V) {
47
+ return validate<Main & V>(v, id, hashMain, true)
48
+ }
49
+
50
+ export {
51
+ type Main as Record,
52
+ isMain as isRecord,
53
+ validateMain as validateRecord,
54
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as PubLeafletPagesLinearDocument from '../../../pub/leaflet/pages/linearDocument.js'
13
+ import type * as OrgHypercertsClaimActivity from './activity.js'
14
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
15
+
16
+ const is$typed = _is$typed,
17
+ validate = _validate
18
+ const id = 'org.hypercerts.claim.project'
19
+
20
+ export interface Main {
21
+ $type: 'org.hypercerts.claim.project'
22
+ /** Title of this project */
23
+ title: string
24
+ /** Short summary of this project, suitable for previews and list views. */
25
+ shortDescription: string
26
+ description?: PubLeafletPagesLinearDocument.Main
27
+ /** Primary avatar image representing this project across apps and views; typically a square logo or project identity image. */
28
+ avatar?: BlobRef
29
+ /** The cover photo of this project. */
30
+ coverPhoto?: BlobRef
31
+ /** Array of activities with their associated weights in this project */
32
+ activities?: OrgHypercertsClaimActivity.ActivityWeight[]
33
+ location?: ComAtprotoRepoStrongRef.Main
34
+ /** Client-declared timestamp when this record was originally created */
35
+ createdAt: string
36
+ [k: string]: unknown
37
+ }
38
+
39
+ const hashMain = 'main'
40
+
41
+ export function isMain<V>(v: V) {
42
+ return is$typed(v, id, hashMain)
43
+ }
44
+
45
+ export function validateMain<V>(v: V) {
46
+ return validate<Main & V>(v, id, hashMain, true)
47
+ }
48
+
49
+ export {
50
+ type Main as Record,
51
+ isMain as isRecord,
52
+ validateMain as validateRecord,
53
+ }