@atproto/lex-client 0.0.12 → 0.0.13
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 +9 -0
- package/dist/client.d.ts +12 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/createRecord.defs.d.ts +13 -9
- package/dist/lexicons/com/atproto/repo/createRecord.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/createRecord.defs.js +3 -2
- package/dist/lexicons/com/atproto/repo/createRecord.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/deleteRecord.defs.d.ts +5 -5
- package/dist/lexicons/com/atproto/repo/deleteRecord.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/deleteRecord.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/getRecord.defs.d.ts +5 -5
- package/dist/lexicons/com/atproto/repo/getRecord.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/getRecord.defs.js +1 -1
- package/dist/lexicons/com/atproto/repo/getRecord.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/listRecords.defs.d.ts +6 -6
- package/dist/lexicons/com/atproto/repo/listRecords.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/listRecords.defs.js +1 -1
- package/dist/lexicons/com/atproto/repo/listRecords.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/putRecord.defs.d.ts +13 -9
- package/dist/lexicons/com/atproto/repo/putRecord.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/putRecord.defs.js +3 -2
- package/dist/lexicons/com/atproto/repo/putRecord.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/repo/uploadBlob.defs.d.ts +5 -5
- package/dist/lexicons/com/atproto/repo/uploadBlob.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/repo/uploadBlob.defs.js.map +1 -1
- package/dist/lexicons/com/atproto/sync/getBlob.defs.d.ts +3 -3
- package/dist/lexicons/com/atproto/sync/getBlob.defs.d.ts.map +1 -1
- package/dist/lexicons/com/atproto/sync/getBlob.defs.js.map +1 -1
- package/package.json +6 -6
- package/src/client.ts +4 -4
- package/src/lexicons/com/atproto/repo/createRecord.defs.ts +15 -7
- package/src/lexicons/com/atproto/repo/deleteRecord.defs.ts +11 -5
- package/src/lexicons/com/atproto/repo/getRecord.defs.ts +7 -4
- package/src/lexicons/com/atproto/repo/listRecords.defs.ts +8 -5
- package/src/lexicons/com/atproto/repo/putRecord.defs.ts +15 -7
- package/src/lexicons/com/atproto/repo/uploadBlob.defs.ts +11 -5
- package/src/lexicons/com/atproto/sync/getBlob.defs.ts +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atproto/lex-client
|
|
2
2
|
|
|
3
|
+
## 0.0.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`39dea03`](https://github.com/bluesky-social/atproto/commit/39dea03c417a1da069962560505427a7aa25ad7a), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`39dea03`](https://github.com/bluesky-social/atproto/commit/39dea03c417a1da069962560505427a7aa25ad7a), [`39dea03`](https://github.com/bluesky-social/atproto/commit/39dea03c417a1da069962560505427a7aa25ad7a), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`39dea03`](https://github.com/bluesky-social/atproto/commit/39dea03c417a1da069962560505427a7aa25ad7a), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df), [`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df)]:
|
|
8
|
+
- @atproto/lex-schema@0.0.13
|
|
9
|
+
- @atproto/lex-data@0.0.12
|
|
10
|
+
- @atproto/lex-json@0.0.12
|
|
11
|
+
|
|
3
12
|
## 0.0.12
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LexMap, LexValue, TypedLexMap } from '@atproto/lex-data';
|
|
2
|
-
import { AtIdentifierString, CidString, DidString, Infer, InferMethodInputBody, InferMethodOutputBody, InferRecordKey, LexiconRecordKey, Main, NsidString, Params, Procedure, Query, RecordSchema, Restricted
|
|
2
|
+
import { AtIdentifierString, CidString, DidString, Infer, InferMethodInputBody, InferMethodOutputBody, InferRecordKey, LexiconRecordKey, Main, NsidString, Params, Procedure, Query, RecordSchema, Restricted } from '@atproto/lex-schema';
|
|
3
3
|
import { Agent, AgentOptions } from './agent.js';
|
|
4
4
|
import { XrpcFailure } from './errors.js';
|
|
5
5
|
import { com } from './lexicons/index.js';
|
|
@@ -180,7 +180,7 @@ export type ListOutput<T extends RecordSchema> = InferMethodOutputBody<typeof co
|
|
|
180
180
|
/** Records that successfully validated against the schema. */
|
|
181
181
|
records: ListRecord<Infer<T>>[];
|
|
182
182
|
/** Records that failed schema validation. */
|
|
183
|
-
invalid:
|
|
183
|
+
invalid: LexMap[];
|
|
184
184
|
};
|
|
185
185
|
/**
|
|
186
186
|
* A record from a list operation with its value typed to the schema.
|
|
@@ -354,7 +354,7 @@ export declare class Client implements Agent {
|
|
|
354
354
|
readonly maxLength: 512;
|
|
355
355
|
}>>;
|
|
356
356
|
validate: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").BooleanSchema>;
|
|
357
|
-
record: import("@atproto/lex-schema").
|
|
357
|
+
record: import("@atproto/lex-schema").LexMapSchema;
|
|
358
358
|
swapCommit: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").StringSchema<{
|
|
359
359
|
readonly format: "cid";
|
|
360
360
|
}>>;
|
|
@@ -366,7 +366,9 @@ export declare class Client implements Agent {
|
|
|
366
366
|
readonly format: "cid";
|
|
367
367
|
}>;
|
|
368
368
|
commit: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").RefSchema<import("@atproto/lex-schema").Validator<com.atproto.repo.defs.$defs.CommitMeta, com.atproto.repo.defs.$defs.CommitMeta>>>;
|
|
369
|
-
validationStatus: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").StringSchema<{
|
|
369
|
+
validationStatus: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").StringSchema<{
|
|
370
|
+
knownValues: ["valid", "unknown"];
|
|
371
|
+
}>>;
|
|
370
372
|
}>>, readonly ["InvalidSwap"]>>>;
|
|
371
373
|
/**
|
|
372
374
|
* Deletes a record from an AT Protocol repository.
|
|
@@ -425,7 +427,7 @@ export declare class Client implements Agent {
|
|
|
425
427
|
cid: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").StringSchema<{
|
|
426
428
|
readonly format: "cid";
|
|
427
429
|
}>>;
|
|
428
|
-
value: import("@atproto/lex-schema").
|
|
430
|
+
value: import("@atproto/lex-schema").LexMapSchema;
|
|
429
431
|
}>>, readonly ["RecordNotFound"]>>>;
|
|
430
432
|
/**
|
|
431
433
|
* Creates or updates a record in a repository.
|
|
@@ -448,7 +450,7 @@ export declare class Client implements Agent {
|
|
|
448
450
|
readonly maxLength: 512;
|
|
449
451
|
}>;
|
|
450
452
|
validate: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").BooleanSchema>;
|
|
451
|
-
record: import("@atproto/lex-schema").
|
|
453
|
+
record: import("@atproto/lex-schema").LexMapSchema;
|
|
452
454
|
swapRecord: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").NullableSchema<import("@atproto/lex-schema").StringSchema<{
|
|
453
455
|
readonly format: "cid";
|
|
454
456
|
}>>>;
|
|
@@ -463,7 +465,9 @@ export declare class Client implements Agent {
|
|
|
463
465
|
readonly format: "cid";
|
|
464
466
|
}>;
|
|
465
467
|
commit: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").RefSchema<import("@atproto/lex-schema").Validator<com.atproto.repo.defs.$defs.CommitMeta, com.atproto.repo.defs.$defs.CommitMeta>>>;
|
|
466
|
-
validationStatus: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").StringSchema<{
|
|
468
|
+
validationStatus: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").StringSchema<{
|
|
469
|
+
knownValues: ["valid", "unknown"];
|
|
470
|
+
}>>;
|
|
467
471
|
}>>, readonly ["InvalidSwap"]>>>;
|
|
468
472
|
/**
|
|
469
473
|
* Lists records in a collection.
|
|
@@ -481,7 +485,7 @@ export declare class Client implements Agent {
|
|
|
481
485
|
readonly format: "nsid";
|
|
482
486
|
}>;
|
|
483
487
|
readonly limit: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").WithDefaultSchema<import("@atproto/lex-schema").IntegerSchema>>;
|
|
484
|
-
readonly cursor: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").StringSchema<
|
|
488
|
+
readonly cursor: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").StringSchema<{}>>;
|
|
485
489
|
readonly reverse: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").BooleanSchema>;
|
|
486
490
|
}>, import("@atproto/lex-schema").Payload<"application/json", import("@atproto/lex-schema").ObjectSchema<{
|
|
487
491
|
cursor: import("@atproto/lex-schema").OptionalSchema<import("@atproto/lex-schema").StringSchema<{}>>;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,KAAK,EACL,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,YAAY,EACZ,UAAU,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,KAAK,EACL,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,MAAM,EACN,SAAS,EACT,KAAK,EACL,YAAY,EACZ,UAAU,EAEX,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAE,YAAY,EAAc,MAAM,YAAY,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,C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;IAET,IAAI,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACtC,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAC5B,CAAC;IAED,MAAM,IAAI,SAAS,CACjB,mDAAmD,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,KAAK,GAAG,CACnF,CAAA;AACH,CAAC","sourcesContent":["import { LexError, LexMap, LexValue, TypedLexMap } from '@atproto/lex-data'\nimport {\n AtIdentifierString,\n CidString,\n DidString,\n Infer,\n InferMethodInputBody,\n InferMethodOutputBody,\n InferRecordKey,\n LexiconRecordKey,\n Main,\n NsidString,\n Params,\n Procedure,\n Query,\n RecordSchema,\n Restricted,\n UnknownObject,\n getMain,\n} from '@atproto/lex-schema'\nimport { Agent, AgentOptions, buildAgent } from './agent.js'\nimport { XrpcFailure } from './errors.js'\nimport { com } from './lexicons/index.js'\nimport { XrpcResponse, XrpcResponseBody } from './response.js'\nimport { BinaryBodyInit, CallOptions, Service } from './types.js'\nimport { buildAtprotoHeaders } from './util.js'\nimport { XrpcOptions, XrpcRequestParams, xrpc, xrpcSafe } from './xrpc.js'\n\nexport type {\n AtIdentifierString,\n CidString,\n DidString,\n Infer,\n InferMethodInputBody,\n InferMethodOutputBody,\n InferRecordKey,\n LexMap,\n LexValue,\n LexiconRecordKey,\n Main,\n NsidString,\n Params,\n Procedure,\n Query,\n RecordSchema,\n Restricted,\n TypedLexMap,\n}\n\n/**\n * Configuration options for creating a {@link Client}.\n *\n * @example\n * ```typescript\n * const options: ClientOptions = {\n * labelers: ['did:plc:labeler1'],\n * service: 'did:web:api.bsky.app#bsky_appview',\n * headers: { 'X-Custom-Header': 'value' }\n * }\n * ```\n */\nexport type ClientOptions = {\n /** Labeler DIDs to include in requests for content moderation. */\n labelers?: Iterable<DidString>\n /** Custom headers to include in all requests made by this client. */\n headers?: HeadersInit\n /** Service proxy identifier for routing requests through a specific service. */\n service?: Service\n}\n\n/**\n * A composable action that can be invoked via {@link Client.call}.\n *\n * Actions provide a way to define custom operations that integrate with the\n * Client's call interface, enabling type-safe, reusable business logic.\n *\n * @typeParam I - The input type for the action\n * @typeParam O - The output type for the action\n *\n * @example\n * ```typescript\n * const myAction: Action<{ userId: string }, { profile: Profile }> = async (client, input, options) => {\n * const response = await client.xrpc(someMethod, { params: { actor: input.userId }, ...options })\n * return { profile: response.body }\n * }\n * ```\n */\nexport type Action<I = any, O = any> = (\n client: Client,\n input: I,\n options: CallOptions,\n) => O | Promise<O>\n\n/**\n * Extracts the input type from an {@link Action}.\n * @typeParam A - The Action type to extract from\n */\nexport type InferActionInput<A extends Action> =\n A extends Action<infer I, any> ? I : never\n\n/**\n * Extracts the output type from an {@link Action}.\n * @typeParam A - The Action type to extract from\n */\nexport type InferActionOutput<A extends Action> =\n A extends Action<any, infer O> ? O : never\n\n/**\n * Options for creating a record in an AT Protocol repository.\n *\n * @see {@link Client.createRecord}\n */\nexport type CreateRecordOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n /** Compare-and-swap on the repo commit. If specified, must match current commit. */\n swapCommit?: string\n /** Whether to validate the record against its lexicon schema. */\n validate?: boolean\n}\n\n/**\n * Options for deleting a record from an AT Protocol repository.\n *\n * @see {@link Client.deleteRecord}\n */\nexport type DeleteRecordOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n /** Compare-and-swap on the repo commit. If specified, must match current commit. */\n swapCommit?: string\n /** Compare-and-swap on the record CID. If specified, must match current record. */\n swapRecord?: string\n}\n\n/**\n * Options for retrieving a record from an AT Protocol repository.\n *\n * @see {@link Client.getRecord}\n */\nexport type GetRecordOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n}\n\n/**\n * Options for creating or updating a record in an AT Protocol repository.\n *\n * @see {@link Client.putRecord}\n */\nexport type PutRecordOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n /** Compare-and-swap on the repo commit. If specified, must match current commit. */\n swapCommit?: string\n /** Compare-and-swap on the record CID. If specified, must match current record. */\n swapRecord?: string\n /** Whether to validate the record against its lexicon schema. */\n validate?: boolean\n}\n\n/**\n * Options for listing records in an AT Protocol repository collection.\n *\n * @see {@link Client.listRecords}\n */\nexport type ListRecordsOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n /** Maximum number of records to return. */\n limit?: number\n /** Pagination cursor from a previous response. */\n cursor?: string\n /** If true, returns records in reverse chronological order. */\n reverse?: boolean\n}\n\nexport type RecordKeyOptions<\n T extends RecordSchema,\n AlsoOptionalWhenRecordKeyIs extends LexiconRecordKey = never,\n> = T['key'] extends `literal:${string}` | AlsoOptionalWhenRecordKeyIs\n ? { rkey?: InferRecordKey<T> }\n : { rkey: InferRecordKey<T> }\n\n/**\n * Type-safe options for {@link Client.create}, combining record options with key requirements.\n * @typeParam T - The record schema type\n */\nexport type CreateOptions<T extends RecordSchema> = CreateRecordOptions &\n RecordKeyOptions<T, 'tid' | 'any'>\n\n/**\n * Output type for record creation operations.\n * Contains the URI and CID of the newly created record.\n */\nexport type CreateOutput = InferMethodOutputBody<\n typeof com.atproto.repo.createRecord.main,\n Uint8Array\n>\n\n/**\n * Type-safe options for {@link Client.delete}, combining delete options with key requirements.\n * @typeParam T - The record schema type\n */\nexport type DeleteOptions<T extends RecordSchema> = DeleteRecordOptions &\n RecordKeyOptions<T>\n\n/**\n * Output type for record deletion operations.\n */\nexport type DeleteOutput = InferMethodOutputBody<\n typeof com.atproto.repo.deleteRecord.main,\n Uint8Array\n>\n\n/**\n * Type-safe options for {@link Client.get}, combining get options with key requirements.\n * @typeParam T - The record schema type\n */\nexport type GetOptions<T extends RecordSchema> = GetRecordOptions &\n RecordKeyOptions<T>\n\n/**\n * Output type for record retrieval operations.\n * Contains the record value validated against the schema type.\n * @typeParam T - The record schema type\n */\nexport type GetOutput<T extends RecordSchema> = Omit<\n InferMethodOutputBody<typeof com.atproto.repo.getRecord.main, Uint8Array>,\n 'value'\n> & { value: Infer<T> }\n\n/**\n * Type-safe options for {@link Client.put}, combining put options with key requirements.\n * @typeParam T - The record schema type\n */\nexport type PutOptions<T extends RecordSchema> = PutRecordOptions &\n RecordKeyOptions<T>\n\n/**\n * Output type for record put (create/update) operations.\n * Contains the URI and CID of the record.\n */\nexport type PutOutput = InferMethodOutputBody<\n typeof com.atproto.repo.putRecord.main,\n Uint8Array\n>\n\n/**\n * Options for {@link Client.list} operations.\n */\nexport type ListOptions = ListRecordsOptions\n\n/**\n * Output type for record listing operations.\n * Contains validated records and any invalid records that failed schema validation.\n * @typeParam T - The record schema type\n */\nexport type ListOutput<T extends RecordSchema> = InferMethodOutputBody<\n typeof com.atproto.repo.listRecords.main,\n Uint8Array\n> & {\n /** Records that successfully validated against the schema. */\n records: ListRecord<Infer<T>>[]\n // @NOTE Because the schema uses \"type\": \"unknown\" instead of an open union,\n // we have to use UnknownObject instead of Unknown$TypedObject here.\n /** Records that failed schema validation. */\n invalid: UnknownObject[]\n}\n\n/**\n * A record from a list operation with its value typed to the schema.\n * @typeParam Value - The validated record value type\n */\nexport type ListRecord<Value extends LexMap> =\n com.atproto.repo.listRecords.Record & {\n value: Value\n }\n\n/**\n * The Client class is the primary interface for interacting with AT Protocol\n * services. It provides type-safe methods for XRPC calls, record operations,\n * and blob handling.\n *\n * @example Basic usage\n * ```typescript\n * import { Client } from '@atproto/lex'\n *\n * const client = new Client(agent)\n * const response = await client.xrpc(app.bsky.feed.getTimeline.main, {\n * params: { limit: 50 }\n * })\n * ```\n */\nexport class Client implements Agent {\n static appLabelers: readonly DidString[] = []\n\n /**\n * Configures the Client (or its sub classes) globally.\n */\n static configure(opts: { appLabelers?: Iterable<DidString> }) {\n if (opts.appLabelers) this.appLabelers = [...opts.appLabelers]\n }\n\n /** The underlying agent used for making requests. */\n public readonly agent: Agent\n\n /** Custom headers included in all requests. */\n public readonly headers: Headers\n\n /** Optional service identifier for routing requests. */\n public readonly service?: Service\n\n /** Set of labeler DIDs specific to this client instance. */\n public readonly labelers: Set<DidString>\n\n constructor(agent: Agent | AgentOptions, options: ClientOptions = {}) {\n this.agent = buildAgent(agent)\n this.service = options.service\n this.labelers = new Set(options.labelers)\n this.headers = new Headers(options.headers)\n }\n\n /**\n * The DID of the authenticated user, or `undefined` if not authenticated.\n */\n get did(): DidString | undefined {\n return this.agent.did\n }\n\n /**\n * The DID of the authenticated user.\n * @throws {LexError} with code 'AuthenticationRequired' if not authenticated\n */\n get assertDid(): DidString {\n this.assertAuthenticated()\n return this.did\n }\n\n /**\n * Asserts that the client is authenticated.\n * Use as a type guard when you need to ensure authentication.\n *\n * @throws {LexError} with code 'AuthenticationRequired' if not authenticated\n *\n * @example\n * ```typescript\n * client.assertAuthenticated()\n * // TypeScript now knows client.did is defined\n * console.log(client.did)\n * ```\n */\n public assertAuthenticated(): asserts this is { did: DidString } {\n if (!this.did) throw new LexError('AuthenticationRequired')\n }\n\n /**\n * Replaces all labelers with the given set.\n * @param labelers - Iterable of labeler DIDs\n */\n public setLabelers(labelers: Iterable<DidString> = []) {\n this.clearLabelers()\n this.addLabelers(labelers)\n }\n\n /**\n * Adds labelers to the current set.\n * @param labelers - Iterable of labeler DIDs to add\n */\n public addLabelers(labelers: Iterable<DidString>) {\n for (const labeler of labelers) this.labelers.add(labeler)\n }\n\n /**\n * Removes all labelers from this client instance.\n */\n public clearLabelers() {\n this.labelers.clear()\n }\n\n /**\n * Low-level fetch handler for making requests.\n * @param path - The request path\n * @param init - Request initialization options\n */\n public fetchHandler(path: string, init: RequestInit): Promise<Response> {\n const headers = buildAtprotoHeaders({\n headers: init.headers,\n service: this.service,\n labelers: [\n ...(this.constructor as typeof Client).appLabelers.map(\n (l) => `${l};redact` as const,\n ),\n ...this.labelers,\n ],\n })\n\n // Incoming headers take precedence\n for (const [key, value] of this.headers) {\n if (!headers.has(key)) headers.set(key, value)\n }\n\n // @NOTE The agent here could be another Client instance.\n return this.agent.fetchHandler(path, { ...init, headers })\n }\n\n /**\n * Makes an XRPC request. Throws on failure.\n *\n * @param ns - The lexicon method definition (e.g., `app.bsky.feed.getTimeline`)\n * @param options - Request options including params and body\n * @returns The successful XRPC response\n * @throws {XrpcFailure} when the request fails or returns an error\n *\n * @example Query with parameters\n * ```typescript\n * const response = await client.xrpc(app.bsky.feed.getTimeline, {\n * params: { limit: 50, cursor: 'abc123' }\n * })\n * console.log(response.body.feed)\n * ```\n *\n * @example Procedure with body\n * ```typescript\n * const response = await client.xrpc(com.atproto.repo.createRecord, {\n * body: {\n * repo: client.assertDid,\n * collection: 'app.bsky.feed.post',\n * record: { text: 'Hello!', createdAt: new Date().toISOString() }\n * }\n * })\n * ```\n *\n * @see {@link xrpcSafe} for a non-throwing variant\n */\n async xrpc<const M extends Query | Procedure>(\n ns: NonNullable<unknown> extends XrpcOptions<M>\n ? Main<M>\n : Restricted<'This XRPC method requires an \"options\" argument'>,\n ): Promise<XrpcResponse<M>>\n async xrpc<const M extends Query | Procedure>(\n ns: Main<M>,\n options: XrpcOptions<M>,\n ): Promise<XrpcResponse<M>>\n async xrpc<const M extends Query | Procedure>(\n ns: Main<M>,\n options: XrpcOptions<M> = {} as XrpcOptions<M>,\n ): Promise<XrpcResponse<M>> {\n return xrpc(this, ns, options)\n }\n\n /**\n * Makes an XRPC request without throwing on failure.\n * Returns either a successful response or a failure object.\n *\n * @param ns - The lexicon method definition\n * @param options - Request options\n * @returns Either an XrpcResponse on success or XrpcFailure on failure\n *\n * @example\n * ```typescript\n * const result = await client.xrpcSafe(app.bsky.actor.getProfile.main, {\n * params: { actor: 'alice.bsky.social' }\n * })\n *\n * if (result.success) {\n * console.log(result.body.displayName)\n * } else {\n * console.error('Failed:', result.error)\n * }\n * ```\n *\n * @see {@link xrpc} for a throwing variant\n */\n async xrpcSafe<const M extends Query | Procedure>(\n ns: NonNullable<unknown> extends XrpcOptions<M>\n ? Main<M>\n : Restricted<'This XRPC method requires an \"options\" argument'>,\n ): Promise<XrpcResponse<M> | XrpcFailure<M>>\n async xrpcSafe<const M extends Query | Procedure>(\n ns: Main<M>,\n options: XrpcOptions<M>,\n ): Promise<XrpcResponse<M> | XrpcFailure<M>>\n async xrpcSafe<const M extends Query | Procedure>(\n ns: Main<M>,\n options: XrpcOptions<M> = {} as XrpcOptions<M>,\n ): Promise<XrpcResponse<M> | XrpcFailure<M>> {\n return xrpcSafe(this, ns, options)\n }\n\n /**\n * Creates a new record in an AT Protocol repository.\n *\n * @param record - The record to create, must include an {@link NsidString} `$type`\n * @param rkey - Optional record key; if omitted, server generates a TID\n * @param options - Create options including repo, swapCommit, validate\n * @returns The XRPC response containing the created record's URI and CID\n *\n * @example\n * ```typescript\n * const response = await client.createRecord(\n * { $type: 'app.bsky.feed.post', text: 'Hello!', createdAt: new Date().toISOString() },\n * undefined, // Let server generate rkey\n * { validate: true }\n * )\n * console.log(response.body.uri)\n * ```\n *\n * @see {@link create} for a higher-level typed alternative\n */\n public async createRecord(\n record: TypedLexMap<NsidString>,\n rkey?: string,\n options?: CreateRecordOptions,\n ) {\n return this.xrpc(com.atproto.repo.createRecord.main, {\n ...options,\n body: {\n repo: options?.repo ?? this.assertDid,\n collection: record.$type,\n record,\n rkey,\n validate: options?.validate,\n swapCommit: options?.swapCommit,\n },\n })\n }\n\n /**\n * Deletes a record from an AT Protocol repository.\n *\n * @param collection - The collection NSID\n * @param rkey - The record key\n * @param options - Delete options including repo, swapCommit, swapRecord\n *\n * @see {@link delete} for a higher-level typed alternative\n */\n async deleteRecord(\n collection: NsidString,\n rkey: string,\n options?: DeleteRecordOptions,\n ) {\n return this.xrpc(com.atproto.repo.deleteRecord.main, {\n ...options,\n body: {\n repo: options?.repo ?? this.assertDid,\n collection,\n rkey,\n swapCommit: options?.swapCommit,\n swapRecord: options?.swapRecord,\n },\n })\n }\n\n /**\n * Retrieves a record from an AT Protocol repository.\n *\n * @param collection - The collection NSID\n * @param rkey - The record key\n * @param options - Get options including repo\n *\n * @see {@link get} for a higher-level typed alternative\n */\n public async getRecord(\n collection: NsidString,\n rkey: string,\n options?: GetRecordOptions,\n ) {\n return this.xrpc(com.atproto.repo.getRecord.main, {\n ...options,\n params: {\n repo: options?.repo ?? this.assertDid,\n collection,\n rkey,\n },\n })\n }\n\n /**\n * Creates or updates a record in a repository.\n *\n * @param record - The record to put, must include an {@link NsidString} `$type`\n * @param rkey - The record key\n * @param options - Put options including repo, swapCommit, swapRecord, validate\n *\n * @see {@link put} for a higher-level typed alternative\n */\n async putRecord(\n record: TypedLexMap<NsidString>,\n rkey: string,\n options?: PutRecordOptions,\n ) {\n return this.xrpc(com.atproto.repo.putRecord.main, {\n ...options,\n body: {\n repo: options?.repo ?? this.assertDid,\n collection: record.$type,\n rkey,\n record,\n validate: options?.validate,\n swapCommit: options?.swapCommit,\n swapRecord: options?.swapRecord,\n },\n })\n }\n\n /**\n * Lists records in a collection.\n *\n * @param nsid - The collection NSID\n * @param options - List options including repo, limit, cursor, reverse\n *\n * @see {@link list} for a higher-level typed alternative\n */\n async listRecords(nsid: NsidString, options?: ListRecordsOptions) {\n return this.xrpc(com.atproto.repo.listRecords.main, {\n ...options,\n params: {\n repo: options?.repo ?? this.assertDid,\n collection: nsid,\n cursor: options?.cursor,\n limit: options?.limit,\n reverse: options?.reverse,\n },\n })\n }\n\n /**\n * Uploads a blob to an AT Protocol repository.\n *\n * @param body - The blob data (Uint8Array, ReadableStream, Blob, etc.)\n * @param options - Upload options including encoding hint\n * @returns Response containing the blob reference\n *\n * @example\n * ```typescript\n * const imageData = await fetch('image.png').then(r => r.arrayBuffer())\n * const response = await client.uploadBlob(new Uint8Array(imageData), {\n * encoding: 'image/png'\n * })\n * console.log(response.body.blob) // Use this ref in records\n * ```\n */\n async uploadBlob(\n body: BinaryBodyInit,\n options?: CallOptions & { encoding?: `${string}/${string}` },\n ) {\n return this.xrpc(com.atproto.repo.uploadBlob.main, {\n ...options,\n body,\n })\n }\n\n /**\n * Retrieves a blob by DID and CID.\n *\n * @param did - The DID of the repository containing the blob\n * @param cid - The CID of the blob\n * @param options - Call options\n */\n async getBlob(did: DidString, cid: CidString, options?: CallOptions) {\n return this.xrpc(com.atproto.sync.getBlob.main, {\n ...options,\n params: { did, cid },\n })\n }\n\n /**\n * Universal call method for queries, procedures, and custom actions.\n * Automatically determines the call type based on the lexicon definition.\n *\n * @param ns - The lexicon method or action definition\n * @param arg - The input argument (params for queries, body for procedures, input for actions)\n * @param options - Call options\n * @returns The method response body or action output\n * @see {@link xrpc} if you need access to the full response object\n *\n * @example Query\n * ```typescript\n * const profile = await client.call(app.bsky.actor.getProfile.main, {\n * actor: 'alice.bsky.social'\n * })\n * ```\n *\n * @example Procedure\n * ```typescript\n * const result = await client.call(com.atproto.repo.createRecord.main, {\n * repo: did,\n * collection: 'app.bsky.feed.post',\n * record: { text: 'Hello!' }\n * })\n * ```\n */\n public async call<const T extends Query>(\n ns: NonNullable<unknown> extends XrpcRequestParams<T>\n ? Main<T>\n : Restricted<'This query type requires a \"params\" argument'>,\n ): Promise<XrpcResponseBody<T>>\n public async call<const T extends Procedure>(\n ns: undefined extends InferMethodInputBody<T, Uint8Array>\n ? Main<T>\n : Restricted<'This procedure type requires an \"input\" argument'>,\n ): Promise<XrpcResponseBody<T>>\n public async call<const T extends Action>(\n ns: void extends InferActionInput<T>\n ? Main<T>\n : Restricted<'This action type requires an \"input\" argument'>,\n ): Promise<InferActionOutput<T>>\n public async call<const T extends Action | Procedure | Query>(\n ns: Main<T>,\n arg: T extends Action\n ? InferActionInput<T>\n : T extends Procedure\n ? InferMethodInputBody<T, Uint8Array>\n : T extends Query\n ? XrpcRequestParams<T>\n : never,\n options?: CallOptions,\n ): Promise<\n T extends Action\n ? InferActionOutput<T>\n : T extends Procedure\n ? XrpcResponseBody<T>\n : T extends Query\n ? XrpcResponseBody<T>\n : never\n >\n public async call(\n ns: Main<Action> | Main<Procedure> | Main<Query>,\n arg?: LexValue | Params,\n options: CallOptions = {},\n ): Promise<unknown> {\n const method = getMain(ns)\n\n if (typeof method === 'function') {\n return method(this, arg, options)\n }\n\n if (method instanceof Procedure) {\n const result = await this.xrpc(method, { ...options, body: arg as any })\n return result.body\n } else if (method instanceof Query) {\n const result = await this.xrpc(method, { ...options, params: arg as any })\n return result.body\n } else {\n throw new TypeError('Invalid lexicon')\n }\n }\n\n /**\n * Creates a new record with full type safety based on the schema.\n *\n * @param ns - The record schema definition\n * @param input - The record data (without `$type`, which is added automatically)\n * @param options - Create options including rkey (required for some record types)\n * @returns The create output including URI and CID\n *\n * @example Creating a post\n * ```typescript\n * const result = await client.create(app.bsky.feed.post.main, {\n * text: 'Hello, world!',\n * createdAt: new Date().toISOString()\n * })\n * console.log(result.uri)\n * ```\n *\n * @example Creating a record with explicit rkey\n * ```typescript\n * const result = await client.create(app.bsky.actor.profile.main, {\n * displayName: 'Alice'\n * }, { rkey: 'self' })\n * ```\n */\n public async create<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends CreateOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n input: Omit<Infer<T>, '$type'>,\n ): Promise<CreateOutput>\n public async create<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<Infer<T>, '$type'>,\n options: CreateOptions<T>,\n ): Promise<CreateOutput>\n public async create<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<Infer<T>, '$type'>,\n options: CreateOptions<T> = {} as CreateOptions<T>,\n ): Promise<CreateOutput> {\n const schema: T = getMain(ns)\n const record = schema.build(input) as TypedLexMap<NsidString>\n const rkey = options.rkey ?? getDefaultRecordKey(schema)\n if (rkey !== undefined) schema.keySchema.assert(rkey)\n const response = await this.createRecord(record, rkey, options)\n return response.body\n }\n\n /**\n * Deletes a record with type-safe options.\n *\n * @param ns - The record schema definition\n * @param options - Delete options (rkey required for non-literal keys)\n * @returns The delete output\n */\n public async delete<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends DeleteOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n ): Promise<DeleteOutput>\n public async delete<const T extends RecordSchema>(\n ns: Main<T>,\n options?: DeleteOptions<T>,\n ): Promise<DeleteOutput>\n public async delete<const T extends RecordSchema>(\n ns: Main<T>,\n options: DeleteOptions<T> = {} as DeleteOptions<T>,\n ): Promise<DeleteOutput> {\n const schema = getMain(ns)\n const rkey = schema.keySchema.parse(\n options.rkey ?? getLiteralRecordKey(schema),\n )\n const response = await this.deleteRecord(schema.$type, rkey, options)\n return response.body\n }\n\n /**\n * Retrieves a record with type-safe validation.\n *\n * @param ns - The record schema definition\n * @param options - Get options (rkey required for non-literal keys)\n * @returns The record data validated against the schema\n *\n * @example\n * ```typescript\n * const profile = await client.get(app.bsky.actor.profile.main)\n * // profile.value is typed as app.bsky.actor.profile.Record\n * console.log(profile.value.displayName)\n * ```\n */\n public async get<const T extends RecordSchema>(\n ns: T['key'] extends `literal:${string}`\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n ): Promise<GetOutput<T>>\n public async get<const T extends RecordSchema>(\n ns: Main<T>,\n options?: GetOptions<T>,\n ): Promise<GetOutput<T>>\n public async get<const T extends RecordSchema>(\n ns: Main<T>,\n options: GetOptions<T> = {} as GetOptions<T>,\n ): Promise<GetOutput<T>> {\n const schema = getMain(ns)\n const rkey = schema.keySchema.parse(\n options.rkey ?? getLiteralRecordKey(schema),\n )\n const response = await this.getRecord(schema.$type, rkey, options)\n const value = schema.validate(response.body.value)\n return { ...response.body, value }\n }\n\n /**\n * Creates or updates a record with full type safety.\n *\n * @param ns - The record schema definition\n * @param input - The record data\n * @param options - Put options (rkey required for non-literal keys)\n * @returns The put output including URI and CID\n */\n public async put<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends PutOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n input: Omit<Infer<T>, '$type'>,\n ): Promise<PutOutput>\n public async put<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<Infer<T>, '$type'>,\n options: PutOptions<T>,\n ): Promise<PutOutput>\n public async put<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<Infer<T>, '$type'>,\n options: PutOptions<T> = {} as PutOptions<T>,\n ): Promise<PutOutput> {\n const schema: T = getMain(ns)\n const record = schema.build(input) as TypedLexMap<NsidString>\n const rkey = options.rkey ?? getLiteralRecordKey(schema)\n const response = await this.putRecord(record, rkey, options)\n return response.body\n }\n\n /**\n * Lists records with type-safe validation and separation of valid/invalid records.\n *\n * @param ns - The record schema definition\n * @param options - List options\n * @returns Records split into valid (matching schema) and invalid arrays\n *\n * @example\n * ```typescript\n * const result = await client.list(app.bsky.feed.post.main, { limit: 100 })\n * console.log(`Found ${result.records.length} valid posts`)\n * console.log(`Found ${result.invalid.length} invalid records`)\n * ```\n */\n async list<const T extends RecordSchema>(\n ns: Main<T>,\n options?: ListOptions,\n ): Promise<ListOutput<T>> {\n const schema = getMain(ns)\n const { body } = await this.listRecords(schema.$type, options)\n\n const records: ListRecord<Infer<T>>[] = []\n const invalid: LexMap[] = []\n\n for (const record of body.records) {\n const parsed = schema.safeValidate(record.value)\n if (parsed.success) {\n records.push({ ...record, value: parsed.value })\n } else {\n invalid.push(record.value)\n }\n }\n\n return { ...body, records, invalid }\n }\n}\n\nfunction getDefaultRecordKey<const T extends RecordSchema>(\n schema: T,\n): undefined | InferRecordKey<T> {\n // Let the server generate the TID\n if (schema.key === 'tid') return undefined\n if (schema.key === 'any') return undefined\n\n return getLiteralRecordKey(schema)\n}\n\nfunction getLiteralRecordKey<const T extends RecordSchema>(\n schema: T,\n): InferRecordKey<T> {\n if (schema.key.startsWith('literal:')) {\n return schema.key.slice(8)\n }\n\n throw new TypeError(\n `An \"rkey\" must be provided for record key type \"${schema.key}\" (${schema.$type})`,\n )\n}\n"]}
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"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CAAC;;AAxnBH,wBAynBC;AAED,SAAS,mBAAmB,CAC1B,MAAS;IAET,kCAAkC;IAClC,IAAI,MAAM,CAAC,GAAG,KAAK,KAAK;QAAE,OAAO,SAAS,CAAA;IAC1C,IAAI,MAAM,CAAC,GAAG,KAAK,KAAK;QAAE,OAAO,SAAS,CAAA;IAE1C,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAA;AACpC,CAAC;AAED,SAAS,mBAAmB,CAC1B,MAAS;IAET,IAAI,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACtC,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAsB,CAAA;IACjD,CAAC;IAED,MAAM,IAAI,SAAS,CACjB,mDAAmD,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,KAAK,GAAG,CACnF,CAAA;AACH,CAAC","sourcesContent":["import { LexError, LexMap, LexValue, TypedLexMap } from '@atproto/lex-data'\nimport {\n AtIdentifierString,\n CidString,\n DidString,\n Infer,\n InferMethodInputBody,\n InferMethodOutputBody,\n InferRecordKey,\n LexiconRecordKey,\n Main,\n NsidString,\n Params,\n Procedure,\n Query,\n RecordSchema,\n Restricted,\n getMain,\n} from '@atproto/lex-schema'\nimport { Agent, AgentOptions, buildAgent } from './agent.js'\nimport { XrpcFailure } from './errors.js'\nimport { com } from './lexicons/index.js'\nimport { XrpcResponse, XrpcResponseBody } from './response.js'\nimport { BinaryBodyInit, CallOptions, Service } from './types.js'\nimport { buildAtprotoHeaders } from './util.js'\nimport { XrpcOptions, XrpcRequestParams, xrpc, xrpcSafe } from './xrpc.js'\n\nexport type {\n AtIdentifierString,\n CidString,\n DidString,\n Infer,\n InferMethodInputBody,\n InferMethodOutputBody,\n InferRecordKey,\n LexMap,\n LexValue,\n LexiconRecordKey,\n Main,\n NsidString,\n Params,\n Procedure,\n Query,\n RecordSchema,\n Restricted,\n TypedLexMap,\n}\n\n/**\n * Configuration options for creating a {@link Client}.\n *\n * @example\n * ```typescript\n * const options: ClientOptions = {\n * labelers: ['did:plc:labeler1'],\n * service: 'did:web:api.bsky.app#bsky_appview',\n * headers: { 'X-Custom-Header': 'value' }\n * }\n * ```\n */\nexport type ClientOptions = {\n /** Labeler DIDs to include in requests for content moderation. */\n labelers?: Iterable<DidString>\n /** Custom headers to include in all requests made by this client. */\n headers?: HeadersInit\n /** Service proxy identifier for routing requests through a specific service. */\n service?: Service\n}\n\n/**\n * A composable action that can be invoked via {@link Client.call}.\n *\n * Actions provide a way to define custom operations that integrate with the\n * Client's call interface, enabling type-safe, reusable business logic.\n *\n * @typeParam I - The input type for the action\n * @typeParam O - The output type for the action\n *\n * @example\n * ```typescript\n * const myAction: Action<{ userId: string }, { profile: Profile }> = async (client, input, options) => {\n * const response = await client.xrpc(someMethod, { params: { actor: input.userId }, ...options })\n * return { profile: response.body }\n * }\n * ```\n */\nexport type Action<I = any, O = any> = (\n client: Client,\n input: I,\n options: CallOptions,\n) => O | Promise<O>\n\n/**\n * Extracts the input type from an {@link Action}.\n * @typeParam A - The Action type to extract from\n */\nexport type InferActionInput<A extends Action> =\n A extends Action<infer I, any> ? I : never\n\n/**\n * Extracts the output type from an {@link Action}.\n * @typeParam A - The Action type to extract from\n */\nexport type InferActionOutput<A extends Action> =\n A extends Action<any, infer O> ? O : never\n\n/**\n * Options for creating a record in an AT Protocol repository.\n *\n * @see {@link Client.createRecord}\n */\nexport type CreateRecordOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n /** Compare-and-swap on the repo commit. If specified, must match current commit. */\n swapCommit?: string\n /** Whether to validate the record against its lexicon schema. */\n validate?: boolean\n}\n\n/**\n * Options for deleting a record from an AT Protocol repository.\n *\n * @see {@link Client.deleteRecord}\n */\nexport type DeleteRecordOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n /** Compare-and-swap on the repo commit. If specified, must match current commit. */\n swapCommit?: string\n /** Compare-and-swap on the record CID. If specified, must match current record. */\n swapRecord?: string\n}\n\n/**\n * Options for retrieving a record from an AT Protocol repository.\n *\n * @see {@link Client.getRecord}\n */\nexport type GetRecordOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n}\n\n/**\n * Options for creating or updating a record in an AT Protocol repository.\n *\n * @see {@link Client.putRecord}\n */\nexport type PutRecordOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n /** Compare-and-swap on the repo commit. If specified, must match current commit. */\n swapCommit?: string\n /** Compare-and-swap on the record CID. If specified, must match current record. */\n swapRecord?: string\n /** Whether to validate the record against its lexicon schema. */\n validate?: boolean\n}\n\n/**\n * Options for listing records in an AT Protocol repository collection.\n *\n * @see {@link Client.listRecords}\n */\nexport type ListRecordsOptions = CallOptions & {\n /** Repository identifier (DID or handle). Defaults to authenticated user's DID. */\n repo?: AtIdentifierString\n /** Maximum number of records to return. */\n limit?: number\n /** Pagination cursor from a previous response. */\n cursor?: string\n /** If true, returns records in reverse chronological order. */\n reverse?: boolean\n}\n\nexport type RecordKeyOptions<\n T extends RecordSchema,\n AlsoOptionalWhenRecordKeyIs extends LexiconRecordKey = never,\n> = T['key'] extends `literal:${string}` | AlsoOptionalWhenRecordKeyIs\n ? { rkey?: InferRecordKey<T> }\n : { rkey: InferRecordKey<T> }\n\n/**\n * Type-safe options for {@link Client.create}, combining record options with key requirements.\n * @typeParam T - The record schema type\n */\nexport type CreateOptions<T extends RecordSchema> = CreateRecordOptions &\n RecordKeyOptions<T, 'tid' | 'any'>\n\n/**\n * Output type for record creation operations.\n * Contains the URI and CID of the newly created record.\n */\nexport type CreateOutput = InferMethodOutputBody<\n typeof com.atproto.repo.createRecord.main,\n Uint8Array\n>\n\n/**\n * Type-safe options for {@link Client.delete}, combining delete options with key requirements.\n * @typeParam T - The record schema type\n */\nexport type DeleteOptions<T extends RecordSchema> = DeleteRecordOptions &\n RecordKeyOptions<T>\n\n/**\n * Output type for record deletion operations.\n */\nexport type DeleteOutput = InferMethodOutputBody<\n typeof com.atproto.repo.deleteRecord.main,\n Uint8Array\n>\n\n/**\n * Type-safe options for {@link Client.get}, combining get options with key requirements.\n * @typeParam T - The record schema type\n */\nexport type GetOptions<T extends RecordSchema> = GetRecordOptions &\n RecordKeyOptions<T>\n\n/**\n * Output type for record retrieval operations.\n * Contains the record value validated against the schema type.\n * @typeParam T - The record schema type\n */\nexport type GetOutput<T extends RecordSchema> = Omit<\n InferMethodOutputBody<typeof com.atproto.repo.getRecord.main, Uint8Array>,\n 'value'\n> & { value: Infer<T> }\n\n/**\n * Type-safe options for {@link Client.put}, combining put options with key requirements.\n * @typeParam T - The record schema type\n */\nexport type PutOptions<T extends RecordSchema> = PutRecordOptions &\n RecordKeyOptions<T>\n\n/**\n * Output type for record put (create/update) operations.\n * Contains the URI and CID of the record.\n */\nexport type PutOutput = InferMethodOutputBody<\n typeof com.atproto.repo.putRecord.main,\n Uint8Array\n>\n\n/**\n * Options for {@link Client.list} operations.\n */\nexport type ListOptions = ListRecordsOptions\n\n/**\n * Output type for record listing operations.\n * Contains validated records and any invalid records that failed schema validation.\n * @typeParam T - The record schema type\n */\nexport type ListOutput<T extends RecordSchema> = InferMethodOutputBody<\n typeof com.atproto.repo.listRecords.main,\n Uint8Array\n> & {\n /** Records that successfully validated against the schema. */\n records: ListRecord<Infer<T>>[]\n // @NOTE Because the schema uses \"type\": \"unknown\" instead of an open union,\n // we have to use LexMap instead of Unknown$TypedObject here, which is\n // unfortunate.\n /** Records that failed schema validation. */\n invalid: LexMap[]\n}\n\n/**\n * A record from a list operation with its value typed to the schema.\n * @typeParam Value - The validated record value type\n */\nexport type ListRecord<Value extends LexMap> =\n com.atproto.repo.listRecords.Record & {\n value: Value\n }\n\n/**\n * The Client class is the primary interface for interacting with AT Protocol\n * services. It provides type-safe methods for XRPC calls, record operations,\n * and blob handling.\n *\n * @example Basic usage\n * ```typescript\n * import { Client } from '@atproto/lex'\n *\n * const client = new Client(agent)\n * const response = await client.xrpc(app.bsky.feed.getTimeline.main, {\n * params: { limit: 50 }\n * })\n * ```\n */\nexport class Client implements Agent {\n static appLabelers: readonly DidString[] = []\n\n /**\n * Configures the Client (or its sub classes) globally.\n */\n static configure(opts: { appLabelers?: Iterable<DidString> }) {\n if (opts.appLabelers) this.appLabelers = [...opts.appLabelers]\n }\n\n /** The underlying agent used for making requests. */\n public readonly agent: Agent\n\n /** Custom headers included in all requests. */\n public readonly headers: Headers\n\n /** Optional service identifier for routing requests. */\n public readonly service?: Service\n\n /** Set of labeler DIDs specific to this client instance. */\n public readonly labelers: Set<DidString>\n\n constructor(agent: Agent | AgentOptions, options: ClientOptions = {}) {\n this.agent = buildAgent(agent)\n this.service = options.service\n this.labelers = new Set(options.labelers)\n this.headers = new Headers(options.headers)\n }\n\n /**\n * The DID of the authenticated user, or `undefined` if not authenticated.\n */\n get did(): DidString | undefined {\n return this.agent.did\n }\n\n /**\n * The DID of the authenticated user.\n * @throws {LexError} with code 'AuthenticationRequired' if not authenticated\n */\n get assertDid(): DidString {\n this.assertAuthenticated()\n return this.did\n }\n\n /**\n * Asserts that the client is authenticated.\n * Use as a type guard when you need to ensure authentication.\n *\n * @throws {LexError} with code 'AuthenticationRequired' if not authenticated\n *\n * @example\n * ```typescript\n * client.assertAuthenticated()\n * // TypeScript now knows client.did is defined\n * console.log(client.did)\n * ```\n */\n public assertAuthenticated(): asserts this is { did: DidString } {\n if (!this.did) throw new LexError('AuthenticationRequired')\n }\n\n /**\n * Replaces all labelers with the given set.\n * @param labelers - Iterable of labeler DIDs\n */\n public setLabelers(labelers: Iterable<DidString> = []) {\n this.clearLabelers()\n this.addLabelers(labelers)\n }\n\n /**\n * Adds labelers to the current set.\n * @param labelers - Iterable of labeler DIDs to add\n */\n public addLabelers(labelers: Iterable<DidString>) {\n for (const labeler of labelers) this.labelers.add(labeler)\n }\n\n /**\n * Removes all labelers from this client instance.\n */\n public clearLabelers() {\n this.labelers.clear()\n }\n\n /**\n * Low-level fetch handler for making requests.\n * @param path - The request path\n * @param init - Request initialization options\n */\n public fetchHandler(path: string, init: RequestInit): Promise<Response> {\n const headers = buildAtprotoHeaders({\n headers: init.headers,\n service: this.service,\n labelers: [\n ...(this.constructor as typeof Client).appLabelers.map(\n (l) => `${l};redact` as const,\n ),\n ...this.labelers,\n ],\n })\n\n // Incoming headers take precedence\n for (const [key, value] of this.headers) {\n if (!headers.has(key)) headers.set(key, value)\n }\n\n // @NOTE The agent here could be another Client instance.\n return this.agent.fetchHandler(path, { ...init, headers })\n }\n\n /**\n * Makes an XRPC request. Throws on failure.\n *\n * @param ns - The lexicon method definition (e.g., `app.bsky.feed.getTimeline`)\n * @param options - Request options including params and body\n * @returns The successful XRPC response\n * @throws {XrpcFailure} when the request fails or returns an error\n *\n * @example Query with parameters\n * ```typescript\n * const response = await client.xrpc(app.bsky.feed.getTimeline, {\n * params: { limit: 50, cursor: 'abc123' }\n * })\n * console.log(response.body.feed)\n * ```\n *\n * @example Procedure with body\n * ```typescript\n * const response = await client.xrpc(com.atproto.repo.createRecord, {\n * body: {\n * repo: client.assertDid,\n * collection: 'app.bsky.feed.post',\n * record: { text: 'Hello!', createdAt: new Date().toISOString() }\n * }\n * })\n * ```\n *\n * @see {@link xrpcSafe} for a non-throwing variant\n */\n async xrpc<const M extends Query | Procedure>(\n ns: NonNullable<unknown> extends XrpcOptions<M>\n ? Main<M>\n : Restricted<'This XRPC method requires an \"options\" argument'>,\n ): Promise<XrpcResponse<M>>\n async xrpc<const M extends Query | Procedure>(\n ns: Main<M>,\n options: XrpcOptions<M>,\n ): Promise<XrpcResponse<M>>\n async xrpc<const M extends Query | Procedure>(\n ns: Main<M>,\n options: XrpcOptions<M> = {} as XrpcOptions<M>,\n ): Promise<XrpcResponse<M>> {\n return xrpc(this, ns, options)\n }\n\n /**\n * Makes an XRPC request without throwing on failure.\n * Returns either a successful response or a failure object.\n *\n * @param ns - The lexicon method definition\n * @param options - Request options\n * @returns Either an XrpcResponse on success or XrpcFailure on failure\n *\n * @example\n * ```typescript\n * const result = await client.xrpcSafe(app.bsky.actor.getProfile.main, {\n * params: { actor: 'alice.bsky.social' }\n * })\n *\n * if (result.success) {\n * console.log(result.body.displayName)\n * } else {\n * console.error('Failed:', result.error)\n * }\n * ```\n *\n * @see {@link xrpc} for a throwing variant\n */\n async xrpcSafe<const M extends Query | Procedure>(\n ns: NonNullable<unknown> extends XrpcOptions<M>\n ? Main<M>\n : Restricted<'This XRPC method requires an \"options\" argument'>,\n ): Promise<XrpcResponse<M> | XrpcFailure<M>>\n async xrpcSafe<const M extends Query | Procedure>(\n ns: Main<M>,\n options: XrpcOptions<M>,\n ): Promise<XrpcResponse<M> | XrpcFailure<M>>\n async xrpcSafe<const M extends Query | Procedure>(\n ns: Main<M>,\n options: XrpcOptions<M> = {} as XrpcOptions<M>,\n ): Promise<XrpcResponse<M> | XrpcFailure<M>> {\n return xrpcSafe(this, ns, options)\n }\n\n /**\n * Creates a new record in an AT Protocol repository.\n *\n * @param record - The record to create, must include an {@link NsidString} `$type`\n * @param rkey - Optional record key; if omitted, server generates a TID\n * @param options - Create options including repo, swapCommit, validate\n * @returns The XRPC response containing the created record's URI and CID\n *\n * @example\n * ```typescript\n * const response = await client.createRecord(\n * { $type: 'app.bsky.feed.post', text: 'Hello!', createdAt: new Date().toISOString() },\n * undefined, // Let server generate rkey\n * { validate: true }\n * )\n * console.log(response.body.uri)\n * ```\n *\n * @see {@link create} for a higher-level typed alternative\n */\n public async createRecord(\n record: TypedLexMap<NsidString>,\n rkey?: string,\n options?: CreateRecordOptions,\n ) {\n return this.xrpc(com.atproto.repo.createRecord.main, {\n ...options,\n body: {\n repo: options?.repo ?? this.assertDid,\n collection: record.$type,\n record,\n rkey,\n validate: options?.validate,\n swapCommit: options?.swapCommit,\n },\n })\n }\n\n /**\n * Deletes a record from an AT Protocol repository.\n *\n * @param collection - The collection NSID\n * @param rkey - The record key\n * @param options - Delete options including repo, swapCommit, swapRecord\n *\n * @see {@link delete} for a higher-level typed alternative\n */\n async deleteRecord(\n collection: NsidString,\n rkey: string,\n options?: DeleteRecordOptions,\n ) {\n return this.xrpc(com.atproto.repo.deleteRecord.main, {\n ...options,\n body: {\n repo: options?.repo ?? this.assertDid,\n collection,\n rkey,\n swapCommit: options?.swapCommit,\n swapRecord: options?.swapRecord,\n },\n })\n }\n\n /**\n * Retrieves a record from an AT Protocol repository.\n *\n * @param collection - The collection NSID\n * @param rkey - The record key\n * @param options - Get options including repo\n *\n * @see {@link get} for a higher-level typed alternative\n */\n public async getRecord(\n collection: NsidString,\n rkey: string,\n options?: GetRecordOptions,\n ) {\n return this.xrpc(com.atproto.repo.getRecord.main, {\n ...options,\n params: {\n repo: options?.repo ?? this.assertDid,\n collection,\n rkey,\n },\n })\n }\n\n /**\n * Creates or updates a record in a repository.\n *\n * @param record - The record to put, must include an {@link NsidString} `$type`\n * @param rkey - The record key\n * @param options - Put options including repo, swapCommit, swapRecord, validate\n *\n * @see {@link put} for a higher-level typed alternative\n */\n async putRecord(\n record: TypedLexMap<NsidString>,\n rkey: string,\n options?: PutRecordOptions,\n ) {\n return this.xrpc(com.atproto.repo.putRecord.main, {\n ...options,\n body: {\n repo: options?.repo ?? this.assertDid,\n collection: record.$type,\n rkey,\n record,\n validate: options?.validate,\n swapCommit: options?.swapCommit,\n swapRecord: options?.swapRecord,\n },\n })\n }\n\n /**\n * Lists records in a collection.\n *\n * @param nsid - The collection NSID\n * @param options - List options including repo, limit, cursor, reverse\n *\n * @see {@link list} for a higher-level typed alternative\n */\n async listRecords(nsid: NsidString, options?: ListRecordsOptions) {\n return this.xrpc(com.atproto.repo.listRecords.main, {\n ...options,\n params: {\n repo: options?.repo ?? this.assertDid,\n collection: nsid,\n cursor: options?.cursor,\n limit: options?.limit,\n reverse: options?.reverse,\n },\n })\n }\n\n /**\n * Uploads a blob to an AT Protocol repository.\n *\n * @param body - The blob data (Uint8Array, ReadableStream, Blob, etc.)\n * @param options - Upload options including encoding hint\n * @returns Response containing the blob reference\n *\n * @example\n * ```typescript\n * const imageData = await fetch('image.png').then(r => r.arrayBuffer())\n * const response = await client.uploadBlob(new Uint8Array(imageData), {\n * encoding: 'image/png'\n * })\n * console.log(response.body.blob) // Use this ref in records\n * ```\n */\n async uploadBlob(\n body: BinaryBodyInit,\n options?: CallOptions & { encoding?: `${string}/${string}` },\n ) {\n return this.xrpc(com.atproto.repo.uploadBlob.main, {\n ...options,\n body,\n })\n }\n\n /**\n * Retrieves a blob by DID and CID.\n *\n * @param did - The DID of the repository containing the blob\n * @param cid - The CID of the blob\n * @param options - Call options\n */\n async getBlob(did: DidString, cid: CidString, options?: CallOptions) {\n return this.xrpc(com.atproto.sync.getBlob.main, {\n ...options,\n params: { did, cid },\n })\n }\n\n /**\n * Universal call method for queries, procedures, and custom actions.\n * Automatically determines the call type based on the lexicon definition.\n *\n * @param ns - The lexicon method or action definition\n * @param arg - The input argument (params for queries, body for procedures, input for actions)\n * @param options - Call options\n * @returns The method response body or action output\n * @see {@link xrpc} if you need access to the full response object\n *\n * @example Query\n * ```typescript\n * const profile = await client.call(app.bsky.actor.getProfile.main, {\n * actor: 'alice.bsky.social'\n * })\n * ```\n *\n * @example Procedure\n * ```typescript\n * const result = await client.call(com.atproto.repo.createRecord.main, {\n * repo: did,\n * collection: 'app.bsky.feed.post',\n * record: { text: 'Hello!' }\n * })\n * ```\n */\n public async call<const T extends Query>(\n ns: NonNullable<unknown> extends XrpcRequestParams<T>\n ? Main<T>\n : Restricted<'This query type requires a \"params\" argument'>,\n ): Promise<XrpcResponseBody<T>>\n public async call<const T extends Procedure>(\n ns: undefined extends InferMethodInputBody<T, Uint8Array>\n ? Main<T>\n : Restricted<'This procedure type requires an \"input\" argument'>,\n ): Promise<XrpcResponseBody<T>>\n public async call<const T extends Action>(\n ns: void extends InferActionInput<T>\n ? Main<T>\n : Restricted<'This action type requires an \"input\" argument'>,\n ): Promise<InferActionOutput<T>>\n public async call<const T extends Action | Procedure | Query>(\n ns: Main<T>,\n arg: T extends Action\n ? InferActionInput<T>\n : T extends Procedure\n ? InferMethodInputBody<T, Uint8Array>\n : T extends Query\n ? XrpcRequestParams<T>\n : never,\n options?: CallOptions,\n ): Promise<\n T extends Action\n ? InferActionOutput<T>\n : T extends Procedure\n ? XrpcResponseBody<T>\n : T extends Query\n ? XrpcResponseBody<T>\n : never\n >\n public async call(\n ns: Main<Action> | Main<Procedure> | Main<Query>,\n arg?: LexValue | Params,\n options: CallOptions = {},\n ): Promise<unknown> {\n const method = getMain(ns)\n\n if (typeof method === 'function') {\n return method(this, arg, options)\n }\n\n if (method instanceof Procedure) {\n const result = await this.xrpc(method, { ...options, body: arg as any })\n return result.body\n } else if (method instanceof Query) {\n const result = await this.xrpc(method, { ...options, params: arg as any })\n return result.body\n } else {\n throw new TypeError('Invalid lexicon')\n }\n }\n\n /**\n * Creates a new record with full type safety based on the schema.\n *\n * @param ns - The record schema definition\n * @param input - The record data (without `$type`, which is added automatically)\n * @param options - Create options including rkey (required for some record types)\n * @returns The create output including URI and CID\n *\n * @example Creating a post\n * ```typescript\n * const result = await client.create(app.bsky.feed.post.main, {\n * text: 'Hello, world!',\n * createdAt: new Date().toISOString()\n * })\n * console.log(result.uri)\n * ```\n *\n * @example Creating a record with explicit rkey\n * ```typescript\n * const result = await client.create(app.bsky.actor.profile.main, {\n * displayName: 'Alice'\n * }, { rkey: 'self' })\n * ```\n */\n public async create<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends CreateOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n input: Omit<Infer<T>, '$type'>,\n ): Promise<CreateOutput>\n public async create<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<Infer<T>, '$type'>,\n options: CreateOptions<T>,\n ): Promise<CreateOutput>\n public async create<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<Infer<T>, '$type'>,\n options: CreateOptions<T> = {} as CreateOptions<T>,\n ): Promise<CreateOutput> {\n const schema: T = getMain(ns)\n const record = schema.build(input) as TypedLexMap<NsidString>\n const rkey = options.rkey ?? getDefaultRecordKey(schema)\n if (rkey !== undefined) schema.keySchema.assert(rkey)\n const response = await this.createRecord(record, rkey, options)\n return response.body\n }\n\n /**\n * Deletes a record with type-safe options.\n *\n * @param ns - The record schema definition\n * @param options - Delete options (rkey required for non-literal keys)\n * @returns The delete output\n */\n public async delete<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends DeleteOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n ): Promise<DeleteOutput>\n public async delete<const T extends RecordSchema>(\n ns: Main<T>,\n options?: DeleteOptions<T>,\n ): Promise<DeleteOutput>\n public async delete<const T extends RecordSchema>(\n ns: Main<T>,\n options: DeleteOptions<T> = {} as DeleteOptions<T>,\n ): Promise<DeleteOutput> {\n const schema = getMain(ns)\n const rkey = schema.keySchema.parse(\n options.rkey ?? getLiteralRecordKey(schema),\n )\n const response = await this.deleteRecord(schema.$type, rkey, options)\n return response.body\n }\n\n /**\n * Retrieves a record with type-safe validation.\n *\n * @param ns - The record schema definition\n * @param options - Get options (rkey required for non-literal keys)\n * @returns The record data validated against the schema\n *\n * @example\n * ```typescript\n * const profile = await client.get(app.bsky.actor.profile.main)\n * // profile.value is typed as app.bsky.actor.profile.Record\n * console.log(profile.value.displayName)\n * ```\n */\n public async get<const T extends RecordSchema>(\n ns: T['key'] extends `literal:${string}`\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n ): Promise<GetOutput<T>>\n public async get<const T extends RecordSchema>(\n ns: Main<T>,\n options?: GetOptions<T>,\n ): Promise<GetOutput<T>>\n public async get<const T extends RecordSchema>(\n ns: Main<T>,\n options: GetOptions<T> = {} as GetOptions<T>,\n ): Promise<GetOutput<T>> {\n const schema = getMain(ns)\n const rkey = schema.keySchema.parse(\n options.rkey ?? getLiteralRecordKey(schema),\n )\n const response = await this.getRecord(schema.$type, rkey, options)\n const value = schema.validate(response.body.value)\n return { ...response.body, value }\n }\n\n /**\n * Creates or updates a record with full type safety.\n *\n * @param ns - The record schema definition\n * @param input - The record data\n * @param options - Put options (rkey required for non-literal keys)\n * @returns The put output including URI and CID\n */\n public async put<const T extends RecordSchema>(\n ns: NonNullable<unknown> extends PutOptions<T>\n ? Main<T>\n : Restricted<'This record type requires an \"options\" argument'>,\n input: Omit<Infer<T>, '$type'>,\n ): Promise<PutOutput>\n public async put<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<Infer<T>, '$type'>,\n options: PutOptions<T>,\n ): Promise<PutOutput>\n public async put<const T extends RecordSchema>(\n ns: Main<T>,\n input: Omit<Infer<T>, '$type'>,\n options: PutOptions<T> = {} as PutOptions<T>,\n ): Promise<PutOutput> {\n const schema: T = getMain(ns)\n const record = schema.build(input) as TypedLexMap<NsidString>\n const rkey = options.rkey ?? getLiteralRecordKey(schema)\n const response = await this.putRecord(record, rkey, options)\n return response.body\n }\n\n /**\n * Lists records with type-safe validation and separation of valid/invalid records.\n *\n * @param ns - The record schema definition\n * @param options - List options\n * @returns Records split into valid (matching schema) and invalid arrays\n *\n * @example\n * ```typescript\n * const result = await client.list(app.bsky.feed.post.main, { limit: 100 })\n * console.log(`Found ${result.records.length} valid posts`)\n * console.log(`Found ${result.invalid.length} invalid records`)\n * ```\n */\n async list<const T extends RecordSchema>(\n ns: Main<T>,\n options?: ListOptions,\n ): Promise<ListOutput<T>> {\n const schema = getMain(ns)\n const { body } = await this.listRecords(schema.$type, options)\n\n const records: ListRecord<Infer<T>>[] = []\n const invalid: LexMap[] = []\n\n for (const record of body.records) {\n const parsed = schema.safeValidate(record.value)\n if (parsed.success) {\n records.push({ ...record, value: parsed.value })\n } else {\n invalid.push(record.value)\n }\n }\n\n return { ...body, records, invalid }\n }\n}\n\nfunction getDefaultRecordKey<const T extends RecordSchema>(\n schema: T,\n): undefined | InferRecordKey<T> {\n // Let the server generate the TID\n if (schema.key === 'tid') return undefined\n if (schema.key === 'any') return undefined\n\n return getLiteralRecordKey(schema)\n}\n\nfunction getLiteralRecordKey<const T extends RecordSchema>(\n schema: T,\n): InferRecordKey<T> {\n if (schema.key.startsWith('literal:')) {\n return schema.key.slice(8) as InferRecordKey<T>\n }\n\n throw new TypeError(\n `An \"rkey\" must be provided for record key type \"${schema.key}\" (${schema.$type})`,\n )\n}\n"]}
|
|
@@ -15,7 +15,7 @@ declare const main: l.Procedure<"com.atproto.repo.createRecord", l.ParamsSchema<
|
|
|
15
15
|
readonly maxLength: 512;
|
|
16
16
|
}>>;
|
|
17
17
|
validate: l.OptionalSchema<l.BooleanSchema>;
|
|
18
|
-
record: l.
|
|
18
|
+
record: l.LexMapSchema;
|
|
19
19
|
swapCommit: l.OptionalSchema<l.StringSchema<{
|
|
20
20
|
readonly format: "cid";
|
|
21
21
|
}>>;
|
|
@@ -27,14 +27,16 @@ declare const main: l.Procedure<"com.atproto.repo.createRecord", l.ParamsSchema<
|
|
|
27
27
|
readonly format: "cid";
|
|
28
28
|
}>;
|
|
29
29
|
commit: l.OptionalSchema<l.RefSchema<l.Validator<RepoDefs.CommitMeta, RepoDefs.CommitMeta>>>;
|
|
30
|
-
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
30
|
+
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
31
|
+
knownValues: ["valid", "unknown"];
|
|
32
|
+
}>>;
|
|
31
33
|
}>>, readonly ["InvalidSwap"]>;
|
|
32
34
|
export { main };
|
|
33
|
-
export type Params = l.InferMethodParams<typeof main>;
|
|
34
|
-
export type Input = l.InferMethodInput<typeof main>;
|
|
35
|
-
export type InputBody = l.InferMethodInputBody<typeof main>;
|
|
36
|
-
export type Output = l.InferMethodOutput<typeof main>;
|
|
37
|
-
export type OutputBody = l.InferMethodOutputBody<typeof main>;
|
|
35
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
36
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
|
|
37
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
|
|
38
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
39
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
38
40
|
export declare const $lxm: "com.atproto.repo.createRecord", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
|
|
39
41
|
repo: l.StringSchema<{
|
|
40
42
|
readonly format: "at-identifier";
|
|
@@ -47,7 +49,7 @@ export declare const $lxm: "com.atproto.repo.createRecord", $params: l.ParamsSch
|
|
|
47
49
|
readonly maxLength: 512;
|
|
48
50
|
}>>;
|
|
49
51
|
validate: l.OptionalSchema<l.BooleanSchema>;
|
|
50
|
-
record: l.
|
|
52
|
+
record: l.LexMapSchema;
|
|
51
53
|
swapCommit: l.OptionalSchema<l.StringSchema<{
|
|
52
54
|
readonly format: "cid";
|
|
53
55
|
}>>;
|
|
@@ -59,6 +61,8 @@ export declare const $lxm: "com.atproto.repo.createRecord", $params: l.ParamsSch
|
|
|
59
61
|
readonly format: "cid";
|
|
60
62
|
}>;
|
|
61
63
|
commit: l.OptionalSchema<l.RefSchema<l.Validator<RepoDefs.CommitMeta, RepoDefs.CommitMeta>>>;
|
|
62
|
-
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
64
|
+
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
65
|
+
knownValues: ["valid", "unknown"];
|
|
66
|
+
}>>;
|
|
63
67
|
}>>;
|
|
64
68
|
//# sourceMappingURL=createRecord.defs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRecord.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/createRecord.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,QAA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
@@ -20,7 +20,7 @@ lex_schema_1.l.procedure($nsid,
|
|
|
20
20
|
rkey: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
21
21
|
/*#__PURE__*/ lex_schema_1.l.string({ format: 'record-key', maxLength: 512 })),
|
|
22
22
|
validate: /*#__PURE__*/ lex_schema_1.l.optional(/*#__PURE__*/ lex_schema_1.l.boolean()),
|
|
23
|
-
record: /*#__PURE__*/ lex_schema_1.l.
|
|
23
|
+
record: /*#__PURE__*/ lex_schema_1.l.lexMap(),
|
|
24
24
|
swapCommit: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
25
25
|
/*#__PURE__*/ lex_schema_1.l.string({ format: 'cid' })),
|
|
26
26
|
}),
|
|
@@ -29,7 +29,8 @@ lex_schema_1.l.procedure($nsid,
|
|
|
29
29
|
cid: /*#__PURE__*/ lex_schema_1.l.string({ format: 'cid' }),
|
|
30
30
|
commit: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
31
31
|
/*#__PURE__*/ lex_schema_1.l.ref((() => RepoDefs.commitMeta))),
|
|
32
|
-
validationStatus: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
32
|
+
validationStatus: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
33
|
+
/*#__PURE__*/ lex_schema_1.l.string()),
|
|
33
34
|
}), ['InvalidSwap']);
|
|
34
35
|
exports.main = main;
|
|
35
36
|
exports.$lxm = main.nsid, exports.$params = main.parameters, exports.$input = main.input, exports.$output = main.output;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRecord.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/createRecord.defs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,oDAAuC;AACvC,iEAA0C;AAE1C,MAAM,KAAK,GAAG,+BAA+B,CAAA;AAEpC,sBAAK;AAEd,gFAAgF;AAChF,MAAM,IAAI;AACR,aAAa;AACb,cAAC,CAAC,SAAS,CACT,KAAK;AACL,aAAa,CAAC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AAG,EAAE,CAAC,CACjE;IACD,QAAQ,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAC,CAAC,OAAO,EAAE,CAAC;IAC7D,MAAM,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,EAAE;IAChC,UAAU,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ;IAClC,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAC1C;CACF,CAAC;AACF,aAAa,CAAC,cAAC,CAAC,WAAW,CAAC;IAC1B,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjD,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC9C,MAAM,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ;IAC9B,aAAa,CAAC,cAAC,CAAC,GAAG,CACjB,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAQ,CACnC,CACF;IACD,gBAAgB,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ;IACxC,aAAa,CAAC,cAAC,CAAC,MAAM,EAAyC,CAChE;CACF,CAAC,EACF,CAAC,aAAa,CAAC,CAChB,CAAA;AACM,oBAAI;AAcA,QAAA,IAAI,GAAiB,IAAI,CAAC,IAAI,EACzC,QAAA,OAAO,GAAiB,IAAI,CAAC,UAAU,EACvC,QAAA,MAAM,GAAiB,IAAI,CAAC,KAAK,EACjC,QAAA,OAAO,GAAiB,IAAI,CAAC,MAAM,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\nimport * as RepoDefs from './defs.defs.js'\n\nconst $nsid = 'com.atproto.repo.createRecord'\n\nexport { $nsid }\n\n/** Create a single new repository record. Requires auth, implemented by PDS. */\nconst main =\n /*#__PURE__*/\n l.procedure(\n $nsid,\n /*#__PURE__*/ l.params(),\n /*#__PURE__*/ l.jsonPayload({\n repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),\n collection: /*#__PURE__*/ l.string({ format: 'nsid' }),\n rkey: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),\n ),\n validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),\n record: /*#__PURE__*/ l.lexMap(),\n swapCommit: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.string({ format: 'cid' }),\n ),\n }),\n /*#__PURE__*/ l.jsonPayload({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n cid: /*#__PURE__*/ l.string({ format: 'cid' }),\n commit: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(\n (() => RepoDefs.commitMeta) as any,\n ),\n ),\n validationStatus: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),\n ),\n }),\n ['InvalidSwap'],\n )\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>\nexport type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<\n typeof main,\n B\n>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n\nexport const $lxm = /*#__PURE__*/ main.nsid,\n $params = /*#__PURE__*/ main.parameters,\n $input = /*#__PURE__*/ main.input,\n $output = /*#__PURE__*/ main.output\n"]}
|
|
@@ -23,11 +23,11 @@ declare const main: l.Procedure<"com.atproto.repo.deleteRecord", l.ParamsSchema<
|
|
|
23
23
|
commit: l.OptionalSchema<l.RefSchema<l.Validator<RepoDefs.CommitMeta, RepoDefs.CommitMeta>>>;
|
|
24
24
|
}>>, readonly ["InvalidSwap"]>;
|
|
25
25
|
export { main };
|
|
26
|
-
export type Params = l.InferMethodParams<typeof main>;
|
|
27
|
-
export type Input = l.InferMethodInput<typeof main>;
|
|
28
|
-
export type InputBody = l.InferMethodInputBody<typeof main>;
|
|
29
|
-
export type Output = l.InferMethodOutput<typeof main>;
|
|
30
|
-
export type OutputBody = l.InferMethodOutputBody<typeof main>;
|
|
26
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
27
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
|
|
28
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
|
|
29
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
30
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
31
31
|
export declare const $lxm: "com.atproto.repo.deleteRecord", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
|
|
32
32
|
repo: l.StringSchema<{
|
|
33
33
|
readonly format: "at-identifier";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteRecord.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/deleteRecord.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,QAAA,MAAM,KAAK,kCAAkC,CAAA;AAE7C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,iGAAiG;AACjG,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;8BAwBP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"deleteRecord.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/deleteRecord.defs.ts"],"names":[],"mappings":"AAIA,OAAO,E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ACL,aAAa,CAAC,cAAC,CAAC,MAAM,EAAE;AACxB,aAAa,CAAC,cAAC,CAAC,WAAW,CAAC;IAC1B,IAAI,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IACzD,UAAU,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACtD,IAAI,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;IACtD,UAAU,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ;IAClC,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAC1C;IACD,UAAU,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ;IAClC,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAC1C;CACF,CAAC;AACF,aAAa,CAAC,cAAC,CAAC,WAAW,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ;IAC9B,aAAa,CAAC,cAAC,CAAC,GAAG,CACjB,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAQ,CACnC,CACF;CACF,CAAC,EACF,CAAC,aAAa,CAAC,CAChB,CAAA;AACM,oBAAI;AAcA,QAAA,IAAI,GAAiB,IAAI,CAAC,IAAI,EACzC,QAAA,OAAO,GAAiB,IAAI,CAAC,UAAU,EACvC,QAAA,MAAM,GAAiB,IAAI,CAAC,KAAK,EACjC,QAAA,OAAO,GAAiB,IAAI,CAAC,MAAM,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\nimport * as RepoDefs from './defs.defs.js'\n\nconst $nsid = 'com.atproto.repo.deleteRecord'\n\nexport { $nsid }\n\n/** Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. */\nconst main =\n /*#__PURE__*/\n l.procedure(\n $nsid,\n /*#__PURE__*/ l.params(),\n /*#__PURE__*/ l.jsonPayload({\n repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),\n collection: /*#__PURE__*/ l.string({ format: 'nsid' }),\n rkey: /*#__PURE__*/ l.string({ format: 'record-key' }),\n swapRecord: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.string({ format: 'cid' }),\n ),\n swapCommit: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.string({ format: 'cid' }),\n ),\n }),\n /*#__PURE__*/ l.jsonPayload({\n commit: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(\n (() => RepoDefs.commitMeta) as any,\n ),\n ),\n }),\n ['InvalidSwap'],\n )\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>\nexport type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<\n typeof main,\n B\n>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n\nexport const $lxm = /*#__PURE__*/ main.nsid,\n $params = /*#__PURE__*/ main.parameters,\n $input = /*#__PURE__*/ main.input,\n $output = /*#__PURE__*/ main.output\n"]}
|
|
@@ -22,12 +22,12 @@ declare const main: l.Query<"com.atproto.repo.getRecord", l.ParamsSchema<{
|
|
|
22
22
|
cid: l.OptionalSchema<l.StringSchema<{
|
|
23
23
|
readonly format: "cid";
|
|
24
24
|
}>>;
|
|
25
|
-
value: l.
|
|
25
|
+
value: l.LexMapSchema;
|
|
26
26
|
}>>, readonly ["RecordNotFound"]>;
|
|
27
27
|
export { main };
|
|
28
|
-
export type Params = l.InferMethodParams<typeof main>;
|
|
29
|
-
export type Output = l.InferMethodOutput<typeof main>;
|
|
30
|
-
export type OutputBody = l.InferMethodOutputBody<typeof main>;
|
|
28
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
29
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
30
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
31
31
|
export declare const $lxm: "com.atproto.repo.getRecord", $params: l.ParamsSchema<{
|
|
32
32
|
readonly repo: l.StringSchema<{
|
|
33
33
|
readonly format: "at-identifier";
|
|
@@ -48,6 +48,6 @@ export declare const $lxm: "com.atproto.repo.getRecord", $params: l.ParamsSchema
|
|
|
48
48
|
cid: l.OptionalSchema<l.StringSchema<{
|
|
49
49
|
readonly format: "cid";
|
|
50
50
|
}>>;
|
|
51
|
-
value: l.
|
|
51
|
+
value: l.LexMapSchema;
|
|
52
52
|
}>>;
|
|
53
53
|
//# sourceMappingURL=getRecord.defs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecord.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/getRecord.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,+BAA+B,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,oEAAoE;AACpE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;iCAgBP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"getRecord.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/getRecord.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,+BAA+B,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,oEAAoE;AACpE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;iCAgBP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,CAAA;AACtD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,qBAAqB,CACjE,OAAO,IAAI,EACX,CAAC,CACF,CAAA;AAED,eAAO,MAAM,IAAI,8BAA0B,EACzC,OAAO;;;;;;;;;;;;;EAAkB,EACzB,OAAO;;;;;;;;GAAc,CAAA"}
|
|
@@ -20,7 +20,7 @@ lex_schema_1.l.query($nsid,
|
|
|
20
20
|
/*#__PURE__*/ lex_schema_1.l.jsonPayload({
|
|
21
21
|
uri: /*#__PURE__*/ lex_schema_1.l.string({ format: 'at-uri' }),
|
|
22
22
|
cid: /*#__PURE__*/ lex_schema_1.l.optional(/*#__PURE__*/ lex_schema_1.l.string({ format: 'cid' })),
|
|
23
|
-
value: /*#__PURE__*/ lex_schema_1.l.
|
|
23
|
+
value: /*#__PURE__*/ lex_schema_1.l.lexMap(),
|
|
24
24
|
}), ['RecordNotFound']);
|
|
25
25
|
exports.main = main;
|
|
26
26
|
exports.$lxm = main.nsid, exports.$params = main.parameters, exports.$output = main.output;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecord.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/getRecord.defs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oDAAuC;AAEvC,MAAM,KAAK,GAAG,4BAA4B,CAAA;AAEjC,sBAAK;AAEd,oEAAoE;AACpE,MAAM,IAAI;AACR,aAAa;AACb,cAAC,CAAC,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AC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACtD,IAAI,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;IACtD,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;CACzE,CAAC;AACF,aAAa,CAAC,cAAC,CAAC,WAAW,CAAC;IAC1B,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjD,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACxE,KAAK,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,EAAE;CAChC,CAAC,EACF,CAAC,gBAAgB,CAAC,CACnB,CAAA;AACM,oBAAI;AASA,QAAA,IAAI,GAAiB,IAAI,CAAC,IAAI,EACzC,QAAA,OAAO,GAAG,IAAI,CAAC,UAAU,EACzB,QAAA,OAAO,GAAG,IAAI,CAAC,MAAM,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\n\nconst $nsid = 'com.atproto.repo.getRecord'\n\nexport { $nsid }\n\n/** Get a single record from a repository. Does not require auth. */\nconst main =\n /*#__PURE__*/\n l.query(\n $nsid,\n /*#__PURE__*/ l.params({\n repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),\n collection: /*#__PURE__*/ l.string({ format: 'nsid' }),\n rkey: /*#__PURE__*/ l.string({ format: 'record-key' }),\n cid: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({ format: 'cid' })),\n }),\n /*#__PURE__*/ l.jsonPayload({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n cid: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({ format: 'cid' })),\n value: /*#__PURE__*/ l.lexMap(),\n }),\n ['RecordNotFound'],\n )\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n\nexport const $lxm = /*#__PURE__*/ main.nsid,\n $params = main.parameters,\n $output = main.output\n"]}
|
|
@@ -10,16 +10,16 @@ declare const main: l.Query<"com.atproto.repo.listRecords", l.ParamsSchema<{
|
|
|
10
10
|
readonly format: "nsid";
|
|
11
11
|
}>;
|
|
12
12
|
readonly limit: l.OptionalSchema<l.WithDefaultSchema<l.IntegerSchema>>;
|
|
13
|
-
readonly cursor: l.OptionalSchema<l.StringSchema<
|
|
13
|
+
readonly cursor: l.OptionalSchema<l.StringSchema<{}>>;
|
|
14
14
|
readonly reverse: l.OptionalSchema<l.BooleanSchema>;
|
|
15
15
|
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
16
16
|
cursor: l.OptionalSchema<l.StringSchema<{}>>;
|
|
17
17
|
records: l.ArraySchema<l.RefSchema<l.Validator<Record$0, Record$0>>>;
|
|
18
18
|
}>>, undefined>;
|
|
19
19
|
export { main };
|
|
20
|
-
export type Params = l.InferMethodParams<typeof main>;
|
|
21
|
-
export type Output = l.InferMethodOutput<typeof main>;
|
|
22
|
-
export type OutputBody = l.InferMethodOutputBody<typeof main>;
|
|
20
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
21
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
22
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
23
23
|
export declare const $lxm: "com.atproto.repo.listRecords", $params: l.ParamsSchema<{
|
|
24
24
|
readonly repo: l.StringSchema<{
|
|
25
25
|
readonly format: "at-identifier";
|
|
@@ -28,7 +28,7 @@ export declare const $lxm: "com.atproto.repo.listRecords", $params: l.ParamsSche
|
|
|
28
28
|
readonly format: "nsid";
|
|
29
29
|
}>;
|
|
30
30
|
readonly limit: l.OptionalSchema<l.WithDefaultSchema<l.IntegerSchema>>;
|
|
31
|
-
readonly cursor: l.OptionalSchema<l.StringSchema<
|
|
31
|
+
readonly cursor: l.OptionalSchema<l.StringSchema<{}>>;
|
|
32
32
|
readonly reverse: l.OptionalSchema<l.BooleanSchema>;
|
|
33
33
|
}>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
34
34
|
cursor: l.OptionalSchema<l.StringSchema<{}>>;
|
|
@@ -38,7 +38,7 @@ type Record$0 = {
|
|
|
38
38
|
$type?: 'com.atproto.repo.listRecords#record';
|
|
39
39
|
uri: l.AtUriString;
|
|
40
40
|
cid: l.CidString;
|
|
41
|
-
value: l.
|
|
41
|
+
value: l.LexMap;
|
|
42
42
|
};
|
|
43
43
|
export type { Record$0 as Record };
|
|
44
44
|
declare const record$0: l.TypedObjectSchema<"com.atproto.repo.listRecords#record", l.Validator<Record$0, Record$0>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRecords.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/listRecords.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,iCAAiC,CAAA;AAE5C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,sGAAsG;AACtG,QAAA,MAAM,IAAI;;;;;;;;;;;;;eAsBP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"listRecords.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/listRecords.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,iCAAiC,CAAA;AAE5C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,sGAAsG;AACtG,QAAA,MAAM,IAAI;;;;;;;;;;;;;eAsBP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,CAAA;AACtD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,qBAAqB,CACjE,OAAO,IAAI,EACX,CAAC,CACF,CAAA;AAED,eAAO,MAAM,IAAI,gCAA0B,EACzC,OAAO;;;;;;;;;;EAAkB,EACzB,OAAO;;;GAAc,CAAA;AAEvB,KAAK,QAAQ,GAAG;IACd,KAAK,CAAC,EAAE,qCAAqC,CAAA;IAC7C,GAAG,EAAE,CAAC,CAAC,WAAW,CAAA;IAClB,GAAG,EAAE,CAAC,CAAC,SAAS,CAAA;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAA;CAChB,CAAA;AAED,YAAY,EAAE,QAAQ,IAAI,MAAM,EAAE,CAAA;AAElC,QAAA,MAAM,QAAQ,6FAQb,CAAA;AAED,OAAO,EAAE,QAAQ,IAAI,MAAM,EAAE,CAAA"}
|
|
@@ -31,7 +31,7 @@ const record$0 = /*#__PURE__*/ lex_schema_1.l.typedObject($nsid, 'record',
|
|
|
31
31
|
/*#__PURE__*/ lex_schema_1.l.object({
|
|
32
32
|
uri: /*#__PURE__*/ lex_schema_1.l.string({ format: 'at-uri' }),
|
|
33
33
|
cid: /*#__PURE__*/ lex_schema_1.l.string({ format: 'cid' }),
|
|
34
|
-
value: /*#__PURE__*/ lex_schema_1.l.
|
|
34
|
+
value: /*#__PURE__*/ lex_schema_1.l.lexMap(),
|
|
35
35
|
}));
|
|
36
36
|
exports.record = record$0;
|
|
37
37
|
//# sourceMappingURL=listRecords.defs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listRecords.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/listRecords.defs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oDAAuC;AAEvC,MAAM,KAAK,GAAG,8BAA8B,CAAA;AAEnC,sBAAK;AAEd,sGAAsG;AACtG,MAAM,IAAI;AACR,aAAa;AACb,cAAC,CAAC,KAAK,CACL,KAAK;AACL,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IACzD,UAAU,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACtD,KAAK,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ;IAC7B,aAAa,CAAC,cAAC,CAAC,WAAW;IACzB,aAAa,CAAC,cAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EACrD,EAAE,CACH,CACF;IACD,MAAM,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAC,CAAC,MAAM,EAAE,CAAC;IAC1D,OAAO,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAC,CAAC,OAAO,EAAE,CAAC;CAC7D,CAAC;AACF,aAAa,CAAC,cAAC,CAAC,WAAW,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAC,CAAC,MAAM,EAAE,CAAC;IAC1D,OAAO,EAAE,aAAa,CAAC,cAAC,C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K;IAC5B,aAAa,CAAC,cAAC,CAAC,GAAG,CAAW,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAQ,CAAC,CACvD;CACF,CAAC,CACH,CAAA;AACM,oBAAI;AASA,QAAA,IAAI,GAAiB,IAAI,CAAC,IAAI,EACzC,QAAA,OAAO,GAAG,IAAI,CAAC,UAAU,EACzB,QAAA,OAAO,GAAG,IAAI,CAAC,MAAM,CAAA;AAWvB,MAAM,QAAQ,GAAG,aAAa,CAAC,cAAC,CAAC,WAAW,CAC1C,KAAK,EACL,QAAQ;AACR,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjD,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC9C,KAAK,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,EAAE;CAChC,CAAC,CACH,CAAA;AAEoB,0BAAM","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\n\nconst $nsid = 'com.atproto.repo.listRecords'\n\nexport { $nsid }\n\n/** List a range of records in a repository, matching a specific collection. Does not require auth. */\nconst main =\n /*#__PURE__*/\n l.query(\n $nsid,\n /*#__PURE__*/ l.params({\n repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),\n collection: /*#__PURE__*/ l.string({ format: 'nsid' }),\n limit: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.withDefault(\n /*#__PURE__*/ l.integer({ minimum: 1, maximum: 100 }),\n 50,\n ),\n ),\n cursor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),\n reverse: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),\n }),\n /*#__PURE__*/ l.jsonPayload({\n cursor: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),\n records: /*#__PURE__*/ l.array(\n /*#__PURE__*/ l.ref<Record$0>((() => record$0) as any),\n ),\n }),\n )\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n\nexport const $lxm = /*#__PURE__*/ main.nsid,\n $params = main.parameters,\n $output = main.output\n\ntype Record$0 = {\n $type?: 'com.atproto.repo.listRecords#record'\n uri: l.AtUriString\n cid: l.CidString\n value: l.LexMap\n}\n\nexport type { Record$0 as Record }\n\nconst record$0 = /*#__PURE__*/ l.typedObject<Record$0>(\n $nsid,\n 'record',\n /*#__PURE__*/ l.object({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n cid: /*#__PURE__*/ l.string({ format: 'cid' }),\n value: /*#__PURE__*/ l.lexMap(),\n }),\n)\n\nexport { record$0 as record }\n"]}
|
|
@@ -15,7 +15,7 @@ declare const main: l.Procedure<"com.atproto.repo.putRecord", l.ParamsSchema<{}>
|
|
|
15
15
|
readonly maxLength: 512;
|
|
16
16
|
}>;
|
|
17
17
|
validate: l.OptionalSchema<l.BooleanSchema>;
|
|
18
|
-
record: l.
|
|
18
|
+
record: l.LexMapSchema;
|
|
19
19
|
swapRecord: l.OptionalSchema<l.NullableSchema<l.StringSchema<{
|
|
20
20
|
readonly format: "cid";
|
|
21
21
|
}>>>;
|
|
@@ -30,14 +30,16 @@ declare const main: l.Procedure<"com.atproto.repo.putRecord", l.ParamsSchema<{}>
|
|
|
30
30
|
readonly format: "cid";
|
|
31
31
|
}>;
|
|
32
32
|
commit: l.OptionalSchema<l.RefSchema<l.Validator<RepoDefs.CommitMeta, RepoDefs.CommitMeta>>>;
|
|
33
|
-
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
33
|
+
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
34
|
+
knownValues: ["valid", "unknown"];
|
|
35
|
+
}>>;
|
|
34
36
|
}>>, readonly ["InvalidSwap"]>;
|
|
35
37
|
export { main };
|
|
36
|
-
export type Params = l.InferMethodParams<typeof main>;
|
|
37
|
-
export type Input = l.InferMethodInput<typeof main>;
|
|
38
|
-
export type InputBody = l.InferMethodInputBody<typeof main>;
|
|
39
|
-
export type Output = l.InferMethodOutput<typeof main>;
|
|
40
|
-
export type OutputBody = l.InferMethodOutputBody<typeof main>;
|
|
38
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
39
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
|
|
40
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
|
|
41
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
42
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
41
43
|
export declare const $lxm: "com.atproto.repo.putRecord", $params: l.ParamsSchema<{}>, $input: l.Payload<"application/json", l.ObjectSchema<{
|
|
42
44
|
repo: l.StringSchema<{
|
|
43
45
|
readonly format: "at-identifier";
|
|
@@ -50,7 +52,7 @@ export declare const $lxm: "com.atproto.repo.putRecord", $params: l.ParamsSchema
|
|
|
50
52
|
readonly maxLength: 512;
|
|
51
53
|
}>;
|
|
52
54
|
validate: l.OptionalSchema<l.BooleanSchema>;
|
|
53
|
-
record: l.
|
|
55
|
+
record: l.LexMapSchema;
|
|
54
56
|
swapRecord: l.OptionalSchema<l.NullableSchema<l.StringSchema<{
|
|
55
57
|
readonly format: "cid";
|
|
56
58
|
}>>>;
|
|
@@ -65,6 +67,8 @@ export declare const $lxm: "com.atproto.repo.putRecord", $params: l.ParamsSchema
|
|
|
65
67
|
readonly format: "cid";
|
|
66
68
|
}>;
|
|
67
69
|
commit: l.OptionalSchema<l.RefSchema<l.Validator<RepoDefs.CommitMeta, RepoDefs.CommitMeta>>>;
|
|
68
|
-
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
70
|
+
validationStatus: l.OptionalSchema<l.StringSchema<{
|
|
71
|
+
knownValues: ["valid", "unknown"];
|
|
72
|
+
}>>;
|
|
69
73
|
}>>;
|
|
70
74
|
//# sourceMappingURL=putRecord.defs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"putRecord.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/putRecord.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,QAAA,MAAM,KAAK,+BAA+B,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,uGAAuG;AACvG,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"putRecord.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/putRecord.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAE1C,QAAA,MAAM,KAAK,+BAA+B,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,uGAAuG;AACvG,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA+BP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,CAAA;AACtD,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,gBAAgB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AACzE,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,oBAAoB,CAC/D,OAAO,IAAI,EACX,CAAC,CACF,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,qBAAqB,CACjE,OAAO,IAAI,EACX,CAAC,CACF,CAAA;AAED,eAAO,MAAM,IAAI,8BAA0B,EACzC,OAAO,oBAAgC,EACvC,MAAM;;;;;;;;;;;;;;;;;;;GAA2B,EACjC,OAAO;;;;;;;;;;;GAA4B,CAAA"}
|
|
@@ -19,7 +19,7 @@ lex_schema_1.l.procedure($nsid,
|
|
|
19
19
|
collection: /*#__PURE__*/ lex_schema_1.l.string({ format: 'nsid' }),
|
|
20
20
|
rkey: /*#__PURE__*/ lex_schema_1.l.string({ format: 'record-key', maxLength: 512 }),
|
|
21
21
|
validate: /*#__PURE__*/ lex_schema_1.l.optional(/*#__PURE__*/ lex_schema_1.l.boolean()),
|
|
22
|
-
record: /*#__PURE__*/ lex_schema_1.l.
|
|
22
|
+
record: /*#__PURE__*/ lex_schema_1.l.lexMap(),
|
|
23
23
|
swapRecord: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
24
24
|
/*#__PURE__*/ lex_schema_1.l.nullable(/*#__PURE__*/ lex_schema_1.l.string({ format: 'cid' }))),
|
|
25
25
|
swapCommit: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
@@ -30,7 +30,8 @@ lex_schema_1.l.procedure($nsid,
|
|
|
30
30
|
cid: /*#__PURE__*/ lex_schema_1.l.string({ format: 'cid' }),
|
|
31
31
|
commit: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
32
32
|
/*#__PURE__*/ lex_schema_1.l.ref((() => RepoDefs.commitMeta))),
|
|
33
|
-
validationStatus: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
33
|
+
validationStatus: /*#__PURE__*/ lex_schema_1.l.optional(
|
|
34
|
+
/*#__PURE__*/ lex_schema_1.l.string()),
|
|
34
35
|
}), ['InvalidSwap']);
|
|
35
36
|
exports.main = main;
|
|
36
37
|
exports.$lxm = main.nsid, exports.$params = main.parameters, exports.$input = main.input, exports.$output = main.output;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"putRecord.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/putRecord.defs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,oDAAuC;AACvC,iEAA0C;AAE1C,MAAM,KAAK,GAAG,4BAA4B,CAAA;AAEjC,sBAAK;AAEd,uGAAuG;AACvG,MAAM,IAAI;AACR,aAAa;AACb,cAAC,CAAC,SAAS,CACT,KAAK;AACL,aAAa,CAAC,cAAC,CAAC,MAAM,EAAE;AACxB,aAAa,CAAC,cAAC,CAAC,WAAW,CAAC;IAC1B,IAAI,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IACzD,UAAU,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACtD,IAAI,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;IACtE,QAAQ,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAC,CAAC,OAAO,EAAE,CAAC;IAC7D,MAAM,EAAE,aAAa,CAAC,cAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"putRecord.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/putRecord.defs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,oDAAuC;AACvC,iEAA0C;AAE1C,MAAM,KAAK,GAAG,4BAA4B,CAAA;AAEjC,sBAAK;AAEd,uGAAuG;AACvG,MAAM,IA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EAAE,CAAC,QAAQ,CAAC,UAAU,CAAQ,CACnC,CACF;IACD,gBAAgB,EAAE,aAAa,CAAC,cAAC,CAAC,QAAQ;IACxC,aAAa,CAAC,cAAC,CAAC,MAAM,EAAyC,CAChE;CACF,CAAC,EACF,CAAC,aAAa,CAAC,CAChB,CAAA;AACM,oBAAI;AAcA,QAAA,IAAI,GAAiB,IAAI,CAAC,IAAI,EACzC,QAAA,OAAO,GAAiB,IAAI,CAAC,UAAU,EACvC,QAAA,MAAM,GAAiB,IAAI,CAAC,KAAK,EACjC,QAAA,OAAO,GAAiB,IAAI,CAAC,MAAM,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\nimport * as RepoDefs from './defs.defs.js'\n\nconst $nsid = 'com.atproto.repo.putRecord'\n\nexport { $nsid }\n\n/** Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. */\nconst main =\n /*#__PURE__*/\n l.procedure(\n $nsid,\n /*#__PURE__*/ l.params(),\n /*#__PURE__*/ l.jsonPayload({\n repo: /*#__PURE__*/ l.string({ format: 'at-identifier' }),\n collection: /*#__PURE__*/ l.string({ format: 'nsid' }),\n rkey: /*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),\n validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),\n record: /*#__PURE__*/ l.lexMap(),\n swapRecord: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.nullable(/*#__PURE__*/ l.string({ format: 'cid' })),\n ),\n swapCommit: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.string({ format: 'cid' }),\n ),\n }),\n /*#__PURE__*/ l.jsonPayload({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n cid: /*#__PURE__*/ l.string({ format: 'cid' }),\n commit: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.ref<RepoDefs.CommitMeta>(\n (() => RepoDefs.commitMeta) as any,\n ),\n ),\n validationStatus: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),\n ),\n }),\n ['InvalidSwap'],\n )\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>\nexport type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<\n typeof main,\n B\n>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n\nexport const $lxm = /*#__PURE__*/ main.nsid,\n $params = /*#__PURE__*/ main.parameters,\n $input = /*#__PURE__*/ main.input,\n $output = /*#__PURE__*/ main.output\n"]}
|
|
@@ -8,11 +8,11 @@ declare const main: l.Procedure<"com.atproto.repo.uploadBlob", l.ParamsSchema<{}
|
|
|
8
8
|
}>;
|
|
9
9
|
}>>, undefined>;
|
|
10
10
|
export { main };
|
|
11
|
-
export type Params = l.InferMethodParams<typeof main>;
|
|
12
|
-
export type Input = l.InferMethodInput<typeof main>;
|
|
13
|
-
export type InputBody = l.InferMethodInputBody<typeof main>;
|
|
14
|
-
export type Output = l.InferMethodOutput<typeof main>;
|
|
15
|
-
export type OutputBody = l.InferMethodOutputBody<typeof main>;
|
|
11
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
12
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>;
|
|
13
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<typeof main, B>;
|
|
14
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
15
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
16
16
|
export declare const $lxm: "com.atproto.repo.uploadBlob", $params: l.ParamsSchema<{}>, $input: l.Payload<"*/*", undefined>, $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
17
17
|
blob: l.BlobSchema<{
|
|
18
18
|
allowLegacy: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadBlob.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/uploadBlob.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,gCAAgC,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,gRAAgR;AAChR,QAAA,MAAM,IAAI;;;;eASP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"uploadBlob.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/uploadBlob.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,gCAAgC,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,gRAAgR;AAChR,QAAA,MAAM,IAAI;;;;eASP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,CAAA;AACtD,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,gBAAgB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AACzE,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,oBAAoB,CAC/D,OAAO,IAAI,EACX,CAAC,CACF,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,qBAAqB,CACjE,OAAO,IAAI,EACX,CAAC,CACF,CAAA;AAED,eAAO,MAAM,IAAI,+BAA0B,EACzC,OAAO,oBAAgC,EACvC,MAAM,6BAA2B,EACjC,OAAO;;;;GAA4B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadBlob.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/uploadBlob.defs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oDAAuC;AAEvC,MAAM,KAAK,GAAG,6BAA6B,CAAA;AAElC,sBAAK;AAEd,gRAAgR;AAChR,MAAM,IAAI;AACR,aAAa;AACb,cAAC,CAAC,SAAS,CACT,KAAK;AACL,aAAa,CAAC,cAAC,CAAC,MAAM,EAAE;AACxB,aAAa,CAAC,cAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AAC9B,aAAa,CAAC,cAAC,CAAC,WAAW,CAAC;IAC1B,IAAI,EAAE,aAAa,CAAC,cAAC,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;CACnD,CAAC,CACH,CAAA;AACM,oBAAI;
|
|
1
|
+
{"version":3,"file":"uploadBlob.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/repo/uploadBlob.defs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oDAAuC;AAEvC,MAAM,KAAK,GAAG,6BAA6B,CAAA;AAElC,sBAAK;AAEd,gRAAgR;AAChR,MAAM,IAAI;AACR,aAAa;AACb,cAAC,CAAC,SAAS,CACT,KAAK;AACL,aAAa,CAAC,cAAC,CAAC,MAAM,EAAE;AACxB,aAAa,CAAC,cAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AAC9B,aAAa,CAAC,cAAC,CAAC,WAAW,CAAC;IAC1B,IAAI,EAAE,aAAa,CAAC,cAAC,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;CACnD,CAAC,CACH,CAAA;AACM,oBAAI;AAcA,QAAA,IAAI,GAAiB,IAAI,CAAC,IAAI,EACzC,QAAA,OAAO,GAAiB,IAAI,CAAC,UAAU,EACvC,QAAA,MAAM,GAAiB,IAAI,CAAC,KAAK,EACjC,QAAA,OAAO,GAAiB,IAAI,CAAC,MAAM,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\n\nconst $nsid = 'com.atproto.repo.uploadBlob'\n\nexport { $nsid }\n\n/** Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS. */\nconst main =\n /*#__PURE__*/\n l.procedure(\n $nsid,\n /*#__PURE__*/ l.params(),\n /*#__PURE__*/ l.payload('*/*'),\n /*#__PURE__*/ l.jsonPayload({\n blob: /*#__PURE__*/ l.blob({ allowLegacy: false }),\n }),\n )\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>\nexport type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<\n typeof main,\n B\n>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n\nexport const $lxm = /*#__PURE__*/ main.nsid,\n $params = /*#__PURE__*/ main.parameters,\n $input = /*#__PURE__*/ main.input,\n $output = /*#__PURE__*/ main.output\n"]}
|
|
@@ -11,9 +11,9 @@ declare const main: l.Query<"com.atproto.sync.getBlob", l.ParamsSchema<{
|
|
|
11
11
|
}>;
|
|
12
12
|
}>, l.Payload<"*/*", undefined>, readonly ["BlobNotFound", "RepoNotFound", "RepoTakendown", "RepoSuspended", "RepoDeactivated"]>;
|
|
13
13
|
export { main };
|
|
14
|
-
export type Params = l.InferMethodParams<typeof main>;
|
|
15
|
-
export type Output = l.InferMethodOutput<typeof main>;
|
|
16
|
-
export type OutputBody = l.InferMethodOutputBody<typeof main>;
|
|
14
|
+
export type $Params = l.InferMethodParams<typeof main>;
|
|
15
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>;
|
|
16
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<typeof main, B>;
|
|
17
17
|
export declare const $lxm: "com.atproto.sync.getBlob", $params: l.ParamsSchema<{
|
|
18
18
|
readonly did: l.StringSchema<{
|
|
19
19
|
readonly format: "did";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBlob.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/sync/getBlob.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,6BAA6B,CAAA;AAExC,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,2IAA2I;AAC3I,QAAA,MAAM,IAAI;;;;;;;gIAgBP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"getBlob.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/sync/getBlob.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAEvC,QAAA,MAAM,KAAK,6BAA6B,CAAA;AAExC,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,2IAA2I;AAC3I,QAAA,MAAM,IAAI;;;;;;;gIAgBP,CAAA;AACH,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,CAAA;AACtD,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,iBAAiB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3E,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,qBAAqB,CACjE,OAAO,IAAI,EACX,CAAC,CACF,CAAA;AAED,eAAO,MAAM,IAAI,4BAA0B,EACzC,OAAO;;;;;;;EAAkB,EACzB,OAAO,6BAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBlob.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/sync/getBlob.defs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oDAAuC;AAEvC,MAAM,KAAK,GAAG,0BAA0B,CAAA;AAE/B,sBAAK;AAEd,2IAA2I;AAC3I,MAAM,IAAI;AACR,aAAa;AACb,cAAC,CAAC,KAAK,CACL,KAAK;AACL,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC9C,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;CAC/C,CAAC;AACF,aAAa,CAAC,cAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAC9B;IACE,cAAc;IACd,cAAc;IACd,eAAe;IACf,eAAe;IACf,iBAAiB;CAClB,CACF,CAAA;AACM,oBAAI;
|
|
1
|
+
{"version":3,"file":"getBlob.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/com/atproto/sync/getBlob.defs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oDAAuC;AAEvC,MAAM,KAAK,GAAG,0BAA0B,CAAA;AAE/B,sBAAK;AAEd,2IAA2I;AAC3I,MAAM,IAAI;AACR,aAAa;AACb,cAAC,CAAC,KAAK,CACL,KAAK;AACL,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC9C,GAAG,EAAE,aAAa,CAAC,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;CAC/C,CAAC;AACF,aAAa,CAAC,cAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAC9B;IACE,cAAc;IACd,cAAc;IACd,eAAe;IACf,eAAe;IACf,iBAAiB;CAClB,CACF,CAAA;AACM,oBAAI;AASA,QAAA,IAAI,GAAiB,IAAI,CAAC,IAAI,EACzC,QAAA,OAAO,GAAG,IAAI,CAAC,UAAU,EACzB,QAAA,OAAO,GAAG,IAAI,CAAC,MAAM,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex-schema'\n\nconst $nsid = 'com.atproto.sync.getBlob'\n\nexport { $nsid }\n\n/** Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. */\nconst main =\n /*#__PURE__*/\n l.query(\n $nsid,\n /*#__PURE__*/ l.params({\n did: /*#__PURE__*/ l.string({ format: 'did' }),\n cid: /*#__PURE__*/ l.string({ format: 'cid' }),\n }),\n /*#__PURE__*/ l.payload('*/*'),\n [\n 'BlobNotFound',\n 'RepoNotFound',\n 'RepoTakendown',\n 'RepoSuspended',\n 'RepoDeactivated',\n ],\n )\nexport { main }\n\nexport type $Params = l.InferMethodParams<typeof main>\nexport type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<\n typeof main,\n B\n>\n\nexport const $lxm = /*#__PURE__*/ main.nsid,\n $params = main.parameters,\n $output = main.output\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/lex-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "HTTP client for interacting with Lexicon based APIs",
|
|
6
6
|
"keywords": [
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"tslib": "^2.8.1",
|
|
40
|
-
"@atproto/lex-data": "^0.0.
|
|
41
|
-
"@atproto/lex-json": "^0.0.
|
|
42
|
-
"@atproto/lex-schema": "^0.0.
|
|
40
|
+
"@atproto/lex-data": "^0.0.12",
|
|
41
|
+
"@atproto/lex-json": "^0.0.12",
|
|
42
|
+
"@atproto/lex-schema": "^0.0.13"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"vitest": "^4.0.16",
|
|
46
|
-
"@atproto/lex-cbor": "^0.0.
|
|
47
|
-
"@atproto/lex-builder": "^0.0.
|
|
46
|
+
"@atproto/lex-cbor": "^0.0.12",
|
|
47
|
+
"@atproto/lex-builder": "^0.0.16"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"prebuild": "node ./scripts/lex-build.mjs",
|
package/src/client.ts
CHANGED
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
Query,
|
|
16
16
|
RecordSchema,
|
|
17
17
|
Restricted,
|
|
18
|
-
UnknownObject,
|
|
19
18
|
getMain,
|
|
20
19
|
} from '@atproto/lex-schema'
|
|
21
20
|
import { Agent, AgentOptions, buildAgent } from './agent.js'
|
|
@@ -263,9 +262,10 @@ export type ListOutput<T extends RecordSchema> = InferMethodOutputBody<
|
|
|
263
262
|
/** Records that successfully validated against the schema. */
|
|
264
263
|
records: ListRecord<Infer<T>>[]
|
|
265
264
|
// @NOTE Because the schema uses "type": "unknown" instead of an open union,
|
|
266
|
-
// we have to use
|
|
265
|
+
// we have to use LexMap instead of Unknown$TypedObject here, which is
|
|
266
|
+
// unfortunate.
|
|
267
267
|
/** Records that failed schema validation. */
|
|
268
|
-
invalid:
|
|
268
|
+
invalid: LexMap[]
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
/**
|
|
@@ -941,7 +941,7 @@ function getLiteralRecordKey<const T extends RecordSchema>(
|
|
|
941
941
|
schema: T,
|
|
942
942
|
): InferRecordKey<T> {
|
|
943
943
|
if (schema.key.startsWith('literal:')) {
|
|
944
|
-
return schema.key.slice(8)
|
|
944
|
+
return schema.key.slice(8) as InferRecordKey<T>
|
|
945
945
|
}
|
|
946
946
|
|
|
947
947
|
throw new TypeError(
|
|
@@ -22,7 +22,7 @@ const main =
|
|
|
22
22
|
/*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),
|
|
23
23
|
),
|
|
24
24
|
validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
|
|
25
|
-
record: /*#__PURE__*/ l.
|
|
25
|
+
record: /*#__PURE__*/ l.lexMap(),
|
|
26
26
|
swapCommit: /*#__PURE__*/ l.optional(
|
|
27
27
|
/*#__PURE__*/ l.string({ format: 'cid' }),
|
|
28
28
|
),
|
|
@@ -35,17 +35,25 @@ const main =
|
|
|
35
35
|
(() => RepoDefs.commitMeta) as any,
|
|
36
36
|
),
|
|
37
37
|
),
|
|
38
|
-
validationStatus: /*#__PURE__*/ l.optional(
|
|
38
|
+
validationStatus: /*#__PURE__*/ l.optional(
|
|
39
|
+
/*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),
|
|
40
|
+
),
|
|
39
41
|
}),
|
|
40
42
|
['InvalidSwap'],
|
|
41
43
|
)
|
|
42
44
|
export { main }
|
|
43
45
|
|
|
44
|
-
export type Params = l.InferMethodParams<typeof main>
|
|
45
|
-
export type Input = l.InferMethodInput<typeof main>
|
|
46
|
-
export type InputBody = l.InferMethodInputBody<
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
export type $Params = l.InferMethodParams<typeof main>
|
|
47
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>
|
|
48
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<
|
|
49
|
+
typeof main,
|
|
50
|
+
B
|
|
51
|
+
>
|
|
52
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>
|
|
53
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<
|
|
54
|
+
typeof main,
|
|
55
|
+
B
|
|
56
|
+
>
|
|
49
57
|
|
|
50
58
|
export const $lxm = /*#__PURE__*/ main.nsid,
|
|
51
59
|
$params = /*#__PURE__*/ main.parameters,
|
|
@@ -37,11 +37,17 @@ const main =
|
|
|
37
37
|
)
|
|
38
38
|
export { main }
|
|
39
39
|
|
|
40
|
-
export type Params = l.InferMethodParams<typeof main>
|
|
41
|
-
export type Input = l.InferMethodInput<typeof main>
|
|
42
|
-
export type InputBody = l.InferMethodInputBody<
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
export type $Params = l.InferMethodParams<typeof main>
|
|
41
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>
|
|
42
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<
|
|
43
|
+
typeof main,
|
|
44
|
+
B
|
|
45
|
+
>
|
|
46
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>
|
|
47
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<
|
|
48
|
+
typeof main,
|
|
49
|
+
B
|
|
50
|
+
>
|
|
45
51
|
|
|
46
52
|
export const $lxm = /*#__PURE__*/ main.nsid,
|
|
47
53
|
$params = /*#__PURE__*/ main.parameters,
|
|
@@ -22,15 +22,18 @@ const main =
|
|
|
22
22
|
/*#__PURE__*/ l.jsonPayload({
|
|
23
23
|
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
24
24
|
cid: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({ format: 'cid' })),
|
|
25
|
-
value: /*#__PURE__*/ l.
|
|
25
|
+
value: /*#__PURE__*/ l.lexMap(),
|
|
26
26
|
}),
|
|
27
27
|
['RecordNotFound'],
|
|
28
28
|
)
|
|
29
29
|
export { main }
|
|
30
30
|
|
|
31
|
-
export type Params = l.InferMethodParams<typeof main>
|
|
32
|
-
export type Output = l.InferMethodOutput<typeof main>
|
|
33
|
-
export type OutputBody = l.InferMethodOutputBody<
|
|
31
|
+
export type $Params = l.InferMethodParams<typeof main>
|
|
32
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>
|
|
33
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<
|
|
34
|
+
typeof main,
|
|
35
|
+
B
|
|
36
|
+
>
|
|
34
37
|
|
|
35
38
|
export const $lxm = /*#__PURE__*/ main.nsid,
|
|
36
39
|
$params = main.parameters,
|
|
@@ -34,9 +34,12 @@ const main =
|
|
|
34
34
|
)
|
|
35
35
|
export { main }
|
|
36
36
|
|
|
37
|
-
export type Params = l.InferMethodParams<typeof main>
|
|
38
|
-
export type Output = l.InferMethodOutput<typeof main>
|
|
39
|
-
export type OutputBody = l.InferMethodOutputBody<
|
|
37
|
+
export type $Params = l.InferMethodParams<typeof main>
|
|
38
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>
|
|
39
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<
|
|
40
|
+
typeof main,
|
|
41
|
+
B
|
|
42
|
+
>
|
|
40
43
|
|
|
41
44
|
export const $lxm = /*#__PURE__*/ main.nsid,
|
|
42
45
|
$params = main.parameters,
|
|
@@ -46,7 +49,7 @@ type Record$0 = {
|
|
|
46
49
|
$type?: 'com.atproto.repo.listRecords#record'
|
|
47
50
|
uri: l.AtUriString
|
|
48
51
|
cid: l.CidString
|
|
49
|
-
value: l.
|
|
52
|
+
value: l.LexMap
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
export type { Record$0 as Record }
|
|
@@ -57,7 +60,7 @@ const record$0 = /*#__PURE__*/ l.typedObject<Record$0>(
|
|
|
57
60
|
/*#__PURE__*/ l.object({
|
|
58
61
|
uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),
|
|
59
62
|
cid: /*#__PURE__*/ l.string({ format: 'cid' }),
|
|
60
|
-
value: /*#__PURE__*/ l.
|
|
63
|
+
value: /*#__PURE__*/ l.lexMap(),
|
|
61
64
|
}),
|
|
62
65
|
)
|
|
63
66
|
|
|
@@ -20,7 +20,7 @@ const main =
|
|
|
20
20
|
collection: /*#__PURE__*/ l.string({ format: 'nsid' }),
|
|
21
21
|
rkey: /*#__PURE__*/ l.string({ format: 'record-key', maxLength: 512 }),
|
|
22
22
|
validate: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.boolean()),
|
|
23
|
-
record: /*#__PURE__*/ l.
|
|
23
|
+
record: /*#__PURE__*/ l.lexMap(),
|
|
24
24
|
swapRecord: /*#__PURE__*/ l.optional(
|
|
25
25
|
/*#__PURE__*/ l.nullable(/*#__PURE__*/ l.string({ format: 'cid' })),
|
|
26
26
|
),
|
|
@@ -36,17 +36,25 @@ const main =
|
|
|
36
36
|
(() => RepoDefs.commitMeta) as any,
|
|
37
37
|
),
|
|
38
38
|
),
|
|
39
|
-
validationStatus: /*#__PURE__*/ l.optional(
|
|
39
|
+
validationStatus: /*#__PURE__*/ l.optional(
|
|
40
|
+
/*#__PURE__*/ l.string<{ knownValues: ['valid', 'unknown'] }>(),
|
|
41
|
+
),
|
|
40
42
|
}),
|
|
41
43
|
['InvalidSwap'],
|
|
42
44
|
)
|
|
43
45
|
export { main }
|
|
44
46
|
|
|
45
|
-
export type Params = l.InferMethodParams<typeof main>
|
|
46
|
-
export type Input = l.InferMethodInput<typeof main>
|
|
47
|
-
export type InputBody = l.InferMethodInputBody<
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
export type $Params = l.InferMethodParams<typeof main>
|
|
48
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>
|
|
49
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<
|
|
50
|
+
typeof main,
|
|
51
|
+
B
|
|
52
|
+
>
|
|
53
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>
|
|
54
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<
|
|
55
|
+
typeof main,
|
|
56
|
+
B
|
|
57
|
+
>
|
|
50
58
|
|
|
51
59
|
export const $lxm = /*#__PURE__*/ main.nsid,
|
|
52
60
|
$params = /*#__PURE__*/ main.parameters,
|
|
@@ -21,11 +21,17 @@ const main =
|
|
|
21
21
|
)
|
|
22
22
|
export { main }
|
|
23
23
|
|
|
24
|
-
export type Params = l.InferMethodParams<typeof main>
|
|
25
|
-
export type Input = l.InferMethodInput<typeof main>
|
|
26
|
-
export type InputBody = l.InferMethodInputBody<
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export type $Params = l.InferMethodParams<typeof main>
|
|
25
|
+
export type $Input<B = l.BinaryData> = l.InferMethodInput<typeof main, B>
|
|
26
|
+
export type $InputBody<B = l.BinaryData> = l.InferMethodInputBody<
|
|
27
|
+
typeof main,
|
|
28
|
+
B
|
|
29
|
+
>
|
|
30
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>
|
|
31
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<
|
|
32
|
+
typeof main,
|
|
33
|
+
B
|
|
34
|
+
>
|
|
29
35
|
|
|
30
36
|
export const $lxm = /*#__PURE__*/ main.nsid,
|
|
31
37
|
$params = /*#__PURE__*/ main.parameters,
|
|
@@ -28,9 +28,12 @@ const main =
|
|
|
28
28
|
)
|
|
29
29
|
export { main }
|
|
30
30
|
|
|
31
|
-
export type Params = l.InferMethodParams<typeof main>
|
|
32
|
-
export type Output = l.InferMethodOutput<typeof main>
|
|
33
|
-
export type OutputBody = l.InferMethodOutputBody<
|
|
31
|
+
export type $Params = l.InferMethodParams<typeof main>
|
|
32
|
+
export type $Output<B = l.BinaryData> = l.InferMethodOutput<typeof main, B>
|
|
33
|
+
export type $OutputBody<B = l.BinaryData> = l.InferMethodOutputBody<
|
|
34
|
+
typeof main,
|
|
35
|
+
B
|
|
36
|
+
>
|
|
34
37
|
|
|
35
38
|
export const $lxm = /*#__PURE__*/ main.nsid,
|
|
36
39
|
$params = main.parameters,
|