@atproto/ozone 0.1.40 → 0.1.42

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 (66) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/lexicon/index.d.ts +11 -0
  3. package/dist/lexicon/index.d.ts.map +1 -1
  4. package/dist/lexicon/index.js +32 -1
  5. package/dist/lexicon/index.js.map +1 -1
  6. package/dist/lexicon/lexicons.d.ts +240 -15
  7. package/dist/lexicon/lexicons.d.ts.map +1 -1
  8. package/dist/lexicon/lexicons.js +251 -18
  9. package/dist/lexicon/lexicons.js.map +1 -1
  10. package/dist/lexicon/types/app/bsky/embed/defs.d.ts +13 -0
  11. package/dist/lexicon/types/app/bsky/embed/defs.d.ts.map +1 -0
  12. package/dist/lexicon/types/app/bsky/embed/defs.js +16 -0
  13. package/dist/lexicon/types/app/bsky/embed/defs.js.map +1 -0
  14. package/dist/lexicon/types/app/bsky/embed/images.d.ts +3 -10
  15. package/dist/lexicon/types/app/bsky/embed/images.d.ts.map +1 -1
  16. package/dist/lexicon/types/app/bsky/embed/images.js +1 -11
  17. package/dist/lexicon/types/app/bsky/embed/images.js.map +1 -1
  18. package/dist/lexicon/types/app/bsky/embed/record.d.ts +2 -1
  19. package/dist/lexicon/types/app/bsky/embed/record.d.ts.map +1 -1
  20. package/dist/lexicon/types/app/bsky/embed/record.js.map +1 -1
  21. package/dist/lexicon/types/app/bsky/embed/recordWithMedia.d.ts +3 -2
  22. package/dist/lexicon/types/app/bsky/embed/recordWithMedia.d.ts.map +1 -1
  23. package/dist/lexicon/types/app/bsky/embed/recordWithMedia.js.map +1 -1
  24. package/dist/lexicon/types/app/bsky/embed/video.d.ts +33 -0
  25. package/dist/lexicon/types/app/bsky/embed/video.d.ts.map +1 -0
  26. package/dist/lexicon/types/app/bsky/embed/video.js +35 -0
  27. package/dist/lexicon/types/app/bsky/embed/video.js.map +1 -0
  28. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +2 -1
  29. package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
  30. package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
  31. package/dist/lexicon/types/app/bsky/feed/getPostThread.d.ts +1 -0
  32. package/dist/lexicon/types/app/bsky/feed/getPostThread.d.ts.map +1 -1
  33. package/dist/lexicon/types/app/bsky/feed/post.d.ts +2 -1
  34. package/dist/lexicon/types/app/bsky/feed/post.d.ts.map +1 -1
  35. package/dist/lexicon/types/app/bsky/feed/post.js.map +1 -1
  36. package/dist/lexicon/types/app/bsky/video/defs.d.ts +19 -0
  37. package/dist/lexicon/types/app/bsky/video/defs.d.ts.map +1 -0
  38. package/dist/lexicon/types/app/bsky/video/defs.js +16 -0
  39. package/dist/lexicon/types/app/bsky/video/defs.js.map +1 -0
  40. package/dist/lexicon/types/app/bsky/video/getJobStatus.d.ts +36 -0
  41. package/dist/lexicon/types/app/bsky/video/getJobStatus.d.ts.map +1 -0
  42. package/dist/lexicon/types/app/bsky/video/getJobStatus.js +3 -0
  43. package/dist/lexicon/types/app/bsky/video/getJobStatus.js.map +1 -0
  44. package/dist/lexicon/types/app/bsky/video/getUploadLimits.d.ts +38 -0
  45. package/dist/lexicon/types/app/bsky/video/getUploadLimits.d.ts.map +1 -0
  46. package/dist/lexicon/types/app/bsky/video/getUploadLimits.js +3 -0
  47. package/dist/lexicon/types/app/bsky/video/getUploadLimits.js.map +1 -0
  48. package/dist/lexicon/types/app/bsky/video/uploadVideo.d.ts +41 -0
  49. package/dist/lexicon/types/app/bsky/video/uploadVideo.d.ts.map +1 -0
  50. package/dist/lexicon/types/app/bsky/video/uploadVideo.js +3 -0
  51. package/dist/lexicon/types/app/bsky/video/uploadVideo.js.map +1 -0
  52. package/package.json +7 -7
  53. package/src/lexicon/index.ts +46 -0
  54. package/src/lexicon/lexicons.ts +254 -19
  55. package/src/lexicon/types/app/bsky/embed/defs.ts +26 -0
  56. package/src/lexicon/types/app/bsky/embed/images.ts +3 -21
  57. package/src/lexicon/types/app/bsky/embed/record.ts +2 -0
  58. package/src/lexicon/types/app/bsky/embed/recordWithMedia.ts +3 -0
  59. package/src/lexicon/types/app/bsky/embed/video.ts +67 -0
  60. package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
  61. package/src/lexicon/types/app/bsky/feed/getPostThread.ts +1 -0
  62. package/src/lexicon/types/app/bsky/feed/post.ts +2 -0
  63. package/src/lexicon/types/app/bsky/video/defs.ts +32 -0
  64. package/src/lexicon/types/app/bsky/video/getJobStatus.ts +46 -0
  65. package/src/lexicon/types/app/bsky/video/getUploadLimits.ts +47 -0
  66. package/src/lexicon/types/app/bsky/video/uploadVideo.ts +48 -0
@@ -0,0 +1,67 @@
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 AppBskyEmbedDefs from './defs'
9
+
10
+ export interface Main {
11
+ video: BlobRef
12
+ captions?: Caption[]
13
+ /** Alt text description of the video, for accessibility. */
14
+ alt?: string
15
+ aspectRatio?: AppBskyEmbedDefs.AspectRatio
16
+ [k: string]: unknown
17
+ }
18
+
19
+ export function isMain(v: unknown): v is Main {
20
+ return (
21
+ isObj(v) &&
22
+ hasProp(v, '$type') &&
23
+ (v.$type === 'app.bsky.embed.video#main' ||
24
+ v.$type === 'app.bsky.embed.video')
25
+ )
26
+ }
27
+
28
+ export function validateMain(v: unknown): ValidationResult {
29
+ return lexicons.validate('app.bsky.embed.video#main', v)
30
+ }
31
+
32
+ export interface Caption {
33
+ lang: string
34
+ file: BlobRef
35
+ [k: string]: unknown
36
+ }
37
+
38
+ export function isCaption(v: unknown): v is Caption {
39
+ return (
40
+ isObj(v) &&
41
+ hasProp(v, '$type') &&
42
+ v.$type === 'app.bsky.embed.video#caption'
43
+ )
44
+ }
45
+
46
+ export function validateCaption(v: unknown): ValidationResult {
47
+ return lexicons.validate('app.bsky.embed.video#caption', v)
48
+ }
49
+
50
+ export interface View {
51
+ cid: string
52
+ playlist: string
53
+ thumbnail?: string
54
+ alt?: string
55
+ aspectRatio?: AppBskyEmbedDefs.AspectRatio
56
+ [k: string]: unknown
57
+ }
58
+
59
+ export function isView(v: unknown): v is View {
60
+ return (
61
+ isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.embed.video#view'
62
+ )
63
+ }
64
+
65
+ export function validateView(v: unknown): ValidationResult {
66
+ return lexicons.validate('app.bsky.embed.video#view', v)
67
+ }
@@ -7,6 +7,7 @@ import { isObj, hasProp } from '../../../../util'
7
7
  import { CID } from 'multiformats/cid'
8
8
  import * as AppBskyActorDefs from '../actor/defs'
9
9
  import * as AppBskyEmbedImages from '../embed/images'
10
+ import * as AppBskyEmbedVideo from '../embed/video'
10
11
  import * as AppBskyEmbedExternal from '../embed/external'
11
12
  import * as AppBskyEmbedRecord from '../embed/record'
12
13
  import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia'
@@ -21,6 +22,7 @@ export interface PostView {
21
22
  record: {}
22
23
  embed?:
23
24
  | AppBskyEmbedImages.View
25
+ | AppBskyEmbedVideo.View
24
26
  | AppBskyEmbedExternal.View
25
27
  | AppBskyEmbedRecord.View
26
28
  | AppBskyEmbedRecordWithMedia.View
@@ -26,6 +26,7 @@ export interface OutputSchema {
26
26
  | AppBskyFeedDefs.NotFoundPost
27
27
  | AppBskyFeedDefs.BlockedPost
28
28
  | { $type: string; [k: string]: unknown }
29
+ threadgate?: AppBskyFeedDefs.ThreadgateView
29
30
  [k: string]: unknown
30
31
  }
31
32
 
@@ -7,6 +7,7 @@ import { isObj, hasProp } from '../../../../util'
7
7
  import { CID } from 'multiformats/cid'
8
8
  import * as AppBskyRichtextFacet from '../richtext/facet'
9
9
  import * as AppBskyEmbedImages from '../embed/images'
10
+ import * as AppBskyEmbedVideo from '../embed/video'
10
11
  import * as AppBskyEmbedExternal from '../embed/external'
11
12
  import * as AppBskyEmbedRecord from '../embed/record'
12
13
  import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia'
@@ -23,6 +24,7 @@ export interface Record {
23
24
  reply?: ReplyRef
24
25
  embed?:
25
26
  | AppBskyEmbedImages.Main
27
+ | AppBskyEmbedVideo.Main
26
28
  | AppBskyEmbedExternal.Main
27
29
  | AppBskyEmbedRecord.Main
28
30
  | AppBskyEmbedRecordWithMedia.Main
@@ -0,0 +1,32 @@
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
+
9
+ export interface JobStatus {
10
+ jobId: string
11
+ did: string
12
+ /** The state of the video processing job. All values not listed as a known value indicate that the job is in process. */
13
+ state: 'JOB_STATE_COMPLETED' | 'JOB_STATE_FAILED' | (string & {})
14
+ /** Progress within the current processing state. */
15
+ progress?: number
16
+ blob?: BlobRef
17
+ error?: string
18
+ message?: string
19
+ [k: string]: unknown
20
+ }
21
+
22
+ export function isJobStatus(v: unknown): v is JobStatus {
23
+ return (
24
+ isObj(v) &&
25
+ hasProp(v, '$type') &&
26
+ v.$type === 'app.bsky.video.defs#jobStatus'
27
+ )
28
+ }
29
+
30
+ export function validateJobStatus(v: unknown): ValidationResult {
31
+ return lexicons.validate('app.bsky.video.defs#jobStatus', v)
32
+ }
@@ -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 AppBskyVideoDefs from './defs'
11
+
12
+ export interface QueryParams {
13
+ jobId: string
14
+ }
15
+
16
+ export type InputSchema = undefined
17
+
18
+ export interface OutputSchema {
19
+ jobStatus: AppBskyVideoDefs.JobStatus
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,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
+
11
+ export interface QueryParams {}
12
+
13
+ export type InputSchema = undefined
14
+
15
+ export interface OutputSchema {
16
+ canUpload: boolean
17
+ remainingDailyVideos?: number
18
+ remainingDailyBytes?: number
19
+ message?: string
20
+ error?: string
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,48 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express'
5
+ import stream from 'stream'
6
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
7
+ import { lexicons } from '../../../../lexicons'
8
+ import { isObj, hasProp } from '../../../../util'
9
+ import { CID } from 'multiformats/cid'
10
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
11
+ import * as AppBskyVideoDefs from './defs'
12
+
13
+ export interface QueryParams {}
14
+
15
+ export type InputSchema = string | Uint8Array | Blob
16
+
17
+ export interface OutputSchema {
18
+ jobStatus: AppBskyVideoDefs.JobStatus
19
+ [k: string]: unknown
20
+ }
21
+
22
+ export interface HandlerInput {
23
+ encoding: 'video/mp4'
24
+ body: stream.Readable
25
+ }
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