@atproto/api 0.18.4 → 0.18.6

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 (81) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/agent.d.ts.map +1 -1
  3. package/dist/agent.js +4 -0
  4. package/dist/agent.js.map +1 -1
  5. package/dist/client/index.d.ts +30 -0
  6. package/dist/client/index.d.ts.map +1 -1
  7. package/dist/client/index.js +95 -8
  8. package/dist/client/index.js.map +1 -1
  9. package/dist/client/lexicons.d.ts +812 -2
  10. package/dist/client/lexicons.d.ts.map +1 -1
  11. package/dist/client/lexicons.js +429 -0
  12. package/dist/client/lexicons.js.map +1 -1
  13. package/dist/client/types/app/bsky/actor/defs.d.ts +13 -1
  14. package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
  15. package/dist/client/types/app/bsky/actor/defs.js +9 -0
  16. package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
  17. package/dist/client/types/app/bsky/contact/defs.d.ts +34 -0
  18. package/dist/client/types/app/bsky/contact/defs.d.ts.map +1 -0
  19. package/dist/client/types/app/bsky/contact/defs.js +34 -0
  20. package/dist/client/types/app/bsky/contact/defs.js.map +1 -0
  21. package/dist/client/types/app/bsky/contact/dismissMatch.d.ts +27 -0
  22. package/dist/client/types/app/bsky/contact/dismissMatch.d.ts.map +1 -0
  23. package/dist/client/types/app/bsky/contact/dismissMatch.js +26 -0
  24. package/dist/client/types/app/bsky/contact/dismissMatch.js.map +1 -0
  25. package/dist/client/types/app/bsky/contact/getMatches.d.ts +28 -0
  26. package/dist/client/types/app/bsky/contact/getMatches.d.ts.map +1 -0
  27. package/dist/client/types/app/bsky/contact/getMatches.js +26 -0
  28. package/dist/client/types/app/bsky/contact/getMatches.js.map +1 -0
  29. package/dist/client/types/app/bsky/contact/getSyncStatus.d.ts +24 -0
  30. package/dist/client/types/app/bsky/contact/getSyncStatus.d.ts.map +1 -0
  31. package/dist/client/types/app/bsky/contact/getSyncStatus.js +26 -0
  32. package/dist/client/types/app/bsky/contact/getSyncStatus.js.map +1 -0
  33. package/dist/client/types/app/bsky/contact/importContacts.d.ts +32 -0
  34. package/dist/client/types/app/bsky/contact/importContacts.d.ts.map +1 -0
  35. package/dist/client/types/app/bsky/contact/importContacts.js +26 -0
  36. package/dist/client/types/app/bsky/contact/importContacts.js.map +1 -0
  37. package/dist/client/types/app/bsky/contact/removeData.d.ts +25 -0
  38. package/dist/client/types/app/bsky/contact/removeData.d.ts.map +1 -0
  39. package/dist/client/types/app/bsky/contact/removeData.js +26 -0
  40. package/dist/client/types/app/bsky/contact/removeData.js.map +1 -0
  41. package/dist/client/types/app/bsky/contact/sendNotification.d.ts +26 -0
  42. package/dist/client/types/app/bsky/contact/sendNotification.d.ts.map +1 -0
  43. package/dist/client/types/app/bsky/contact/sendNotification.js +11 -0
  44. package/dist/client/types/app/bsky/contact/sendNotification.js.map +1 -0
  45. package/dist/client/types/app/bsky/contact/startPhoneVerification.d.ts +27 -0
  46. package/dist/client/types/app/bsky/contact/startPhoneVerification.d.ts.map +1 -0
  47. package/dist/client/types/app/bsky/contact/startPhoneVerification.js +26 -0
  48. package/dist/client/types/app/bsky/contact/startPhoneVerification.js.map +1 -0
  49. package/dist/client/types/app/bsky/contact/verifyPhone.d.ts +31 -0
  50. package/dist/client/types/app/bsky/contact/verifyPhone.d.ts.map +1 -0
  51. package/dist/client/types/app/bsky/contact/verifyPhone.js +26 -0
  52. package/dist/client/types/app/bsky/contact/verifyPhone.js.map +1 -0
  53. package/dist/client/types/app/bsky/graph/defs.d.ts +8 -0
  54. package/dist/client/types/app/bsky/graph/defs.d.ts.map +1 -1
  55. package/dist/client/types/app/bsky/graph/defs.js.map +1 -1
  56. package/dist/predicate.d.ts +1 -0
  57. package/dist/predicate.d.ts.map +1 -1
  58. package/dist/predicate.js +2 -1
  59. package/dist/predicate.js.map +1 -1
  60. package/dist/types.d.ts +6 -0
  61. package/dist/types.d.ts.map +1 -1
  62. package/dist/types.js.map +1 -1
  63. package/package.json +5 -5
  64. package/src/agent.ts +3 -0
  65. package/src/client/index.ts +117 -0
  66. package/src/client/lexicons.ts +456 -0
  67. package/src/client/types/app/bsky/actor/defs.ts +22 -0
  68. package/src/client/types/app/bsky/contact/defs.ts +71 -0
  69. package/src/client/types/app/bsky/contact/dismissMatch.ts +52 -0
  70. package/src/client/types/app/bsky/contact/getMatches.ts +53 -0
  71. package/src/client/types/app/bsky/contact/getSyncStatus.ts +49 -0
  72. package/src/client/types/app/bsky/contact/importContacts.ts +58 -0
  73. package/src/client/types/app/bsky/contact/removeData.ts +49 -0
  74. package/src/client/types/app/bsky/contact/sendNotification.ts +44 -0
  75. package/src/client/types/app/bsky/contact/startPhoneVerification.ts +52 -0
  76. package/src/client/types/app/bsky/contact/verifyPhone.ts +57 -0
  77. package/src/client/types/app/bsky/graph/defs.ts +8 -0
  78. package/src/predicate.ts +3 -0
  79. package/src/types.ts +6 -0
  80. package/tests/atp-agent.test.ts +82 -1
  81. package/tsconfig.build.tsbuildinfo +1 -1
@@ -27,6 +27,15 @@ import * as AppBskyBookmarkCreateBookmark from './types/app/bsky/bookmark/create
27
27
  import * as AppBskyBookmarkDefs from './types/app/bsky/bookmark/defs.js'
28
28
  import * as AppBskyBookmarkDeleteBookmark from './types/app/bsky/bookmark/deleteBookmark.js'
29
29
  import * as AppBskyBookmarkGetBookmarks from './types/app/bsky/bookmark/getBookmarks.js'
30
+ import * as AppBskyContactDefs from './types/app/bsky/contact/defs.js'
31
+ import * as AppBskyContactDismissMatch from './types/app/bsky/contact/dismissMatch.js'
32
+ import * as AppBskyContactGetMatches from './types/app/bsky/contact/getMatches.js'
33
+ import * as AppBskyContactGetSyncStatus from './types/app/bsky/contact/getSyncStatus.js'
34
+ import * as AppBskyContactImportContacts from './types/app/bsky/contact/importContacts.js'
35
+ import * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.js'
36
+ import * as AppBskyContactSendNotification from './types/app/bsky/contact/sendNotification.js'
37
+ import * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'
38
+ import * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'
30
39
  import * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
31
40
  import * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
32
41
  import * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
@@ -325,6 +334,15 @@ export * as AppBskyBookmarkCreateBookmark from './types/app/bsky/bookmark/create
325
334
  export * as AppBskyBookmarkDefs from './types/app/bsky/bookmark/defs.js'
326
335
  export * as AppBskyBookmarkDeleteBookmark from './types/app/bsky/bookmark/deleteBookmark.js'
327
336
  export * as AppBskyBookmarkGetBookmarks from './types/app/bsky/bookmark/getBookmarks.js'
337
+ export * as AppBskyContactDefs from './types/app/bsky/contact/defs.js'
338
+ export * as AppBskyContactDismissMatch from './types/app/bsky/contact/dismissMatch.js'
339
+ export * as AppBskyContactGetMatches from './types/app/bsky/contact/getMatches.js'
340
+ export * as AppBskyContactGetSyncStatus from './types/app/bsky/contact/getSyncStatus.js'
341
+ export * as AppBskyContactImportContacts from './types/app/bsky/contact/importContacts.js'
342
+ export * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.js'
343
+ export * as AppBskyContactSendNotification from './types/app/bsky/contact/sendNotification.js'
344
+ export * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'
345
+ export * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'
328
346
  export * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
329
347
  export * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
330
348
  export * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
@@ -748,6 +766,7 @@ export class AppBskyNS {
748
766
  actor: AppBskyActorNS
749
767
  ageassurance: AppBskyAgeassuranceNS
750
768
  bookmark: AppBskyBookmarkNS
769
+ contact: AppBskyContactNS
751
770
  embed: AppBskyEmbedNS
752
771
  feed: AppBskyFeedNS
753
772
  graph: AppBskyGraphNS
@@ -762,6 +781,7 @@ export class AppBskyNS {
762
781
  this.actor = new AppBskyActorNS(client)
763
782
  this.ageassurance = new AppBskyAgeassuranceNS(client)
764
783
  this.bookmark = new AppBskyBookmarkNS(client)
784
+ this.contact = new AppBskyContactNS(client)
765
785
  this.embed = new AppBskyEmbedNS(client)
766
786
  this.feed = new AppBskyFeedNS(client)
767
787
  this.graph = new AppBskyGraphNS(client)
@@ -1122,6 +1142,103 @@ export class AppBskyBookmarkNS {
1122
1142
  }
1123
1143
  }
1124
1144
 
1145
+ export class AppBskyContactNS {
1146
+ _client: XrpcClient
1147
+
1148
+ constructor(client: XrpcClient) {
1149
+ this._client = client
1150
+ }
1151
+
1152
+ dismissMatch(
1153
+ data?: AppBskyContactDismissMatch.InputSchema,
1154
+ opts?: AppBskyContactDismissMatch.CallOptions,
1155
+ ): Promise<AppBskyContactDismissMatch.Response> {
1156
+ return this._client
1157
+ .call('app.bsky.contact.dismissMatch', opts?.qp, data, opts)
1158
+ .catch((e) => {
1159
+ throw AppBskyContactDismissMatch.toKnownErr(e)
1160
+ })
1161
+ }
1162
+
1163
+ getMatches(
1164
+ params?: AppBskyContactGetMatches.QueryParams,
1165
+ opts?: AppBskyContactGetMatches.CallOptions,
1166
+ ): Promise<AppBskyContactGetMatches.Response> {
1167
+ return this._client
1168
+ .call('app.bsky.contact.getMatches', params, undefined, opts)
1169
+ .catch((e) => {
1170
+ throw AppBskyContactGetMatches.toKnownErr(e)
1171
+ })
1172
+ }
1173
+
1174
+ getSyncStatus(
1175
+ params?: AppBskyContactGetSyncStatus.QueryParams,
1176
+ opts?: AppBskyContactGetSyncStatus.CallOptions,
1177
+ ): Promise<AppBskyContactGetSyncStatus.Response> {
1178
+ return this._client
1179
+ .call('app.bsky.contact.getSyncStatus', params, undefined, opts)
1180
+ .catch((e) => {
1181
+ throw AppBskyContactGetSyncStatus.toKnownErr(e)
1182
+ })
1183
+ }
1184
+
1185
+ importContacts(
1186
+ data?: AppBskyContactImportContacts.InputSchema,
1187
+ opts?: AppBskyContactImportContacts.CallOptions,
1188
+ ): Promise<AppBskyContactImportContacts.Response> {
1189
+ return this._client
1190
+ .call('app.bsky.contact.importContacts', opts?.qp, data, opts)
1191
+ .catch((e) => {
1192
+ throw AppBskyContactImportContacts.toKnownErr(e)
1193
+ })
1194
+ }
1195
+
1196
+ removeData(
1197
+ data?: AppBskyContactRemoveData.InputSchema,
1198
+ opts?: AppBskyContactRemoveData.CallOptions,
1199
+ ): Promise<AppBskyContactRemoveData.Response> {
1200
+ return this._client
1201
+ .call('app.bsky.contact.removeData', opts?.qp, data, opts)
1202
+ .catch((e) => {
1203
+ throw AppBskyContactRemoveData.toKnownErr(e)
1204
+ })
1205
+ }
1206
+
1207
+ sendNotification(
1208
+ data?: AppBskyContactSendNotification.InputSchema,
1209
+ opts?: AppBskyContactSendNotification.CallOptions,
1210
+ ): Promise<AppBskyContactSendNotification.Response> {
1211
+ return this._client.call(
1212
+ 'app.bsky.contact.sendNotification',
1213
+ opts?.qp,
1214
+ data,
1215
+ opts,
1216
+ )
1217
+ }
1218
+
1219
+ startPhoneVerification(
1220
+ data?: AppBskyContactStartPhoneVerification.InputSchema,
1221
+ opts?: AppBskyContactStartPhoneVerification.CallOptions,
1222
+ ): Promise<AppBskyContactStartPhoneVerification.Response> {
1223
+ return this._client
1224
+ .call('app.bsky.contact.startPhoneVerification', opts?.qp, data, opts)
1225
+ .catch((e) => {
1226
+ throw AppBskyContactStartPhoneVerification.toKnownErr(e)
1227
+ })
1228
+ }
1229
+
1230
+ verifyPhone(
1231
+ data?: AppBskyContactVerifyPhone.InputSchema,
1232
+ opts?: AppBskyContactVerifyPhone.CallOptions,
1233
+ ): Promise<AppBskyContactVerifyPhone.Response> {
1234
+ return this._client
1235
+ .call('app.bsky.contact.verifyPhone', opts?.qp, data, opts)
1236
+ .catch((e) => {
1237
+ throw AppBskyContactVerifyPhone.toKnownErr(e)
1238
+ })
1239
+ }
1240
+ }
1241
+
1125
1242
  export class AppBskyEmbedNS {
1126
1243
  _client: XrpcClient
1127
1244
 
@@ -401,6 +401,7 @@ export const schemaDict = {
401
401
  'lex:app.bsky.actor.defs#savedFeedsPref',
402
402
  'lex:app.bsky.actor.defs#savedFeedsPrefV2',
403
403
  'lex:app.bsky.actor.defs#personalDetailsPref',
404
+ 'lex:app.bsky.actor.defs#declaredAgePref',
404
405
  'lex:app.bsky.actor.defs#feedViewPref',
405
406
  'lex:app.bsky.actor.defs#threadViewPref',
406
407
  'lex:app.bsky.actor.defs#interestsPref',
@@ -507,6 +508,28 @@ export const schemaDict = {
507
508
  },
508
509
  },
509
510
  },
511
+ declaredAgePref: {
512
+ type: 'object',
513
+ description:
514
+ "Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration.",
515
+ properties: {
516
+ isOverAge13: {
517
+ type: 'boolean',
518
+ description:
519
+ 'Indicates if the user has declared that they are over 13 years of age.',
520
+ },
521
+ isOverAge16: {
522
+ type: 'boolean',
523
+ description:
524
+ 'Indicates if the user has declared that they are over 16 years of age.',
525
+ },
526
+ isOverAge18: {
527
+ type: 'boolean',
528
+ description:
529
+ 'Indicates if the user has declared that they are over 18 years of age.',
530
+ },
531
+ },
532
+ },
510
533
  feedViewPref: {
511
534
  type: 'object',
512
535
  required: ['feed'],
@@ -1736,6 +1759,403 @@ export const schemaDict = {
1736
1759
  },
1737
1760
  },
1738
1761
  },
1762
+ AppBskyContactDefs: {
1763
+ lexicon: 1,
1764
+ id: 'app.bsky.contact.defs',
1765
+ defs: {
1766
+ matchAndContactIndex: {
1767
+ description:
1768
+ 'Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match.',
1769
+ type: 'object',
1770
+ required: ['match', 'contactIndex'],
1771
+ properties: {
1772
+ match: {
1773
+ description: 'Profile of the matched user.',
1774
+ type: 'ref',
1775
+ ref: 'lex:app.bsky.actor.defs#profileView',
1776
+ },
1777
+ contactIndex: {
1778
+ description: 'The index of this match in the import contact input.',
1779
+ type: 'integer',
1780
+ minimum: 0,
1781
+ maximum: 999,
1782
+ },
1783
+ },
1784
+ },
1785
+ syncStatus: {
1786
+ type: 'object',
1787
+ required: ['syncedAt', 'matchesCount'],
1788
+ properties: {
1789
+ syncedAt: {
1790
+ description: 'Last date when contacts where imported.',
1791
+ type: 'string',
1792
+ format: 'datetime',
1793
+ },
1794
+ matchesCount: {
1795
+ description:
1796
+ 'Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match.',
1797
+ type: 'integer',
1798
+ minimum: 0,
1799
+ },
1800
+ },
1801
+ },
1802
+ notification: {
1803
+ description:
1804
+ 'A stash object to be sent via bsync representing a notification to be created.',
1805
+ type: 'object',
1806
+ required: ['from', 'to'],
1807
+ properties: {
1808
+ from: {
1809
+ description: 'The DID of who this notification comes from.',
1810
+ type: 'string',
1811
+ format: 'did',
1812
+ },
1813
+ to: {
1814
+ description: 'The DID of who this notification should go to.',
1815
+ type: 'string',
1816
+ format: 'did',
1817
+ },
1818
+ },
1819
+ },
1820
+ },
1821
+ },
1822
+ AppBskyContactDismissMatch: {
1823
+ lexicon: 1,
1824
+ id: 'app.bsky.contact.dismissMatch',
1825
+ defs: {
1826
+ main: {
1827
+ type: 'procedure',
1828
+ description:
1829
+ "WARNING: This is unstable and under active development, don't use it while this warning is here. Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication.",
1830
+ input: {
1831
+ encoding: 'application/json',
1832
+ schema: {
1833
+ type: 'object',
1834
+ required: ['subject'],
1835
+ properties: {
1836
+ subject: {
1837
+ description: "The subject's DID to dismiss the match with.",
1838
+ type: 'string',
1839
+ format: 'did',
1840
+ },
1841
+ },
1842
+ },
1843
+ },
1844
+ output: {
1845
+ encoding: 'application/json',
1846
+ schema: {
1847
+ type: 'object',
1848
+ properties: {},
1849
+ },
1850
+ },
1851
+ errors: [
1852
+ {
1853
+ name: 'TODO',
1854
+ description: 'TODO',
1855
+ },
1856
+ ],
1857
+ },
1858
+ },
1859
+ },
1860
+ AppBskyContactGetMatches: {
1861
+ lexicon: 1,
1862
+ id: 'app.bsky.contact.getMatches',
1863
+ defs: {
1864
+ main: {
1865
+ type: 'query',
1866
+ description:
1867
+ "WARNING: This is unstable and under active development, don't use it while this warning is here. Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication.",
1868
+ parameters: {
1869
+ type: 'params',
1870
+ properties: {
1871
+ limit: {
1872
+ type: 'integer',
1873
+ minimum: 1,
1874
+ maximum: 100,
1875
+ default: 50,
1876
+ },
1877
+ cursor: {
1878
+ type: 'string',
1879
+ },
1880
+ },
1881
+ },
1882
+ output: {
1883
+ encoding: 'application/json',
1884
+ schema: {
1885
+ type: 'object',
1886
+ required: ['matches'],
1887
+ properties: {
1888
+ cursor: {
1889
+ type: 'string',
1890
+ },
1891
+ matches: {
1892
+ type: 'array',
1893
+ items: {
1894
+ type: 'ref',
1895
+ ref: 'lex:app.bsky.actor.defs#profileView',
1896
+ },
1897
+ },
1898
+ },
1899
+ },
1900
+ },
1901
+ errors: [
1902
+ {
1903
+ name: 'TODO',
1904
+ description: 'TODO',
1905
+ },
1906
+ ],
1907
+ },
1908
+ },
1909
+ },
1910
+ AppBskyContactGetSyncStatus: {
1911
+ lexicon: 1,
1912
+ id: 'app.bsky.contact.getSyncStatus',
1913
+ defs: {
1914
+ main: {
1915
+ type: 'query',
1916
+ description:
1917
+ "WARNING: This is unstable and under active development, don't use it while this warning is here. Gets the user's current contact import status. Requires authentication.",
1918
+ parameters: {
1919
+ type: 'params',
1920
+ properties: {},
1921
+ },
1922
+ output: {
1923
+ encoding: 'application/json',
1924
+ schema: {
1925
+ type: 'object',
1926
+ properties: {
1927
+ syncStatus: {
1928
+ description:
1929
+ "If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since.",
1930
+ type: 'ref',
1931
+ ref: 'lex:app.bsky.contact.defs#syncStatus',
1932
+ },
1933
+ },
1934
+ },
1935
+ },
1936
+ errors: [
1937
+ {
1938
+ name: 'TODO',
1939
+ description: 'TODO',
1940
+ },
1941
+ ],
1942
+ },
1943
+ },
1944
+ },
1945
+ AppBskyContactImportContacts: {
1946
+ lexicon: 1,
1947
+ id: 'app.bsky.contact.importContacts',
1948
+ defs: {
1949
+ main: {
1950
+ type: 'procedure',
1951
+ description:
1952
+ "WARNING: This is unstable and under active development, don't use it while this warning is here. Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication.",
1953
+ input: {
1954
+ encoding: 'application/json',
1955
+ schema: {
1956
+ type: 'object',
1957
+ required: ['token', 'contacts'],
1958
+ properties: {
1959
+ token: {
1960
+ description:
1961
+ 'JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`.',
1962
+ type: 'string',
1963
+ },
1964
+ contacts: {
1965
+ description:
1966
+ "List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`.",
1967
+ type: 'array',
1968
+ items: {
1969
+ type: 'string',
1970
+ },
1971
+ minLength: 1,
1972
+ maxLength: 1000,
1973
+ },
1974
+ },
1975
+ },
1976
+ },
1977
+ output: {
1978
+ encoding: 'application/json',
1979
+ schema: {
1980
+ type: 'object',
1981
+ required: ['matchesAndContactIndexes'],
1982
+ properties: {
1983
+ matchesAndContactIndexes: {
1984
+ description:
1985
+ 'The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list.',
1986
+ type: 'array',
1987
+ items: {
1988
+ type: 'ref',
1989
+ ref: 'lex:app.bsky.contact.defs#matchAndContactIndex',
1990
+ },
1991
+ },
1992
+ },
1993
+ },
1994
+ },
1995
+ errors: [
1996
+ {
1997
+ name: 'TODO',
1998
+ description: 'TODO',
1999
+ },
2000
+ ],
2001
+ },
2002
+ },
2003
+ },
2004
+ AppBskyContactRemoveData: {
2005
+ lexicon: 1,
2006
+ id: 'app.bsky.contact.removeData',
2007
+ defs: {
2008
+ main: {
2009
+ type: 'procedure',
2010
+ description:
2011
+ "WARNING: This is unstable and under active development, don't use it while this warning is here. Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication.",
2012
+ input: {
2013
+ encoding: 'application/json',
2014
+ schema: {
2015
+ type: 'object',
2016
+ properties: {},
2017
+ },
2018
+ },
2019
+ output: {
2020
+ encoding: 'application/json',
2021
+ schema: {
2022
+ type: 'object',
2023
+ properties: {},
2024
+ },
2025
+ },
2026
+ errors: [
2027
+ {
2028
+ name: 'TODO',
2029
+ description: 'TODO',
2030
+ },
2031
+ ],
2032
+ },
2033
+ },
2034
+ },
2035
+ AppBskyContactSendNotification: {
2036
+ lexicon: 1,
2037
+ id: 'app.bsky.contact.sendNotification',
2038
+ defs: {
2039
+ main: {
2040
+ type: 'procedure',
2041
+ description:
2042
+ "WARNING: This is unstable and under active development, don't use it while this warning is here. System endpoint to send notifications related to contact imports. Requires role authentication.",
2043
+ input: {
2044
+ encoding: 'application/json',
2045
+ schema: {
2046
+ type: 'object',
2047
+ required: ['from', 'to'],
2048
+ properties: {
2049
+ from: {
2050
+ description: 'The DID of who this notification comes from.',
2051
+ type: 'string',
2052
+ format: 'did',
2053
+ },
2054
+ to: {
2055
+ description: 'The DID of who this notification should go to.',
2056
+ type: 'string',
2057
+ format: 'did',
2058
+ },
2059
+ },
2060
+ },
2061
+ },
2062
+ output: {
2063
+ encoding: 'application/json',
2064
+ schema: {
2065
+ type: 'object',
2066
+ properties: {},
2067
+ },
2068
+ },
2069
+ },
2070
+ },
2071
+ },
2072
+ AppBskyContactStartPhoneVerification: {
2073
+ lexicon: 1,
2074
+ id: 'app.bsky.contact.startPhoneVerification',
2075
+ defs: {
2076
+ main: {
2077
+ type: 'procedure',
2078
+ description:
2079
+ "WARNING: This is unstable and under active development, don't use it while this warning is here. Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication.",
2080
+ input: {
2081
+ encoding: 'application/json',
2082
+ schema: {
2083
+ type: 'object',
2084
+ required: ['phone'],
2085
+ properties: {
2086
+ phone: {
2087
+ description: 'The phone number to receive the code via SMS.',
2088
+ type: 'string',
2089
+ },
2090
+ },
2091
+ },
2092
+ },
2093
+ output: {
2094
+ encoding: 'application/json',
2095
+ schema: {
2096
+ type: 'object',
2097
+ properties: {},
2098
+ },
2099
+ },
2100
+ errors: [
2101
+ {
2102
+ name: 'TODO',
2103
+ description: 'TODO',
2104
+ },
2105
+ ],
2106
+ },
2107
+ },
2108
+ },
2109
+ AppBskyContactVerifyPhone: {
2110
+ lexicon: 1,
2111
+ id: 'app.bsky.contact.verifyPhone',
2112
+ defs: {
2113
+ main: {
2114
+ type: 'procedure',
2115
+ description:
2116
+ "WARNING: This is unstable and under active development, don't use it while this warning is here. Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.",
2117
+ input: {
2118
+ encoding: 'application/json',
2119
+ schema: {
2120
+ type: 'object',
2121
+ required: ['phone', 'code'],
2122
+ properties: {
2123
+ phone: {
2124
+ description:
2125
+ 'The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`.',
2126
+ type: 'string',
2127
+ },
2128
+ code: {
2129
+ description:
2130
+ 'The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`.',
2131
+ type: 'string',
2132
+ },
2133
+ },
2134
+ },
2135
+ },
2136
+ output: {
2137
+ encoding: 'application/json',
2138
+ schema: {
2139
+ type: 'object',
2140
+ required: ['token'],
2141
+ properties: {
2142
+ token: {
2143
+ description:
2144
+ 'JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call.',
2145
+ type: 'string',
2146
+ },
2147
+ },
2148
+ },
2149
+ },
2150
+ errors: [
2151
+ {
2152
+ name: 'TODO',
2153
+ description: 'TODO',
2154
+ },
2155
+ ],
2156
+ },
2157
+ },
2158
+ },
1739
2159
  AppBskyEmbedDefs: {
1740
2160
  lexicon: 1,
1741
2161
  id: 'app.bsky.embed.defs',
@@ -4461,6 +4881,30 @@ export const schemaDict = {
4461
4881
  description:
4462
4882
  'if the actor is followed by this DID, contains the AT-URI of the follow record',
4463
4883
  },
4884
+ blocking: {
4885
+ type: 'string',
4886
+ format: 'at-uri',
4887
+ description:
4888
+ 'if the actor blocks this DID, this is the AT-URI of the block record',
4889
+ },
4890
+ blockedBy: {
4891
+ type: 'string',
4892
+ format: 'at-uri',
4893
+ description:
4894
+ 'if the actor is blocked by this DID, contains the AT-URI of the block record',
4895
+ },
4896
+ blockingByList: {
4897
+ type: 'string',
4898
+ format: 'at-uri',
4899
+ description:
4900
+ 'if the actor blocks this DID via a block list, this is the AT-URI of the listblock record',
4901
+ },
4902
+ blockedByList: {
4903
+ type: 'string',
4904
+ format: 'at-uri',
4905
+ description:
4906
+ 'if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record',
4907
+ },
4464
4908
  },
4465
4909
  },
4466
4910
  },
@@ -15485,6 +15929,7 @@ export const schemaDict = {
15485
15929
  },
15486
15930
  comment: {
15487
15931
  type: 'string',
15932
+ minLength: 1,
15488
15933
  description: 'Comment describing the reason for the override.',
15489
15934
  },
15490
15935
  },
@@ -15496,6 +15941,7 @@ export const schemaDict = {
15496
15941
  required: ['comment'],
15497
15942
  properties: {
15498
15943
  comment: {
15944
+ minLength: 1,
15499
15945
  type: 'string',
15500
15946
  description: 'Comment describing the reason for the revocation.',
15501
15947
  },
@@ -19575,6 +20021,16 @@ export const ids = {
19575
20021
  AppBskyBookmarkDefs: 'app.bsky.bookmark.defs',
19576
20022
  AppBskyBookmarkDeleteBookmark: 'app.bsky.bookmark.deleteBookmark',
19577
20023
  AppBskyBookmarkGetBookmarks: 'app.bsky.bookmark.getBookmarks',
20024
+ AppBskyContactDefs: 'app.bsky.contact.defs',
20025
+ AppBskyContactDismissMatch: 'app.bsky.contact.dismissMatch',
20026
+ AppBskyContactGetMatches: 'app.bsky.contact.getMatches',
20027
+ AppBskyContactGetSyncStatus: 'app.bsky.contact.getSyncStatus',
20028
+ AppBskyContactImportContacts: 'app.bsky.contact.importContacts',
20029
+ AppBskyContactRemoveData: 'app.bsky.contact.removeData',
20030
+ AppBskyContactSendNotification: 'app.bsky.contact.sendNotification',
20031
+ AppBskyContactStartPhoneVerification:
20032
+ 'app.bsky.contact.startPhoneVerification',
20033
+ AppBskyContactVerifyPhone: 'app.bsky.contact.verifyPhone',
19578
20034
  AppBskyEmbedDefs: 'app.bsky.embed.defs',
19579
20035
  AppBskyEmbedExternal: 'app.bsky.embed.external',
19580
20036
  AppBskyEmbedImages: 'app.bsky.embed.images',
@@ -259,6 +259,7 @@ export type Preferences = (
259
259
  | $Typed<SavedFeedsPref>
260
260
  | $Typed<SavedFeedsPrefV2>
261
261
  | $Typed<PersonalDetailsPref>
262
+ | $Typed<DeclaredAgePref>
262
263
  | $Typed<FeedViewPref>
263
264
  | $Typed<ThreadViewPref>
264
265
  | $Typed<InterestsPref>
@@ -370,6 +371,27 @@ export function validatePersonalDetailsPref<V>(v: V) {
370
371
  return validate<PersonalDetailsPref & V>(v, id, hashPersonalDetailsPref)
371
372
  }
372
373
 
374
+ /** Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration. */
375
+ export interface DeclaredAgePref {
376
+ $type?: 'app.bsky.actor.defs#declaredAgePref'
377
+ /** Indicates if the user has declared that they are over 13 years of age. */
378
+ isOverAge13?: boolean
379
+ /** Indicates if the user has declared that they are over 16 years of age. */
380
+ isOverAge16?: boolean
381
+ /** Indicates if the user has declared that they are over 18 years of age. */
382
+ isOverAge18?: boolean
383
+ }
384
+
385
+ const hashDeclaredAgePref = 'declaredAgePref'
386
+
387
+ export function isDeclaredAgePref<V>(v: V) {
388
+ return is$typed(v, id, hashDeclaredAgePref)
389
+ }
390
+
391
+ export function validateDeclaredAgePref<V>(v: V) {
392
+ return validate<DeclaredAgePref & V>(v, id, hashDeclaredAgePref)
393
+ }
394
+
373
395
  export interface FeedViewPref {
374
396
  $type?: 'app.bsky.actor.defs#feedViewPref'
375
397
  /** The URI of the feed, or an identifier which describes the feed. */