techne-sdk 0.3.1 → 0.3.3

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 (28) hide show
  1. package/CHANGELOG.md +40 -3
  2. package/README.md +4 -14
  3. package/dist/auth/placement.gen.d.ts +1 -1
  4. package/dist/auth/placement.gen.js +2 -0
  5. package/dist/catalog/catalog.gen.d.ts +6 -33
  6. package/dist/catalog/catalog.gen.js +570 -34
  7. package/dist/generated/index.d.ts +56 -0
  8. package/dist/generated/index.js +72 -0
  9. package/dist/generated/lexicons.d.ts +372 -42
  10. package/dist/generated/lexicons.js +223 -21
  11. package/dist/generated/nsid.d.ts +7 -0
  12. package/dist/generated/nsid.js +7 -0
  13. package/dist/generated/nsid.json +7 -0
  14. package/dist/generated/records.d.ts +48 -44
  15. package/dist/generated/types/pub/techne/draft/collective.d.ts +2 -0
  16. package/dist/generated/types/pub/techne/draft/identity/listPhoneHolds.d.ts +2 -0
  17. package/dist/generated/types/pub/techne/draft/permissioned/putRecord.d.ts +3 -3
  18. package/dist/generated/types/pub/techne/draft/permissioned/putRecords.d.ts +2 -2
  19. package/dist/generated/types/pub/techne/draft/placeResearch.d.ts +47 -0
  20. package/dist/generated/types/pub/techne/draft/placeResearch.js +26 -0
  21. package/dist/generated/types/pub/techne/draft/query/composeRecords.d.ts +1 -1
  22. package/dist/generated/types/pub/techne/draft/query/listRecords.d.ts +1 -1
  23. package/dist/generated/types/pub/techne/draft/questionSet.d.ts +3 -0
  24. package/dist/generated/types/pub/techne/draft/summary.d.ts +16 -0
  25. package/dist/generated/types/pub/techne/draft/summary.js +12 -0
  26. package/dist/wasm/techne-wasm.gen.js +1 -1
  27. package/dist/wasm/techne-wasm2js.gen.js +17633 -16383
  28. package/package.json +1 -1
@@ -46,28 +46,30 @@ import type * as R44 from './types/pub/techne/draft/org.js';
46
46
  import type * as R45 from './types/pub/techne/draft/passage.js';
47
47
  import type * as R46 from './types/pub/techne/draft/pendingBeaconSpot.js';
48
48
  import type * as R47 from './types/pub/techne/draft/place.js';
49
- import type * as R48 from './types/pub/techne/draft/post.js';
50
- import type * as R49 from './types/pub/techne/draft/presence.js';
51
- import type * as R50 from './types/pub/techne/draft/profile.js';
52
- import type * as R51 from './types/pub/techne/draft/provenance.js';
53
- import type * as R52 from './types/pub/techne/draft/publisher.js';
54
- import type * as R53 from './types/pub/techne/draft/questionSet.js';
55
- import type * as R54 from './types/pub/techne/draft/receipt.js';
56
- import type * as R55 from './types/pub/techne/draft/reflection.js';
57
- import type * as R56 from './types/pub/techne/draft/registry/typeRequest.js';
58
- import type * as R57 from './types/pub/techne/draft/retirement.js';
59
- import type * as R58 from './types/pub/techne/draft/rsvpNote.js';
60
- import type * as R59 from './types/pub/techne/draft/sameAs.js';
61
- import type * as R60 from './types/pub/techne/draft/scraper/cursor.js';
62
- import type * as R61 from './types/pub/techne/draft/scraper/raw.js';
63
- import type * as R62 from './types/pub/techne/draft/share.js';
64
- import type * as R63 from './types/pub/techne/draft/source.js';
65
- import type * as R64 from './types/pub/techne/draft/sourceAttribution.js';
66
- import type * as R65 from './types/pub/techne/draft/sourceRef.js';
67
- import type * as R66 from './types/pub/techne/draft/subjectPrefs.js';
68
- import type * as R67 from './types/pub/techne/draft/verdict.js';
69
- import type * as R68 from './types/pub/techne/draft/verification.js';
70
- import type * as R69 from './types/pub/techne/draft/weeklyCheckIn.js';
49
+ import type * as R48 from './types/pub/techne/draft/placeResearch.js';
50
+ import type * as R49 from './types/pub/techne/draft/post.js';
51
+ import type * as R50 from './types/pub/techne/draft/presence.js';
52
+ import type * as R51 from './types/pub/techne/draft/profile.js';
53
+ import type * as R52 from './types/pub/techne/draft/provenance.js';
54
+ import type * as R53 from './types/pub/techne/draft/publisher.js';
55
+ import type * as R54 from './types/pub/techne/draft/questionSet.js';
56
+ import type * as R55 from './types/pub/techne/draft/receipt.js';
57
+ import type * as R56 from './types/pub/techne/draft/reflection.js';
58
+ import type * as R57 from './types/pub/techne/draft/registry/typeRequest.js';
59
+ import type * as R58 from './types/pub/techne/draft/retirement.js';
60
+ import type * as R59 from './types/pub/techne/draft/rsvpNote.js';
61
+ import type * as R60 from './types/pub/techne/draft/sameAs.js';
62
+ import type * as R61 from './types/pub/techne/draft/scraper/cursor.js';
63
+ import type * as R62 from './types/pub/techne/draft/scraper/raw.js';
64
+ import type * as R63 from './types/pub/techne/draft/share.js';
65
+ import type * as R64 from './types/pub/techne/draft/source.js';
66
+ import type * as R65 from './types/pub/techne/draft/sourceAttribution.js';
67
+ import type * as R66 from './types/pub/techne/draft/sourceRef.js';
68
+ import type * as R67 from './types/pub/techne/draft/subjectPrefs.js';
69
+ import type * as R68 from './types/pub/techne/draft/summary.js';
70
+ import type * as R69 from './types/pub/techne/draft/verdict.js';
71
+ import type * as R70 from './types/pub/techne/draft/verification.js';
72
+ import type * as R71 from './types/pub/techne/draft/weeklyCheckIn.js';
71
73
  /** Every record type the lexicons define, by collection. */
72
74
  export interface Records {
73
75
  'community.lexicon.calendar.event': R0.Record;
@@ -118,28 +120,30 @@ export interface Records {
118
120
  'pub.techne.draft.passage': R45.Record;
119
121
  'pub.techne.draft.pendingBeaconSpot': R46.Record;
120
122
  'pub.techne.draft.place': R47.Record;
121
- 'pub.techne.draft.post': R48.Record;
122
- 'pub.techne.draft.presence': R49.Record;
123
- 'pub.techne.draft.profile': R50.Record;
124
- 'pub.techne.draft.provenance': R51.Record;
125
- 'pub.techne.draft.publisher': R52.Record;
126
- 'pub.techne.draft.questionSet': R53.Record;
127
- 'pub.techne.draft.receipt': R54.Record;
128
- 'pub.techne.draft.reflection': R55.Record;
129
- 'pub.techne.draft.registry.typeRequest': R56.Record;
130
- 'pub.techne.draft.retirement': R57.Record;
131
- 'pub.techne.draft.rsvpNote': R58.Record;
132
- 'pub.techne.draft.sameAs': R59.Record;
133
- 'pub.techne.draft.scraper.cursor': R60.Record;
134
- 'pub.techne.draft.scraper.raw': R61.Record;
135
- 'pub.techne.draft.share': R62.Record;
136
- 'pub.techne.draft.source': R63.Record;
137
- 'pub.techne.draft.sourceAttribution': R64.Record;
138
- 'pub.techne.draft.sourceRef': R65.Record;
139
- 'pub.techne.draft.subjectPrefs': R66.Record;
140
- 'pub.techne.draft.verdict': R67.Record;
141
- 'pub.techne.draft.verification': R68.Record;
142
- 'pub.techne.draft.weeklyCheckIn': R69.Record;
123
+ 'pub.techne.draft.placeResearch': R48.Record;
124
+ 'pub.techne.draft.post': R49.Record;
125
+ 'pub.techne.draft.presence': R50.Record;
126
+ 'pub.techne.draft.profile': R51.Record;
127
+ 'pub.techne.draft.provenance': R52.Record;
128
+ 'pub.techne.draft.publisher': R53.Record;
129
+ 'pub.techne.draft.questionSet': R54.Record;
130
+ 'pub.techne.draft.receipt': R55.Record;
131
+ 'pub.techne.draft.reflection': R56.Record;
132
+ 'pub.techne.draft.registry.typeRequest': R57.Record;
133
+ 'pub.techne.draft.retirement': R58.Record;
134
+ 'pub.techne.draft.rsvpNote': R59.Record;
135
+ 'pub.techne.draft.sameAs': R60.Record;
136
+ 'pub.techne.draft.scraper.cursor': R61.Record;
137
+ 'pub.techne.draft.scraper.raw': R62.Record;
138
+ 'pub.techne.draft.share': R63.Record;
139
+ 'pub.techne.draft.source': R64.Record;
140
+ 'pub.techne.draft.sourceAttribution': R65.Record;
141
+ 'pub.techne.draft.sourceRef': R66.Record;
142
+ 'pub.techne.draft.subjectPrefs': R67.Record;
143
+ 'pub.techne.draft.summary': R68.Record;
144
+ 'pub.techne.draft.verdict': R69.Record;
145
+ 'pub.techne.draft.verification': R70.Record;
146
+ 'pub.techne.draft.weeklyCheckIn': R71.Record;
143
147
  }
144
148
  /** Any one record the lexicons define (its `$type` says which). */
145
149
  export type AnyRecord = Records[keyof Records];
@@ -13,6 +13,8 @@ export interface Main {
13
13
  name: string;
14
14
  /** A free-form description of the collective. */
15
15
  description?: string;
16
+ /** Optional: one emoji (one grapheme cluster), the collective's mark. A client shows the avatar if there is one, else this emoji, else the first letter of the name. No color is stored; a client may derive one from the collective's DID. */
17
+ emoji?: string;
16
18
  /** Free-form collective type/category label. The value "beacon.circle" marks a Beacon circle on a descriptor placed in its own DID's pub.techne.draft.space.collective.member/self, whoever made that DID or wrote it. A Beacon circle is a private group whose descriptor and memberships live only in that member space, where every member holds role 40 (where the platform holds the circle's credential, any member may add, remove and rename and nobody deletes it; a circle whose DID someone else holds is managed by its holder), and which a pub.techne.draft.accessRule#groupTarget may name. */
17
19
  collectiveType?: string;
18
20
  /** Deprecated: the old name of collectiveType, kept so records written before 2026-10-09 still read. Writers set collectiveType only. Readers take collectiveType and fall back to sceneType when it is absent. */
@@ -44,6 +44,8 @@ export interface HoldView {
44
44
  [_ in string]: unknown;
45
45
  };
46
46
  createdAt: string;
47
+ /** On a hold the caller asked for, the name the caller saved for its number: the `name` of the caller's own active `contact` on that number (the newest, when there are several), read when the listing is made. Never on a hold someone else asked for, and nothing of it is stored on the hold. */
48
+ name?: string;
47
49
  }
48
50
  export declare function isHoldView<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.identity.listPhoneHolds", "holdView">;
49
51
  export declare function validateHoldView<V>(v: V): ValidationResult<HoldView & V>;
@@ -15,8 +15,8 @@ export interface InputSchema {
15
15
  };
16
16
  /** Write only if the record's current CID is this one. A missing record never matches. */
17
17
  swapCid?: string;
18
- /** The space the record is for: at://{authority}/{spaceType}/{skey} (for a source's own records, at://{repo}/pub.techne.draft.space.source/self). Absent: the record is for no space, and only its writer reads it. The key holds one record per space (the 0016 record address): writing it for another space writes another record and leaves this one; to move a record, delete it and write it again. */
19
- space?: string;
18
+ /** The space this record is for. Public records are written with com.atproto.repo.putRecord, not here. Required: at://{authority}/{spaceType}/{skey} (a record only you read goes in your own pub.techne.draft.space.personal, at://{you}/pub.techne.draft.space.personal/self; a source's own records in at://{repo}/pub.techne.draft.space.source/self). A write naming no space is refused as InvalidRequest. The key holds one record per space (the 0016 record address): writing it for another space writes another record and leaves this one; to move a record, delete it and write it again. */
19
+ space: string;
20
20
  }
21
21
  export interface OutputSchema {
22
22
  uri: string;
@@ -26,7 +26,7 @@ export interface OutputSchema {
26
26
  rev: string;
27
27
  /** The DIDs the `share`s placed in the space the record counts in name (its authority left out), when the caller may read that space; empty otherwise. For a source space this is its whole audience beside the owner (as getGrants). */
28
28
  read: string[];
29
- /** The space the record counts in now. Absent when it counts in none (no space was named, or the space's write policy does not admit the writer, or a space.private space written by an app other than the one its key names). */
29
+ /** The space the record counts in now. Absent when it counts in none (the space's write policy does not admit the writer, or a space.private space written by an app other than the one its key names). */
30
30
  space?: string;
31
31
  }
32
32
  export interface CallOptions {
@@ -53,8 +53,8 @@ export interface Write {
53
53
  };
54
54
  /** Write only if the record's current CID is this one. A missing record never matches. */
55
55
  swapCid?: string;
56
- /** The space the record is for, as putRecord's `space`. Absent: the record is for no space, and only its writer reads it. */
57
- space?: string;
56
+ /** The space this record is for. Public records are written with com.atproto.repo.putRecord, not here. Required: at://{authority}/{spaceType}/{skey} (a record only you read goes in your own pub.techne.draft.space.personal, at://{you}/pub.techne.draft.space.personal/self; a source's own records in at://{repo}/pub.techne.draft.space.source/self). A write naming no space refuses the whole call as InvalidRequest, and nothing is written. The key holds one record per space (the 0016 record address): writing it for another space writes another record and leaves this one; to move a record, delete it and write it again. */
57
+ space: string;
58
58
  }
59
59
  export declare function isWrite<V>(v: V): v is import("../../../../../util.js").$TypedObject<V, "pub.techne.draft.permissioned.putRecords", "write">;
60
60
  export declare function validateWrite<V>(v: V): ValidationResult<Write & V>;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult } from '@atproto/lexicon';
5
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js';
6
+ export interface Main {
7
+ $type: 'pub.techne.draft.placeResearch';
8
+ subject: ComAtprotoRepoStrongRef.Main;
9
+ /** What kind of place it is. not_a_venue: the place is not somewhere people go for events (an address, a region, an online-only organiser). */
10
+ kind?: 'bar' | 'music_venue' | 'comedy_club' | 'theatre' | 'cinema' | 'gallery_museum' | 'library' | 'park' | 'community_centre' | 'cafe' | 'restaurant' | 'place_of_worship' | 'school_campus' | 'sports_venue' | 'shop' | 'outdoor_space' | 'event_space' | 'hotel' | 'farm' | 'not_a_venue' | 'other' | (string & {});
11
+ /** Two or three plain sentences on what going there is like. */
12
+ about?: string;
13
+ /** The place's own website, when research found one. */
14
+ website?: string;
15
+ facts?: Fact[];
16
+ /** Venue-level tags: whether each applies to the place as a whole. */
17
+ tags?: Tag[];
18
+ /** The pages research read. */
19
+ sources?: string[];
20
+ /** How sure the research is, overall. */
21
+ confidence?: 'high' | 'medium' | 'low' | (string & {});
22
+ createdAt: string;
23
+ [k: string]: unknown;
24
+ }
25
+ export declare function isMain<V>(v: V): v is import("../../../../util.js").$TypedObject<V, "pub.techne.draft.placeResearch", "main">;
26
+ export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
27
+ export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
28
+ export interface Fact {
29
+ $type?: 'pub.techne.draft.placeResearch#fact';
30
+ name: 'serves_alcohol' | 'serves_food' | 'step_free_entrance' | 'wheelchair_accessible' | 'accessible_toilet' | 'dog_friendly' | 'outdoor_area' | 'seated' | 'kid_friendly' | 'drink_minimum' | 'door_policy' | 'typical_price' | (string & {});
31
+ /** yes, no or unknown; for door_policy one of all_ages, 18_plus, 21_plus, varies, unknown; for typical_price one of free, under_20, 20_50, 50_plus, varies, unknown. */
32
+ value: string;
33
+ /** What the source said, briefly. */
34
+ evidence?: string;
35
+ /** The page the evidence is from. */
36
+ source?: string;
37
+ }
38
+ export declare function isFact<V>(v: V): v is import("../../../../util.js").$TypedObject<V, "pub.techne.draft.placeResearch", "fact">;
39
+ export declare function validateFact<V>(v: V): ValidationResult<Fact & V>;
40
+ export interface Tag {
41
+ $type?: 'pub.techne.draft.placeResearch#tag';
42
+ /** The tag's id. */
43
+ id: string;
44
+ value: 'yes' | 'no' | (string & {});
45
+ }
46
+ export declare function isTag<V>(v: V): v is import("../../../../util.js").$TypedObject<V, "pub.techne.draft.placeResearch", "tag">;
47
+ export declare function validateTag<V>(v: V): ValidationResult<Tag & V>;
@@ -0,0 +1,26 @@
1
+ import { validate as _validate } from '../../../../lexicons.js';
2
+ import { is$typed as _is$typed, } from '../../../../util.js';
3
+ const is$typed = _is$typed, validate = _validate;
4
+ const id = 'pub.techne.draft.placeResearch';
5
+ const hashMain = 'main';
6
+ export function isMain(v) {
7
+ return is$typed(v, id, hashMain);
8
+ }
9
+ export function validateMain(v) {
10
+ return validate(v, id, hashMain, true);
11
+ }
12
+ export { isMain as isRecord, validateMain as validateRecord, };
13
+ const hashFact = 'fact';
14
+ export function isFact(v) {
15
+ return is$typed(v, id, hashFact);
16
+ }
17
+ export function validateFact(v) {
18
+ return validate(v, id, hashFact);
19
+ }
20
+ const hashTag = 'tag';
21
+ export function isTag(v) {
22
+ return is$typed(v, id, hashTag);
23
+ }
24
+ export function validateTag(v) {
25
+ return validate(v, id, hashTag);
26
+ }
@@ -125,7 +125,7 @@ export interface Record {
125
125
  source?: 'public' | 'permissioned' | (string & {});
126
126
  /** A public record that is a live curated record: a curator the commons root trusts merged it from its sources, and it is not superseded. Its `pub.techne.draft.provenance` (same author, subject this record) names who it is from. Absent otherwise. */
127
127
  curated?: boolean;
128
- /** The caller's own permissioned record that the reach limit holds back from the people it would reach: a held share, answered to its author alone (to anyone else it is not found) until the limit admits it. Absent otherwise. A query with `held: true` answers only these. */
128
+ /** The caller's own permissioned record that the reach limit holds back from the people it would reach: a withheld act (a share or a circle add), answered to its author alone (to anyone else it is not found) until the limit admits it. Absent otherwise. A query with `held: true` answers only these. */
129
129
  held?: boolean;
130
130
  /** The numbers the query's operators produced for this record, by name (a `near` distance in metres, a `matches` rank). */
131
131
  measures?: {
@@ -64,7 +64,7 @@ export interface Record {
64
64
  source: 'public' | 'permissioned' | (string & {});
65
65
  /** A public record that is a live curated record: a curator the commons root trusts merged it from its sources, and it is not superseded. Its `pub.techne.draft.provenance` (same author, subject this record) names who it is from. Absent otherwise. */
66
66
  curated?: boolean;
67
- /** The caller's own permissioned record that the reach limit holds back from the people it would reach: a held share, answered to its author alone (to anyone else it is not found) until the limit admits it. Absent otherwise. A query with `held: true` answers only these. */
67
+ /** The caller's own permissioned record that the reach limit holds back from the people it would reach: a withheld act (a share or a circle add), answered to its author alone (to anyone else it is not found) until the limit admits it. Absent otherwise. A query with `held: true` answers only these. */
68
68
  held?: boolean;
69
69
  /** The numbers the query's operators produced for this record, by name (a `near` distance in metres, a `matches` rank). */
70
70
  measures?: {
@@ -7,6 +7,8 @@ export interface Main {
7
7
  /** When the publisher first wrote this content. Optional: records published before it existed lack it, and the writer never rewrites unchanged content to add it. The content-derived key is computed without it, and republishing unchanged content keeps the stored record, so its CID (which strongRefs pin) never moves. */
8
8
  createdAt?: string;
9
9
  name?: string;
10
+ /** Answering instructions shared by every question in this set, stated once. Each question's prompt is then its own text, asked under these instructions. */
11
+ howToAnswer?: string;
10
12
  questions: Question[];
11
13
  [k: string]: unknown;
12
14
  }
@@ -19,6 +21,7 @@ export interface Question {
19
21
  /** Subject category this question applies to. */
20
22
  kind: 'event' | 'place' | (string & {});
21
23
  question: string;
24
+ /** What is asked for this question. With a set's howToAnswer, it is the question's own text and the shared instructions are howToAnswer's. */
22
25
  prompt: string;
23
26
  /** Ordered assessment vocabulary. This version supports supported, contradicted, unknown and conflicting; consumers must not interpret other values as false. */
24
27
  criteria: string[];
@@ -0,0 +1,16 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult } from '@atproto/lexicon';
5
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js';
6
+ export interface Main {
7
+ $type: 'pub.techne.draft.summary';
8
+ subject: ComAtprotoRepoStrongRef.Main;
9
+ /** The line, as plain text. */
10
+ text: string;
11
+ createdAt: string;
12
+ [k: string]: unknown;
13
+ }
14
+ export declare function isMain<V>(v: V): v is import("../../../../util.js").$TypedObject<V, "pub.techne.draft.summary", "main">;
15
+ export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
16
+ export { type Main as Record, isMain as isRecord, validateMain as validateRecord, };
@@ -0,0 +1,12 @@
1
+ import { validate as _validate } from '../../../../lexicons.js';
2
+ import { is$typed as _is$typed, } from '../../../../util.js';
3
+ const is$typed = _is$typed, validate = _validate;
4
+ const id = 'pub.techne.draft.summary';
5
+ const hashMain = 'main';
6
+ export function isMain(v) {
7
+ return is$typed(v, id, hashMain);
8
+ }
9
+ export function validateMain(v) {
10
+ return validate(v, id, hashMain, true);
11
+ }
12
+ export { isMain as isRecord, validateMain as validateRecord, };