-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix typo in getRelationships (#2091)
fix typo in getRelationships + codegen
- Loading branch information
Showing
17 changed files
with
818 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
packages/api/src/client/types/app/bsky/graph/getRelationships.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* GENERATED CODE - DO NOT MODIFY | ||
*/ | ||
import { Headers, XRPCError } from '@atproto/xrpc' | ||
import { ValidationResult, BlobRef } from '@atproto/lexicon' | ||
import { isObj, hasProp } from '../../../../util' | ||
import { lexicons } from '../../../../lexicons' | ||
import { CID } from 'multiformats/cid' | ||
import * as AppBskyGraphDefs from './defs' | ||
|
||
export interface QueryParams { | ||
actor: string | ||
others?: string[] | ||
} | ||
|
||
export type InputSchema = undefined | ||
|
||
export interface OutputSchema { | ||
actor?: string | ||
relationships: ( | ||
| AppBskyGraphDefs.Relationship | ||
| AppBskyGraphDefs.NotFoundActor | ||
| { $type: string; [k: string]: unknown } | ||
)[] | ||
[k: string]: unknown | ||
} | ||
|
||
export interface CallOptions { | ||
headers?: Headers | ||
} | ||
|
||
export interface Response { | ||
success: boolean | ||
headers: Headers | ||
data: OutputSchema | ||
} | ||
|
||
export class ActorNotFoundError extends XRPCError { | ||
constructor(src: XRPCError) { | ||
super(src.status, src.error, src.message, src.headers) | ||
} | ||
} | ||
|
||
export function toKnownErr(e: any) { | ||
if (e instanceof XRPCError) { | ||
if (e.error === 'ActorNotFound') return new ActorNotFoundError(e) | ||
} | ||
return e | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.