@atproto/api 0.14.0-next.1 → 0.14.0-next.2
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 +35 -0
- package/definitions/labels.json +1 -0
- package/dist/client/lexicons.d.ts +66 -0
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +33 -0
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/app/bsky/actor/defs.d.ts +24 -24
- package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/client/types/app/bsky/actor/profile.d.ts +1 -3
- package/dist/client/types/app/bsky/actor/profile.d.ts.map +1 -1
- package/dist/client/types/app/bsky/actor/profile.js.map +1 -1
- package/dist/client/types/app/bsky/embed/defs.d.ts +1 -1
- package/dist/client/types/app/bsky/embed/defs.js.map +1 -1
- package/dist/client/types/app/bsky/embed/external.d.ts +4 -4
- package/dist/client/types/app/bsky/embed/external.js.map +1 -1
- package/dist/client/types/app/bsky/embed/images.d.ts +4 -4
- package/dist/client/types/app/bsky/embed/images.js.map +1 -1
- package/dist/client/types/app/bsky/embed/record.d.ts +6 -6
- package/dist/client/types/app/bsky/embed/record.js.map +1 -1
- package/dist/client/types/app/bsky/embed/recordWithMedia.d.ts +2 -2
- package/dist/client/types/app/bsky/embed/recordWithMedia.js.map +1 -1
- package/dist/client/types/app/bsky/embed/video.d.ts +3 -3
- package/dist/client/types/app/bsky/embed/video.js.map +1 -1
- package/dist/client/types/app/bsky/feed/defs.d.ts +17 -17
- package/dist/client/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/client/types/app/bsky/feed/describeFeedGenerator.d.ts +2 -2
- package/dist/client/types/app/bsky/feed/describeFeedGenerator.js.map +1 -1
- package/dist/client/types/app/bsky/feed/generator.d.ts +1 -3
- package/dist/client/types/app/bsky/feed/generator.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/generator.js.map +1 -1
- package/dist/client/types/app/bsky/feed/getLikes.d.ts +1 -1
- package/dist/client/types/app/bsky/feed/getLikes.js.map +1 -1
- package/dist/client/types/app/bsky/feed/like.d.ts +2 -4
- package/dist/client/types/app/bsky/feed/like.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/like.js.map +1 -1
- package/dist/client/types/app/bsky/feed/post.d.ts +4 -6
- package/dist/client/types/app/bsky/feed/post.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/post.js.map +1 -1
- package/dist/client/types/app/bsky/feed/postgate.d.ts +2 -4
- package/dist/client/types/app/bsky/feed/postgate.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/postgate.js.map +1 -1
- package/dist/client/types/app/bsky/feed/repost.d.ts +2 -4
- package/dist/client/types/app/bsky/feed/repost.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/repost.js.map +1 -1
- package/dist/client/types/app/bsky/feed/threadgate.d.ts +4 -6
- package/dist/client/types/app/bsky/feed/threadgate.d.ts.map +1 -1
- package/dist/client/types/app/bsky/feed/threadgate.js.map +1 -1
- package/dist/client/types/app/bsky/graph/block.d.ts +2 -4
- package/dist/client/types/app/bsky/graph/block.d.ts.map +1 -1
- package/dist/client/types/app/bsky/graph/block.js.map +1 -1
- package/dist/client/types/app/bsky/graph/defs.d.ts +8 -8
- package/dist/client/types/app/bsky/graph/defs.js.map +1 -1
- package/dist/client/types/app/bsky/graph/follow.d.ts +2 -4
- package/dist/client/types/app/bsky/graph/follow.d.ts.map +1 -1
- package/dist/client/types/app/bsky/graph/follow.js.map +1 -1
- package/dist/client/types/app/bsky/graph/list.d.ts +1 -3
- package/dist/client/types/app/bsky/graph/list.d.ts.map +1 -1
- package/dist/client/types/app/bsky/graph/list.js.map +1 -1
- package/dist/client/types/app/bsky/graph/listblock.d.ts +2 -4
- package/dist/client/types/app/bsky/graph/listblock.d.ts.map +1 -1
- package/dist/client/types/app/bsky/graph/listblock.js.map +1 -1
- package/dist/client/types/app/bsky/graph/listitem.d.ts +2 -4
- package/dist/client/types/app/bsky/graph/listitem.d.ts.map +1 -1
- package/dist/client/types/app/bsky/graph/listitem.js.map +1 -1
- package/dist/client/types/app/bsky/graph/starterpack.d.ts +3 -5
- package/dist/client/types/app/bsky/graph/starterpack.d.ts.map +1 -1
- package/dist/client/types/app/bsky/graph/starterpack.js.map +1 -1
- package/dist/client/types/app/bsky/labeler/defs.d.ts +4 -4
- package/dist/client/types/app/bsky/labeler/defs.js.map +1 -1
- package/dist/client/types/app/bsky/labeler/service.d.ts +1 -3
- package/dist/client/types/app/bsky/labeler/service.d.ts.map +1 -1
- package/dist/client/types/app/bsky/labeler/service.js.map +1 -1
- package/dist/client/types/app/bsky/notification/listNotifications.d.ts +1 -1
- package/dist/client/types/app/bsky/notification/listNotifications.js.map +1 -1
- package/dist/client/types/app/bsky/richtext/facet.d.ts +5 -5
- package/dist/client/types/app/bsky/richtext/facet.js.map +1 -1
- package/dist/client/types/app/bsky/unspecced/defs.d.ts +4 -4
- package/dist/client/types/app/bsky/unspecced/defs.js.map +1 -1
- package/dist/client/types/app/bsky/unspecced/getTaggedSuggestions.d.ts +1 -1
- package/dist/client/types/app/bsky/unspecced/getTaggedSuggestions.js.map +1 -1
- package/dist/client/types/app/bsky/video/defs.d.ts +1 -1
- package/dist/client/types/app/bsky/video/defs.js.map +1 -1
- package/dist/client/types/chat/bsky/actor/declaration.d.ts +2 -4
- package/dist/client/types/chat/bsky/actor/declaration.d.ts.map +1 -1
- package/dist/client/types/chat/bsky/actor/declaration.js.map +1 -1
- package/dist/client/types/chat/bsky/actor/defs.d.ts +1 -1
- package/dist/client/types/chat/bsky/actor/defs.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/defs.d.ts +10 -10
- package/dist/client/types/chat/bsky/convo/defs.js.map +1 -1
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.d.ts +1 -1
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.js.map +1 -1
- package/dist/client/types/chat/bsky/moderation/getActorMetadata.d.ts +1 -1
- package/dist/client/types/chat/bsky/moderation/getActorMetadata.js.map +1 -1
- package/dist/client/types/com/atproto/admin/defs.d.ts +5 -5
- package/dist/client/types/com/atproto/admin/defs.js.map +1 -1
- package/dist/client/types/com/atproto/label/defs.d.ts +5 -5
- package/dist/client/types/com/atproto/label/defs.js.map +1 -1
- package/dist/client/types/com/atproto/label/subscribeLabels.d.ts +2 -2
- package/dist/client/types/com/atproto/label/subscribeLabels.js.map +1 -1
- package/dist/client/types/com/atproto/repo/applyWrites.d.ts +6 -6
- package/dist/client/types/com/atproto/repo/applyWrites.js.map +1 -1
- package/dist/client/types/com/atproto/repo/defs.d.ts +1 -1
- package/dist/client/types/com/atproto/repo/defs.js.map +1 -1
- package/dist/client/types/com/atproto/repo/listMissingBlobs.d.ts +1 -1
- package/dist/client/types/com/atproto/repo/listMissingBlobs.js.map +1 -1
- package/dist/client/types/com/atproto/repo/listRecords.d.ts +1 -1
- package/dist/client/types/com/atproto/repo/listRecords.js.map +1 -1
- package/dist/client/types/com/atproto/repo/strongRef.d.ts +1 -1
- package/dist/client/types/com/atproto/repo/strongRef.js.map +1 -1
- package/dist/client/types/com/atproto/server/createAppPassword.d.ts +1 -1
- package/dist/client/types/com/atproto/server/createAppPassword.js.map +1 -1
- package/dist/client/types/com/atproto/server/createInviteCodes.d.ts +1 -1
- package/dist/client/types/com/atproto/server/createInviteCodes.js.map +1 -1
- package/dist/client/types/com/atproto/server/createSession.d.ts +2 -0
- package/dist/client/types/com/atproto/server/createSession.d.ts.map +1 -1
- package/dist/client/types/com/atproto/server/createSession.js.map +1 -1
- package/dist/client/types/com/atproto/server/defs.d.ts +2 -2
- package/dist/client/types/com/atproto/server/defs.js.map +1 -1
- package/dist/client/types/com/atproto/server/describeServer.d.ts +2 -2
- package/dist/client/types/com/atproto/server/describeServer.js.map +1 -1
- package/dist/client/types/com/atproto/server/listAppPasswords.d.ts +1 -1
- package/dist/client/types/com/atproto/server/listAppPasswords.js.map +1 -1
- package/dist/client/types/com/atproto/sync/listRepos.d.ts +1 -1
- package/dist/client/types/com/atproto/sync/listRepos.js.map +1 -1
- package/dist/client/types/com/atproto/sync/subscribeRepos.d.ts +8 -8
- package/dist/client/types/com/atproto/sync/subscribeRepos.js.map +1 -1
- package/dist/client/types/tools/ozone/communication/defs.d.ts +1 -1
- package/dist/client/types/tools/ozone/communication/defs.js.map +1 -1
- package/dist/client/types/tools/ozone/moderation/defs.d.ts +36 -34
- package/dist/client/types/tools/ozone/moderation/defs.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/moderation/defs.js.map +1 -1
- package/dist/client/types/tools/ozone/moderation/queryEvents.d.ts +1 -0
- package/dist/client/types/tools/ozone/moderation/queryEvents.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/moderation/queryEvents.js.map +1 -1
- package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts +6 -0
- package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
- package/dist/client/types/tools/ozone/moderation/queryStatuses.js.map +1 -1
- package/dist/client/types/tools/ozone/server/getConfig.d.ts +2 -2
- package/dist/client/types/tools/ozone/server/getConfig.js.map +1 -1
- package/dist/client/types/tools/ozone/set/defs.d.ts +2 -2
- package/dist/client/types/tools/ozone/set/defs.js.map +1 -1
- package/dist/client/types/tools/ozone/setting/defs.d.ts +1 -1
- package/dist/client/types/tools/ozone/setting/defs.js.map +1 -1
- package/dist/client/types/tools/ozone/signature/defs.d.ts +1 -1
- package/dist/client/types/tools/ozone/signature/defs.js.map +1 -1
- package/dist/client/types/tools/ozone/signature/findRelatedAccounts.d.ts +1 -1
- package/dist/client/types/tools/ozone/signature/findRelatedAccounts.js.map +1 -1
- package/dist/client/types/tools/ozone/team/defs.d.ts +1 -1
- package/dist/client/types/tools/ozone/team/defs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/moderation/const/labels.d.ts +1 -1
- package/dist/moderation/const/labels.d.ts.map +1 -1
- package/dist/moderation/const/labels.js +23 -0
- package/dist/moderation/const/labels.js.map +1 -1
- package/dist/moderation/decision.d.ts.map +1 -1
- package/dist/moderation/decision.js +1 -1
- package/dist/moderation/decision.js.map +1 -1
- package/dist/moderation/subjects/post.d.ts.map +1 -1
- package/dist/moderation/subjects/post.js +22 -17
- package/dist/moderation/subjects/post.js.map +1 -1
- package/dist/moderation/types.d.ts +2 -2
- package/dist/moderation/types.d.ts.map +1 -1
- package/dist/moderation/types.js.map +1 -1
- package/package.json +5 -5
- package/scripts/code/labels.mjs +33 -9
- package/src/client/lexicons.ts +40 -1
- package/src/client/types/app/bsky/actor/defs.ts +24 -24
- package/src/client/types/app/bsky/actor/profile.ts +1 -1
- package/src/client/types/app/bsky/embed/defs.ts +1 -1
- package/src/client/types/app/bsky/embed/external.ts +4 -4
- package/src/client/types/app/bsky/embed/images.ts +4 -4
- package/src/client/types/app/bsky/embed/record.ts +6 -6
- package/src/client/types/app/bsky/embed/recordWithMedia.ts +2 -2
- package/src/client/types/app/bsky/embed/video.ts +3 -3
- package/src/client/types/app/bsky/feed/defs.ts +17 -17
- package/src/client/types/app/bsky/feed/describeFeedGenerator.ts +2 -2
- package/src/client/types/app/bsky/feed/generator.ts +1 -1
- package/src/client/types/app/bsky/feed/getLikes.ts +1 -1
- package/src/client/types/app/bsky/feed/like.ts +1 -1
- package/src/client/types/app/bsky/feed/post.ts +4 -4
- package/src/client/types/app/bsky/feed/postgate.ts +2 -2
- package/src/client/types/app/bsky/feed/repost.ts +1 -1
- package/src/client/types/app/bsky/feed/threadgate.ts +4 -4
- package/src/client/types/app/bsky/graph/block.ts +1 -1
- package/src/client/types/app/bsky/graph/defs.ts +8 -8
- package/src/client/types/app/bsky/graph/follow.ts +1 -1
- package/src/client/types/app/bsky/graph/list.ts +1 -1
- package/src/client/types/app/bsky/graph/listblock.ts +1 -1
- package/src/client/types/app/bsky/graph/listitem.ts +1 -1
- package/src/client/types/app/bsky/graph/starterpack.ts +2 -2
- package/src/client/types/app/bsky/labeler/defs.ts +4 -4
- package/src/client/types/app/bsky/labeler/service.ts +1 -1
- package/src/client/types/app/bsky/notification/listNotifications.ts +1 -1
- package/src/client/types/app/bsky/richtext/facet.ts +5 -5
- package/src/client/types/app/bsky/unspecced/defs.ts +4 -4
- package/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts +1 -1
- package/src/client/types/app/bsky/video/defs.ts +1 -1
- package/src/client/types/chat/bsky/actor/declaration.ts +1 -1
- package/src/client/types/chat/bsky/actor/defs.ts +1 -1
- package/src/client/types/chat/bsky/convo/defs.ts +10 -10
- package/src/client/types/chat/bsky/convo/sendMessageBatch.ts +1 -1
- package/src/client/types/chat/bsky/moderation/getActorMetadata.ts +1 -1
- package/src/client/types/com/atproto/admin/defs.ts +5 -5
- package/src/client/types/com/atproto/label/defs.ts +5 -5
- package/src/client/types/com/atproto/label/subscribeLabels.ts +2 -2
- package/src/client/types/com/atproto/repo/applyWrites.ts +6 -6
- package/src/client/types/com/atproto/repo/defs.ts +1 -1
- package/src/client/types/com/atproto/repo/listMissingBlobs.ts +1 -1
- package/src/client/types/com/atproto/repo/listRecords.ts +1 -1
- package/src/client/types/com/atproto/repo/strongRef.ts +1 -1
- package/src/client/types/com/atproto/server/createAppPassword.ts +1 -1
- package/src/client/types/com/atproto/server/createInviteCodes.ts +1 -1
- package/src/client/types/com/atproto/server/createSession.ts +2 -0
- package/src/client/types/com/atproto/server/defs.ts +2 -2
- package/src/client/types/com/atproto/server/describeServer.ts +2 -2
- package/src/client/types/com/atproto/server/listAppPasswords.ts +1 -1
- package/src/client/types/com/atproto/sync/listRepos.ts +1 -1
- package/src/client/types/com/atproto/sync/subscribeRepos.ts +8 -8
- package/src/client/types/tools/ozone/communication/defs.ts +1 -1
- package/src/client/types/tools/ozone/moderation/defs.ts +40 -34
- package/src/client/types/tools/ozone/moderation/queryEvents.ts +1 -0
- package/src/client/types/tools/ozone/moderation/queryStatuses.ts +6 -0
- package/src/client/types/tools/ozone/server/getConfig.ts +2 -2
- package/src/client/types/tools/ozone/set/defs.ts +2 -2
- package/src/client/types/tools/ozone/setting/defs.ts +1 -1
- package/src/client/types/tools/ozone/signature/defs.ts +1 -1
- package/src/client/types/tools/ozone/signature/findRelatedAccounts.ts +1 -1
- package/src/client/types/tools/ozone/team/defs.ts +1 -1
- package/src/index.ts +1 -0
- package/src/moderation/const/labels.ts +24 -0
- package/src/moderation/decision.ts +1 -3
- package/src/moderation/subjects/post.ts +40 -22
- package/src/moderation/types.ts +2 -0
- package/tests/rich-text-detection.test.ts +2 -6
|
@@ -42,7 +42,7 @@ export function validateListViewBasic<V>(v: V) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export function isValidListViewBasic<V>(v: V) {
|
|
45
|
-
return isValid<ListViewBasic>(v, id, hashListViewBasic)
|
|
45
|
+
return isValid<ListViewBasic & V>(v, id, hashListViewBasic)
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export interface ListView {
|
|
@@ -72,7 +72,7 @@ export function validateListView<V>(v: V) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
export function isValidListView<V>(v: V) {
|
|
75
|
-
return isValid<ListView>(v, id, hashListView)
|
|
75
|
+
return isValid<ListView & V>(v, id, hashListView)
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export interface ListItemView {
|
|
@@ -92,7 +92,7 @@ export function validateListItemView<V>(v: V) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
export function isValidListItemView<V>(v: V) {
|
|
95
|
-
return isValid<ListItemView>(v, id, hashListItemView)
|
|
95
|
+
return isValid<ListItemView & V>(v, id, hashListItemView)
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
export interface StarterPackView {
|
|
@@ -121,7 +121,7 @@ export function validateStarterPackView<V>(v: V) {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export function isValidStarterPackView<V>(v: V) {
|
|
124
|
-
return isValid<StarterPackView>(v, id, hashStarterPackView)
|
|
124
|
+
return isValid<StarterPackView & V>(v, id, hashStarterPackView)
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
export interface StarterPackViewBasic {
|
|
@@ -148,7 +148,7 @@ export function validateStarterPackViewBasic<V>(v: V) {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
export function isValidStarterPackViewBasic<V>(v: V) {
|
|
151
|
-
return isValid<StarterPackViewBasic>(v, id, hashStarterPackViewBasic)
|
|
151
|
+
return isValid<StarterPackViewBasic & V>(v, id, hashStarterPackViewBasic)
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
export type ListPurpose =
|
|
@@ -181,7 +181,7 @@ export function validateListViewerState<V>(v: V) {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
export function isValidListViewerState<V>(v: V) {
|
|
184
|
-
return isValid<ListViewerState>(v, id, hashListViewerState)
|
|
184
|
+
return isValid<ListViewerState & V>(v, id, hashListViewerState)
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
/** indicates that a handle or DID could not be resolved */
|
|
@@ -202,7 +202,7 @@ export function validateNotFoundActor<V>(v: V) {
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
export function isValidNotFoundActor<V>(v: V) {
|
|
205
|
-
return isValid<NotFoundActor>(v, id, hashNotFoundActor)
|
|
205
|
+
return isValid<NotFoundActor & V>(v, id, hashNotFoundActor)
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) */
|
|
@@ -226,5 +226,5 @@ export function validateRelationship<V>(v: V) {
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
export function isValidRelationship<V>(v: V) {
|
|
229
|
-
return isValid<Relationship>(v, id, hashRelationship)
|
|
229
|
+
return isValid<Relationship & V>(v, id, hashRelationship)
|
|
230
230
|
}
|
|
@@ -39,7 +39,7 @@ export function validateRecord<V>(v: V) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export function isValidRecord<V>(v: V) {
|
|
42
|
-
return isValid<Record>(v, id, hashRecord, true)
|
|
42
|
+
return isValid<Record & V>(v, id, hashRecord, true)
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export interface FeedItem {
|
|
@@ -58,5 +58,5 @@ export function validateFeedItem<V>(v: V) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export function isValidFeedItem<V>(v: V) {
|
|
61
|
-
return isValid<FeedItem>(v, id, hashFeedItem)
|
|
61
|
+
return isValid<FeedItem & V>(v, id, hashFeedItem)
|
|
62
62
|
}
|
|
@@ -38,7 +38,7 @@ export function validateLabelerView<V>(v: V) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export function isValidLabelerView<V>(v: V) {
|
|
41
|
-
return isValid<LabelerView>(v, id, hashLabelerView)
|
|
41
|
+
return isValid<LabelerView & V>(v, id, hashLabelerView)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export interface LabelerViewDetailed {
|
|
@@ -64,7 +64,7 @@ export function validateLabelerViewDetailed<V>(v: V) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
export function isValidLabelerViewDetailed<V>(v: V) {
|
|
67
|
-
return isValid<LabelerViewDetailed>(v, id, hashLabelerViewDetailed)
|
|
67
|
+
return isValid<LabelerViewDetailed & V>(v, id, hashLabelerViewDetailed)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export interface LabelerViewerState {
|
|
@@ -83,7 +83,7 @@ export function validateLabelerViewerState<V>(v: V) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export function isValidLabelerViewerState<V>(v: V) {
|
|
86
|
-
return isValid<LabelerViewerState>(v, id, hashLabelerViewerState)
|
|
86
|
+
return isValid<LabelerViewerState & V>(v, id, hashLabelerViewerState)
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
export interface LabelerPolicies {
|
|
@@ -105,5 +105,5 @@ export function validateLabelerPolicies<V>(v: V) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
export function isValidLabelerPolicies<V>(v: V) {
|
|
108
|
-
return isValid<LabelerPolicies>(v, id, hashLabelerPolicies)
|
|
108
|
+
return isValid<LabelerPolicies & V>(v, id, hashLabelerPolicies)
|
|
109
109
|
}
|
|
@@ -32,7 +32,7 @@ export function validateMain<V>(v: V) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export function isValidMain<V>(v: V) {
|
|
35
|
-
return isValid<Main>(v, id, hashMain)
|
|
35
|
+
return isValid<Main & V>(v, id, hashMain)
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/** Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. */
|
|
@@ -52,7 +52,7 @@ export function validateMention<V>(v: V) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export function isValidMention<V>(v: V) {
|
|
55
|
-
return isValid<Mention>(v, id, hashMention)
|
|
55
|
+
return isValid<Mention & V>(v, id, hashMention)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. */
|
|
@@ -72,7 +72,7 @@ export function validateLink<V>(v: V) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
export function isValidLink<V>(v: V) {
|
|
75
|
-
return isValid<Link>(v, id, hashLink)
|
|
75
|
+
return isValid<Link & V>(v, id, hashLink)
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/** Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). */
|
|
@@ -92,7 +92,7 @@ export function validateTag<V>(v: V) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
export function isValidTag<V>(v: V) {
|
|
95
|
-
return isValid<Tag>(v, id, hashTag)
|
|
95
|
+
return isValid<Tag & V>(v, id, hashTag)
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/** Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. */
|
|
@@ -113,5 +113,5 @@ export function validateByteSlice<V>(v: V) {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
export function isValidByteSlice<V>(v: V) {
|
|
116
|
-
return isValid<ByteSlice>(v, id, hashByteSlice)
|
|
116
|
+
return isValid<ByteSlice & V>(v, id, hashByteSlice)
|
|
117
117
|
}
|
|
@@ -30,7 +30,7 @@ export function validateSkeletonSearchPost<V>(v: V) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export function isValidSkeletonSearchPost<V>(v: V) {
|
|
33
|
-
return isValid<SkeletonSearchPost>(v, id, hashSkeletonSearchPost)
|
|
33
|
+
return isValid<SkeletonSearchPost & V>(v, id, hashSkeletonSearchPost)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export interface SkeletonSearchActor {
|
|
@@ -49,7 +49,7 @@ export function validateSkeletonSearchActor<V>(v: V) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export function isValidSkeletonSearchActor<V>(v: V) {
|
|
52
|
-
return isValid<SkeletonSearchActor>(v, id, hashSkeletonSearchActor)
|
|
52
|
+
return isValid<SkeletonSearchActor & V>(v, id, hashSkeletonSearchActor)
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export interface SkeletonSearchStarterPack {
|
|
@@ -72,7 +72,7 @@ export function validateSkeletonSearchStarterPack<V>(v: V) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
export function isValidSkeletonSearchStarterPack<V>(v: V) {
|
|
75
|
-
return isValid<SkeletonSearchStarterPack>(
|
|
75
|
+
return isValid<SkeletonSearchStarterPack & V>(
|
|
76
76
|
v,
|
|
77
77
|
id,
|
|
78
78
|
hashSkeletonSearchStarterPack,
|
|
@@ -98,5 +98,5 @@ export function validateTrendingTopic<V>(v: V) {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
export function isValidTrendingTopic<V>(v: V) {
|
|
101
|
-
return isValid<TrendingTopic>(v, id, hashTrendingTopic)
|
|
101
|
+
return isValid<TrendingTopic & V>(v, id, hashTrendingTopic)
|
|
102
102
|
}
|
|
@@ -35,7 +35,7 @@ export function validateMessageRef<V>(v: V) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export function isValidMessageRef<V>(v: V) {
|
|
38
|
-
return isValid<MessageRef>(v, id, hashMessageRef)
|
|
38
|
+
return isValid<MessageRef & V>(v, id, hashMessageRef)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export interface MessageInput {
|
|
@@ -57,7 +57,7 @@ export function validateMessageInput<V>(v: V) {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
export function isValidMessageInput<V>(v: V) {
|
|
60
|
-
return isValid<MessageInput>(v, id, hashMessageInput)
|
|
60
|
+
return isValid<MessageInput & V>(v, id, hashMessageInput)
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export interface MessageView {
|
|
@@ -83,7 +83,7 @@ export function validateMessageView<V>(v: V) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export function isValidMessageView<V>(v: V) {
|
|
86
|
-
return isValid<MessageView>(v, id, hashMessageView)
|
|
86
|
+
return isValid<MessageView & V>(v, id, hashMessageView)
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
export interface DeletedMessageView {
|
|
@@ -105,7 +105,7 @@ export function validateDeletedMessageView<V>(v: V) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
export function isValidDeletedMessageView<V>(v: V) {
|
|
108
|
-
return isValid<DeletedMessageView>(v, id, hashDeletedMessageView)
|
|
108
|
+
return isValid<DeletedMessageView & V>(v, id, hashDeletedMessageView)
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
export interface MessageViewSender {
|
|
@@ -124,7 +124,7 @@ export function validateMessageViewSender<V>(v: V) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
export function isValidMessageViewSender<V>(v: V) {
|
|
127
|
-
return isValid<MessageViewSender>(v, id, hashMessageViewSender)
|
|
127
|
+
return isValid<MessageViewSender & V>(v, id, hashMessageViewSender)
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
export interface ConvoView {
|
|
@@ -152,7 +152,7 @@ export function validateConvoView<V>(v: V) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
export function isValidConvoView<V>(v: V) {
|
|
155
|
-
return isValid<ConvoView>(v, id, hashConvoView)
|
|
155
|
+
return isValid<ConvoView & V>(v, id, hashConvoView)
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
export interface LogBeginConvo {
|
|
@@ -172,7 +172,7 @@ export function validateLogBeginConvo<V>(v: V) {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
export function isValidLogBeginConvo<V>(v: V) {
|
|
175
|
-
return isValid<LogBeginConvo>(v, id, hashLogBeginConvo)
|
|
175
|
+
return isValid<LogBeginConvo & V>(v, id, hashLogBeginConvo)
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
export interface LogLeaveConvo {
|
|
@@ -192,7 +192,7 @@ export function validateLogLeaveConvo<V>(v: V) {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
export function isValidLogLeaveConvo<V>(v: V) {
|
|
195
|
-
return isValid<LogLeaveConvo>(v, id, hashLogLeaveConvo)
|
|
195
|
+
return isValid<LogLeaveConvo & V>(v, id, hashLogLeaveConvo)
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
export interface LogCreateMessage {
|
|
@@ -213,7 +213,7 @@ export function validateLogCreateMessage<V>(v: V) {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
export function isValidLogCreateMessage<V>(v: V) {
|
|
216
|
-
return isValid<LogCreateMessage>(v, id, hashLogCreateMessage)
|
|
216
|
+
return isValid<LogCreateMessage & V>(v, id, hashLogCreateMessage)
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
export interface LogDeleteMessage {
|
|
@@ -234,5 +234,5 @@ export function validateLogDeleteMessage<V>(v: V) {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
export function isValidLogDeleteMessage<V>(v: V) {
|
|
237
|
-
return isValid<LogDeleteMessage>(v, id, hashLogDeleteMessage)
|
|
237
|
+
return isValid<LogDeleteMessage & V>(v, id, hashLogDeleteMessage)
|
|
238
238
|
}
|
|
@@ -32,7 +32,7 @@ export function validateStatusAttr<V>(v: V) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export function isValidStatusAttr<V>(v: V) {
|
|
35
|
-
return isValid<StatusAttr>(v, id, hashStatusAttr)
|
|
35
|
+
return isValid<StatusAttr & V>(v, id, hashStatusAttr)
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export interface AccountView {
|
|
@@ -62,7 +62,7 @@ export function validateAccountView<V>(v: V) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export function isValidAccountView<V>(v: V) {
|
|
65
|
-
return isValid<AccountView>(v, id, hashAccountView)
|
|
65
|
+
return isValid<AccountView & V>(v, id, hashAccountView)
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export interface RepoRef {
|
|
@@ -81,7 +81,7 @@ export function validateRepoRef<V>(v: V) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
export function isValidRepoRef<V>(v: V) {
|
|
84
|
-
return isValid<RepoRef>(v, id, hashRepoRef)
|
|
84
|
+
return isValid<RepoRef & V>(v, id, hashRepoRef)
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
export interface RepoBlobRef {
|
|
@@ -102,7 +102,7 @@ export function validateRepoBlobRef<V>(v: V) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
export function isValidRepoBlobRef<V>(v: V) {
|
|
105
|
-
return isValid<RepoBlobRef>(v, id, hashRepoBlobRef)
|
|
105
|
+
return isValid<RepoBlobRef & V>(v, id, hashRepoBlobRef)
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
export interface ThreatSignature {
|
|
@@ -122,5 +122,5 @@ export function validateThreatSignature<V>(v: V) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
export function isValidThreatSignature<V>(v: V) {
|
|
125
|
-
return isValid<ThreatSignature>(v, id, hashThreatSignature)
|
|
125
|
+
return isValid<ThreatSignature & V>(v, id, hashThreatSignature)
|
|
126
126
|
}
|
|
@@ -48,7 +48,7 @@ export function validateLabel<V>(v: V) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export function isValidLabel<V>(v: V) {
|
|
51
|
-
return isValid<Label>(v, id, hashLabel)
|
|
51
|
+
return isValid<Label & V>(v, id, hashLabel)
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/** Metadata tags on an atproto record, published by the author within the record. */
|
|
@@ -68,7 +68,7 @@ export function validateSelfLabels<V>(v: V) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export function isValidSelfLabels<V>(v: V) {
|
|
71
|
-
return isValid<SelfLabels>(v, id, hashSelfLabels)
|
|
71
|
+
return isValid<SelfLabels & V>(v, id, hashSelfLabels)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. */
|
|
@@ -89,7 +89,7 @@ export function validateSelfLabel<V>(v: V) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
export function isValidSelfLabel<V>(v: V) {
|
|
92
|
-
return isValid<SelfLabel>(v, id, hashSelfLabel)
|
|
92
|
+
return isValid<SelfLabel & V>(v, id, hashSelfLabel)
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/** Declares a label value and its expected interpretations and behaviors. */
|
|
@@ -119,7 +119,7 @@ export function validateLabelValueDefinition<V>(v: V) {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
export function isValidLabelValueDefinition<V>(v: V) {
|
|
122
|
-
return isValid<LabelValueDefinition>(v, id, hashLabelValueDefinition)
|
|
122
|
+
return isValid<LabelValueDefinition & V>(v, id, hashLabelValueDefinition)
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/** Strings which describe the label in the UI, localized into a specific language. */
|
|
@@ -148,7 +148,7 @@ export function validateLabelValueDefinitionStrings<V>(v: V) {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
export function isValidLabelValueDefinitionStrings<V>(v: V) {
|
|
151
|
-
return isValid<LabelValueDefinitionStrings>(
|
|
151
|
+
return isValid<LabelValueDefinitionStrings & V>(
|
|
152
152
|
v,
|
|
153
153
|
id,
|
|
154
154
|
hashLabelValueDefinitionStrings,
|
|
@@ -33,7 +33,7 @@ export function validateLabels<V>(v: V) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export function isValidLabels<V>(v: V) {
|
|
36
|
-
return isValid<Labels>(v, id, hashLabels)
|
|
36
|
+
return isValid<Labels & V>(v, id, hashLabels)
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export interface Info {
|
|
@@ -53,5 +53,5 @@ export function validateInfo<V>(v: V) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export function isValidInfo<V>(v: V) {
|
|
56
|
-
return isValid<Info>(v, id, hashInfo)
|
|
56
|
+
return isValid<Info & V>(v, id, hashInfo)
|
|
57
57
|
}
|
|
@@ -83,7 +83,7 @@ export function validateCreate<V>(v: V) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export function isValidCreate<V>(v: V) {
|
|
86
|
-
return isValid<Create>(v, id, hashCreate)
|
|
86
|
+
return isValid<Create & V>(v, id, hashCreate)
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/** Operation which updates an existing record. */
|
|
@@ -105,7 +105,7 @@ export function validateUpdate<V>(v: V) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
export function isValidUpdate<V>(v: V) {
|
|
108
|
-
return isValid<Update>(v, id, hashUpdate)
|
|
108
|
+
return isValid<Update & V>(v, id, hashUpdate)
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/** Operation which deletes an existing record. */
|
|
@@ -126,7 +126,7 @@ export function validateDelete<V>(v: V) {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
export function isValidDelete<V>(v: V) {
|
|
129
|
-
return isValid<Delete>(v, id, hashDelete)
|
|
129
|
+
return isValid<Delete & V>(v, id, hashDelete)
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
export interface CreateResult {
|
|
@@ -147,7 +147,7 @@ export function validateCreateResult<V>(v: V) {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
export function isValidCreateResult<V>(v: V) {
|
|
150
|
-
return isValid<CreateResult>(v, id, hashCreateResult)
|
|
150
|
+
return isValid<CreateResult & V>(v, id, hashCreateResult)
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
export interface UpdateResult {
|
|
@@ -168,7 +168,7 @@ export function validateUpdateResult<V>(v: V) {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
export function isValidUpdateResult<V>(v: V) {
|
|
171
|
-
return isValid<UpdateResult>(v, id, hashUpdateResult)
|
|
171
|
+
return isValid<UpdateResult & V>(v, id, hashUpdateResult)
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
export interface DeleteResult {
|
|
@@ -186,5 +186,5 @@ export function validateDeleteResult<V>(v: V) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
export function isValidDeleteResult<V>(v: V) {
|
|
189
|
-
return isValid<DeleteResult>(v, id, hashDeleteResult)
|
|
189
|
+
return isValid<DeleteResult & V>(v, id, hashDeleteResult)
|
|
190
190
|
}
|
|
@@ -22,6 +22,8 @@ export interface InputSchema {
|
|
|
22
22
|
identifier: string
|
|
23
23
|
password: string
|
|
24
24
|
authFactorToken?: string
|
|
25
|
+
/** When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned */
|
|
26
|
+
allowTakendown?: boolean
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
export interface OutputSchema {
|
|
@@ -36,7 +36,7 @@ export function validateInviteCode<V>(v: V) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export function isValidInviteCode<V>(v: V) {
|
|
39
|
-
return isValid<InviteCode>(v, id, hashInviteCode)
|
|
39
|
+
return isValid<InviteCode & V>(v, id, hashInviteCode)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export interface InviteCodeUse {
|
|
@@ -56,5 +56,5 @@ export function validateInviteCodeUse<V>(v: V) {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
export function isValidInviteCodeUse<V>(v: V) {
|
|
59
|
-
return isValid<InviteCodeUse>(v, id, hashInviteCodeUse)
|
|
59
|
+
return isValid<InviteCodeUse & V>(v, id, hashInviteCodeUse)
|
|
60
60
|
}
|
|
@@ -63,7 +63,7 @@ export function validateLinks<V>(v: V) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export function isValidLinks<V>(v: V) {
|
|
66
|
-
return isValid<Links>(v, id, hashLinks)
|
|
66
|
+
return isValid<Links & V>(v, id, hashLinks)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export interface Contact {
|
|
@@ -82,5 +82,5 @@ export function validateContact<V>(v: V) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export function isValidContact<V>(v: V) {
|
|
85
|
-
return isValid<Contact>(v, id, hashContact)
|
|
85
|
+
return isValid<Contact & V>(v, id, hashContact)
|
|
86
86
|
}
|