@hypercerts-org/lexicon 0.9.0-beta.0 → 0.10.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.
Files changed (109) hide show
  1. package/README.md +346 -164
  2. package/dist/exports.d.ts +1018 -0
  3. package/dist/exports.d.ts.map +1 -0
  4. package/dist/generated/exports.d.ts +1018 -0
  5. package/dist/generated/exports.d.ts.map +1 -0
  6. package/dist/generated/lexicons.d.ts +1805 -0
  7. package/dist/generated/lexicons.d.ts.map +1 -0
  8. package/dist/generated/types/app/certified/badge/award.d.ts +24 -0
  9. package/dist/generated/types/app/certified/badge/award.d.ts.map +1 -0
  10. package/dist/generated/types/app/certified/badge/definition.d.ts +25 -0
  11. package/dist/generated/types/app/certified/badge/definition.d.ts.map +1 -0
  12. package/dist/generated/types/app/certified/badge/response.d.ts +20 -0
  13. package/dist/generated/types/app/certified/badge/response.d.ts.map +1 -0
  14. package/dist/generated/types/app/certified/defs.d.ts +3 -0
  15. package/dist/generated/types/app/certified/defs.d.ts.map +1 -0
  16. package/dist/generated/types/app/certified/location.d.ts +29 -0
  17. package/dist/generated/types/app/certified/location.d.ts.map +1 -0
  18. package/dist/generated/types/com/atproto/repo/strongRef.d.ts +12 -0
  19. package/dist/generated/types/com/atproto/repo/strongRef.d.ts.map +1 -0
  20. package/dist/generated/types/org/hypercerts/claim/activity.d.ts +57 -0
  21. package/dist/generated/types/org/hypercerts/claim/activity.d.ts.map +1 -0
  22. package/dist/generated/types/org/hypercerts/claim/collection.d.ts +25 -0
  23. package/dist/generated/types/org/hypercerts/claim/collection.d.ts.map +1 -0
  24. package/dist/generated/types/org/hypercerts/claim/contribution.d.ts +24 -0
  25. package/dist/generated/types/org/hypercerts/claim/contribution.d.ts.map +1 -0
  26. package/dist/generated/types/org/hypercerts/claim/evaluation.d.ts +43 -0
  27. package/dist/generated/types/org/hypercerts/claim/evaluation.d.ts.map +1 -0
  28. package/dist/generated/types/org/hypercerts/claim/evidence.d.ts +29 -0
  29. package/dist/generated/types/org/hypercerts/claim/evidence.d.ts.map +1 -0
  30. package/dist/generated/types/org/hypercerts/claim/measurement.d.ts +30 -0
  31. package/dist/generated/types/org/hypercerts/claim/measurement.d.ts.map +1 -0
  32. package/dist/generated/types/org/hypercerts/claim/project.d.ts +29 -0
  33. package/dist/generated/types/org/hypercerts/claim/project.d.ts.map +1 -0
  34. package/dist/generated/types/org/hypercerts/claim/rights.d.ts +25 -0
  35. package/dist/generated/types/org/hypercerts/claim/rights.d.ts.map +1 -0
  36. package/dist/generated/types/org/hypercerts/defs.d.ts +45 -0
  37. package/dist/generated/types/org/hypercerts/defs.d.ts.map +1 -0
  38. package/dist/generated/types/org/hypercerts/funding/receipt.d.ts +34 -0
  39. package/dist/generated/types/org/hypercerts/funding/receipt.d.ts.map +1 -0
  40. package/dist/generated/types/pub/leaflet/pages/linearDocument.d.ts +2 -0
  41. package/dist/generated/types/pub/leaflet/pages/linearDocument.d.ts.map +1 -0
  42. package/dist/generated/util.d.ts +37 -0
  43. package/dist/generated/util.d.ts.map +1 -0
  44. package/dist/index.cjs +2119 -955
  45. package/dist/index.cjs.map +1 -1
  46. package/dist/index.mjs +2054 -935
  47. package/dist/index.mjs.map +1 -1
  48. package/dist/lexicons.cjs +1002 -0
  49. package/dist/lexicons.cjs.map +1 -0
  50. package/dist/lexicons.d.ts +1805 -0
  51. package/dist/lexicons.d.ts.map +1 -0
  52. package/dist/lexicons.mjs +996 -0
  53. package/dist/lexicons.mjs.map +1 -0
  54. package/dist/types/app/certified/badge/award.d.ts +24 -0
  55. package/dist/types/app/certified/badge/award.d.ts.map +1 -0
  56. package/dist/types/app/certified/badge/definition.d.ts +25 -0
  57. package/dist/types/app/certified/badge/definition.d.ts.map +1 -0
  58. package/dist/types/app/certified/badge/response.d.ts +20 -0
  59. package/dist/types/app/certified/badge/response.d.ts.map +1 -0
  60. package/dist/types/app/certified/defs.d.ts +3 -0
  61. package/dist/types/app/certified/defs.d.ts.map +1 -0
  62. package/dist/types/app/certified/location.d.ts +29 -0
  63. package/dist/types/app/certified/location.d.ts.map +1 -0
  64. package/dist/types/com/atproto/repo/strongRef.d.ts +12 -0
  65. package/dist/types/com/atproto/repo/strongRef.d.ts.map +1 -0
  66. package/dist/types/org/hypercerts/claim/activity.d.ts +57 -0
  67. package/dist/types/org/hypercerts/claim/activity.d.ts.map +1 -0
  68. package/dist/types/org/hypercerts/claim/collection.d.ts +25 -0
  69. package/dist/types/org/hypercerts/claim/collection.d.ts.map +1 -0
  70. package/dist/types/org/hypercerts/claim/contribution.d.ts +24 -0
  71. package/dist/types/org/hypercerts/claim/contribution.d.ts.map +1 -0
  72. package/dist/types/org/hypercerts/claim/evaluation.d.ts +43 -0
  73. package/dist/types/org/hypercerts/claim/evaluation.d.ts.map +1 -0
  74. package/dist/types/org/hypercerts/claim/evidence.d.ts +29 -0
  75. package/dist/types/org/hypercerts/claim/evidence.d.ts.map +1 -0
  76. package/dist/types/org/hypercerts/claim/measurement.d.ts +30 -0
  77. package/dist/types/org/hypercerts/claim/measurement.d.ts.map +1 -0
  78. package/dist/types/org/hypercerts/claim/project.d.ts +29 -0
  79. package/dist/types/org/hypercerts/claim/project.d.ts.map +1 -0
  80. package/dist/types/org/hypercerts/claim/rights.d.ts +25 -0
  81. package/dist/types/org/hypercerts/claim/rights.d.ts.map +1 -0
  82. package/dist/types/org/hypercerts/defs.d.ts +45 -0
  83. package/dist/types/org/hypercerts/defs.d.ts.map +1 -0
  84. package/dist/types/org/hypercerts/funding/receipt.d.ts +34 -0
  85. package/dist/types/org/hypercerts/funding/receipt.d.ts.map +1 -0
  86. package/dist/types/pub/leaflet/pages/linearDocument.d.ts +2 -0
  87. package/dist/types/pub/leaflet/pages/linearDocument.d.ts.map +1 -0
  88. package/dist/util.d.ts +37 -0
  89. package/dist/util.d.ts.map +1 -0
  90. package/lexicons/app/certified/badge/award.json +36 -0
  91. package/lexicons/app/certified/badge/definition.json +53 -0
  92. package/lexicons/app/certified/badge/response.json +36 -0
  93. package/lexicons/app/certified/defs.json +4 -16
  94. package/lexicons/app/certified/location.json +5 -8
  95. package/lexicons/com/atproto/repo/strongRef.json +1 -1
  96. package/lexicons/org/hypercerts/claim/activity.json +135 -0
  97. package/lexicons/org/hypercerts/claim/collection.json +54 -0
  98. package/lexicons/org/hypercerts/claim/contribution.json +4 -11
  99. package/lexicons/org/hypercerts/claim/evaluation.json +50 -9
  100. package/lexicons/org/hypercerts/claim/evidence.json +29 -16
  101. package/lexicons/org/hypercerts/claim/measurement.json +18 -8
  102. package/lexicons/org/hypercerts/claim/project.json +64 -0
  103. package/lexicons/org/hypercerts/claim/rights.json +16 -3
  104. package/lexicons/org/hypercerts/defs.json +71 -0
  105. package/lexicons/org/hypercerts/funding/receipt.json +66 -0
  106. package/package.json +46 -26
  107. package/dist/index.d.ts +0 -2094
  108. package/lexicons/org/hypercerts/claim.json +0 -95
  109. package/lexicons/org/hypercerts/collection.json +0 -62
@@ -0,0 +1,25 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult } from '@atproto/lexicon';
5
+ import { type $Typed } from '../../../../util';
6
+ import type * as OrgHypercertsDefs from '../defs.js';
7
+ export interface Main {
8
+ $type: 'org.hypercerts.claim.rights';
9
+ /** Full name of the rights */
10
+ rightsName: string;
11
+ /** Short rights identifier for easier search */
12
+ rightsType: string;
13
+ /** Description of the rights of this hypercert */
14
+ rightsDescription: string;
15
+ attachment?: $Typed<OrgHypercertsDefs.Uri> | $Typed<OrgHypercertsDefs.SmallBlob> | {
16
+ $type: string;
17
+ };
18
+ /** Client-declared timestamp when this record was originally created */
19
+ createdAt: string;
20
+ [k: string]: unknown;
21
+ }
22
+ export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.claim.rights", "main">;
23
+ export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
24
+ export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
25
+ //# sourceMappingURL=rights.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rights.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/claim/rights.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,6BAA6B,CAAA;IACpC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAA;IAClB,kDAAkD;IAClD,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EACP,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAC7B,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,GACnC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACrB,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,0FAE7B;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"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon';
5
+ /** Object containing a URI to external data */
6
+ export interface Uri {
7
+ $type?: 'org.hypercerts.defs#uri';
8
+ /** URI to external data */
9
+ uri: string;
10
+ }
11
+ export declare function isUri<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "uri">;
12
+ export declare function validateUri<V>(v: V): ValidationResult<Uri & V>;
13
+ /** Object containing a blob to external data */
14
+ export interface SmallBlob {
15
+ $type?: 'org.hypercerts.defs#smallBlob';
16
+ /** Blob to external data (up to 10MB) */
17
+ blob: BlobRef;
18
+ }
19
+ export declare function isSmallBlob<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "smallBlob">;
20
+ export declare function validateSmallBlob<V>(v: V): ValidationResult<SmallBlob & V>;
21
+ /** Object containing a blob to external data */
22
+ export interface LargeBlob {
23
+ $type?: 'org.hypercerts.defs#largeBlob';
24
+ /** Blob to external data (up to 100MB) */
25
+ blob: BlobRef;
26
+ }
27
+ export declare function isLargeBlob<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "largeBlob">;
28
+ export declare function validateLargeBlob<V>(v: V): ValidationResult<LargeBlob & V>;
29
+ /** Object containing a small image */
30
+ export interface SmallImage {
31
+ $type?: 'org.hypercerts.defs#smallImage';
32
+ /** Image (up to 5MB) */
33
+ image: BlobRef;
34
+ }
35
+ export declare function isSmallImage<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "smallImage">;
36
+ export declare function validateSmallImage<V>(v: V): ValidationResult<SmallImage & V>;
37
+ /** Object containing a large image */
38
+ export interface LargeImage {
39
+ $type?: 'org.hypercerts.defs#largeImage';
40
+ /** Image (up to 10MB) */
41
+ image: BlobRef;
42
+ }
43
+ export declare function isLargeImage<V>(v: V): v is import("../../../util").$TypedObject<V, "org.hypercerts.defs", "largeImage">;
44
+ export declare function validateLargeImage<V>(v: V): ValidationResult<LargeImage & V>;
45
+ //# sourceMappingURL=defs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../generated/types/org/hypercerts/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAE,OAAO,EAAE,MAAM,kBAAkB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kB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,oCAEzC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult } from '@atproto/lexicon';
5
+ import type * as AppCertifiedDefs from '../../../app/certified/defs.js';
6
+ export interface Main {
7
+ $type: 'org.hypercerts.funding.receipt';
8
+ from: AppCertifiedDefs.Did;
9
+ /** The recipient of the funds. Can be identified by DID or a clear-text name. */
10
+ to: string;
11
+ /** Amount of funding received. */
12
+ amount: string;
13
+ /** Currency of the payment (e.g. EUR, USD, ETH). */
14
+ currency: string;
15
+ /** How the funds were transferred (e.g. bank_transfer, credit_card, onchain, cash, check, payment_processor). */
16
+ paymentRail?: string;
17
+ /** Optional network within the payment rail (e.g. arbitrum, ethereum, sepa, visa, paypal). */
18
+ paymentNetwork?: string;
19
+ /** Identifier of the underlying payment transaction (e.g. bank reference, onchain transaction hash, or processor-specific ID). Use paymentNetwork to specify the network where applicable. */
20
+ transactionId?: string;
21
+ /** Optional reference to the activity, project, or organization this funding relates to. */
22
+ for?: string;
23
+ /** Optional notes or additional context for this funding receipt. */
24
+ notes?: string;
25
+ /** Timestamp when the payment occurred. */
26
+ occurredAt?: string;
27
+ /** Client-declared timestamp when this receipt record was created. */
28
+ createdAt: string;
29
+ [k: string]: unknown;
30
+ }
31
+ export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "org.hypercerts.funding.receipt", "main">;
32
+ export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
33
+ export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
34
+ //# sourceMappingURL=receipt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipt.d.ts","sourceRoot":"","sources":["../../../../../generated/types/org/hypercerts/funding/receipt.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAQjE,OAAO,KAAK,KAAK,gBAAgB,MAAM,gCAAgC,CAAA;AAMvE,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,gCAAgC,CAAA;IACvC,IAAI,EAAE,gBAAgB,CAAC,GAAG,CAAA;IAC1B,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAA;IACV,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAA;IAChB,iHAAiH;IACjH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8FAA8F;IAC9F,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,8LAA8L;IAC9L,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4FAA4F;IAC5F,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,6FAE7B;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"}
@@ -0,0 +1,2 @@
1
+ export * from '@atcute/leaflet/types/pages/linearDocument';
2
+ //# sourceMappingURL=linearDocument.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linearDocument.d.ts","sourceRoot":"","sources":["../../../../../generated/types/pub/leaflet/pages/linearDocument.ts"],"names":[],"mappings":"AAEA,cAAc,4CAA4C,CAAC"}
package/dist/util.d.ts ADDED
@@ -0,0 +1,37 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult } from '@atproto/lexicon';
5
+ export type OmitKey<T, K extends keyof T> = {
6
+ [K2 in keyof T as K2 extends K ? never : K2]: T[K2];
7
+ };
8
+ export type $Typed<V, T extends string = string> = V & {
9
+ $type: T;
10
+ };
11
+ export type Un$Typed<V extends {
12
+ $type?: string;
13
+ }> = OmitKey<V, '$type'>;
14
+ export type $Type<Id extends string, Hash extends string> = Hash extends 'main' ? Id : `${Id}#${Hash}`;
15
+ export type $TypedObject<V, Id extends string, Hash extends string> = V extends {
16
+ $type: $Type<Id, Hash>;
17
+ } ? V : V extends {
18
+ $type?: string;
19
+ } ? V extends {
20
+ $type?: infer T extends $Type<Id, Hash>;
21
+ } ? V & {
22
+ $type: T;
23
+ } : never : V & {
24
+ $type: $Type<Id, Hash>;
25
+ };
26
+ export declare function is$typed<V, Id extends string, Hash extends string>(v: V, id: Id, hash: Hash): v is $TypedObject<V, Id, Hash>;
27
+ export declare function maybe$typed<V, Id extends string, Hash extends string>(v: V, id: Id, hash: Hash): v is V & object & {
28
+ $type?: $Type<Id, Hash>;
29
+ };
30
+ export type Validator<R = unknown> = (v: unknown) => ValidationResult<R>;
31
+ export type ValidatorParam<V extends Validator> = V extends Validator<infer R> ? R : never;
32
+ /**
33
+ * Utility function that allows to convert a "validate*" utility function into a
34
+ * type predicate.
35
+ */
36
+ export declare function asPredicate<V extends Validator>(validate: V): <T>(v: T) => v is T & ValidatorParam<V>;
37
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../generated/util.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAExD,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI;KACzC,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,KAAK,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CA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S,MAAM,EACnE,CAAC,EAAE,CAAC,EACJ,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,GACT,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;CAAE,CAK/C;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC,EAAE,OAAO,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAA;AACxE,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,IAC5C,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE1C;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,QAAQ,EAAE,CAAC,IACzC,CAAC,EAAE,GAAG,CAAC,KAAG,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAGtD"}
@@ -0,0 +1,36 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "app.certified.badge.award",
4
+ "defs": {
5
+ "main": {
6
+ "type": "record",
7
+ "description": "Records a badge award to a user, project, or activity claim.",
8
+ "key": "tid",
9
+ "record": {
10
+ "type": "object",
11
+ "required": ["badge", "subject", "createdAt"],
12
+ "properties": {
13
+ "badge": {
14
+ "type": "ref",
15
+ "ref": "app.certified.badge.definition",
16
+ "description": "Reference to the badge definition for this award."
17
+ },
18
+ "subject": {
19
+ "type": "union",
20
+ "description": "Entity the badge award is for (either an account DID or any specific AT Protocol record), e.g. a user, a project, or a specific activity claim.",
21
+ "refs": ["app.certified.defs#did", "com.atproto.repo.strongRef"]
22
+ },
23
+ "note": {
24
+ "type": "string",
25
+ "description": "Optional statement explaining the reason for this badge award."
26
+ },
27
+ "createdAt": {
28
+ "type": "string",
29
+ "format": "datetime",
30
+ "description": "Client-declared timestamp when this record was originally created"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "app.certified.badge.definition",
4
+ "defs": {
5
+ "main": {
6
+ "type": "record",
7
+ "description": "Defines a badge that can be awarded via badge award records to users, projects, or activity claims.",
8
+ "key": "tid",
9
+ "record": {
10
+ "type": "object",
11
+ "required": ["title", "badgeType", "icon", "createdAt"],
12
+ "properties": {
13
+ "badgeType": {
14
+ "type": "string",
15
+ "description": "Category of the badge (e.g. endorsement, participation, affiliation)."
16
+ },
17
+ "title": {
18
+ "type": "string",
19
+ "description": "Human-readable title of the badge."
20
+ },
21
+ "icon": {
22
+ "type": "blob",
23
+ "description": "Icon representing the badge, stored as a blob for compact visual display.",
24
+ "accept": [
25
+ "image/png",
26
+ "image/jpeg",
27
+ "image/webp",
28
+ "image/svg+xml"
29
+ ],
30
+ "maxSize": 1048576
31
+ },
32
+ "description": {
33
+ "type": "string",
34
+ "description": "Optional short statement describing what the badge represents."
35
+ },
36
+ "allowedIssuers": {
37
+ "type": "array",
38
+ "description": "Optional allowlist of DIDs allowed to issue this badge. If omitted, anyone may issue it.",
39
+ "items": {
40
+ "type": "ref",
41
+ "ref": "app.certified.defs#did"
42
+ }
43
+ },
44
+ "createdAt": {
45
+ "type": "string",
46
+ "format": "datetime",
47
+ "description": "Client-declared timestamp when this record was originally created"
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "app.certified.badge.response",
4
+ "defs": {
5
+ "main": {
6
+ "type": "record",
7
+ "description": "Recipient response to a badge award.",
8
+ "key": "tid",
9
+ "record": {
10
+ "type": "object",
11
+ "required": ["badgeAward", "response", "createdAt"],
12
+ "properties": {
13
+ "badgeAward": {
14
+ "type": "ref",
15
+ "ref": "app.certified.badge.award",
16
+ "description": "Reference to the badge award."
17
+ },
18
+ "response": {
19
+ "type": "string",
20
+ "enum": ["accepted", "rejected"],
21
+ "description": "The recipient’s response for the badge (accepted or rejected)."
22
+ },
23
+ "weight": {
24
+ "type": "string",
25
+ "description": "Optional relative weight for accepted badges, assigned by the recipient."
26
+ },
27
+ "createdAt": {
28
+ "type": "string",
29
+ "format": "datetime",
30
+ "description": "Client-declared timestamp when this record was originally created"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
@@ -1,24 +1,12 @@
1
1
  {
2
2
  "lexicon": 1,
3
3
  "id": "app.certified.defs",
4
+ "description": "Common type definitions used across certified protocols.",
4
5
  "defs": {
5
- "uri": {
6
+ "did": {
6
7
  "type": "string",
7
- "format": "uri",
8
- "maxGraphemes": 1000,
9
- "description": "URI to external data"
10
- },
11
- "smallBlob": {
12
- "type": "blob",
13
- "accept": ["*/*"],
14
- "maxSize": 10485760,
15
- "description": "Blob to external data (up to 10MB)"
16
- },
17
- "largeBlob": {
18
- "type": "blob",
19
- "accept": ["*/*"],
20
- "maxSize": 104857600,
21
- "description": "Blob to external data (up to 100MB)"
8
+ "format": "did",
9
+ "description": "A Decentralized Identifier (DID) string."
22
10
  }
23
11
  }
24
12
  }
@@ -5,7 +5,7 @@
5
5
  "main": {
6
6
  "type": "record",
7
7
  "description": "A location reference",
8
- "key": "any",
8
+ "key": "tid",
9
9
  "record": {
10
10
  "type": "object",
11
11
  "required": [
@@ -30,17 +30,14 @@
30
30
  "locationType": {
31
31
  "type": "string",
32
32
  "description": "An identifier for the format of the location data (e.g., coordinate-decimal, geojson-point)",
33
- "knownValues": [
34
- "coordinate-decimal",
35
- "geojson-point"
36
- ],
33
+ "knownValues": ["coordinate-decimal", "geojson-point"],
37
34
  "maxLength": 20
38
35
  },
39
36
  "location": {
40
37
  "type": "union",
41
38
  "refs": [
42
- "app.certified.defs#uri",
43
- "app.certified.defs#smallBlob"
39
+ "org.hypercerts.defs#uri",
40
+ "org.hypercerts.defs#smallBlob"
44
41
  ],
45
42
  "description": "The location of where the work was performed as a URI or blob."
46
43
  },
@@ -65,4 +62,4 @@
65
62
  }
66
63
  }
67
64
  }
68
- }
65
+ }
@@ -12,4 +12,4 @@
12
12
  }
13
13
  }
14
14
  }
15
- }
15
+ }
@@ -0,0 +1,135 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "org.hypercerts.claim.activity",
4
+ "defs": {
5
+ "main": {
6
+ "type": "record",
7
+ "description": "A hypercert record tracking impact work.",
8
+ "key": "any",
9
+ "record": {
10
+ "type": "object",
11
+ "required": [
12
+ "title",
13
+ "shortDescription",
14
+ "createdAt",
15
+ "startDate",
16
+ "endDate"
17
+ ],
18
+ "properties": {
19
+ "title": {
20
+ "type": "string",
21
+ "description": "Title of the hypercert.",
22
+ "maxLength": 256
23
+ },
24
+ "shortDescription": {
25
+ "type": "string",
26
+ "description": "Short blurb of the impact work done.",
27
+ "maxLength": 3000,
28
+ "maxGraphemes": 300
29
+ },
30
+ "description": {
31
+ "type": "string",
32
+ "description": "Optional longer description of the impact work done.",
33
+ "maxLength": 30000,
34
+ "maxGraphemes": 3000
35
+ },
36
+ "image": {
37
+ "type": "union",
38
+ "refs": [
39
+ "org.hypercerts.defs#uri",
40
+ "org.hypercerts.defs#smallImage"
41
+ ],
42
+ "description": "The hypercert visual representation as a URI or image blob."
43
+ },
44
+ "workScope": {
45
+ "type": "ref",
46
+ "ref": "#workScope"
47
+ },
48
+ "startDate": {
49
+ "type": "string",
50
+ "format": "datetime",
51
+ "description": "When the work began"
52
+ },
53
+ "endDate": {
54
+ "type": "string",
55
+ "format": "datetime",
56
+ "description": "When the work ended"
57
+ },
58
+ "contributions": {
59
+ "type": "array",
60
+ "description": "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.",
61
+ "items": {
62
+ "type": "ref",
63
+ "ref": "com.atproto.repo.strongRef"
64
+ }
65
+ },
66
+ "rights": {
67
+ "type": "ref",
68
+ "ref": "com.atproto.repo.strongRef",
69
+ "description": "A strong reference to the rights that this hypercert has. The record referenced must conform with the lexicon org.hypercerts.claim.rights."
70
+ },
71
+ "location": {
72
+ "type": "ref",
73
+ "ref": "com.atproto.repo.strongRef",
74
+ "description": "A strong reference to the location where the activity was performed. The record referenced must conform with the lexicon app.certified.location."
75
+ },
76
+ "project": {
77
+ "type": "string",
78
+ "format": "at-uri",
79
+ "description": "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."
80
+ },
81
+ "createdAt": {
82
+ "type": "string",
83
+ "format": "datetime",
84
+ "description": "Client-declared timestamp when this record was originally created"
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "workScope": {
90
+ "type": "object",
91
+ "description": "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.",
92
+ "properties": {
93
+ "withinAllOf": {
94
+ "type": "array",
95
+ "description": "Labels that MUST all hold for the scope to apply.",
96
+ "items": {
97
+ "type": "string"
98
+ },
99
+ "maxLength": 100
100
+ },
101
+ "withinAnyOf": {
102
+ "type": "array",
103
+ "description": "Labels of which AT LEAST ONE must hold (optional). If omitted or empty, imposes no additional condition.",
104
+ "items": {
105
+ "type": "string"
106
+ },
107
+ "maxLength": 100
108
+ },
109
+ "withinNoneOf": {
110
+ "type": "array",
111
+ "description": "Labels that MUST NOT hold for the scope to apply.",
112
+ "items": {
113
+ "type": "string"
114
+ },
115
+ "maxLength": 100
116
+ }
117
+ }
118
+ },
119
+ "activityWeight": {
120
+ "type": "object",
121
+ "required": ["activity", "weight"],
122
+ "properties": {
123
+ "activity": {
124
+ "type": "ref",
125
+ "ref": "com.atproto.repo.strongRef",
126
+ "description": "A strong reference to a hypercert activity record. This activity must conform to the lexicon org.hypercerts.claim.activity"
127
+ },
128
+ "weight": {
129
+ "type": "string",
130
+ "description": "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."
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "lexicon": 1,
3
+ "id": "org.hypercerts.claim.collection",
4
+ "defs": {
5
+ "main": {
6
+ "type": "record",
7
+ "description": "A collection/group of hypercerts that have a specific property.",
8
+ "key": "tid",
9
+ "record": {
10
+ "type": "object",
11
+ "required": ["title", "activities", "createdAt"],
12
+ "properties": {
13
+ "title": {
14
+ "type": "string",
15
+ "description": "The title of this collection",
16
+ "maxLength": 800,
17
+ "maxGraphemes": 80
18
+ },
19
+ "shortDescription": {
20
+ "type": "string",
21
+ "maxLength": 3000,
22
+ "maxGraphemes": 300,
23
+ "description": "A short description of this collection"
24
+ },
25
+ "avatar": {
26
+ "type": "blob",
27
+ "description": "Primary avatar image representing this collection across apps and views; typically a square image.",
28
+ "accept": ["image/png", "image/jpeg"],
29
+ "maxSize": 1000000
30
+ },
31
+ "coverPhoto": {
32
+ "type": "blob",
33
+ "description": "The cover photo of this collection.",
34
+ "accept": ["image/png", "image/jpeg"],
35
+ "maxSize": 1000000
36
+ },
37
+ "activities": {
38
+ "type": "array",
39
+ "description": "Array of activities with their associated weights in this collection",
40
+ "items": {
41
+ "type": "ref",
42
+ "ref": "org.hypercerts.claim.activity#activityWeight"
43
+ }
44
+ },
45
+ "createdAt": {
46
+ "type": "string",
47
+ "format": "datetime",
48
+ "description": "Client-declared timestamp when this record was originally created"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
@@ -5,16 +5,11 @@
5
5
  "main": {
6
6
  "type": "record",
7
7
  "description": "A contribution made toward a hypercert's impact.",
8
- "key": "any",
8
+ "key": "tid",
9
9
  "record": {
10
10
  "type": "object",
11
- "required": ["hypercert", "contributors", "createdAt"],
11
+ "required": ["contributors", "createdAt"],
12
12
  "properties": {
13
- "hypercert": {
14
- "type": "ref",
15
- "ref": "com.atproto.repo.strongRef",
16
- "description": "A strong reference to the hypercert this contribution is for. The record referenced must conform with the lexicon org.hypercerts.claim."
17
- },
18
13
  "role": {
19
14
  "type": "string",
20
15
  "description": "Role or title of the contributor(s).",
@@ -33,12 +28,12 @@
33
28
  "maxLength": 2000,
34
29
  "maxGraphemes": 500
35
30
  },
36
- "workTimeframeFrom": {
31
+ "startDate": {
37
32
  "type": "string",
38
33
  "format": "datetime",
39
34
  "description": "When this contribution started. This should be a subset of the hypercert timeframe."
40
35
  },
41
- "workTimeframeTo": {
36
+ "endDate": {
42
37
  "type": "string",
43
38
  "format": "datetime",
44
39
  "description": "When this contribution finished. This should be a subset of the hypercert timeframe."
@@ -53,5 +48,3 @@
53
48
  }
54
49
  }
55
50
  }
56
-
57
-