@atproto/api 0.20.39 → 0.20.41

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 (40) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/client/index.d.ts +43 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +86 -0
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +782 -10
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +454 -5
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/app/bsky/actor/contentVisibilityDeclaration.d.ts +14 -0
  11. package/dist/client/types/app/bsky/actor/contentVisibilityDeclaration.d.ts.map +1 -0
  12. package/dist/client/types/app/bsky/actor/contentVisibilityDeclaration.js +18 -0
  13. package/dist/client/types/app/bsky/actor/contentVisibilityDeclaration.js.map +1 -0
  14. package/dist/client/types/app/bsky/video/abortUpload.d.ts +34 -0
  15. package/dist/client/types/app/bsky/video/abortUpload.d.ts.map +1 -0
  16. package/dist/client/types/app/bsky/video/abortUpload.js +30 -0
  17. package/dist/client/types/app/bsky/video/abortUpload.js.map +1 -0
  18. package/dist/client/types/app/bsky/video/defs.d.ts +1 -1
  19. package/dist/client/types/app/bsky/video/defs.d.ts.map +1 -1
  20. package/dist/client/types/app/bsky/video/defs.js.map +1 -1
  21. package/dist/client/types/app/bsky/video/finishUpload.d.ts +51 -0
  22. package/dist/client/types/app/bsky/video/finishUpload.d.ts.map +1 -0
  23. package/dist/client/types/app/bsky/video/finishUpload.js +72 -0
  24. package/dist/client/types/app/bsky/video/finishUpload.js.map +1 -0
  25. package/dist/client/types/app/bsky/video/getUploadStatus.d.ts +36 -0
  26. package/dist/client/types/app/bsky/video/getUploadStatus.d.ts.map +1 -0
  27. package/dist/client/types/app/bsky/video/getUploadStatus.js +23 -0
  28. package/dist/client/types/app/bsky/video/getUploadStatus.js.map +1 -0
  29. package/dist/client/types/app/bsky/video/startUpload.d.ts +62 -0
  30. package/dist/client/types/app/bsky/video/startUpload.d.ts.map +1 -0
  31. package/dist/client/types/app/bsky/video/startUpload.js +72 -0
  32. package/dist/client/types/app/bsky/video/startUpload.js.map +1 -0
  33. package/dist/client/types/app/bsky/video/uploadPart.d.ts +53 -0
  34. package/dist/client/types/app/bsky/video/uploadPart.d.ts.map +1 -0
  35. package/dist/client/types/app/bsky/video/uploadPart.js +79 -0
  36. package/dist/client/types/app/bsky/video/uploadPart.js.map +1 -0
  37. package/dist/moderation/const/labels.d.ts +1 -1
  38. package/dist/moderation/const/labels.d.ts.map +1 -1
  39. package/dist/moderation/const/labels.js.map +1 -1
  40. package/package.json +3 -3
@@ -4,6 +4,27 @@
4
4
  import { Lexicons, ValidationError, } from '@atproto/lexicon';
5
5
  import { is$typed, maybe$typed } from './util.js';
6
6
  export const schemaDict = {
7
+ AppBskyActorContentVisibilityDeclaration: {
8
+ lexicon: 1,
9
+ id: 'app.bsky.actor.contentVisibilityDeclaration',
10
+ defs: {
11
+ main: {
12
+ type: 'record',
13
+ description: "A declaration of an account's preferences for appearing in content discovery surfaces.",
14
+ key: 'literal:self',
15
+ record: {
16
+ type: 'object',
17
+ required: ['hideFromAlgorithmicRecommendations'],
18
+ properties: {
19
+ hideFromAlgorithmicRecommendations: {
20
+ type: 'boolean',
21
+ description: 'Whether the account requests that its posts be hidden from algorithmic recommendations. Consumers must treat a missing record as false.',
22
+ },
23
+ },
24
+ },
25
+ },
26
+ },
27
+ },
7
28
  AppBskyActorDefs: {
8
29
  lexicon: 1,
9
30
  id: 'app.bsky.actor.defs',
@@ -3241,8 +3262,6 @@ export const schemaDict = {
3241
3262
  alt: {
3242
3263
  type: 'string',
3243
3264
  description: 'Alt text description of the video, for accessibility.',
3244
- maxGraphemes: 1000,
3245
- maxLength: 10000,
3246
3265
  },
3247
3266
  aspectRatio: {
3248
3267
  type: 'ref',
@@ -3288,8 +3307,6 @@ export const schemaDict = {
3288
3307
  },
3289
3308
  alt: {
3290
3309
  type: 'string',
3291
- maxGraphemes: 1000,
3292
- maxLength: 10000,
3293
3310
  },
3294
3311
  aspectRatio: {
3295
3312
  type: 'ref',
@@ -9833,6 +9850,65 @@ export const schemaDict = {
9833
9850
  },
9834
9851
  },
9835
9852
  },
9853
+ AppBskyVideoAbortUpload: {
9854
+ lexicon: 1,
9855
+ id: 'app.bsky.video.abortUpload',
9856
+ defs: {
9857
+ main: {
9858
+ type: 'procedure',
9859
+ description: 'Abort an upload only while it is created, releasing its quota reservation immediately. Terminal sessions are unchanged and return their terminal outcome. A finishing session returns UploadNotReady.',
9860
+ input: {
9861
+ encoding: 'application/json',
9862
+ schema: {
9863
+ type: 'object',
9864
+ required: ['jobId'],
9865
+ properties: {
9866
+ jobId: {
9867
+ type: 'string',
9868
+ minLength: 1,
9869
+ maxLength: 256,
9870
+ },
9871
+ },
9872
+ },
9873
+ },
9874
+ output: {
9875
+ encoding: 'application/json',
9876
+ schema: {
9877
+ type: 'object',
9878
+ required: ['state'],
9879
+ properties: {
9880
+ state: {
9881
+ type: 'string',
9882
+ maxLength: 32,
9883
+ knownValues: ['aborted', 'completed', 'failed', 'expired'],
9884
+ },
9885
+ completedJobId: {
9886
+ type: 'string',
9887
+ minLength: 1,
9888
+ maxLength: 256,
9889
+ description: 'Present only when state is completed.',
9890
+ },
9891
+ failureReason: {
9892
+ type: 'string',
9893
+ maxLength: 1024,
9894
+ description: 'Present only when state is failed.',
9895
+ },
9896
+ },
9897
+ },
9898
+ },
9899
+ errors: [
9900
+ {
9901
+ name: 'UploadNotFound',
9902
+ description: 'The job ID is unknown or aged out of retention; known terminal sessions return their outcome and are never reported as not found.',
9903
+ },
9904
+ {
9905
+ name: 'UploadNotReady',
9906
+ description: 'A finish is in progress; check getUploadStatus and retry.',
9907
+ },
9908
+ ],
9909
+ },
9910
+ },
9911
+ },
9836
9912
  AppBskyVideoDefs: {
9837
9913
  lexicon: 1,
9838
9914
  id: 'app.bsky.video.defs',
@@ -9851,7 +9927,17 @@ export const schemaDict = {
9851
9927
  state: {
9852
9928
  type: 'string',
9853
9929
  description: 'The state of the video processing job. All values not listed as a known value indicate that the job is in process.',
9854
- knownValues: ['JOB_STATE_COMPLETED', 'JOB_STATE_FAILED'],
9930
+ knownValues: [
9931
+ 'JOB_STATE_CREATED',
9932
+ 'JOB_STATE_ENCODING',
9933
+ 'JOB_STATE_ENCODED',
9934
+ 'JOB_STATE_SCANNING',
9935
+ 'JOB_STATE_SCANNED',
9936
+ 'JOB_STATE_UPLOADING',
9937
+ 'JOB_STATE_UPLOADED',
9938
+ 'JOB_STATE_COMPLETED',
9939
+ 'JOB_STATE_FAILED',
9940
+ ],
9855
9941
  },
9856
9942
  progress: {
9857
9943
  type: 'integer',
@@ -9883,6 +9969,83 @@ export const schemaDict = {
9883
9969
  },
9884
9970
  },
9885
9971
  },
9972
+ AppBskyVideoFinishUpload: {
9973
+ lexicon: 1,
9974
+ id: 'app.bsky.video.finishUpload',
9975
+ defs: {
9976
+ main: {
9977
+ type: 'procedure',
9978
+ description: 'Finish an upload. This call is idempotent and safe to retry. On deduplication completedJobId may differ from the input jobId; poll getJobStatus with completedJobId. Probe-based validation failures surface later as JOB_STATE_FAILED from getJobStatus, not as errors from this call.',
9979
+ input: {
9980
+ encoding: 'application/json',
9981
+ schema: {
9982
+ type: 'object',
9983
+ required: ['jobId'],
9984
+ properties: {
9985
+ jobId: {
9986
+ type: 'string',
9987
+ minLength: 1,
9988
+ maxLength: 256,
9989
+ },
9990
+ },
9991
+ },
9992
+ },
9993
+ output: {
9994
+ encoding: 'application/json',
9995
+ schema: {
9996
+ type: 'object',
9997
+ required: ['completedJobId', 'jobStatus'],
9998
+ properties: {
9999
+ completedJobId: {
10000
+ type: 'string',
10001
+ minLength: 1,
10002
+ maxLength: 256,
10003
+ description: 'The processing job to poll with getJobStatus; on deduplication this may differ from the input jobId.',
10004
+ },
10005
+ jobStatus: {
10006
+ type: 'ref',
10007
+ ref: 'lex:app.bsky.video.defs#jobStatus',
10008
+ },
10009
+ },
10010
+ },
10011
+ },
10012
+ errors: [
10013
+ {
10014
+ name: 'UploadNotFound',
10015
+ description: 'The job ID is unknown or aged out of retention; known terminal sessions are never reported as not found.',
10016
+ },
10017
+ {
10018
+ name: 'UploadExpired',
10019
+ description: 'The upload session expired before finalization began.',
10020
+ },
10021
+ {
10022
+ name: 'MissingParts',
10023
+ description: 'Not all parts are recorded; the error message lists the missing part numbers.',
10024
+ },
10025
+ {
10026
+ name: 'UploadNotReady',
10027
+ description: 'A finish is in progress; check getUploadStatus and retry.',
10028
+ },
10029
+ {
10030
+ name: 'UnsupportedContentType',
10031
+ description: "The assembled object's detected content type is not supported.",
10032
+ },
10033
+ {
10034
+ name: 'UploadFailed',
10035
+ description: 'The session is known to have failed; the error carries its failure reason.',
10036
+ },
10037
+ {
10038
+ name: 'UploadAborted',
10039
+ description: 'The session is known to have been aborted.',
10040
+ },
10041
+ {
10042
+ name: 'ServiceOverloaded',
10043
+ description: 'The service is draining or temporarily at capacity; retry later.',
10044
+ },
10045
+ ],
10046
+ },
10047
+ },
10048
+ },
9886
10049
  AppBskyVideoGetJobStatus: {
9887
10050
  lexicon: 1,
9888
10051
  id: 'app.bsky.video.getJobStatus',
@@ -9949,6 +10112,286 @@ export const schemaDict = {
9949
10112
  },
9950
10113
  },
9951
10114
  },
10115
+ AppBskyVideoGetUploadStatus: {
10116
+ lexicon: 1,
10117
+ id: 'app.bsky.video.getUploadStatus',
10118
+ defs: {
10119
+ main: {
10120
+ type: 'query',
10121
+ description: 'Get the authoritative status of the upload phase. Terminal states remain readable. completedJobId and jobStatus are present only for completed sessions; failureReason is present only for failed sessions.',
10122
+ parameters: {
10123
+ type: 'params',
10124
+ required: ['jobId'],
10125
+ properties: {
10126
+ jobId: {
10127
+ type: 'string',
10128
+ minLength: 1,
10129
+ maxLength: 256,
10130
+ },
10131
+ },
10132
+ },
10133
+ output: {
10134
+ encoding: 'application/json',
10135
+ schema: {
10136
+ type: 'object',
10137
+ required: [
10138
+ 'jobId',
10139
+ 'partSizeBytes',
10140
+ 'partCount',
10141
+ 'receivedParts',
10142
+ 'expiresAt',
10143
+ 'state',
10144
+ ],
10145
+ properties: {
10146
+ jobId: {
10147
+ type: 'string',
10148
+ minLength: 1,
10149
+ maxLength: 256,
10150
+ },
10151
+ partSizeBytes: {
10152
+ type: 'integer',
10153
+ },
10154
+ partCount: {
10155
+ type: 'integer',
10156
+ },
10157
+ receivedParts: {
10158
+ type: 'array',
10159
+ items: {
10160
+ type: 'integer',
10161
+ minimum: 1,
10162
+ },
10163
+ },
10164
+ expiresAt: {
10165
+ type: 'string',
10166
+ format: 'datetime',
10167
+ },
10168
+ state: {
10169
+ type: 'string',
10170
+ maxLength: 32,
10171
+ knownValues: [
10172
+ 'created',
10173
+ 'finishing',
10174
+ 'completed',
10175
+ 'failed',
10176
+ 'aborted',
10177
+ 'expired',
10178
+ ],
10179
+ },
10180
+ completedJobId: {
10181
+ type: 'string',
10182
+ minLength: 1,
10183
+ maxLength: 256,
10184
+ description: 'Present only when state is completed; may differ from jobId on deduplication.',
10185
+ },
10186
+ jobStatus: {
10187
+ type: 'ref',
10188
+ ref: 'lex:app.bsky.video.defs#jobStatus',
10189
+ description: 'Present only when state is completed.',
10190
+ },
10191
+ failureReason: {
10192
+ type: 'string',
10193
+ maxLength: 1024,
10194
+ description: 'Present only when state is failed.',
10195
+ },
10196
+ },
10197
+ },
10198
+ },
10199
+ errors: [
10200
+ {
10201
+ name: 'UploadNotFound',
10202
+ description: 'The job ID is unknown or aged out of retention; known terminal sessions remain readable and are never reported as not found.',
10203
+ },
10204
+ ],
10205
+ },
10206
+ },
10207
+ },
10208
+ AppBskyVideoStartUpload: {
10209
+ lexicon: 1,
10210
+ id: 'app.bsky.video.startUpload',
10211
+ defs: {
10212
+ main: {
10213
+ type: 'procedure',
10214
+ description: 'Start a multipart video upload. The declared size is exact, while optional media properties are advisory and used only for early failure; the authoritative probe runs asynchronously after upload.',
10215
+ input: {
10216
+ encoding: 'application/json',
10217
+ schema: {
10218
+ type: 'object',
10219
+ required: ['sizeBytes', 'mimeType'],
10220
+ properties: {
10221
+ sizeBytes: {
10222
+ type: 'integer',
10223
+ minimum: 1,
10224
+ description: 'Exact byte size of the complete upload-ready video file before it is split into parts.',
10225
+ },
10226
+ mimeType: {
10227
+ type: 'string',
10228
+ minLength: 3,
10229
+ maxLength: 255,
10230
+ description: 'Declared MIME type of the video.',
10231
+ },
10232
+ name: {
10233
+ type: 'string',
10234
+ maxLength: 256,
10235
+ description: 'Optional client-provided file name.',
10236
+ },
10237
+ durationMs: {
10238
+ type: 'integer',
10239
+ description: 'Advisory, non-authoritative duration used only for early failure; the authoritative probe runs asynchronously after upload.',
10240
+ },
10241
+ width: {
10242
+ type: 'integer',
10243
+ description: 'Advisory, non-authoritative width used only for early failure; the authoritative probe runs asynchronously after upload.',
10244
+ },
10245
+ height: {
10246
+ type: 'integer',
10247
+ description: 'Advisory, non-authoritative height used only for early failure; the authoritative probe runs asynchronously after upload.',
10248
+ },
10249
+ },
10250
+ },
10251
+ },
10252
+ output: {
10253
+ encoding: 'application/json',
10254
+ schema: {
10255
+ type: 'object',
10256
+ required: ['jobId', 'partSizeBytes', 'partCount', 'expiresAt'],
10257
+ properties: {
10258
+ jobId: {
10259
+ type: 'string',
10260
+ minLength: 1,
10261
+ maxLength: 256,
10262
+ },
10263
+ partSizeBytes: {
10264
+ type: 'integer',
10265
+ },
10266
+ partCount: {
10267
+ type: 'integer',
10268
+ },
10269
+ expiresAt: {
10270
+ type: 'string',
10271
+ format: 'datetime',
10272
+ },
10273
+ },
10274
+ },
10275
+ },
10276
+ errors: [
10277
+ {
10278
+ name: 'UnsupportedContentType',
10279
+ description: 'The declared MIME type is not supported.',
10280
+ },
10281
+ {
10282
+ name: 'VideoTooLarge',
10283
+ description: 'The exact file size exceeds the per-file cap or remaining daily byte allowance.',
10284
+ },
10285
+ {
10286
+ name: 'VideoTooLong',
10287
+ description: 'The advisory declared duration exceeds the limit.',
10288
+ },
10289
+ {
10290
+ name: 'BadAspectRatio',
10291
+ description: 'The advisory declared dimensions have an unsupported aspect ratio.',
10292
+ },
10293
+ {
10294
+ name: 'DailyLimitExceeded',
10295
+ description: 'The daily video or byte allowance, including active reservations, is exhausted.',
10296
+ },
10297
+ {
10298
+ name: 'TooManyOpenUploads',
10299
+ description: 'The account has reached its open multipart upload limit.',
10300
+ },
10301
+ {
10302
+ name: 'UploadForbidden',
10303
+ description: 'The account is not permitted to upload video.',
10304
+ },
10305
+ {
10306
+ name: 'ServiceOverloaded',
10307
+ description: 'The service is draining, at capacity, or temporarily unable to create the multipart upload.',
10308
+ },
10309
+ ],
10310
+ },
10311
+ },
10312
+ },
10313
+ AppBskyVideoUploadPart: {
10314
+ lexicon: 1,
10315
+ id: 'app.bsky.video.uploadPart',
10316
+ defs: {
10317
+ main: {
10318
+ type: 'procedure',
10319
+ description: 'Upload one part. Parts are idempotent and may be retried or re-sent while the session is created. Each expected length is derived from the upload size and part size, and Content-Length must match exactly. ETags are never exposed to clients.',
10320
+ parameters: {
10321
+ type: 'params',
10322
+ required: ['jobId', 'partNumber'],
10323
+ properties: {
10324
+ jobId: {
10325
+ type: 'string',
10326
+ minLength: 1,
10327
+ maxLength: 256,
10328
+ },
10329
+ partNumber: {
10330
+ type: 'integer',
10331
+ minimum: 1,
10332
+ },
10333
+ },
10334
+ },
10335
+ input: {
10336
+ encoding: 'application/octet-stream',
10337
+ },
10338
+ output: {
10339
+ encoding: 'application/json',
10340
+ schema: {
10341
+ type: 'object',
10342
+ required: ['partNumber', 'sizeBytes'],
10343
+ properties: {
10344
+ partNumber: {
10345
+ type: 'integer',
10346
+ minimum: 1,
10347
+ },
10348
+ sizeBytes: {
10349
+ type: 'integer',
10350
+ },
10351
+ },
10352
+ },
10353
+ },
10354
+ errors: [
10355
+ {
10356
+ name: 'UploadNotFound',
10357
+ description: 'The job ID is unknown or aged out of retention; known terminal sessions are never reported as not found.',
10358
+ },
10359
+ {
10360
+ name: 'UploadExpired',
10361
+ description: 'The upload session expired before completion.',
10362
+ },
10363
+ {
10364
+ name: 'InvalidPartNumber',
10365
+ description: "The part number is outside the upload's valid part range.",
10366
+ },
10367
+ {
10368
+ name: 'PartSizeMismatch',
10369
+ description: 'Content-Length does not exactly match the expected size for this part.',
10370
+ },
10371
+ {
10372
+ name: 'UploadNotReady',
10373
+ description: 'A finish is in progress; check getUploadStatus and retry.',
10374
+ },
10375
+ {
10376
+ name: 'UploadFailed',
10377
+ description: 'The session is known to have failed; the error carries its failure reason.',
10378
+ },
10379
+ {
10380
+ name: 'UploadAborted',
10381
+ description: 'The session is known to have been aborted.',
10382
+ },
10383
+ {
10384
+ name: 'UploadAlreadyCompleted',
10385
+ description: 'The session is known to have already completed.',
10386
+ },
10387
+ {
10388
+ name: 'ServiceOverloaded',
10389
+ description: 'The service is draining or temporarily at capacity; retry on another worker.',
10390
+ },
10391
+ ],
10392
+ },
10393
+ },
10394
+ },
9952
10395
  AppBskyVideoUploadVideo: {
9953
10396
  lexicon: 1,
9954
10397
  id: 'app.bsky.video.uploadVideo',
@@ -26021,6 +26464,7 @@ export function validate(v, id, hash, requiredType) {
26021
26464
  };
26022
26465
  }
26023
26466
  export const ids = {
26467
+ AppBskyActorContentVisibilityDeclaration: 'app.bsky.actor.contentVisibilityDeclaration',
26024
26468
  AppBskyActorDefs: 'app.bsky.actor.defs',
26025
26469
  AppBskyActorGetPreferences: 'app.bsky.actor.getPreferences',
26026
26470
  AppBskyActorGetProfile: 'app.bsky.actor.getProfile',
@@ -26166,9 +26610,14 @@ export const ids = {
26166
26610
  AppBskyUnspeccedSearchActorsSkeleton: 'app.bsky.unspecced.searchActorsSkeleton',
26167
26611
  AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton',
26168
26612
  AppBskyUnspeccedSearchStarterPacksSkeleton: 'app.bsky.unspecced.searchStarterPacksSkeleton',
26613
+ AppBskyVideoAbortUpload: 'app.bsky.video.abortUpload',
26169
26614
  AppBskyVideoDefs: 'app.bsky.video.defs',
26615
+ AppBskyVideoFinishUpload: 'app.bsky.video.finishUpload',
26170
26616
  AppBskyVideoGetJobStatus: 'app.bsky.video.getJobStatus',
26171
26617
  AppBskyVideoGetUploadLimits: 'app.bsky.video.getUploadLimits',
26618
+ AppBskyVideoGetUploadStatus: 'app.bsky.video.getUploadStatus',
26619
+ AppBskyVideoStartUpload: 'app.bsky.video.startUpload',
26620
+ AppBskyVideoUploadPart: 'app.bsky.video.uploadPart',
26172
26621
  AppBskyVideoUploadVideo: 'app.bsky.video.uploadVideo',
26173
26622
  ChatBskyActorDeclaration: 'chat.bsky.actor.declaration',
26174
26623
  ChatBskyActorDefs: 'chat.bsky.actor.defs',