@atproto/pds 0.4.36 → 0.4.38
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 +19 -0
- package/dist/lexicon/index.d.ts +25 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +54 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +536 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +561 -1
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +5 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/profile.d.ts +3 -0
- package/dist/lexicon/types/app/bsky/actor/profile.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/profile.js.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts +36 -1
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/defs.js +23 -1
- package/dist/lexicon/types/app/bsky/graph/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.d.ts +39 -0
- package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/getActorStarterPacks.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPack.d.ts +37 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPack.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPack.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPack.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPacks.d.ts +36 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPacks.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPacks.js +3 -0
- package/dist/lexicon/types/app/bsky/graph/getStarterPacks.js.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/starterpack.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/graph/starterpack.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/graph/starterpack.js +27 -0
- package/dist/lexicon/types/app/bsky/graph/starterpack.js.map +1 -0
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts +2 -2
- package/dist/lexicon/types/app/bsky/notification/listNotifications.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/notification/listNotifications.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/team/addMember.d.ts +40 -0
- package/dist/lexicon/types/tools/ozone/team/addMember.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/team/addMember.js +3 -0
- package/dist/lexicon/types/tools/ozone/team/addMember.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/team/defs.d.ts +24 -0
- package/dist/lexicon/types/tools/ozone/team/defs.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/team/defs.js +22 -0
- package/dist/lexicon/types/tools/ozone/team/defs.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/team/deleteMember.d.ts +30 -0
- package/dist/lexicon/types/tools/ozone/team/deleteMember.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/team/deleteMember.js +3 -0
- package/dist/lexicon/types/tools/ozone/team/deleteMember.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/team/listMembers.d.ts +38 -0
- package/dist/lexicon/types/tools/ozone/team/listMembers.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/team/listMembers.js +3 -0
- package/dist/lexicon/types/tools/ozone/team/listMembers.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/team/updateMember.d.ts +41 -0
- package/dist/lexicon/types/tools/ozone/team/updateMember.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/team/updateMember.js +3 -0
- package/dist/lexicon/types/tools/ozone/team/updateMember.js.map +1 -0
- package/dist/pipethrough.d.ts.map +1 -1
- package/dist/pipethrough.js +4 -0
- package/dist/pipethrough.js.map +1 -1
- package/dist/repo/prepare.d.ts.map +1 -1
- package/dist/repo/prepare.js +4 -0
- package/dist/repo/prepare.js.map +1 -1
- package/package.json +5 -5
- package/src/lexicon/index.ts +100 -0
- package/src/lexicon/lexicons.ts +566 -1
- package/src/lexicon/types/app/bsky/actor/defs.ts +5 -0
- package/src/lexicon/types/app/bsky/actor/profile.ts +3 -0
- package/src/lexicon/types/app/bsky/graph/defs.ts +58 -0
- package/src/lexicon/types/app/bsky/graph/getActorStarterPacks.ts +49 -0
- package/src/lexicon/types/app/bsky/graph/getStarterPack.ts +47 -0
- package/src/lexicon/types/app/bsky/graph/getStarterPacks.ts +46 -0
- package/src/lexicon/types/app/bsky/graph/starterpack.ts +50 -0
- package/src/lexicon/types/app/bsky/notification/listNotifications.ts +2 -1
- package/src/lexicon/types/tools/ozone/team/addMember.ts +53 -0
- package/src/lexicon/types/tools/ozone/team/defs.ts +42 -0
- package/src/lexicon/types/tools/ozone/team/deleteMember.ts +39 -0
- package/src/lexicon/types/tools/ozone/team/listMembers.ts +48 -0
- package/src/lexicon/types/tools/ozone/team/updateMember.ts +54 -0
- package/src/pipethrough.ts +4 -0
- package/src/repo/prepare.ts +3 -0
- package/tests/proxied/__snapshots__/admin.test.ts.snap +3 -0
- package/tests/proxied/__snapshots__/feedgen.test.ts.snap +2 -0
- package/tests/proxied/__snapshots__/views.test.ts.snap +71 -0
- package/tests/proxied/admin.test.ts +1 -1
|
@@ -16,6 +16,7 @@ export interface ProfileViewBasic {
|
|
|
16
16
|
associated?: ProfileAssociated
|
|
17
17
|
viewer?: ViewerState
|
|
18
18
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
19
|
+
createdAt?: string
|
|
19
20
|
[k: string]: unknown
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -39,6 +40,7 @@ export interface ProfileView {
|
|
|
39
40
|
avatar?: string
|
|
40
41
|
associated?: ProfileAssociated
|
|
41
42
|
indexedAt?: string
|
|
43
|
+
createdAt?: string
|
|
42
44
|
viewer?: ViewerState
|
|
43
45
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
44
46
|
[k: string]: unknown
|
|
@@ -67,7 +69,9 @@ export interface ProfileViewDetailed {
|
|
|
67
69
|
followsCount?: number
|
|
68
70
|
postsCount?: number
|
|
69
71
|
associated?: ProfileAssociated
|
|
72
|
+
joinedViaStarterPack?: AppBskyGraphDefs.StarterPackViewBasic
|
|
70
73
|
indexedAt?: string
|
|
74
|
+
createdAt?: string
|
|
71
75
|
viewer?: ViewerState
|
|
72
76
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
73
77
|
[k: string]: unknown
|
|
@@ -88,6 +92,7 @@ export function validateProfileViewDetailed(v: unknown): ValidationResult {
|
|
|
88
92
|
export interface ProfileAssociated {
|
|
89
93
|
lists?: number
|
|
90
94
|
feedgens?: number
|
|
95
|
+
starterPacks?: number
|
|
91
96
|
labeler?: boolean
|
|
92
97
|
chat?: ProfileAssociatedChat
|
|
93
98
|
[k: string]: unknown
|
|
@@ -6,6 +6,7 @@ import { lexicons } from '../../../../lexicons'
|
|
|
6
6
|
import { isObj, hasProp } from '../../../../util'
|
|
7
7
|
import { CID } from 'multiformats/cid'
|
|
8
8
|
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
|
9
|
+
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
|
9
10
|
|
|
10
11
|
export interface Record {
|
|
11
12
|
displayName?: string
|
|
@@ -18,6 +19,8 @@ export interface Record {
|
|
|
18
19
|
labels?:
|
|
19
20
|
| ComAtprotoLabelDefs.SelfLabels
|
|
20
21
|
| { $type: string; [k: string]: unknown }
|
|
22
|
+
joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main
|
|
23
|
+
createdAt?: string
|
|
21
24
|
[k: string]: unknown
|
|
22
25
|
}
|
|
23
26
|
|
|
@@ -8,6 +8,7 @@ import { CID } from 'multiformats/cid'
|
|
|
8
8
|
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
|
9
9
|
import * as AppBskyActorDefs from '../actor/defs'
|
|
10
10
|
import * as AppBskyRichtextFacet from '../richtext/facet'
|
|
11
|
+
import * as AppBskyFeedDefs from '../feed/defs'
|
|
11
12
|
|
|
12
13
|
export interface ListViewBasic {
|
|
13
14
|
uri: string
|
|
@@ -15,6 +16,7 @@ export interface ListViewBasic {
|
|
|
15
16
|
name: string
|
|
16
17
|
purpose: ListPurpose
|
|
17
18
|
avatar?: string
|
|
19
|
+
listItemCount?: number
|
|
18
20
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
19
21
|
viewer?: ListViewerState
|
|
20
22
|
indexedAt?: string
|
|
@@ -42,6 +44,7 @@ export interface ListView {
|
|
|
42
44
|
description?: string
|
|
43
45
|
descriptionFacets?: AppBskyRichtextFacet.Main[]
|
|
44
46
|
avatar?: string
|
|
47
|
+
listItemCount?: number
|
|
45
48
|
labels?: ComAtprotoLabelDefs.Label[]
|
|
46
49
|
viewer?: ListViewerState
|
|
47
50
|
indexedAt: string
|
|
@@ -78,15 +81,70 @@ export function validateListItemView(v: unknown): ValidationResult {
|
|
|
78
81
|
return lexicons.validate('app.bsky.graph.defs#listItemView', v)
|
|
79
82
|
}
|
|
80
83
|
|
|
84
|
+
export interface StarterPackView {
|
|
85
|
+
uri: string
|
|
86
|
+
cid: string
|
|
87
|
+
record: {}
|
|
88
|
+
creator: AppBskyActorDefs.ProfileViewBasic
|
|
89
|
+
list?: ListViewBasic
|
|
90
|
+
listItemsSample?: ListItemView[]
|
|
91
|
+
feeds?: AppBskyFeedDefs.GeneratorView[]
|
|
92
|
+
joinedWeekCount?: number
|
|
93
|
+
joinedAllTimeCount?: number
|
|
94
|
+
labels?: ComAtprotoLabelDefs.Label[]
|
|
95
|
+
indexedAt: string
|
|
96
|
+
[k: string]: unknown
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function isStarterPackView(v: unknown): v is StarterPackView {
|
|
100
|
+
return (
|
|
101
|
+
isObj(v) &&
|
|
102
|
+
hasProp(v, '$type') &&
|
|
103
|
+
v.$type === 'app.bsky.graph.defs#starterPackView'
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function validateStarterPackView(v: unknown): ValidationResult {
|
|
108
|
+
return lexicons.validate('app.bsky.graph.defs#starterPackView', v)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface StarterPackViewBasic {
|
|
112
|
+
uri: string
|
|
113
|
+
cid: string
|
|
114
|
+
record: {}
|
|
115
|
+
creator: AppBskyActorDefs.ProfileViewBasic
|
|
116
|
+
listItemCount?: number
|
|
117
|
+
joinedWeekCount?: number
|
|
118
|
+
joinedAllTimeCount?: number
|
|
119
|
+
labels?: ComAtprotoLabelDefs.Label[]
|
|
120
|
+
indexedAt: string
|
|
121
|
+
[k: string]: unknown
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function isStarterPackViewBasic(v: unknown): v is StarterPackViewBasic {
|
|
125
|
+
return (
|
|
126
|
+
isObj(v) &&
|
|
127
|
+
hasProp(v, '$type') &&
|
|
128
|
+
v.$type === 'app.bsky.graph.defs#starterPackViewBasic'
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function validateStarterPackViewBasic(v: unknown): ValidationResult {
|
|
133
|
+
return lexicons.validate('app.bsky.graph.defs#starterPackViewBasic', v)
|
|
134
|
+
}
|
|
135
|
+
|
|
81
136
|
export type ListPurpose =
|
|
82
137
|
| 'app.bsky.graph.defs#modlist'
|
|
83
138
|
| 'app.bsky.graph.defs#curatelist'
|
|
139
|
+
| 'app.bsky.graph.defs#referencelist'
|
|
84
140
|
| (string & {})
|
|
85
141
|
|
|
86
142
|
/** A list of actors to apply an aggregate moderation action (mute/block) on. */
|
|
87
143
|
export const MODLIST = 'app.bsky.graph.defs#modlist'
|
|
88
144
|
/** A list of actors used for curation purposes such as list feeds or interaction gating. */
|
|
89
145
|
export const CURATELIST = 'app.bsky.graph.defs#curatelist'
|
|
146
|
+
/** A list of actors used for only for reference purposes such as within a starter pack. */
|
|
147
|
+
export const REFERENCELIST = 'app.bsky.graph.defs#referencelist'
|
|
90
148
|
|
|
91
149
|
export interface ListViewerState {
|
|
92
150
|
muted?: boolean
|
|
@@ -0,0 +1,49 @@
|
|
|
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, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppBskyGraphDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
actor: string
|
|
14
|
+
limit: number
|
|
15
|
+
cursor?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type InputSchema = undefined
|
|
19
|
+
|
|
20
|
+
export interface OutputSchema {
|
|
21
|
+
cursor?: string
|
|
22
|
+
starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
|
|
23
|
+
[k: string]: unknown
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type HandlerInput = undefined
|
|
27
|
+
|
|
28
|
+
export interface HandlerSuccess {
|
|
29
|
+
encoding: 'application/json'
|
|
30
|
+
body: OutputSchema
|
|
31
|
+
headers?: { [key: string]: string }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface HandlerError {
|
|
35
|
+
status: number
|
|
36
|
+
message?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
40
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
41
|
+
auth: HA
|
|
42
|
+
params: QueryParams
|
|
43
|
+
input: HandlerInput
|
|
44
|
+
req: express.Request
|
|
45
|
+
res: express.Response
|
|
46
|
+
}
|
|
47
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
48
|
+
ctx: HandlerReqCtx<HA>,
|
|
49
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,47 @@
|
|
|
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, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppBskyGraphDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** Reference (AT-URI) of the starter pack record. */
|
|
14
|
+
starterPack: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
starterPack: AppBskyGraphDefs.StarterPackView
|
|
21
|
+
[k: string]: unknown
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type HandlerInput = undefined
|
|
25
|
+
|
|
26
|
+
export interface HandlerSuccess {
|
|
27
|
+
encoding: 'application/json'
|
|
28
|
+
body: OutputSchema
|
|
29
|
+
headers?: { [key: string]: string }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface HandlerError {
|
|
33
|
+
status: number
|
|
34
|
+
message?: string
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
38
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
39
|
+
auth: HA
|
|
40
|
+
params: QueryParams
|
|
41
|
+
input: HandlerInput
|
|
42
|
+
req: express.Request
|
|
43
|
+
res: express.Response
|
|
44
|
+
}
|
|
45
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
46
|
+
ctx: HandlerReqCtx<HA>,
|
|
47
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,46 @@
|
|
|
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, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppBskyGraphDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
uris: string[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type InputSchema = undefined
|
|
17
|
+
|
|
18
|
+
export interface OutputSchema {
|
|
19
|
+
starterPacks: AppBskyGraphDefs.StarterPackViewBasic[]
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type HandlerInput = undefined
|
|
24
|
+
|
|
25
|
+
export interface HandlerSuccess {
|
|
26
|
+
encoding: 'application/json'
|
|
27
|
+
body: OutputSchema
|
|
28
|
+
headers?: { [key: string]: string }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface HandlerError {
|
|
32
|
+
status: number
|
|
33
|
+
message?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
37
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
38
|
+
auth: HA
|
|
39
|
+
params: QueryParams
|
|
40
|
+
input: HandlerInput
|
|
41
|
+
req: express.Request
|
|
42
|
+
res: express.Response
|
|
43
|
+
}
|
|
44
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
45
|
+
ctx: HandlerReqCtx<HA>,
|
|
46
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
import * as AppBskyRichtextFacet from '../richtext/facet'
|
|
9
|
+
|
|
10
|
+
export interface Record {
|
|
11
|
+
/** Display name for starter pack; can not be empty. */
|
|
12
|
+
name: string
|
|
13
|
+
description?: string
|
|
14
|
+
descriptionFacets?: AppBskyRichtextFacet.Main[]
|
|
15
|
+
/** Reference (AT-URI) to the list record. */
|
|
16
|
+
list: string
|
|
17
|
+
feeds?: FeedItem[]
|
|
18
|
+
createdAt: string
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function isRecord(v: unknown): v is Record {
|
|
23
|
+
return (
|
|
24
|
+
isObj(v) &&
|
|
25
|
+
hasProp(v, '$type') &&
|
|
26
|
+
(v.$type === 'app.bsky.graph.starterpack#main' ||
|
|
27
|
+
v.$type === 'app.bsky.graph.starterpack')
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
32
|
+
return lexicons.validate('app.bsky.graph.starterpack#main', v)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface FeedItem {
|
|
36
|
+
uri: string
|
|
37
|
+
[k: string]: unknown
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function isFeedItem(v: unknown): v is FeedItem {
|
|
41
|
+
return (
|
|
42
|
+
isObj(v) &&
|
|
43
|
+
hasProp(v, '$type') &&
|
|
44
|
+
v.$type === 'app.bsky.graph.starterpack#feedItem'
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function validateFeedItem(v: unknown): ValidationResult {
|
|
49
|
+
return lexicons.validate('app.bsky.graph.starterpack#feedItem', v)
|
|
50
|
+
}
|
|
@@ -54,7 +54,7 @@ export interface Notification {
|
|
|
54
54
|
uri: string
|
|
55
55
|
cid: string
|
|
56
56
|
author: AppBskyActorDefs.ProfileView
|
|
57
|
-
/** Expected values are 'like', 'repost', 'follow', 'mention', 'reply', and '
|
|
57
|
+
/** Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'. */
|
|
58
58
|
reason:
|
|
59
59
|
| 'like'
|
|
60
60
|
| 'repost'
|
|
@@ -62,6 +62,7 @@ export interface Notification {
|
|
|
62
62
|
| 'mention'
|
|
63
63
|
| 'reply'
|
|
64
64
|
| 'quote'
|
|
65
|
+
| 'starterpack-joined'
|
|
65
66
|
| (string & {})
|
|
66
67
|
reasonSubject?: string
|
|
67
68
|
record: {}
|
|
@@ -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, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as ToolsOzoneTeamDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {}
|
|
13
|
+
|
|
14
|
+
export interface InputSchema {
|
|
15
|
+
did: string
|
|
16
|
+
role:
|
|
17
|
+
| 'tools.ozone.team.defs#roleAdmin'
|
|
18
|
+
| 'tools.ozone.team.defs#roleModerator'
|
|
19
|
+
| 'tools.ozone.team.defs#roleTriage'
|
|
20
|
+
| (string & {})
|
|
21
|
+
[k: string]: unknown
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type OutputSchema = ToolsOzoneTeamDefs.Member
|
|
25
|
+
|
|
26
|
+
export interface HandlerInput {
|
|
27
|
+
encoding: 'application/json'
|
|
28
|
+
body: InputSchema
|
|
29
|
+
}
|
|
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?: 'MemberAlreadyExists'
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
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,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
import * as AppBskyActorDefs from '../../../app/bsky/actor/defs'
|
|
9
|
+
|
|
10
|
+
export interface Member {
|
|
11
|
+
did: string
|
|
12
|
+
disabled?: boolean
|
|
13
|
+
profile?: AppBskyActorDefs.ProfileViewDetailed
|
|
14
|
+
createdAt?: string
|
|
15
|
+
updatedAt?: string
|
|
16
|
+
lastUpdatedBy?: string
|
|
17
|
+
role:
|
|
18
|
+
| 'lex:tools.ozone.team.defs#roleAdmin'
|
|
19
|
+
| 'lex:tools.ozone.team.defs#roleModerator'
|
|
20
|
+
| 'lex:tools.ozone.team.defs#roleTriage'
|
|
21
|
+
| (string & {})
|
|
22
|
+
[k: string]: unknown
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function isMember(v: unknown): v is Member {
|
|
26
|
+
return (
|
|
27
|
+
isObj(v) &&
|
|
28
|
+
hasProp(v, '$type') &&
|
|
29
|
+
v.$type === 'tools.ozone.team.defs#member'
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function validateMember(v: unknown): ValidationResult {
|
|
34
|
+
return lexicons.validate('tools.ozone.team.defs#member', v)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Admin role. Highest level of access, can perform all actions. */
|
|
38
|
+
export const ROLEADMIN = 'tools.ozone.team.defs#roleAdmin'
|
|
39
|
+
/** Moderator role. Can perform most actions. */
|
|
40
|
+
export const ROLEMODERATOR = 'tools.ozone.team.defs#roleModerator'
|
|
41
|
+
/** Triage role. Mostly intended for monitoring and escalating issues. */
|
|
42
|
+
export const ROLETRIAGE = 'tools.ozone.team.defs#roleTriage'
|
|
@@ -0,0 +1,39 @@
|
|
|
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, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export interface InputSchema {
|
|
14
|
+
did: string
|
|
15
|
+
[k: string]: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface HandlerInput {
|
|
19
|
+
encoding: 'application/json'
|
|
20
|
+
body: InputSchema
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface HandlerError {
|
|
24
|
+
status: number
|
|
25
|
+
message?: string
|
|
26
|
+
error?: 'MemberNotFound' | 'CannotDeleteSelf'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type HandlerOutput = HandlerError | void
|
|
30
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
31
|
+
auth: HA
|
|
32
|
+
params: QueryParams
|
|
33
|
+
input: HandlerInput
|
|
34
|
+
req: express.Request
|
|
35
|
+
res: express.Response
|
|
36
|
+
}
|
|
37
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
38
|
+
ctx: HandlerReqCtx<HA>,
|
|
39
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,48 @@
|
|
|
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, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as ToolsOzoneTeamDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
limit: number
|
|
14
|
+
cursor?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
cursor?: string
|
|
21
|
+
members: ToolsOzoneTeamDefs.Member[]
|
|
22
|
+
[k: string]: unknown
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type HandlerInput = undefined
|
|
26
|
+
|
|
27
|
+
export interface HandlerSuccess {
|
|
28
|
+
encoding: 'application/json'
|
|
29
|
+
body: OutputSchema
|
|
30
|
+
headers?: { [key: string]: string }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface HandlerError {
|
|
34
|
+
status: number
|
|
35
|
+
message?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
39
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
40
|
+
auth: HA
|
|
41
|
+
params: QueryParams
|
|
42
|
+
input: HandlerInput
|
|
43
|
+
req: express.Request
|
|
44
|
+
res: express.Response
|
|
45
|
+
}
|
|
46
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
47
|
+
ctx: HandlerReqCtx<HA>,
|
|
48
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,54 @@
|
|
|
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, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as ToolsOzoneTeamDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {}
|
|
13
|
+
|
|
14
|
+
export interface InputSchema {
|
|
15
|
+
did: string
|
|
16
|
+
disabled?: boolean
|
|
17
|
+
role?:
|
|
18
|
+
| 'tools.ozone.team.defs#roleAdmin'
|
|
19
|
+
| 'tools.ozone.team.defs#roleModerator'
|
|
20
|
+
| 'tools.ozone.team.defs#roleTriage'
|
|
21
|
+
| (string & {})
|
|
22
|
+
[k: string]: unknown
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type OutputSchema = ToolsOzoneTeamDefs.Member
|
|
26
|
+
|
|
27
|
+
export interface HandlerInput {
|
|
28
|
+
encoding: 'application/json'
|
|
29
|
+
body: InputSchema
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface HandlerSuccess {
|
|
33
|
+
encoding: 'application/json'
|
|
34
|
+
body: OutputSchema
|
|
35
|
+
headers?: { [key: string]: string }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface HandlerError {
|
|
39
|
+
status: number
|
|
40
|
+
message?: string
|
|
41
|
+
error?: 'MemberNotFound'
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
45
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
46
|
+
auth: HA
|
|
47
|
+
params: QueryParams
|
|
48
|
+
input: HandlerInput
|
|
49
|
+
req: express.Request
|
|
50
|
+
res: express.Response
|
|
51
|
+
}
|
|
52
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
53
|
+
ctx: HandlerReqCtx<HA>,
|
|
54
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
package/src/pipethrough.ts
CHANGED
|
@@ -247,6 +247,10 @@ const defaultService = (
|
|
|
247
247
|
): { url: string; did: string } | null => {
|
|
248
248
|
const nsid = req.originalUrl.split('?')[0].replace('/xrpc/', '')
|
|
249
249
|
switch (nsid) {
|
|
250
|
+
case ids.ToolsOzoneTeamAddMember:
|
|
251
|
+
case ids.ToolsOzoneTeamDeleteMember:
|
|
252
|
+
case ids.ToolsOzoneTeamUpdateMember:
|
|
253
|
+
case ids.ToolsOzoneTeamListMembers:
|
|
250
254
|
case ids.ToolsOzoneCommunicationCreateTemplate:
|
|
251
255
|
case ids.ToolsOzoneCommunicationDeleteTemplate:
|
|
252
256
|
case ids.ToolsOzoneCommunicationUpdateTemplate:
|
package/src/repo/prepare.ts
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
} from './types'
|
|
33
33
|
import * as lex from '../lexicon/lexicons'
|
|
34
34
|
import { isRecord as isFeedGenerator } from '../lexicon/types/app/bsky/feed/generator'
|
|
35
|
+
import { isRecord as isStarterPack } from '../lexicon/types/app/bsky/graph/starterpack'
|
|
35
36
|
import { isRecord as isPost } from '../lexicon/types/app/bsky/feed/post'
|
|
36
37
|
import { isTag } from '../lexicon/types/app/bsky/richtext/facet'
|
|
37
38
|
import { isRecord as isList } from '../lexicon/types/app/bsky/graph/list'
|
|
@@ -208,6 +209,8 @@ function assertNoExplicitSlurs(rkey: string, record: RepoRecord) {
|
|
|
208
209
|
toCheck += ' ' + record.displayName
|
|
209
210
|
} else if (isList(record)) {
|
|
210
211
|
toCheck += ' ' + record.name
|
|
212
|
+
} else if (isStarterPack(record)) {
|
|
213
|
+
toCheck += ' ' + record.name
|
|
211
214
|
} else if (isFeedGenerator(record)) {
|
|
212
215
|
toCheck += ' ' + rkey
|
|
213
216
|
toCheck += ' ' + record.displayName
|
|
@@ -152,6 +152,7 @@ Object {
|
|
|
152
152
|
},
|
|
153
153
|
"size": 3976,
|
|
154
154
|
},
|
|
155
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
155
156
|
"description": "hi im bob label_me",
|
|
156
157
|
"displayName": "bobby",
|
|
157
158
|
},
|
|
@@ -300,6 +301,7 @@ Object {
|
|
|
300
301
|
},
|
|
301
302
|
"size": 3976,
|
|
302
303
|
},
|
|
304
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
303
305
|
"description": "hi im bob label_me",
|
|
304
306
|
"displayName": "bobby",
|
|
305
307
|
},
|
|
@@ -360,6 +362,7 @@ Array [
|
|
|
360
362
|
},
|
|
361
363
|
"size": 3976,
|
|
362
364
|
},
|
|
365
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
363
366
|
"description": "its me!",
|
|
364
367
|
"displayName": "ali",
|
|
365
368
|
"labels": Object {
|
|
@@ -7,6 +7,7 @@ Object {
|
|
|
7
7
|
"post": Object {
|
|
8
8
|
"author": Object {
|
|
9
9
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
10
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
10
11
|
"did": "user(0)",
|
|
11
12
|
"displayName": "ali",
|
|
12
13
|
"handle": "alice.test",
|
|
@@ -100,6 +101,7 @@ Object {
|
|
|
100
101
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
101
102
|
"author": Object {
|
|
102
103
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(5)/cids(1)@jpeg",
|
|
104
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
103
105
|
"did": "user(4)",
|
|
104
106
|
"displayName": "bobby",
|
|
105
107
|
"handle": "bob.test",
|