@atproto/api 0.20.38 → 0.20.40

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 (43) 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 +786 -6
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +456 -3
  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/embed/video.d.ts +1 -1
  15. package/dist/client/types/app/bsky/embed/video.d.ts.map +1 -1
  16. package/dist/client/types/app/bsky/embed/video.js.map +1 -1
  17. package/dist/client/types/app/bsky/video/abortUpload.d.ts +34 -0
  18. package/dist/client/types/app/bsky/video/abortUpload.d.ts.map +1 -0
  19. package/dist/client/types/app/bsky/video/abortUpload.js +30 -0
  20. package/dist/client/types/app/bsky/video/abortUpload.js.map +1 -0
  21. package/dist/client/types/app/bsky/video/defs.d.ts +1 -1
  22. package/dist/client/types/app/bsky/video/defs.d.ts.map +1 -1
  23. package/dist/client/types/app/bsky/video/defs.js.map +1 -1
  24. package/dist/client/types/app/bsky/video/finishUpload.d.ts +51 -0
  25. package/dist/client/types/app/bsky/video/finishUpload.d.ts.map +1 -0
  26. package/dist/client/types/app/bsky/video/finishUpload.js +72 -0
  27. package/dist/client/types/app/bsky/video/finishUpload.js.map +1 -0
  28. package/dist/client/types/app/bsky/video/getUploadStatus.d.ts +36 -0
  29. package/dist/client/types/app/bsky/video/getUploadStatus.d.ts.map +1 -0
  30. package/dist/client/types/app/bsky/video/getUploadStatus.js +23 -0
  31. package/dist/client/types/app/bsky/video/getUploadStatus.js.map +1 -0
  32. package/dist/client/types/app/bsky/video/startUpload.d.ts +62 -0
  33. package/dist/client/types/app/bsky/video/startUpload.d.ts.map +1 -0
  34. package/dist/client/types/app/bsky/video/startUpload.js +72 -0
  35. package/dist/client/types/app/bsky/video/startUpload.js.map +1 -0
  36. package/dist/client/types/app/bsky/video/uploadPart.d.ts +53 -0
  37. package/dist/client/types/app/bsky/video/uploadPart.d.ts.map +1 -0
  38. package/dist/client/types/app/bsky/video/uploadPart.js +79 -0
  39. package/dist/client/types/app/bsky/video/uploadPart.js.map +1 -0
  40. package/dist/moderation/const/labels.d.ts +1 -1
  41. package/dist/moderation/const/labels.d.ts.map +1 -1
  42. package/dist/moderation/const/labels.js.map +1 -1
  43. package/package.json +4 -4
@@ -5,6 +5,7 @@ import { XrpcClient, } from '@atproto/xrpc';
5
5
  import { schemas } from './lexicons.js';
6
6
  import { CID } from 'multiformats/cid';
7
7
  import {} from './util.js';
8
+ import * as AppBskyActorContentVisibilityDeclaration from './types/app/bsky/actor/contentVisibilityDeclaration.js';
8
9
  import * as AppBskyActorDefs from './types/app/bsky/actor/defs.js';
9
10
  import * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences.js';
10
11
  import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile.js';
@@ -150,9 +151,14 @@ import * as AppBskyUnspeccedInitAgeAssurance from './types/app/bsky/unspecced/in
150
151
  import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton.js';
151
152
  import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton.js';
152
153
  import * as AppBskyUnspeccedSearchStarterPacksSkeleton from './types/app/bsky/unspecced/searchStarterPacksSkeleton.js';
154
+ import * as AppBskyVideoAbortUpload from './types/app/bsky/video/abortUpload.js';
153
155
  import * as AppBskyVideoDefs from './types/app/bsky/video/defs.js';
156
+ import * as AppBskyVideoFinishUpload from './types/app/bsky/video/finishUpload.js';
154
157
  import * as AppBskyVideoGetJobStatus from './types/app/bsky/video/getJobStatus.js';
155
158
  import * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLimits.js';
159
+ import * as AppBskyVideoGetUploadStatus from './types/app/bsky/video/getUploadStatus.js';
160
+ import * as AppBskyVideoStartUpload from './types/app/bsky/video/startUpload.js';
161
+ import * as AppBskyVideoUploadPart from './types/app/bsky/video/uploadPart.js';
156
162
  import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js';
157
163
  import * as ChatBskyActorDeclaration from './types/chat/bsky/actor/declaration.js';
158
164
  import * as ChatBskyActorDefs from './types/chat/bsky/actor/defs.js';
@@ -384,6 +390,7 @@ import * as ToolsOzoneVerificationDefs from './types/tools/ozone/verification/de
384
390
  import * as ToolsOzoneVerificationGrantVerifications from './types/tools/ozone/verification/grantVerifications.js';
385
391
  import * as ToolsOzoneVerificationListVerifications from './types/tools/ozone/verification/listVerifications.js';
386
392
  import * as ToolsOzoneVerificationRevokeVerifications from './types/tools/ozone/verification/revokeVerifications.js';
393
+ export * as AppBskyActorContentVisibilityDeclaration from './types/app/bsky/actor/contentVisibilityDeclaration.js';
387
394
  export * as AppBskyActorDefs from './types/app/bsky/actor/defs.js';
388
395
  export * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences.js';
389
396
  export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile.js';
@@ -529,9 +536,14 @@ export * as AppBskyUnspeccedInitAgeAssurance from './types/app/bsky/unspecced/in
529
536
  export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton.js';
530
537
  export * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton.js';
531
538
  export * as AppBskyUnspeccedSearchStarterPacksSkeleton from './types/app/bsky/unspecced/searchStarterPacksSkeleton.js';
539
+ export * as AppBskyVideoAbortUpload from './types/app/bsky/video/abortUpload.js';
532
540
  export * as AppBskyVideoDefs from './types/app/bsky/video/defs.js';
541
+ export * as AppBskyVideoFinishUpload from './types/app/bsky/video/finishUpload.js';
533
542
  export * as AppBskyVideoGetJobStatus from './types/app/bsky/video/getJobStatus.js';
534
543
  export * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLimits.js';
544
+ export * as AppBskyVideoGetUploadStatus from './types/app/bsky/video/getUploadStatus.js';
545
+ export * as AppBskyVideoStartUpload from './types/app/bsky/video/startUpload.js';
546
+ export * as AppBskyVideoUploadPart from './types/app/bsky/video/uploadPart.js';
535
547
  export * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js';
536
548
  export * as ChatBskyActorDeclaration from './types/chat/bsky/actor/declaration.js';
537
549
  export * as ChatBskyActorDefs from './types/chat/bsky/actor/defs.js';
@@ -893,6 +905,8 @@ export class AppBskyNS {
893
905
  export class AppBskyActorNS {
894
906
  constructor(client) {
895
907
  this._client = client;
908
+ this.contentVisibilityDeclaration =
909
+ new AppBskyActorContentVisibilityDeclarationRecord(client);
896
910
  this.profile = new AppBskyActorProfileRecord(client);
897
911
  this.status = new AppBskyActorStatusRecord(client);
898
912
  }
@@ -918,6 +932,43 @@ export class AppBskyActorNS {
918
932
  return this._client.call('app.bsky.actor.searchActorsTypeahead', params, undefined, opts);
919
933
  }
920
934
  }
935
+ export class AppBskyActorContentVisibilityDeclarationRecord {
936
+ constructor(client) {
937
+ this._client = client;
938
+ }
939
+ async list(params) {
940
+ const res = await this._client.call('com.atproto.repo.listRecords', {
941
+ collection: 'app.bsky.actor.contentVisibilityDeclaration',
942
+ ...params,
943
+ });
944
+ return res.data;
945
+ }
946
+ async get(params) {
947
+ const res = await this._client.call('com.atproto.repo.getRecord', {
948
+ collection: 'app.bsky.actor.contentVisibilityDeclaration',
949
+ ...params,
950
+ });
951
+ return res.data;
952
+ }
953
+ async create(params, record, headers) {
954
+ const collection = 'app.bsky.actor.contentVisibilityDeclaration';
955
+ const res = await this._client.call('com.atproto.repo.createRecord', undefined, {
956
+ collection,
957
+ rkey: 'self',
958
+ ...params,
959
+ record: { ...record, $type: collection },
960
+ }, { encoding: 'application/json', headers });
961
+ return res.data;
962
+ }
963
+ async put(params, record, headers) {
964
+ const collection = 'app.bsky.actor.contentVisibilityDeclaration';
965
+ const res = await this._client.call('com.atproto.repo.putRecord', undefined, { collection, ...params, record: { ...record, $type: collection } }, { encoding: 'application/json', headers });
966
+ return res.data;
967
+ }
968
+ async delete(params, headers) {
969
+ await this._client.call('com.atproto.repo.deleteRecord', undefined, { collection: 'app.bsky.actor.contentVisibilityDeclaration', ...params }, { headers });
970
+ }
971
+ }
921
972
  export class AppBskyActorProfileRecord {
922
973
  constructor(client) {
923
974
  this._client = client;
@@ -1961,12 +2012,47 @@ export class AppBskyVideoNS {
1961
2012
  constructor(client) {
1962
2013
  this._client = client;
1963
2014
  }
2015
+ abortUpload(data, opts) {
2016
+ return this._client
2017
+ .call('app.bsky.video.abortUpload', opts?.qp, data, opts)
2018
+ .catch((e) => {
2019
+ throw AppBskyVideoAbortUpload.toKnownErr(e);
2020
+ });
2021
+ }
2022
+ finishUpload(data, opts) {
2023
+ return this._client
2024
+ .call('app.bsky.video.finishUpload', opts?.qp, data, opts)
2025
+ .catch((e) => {
2026
+ throw AppBskyVideoFinishUpload.toKnownErr(e);
2027
+ });
2028
+ }
1964
2029
  getJobStatus(params, opts) {
1965
2030
  return this._client.call('app.bsky.video.getJobStatus', params, undefined, opts);
1966
2031
  }
1967
2032
  getUploadLimits(params, opts) {
1968
2033
  return this._client.call('app.bsky.video.getUploadLimits', params, undefined, opts);
1969
2034
  }
2035
+ getUploadStatus(params, opts) {
2036
+ return this._client
2037
+ .call('app.bsky.video.getUploadStatus', params, undefined, opts)
2038
+ .catch((e) => {
2039
+ throw AppBskyVideoGetUploadStatus.toKnownErr(e);
2040
+ });
2041
+ }
2042
+ startUpload(data, opts) {
2043
+ return this._client
2044
+ .call('app.bsky.video.startUpload', opts?.qp, data, opts)
2045
+ .catch((e) => {
2046
+ throw AppBskyVideoStartUpload.toKnownErr(e);
2047
+ });
2048
+ }
2049
+ uploadPart(data, opts) {
2050
+ return this._client
2051
+ .call('app.bsky.video.uploadPart', opts?.qp, data, opts)
2052
+ .catch((e) => {
2053
+ throw AppBskyVideoUploadPart.toKnownErr(e);
2054
+ });
2055
+ }
1970
2056
  uploadVideo(data, opts) {
1971
2057
  return this._client.call('app.bsky.video.uploadVideo', opts?.qp, data, opts);
1972
2058
  }