Encrypted, ephemeral, private memos on atproto

docs(producer): add typedocs to exported types

graham.systems f57cbf5d b5612b0f

verified
Changed files
+10
packages
producer
+10
packages/producer/types.ts
··· 1 import type { BaseClientOptions, ClientRequirements } from "@cistern/shared"; 2 import type { RecordKey, ResourceUri } from "@atcute/lexicons"; 3 4 export interface ProducerOptions extends BaseClientOptions { 5 publicKey?: RecordKey; 6 } 7 8 export type ProducerParams = ClientRequirements<ProducerOptions> & { 9 publicKey?: PublicKeyOption; 10 }; 11 12 export interface PublicKeyOption { 13 uri: ResourceUri; 14 name: string; 15 content: string; 16 }
··· 1 import type { BaseClientOptions, ClientRequirements } from "@cistern/shared"; 2 import type { RecordKey, ResourceUri } from "@atcute/lexicons"; 3 4 + /** Credentials and an optional public key, used for deriving `ProducerParams` */ 5 export interface ProducerOptions extends BaseClientOptions { 6 + /** An optional record key to a Cistern public key. Assumed to be within the specified user's PDS, and retrieved before instantiation. You can omit this value if you intend to select a public key later */ 7 publicKey?: RecordKey; 8 } 9 10 + /** Required parameters for constructing a `Producer`. These are automatically created for you in `createProducer` */ 11 export type ProducerParams = ClientRequirements<ProducerOptions> & { 12 + /** Optional public key and its contents */ 13 publicKey?: PublicKeyOption; 14 }; 15 16 + /** A simplified public key, suitable for local storage */ 17 export interface PublicKeyOption { 18 + /** Full AT-URI of this key */ 19 uri: ResourceUri; 20 + 21 + /** Generated friendly name for this public key */ 22 name: string; 23 + 24 + /** The contents of this public key, encoded in base64 */ 25 content: string; 26 }