@atproto/ozone 0.1.161 → 0.1.162

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE.txt +1 -1
  3. package/dist/daemon/materialized-view-refresher.d.ts.map +1 -1
  4. package/dist/daemon/materialized-view-refresher.js +8 -1
  5. package/dist/daemon/materialized-view-refresher.js.map +1 -1
  6. package/dist/lexicon/index.d.ts +13 -0
  7. package/dist/lexicon/index.d.ts.map +1 -1
  8. package/dist/lexicon/index.js +37 -1
  9. package/dist/lexicon/index.js.map +1 -1
  10. package/dist/lexicon/lexicons.d.ts +894 -12
  11. package/dist/lexicon/lexicons.d.ts.map +1 -1
  12. package/dist/lexicon/lexicons.js +464 -5
  13. package/dist/lexicon/lexicons.js.map +1 -1
  14. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +23 -1
  15. package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
  16. package/dist/lexicon/types/app/bsky/actor/defs.js +18 -0
  17. package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
  18. package/dist/lexicon/types/app/bsky/ageassurance/defs.d.ts +2 -0
  19. package/dist/lexicon/types/app/bsky/ageassurance/defs.d.ts.map +1 -1
  20. package/dist/lexicon/types/app/bsky/ageassurance/defs.js.map +1 -1
  21. package/dist/lexicon/types/app/bsky/draft/createDraft.d.ts +27 -0
  22. package/dist/lexicon/types/app/bsky/draft/createDraft.d.ts.map +1 -0
  23. package/dist/lexicon/types/app/bsky/draft/createDraft.js +7 -0
  24. package/dist/lexicon/types/app/bsky/draft/createDraft.js.map +1 -0
  25. package/dist/lexicon/types/app/bsky/draft/defs.d.ts +106 -0
  26. package/dist/lexicon/types/app/bsky/draft/defs.d.ts.map +1 -0
  27. package/dist/lexicon/types/app/bsky/draft/defs.js +97 -0
  28. package/dist/lexicon/types/app/bsky/draft/defs.js.map +1 -0
  29. package/dist/lexicon/types/app/bsky/draft/deleteDraft.d.ts +14 -0
  30. package/dist/lexicon/types/app/bsky/draft/deleteDraft.d.ts.map +1 -0
  31. package/dist/lexicon/types/app/bsky/draft/deleteDraft.js +7 -0
  32. package/dist/lexicon/types/app/bsky/draft/deleteDraft.js.map +1 -0
  33. package/dist/lexicon/types/app/bsky/draft/getDrafts.d.ts +24 -0
  34. package/dist/lexicon/types/app/bsky/draft/getDrafts.d.ts.map +1 -0
  35. package/dist/lexicon/types/app/bsky/draft/getDrafts.js +7 -0
  36. package/dist/lexicon/types/app/bsky/draft/getDrafts.js.map +1 -0
  37. package/dist/lexicon/types/app/bsky/draft/updateDraft.d.ts +15 -0
  38. package/dist/lexicon/types/app/bsky/draft/updateDraft.d.ts.map +1 -0
  39. package/dist/lexicon/types/app/bsky/draft/updateDraft.js +7 -0
  40. package/dist/lexicon/types/app/bsky/draft/updateDraft.js.map +1 -0
  41. package/dist/lexicon/types/app/bsky/embed/video.d.ts +4 -0
  42. package/dist/lexicon/types/app/bsky/embed/video.d.ts.map +1 -1
  43. package/dist/lexicon/types/app/bsky/embed/video.js.map +1 -1
  44. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.d.ts +2 -0
  45. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.d.ts.map +1 -1
  46. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.js.map +1 -1
  47. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.d.ts +2 -0
  48. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.d.ts.map +1 -1
  49. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.js.map +1 -1
  50. package/dist/lexicon/types/com/atproto/server/deleteSession.d.ts +1 -0
  51. package/dist/lexicon/types/com/atproto/server/deleteSession.d.ts.map +1 -1
  52. package/dist/lexicon/types/com/atproto/server/deleteSession.js.map +1 -1
  53. package/dist/lexicon/types/com/atproto/server/getSession.d.ts +3 -3
  54. package/dist/lexicon/types/com/atproto/server/getSession.d.ts.map +1 -1
  55. package/dist/lexicon/types/com/atproto/server/getSession.js.map +1 -1
  56. package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +4 -1
  57. package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts.map +1 -1
  58. package/dist/lexicon/types/com/atproto/server/refreshSession.js.map +1 -1
  59. package/dist/mod-service/util.d.ts.map +1 -1
  60. package/dist/mod-service/util.js +3 -1
  61. package/dist/mod-service/util.js.map +1 -1
  62. package/package.json +7 -7
  63. package/src/daemon/materialized-view-refresher.ts +9 -3
  64. package/src/lexicon/index.ts +62 -0
  65. package/src/lexicon/lexicons.ts +479 -5
  66. package/src/lexicon/types/app/bsky/actor/defs.ts +41 -0
  67. package/src/lexicon/types/app/bsky/ageassurance/defs.ts +2 -0
  68. package/src/lexicon/types/app/bsky/draft/createDraft.ts +46 -0
  69. package/src/lexicon/types/app/bsky/draft/defs.ts +208 -0
  70. package/src/lexicon/types/app/bsky/draft/deleteDraft.ts +33 -0
  71. package/src/lexicon/types/app/bsky/draft/getDrafts.ts +42 -0
  72. package/src/lexicon/types/app/bsky/draft/updateDraft.ts +34 -0
  73. package/src/lexicon/types/app/bsky/embed/video.ts +4 -0
  74. package/src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts +2 -0
  75. package/src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts +2 -0
  76. package/src/lexicon/types/com/atproto/server/deleteSession.ts +1 -0
  77. package/src/lexicon/types/com/atproto/server/getSession.ts +1 -1
  78. package/src/lexicon/types/com/atproto/server/refreshSession.ts +4 -1
  79. package/src/mod-service/util.ts +3 -2
  80. package/tests/query-labels.test.ts +0 -2
  81. package/tsconfig.build.tsbuildinfo +1 -1
  82. package/tsconfig.tests.tsbuildinfo +0 -1
@@ -121,6 +121,7 @@ export interface ProfileAssociated {
121
121
  labeler?: boolean
122
122
  chat?: ProfileAssociatedChat
123
123
  activitySubscription?: ProfileAssociatedActivitySubscription
124
+ germ?: ProfileAssociatedGerm
124
125
  }
125
126
 
126
127
  const hashProfileAssociated = 'profileAssociated'
@@ -148,6 +149,22 @@ export function validateProfileAssociatedChat<V>(v: V) {
148
149
  return validate<ProfileAssociatedChat & V>(v, id, hashProfileAssociatedChat)
149
150
  }
150
151
 
152
+ export interface ProfileAssociatedGerm {
153
+ $type?: 'app.bsky.actor.defs#profileAssociatedGerm'
154
+ messageMeUrl: string
155
+ showButtonTo: 'usersIFollow' | 'everyone' | (string & {})
156
+ }
157
+
158
+ const hashProfileAssociatedGerm = 'profileAssociatedGerm'
159
+
160
+ export function isProfileAssociatedGerm<V>(v: V) {
161
+ return is$typed(v, id, hashProfileAssociatedGerm)
162
+ }
163
+
164
+ export function validateProfileAssociatedGerm<V>(v: V) {
165
+ return validate<ProfileAssociatedGerm & V>(v, id, hashProfileAssociatedGerm)
166
+ }
167
+
151
168
  export interface ProfileAssociatedActivitySubscription {
152
169
  $type?: 'app.bsky.actor.defs#profileAssociatedActivitySubscription'
153
170
  allowSubscriptions: 'followers' | 'mutuals' | 'none' | (string & {})
@@ -269,6 +286,7 @@ export type Preferences = (
269
286
  | $Typed<LabelersPref>
270
287
  | $Typed<PostInteractionSettingsPref>
271
288
  | $Typed<VerificationPrefs>
289
+ | $Typed<LiveEventPreferences>
272
290
  | { $type: string }
273
291
  )[]
274
292
 
@@ -618,6 +636,25 @@ export function validateVerificationPrefs<V>(v: V) {
618
636
  return validate<VerificationPrefs & V>(v, id, hashVerificationPrefs)
619
637
  }
620
638
 
639
+ /** Preferences for live events. */
640
+ export interface LiveEventPreferences {
641
+ $type?: 'app.bsky.actor.defs#liveEventPreferences'
642
+ /** A list of feed IDs that the user has hidden from live events. */
643
+ hiddenFeedIds?: string[]
644
+ /** Whether to hide all feeds from live events. */
645
+ hideAllFeeds: boolean
646
+ }
647
+
648
+ const hashLiveEventPreferences = 'liveEventPreferences'
649
+
650
+ export function isLiveEventPreferences<V>(v: V) {
651
+ return is$typed(v, id, hashLiveEventPreferences)
652
+ }
653
+
654
+ export function validateLiveEventPreferences<V>(v: V) {
655
+ return validate<LiveEventPreferences & V>(v, id, hashLiveEventPreferences)
656
+ }
657
+
621
658
  /** Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. */
622
659
  export interface PostInteractionSettingsPref {
623
660
  $type?: 'app.bsky.actor.defs#postInteractionSettingsPref'
@@ -652,6 +689,8 @@ export function validatePostInteractionSettingsPref<V>(v: V) {
652
689
 
653
690
  export interface StatusView {
654
691
  $type?: 'app.bsky.actor.defs#statusView'
692
+ uri?: string
693
+ cid?: string
655
694
  /** The status for the account. */
656
695
  status: 'app.bsky.actor.status#live' | (string & {})
657
696
  record: { [_ in string]: unknown }
@@ -660,6 +699,8 @@ export interface StatusView {
660
699
  expiresAt?: string
661
700
  /** True if the status is not expired, false if it is expired. Only present if expiration was set. */
662
701
  isActive?: boolean
702
+ /** True if the user's go-live access has been disabled by a moderator, false otherwise. */
703
+ isDisabled?: boolean
663
704
  }
664
705
 
665
706
  const hashStatusView = 'statusView'
@@ -83,6 +83,8 @@ export interface ConfigRegion {
83
83
  countryCode: string
84
84
  /** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. */
85
85
  regionCode?: string
86
+ /** The minimum age (as a whole integer) required to use Bluesky in this region. */
87
+ minAccessAge: number
86
88
  /** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. */
87
89
  rules: (
88
90
  | $Typed<ConfigRegionRuleDefault>
@@ -0,0 +1,46 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as AppBskyDraftDefs from './defs.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'app.bsky.draft.createDraft'
17
+
18
+ export type QueryParams = {}
19
+
20
+ export interface InputSchema {
21
+ draft: AppBskyDraftDefs.Draft
22
+ }
23
+
24
+ export interface OutputSchema {
25
+ /** The ID of the created draft. */
26
+ id: string
27
+ }
28
+
29
+ export interface HandlerInput {
30
+ encoding: 'application/json'
31
+ body: InputSchema
32
+ }
33
+
34
+ export interface HandlerSuccess {
35
+ encoding: 'application/json'
36
+ body: OutputSchema
37
+ headers?: { [key: string]: string }
38
+ }
39
+
40
+ export interface HandlerError {
41
+ status: number
42
+ message?: string
43
+ error?: 'DraftLimitReached'
44
+ }
45
+
46
+ export type HandlerOutput = HandlerError | HandlerSuccess
@@ -0,0 +1,208 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as AppBskyFeedPostgate from '../feed/postgate.js'
13
+ import type * as AppBskyFeedThreadgate from '../feed/threadgate.js'
14
+ import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'
15
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'
16
+
17
+ const is$typed = _is$typed,
18
+ validate = _validate
19
+ const id = 'app.bsky.draft.defs'
20
+
21
+ /** A draft with an identifier, used to store drafts in private storage (stash). */
22
+ export interface DraftWithId {
23
+ $type?: 'app.bsky.draft.defs#draftWithId'
24
+ /** A TID to be used as a draft identifier. */
25
+ id: string
26
+ draft: Draft
27
+ }
28
+
29
+ const hashDraftWithId = 'draftWithId'
30
+
31
+ export function isDraftWithId<V>(v: V) {
32
+ return is$typed(v, id, hashDraftWithId)
33
+ }
34
+
35
+ export function validateDraftWithId<V>(v: V) {
36
+ return validate<DraftWithId & V>(v, id, hashDraftWithId)
37
+ }
38
+
39
+ /** A draft containing an array of draft posts. */
40
+ export interface Draft {
41
+ $type?: 'app.bsky.draft.defs#draft'
42
+ /** Array of draft posts that compose this draft. */
43
+ posts: DraftPost[]
44
+ /** Indicates human language of posts primary text content. */
45
+ langs?: string[]
46
+ /** Embedding rules for the postgates to be created when this draft is published. */
47
+ postgateEmbeddingRules?: (
48
+ | $Typed<AppBskyFeedPostgate.DisableRule>
49
+ | { $type: string }
50
+ )[]
51
+ /** Allow-rules for the threadgate to be created when this draft is published. */
52
+ threadgateAllow?: (
53
+ | $Typed<AppBskyFeedThreadgate.MentionRule>
54
+ | $Typed<AppBskyFeedThreadgate.FollowerRule>
55
+ | $Typed<AppBskyFeedThreadgate.FollowingRule>
56
+ | $Typed<AppBskyFeedThreadgate.ListRule>
57
+ | { $type: string }
58
+ )[]
59
+ }
60
+
61
+ const hashDraft = 'draft'
62
+
63
+ export function isDraft<V>(v: V) {
64
+ return is$typed(v, id, hashDraft)
65
+ }
66
+
67
+ export function validateDraft<V>(v: V) {
68
+ return validate<Draft & V>(v, id, hashDraft)
69
+ }
70
+
71
+ /** One of the posts that compose a draft. */
72
+ export interface DraftPost {
73
+ $type?: 'app.bsky.draft.defs#draftPost'
74
+ /** The primary post content. */
75
+ text: string
76
+ labels?: $Typed<ComAtprotoLabelDefs.SelfLabels> | { $type: string }
77
+ embedImages?: DraftEmbedImage[]
78
+ embedVideos?: DraftEmbedVideo[]
79
+ embedExternals?: DraftEmbedExternal[]
80
+ embedRecords?: DraftEmbedRecord[]
81
+ }
82
+
83
+ const hashDraftPost = 'draftPost'
84
+
85
+ export function isDraftPost<V>(v: V) {
86
+ return is$typed(v, id, hashDraftPost)
87
+ }
88
+
89
+ export function validateDraftPost<V>(v: V) {
90
+ return validate<DraftPost & V>(v, id, hashDraftPost)
91
+ }
92
+
93
+ /** View to present drafts data to users. */
94
+ export interface DraftView {
95
+ $type?: 'app.bsky.draft.defs#draftView'
96
+ /** A TID to be used as a draft identifier. */
97
+ id: string
98
+ draft: Draft
99
+ /** The time the draft was created. */
100
+ createdAt: string
101
+ /** The time the draft was last updated. */
102
+ updatedAt: string
103
+ }
104
+
105
+ const hashDraftView = 'draftView'
106
+
107
+ export function isDraftView<V>(v: V) {
108
+ return is$typed(v, id, hashDraftView)
109
+ }
110
+
111
+ export function validateDraftView<V>(v: V) {
112
+ return validate<DraftView & V>(v, id, hashDraftView)
113
+ }
114
+
115
+ export interface DraftEmbedLocalRef {
116
+ $type?: 'app.bsky.draft.defs#draftEmbedLocalRef'
117
+ /** Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts. */
118
+ path: string
119
+ }
120
+
121
+ const hashDraftEmbedLocalRef = 'draftEmbedLocalRef'
122
+
123
+ export function isDraftEmbedLocalRef<V>(v: V) {
124
+ return is$typed(v, id, hashDraftEmbedLocalRef)
125
+ }
126
+
127
+ export function validateDraftEmbedLocalRef<V>(v: V) {
128
+ return validate<DraftEmbedLocalRef & V>(v, id, hashDraftEmbedLocalRef)
129
+ }
130
+
131
+ export interface DraftEmbedCaption {
132
+ $type?: 'app.bsky.draft.defs#draftEmbedCaption'
133
+ lang: string
134
+ content: string
135
+ }
136
+
137
+ const hashDraftEmbedCaption = 'draftEmbedCaption'
138
+
139
+ export function isDraftEmbedCaption<V>(v: V) {
140
+ return is$typed(v, id, hashDraftEmbedCaption)
141
+ }
142
+
143
+ export function validateDraftEmbedCaption<V>(v: V) {
144
+ return validate<DraftEmbedCaption & V>(v, id, hashDraftEmbedCaption)
145
+ }
146
+
147
+ export interface DraftEmbedImage {
148
+ $type?: 'app.bsky.draft.defs#draftEmbedImage'
149
+ localRef: DraftEmbedLocalRef
150
+ alt?: string
151
+ }
152
+
153
+ const hashDraftEmbedImage = 'draftEmbedImage'
154
+
155
+ export function isDraftEmbedImage<V>(v: V) {
156
+ return is$typed(v, id, hashDraftEmbedImage)
157
+ }
158
+
159
+ export function validateDraftEmbedImage<V>(v: V) {
160
+ return validate<DraftEmbedImage & V>(v, id, hashDraftEmbedImage)
161
+ }
162
+
163
+ export interface DraftEmbedVideo {
164
+ $type?: 'app.bsky.draft.defs#draftEmbedVideo'
165
+ localRef: DraftEmbedLocalRef
166
+ alt?: string
167
+ captions?: DraftEmbedCaption[]
168
+ }
169
+
170
+ const hashDraftEmbedVideo = 'draftEmbedVideo'
171
+
172
+ export function isDraftEmbedVideo<V>(v: V) {
173
+ return is$typed(v, id, hashDraftEmbedVideo)
174
+ }
175
+
176
+ export function validateDraftEmbedVideo<V>(v: V) {
177
+ return validate<DraftEmbedVideo & V>(v, id, hashDraftEmbedVideo)
178
+ }
179
+
180
+ export interface DraftEmbedExternal {
181
+ $type?: 'app.bsky.draft.defs#draftEmbedExternal'
182
+ uri: string
183
+ }
184
+
185
+ const hashDraftEmbedExternal = 'draftEmbedExternal'
186
+
187
+ export function isDraftEmbedExternal<V>(v: V) {
188
+ return is$typed(v, id, hashDraftEmbedExternal)
189
+ }
190
+
191
+ export function validateDraftEmbedExternal<V>(v: V) {
192
+ return validate<DraftEmbedExternal & V>(v, id, hashDraftEmbedExternal)
193
+ }
194
+
195
+ export interface DraftEmbedRecord {
196
+ $type?: 'app.bsky.draft.defs#draftEmbedRecord'
197
+ record: ComAtprotoRepoStrongRef.Main
198
+ }
199
+
200
+ const hashDraftEmbedRecord = 'draftEmbedRecord'
201
+
202
+ export function isDraftEmbedRecord<V>(v: V) {
203
+ return is$typed(v, id, hashDraftEmbedRecord)
204
+ }
205
+
206
+ export function validateDraftEmbedRecord<V>(v: V) {
207
+ return validate<DraftEmbedRecord & V>(v, id, hashDraftEmbedRecord)
208
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'app.bsky.draft.deleteDraft'
16
+
17
+ export type QueryParams = {}
18
+
19
+ export interface InputSchema {
20
+ id: string
21
+ }
22
+
23
+ export interface HandlerInput {
24
+ encoding: 'application/json'
25
+ body: InputSchema
26
+ }
27
+
28
+ export interface HandlerError {
29
+ status: number
30
+ message?: string
31
+ }
32
+
33
+ export type HandlerOutput = HandlerError | void
@@ -0,0 +1,42 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as AppBskyDraftDefs from './defs.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'app.bsky.draft.getDrafts'
17
+
18
+ export type QueryParams = {
19
+ limit: number
20
+ cursor?: string
21
+ }
22
+ export type InputSchema = undefined
23
+
24
+ export interface OutputSchema {
25
+ cursor?: string
26
+ drafts: AppBskyDraftDefs.DraftView[]
27
+ }
28
+
29
+ export type HandlerInput = void
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
+ }
41
+
42
+ export type HandlerOutput = HandlerError | HandlerSuccess
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { CID } from 'multiformats/cid'
6
+ import { validate as _validate } from '../../../../lexicons'
7
+ import {
8
+ type $Typed,
9
+ is$typed as _is$typed,
10
+ type OmitKey,
11
+ } from '../../../../util'
12
+ import type * as AppBskyDraftDefs from './defs.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'app.bsky.draft.updateDraft'
17
+
18
+ export type QueryParams = {}
19
+
20
+ export interface InputSchema {
21
+ draft: AppBskyDraftDefs.DraftWithId
22
+ }
23
+
24
+ export interface HandlerInput {
25
+ encoding: 'application/json'
26
+ body: InputSchema
27
+ }
28
+
29
+ export interface HandlerError {
30
+ status: number
31
+ message?: string
32
+ }
33
+
34
+ export type HandlerOutput = HandlerError | void
@@ -23,6 +23,8 @@ export interface Main {
23
23
  /** Alt text description of the video, for accessibility. */
24
24
  alt?: string
25
25
  aspectRatio?: AppBskyEmbedDefs.AspectRatio
26
+ /** A hint to the client about how to present the video. */
27
+ presentation?: 'default' | 'gif' | (string & {})
26
28
  }
27
29
 
28
30
  const hashMain = 'main'
@@ -58,6 +60,8 @@ export interface View {
58
60
  thumbnail?: string
59
61
  alt?: string
60
62
  aspectRatio?: AppBskyEmbedDefs.AspectRatio
63
+ /** A hint to the client about how to present the video. */
64
+ presentation?: 'default' | 'gif' | (string & {})
61
65
  }
62
66
 
63
67
  const hashView = 'view'
@@ -24,6 +24,8 @@ export type InputSchema = undefined
24
24
 
25
25
  export interface OutputSchema {
26
26
  actors: AppBskyActorDefs.ProfileView[]
27
+ /** Snowflake for this recommendation, use when submitting recommendation events. */
28
+ recId?: string
27
29
  }
28
30
 
29
31
  export type HandlerInput = void
@@ -25,6 +25,8 @@ export type InputSchema = undefined
25
25
 
26
26
  export interface OutputSchema {
27
27
  dids: string[]
28
+ /** Snowflake for this recommendation, use when submitting recommendation events. */
29
+ recId?: string
28
30
  }
29
31
 
30
32
  export type HandlerInput = void
@@ -21,6 +21,7 @@ export type HandlerInput = void
21
21
  export interface HandlerError {
22
22
  status: number
23
23
  message?: string
24
+ error?: 'InvalidToken' | 'ExpiredToken'
24
25
  }
25
26
 
26
27
  export type HandlerOutput = HandlerError | void
@@ -20,10 +20,10 @@ export type InputSchema = undefined
20
20
  export interface OutputSchema {
21
21
  handle: string
22
22
  did: string
23
+ didDoc?: { [_ in string]: unknown }
23
24
  email?: string
24
25
  emailConfirmed?: boolean
25
26
  emailAuthFactor?: boolean
26
- didDoc?: { [_ in string]: unknown }
27
27
  active?: boolean
28
28
  /** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
29
29
  status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
@@ -23,6 +23,9 @@ export interface OutputSchema {
23
23
  handle: string
24
24
  did: string
25
25
  didDoc?: { [_ in string]: unknown }
26
+ email?: string
27
+ emailConfirmed?: boolean
28
+ emailAuthFactor?: boolean
26
29
  active?: boolean
27
30
  /** Hosting status of the account. If not specified, then assume 'active'. */
28
31
  status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})
@@ -39,7 +42,7 @@ export interface HandlerSuccess {
39
42
  export interface HandlerError {
40
43
  status: number
41
44
  message?: string
42
- error?: 'AccountTakedown'
45
+ error?: 'AccountTakedown' | 'InvalidToken' | 'ExpiredToken'
43
46
  }
44
47
 
45
48
  export type HandlerOutput = HandlerError | HandlerSuccess
@@ -1,5 +1,3 @@
1
- /* eslint-disable import/no-deprecated */
2
-
3
1
  import net from 'node:net'
4
2
  import { sql } from 'kysely'
5
3
  import AtpAgent from '@atproto/api'
@@ -48,6 +46,9 @@ export const signLabel = async (
48
46
  signingKey: Keypair,
49
47
  ): Promise<SignedLabel> => {
50
48
  const { ver, src, uri, cid, val, neg, cts, exp } = label
49
+ // @TODO cborEncode now ignores undefined properties, so we might not need to
50
+ // reformat the label here. We might want to consider this if we ever re-visit
51
+ // the logic below:
51
52
  const reformatted = noUndefinedVals({
52
53
  ver: ver ?? 1,
53
54
  src,
@@ -1,5 +1,3 @@
1
- /* eslint-disable import/no-deprecated */
2
-
3
1
  import { AtpAgent } from '@atproto/api'
4
2
  import { cborEncode } from '@atproto/common'
5
3
  import { Secp256k1Keypair, verifySignature } from '@atproto/crypto'