WIP: A simple cli for daily tangled use cases and AI integration. This is for my personal use right now, but happy if others get mileage from it! :)
1/**
2 * GENERATED CODE - DO NOT MODIFY
3 */
4import {
5 XrpcClient,
6 type FetchHandler,
7 type FetchHandlerOptions,
8} from '@atproto/xrpc'
9import { schemas } from './lexicons.js'
10import { CID } from 'multiformats'
11import { type OmitKey, type Un$Typed } from './util.js'
12import * as ShTangledActorProfile from './types/sh/tangled/actor/profile.js'
13import * as ShTangledFeedReaction from './types/sh/tangled/feed/reaction.js'
14import * as ShTangledFeedStar from './types/sh/tangled/feed/star.js'
15import * as ShTangledGitRefUpdate from './types/sh/tangled/git/refUpdate.js'
16import * as ShTangledGraphFollow from './types/sh/tangled/graph/follow.js'
17import * as ShTangledRepoIssueStateClosed from './types/sh/tangled/repo/issue/state/closed.js'
18import * as ShTangledRepoIssueComment from './types/sh/tangled/repo/issue/comment.js'
19import * as ShTangledRepoIssue from './types/sh/tangled/repo/issue.js'
20import * as ShTangledRepoIssueStateOpen from './types/sh/tangled/repo/issue/state/open.js'
21import * as ShTangledRepoIssueState from './types/sh/tangled/repo/issue/state.js'
22import * as ShTangledKnot from './types/sh/tangled/knot.js'
23import * as ShTangledKnotListKeys from './types/sh/tangled/knot/listKeys.js'
24import * as ShTangledKnotMember from './types/sh/tangled/knot/member.js'
25import * as ShTangledKnotVersion from './types/sh/tangled/knot/version.js'
26import * as ShTangledLabelDefinition from './types/sh/tangled/label/definition.js'
27import * as ShTangledLabelOp from './types/sh/tangled/label/op.js'
28import * as ShTangledPipelineCancelPipeline from './types/sh/tangled/pipeline/cancelPipeline.js'
29import * as ShTangledPipeline from './types/sh/tangled/pipeline.js'
30import * as ShTangledPipelineStatus from './types/sh/tangled/pipeline/status.js'
31import * as ShTangledRepoPullStatusClosed from './types/sh/tangled/repo/pull/status/closed.js'
32import * as ShTangledRepoPullComment from './types/sh/tangled/repo/pull/comment.js'
33import * as ShTangledRepoPullStatusMerged from './types/sh/tangled/repo/pull/status/merged.js'
34import * as ShTangledRepoPullStatusOpen from './types/sh/tangled/repo/pull/status/open.js'
35import * as ShTangledRepoPull from './types/sh/tangled/repo/pull.js'
36import * as ShTangledRepoPullStatus from './types/sh/tangled/repo/pull/status.js'
37import * as ShTangledRepoAddSecret from './types/sh/tangled/repo/addSecret.js'
38import * as ShTangledRepoArchive from './types/sh/tangled/repo/archive.js'
39import * as ShTangledRepoArtifact from './types/sh/tangled/repo/artifact.js'
40import * as ShTangledRepoBlob from './types/sh/tangled/repo/blob.js'
41import * as ShTangledRepoBranch from './types/sh/tangled/repo/branch.js'
42import * as ShTangledRepoBranches from './types/sh/tangled/repo/branches.js'
43import * as ShTangledRepoCollaborator from './types/sh/tangled/repo/collaborator.js'
44import * as ShTangledRepoCompare from './types/sh/tangled/repo/compare.js'
45import * as ShTangledRepoCreate from './types/sh/tangled/repo/create.js'
46import * as ShTangledRepoSetDefaultBranch from './types/sh/tangled/repo/setDefaultBranch.js'
47import * as ShTangledRepoDelete from './types/sh/tangled/repo/delete.js'
48import * as ShTangledRepoDeleteBranch from './types/sh/tangled/repo/deleteBranch.js'
49import * as ShTangledRepoDiff from './types/sh/tangled/repo/diff.js'
50import * as ShTangledRepoForkStatus from './types/sh/tangled/repo/forkStatus.js'
51import * as ShTangledRepoForkSync from './types/sh/tangled/repo/forkSync.js'
52import * as ShTangledRepoGetDefaultBranch from './types/sh/tangled/repo/getDefaultBranch.js'
53import * as ShTangledRepoHiddenRef from './types/sh/tangled/repo/hiddenRef.js'
54import * as ShTangledRepoLanguages from './types/sh/tangled/repo/languages.js'
55import * as ShTangledRepoListSecrets from './types/sh/tangled/repo/listSecrets.js'
56import * as ShTangledRepoLog from './types/sh/tangled/repo/log.js'
57import * as ShTangledRepoMerge from './types/sh/tangled/repo/merge.js'
58import * as ShTangledRepoMergeCheck from './types/sh/tangled/repo/mergeCheck.js'
59import * as ShTangledRepoRemoveSecret from './types/sh/tangled/repo/removeSecret.js'
60import * as ShTangledRepo from './types/sh/tangled/repo.js'
61import * as ShTangledRepoTag from './types/sh/tangled/repo/tag.js'
62import * as ShTangledRepoTags from './types/sh/tangled/repo/tags.js'
63import * as ShTangledRepoTree from './types/sh/tangled/repo/tree.js'
64import * as ShTangledSpindleMember from './types/sh/tangled/spindle/member.js'
65import * as ShTangledSpindle from './types/sh/tangled/spindle.js'
66import * as ShTangledString from './types/sh/tangled/string.js'
67
68export * as ShTangledActorProfile from './types/sh/tangled/actor/profile.js'
69export * as ShTangledFeedReaction from './types/sh/tangled/feed/reaction.js'
70export * as ShTangledFeedStar from './types/sh/tangled/feed/star.js'
71export * as ShTangledGitRefUpdate from './types/sh/tangled/git/refUpdate.js'
72export * as ShTangledGraphFollow from './types/sh/tangled/graph/follow.js'
73export * as ShTangledRepoIssueStateClosed from './types/sh/tangled/repo/issue/state/closed.js'
74export * as ShTangledRepoIssueComment from './types/sh/tangled/repo/issue/comment.js'
75export * as ShTangledRepoIssue from './types/sh/tangled/repo/issue.js'
76export * as ShTangledRepoIssueStateOpen from './types/sh/tangled/repo/issue/state/open.js'
77export * as ShTangledRepoIssueState from './types/sh/tangled/repo/issue/state.js'
78export * as ShTangledKnot from './types/sh/tangled/knot.js'
79export * as ShTangledKnotListKeys from './types/sh/tangled/knot/listKeys.js'
80export * as ShTangledKnotMember from './types/sh/tangled/knot/member.js'
81export * as ShTangledKnotVersion from './types/sh/tangled/knot/version.js'
82export * as ShTangledLabelDefinition from './types/sh/tangled/label/definition.js'
83export * as ShTangledLabelOp from './types/sh/tangled/label/op.js'
84export * as ShTangledPipelineCancelPipeline from './types/sh/tangled/pipeline/cancelPipeline.js'
85export * as ShTangledPipeline from './types/sh/tangled/pipeline.js'
86export * as ShTangledPipelineStatus from './types/sh/tangled/pipeline/status.js'
87export * as ShTangledRepoPullStatusClosed from './types/sh/tangled/repo/pull/status/closed.js'
88export * as ShTangledRepoPullComment from './types/sh/tangled/repo/pull/comment.js'
89export * as ShTangledRepoPullStatusMerged from './types/sh/tangled/repo/pull/status/merged.js'
90export * as ShTangledRepoPullStatusOpen from './types/sh/tangled/repo/pull/status/open.js'
91export * as ShTangledRepoPull from './types/sh/tangled/repo/pull.js'
92export * as ShTangledRepoPullStatus from './types/sh/tangled/repo/pull/status.js'
93export * as ShTangledRepoAddSecret from './types/sh/tangled/repo/addSecret.js'
94export * as ShTangledRepoArchive from './types/sh/tangled/repo/archive.js'
95export * as ShTangledRepoArtifact from './types/sh/tangled/repo/artifact.js'
96export * as ShTangledRepoBlob from './types/sh/tangled/repo/blob.js'
97export * as ShTangledRepoBranch from './types/sh/tangled/repo/branch.js'
98export * as ShTangledRepoBranches from './types/sh/tangled/repo/branches.js'
99export * as ShTangledRepoCollaborator from './types/sh/tangled/repo/collaborator.js'
100export * as ShTangledRepoCompare from './types/sh/tangled/repo/compare.js'
101export * as ShTangledRepoCreate from './types/sh/tangled/repo/create.js'
102export * as ShTangledRepoSetDefaultBranch from './types/sh/tangled/repo/setDefaultBranch.js'
103export * as ShTangledRepoDelete from './types/sh/tangled/repo/delete.js'
104export * as ShTangledRepoDeleteBranch from './types/sh/tangled/repo/deleteBranch.js'
105export * as ShTangledRepoDiff from './types/sh/tangled/repo/diff.js'
106export * as ShTangledRepoForkStatus from './types/sh/tangled/repo/forkStatus.js'
107export * as ShTangledRepoForkSync from './types/sh/tangled/repo/forkSync.js'
108export * as ShTangledRepoGetDefaultBranch from './types/sh/tangled/repo/getDefaultBranch.js'
109export * as ShTangledRepoHiddenRef from './types/sh/tangled/repo/hiddenRef.js'
110export * as ShTangledRepoLanguages from './types/sh/tangled/repo/languages.js'
111export * as ShTangledRepoListSecrets from './types/sh/tangled/repo/listSecrets.js'
112export * as ShTangledRepoLog from './types/sh/tangled/repo/log.js'
113export * as ShTangledRepoMerge from './types/sh/tangled/repo/merge.js'
114export * as ShTangledRepoMergeCheck from './types/sh/tangled/repo/mergeCheck.js'
115export * as ShTangledRepoRemoveSecret from './types/sh/tangled/repo/removeSecret.js'
116export * as ShTangledRepo from './types/sh/tangled/repo.js'
117export * as ShTangledRepoTag from './types/sh/tangled/repo/tag.js'
118export * as ShTangledRepoTags from './types/sh/tangled/repo/tags.js'
119export * as ShTangledRepoTree from './types/sh/tangled/repo/tree.js'
120export * as ShTangledSpindleMember from './types/sh/tangled/spindle/member.js'
121export * as ShTangledSpindle from './types/sh/tangled/spindle.js'
122export * as ShTangledString from './types/sh/tangled/string.js'
123
124export const SH_TANGLED_REPO_ISSUE_STATE = {
125 Closed: 'sh.tangled.repo.issue.state.closed',
126 Open: 'sh.tangled.repo.issue.state.open',
127}
128export const SH_TANGLED_REPO_PULL_STATUS = {
129 Closed: 'sh.tangled.repo.pull.status.closed',
130 Merged: 'sh.tangled.repo.pull.status.merged',
131 Open: 'sh.tangled.repo.pull.status.open',
132}
133
134export class AtpBaseClient extends XrpcClient {
135 sh: ShNS
136
137 constructor(options: FetchHandler | FetchHandlerOptions) {
138 super(options, schemas)
139 this.sh = new ShNS(this)
140 }
141
142 /** @deprecated use `this` instead */
143 get xrpc(): XrpcClient {
144 return this
145 }
146}
147
148export class ShNS {
149 _client: XrpcClient
150 tangled: ShTangledNS
151
152 constructor(client: XrpcClient) {
153 this._client = client
154 this.tangled = new ShTangledNS(client)
155 }
156}
157
158export class ShTangledNS {
159 _client: XrpcClient
160 knot: ShTangledKnotRecord
161 pipeline: ShTangledPipelineRecord
162 repo: ShTangledRepoRecord
163 spindle: ShTangledSpindleRecord
164 string: ShTangledStringRecord
165 actor: ShTangledActorNS
166 feed: ShTangledFeedNS
167 git: ShTangledGitNS
168 graph: ShTangledGraphNS
169 repo: ShTangledRepoNS
170 knot: ShTangledKnotNS
171 label: ShTangledLabelNS
172 pipeline: ShTangledPipelineNS
173 spindle: ShTangledSpindleNS
174
175 constructor(client: XrpcClient) {
176 this._client = client
177 this.actor = new ShTangledActorNS(client)
178 this.feed = new ShTangledFeedNS(client)
179 this.git = new ShTangledGitNS(client)
180 this.graph = new ShTangledGraphNS(client)
181 this.repo = new ShTangledRepoNS(client)
182 this.knot = new ShTangledKnotNS(client)
183 this.label = new ShTangledLabelNS(client)
184 this.pipeline = new ShTangledPipelineNS(client)
185 this.spindle = new ShTangledSpindleNS(client)
186 this.knot = new ShTangledKnotRecord(client)
187 this.pipeline = new ShTangledPipelineRecord(client)
188 this.repo = new ShTangledRepoRecord(client)
189 this.spindle = new ShTangledSpindleRecord(client)
190 this.string = new ShTangledStringRecord(client)
191 }
192}
193
194export class ShTangledActorNS {
195 _client: XrpcClient
196 profile: ShTangledActorProfileRecord
197
198 constructor(client: XrpcClient) {
199 this._client = client
200 this.profile = new ShTangledActorProfileRecord(client)
201 }
202}
203
204export class ShTangledActorProfileRecord {
205 _client: XrpcClient
206
207 constructor(client: XrpcClient) {
208 this._client = client
209 }
210
211 async list(
212 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
213 ): Promise<{
214 cursor?: string
215 records: { uri: string; value: ShTangledActorProfile.Record }[]
216 }> {
217 const res = await this._client.call('com.atproto.repo.listRecords', {
218 collection: 'sh.tangled.actor.profile',
219 ...params,
220 })
221 return res.data
222 }
223
224 async get(
225 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
226 ): Promise<{
227 uri: string
228 cid: string
229 value: ShTangledActorProfile.Record
230 }> {
231 const res = await this._client.call('com.atproto.repo.getRecord', {
232 collection: 'sh.tangled.actor.profile',
233 ...params,
234 })
235 return res.data
236 }
237
238 async create(
239 params: OmitKey<
240 ComAtprotoRepoCreateRecord.InputSchema,
241 'collection' | 'record'
242 >,
243 record: Un$Typed<ShTangledActorProfile.Record>,
244 headers?: Record<string, string>,
245 ): Promise<{ uri: string; cid: string }> {
246 const collection = 'sh.tangled.actor.profile'
247 const res = await this._client.call(
248 'com.atproto.repo.createRecord',
249 undefined,
250 {
251 collection,
252 rkey: 'self',
253 ...params,
254 record: { ...record, $type: collection },
255 },
256 { encoding: 'application/json', headers },
257 )
258 return res.data
259 }
260
261 async put(
262 params: OmitKey<
263 ComAtprotoRepoPutRecord.InputSchema,
264 'collection' | 'record'
265 >,
266 record: Un$Typed<ShTangledActorProfile.Record>,
267 headers?: Record<string, string>,
268 ): Promise<{ uri: string; cid: string }> {
269 const collection = 'sh.tangled.actor.profile'
270 const res = await this._client.call(
271 'com.atproto.repo.putRecord',
272 undefined,
273 { collection, ...params, record: { ...record, $type: collection } },
274 { encoding: 'application/json', headers },
275 )
276 return res.data
277 }
278
279 async delete(
280 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
281 headers?: Record<string, string>,
282 ): Promise<void> {
283 await this._client.call(
284 'com.atproto.repo.deleteRecord',
285 undefined,
286 { collection: 'sh.tangled.actor.profile', ...params },
287 { headers },
288 )
289 }
290}
291
292export class ShTangledFeedNS {
293 _client: XrpcClient
294 reaction: ShTangledFeedReactionRecord
295 star: ShTangledFeedStarRecord
296
297 constructor(client: XrpcClient) {
298 this._client = client
299 this.reaction = new ShTangledFeedReactionRecord(client)
300 this.star = new ShTangledFeedStarRecord(client)
301 }
302}
303
304export class ShTangledFeedReactionRecord {
305 _client: XrpcClient
306
307 constructor(client: XrpcClient) {
308 this._client = client
309 }
310
311 async list(
312 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
313 ): Promise<{
314 cursor?: string
315 records: { uri: string; value: ShTangledFeedReaction.Record }[]
316 }> {
317 const res = await this._client.call('com.atproto.repo.listRecords', {
318 collection: 'sh.tangled.feed.reaction',
319 ...params,
320 })
321 return res.data
322 }
323
324 async get(
325 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
326 ): Promise<{
327 uri: string
328 cid: string
329 value: ShTangledFeedReaction.Record
330 }> {
331 const res = await this._client.call('com.atproto.repo.getRecord', {
332 collection: 'sh.tangled.feed.reaction',
333 ...params,
334 })
335 return res.data
336 }
337
338 async create(
339 params: OmitKey<
340 ComAtprotoRepoCreateRecord.InputSchema,
341 'collection' | 'record'
342 >,
343 record: Un$Typed<ShTangledFeedReaction.Record>,
344 headers?: Record<string, string>,
345 ): Promise<{ uri: string; cid: string }> {
346 const collection = 'sh.tangled.feed.reaction'
347 const res = await this._client.call(
348 'com.atproto.repo.createRecord',
349 undefined,
350 { collection, ...params, record: { ...record, $type: collection } },
351 { encoding: 'application/json', headers },
352 )
353 return res.data
354 }
355
356 async put(
357 params: OmitKey<
358 ComAtprotoRepoPutRecord.InputSchema,
359 'collection' | 'record'
360 >,
361 record: Un$Typed<ShTangledFeedReaction.Record>,
362 headers?: Record<string, string>,
363 ): Promise<{ uri: string; cid: string }> {
364 const collection = 'sh.tangled.feed.reaction'
365 const res = await this._client.call(
366 'com.atproto.repo.putRecord',
367 undefined,
368 { collection, ...params, record: { ...record, $type: collection } },
369 { encoding: 'application/json', headers },
370 )
371 return res.data
372 }
373
374 async delete(
375 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
376 headers?: Record<string, string>,
377 ): Promise<void> {
378 await this._client.call(
379 'com.atproto.repo.deleteRecord',
380 undefined,
381 { collection: 'sh.tangled.feed.reaction', ...params },
382 { headers },
383 )
384 }
385}
386
387export class ShTangledFeedStarRecord {
388 _client: XrpcClient
389
390 constructor(client: XrpcClient) {
391 this._client = client
392 }
393
394 async list(
395 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
396 ): Promise<{
397 cursor?: string
398 records: { uri: string; value: ShTangledFeedStar.Record }[]
399 }> {
400 const res = await this._client.call('com.atproto.repo.listRecords', {
401 collection: 'sh.tangled.feed.star',
402 ...params,
403 })
404 return res.data
405 }
406
407 async get(
408 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
409 ): Promise<{ uri: string; cid: string; value: ShTangledFeedStar.Record }> {
410 const res = await this._client.call('com.atproto.repo.getRecord', {
411 collection: 'sh.tangled.feed.star',
412 ...params,
413 })
414 return res.data
415 }
416
417 async create(
418 params: OmitKey<
419 ComAtprotoRepoCreateRecord.InputSchema,
420 'collection' | 'record'
421 >,
422 record: Un$Typed<ShTangledFeedStar.Record>,
423 headers?: Record<string, string>,
424 ): Promise<{ uri: string; cid: string }> {
425 const collection = 'sh.tangled.feed.star'
426 const res = await this._client.call(
427 'com.atproto.repo.createRecord',
428 undefined,
429 { collection, ...params, record: { ...record, $type: collection } },
430 { encoding: 'application/json', headers },
431 )
432 return res.data
433 }
434
435 async put(
436 params: OmitKey<
437 ComAtprotoRepoPutRecord.InputSchema,
438 'collection' | 'record'
439 >,
440 record: Un$Typed<ShTangledFeedStar.Record>,
441 headers?: Record<string, string>,
442 ): Promise<{ uri: string; cid: string }> {
443 const collection = 'sh.tangled.feed.star'
444 const res = await this._client.call(
445 'com.atproto.repo.putRecord',
446 undefined,
447 { collection, ...params, record: { ...record, $type: collection } },
448 { encoding: 'application/json', headers },
449 )
450 return res.data
451 }
452
453 async delete(
454 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
455 headers?: Record<string, string>,
456 ): Promise<void> {
457 await this._client.call(
458 'com.atproto.repo.deleteRecord',
459 undefined,
460 { collection: 'sh.tangled.feed.star', ...params },
461 { headers },
462 )
463 }
464}
465
466export class ShTangledGitNS {
467 _client: XrpcClient
468 refUpdate: ShTangledGitRefUpdateRecord
469
470 constructor(client: XrpcClient) {
471 this._client = client
472 this.refUpdate = new ShTangledGitRefUpdateRecord(client)
473 }
474}
475
476export class ShTangledGitRefUpdateRecord {
477 _client: XrpcClient
478
479 constructor(client: XrpcClient) {
480 this._client = client
481 }
482
483 async list(
484 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
485 ): Promise<{
486 cursor?: string
487 records: { uri: string; value: ShTangledGitRefUpdate.Record }[]
488 }> {
489 const res = await this._client.call('com.atproto.repo.listRecords', {
490 collection: 'sh.tangled.git.refUpdate',
491 ...params,
492 })
493 return res.data
494 }
495
496 async get(
497 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
498 ): Promise<{
499 uri: string
500 cid: string
501 value: ShTangledGitRefUpdate.Record
502 }> {
503 const res = await this._client.call('com.atproto.repo.getRecord', {
504 collection: 'sh.tangled.git.refUpdate',
505 ...params,
506 })
507 return res.data
508 }
509
510 async create(
511 params: OmitKey<
512 ComAtprotoRepoCreateRecord.InputSchema,
513 'collection' | 'record'
514 >,
515 record: Un$Typed<ShTangledGitRefUpdate.Record>,
516 headers?: Record<string, string>,
517 ): Promise<{ uri: string; cid: string }> {
518 const collection = 'sh.tangled.git.refUpdate'
519 const res = await this._client.call(
520 'com.atproto.repo.createRecord',
521 undefined,
522 { collection, ...params, record: { ...record, $type: collection } },
523 { encoding: 'application/json', headers },
524 )
525 return res.data
526 }
527
528 async put(
529 params: OmitKey<
530 ComAtprotoRepoPutRecord.InputSchema,
531 'collection' | 'record'
532 >,
533 record: Un$Typed<ShTangledGitRefUpdate.Record>,
534 headers?: Record<string, string>,
535 ): Promise<{ uri: string; cid: string }> {
536 const collection = 'sh.tangled.git.refUpdate'
537 const res = await this._client.call(
538 'com.atproto.repo.putRecord',
539 undefined,
540 { collection, ...params, record: { ...record, $type: collection } },
541 { encoding: 'application/json', headers },
542 )
543 return res.data
544 }
545
546 async delete(
547 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
548 headers?: Record<string, string>,
549 ): Promise<void> {
550 await this._client.call(
551 'com.atproto.repo.deleteRecord',
552 undefined,
553 { collection: 'sh.tangled.git.refUpdate', ...params },
554 { headers },
555 )
556 }
557}
558
559export class ShTangledGraphNS {
560 _client: XrpcClient
561 follow: ShTangledGraphFollowRecord
562
563 constructor(client: XrpcClient) {
564 this._client = client
565 this.follow = new ShTangledGraphFollowRecord(client)
566 }
567}
568
569export class ShTangledGraphFollowRecord {
570 _client: XrpcClient
571
572 constructor(client: XrpcClient) {
573 this._client = client
574 }
575
576 async list(
577 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
578 ): Promise<{
579 cursor?: string
580 records: { uri: string; value: ShTangledGraphFollow.Record }[]
581 }> {
582 const res = await this._client.call('com.atproto.repo.listRecords', {
583 collection: 'sh.tangled.graph.follow',
584 ...params,
585 })
586 return res.data
587 }
588
589 async get(
590 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
591 ): Promise<{ uri: string; cid: string; value: ShTangledGraphFollow.Record }> {
592 const res = await this._client.call('com.atproto.repo.getRecord', {
593 collection: 'sh.tangled.graph.follow',
594 ...params,
595 })
596 return res.data
597 }
598
599 async create(
600 params: OmitKey<
601 ComAtprotoRepoCreateRecord.InputSchema,
602 'collection' | 'record'
603 >,
604 record: Un$Typed<ShTangledGraphFollow.Record>,
605 headers?: Record<string, string>,
606 ): Promise<{ uri: string; cid: string }> {
607 const collection = 'sh.tangled.graph.follow'
608 const res = await this._client.call(
609 'com.atproto.repo.createRecord',
610 undefined,
611 { collection, ...params, record: { ...record, $type: collection } },
612 { encoding: 'application/json', headers },
613 )
614 return res.data
615 }
616
617 async put(
618 params: OmitKey<
619 ComAtprotoRepoPutRecord.InputSchema,
620 'collection' | 'record'
621 >,
622 record: Un$Typed<ShTangledGraphFollow.Record>,
623 headers?: Record<string, string>,
624 ): Promise<{ uri: string; cid: string }> {
625 const collection = 'sh.tangled.graph.follow'
626 const res = await this._client.call(
627 'com.atproto.repo.putRecord',
628 undefined,
629 { collection, ...params, record: { ...record, $type: collection } },
630 { encoding: 'application/json', headers },
631 )
632 return res.data
633 }
634
635 async delete(
636 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
637 headers?: Record<string, string>,
638 ): Promise<void> {
639 await this._client.call(
640 'com.atproto.repo.deleteRecord',
641 undefined,
642 { collection: 'sh.tangled.graph.follow', ...params },
643 { headers },
644 )
645 }
646}
647
648export class ShTangledRepoNS {
649 _client: XrpcClient
650 issue: ShTangledRepoIssueRecord
651 pull: ShTangledRepoPullRecord
652 artifact: ShTangledRepoArtifactRecord
653 collaborator: ShTangledRepoCollaboratorRecord
654 issue: ShTangledRepoIssueNS
655 pull: ShTangledRepoPullNS
656
657 constructor(client: XrpcClient) {
658 this._client = client
659 this.issue = new ShTangledRepoIssueNS(client)
660 this.pull = new ShTangledRepoPullNS(client)
661 this.issue = new ShTangledRepoIssueRecord(client)
662 this.pull = new ShTangledRepoPullRecord(client)
663 this.artifact = new ShTangledRepoArtifactRecord(client)
664 this.collaborator = new ShTangledRepoCollaboratorRecord(client)
665 }
666
667 addSecret(
668 data?: ShTangledRepoAddSecret.InputSchema,
669 opts?: ShTangledRepoAddSecret.CallOptions,
670 ): Promise<ShTangledRepoAddSecret.Response> {
671 return this._client.call('sh.tangled.repo.addSecret', opts?.qp, data, opts)
672 }
673
674 archive(
675 params?: ShTangledRepoArchive.QueryParams,
676 opts?: ShTangledRepoArchive.CallOptions,
677 ): Promise<ShTangledRepoArchive.Response> {
678 return this._client
679 .call('sh.tangled.repo.archive', params, undefined, opts)
680 .catch((e) => {
681 throw ShTangledRepoArchive.toKnownErr(e)
682 })
683 }
684
685 blob(
686 params?: ShTangledRepoBlob.QueryParams,
687 opts?: ShTangledRepoBlob.CallOptions,
688 ): Promise<ShTangledRepoBlob.Response> {
689 return this._client
690 .call('sh.tangled.repo.blob', params, undefined, opts)
691 .catch((e) => {
692 throw ShTangledRepoBlob.toKnownErr(e)
693 })
694 }
695
696 branch(
697 params?: ShTangledRepoBranch.QueryParams,
698 opts?: ShTangledRepoBranch.CallOptions,
699 ): Promise<ShTangledRepoBranch.Response> {
700 return this._client
701 .call('sh.tangled.repo.branch', params, undefined, opts)
702 .catch((e) => {
703 throw ShTangledRepoBranch.toKnownErr(e)
704 })
705 }
706
707 branches(
708 params?: ShTangledRepoBranches.QueryParams,
709 opts?: ShTangledRepoBranches.CallOptions,
710 ): Promise<ShTangledRepoBranches.Response> {
711 return this._client
712 .call('sh.tangled.repo.branches', params, undefined, opts)
713 .catch((e) => {
714 throw ShTangledRepoBranches.toKnownErr(e)
715 })
716 }
717
718 compare(
719 params?: ShTangledRepoCompare.QueryParams,
720 opts?: ShTangledRepoCompare.CallOptions,
721 ): Promise<ShTangledRepoCompare.Response> {
722 return this._client
723 .call('sh.tangled.repo.compare', params, undefined, opts)
724 .catch((e) => {
725 throw ShTangledRepoCompare.toKnownErr(e)
726 })
727 }
728
729 create(
730 data?: ShTangledRepoCreate.InputSchema,
731 opts?: ShTangledRepoCreate.CallOptions,
732 ): Promise<ShTangledRepoCreate.Response> {
733 return this._client.call('sh.tangled.repo.create', opts?.qp, data, opts)
734 }
735
736 setDefaultBranch(
737 data?: ShTangledRepoSetDefaultBranch.InputSchema,
738 opts?: ShTangledRepoSetDefaultBranch.CallOptions,
739 ): Promise<ShTangledRepoSetDefaultBranch.Response> {
740 return this._client.call(
741 'sh.tangled.repo.setDefaultBranch',
742 opts?.qp,
743 data,
744 opts,
745 )
746 }
747
748 delete(
749 data?: ShTangledRepoDelete.InputSchema,
750 opts?: ShTangledRepoDelete.CallOptions,
751 ): Promise<ShTangledRepoDelete.Response> {
752 return this._client.call('sh.tangled.repo.delete', opts?.qp, data, opts)
753 }
754
755 deleteBranch(
756 data?: ShTangledRepoDeleteBranch.InputSchema,
757 opts?: ShTangledRepoDeleteBranch.CallOptions,
758 ): Promise<ShTangledRepoDeleteBranch.Response> {
759 return this._client.call(
760 'sh.tangled.repo.deleteBranch',
761 opts?.qp,
762 data,
763 opts,
764 )
765 }
766
767 diff(
768 params?: ShTangledRepoDiff.QueryParams,
769 opts?: ShTangledRepoDiff.CallOptions,
770 ): Promise<ShTangledRepoDiff.Response> {
771 return this._client
772 .call('sh.tangled.repo.diff', params, undefined, opts)
773 .catch((e) => {
774 throw ShTangledRepoDiff.toKnownErr(e)
775 })
776 }
777
778 forkStatus(
779 data?: ShTangledRepoForkStatus.InputSchema,
780 opts?: ShTangledRepoForkStatus.CallOptions,
781 ): Promise<ShTangledRepoForkStatus.Response> {
782 return this._client.call('sh.tangled.repo.forkStatus', opts?.qp, data, opts)
783 }
784
785 forkSync(
786 data?: ShTangledRepoForkSync.InputSchema,
787 opts?: ShTangledRepoForkSync.CallOptions,
788 ): Promise<ShTangledRepoForkSync.Response> {
789 return this._client.call('sh.tangled.repo.forkSync', opts?.qp, data, opts)
790 }
791
792 getDefaultBranch(
793 params?: ShTangledRepoGetDefaultBranch.QueryParams,
794 opts?: ShTangledRepoGetDefaultBranch.CallOptions,
795 ): Promise<ShTangledRepoGetDefaultBranch.Response> {
796 return this._client
797 .call('sh.tangled.repo.getDefaultBranch', params, undefined, opts)
798 .catch((e) => {
799 throw ShTangledRepoGetDefaultBranch.toKnownErr(e)
800 })
801 }
802
803 hiddenRef(
804 data?: ShTangledRepoHiddenRef.InputSchema,
805 opts?: ShTangledRepoHiddenRef.CallOptions,
806 ): Promise<ShTangledRepoHiddenRef.Response> {
807 return this._client.call('sh.tangled.repo.hiddenRef', opts?.qp, data, opts)
808 }
809
810 languages(
811 params?: ShTangledRepoLanguages.QueryParams,
812 opts?: ShTangledRepoLanguages.CallOptions,
813 ): Promise<ShTangledRepoLanguages.Response> {
814 return this._client
815 .call('sh.tangled.repo.languages', params, undefined, opts)
816 .catch((e) => {
817 throw ShTangledRepoLanguages.toKnownErr(e)
818 })
819 }
820
821 listSecrets(
822 params?: ShTangledRepoListSecrets.QueryParams,
823 opts?: ShTangledRepoListSecrets.CallOptions,
824 ): Promise<ShTangledRepoListSecrets.Response> {
825 return this._client.call(
826 'sh.tangled.repo.listSecrets',
827 params,
828 undefined,
829 opts,
830 )
831 }
832
833 log(
834 params?: ShTangledRepoLog.QueryParams,
835 opts?: ShTangledRepoLog.CallOptions,
836 ): Promise<ShTangledRepoLog.Response> {
837 return this._client
838 .call('sh.tangled.repo.log', params, undefined, opts)
839 .catch((e) => {
840 throw ShTangledRepoLog.toKnownErr(e)
841 })
842 }
843
844 merge(
845 data?: ShTangledRepoMerge.InputSchema,
846 opts?: ShTangledRepoMerge.CallOptions,
847 ): Promise<ShTangledRepoMerge.Response> {
848 return this._client.call('sh.tangled.repo.merge', opts?.qp, data, opts)
849 }
850
851 mergeCheck(
852 data?: ShTangledRepoMergeCheck.InputSchema,
853 opts?: ShTangledRepoMergeCheck.CallOptions,
854 ): Promise<ShTangledRepoMergeCheck.Response> {
855 return this._client.call('sh.tangled.repo.mergeCheck', opts?.qp, data, opts)
856 }
857
858 removeSecret(
859 data?: ShTangledRepoRemoveSecret.InputSchema,
860 opts?: ShTangledRepoRemoveSecret.CallOptions,
861 ): Promise<ShTangledRepoRemoveSecret.Response> {
862 return this._client.call(
863 'sh.tangled.repo.removeSecret',
864 opts?.qp,
865 data,
866 opts,
867 )
868 }
869
870 tag(
871 params?: ShTangledRepoTag.QueryParams,
872 opts?: ShTangledRepoTag.CallOptions,
873 ): Promise<ShTangledRepoTag.Response> {
874 return this._client
875 .call('sh.tangled.repo.tag', params, undefined, opts)
876 .catch((e) => {
877 throw ShTangledRepoTag.toKnownErr(e)
878 })
879 }
880
881 tags(
882 params?: ShTangledRepoTags.QueryParams,
883 opts?: ShTangledRepoTags.CallOptions,
884 ): Promise<ShTangledRepoTags.Response> {
885 return this._client
886 .call('sh.tangled.repo.tags', params, undefined, opts)
887 .catch((e) => {
888 throw ShTangledRepoTags.toKnownErr(e)
889 })
890 }
891
892 tree(
893 params?: ShTangledRepoTree.QueryParams,
894 opts?: ShTangledRepoTree.CallOptions,
895 ): Promise<ShTangledRepoTree.Response> {
896 return this._client
897 .call('sh.tangled.repo.tree', params, undefined, opts)
898 .catch((e) => {
899 throw ShTangledRepoTree.toKnownErr(e)
900 })
901 }
902}
903
904export class ShTangledRepoIssueNS {
905 _client: XrpcClient
906 comment: ShTangledRepoIssueCommentRecord
907 state: ShTangledRepoIssueStateRecord
908 state: ShTangledRepoIssueStateNS
909
910 constructor(client: XrpcClient) {
911 this._client = client
912 this.state = new ShTangledRepoIssueStateNS(client)
913 this.comment = new ShTangledRepoIssueCommentRecord(client)
914 this.state = new ShTangledRepoIssueStateRecord(client)
915 }
916}
917
918export class ShTangledRepoIssueStateNS {
919 _client: XrpcClient
920
921 constructor(client: XrpcClient) {
922 this._client = client
923 }
924}
925
926export class ShTangledRepoIssueCommentRecord {
927 _client: XrpcClient
928
929 constructor(client: XrpcClient) {
930 this._client = client
931 }
932
933 async list(
934 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
935 ): Promise<{
936 cursor?: string
937 records: { uri: string; value: ShTangledRepoIssueComment.Record }[]
938 }> {
939 const res = await this._client.call('com.atproto.repo.listRecords', {
940 collection: 'sh.tangled.repo.issue.comment',
941 ...params,
942 })
943 return res.data
944 }
945
946 async get(
947 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
948 ): Promise<{
949 uri: string
950 cid: string
951 value: ShTangledRepoIssueComment.Record
952 }> {
953 const res = await this._client.call('com.atproto.repo.getRecord', {
954 collection: 'sh.tangled.repo.issue.comment',
955 ...params,
956 })
957 return res.data
958 }
959
960 async create(
961 params: OmitKey<
962 ComAtprotoRepoCreateRecord.InputSchema,
963 'collection' | 'record'
964 >,
965 record: Un$Typed<ShTangledRepoIssueComment.Record>,
966 headers?: Record<string, string>,
967 ): Promise<{ uri: string; cid: string }> {
968 const collection = 'sh.tangled.repo.issue.comment'
969 const res = await this._client.call(
970 'com.atproto.repo.createRecord',
971 undefined,
972 { collection, ...params, record: { ...record, $type: collection } },
973 { encoding: 'application/json', headers },
974 )
975 return res.data
976 }
977
978 async put(
979 params: OmitKey<
980 ComAtprotoRepoPutRecord.InputSchema,
981 'collection' | 'record'
982 >,
983 record: Un$Typed<ShTangledRepoIssueComment.Record>,
984 headers?: Record<string, string>,
985 ): Promise<{ uri: string; cid: string }> {
986 const collection = 'sh.tangled.repo.issue.comment'
987 const res = await this._client.call(
988 'com.atproto.repo.putRecord',
989 undefined,
990 { collection, ...params, record: { ...record, $type: collection } },
991 { encoding: 'application/json', headers },
992 )
993 return res.data
994 }
995
996 async delete(
997 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
998 headers?: Record<string, string>,
999 ): Promise<void> {
1000 await this._client.call(
1001 'com.atproto.repo.deleteRecord',
1002 undefined,
1003 { collection: 'sh.tangled.repo.issue.comment', ...params },
1004 { headers },
1005 )
1006 }
1007}
1008
1009export class ShTangledRepoIssueStateRecord {
1010 _client: XrpcClient
1011
1012 constructor(client: XrpcClient) {
1013 this._client = client
1014 }
1015
1016 async list(
1017 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1018 ): Promise<{
1019 cursor?: string
1020 records: { uri: string; value: ShTangledRepoIssueState.Record }[]
1021 }> {
1022 const res = await this._client.call('com.atproto.repo.listRecords', {
1023 collection: 'sh.tangled.repo.issue.state',
1024 ...params,
1025 })
1026 return res.data
1027 }
1028
1029 async get(
1030 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1031 ): Promise<{
1032 uri: string
1033 cid: string
1034 value: ShTangledRepoIssueState.Record
1035 }> {
1036 const res = await this._client.call('com.atproto.repo.getRecord', {
1037 collection: 'sh.tangled.repo.issue.state',
1038 ...params,
1039 })
1040 return res.data
1041 }
1042
1043 async create(
1044 params: OmitKey<
1045 ComAtprotoRepoCreateRecord.InputSchema,
1046 'collection' | 'record'
1047 >,
1048 record: Un$Typed<ShTangledRepoIssueState.Record>,
1049 headers?: Record<string, string>,
1050 ): Promise<{ uri: string; cid: string }> {
1051 const collection = 'sh.tangled.repo.issue.state'
1052 const res = await this._client.call(
1053 'com.atproto.repo.createRecord',
1054 undefined,
1055 { collection, ...params, record: { ...record, $type: collection } },
1056 { encoding: 'application/json', headers },
1057 )
1058 return res.data
1059 }
1060
1061 async put(
1062 params: OmitKey<
1063 ComAtprotoRepoPutRecord.InputSchema,
1064 'collection' | 'record'
1065 >,
1066 record: Un$Typed<ShTangledRepoIssueState.Record>,
1067 headers?: Record<string, string>,
1068 ): Promise<{ uri: string; cid: string }> {
1069 const collection = 'sh.tangled.repo.issue.state'
1070 const res = await this._client.call(
1071 'com.atproto.repo.putRecord',
1072 undefined,
1073 { collection, ...params, record: { ...record, $type: collection } },
1074 { encoding: 'application/json', headers },
1075 )
1076 return res.data
1077 }
1078
1079 async delete(
1080 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1081 headers?: Record<string, string>,
1082 ): Promise<void> {
1083 await this._client.call(
1084 'com.atproto.repo.deleteRecord',
1085 undefined,
1086 { collection: 'sh.tangled.repo.issue.state', ...params },
1087 { headers },
1088 )
1089 }
1090}
1091
1092export class ShTangledRepoPullNS {
1093 _client: XrpcClient
1094 comment: ShTangledRepoPullCommentRecord
1095 status: ShTangledRepoPullStatusRecord
1096 status: ShTangledRepoPullStatusNS
1097
1098 constructor(client: XrpcClient) {
1099 this._client = client
1100 this.status = new ShTangledRepoPullStatusNS(client)
1101 this.comment = new ShTangledRepoPullCommentRecord(client)
1102 this.status = new ShTangledRepoPullStatusRecord(client)
1103 }
1104}
1105
1106export class ShTangledRepoPullStatusNS {
1107 _client: XrpcClient
1108
1109 constructor(client: XrpcClient) {
1110 this._client = client
1111 }
1112}
1113
1114export class ShTangledRepoPullCommentRecord {
1115 _client: XrpcClient
1116
1117 constructor(client: XrpcClient) {
1118 this._client = client
1119 }
1120
1121 async list(
1122 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1123 ): Promise<{
1124 cursor?: string
1125 records: { uri: string; value: ShTangledRepoPullComment.Record }[]
1126 }> {
1127 const res = await this._client.call('com.atproto.repo.listRecords', {
1128 collection: 'sh.tangled.repo.pull.comment',
1129 ...params,
1130 })
1131 return res.data
1132 }
1133
1134 async get(
1135 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1136 ): Promise<{
1137 uri: string
1138 cid: string
1139 value: ShTangledRepoPullComment.Record
1140 }> {
1141 const res = await this._client.call('com.atproto.repo.getRecord', {
1142 collection: 'sh.tangled.repo.pull.comment',
1143 ...params,
1144 })
1145 return res.data
1146 }
1147
1148 async create(
1149 params: OmitKey<
1150 ComAtprotoRepoCreateRecord.InputSchema,
1151 'collection' | 'record'
1152 >,
1153 record: Un$Typed<ShTangledRepoPullComment.Record>,
1154 headers?: Record<string, string>,
1155 ): Promise<{ uri: string; cid: string }> {
1156 const collection = 'sh.tangled.repo.pull.comment'
1157 const res = await this._client.call(
1158 'com.atproto.repo.createRecord',
1159 undefined,
1160 { collection, ...params, record: { ...record, $type: collection } },
1161 { encoding: 'application/json', headers },
1162 )
1163 return res.data
1164 }
1165
1166 async put(
1167 params: OmitKey<
1168 ComAtprotoRepoPutRecord.InputSchema,
1169 'collection' | 'record'
1170 >,
1171 record: Un$Typed<ShTangledRepoPullComment.Record>,
1172 headers?: Record<string, string>,
1173 ): Promise<{ uri: string; cid: string }> {
1174 const collection = 'sh.tangled.repo.pull.comment'
1175 const res = await this._client.call(
1176 'com.atproto.repo.putRecord',
1177 undefined,
1178 { collection, ...params, record: { ...record, $type: collection } },
1179 { encoding: 'application/json', headers },
1180 )
1181 return res.data
1182 }
1183
1184 async delete(
1185 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1186 headers?: Record<string, string>,
1187 ): Promise<void> {
1188 await this._client.call(
1189 'com.atproto.repo.deleteRecord',
1190 undefined,
1191 { collection: 'sh.tangled.repo.pull.comment', ...params },
1192 { headers },
1193 )
1194 }
1195}
1196
1197export class ShTangledRepoPullStatusRecord {
1198 _client: XrpcClient
1199
1200 constructor(client: XrpcClient) {
1201 this._client = client
1202 }
1203
1204 async list(
1205 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1206 ): Promise<{
1207 cursor?: string
1208 records: { uri: string; value: ShTangledRepoPullStatus.Record }[]
1209 }> {
1210 const res = await this._client.call('com.atproto.repo.listRecords', {
1211 collection: 'sh.tangled.repo.pull.status',
1212 ...params,
1213 })
1214 return res.data
1215 }
1216
1217 async get(
1218 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1219 ): Promise<{
1220 uri: string
1221 cid: string
1222 value: ShTangledRepoPullStatus.Record
1223 }> {
1224 const res = await this._client.call('com.atproto.repo.getRecord', {
1225 collection: 'sh.tangled.repo.pull.status',
1226 ...params,
1227 })
1228 return res.data
1229 }
1230
1231 async create(
1232 params: OmitKey<
1233 ComAtprotoRepoCreateRecord.InputSchema,
1234 'collection' | 'record'
1235 >,
1236 record: Un$Typed<ShTangledRepoPullStatus.Record>,
1237 headers?: Record<string, string>,
1238 ): Promise<{ uri: string; cid: string }> {
1239 const collection = 'sh.tangled.repo.pull.status'
1240 const res = await this._client.call(
1241 'com.atproto.repo.createRecord',
1242 undefined,
1243 { collection, ...params, record: { ...record, $type: collection } },
1244 { encoding: 'application/json', headers },
1245 )
1246 return res.data
1247 }
1248
1249 async put(
1250 params: OmitKey<
1251 ComAtprotoRepoPutRecord.InputSchema,
1252 'collection' | 'record'
1253 >,
1254 record: Un$Typed<ShTangledRepoPullStatus.Record>,
1255 headers?: Record<string, string>,
1256 ): Promise<{ uri: string; cid: string }> {
1257 const collection = 'sh.tangled.repo.pull.status'
1258 const res = await this._client.call(
1259 'com.atproto.repo.putRecord',
1260 undefined,
1261 { collection, ...params, record: { ...record, $type: collection } },
1262 { encoding: 'application/json', headers },
1263 )
1264 return res.data
1265 }
1266
1267 async delete(
1268 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1269 headers?: Record<string, string>,
1270 ): Promise<void> {
1271 await this._client.call(
1272 'com.atproto.repo.deleteRecord',
1273 undefined,
1274 { collection: 'sh.tangled.repo.pull.status', ...params },
1275 { headers },
1276 )
1277 }
1278}
1279
1280export class ShTangledRepoIssueRecord {
1281 _client: XrpcClient
1282
1283 constructor(client: XrpcClient) {
1284 this._client = client
1285 }
1286
1287 async list(
1288 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1289 ): Promise<{
1290 cursor?: string
1291 records: { uri: string; value: ShTangledRepoIssue.Record }[]
1292 }> {
1293 const res = await this._client.call('com.atproto.repo.listRecords', {
1294 collection: 'sh.tangled.repo.issue',
1295 ...params,
1296 })
1297 return res.data
1298 }
1299
1300 async get(
1301 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1302 ): Promise<{ uri: string; cid: string; value: ShTangledRepoIssue.Record }> {
1303 const res = await this._client.call('com.atproto.repo.getRecord', {
1304 collection: 'sh.tangled.repo.issue',
1305 ...params,
1306 })
1307 return res.data
1308 }
1309
1310 async create(
1311 params: OmitKey<
1312 ComAtprotoRepoCreateRecord.InputSchema,
1313 'collection' | 'record'
1314 >,
1315 record: Un$Typed<ShTangledRepoIssue.Record>,
1316 headers?: Record<string, string>,
1317 ): Promise<{ uri: string; cid: string }> {
1318 const collection = 'sh.tangled.repo.issue'
1319 const res = await this._client.call(
1320 'com.atproto.repo.createRecord',
1321 undefined,
1322 { collection, ...params, record: { ...record, $type: collection } },
1323 { encoding: 'application/json', headers },
1324 )
1325 return res.data
1326 }
1327
1328 async put(
1329 params: OmitKey<
1330 ComAtprotoRepoPutRecord.InputSchema,
1331 'collection' | 'record'
1332 >,
1333 record: Un$Typed<ShTangledRepoIssue.Record>,
1334 headers?: Record<string, string>,
1335 ): Promise<{ uri: string; cid: string }> {
1336 const collection = 'sh.tangled.repo.issue'
1337 const res = await this._client.call(
1338 'com.atproto.repo.putRecord',
1339 undefined,
1340 { collection, ...params, record: { ...record, $type: collection } },
1341 { encoding: 'application/json', headers },
1342 )
1343 return res.data
1344 }
1345
1346 async delete(
1347 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1348 headers?: Record<string, string>,
1349 ): Promise<void> {
1350 await this._client.call(
1351 'com.atproto.repo.deleteRecord',
1352 undefined,
1353 { collection: 'sh.tangled.repo.issue', ...params },
1354 { headers },
1355 )
1356 }
1357}
1358
1359export class ShTangledRepoPullRecord {
1360 _client: XrpcClient
1361
1362 constructor(client: XrpcClient) {
1363 this._client = client
1364 }
1365
1366 async list(
1367 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1368 ): Promise<{
1369 cursor?: string
1370 records: { uri: string; value: ShTangledRepoPull.Record }[]
1371 }> {
1372 const res = await this._client.call('com.atproto.repo.listRecords', {
1373 collection: 'sh.tangled.repo.pull',
1374 ...params,
1375 })
1376 return res.data
1377 }
1378
1379 async get(
1380 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1381 ): Promise<{ uri: string; cid: string; value: ShTangledRepoPull.Record }> {
1382 const res = await this._client.call('com.atproto.repo.getRecord', {
1383 collection: 'sh.tangled.repo.pull',
1384 ...params,
1385 })
1386 return res.data
1387 }
1388
1389 async create(
1390 params: OmitKey<
1391 ComAtprotoRepoCreateRecord.InputSchema,
1392 'collection' | 'record'
1393 >,
1394 record: Un$Typed<ShTangledRepoPull.Record>,
1395 headers?: Record<string, string>,
1396 ): Promise<{ uri: string; cid: string }> {
1397 const collection = 'sh.tangled.repo.pull'
1398 const res = await this._client.call(
1399 'com.atproto.repo.createRecord',
1400 undefined,
1401 { collection, ...params, record: { ...record, $type: collection } },
1402 { encoding: 'application/json', headers },
1403 )
1404 return res.data
1405 }
1406
1407 async put(
1408 params: OmitKey<
1409 ComAtprotoRepoPutRecord.InputSchema,
1410 'collection' | 'record'
1411 >,
1412 record: Un$Typed<ShTangledRepoPull.Record>,
1413 headers?: Record<string, string>,
1414 ): Promise<{ uri: string; cid: string }> {
1415 const collection = 'sh.tangled.repo.pull'
1416 const res = await this._client.call(
1417 'com.atproto.repo.putRecord',
1418 undefined,
1419 { collection, ...params, record: { ...record, $type: collection } },
1420 { encoding: 'application/json', headers },
1421 )
1422 return res.data
1423 }
1424
1425 async delete(
1426 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1427 headers?: Record<string, string>,
1428 ): Promise<void> {
1429 await this._client.call(
1430 'com.atproto.repo.deleteRecord',
1431 undefined,
1432 { collection: 'sh.tangled.repo.pull', ...params },
1433 { headers },
1434 )
1435 }
1436}
1437
1438export class ShTangledRepoArtifactRecord {
1439 _client: XrpcClient
1440
1441 constructor(client: XrpcClient) {
1442 this._client = client
1443 }
1444
1445 async list(
1446 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1447 ): Promise<{
1448 cursor?: string
1449 records: { uri: string; value: ShTangledRepoArtifact.Record }[]
1450 }> {
1451 const res = await this._client.call('com.atproto.repo.listRecords', {
1452 collection: 'sh.tangled.repo.artifact',
1453 ...params,
1454 })
1455 return res.data
1456 }
1457
1458 async get(
1459 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1460 ): Promise<{
1461 uri: string
1462 cid: string
1463 value: ShTangledRepoArtifact.Record
1464 }> {
1465 const res = await this._client.call('com.atproto.repo.getRecord', {
1466 collection: 'sh.tangled.repo.artifact',
1467 ...params,
1468 })
1469 return res.data
1470 }
1471
1472 async create(
1473 params: OmitKey<
1474 ComAtprotoRepoCreateRecord.InputSchema,
1475 'collection' | 'record'
1476 >,
1477 record: Un$Typed<ShTangledRepoArtifact.Record>,
1478 headers?: Record<string, string>,
1479 ): Promise<{ uri: string; cid: string }> {
1480 const collection = 'sh.tangled.repo.artifact'
1481 const res = await this._client.call(
1482 'com.atproto.repo.createRecord',
1483 undefined,
1484 { collection, ...params, record: { ...record, $type: collection } },
1485 { encoding: 'application/json', headers },
1486 )
1487 return res.data
1488 }
1489
1490 async put(
1491 params: OmitKey<
1492 ComAtprotoRepoPutRecord.InputSchema,
1493 'collection' | 'record'
1494 >,
1495 record: Un$Typed<ShTangledRepoArtifact.Record>,
1496 headers?: Record<string, string>,
1497 ): Promise<{ uri: string; cid: string }> {
1498 const collection = 'sh.tangled.repo.artifact'
1499 const res = await this._client.call(
1500 'com.atproto.repo.putRecord',
1501 undefined,
1502 { collection, ...params, record: { ...record, $type: collection } },
1503 { encoding: 'application/json', headers },
1504 )
1505 return res.data
1506 }
1507
1508 async delete(
1509 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1510 headers?: Record<string, string>,
1511 ): Promise<void> {
1512 await this._client.call(
1513 'com.atproto.repo.deleteRecord',
1514 undefined,
1515 { collection: 'sh.tangled.repo.artifact', ...params },
1516 { headers },
1517 )
1518 }
1519}
1520
1521export class ShTangledRepoCollaboratorRecord {
1522 _client: XrpcClient
1523
1524 constructor(client: XrpcClient) {
1525 this._client = client
1526 }
1527
1528 async list(
1529 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1530 ): Promise<{
1531 cursor?: string
1532 records: { uri: string; value: ShTangledRepoCollaborator.Record }[]
1533 }> {
1534 const res = await this._client.call('com.atproto.repo.listRecords', {
1535 collection: 'sh.tangled.repo.collaborator',
1536 ...params,
1537 })
1538 return res.data
1539 }
1540
1541 async get(
1542 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1543 ): Promise<{
1544 uri: string
1545 cid: string
1546 value: ShTangledRepoCollaborator.Record
1547 }> {
1548 const res = await this._client.call('com.atproto.repo.getRecord', {
1549 collection: 'sh.tangled.repo.collaborator',
1550 ...params,
1551 })
1552 return res.data
1553 }
1554
1555 async create(
1556 params: OmitKey<
1557 ComAtprotoRepoCreateRecord.InputSchema,
1558 'collection' | 'record'
1559 >,
1560 record: Un$Typed<ShTangledRepoCollaborator.Record>,
1561 headers?: Record<string, string>,
1562 ): Promise<{ uri: string; cid: string }> {
1563 const collection = 'sh.tangled.repo.collaborator'
1564 const res = await this._client.call(
1565 'com.atproto.repo.createRecord',
1566 undefined,
1567 { collection, ...params, record: { ...record, $type: collection } },
1568 { encoding: 'application/json', headers },
1569 )
1570 return res.data
1571 }
1572
1573 async put(
1574 params: OmitKey<
1575 ComAtprotoRepoPutRecord.InputSchema,
1576 'collection' | 'record'
1577 >,
1578 record: Un$Typed<ShTangledRepoCollaborator.Record>,
1579 headers?: Record<string, string>,
1580 ): Promise<{ uri: string; cid: string }> {
1581 const collection = 'sh.tangled.repo.collaborator'
1582 const res = await this._client.call(
1583 'com.atproto.repo.putRecord',
1584 undefined,
1585 { collection, ...params, record: { ...record, $type: collection } },
1586 { encoding: 'application/json', headers },
1587 )
1588 return res.data
1589 }
1590
1591 async delete(
1592 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1593 headers?: Record<string, string>,
1594 ): Promise<void> {
1595 await this._client.call(
1596 'com.atproto.repo.deleteRecord',
1597 undefined,
1598 { collection: 'sh.tangled.repo.collaborator', ...params },
1599 { headers },
1600 )
1601 }
1602}
1603
1604export class ShTangledKnotNS {
1605 _client: XrpcClient
1606 member: ShTangledKnotMemberRecord
1607
1608 constructor(client: XrpcClient) {
1609 this._client = client
1610 this.member = new ShTangledKnotMemberRecord(client)
1611 }
1612
1613 listKeys(
1614 params?: ShTangledKnotListKeys.QueryParams,
1615 opts?: ShTangledKnotListKeys.CallOptions,
1616 ): Promise<ShTangledKnotListKeys.Response> {
1617 return this._client
1618 .call('sh.tangled.knot.listKeys', params, undefined, opts)
1619 .catch((e) => {
1620 throw ShTangledKnotListKeys.toKnownErr(e)
1621 })
1622 }
1623
1624 version(
1625 params?: ShTangledKnotVersion.QueryParams,
1626 opts?: ShTangledKnotVersion.CallOptions,
1627 ): Promise<ShTangledKnotVersion.Response> {
1628 return this._client.call('sh.tangled.knot.version', params, undefined, opts)
1629 }
1630}
1631
1632export class ShTangledKnotMemberRecord {
1633 _client: XrpcClient
1634
1635 constructor(client: XrpcClient) {
1636 this._client = client
1637 }
1638
1639 async list(
1640 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1641 ): Promise<{
1642 cursor?: string
1643 records: { uri: string; value: ShTangledKnotMember.Record }[]
1644 }> {
1645 const res = await this._client.call('com.atproto.repo.listRecords', {
1646 collection: 'sh.tangled.knot.member',
1647 ...params,
1648 })
1649 return res.data
1650 }
1651
1652 async get(
1653 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1654 ): Promise<{ uri: string; cid: string; value: ShTangledKnotMember.Record }> {
1655 const res = await this._client.call('com.atproto.repo.getRecord', {
1656 collection: 'sh.tangled.knot.member',
1657 ...params,
1658 })
1659 return res.data
1660 }
1661
1662 async create(
1663 params: OmitKey<
1664 ComAtprotoRepoCreateRecord.InputSchema,
1665 'collection' | 'record'
1666 >,
1667 record: Un$Typed<ShTangledKnotMember.Record>,
1668 headers?: Record<string, string>,
1669 ): Promise<{ uri: string; cid: string }> {
1670 const collection = 'sh.tangled.knot.member'
1671 const res = await this._client.call(
1672 'com.atproto.repo.createRecord',
1673 undefined,
1674 { collection, ...params, record: { ...record, $type: collection } },
1675 { encoding: 'application/json', headers },
1676 )
1677 return res.data
1678 }
1679
1680 async put(
1681 params: OmitKey<
1682 ComAtprotoRepoPutRecord.InputSchema,
1683 'collection' | 'record'
1684 >,
1685 record: Un$Typed<ShTangledKnotMember.Record>,
1686 headers?: Record<string, string>,
1687 ): Promise<{ uri: string; cid: string }> {
1688 const collection = 'sh.tangled.knot.member'
1689 const res = await this._client.call(
1690 'com.atproto.repo.putRecord',
1691 undefined,
1692 { collection, ...params, record: { ...record, $type: collection } },
1693 { encoding: 'application/json', headers },
1694 )
1695 return res.data
1696 }
1697
1698 async delete(
1699 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1700 headers?: Record<string, string>,
1701 ): Promise<void> {
1702 await this._client.call(
1703 'com.atproto.repo.deleteRecord',
1704 undefined,
1705 { collection: 'sh.tangled.knot.member', ...params },
1706 { headers },
1707 )
1708 }
1709}
1710
1711export class ShTangledLabelNS {
1712 _client: XrpcClient
1713 definition: ShTangledLabelDefinitionRecord
1714 op: ShTangledLabelOpRecord
1715
1716 constructor(client: XrpcClient) {
1717 this._client = client
1718 this.definition = new ShTangledLabelDefinitionRecord(client)
1719 this.op = new ShTangledLabelOpRecord(client)
1720 }
1721}
1722
1723export class ShTangledLabelDefinitionRecord {
1724 _client: XrpcClient
1725
1726 constructor(client: XrpcClient) {
1727 this._client = client
1728 }
1729
1730 async list(
1731 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1732 ): Promise<{
1733 cursor?: string
1734 records: { uri: string; value: ShTangledLabelDefinition.Record }[]
1735 }> {
1736 const res = await this._client.call('com.atproto.repo.listRecords', {
1737 collection: 'sh.tangled.label.definition',
1738 ...params,
1739 })
1740 return res.data
1741 }
1742
1743 async get(
1744 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1745 ): Promise<{
1746 uri: string
1747 cid: string
1748 value: ShTangledLabelDefinition.Record
1749 }> {
1750 const res = await this._client.call('com.atproto.repo.getRecord', {
1751 collection: 'sh.tangled.label.definition',
1752 ...params,
1753 })
1754 return res.data
1755 }
1756
1757 async create(
1758 params: OmitKey<
1759 ComAtprotoRepoCreateRecord.InputSchema,
1760 'collection' | 'record'
1761 >,
1762 record: Un$Typed<ShTangledLabelDefinition.Record>,
1763 headers?: Record<string, string>,
1764 ): Promise<{ uri: string; cid: string }> {
1765 const collection = 'sh.tangled.label.definition'
1766 const res = await this._client.call(
1767 'com.atproto.repo.createRecord',
1768 undefined,
1769 { collection, ...params, record: { ...record, $type: collection } },
1770 { encoding: 'application/json', headers },
1771 )
1772 return res.data
1773 }
1774
1775 async put(
1776 params: OmitKey<
1777 ComAtprotoRepoPutRecord.InputSchema,
1778 'collection' | 'record'
1779 >,
1780 record: Un$Typed<ShTangledLabelDefinition.Record>,
1781 headers?: Record<string, string>,
1782 ): Promise<{ uri: string; cid: string }> {
1783 const collection = 'sh.tangled.label.definition'
1784 const res = await this._client.call(
1785 'com.atproto.repo.putRecord',
1786 undefined,
1787 { collection, ...params, record: { ...record, $type: collection } },
1788 { encoding: 'application/json', headers },
1789 )
1790 return res.data
1791 }
1792
1793 async delete(
1794 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1795 headers?: Record<string, string>,
1796 ): Promise<void> {
1797 await this._client.call(
1798 'com.atproto.repo.deleteRecord',
1799 undefined,
1800 { collection: 'sh.tangled.label.definition', ...params },
1801 { headers },
1802 )
1803 }
1804}
1805
1806export class ShTangledLabelOpRecord {
1807 _client: XrpcClient
1808
1809 constructor(client: XrpcClient) {
1810 this._client = client
1811 }
1812
1813 async list(
1814 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1815 ): Promise<{
1816 cursor?: string
1817 records: { uri: string; value: ShTangledLabelOp.Record }[]
1818 }> {
1819 const res = await this._client.call('com.atproto.repo.listRecords', {
1820 collection: 'sh.tangled.label.op',
1821 ...params,
1822 })
1823 return res.data
1824 }
1825
1826 async get(
1827 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1828 ): Promise<{ uri: string; cid: string; value: ShTangledLabelOp.Record }> {
1829 const res = await this._client.call('com.atproto.repo.getRecord', {
1830 collection: 'sh.tangled.label.op',
1831 ...params,
1832 })
1833 return res.data
1834 }
1835
1836 async create(
1837 params: OmitKey<
1838 ComAtprotoRepoCreateRecord.InputSchema,
1839 'collection' | 'record'
1840 >,
1841 record: Un$Typed<ShTangledLabelOp.Record>,
1842 headers?: Record<string, string>,
1843 ): Promise<{ uri: string; cid: string }> {
1844 const collection = 'sh.tangled.label.op'
1845 const res = await this._client.call(
1846 'com.atproto.repo.createRecord',
1847 undefined,
1848 { collection, ...params, record: { ...record, $type: collection } },
1849 { encoding: 'application/json', headers },
1850 )
1851 return res.data
1852 }
1853
1854 async put(
1855 params: OmitKey<
1856 ComAtprotoRepoPutRecord.InputSchema,
1857 'collection' | 'record'
1858 >,
1859 record: Un$Typed<ShTangledLabelOp.Record>,
1860 headers?: Record<string, string>,
1861 ): Promise<{ uri: string; cid: string }> {
1862 const collection = 'sh.tangled.label.op'
1863 const res = await this._client.call(
1864 'com.atproto.repo.putRecord',
1865 undefined,
1866 { collection, ...params, record: { ...record, $type: collection } },
1867 { encoding: 'application/json', headers },
1868 )
1869 return res.data
1870 }
1871
1872 async delete(
1873 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1874 headers?: Record<string, string>,
1875 ): Promise<void> {
1876 await this._client.call(
1877 'com.atproto.repo.deleteRecord',
1878 undefined,
1879 { collection: 'sh.tangled.label.op', ...params },
1880 { headers },
1881 )
1882 }
1883}
1884
1885export class ShTangledPipelineNS {
1886 _client: XrpcClient
1887 status: ShTangledPipelineStatusRecord
1888
1889 constructor(client: XrpcClient) {
1890 this._client = client
1891 this.status = new ShTangledPipelineStatusRecord(client)
1892 }
1893
1894 cancelPipeline(
1895 data?: ShTangledPipelineCancelPipeline.InputSchema,
1896 opts?: ShTangledPipelineCancelPipeline.CallOptions,
1897 ): Promise<ShTangledPipelineCancelPipeline.Response> {
1898 return this._client.call(
1899 'sh.tangled.pipeline.cancelPipeline',
1900 opts?.qp,
1901 data,
1902 opts,
1903 )
1904 }
1905}
1906
1907export class ShTangledPipelineStatusRecord {
1908 _client: XrpcClient
1909
1910 constructor(client: XrpcClient) {
1911 this._client = client
1912 }
1913
1914 async list(
1915 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1916 ): Promise<{
1917 cursor?: string
1918 records: { uri: string; value: ShTangledPipelineStatus.Record }[]
1919 }> {
1920 const res = await this._client.call('com.atproto.repo.listRecords', {
1921 collection: 'sh.tangled.pipeline.status',
1922 ...params,
1923 })
1924 return res.data
1925 }
1926
1927 async get(
1928 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1929 ): Promise<{
1930 uri: string
1931 cid: string
1932 value: ShTangledPipelineStatus.Record
1933 }> {
1934 const res = await this._client.call('com.atproto.repo.getRecord', {
1935 collection: 'sh.tangled.pipeline.status',
1936 ...params,
1937 })
1938 return res.data
1939 }
1940
1941 async create(
1942 params: OmitKey<
1943 ComAtprotoRepoCreateRecord.InputSchema,
1944 'collection' | 'record'
1945 >,
1946 record: Un$Typed<ShTangledPipelineStatus.Record>,
1947 headers?: Record<string, string>,
1948 ): Promise<{ uri: string; cid: string }> {
1949 const collection = 'sh.tangled.pipeline.status'
1950 const res = await this._client.call(
1951 'com.atproto.repo.createRecord',
1952 undefined,
1953 { collection, ...params, record: { ...record, $type: collection } },
1954 { encoding: 'application/json', headers },
1955 )
1956 return res.data
1957 }
1958
1959 async put(
1960 params: OmitKey<
1961 ComAtprotoRepoPutRecord.InputSchema,
1962 'collection' | 'record'
1963 >,
1964 record: Un$Typed<ShTangledPipelineStatus.Record>,
1965 headers?: Record<string, string>,
1966 ): Promise<{ uri: string; cid: string }> {
1967 const collection = 'sh.tangled.pipeline.status'
1968 const res = await this._client.call(
1969 'com.atproto.repo.putRecord',
1970 undefined,
1971 { collection, ...params, record: { ...record, $type: collection } },
1972 { encoding: 'application/json', headers },
1973 )
1974 return res.data
1975 }
1976
1977 async delete(
1978 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1979 headers?: Record<string, string>,
1980 ): Promise<void> {
1981 await this._client.call(
1982 'com.atproto.repo.deleteRecord',
1983 undefined,
1984 { collection: 'sh.tangled.pipeline.status', ...params },
1985 { headers },
1986 )
1987 }
1988}
1989
1990export class ShTangledSpindleNS {
1991 _client: XrpcClient
1992 member: ShTangledSpindleMemberRecord
1993
1994 constructor(client: XrpcClient) {
1995 this._client = client
1996 this.member = new ShTangledSpindleMemberRecord(client)
1997 }
1998}
1999
2000export class ShTangledSpindleMemberRecord {
2001 _client: XrpcClient
2002
2003 constructor(client: XrpcClient) {
2004 this._client = client
2005 }
2006
2007 async list(
2008 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
2009 ): Promise<{
2010 cursor?: string
2011 records: { uri: string; value: ShTangledSpindleMember.Record }[]
2012 }> {
2013 const res = await this._client.call('com.atproto.repo.listRecords', {
2014 collection: 'sh.tangled.spindle.member',
2015 ...params,
2016 })
2017 return res.data
2018 }
2019
2020 async get(
2021 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
2022 ): Promise<{
2023 uri: string
2024 cid: string
2025 value: ShTangledSpindleMember.Record
2026 }> {
2027 const res = await this._client.call('com.atproto.repo.getRecord', {
2028 collection: 'sh.tangled.spindle.member',
2029 ...params,
2030 })
2031 return res.data
2032 }
2033
2034 async create(
2035 params: OmitKey<
2036 ComAtprotoRepoCreateRecord.InputSchema,
2037 'collection' | 'record'
2038 >,
2039 record: Un$Typed<ShTangledSpindleMember.Record>,
2040 headers?: Record<string, string>,
2041 ): Promise<{ uri: string; cid: string }> {
2042 const collection = 'sh.tangled.spindle.member'
2043 const res = await this._client.call(
2044 'com.atproto.repo.createRecord',
2045 undefined,
2046 { collection, ...params, record: { ...record, $type: collection } },
2047 { encoding: 'application/json', headers },
2048 )
2049 return res.data
2050 }
2051
2052 async put(
2053 params: OmitKey<
2054 ComAtprotoRepoPutRecord.InputSchema,
2055 'collection' | 'record'
2056 >,
2057 record: Un$Typed<ShTangledSpindleMember.Record>,
2058 headers?: Record<string, string>,
2059 ): Promise<{ uri: string; cid: string }> {
2060 const collection = 'sh.tangled.spindle.member'
2061 const res = await this._client.call(
2062 'com.atproto.repo.putRecord',
2063 undefined,
2064 { collection, ...params, record: { ...record, $type: collection } },
2065 { encoding: 'application/json', headers },
2066 )
2067 return res.data
2068 }
2069
2070 async delete(
2071 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
2072 headers?: Record<string, string>,
2073 ): Promise<void> {
2074 await this._client.call(
2075 'com.atproto.repo.deleteRecord',
2076 undefined,
2077 { collection: 'sh.tangled.spindle.member', ...params },
2078 { headers },
2079 )
2080 }
2081}
2082
2083export class ShTangledKnotRecord {
2084 _client: XrpcClient
2085
2086 constructor(client: XrpcClient) {
2087 this._client = client
2088 }
2089
2090 async list(
2091 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
2092 ): Promise<{
2093 cursor?: string
2094 records: { uri: string; value: ShTangledKnot.Record }[]
2095 }> {
2096 const res = await this._client.call('com.atproto.repo.listRecords', {
2097 collection: 'sh.tangled.knot',
2098 ...params,
2099 })
2100 return res.data
2101 }
2102
2103 async get(
2104 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
2105 ): Promise<{ uri: string; cid: string; value: ShTangledKnot.Record }> {
2106 const res = await this._client.call('com.atproto.repo.getRecord', {
2107 collection: 'sh.tangled.knot',
2108 ...params,
2109 })
2110 return res.data
2111 }
2112
2113 async create(
2114 params: OmitKey<
2115 ComAtprotoRepoCreateRecord.InputSchema,
2116 'collection' | 'record'
2117 >,
2118 record: Un$Typed<ShTangledKnot.Record>,
2119 headers?: Record<string, string>,
2120 ): Promise<{ uri: string; cid: string }> {
2121 const collection = 'sh.tangled.knot'
2122 const res = await this._client.call(
2123 'com.atproto.repo.createRecord',
2124 undefined,
2125 { collection, ...params, record: { ...record, $type: collection } },
2126 { encoding: 'application/json', headers },
2127 )
2128 return res.data
2129 }
2130
2131 async put(
2132 params: OmitKey<
2133 ComAtprotoRepoPutRecord.InputSchema,
2134 'collection' | 'record'
2135 >,
2136 record: Un$Typed<ShTangledKnot.Record>,
2137 headers?: Record<string, string>,
2138 ): Promise<{ uri: string; cid: string }> {
2139 const collection = 'sh.tangled.knot'
2140 const res = await this._client.call(
2141 'com.atproto.repo.putRecord',
2142 undefined,
2143 { collection, ...params, record: { ...record, $type: collection } },
2144 { encoding: 'application/json', headers },
2145 )
2146 return res.data
2147 }
2148
2149 async delete(
2150 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
2151 headers?: Record<string, string>,
2152 ): Promise<void> {
2153 await this._client.call(
2154 'com.atproto.repo.deleteRecord',
2155 undefined,
2156 { collection: 'sh.tangled.knot', ...params },
2157 { headers },
2158 )
2159 }
2160}
2161
2162export class ShTangledPipelineRecord {
2163 _client: XrpcClient
2164
2165 constructor(client: XrpcClient) {
2166 this._client = client
2167 }
2168
2169 async list(
2170 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
2171 ): Promise<{
2172 cursor?: string
2173 records: { uri: string; value: ShTangledPipeline.Record }[]
2174 }> {
2175 const res = await this._client.call('com.atproto.repo.listRecords', {
2176 collection: 'sh.tangled.pipeline',
2177 ...params,
2178 })
2179 return res.data
2180 }
2181
2182 async get(
2183 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
2184 ): Promise<{ uri: string; cid: string; value: ShTangledPipeline.Record }> {
2185 const res = await this._client.call('com.atproto.repo.getRecord', {
2186 collection: 'sh.tangled.pipeline',
2187 ...params,
2188 })
2189 return res.data
2190 }
2191
2192 async create(
2193 params: OmitKey<
2194 ComAtprotoRepoCreateRecord.InputSchema,
2195 'collection' | 'record'
2196 >,
2197 record: Un$Typed<ShTangledPipeline.Record>,
2198 headers?: Record<string, string>,
2199 ): Promise<{ uri: string; cid: string }> {
2200 const collection = 'sh.tangled.pipeline'
2201 const res = await this._client.call(
2202 'com.atproto.repo.createRecord',
2203 undefined,
2204 { collection, ...params, record: { ...record, $type: collection } },
2205 { encoding: 'application/json', headers },
2206 )
2207 return res.data
2208 }
2209
2210 async put(
2211 params: OmitKey<
2212 ComAtprotoRepoPutRecord.InputSchema,
2213 'collection' | 'record'
2214 >,
2215 record: Un$Typed<ShTangledPipeline.Record>,
2216 headers?: Record<string, string>,
2217 ): Promise<{ uri: string; cid: string }> {
2218 const collection = 'sh.tangled.pipeline'
2219 const res = await this._client.call(
2220 'com.atproto.repo.putRecord',
2221 undefined,
2222 { collection, ...params, record: { ...record, $type: collection } },
2223 { encoding: 'application/json', headers },
2224 )
2225 return res.data
2226 }
2227
2228 async delete(
2229 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
2230 headers?: Record<string, string>,
2231 ): Promise<void> {
2232 await this._client.call(
2233 'com.atproto.repo.deleteRecord',
2234 undefined,
2235 { collection: 'sh.tangled.pipeline', ...params },
2236 { headers },
2237 )
2238 }
2239}
2240
2241export class ShTangledRepoRecord {
2242 _client: XrpcClient
2243
2244 constructor(client: XrpcClient) {
2245 this._client = client
2246 }
2247
2248 async list(
2249 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
2250 ): Promise<{
2251 cursor?: string
2252 records: { uri: string; value: ShTangledRepo.Record }[]
2253 }> {
2254 const res = await this._client.call('com.atproto.repo.listRecords', {
2255 collection: 'sh.tangled.repo',
2256 ...params,
2257 })
2258 return res.data
2259 }
2260
2261 async get(
2262 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
2263 ): Promise<{ uri: string; cid: string; value: ShTangledRepo.Record }> {
2264 const res = await this._client.call('com.atproto.repo.getRecord', {
2265 collection: 'sh.tangled.repo',
2266 ...params,
2267 })
2268 return res.data
2269 }
2270
2271 async create(
2272 params: OmitKey<
2273 ComAtprotoRepoCreateRecord.InputSchema,
2274 'collection' | 'record'
2275 >,
2276 record: Un$Typed<ShTangledRepo.Record>,
2277 headers?: Record<string, string>,
2278 ): Promise<{ uri: string; cid: string }> {
2279 const collection = 'sh.tangled.repo'
2280 const res = await this._client.call(
2281 'com.atproto.repo.createRecord',
2282 undefined,
2283 { collection, ...params, record: { ...record, $type: collection } },
2284 { encoding: 'application/json', headers },
2285 )
2286 return res.data
2287 }
2288
2289 async put(
2290 params: OmitKey<
2291 ComAtprotoRepoPutRecord.InputSchema,
2292 'collection' | 'record'
2293 >,
2294 record: Un$Typed<ShTangledRepo.Record>,
2295 headers?: Record<string, string>,
2296 ): Promise<{ uri: string; cid: string }> {
2297 const collection = 'sh.tangled.repo'
2298 const res = await this._client.call(
2299 'com.atproto.repo.putRecord',
2300 undefined,
2301 { collection, ...params, record: { ...record, $type: collection } },
2302 { encoding: 'application/json', headers },
2303 )
2304 return res.data
2305 }
2306
2307 async delete(
2308 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
2309 headers?: Record<string, string>,
2310 ): Promise<void> {
2311 await this._client.call(
2312 'com.atproto.repo.deleteRecord',
2313 undefined,
2314 { collection: 'sh.tangled.repo', ...params },
2315 { headers },
2316 )
2317 }
2318}
2319
2320export class ShTangledSpindleRecord {
2321 _client: XrpcClient
2322
2323 constructor(client: XrpcClient) {
2324 this._client = client
2325 }
2326
2327 async list(
2328 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
2329 ): Promise<{
2330 cursor?: string
2331 records: { uri: string; value: ShTangledSpindle.Record }[]
2332 }> {
2333 const res = await this._client.call('com.atproto.repo.listRecords', {
2334 collection: 'sh.tangled.spindle',
2335 ...params,
2336 })
2337 return res.data
2338 }
2339
2340 async get(
2341 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
2342 ): Promise<{ uri: string; cid: string; value: ShTangledSpindle.Record }> {
2343 const res = await this._client.call('com.atproto.repo.getRecord', {
2344 collection: 'sh.tangled.spindle',
2345 ...params,
2346 })
2347 return res.data
2348 }
2349
2350 async create(
2351 params: OmitKey<
2352 ComAtprotoRepoCreateRecord.InputSchema,
2353 'collection' | 'record'
2354 >,
2355 record: Un$Typed<ShTangledSpindle.Record>,
2356 headers?: Record<string, string>,
2357 ): Promise<{ uri: string; cid: string }> {
2358 const collection = 'sh.tangled.spindle'
2359 const res = await this._client.call(
2360 'com.atproto.repo.createRecord',
2361 undefined,
2362 { collection, ...params, record: { ...record, $type: collection } },
2363 { encoding: 'application/json', headers },
2364 )
2365 return res.data
2366 }
2367
2368 async put(
2369 params: OmitKey<
2370 ComAtprotoRepoPutRecord.InputSchema,
2371 'collection' | 'record'
2372 >,
2373 record: Un$Typed<ShTangledSpindle.Record>,
2374 headers?: Record<string, string>,
2375 ): Promise<{ uri: string; cid: string }> {
2376 const collection = 'sh.tangled.spindle'
2377 const res = await this._client.call(
2378 'com.atproto.repo.putRecord',
2379 undefined,
2380 { collection, ...params, record: { ...record, $type: collection } },
2381 { encoding: 'application/json', headers },
2382 )
2383 return res.data
2384 }
2385
2386 async delete(
2387 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
2388 headers?: Record<string, string>,
2389 ): Promise<void> {
2390 await this._client.call(
2391 'com.atproto.repo.deleteRecord',
2392 undefined,
2393 { collection: 'sh.tangled.spindle', ...params },
2394 { headers },
2395 )
2396 }
2397}
2398
2399export class ShTangledStringRecord {
2400 _client: XrpcClient
2401
2402 constructor(client: XrpcClient) {
2403 this._client = client
2404 }
2405
2406 async list(
2407 params: OmitKey<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
2408 ): Promise<{
2409 cursor?: string
2410 records: { uri: string; value: ShTangledString.Record }[]
2411 }> {
2412 const res = await this._client.call('com.atproto.repo.listRecords', {
2413 collection: 'sh.tangled.string',
2414 ...params,
2415 })
2416 return res.data
2417 }
2418
2419 async get(
2420 params: OmitKey<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
2421 ): Promise<{ uri: string; cid: string; value: ShTangledString.Record }> {
2422 const res = await this._client.call('com.atproto.repo.getRecord', {
2423 collection: 'sh.tangled.string',
2424 ...params,
2425 })
2426 return res.data
2427 }
2428
2429 async create(
2430 params: OmitKey<
2431 ComAtprotoRepoCreateRecord.InputSchema,
2432 'collection' | 'record'
2433 >,
2434 record: Un$Typed<ShTangledString.Record>,
2435 headers?: Record<string, string>,
2436 ): Promise<{ uri: string; cid: string }> {
2437 const collection = 'sh.tangled.string'
2438 const res = await this._client.call(
2439 'com.atproto.repo.createRecord',
2440 undefined,
2441 { collection, ...params, record: { ...record, $type: collection } },
2442 { encoding: 'application/json', headers },
2443 )
2444 return res.data
2445 }
2446
2447 async put(
2448 params: OmitKey<
2449 ComAtprotoRepoPutRecord.InputSchema,
2450 'collection' | 'record'
2451 >,
2452 record: Un$Typed<ShTangledString.Record>,
2453 headers?: Record<string, string>,
2454 ): Promise<{ uri: string; cid: string }> {
2455 const collection = 'sh.tangled.string'
2456 const res = await this._client.call(
2457 'com.atproto.repo.putRecord',
2458 undefined,
2459 { collection, ...params, record: { ...record, $type: collection } },
2460 { encoding: 'application/json', headers },
2461 )
2462 return res.data
2463 }
2464
2465 async delete(
2466 params: OmitKey<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
2467 headers?: Record<string, string>,
2468 ): Promise<void> {
2469 await this._client.call(
2470 'com.atproto.repo.deleteRecord',
2471 undefined,
2472 { collection: 'sh.tangled.string', ...params },
2473 { headers },
2474 )
2475 }
2476}