@atproto/ozone 0.0.5 → 0.0.7

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.
@@ -0,0 +1,53 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth } from '@atproto/xrpc-server'
10
+ import * as AppBskyGraphDefs from './defs'
11
+
12
+ export interface QueryParams {
13
+ actor: string
14
+ others?: string[]
15
+ }
16
+
17
+ export type InputSchema = undefined
18
+
19
+ export interface OutputSchema {
20
+ actor?: string
21
+ relationships: (
22
+ | AppBskyGraphDefs.Relationship
23
+ | AppBskyGraphDefs.NotFoundActor
24
+ | { $type: string; [k: string]: unknown }
25
+ )[]
26
+ [k: string]: unknown
27
+ }
28
+
29
+ export type HandlerInput = undefined
30
+
31
+ export interface HandlerSuccess {
32
+ encoding: 'application/json'
33
+ body: OutputSchema
34
+ headers?: { [key: string]: string }
35
+ }
36
+
37
+ export interface HandlerError {
38
+ status: number
39
+ message?: string
40
+ error?: 'ActorNotFound'
41
+ }
42
+
43
+ export type HandlerOutput = HandlerError | HandlerSuccess
44
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
45
+ auth: HA
46
+ params: QueryParams
47
+ input: HandlerInput
48
+ req: express.Request
49
+ res: express.Response
50
+ }
51
+ export type Handler<HA extends HandlerAuth = never> = (
52
+ ctx: HandlerReqCtx<HA>,
53
+ ) => Promise<HandlerOutput> | HandlerOutput
@@ -0,0 +1,45 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { lexicons } from '../../../../lexicons'
7
+ import { isObj, hasProp } from '../../../../util'
8
+ import { CID } from 'multiformats/cid'
9
+ import { HandlerAuth } from '@atproto/xrpc-server'
10
+
11
+ export interface QueryParams {}
12
+
13
+ export type InputSchema = undefined
14
+
15
+ export interface OutputSchema {
16
+ activated: boolean
17
+ placeInQueue?: number
18
+ estimatedTimeMs?: number
19
+ [k: string]: unknown
20
+ }
21
+
22
+ export type HandlerInput = undefined
23
+
24
+ export interface HandlerSuccess {
25
+ encoding: 'application/json'
26
+ body: OutputSchema
27
+ headers?: { [key: string]: string }
28
+ }
29
+
30
+ export interface HandlerError {
31
+ status: number
32
+ message?: string
33
+ }
34
+
35
+ export type HandlerOutput = HandlerError | HandlerSuccess
36
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
37
+ auth: HA
38
+ params: QueryParams
39
+ input: HandlerInput
40
+ req: express.Request
41
+ res: express.Response
42
+ }
43
+ export type Handler<HA extends HandlerAuth = never> = (
44
+ ctx: HandlerReqCtx<HA>,
45
+ ) => Promise<HandlerOutput> | HandlerOutput