@atproto/api 0.18.4 → 0.18.5

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 (57) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/client/index.d.ts +27 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +91 -8
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +668 -0
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +356 -0
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/app/bsky/contact/defs.d.ts +24 -0
  11. package/dist/client/types/app/bsky/contact/defs.d.ts.map +1 -0
  12. package/dist/client/types/app/bsky/contact/defs.js +25 -0
  13. package/dist/client/types/app/bsky/contact/defs.js.map +1 -0
  14. package/dist/client/types/app/bsky/contact/dismissMatch.d.ts +27 -0
  15. package/dist/client/types/app/bsky/contact/dismissMatch.d.ts.map +1 -0
  16. package/dist/client/types/app/bsky/contact/dismissMatch.js +26 -0
  17. package/dist/client/types/app/bsky/contact/dismissMatch.js.map +1 -0
  18. package/dist/client/types/app/bsky/contact/getMatches.d.ts +28 -0
  19. package/dist/client/types/app/bsky/contact/getMatches.d.ts.map +1 -0
  20. package/dist/client/types/app/bsky/contact/getMatches.js +26 -0
  21. package/dist/client/types/app/bsky/contact/getMatches.js.map +1 -0
  22. package/dist/client/types/app/bsky/contact/getSyncStatus.d.ts +24 -0
  23. package/dist/client/types/app/bsky/contact/getSyncStatus.d.ts.map +1 -0
  24. package/dist/client/types/app/bsky/contact/getSyncStatus.js +26 -0
  25. package/dist/client/types/app/bsky/contact/getSyncStatus.js.map +1 -0
  26. package/dist/client/types/app/bsky/contact/importContacts.d.ts +32 -0
  27. package/dist/client/types/app/bsky/contact/importContacts.d.ts.map +1 -0
  28. package/dist/client/types/app/bsky/contact/importContacts.js +26 -0
  29. package/dist/client/types/app/bsky/contact/importContacts.js.map +1 -0
  30. package/dist/client/types/app/bsky/contact/removeData.d.ts +25 -0
  31. package/dist/client/types/app/bsky/contact/removeData.d.ts.map +1 -0
  32. package/dist/client/types/app/bsky/contact/removeData.js +26 -0
  33. package/dist/client/types/app/bsky/contact/removeData.js.map +1 -0
  34. package/dist/client/types/app/bsky/contact/startPhoneVerification.d.ts +27 -0
  35. package/dist/client/types/app/bsky/contact/startPhoneVerification.d.ts.map +1 -0
  36. package/dist/client/types/app/bsky/contact/startPhoneVerification.js +26 -0
  37. package/dist/client/types/app/bsky/contact/startPhoneVerification.js.map +1 -0
  38. package/dist/client/types/app/bsky/contact/verifyPhone.d.ts +31 -0
  39. package/dist/client/types/app/bsky/contact/verifyPhone.d.ts.map +1 -0
  40. package/dist/client/types/app/bsky/contact/verifyPhone.js +26 -0
  41. package/dist/client/types/app/bsky/contact/verifyPhone.js.map +1 -0
  42. package/dist/client/types/app/bsky/graph/defs.d.ts +8 -0
  43. package/dist/client/types/app/bsky/graph/defs.d.ts.map +1 -1
  44. package/dist/client/types/app/bsky/graph/defs.js.map +1 -1
  45. package/package.json +5 -5
  46. package/src/client/index.ts +103 -0
  47. package/src/client/lexicons.ts +377 -0
  48. package/src/client/types/app/bsky/contact/defs.ts +52 -0
  49. package/src/client/types/app/bsky/contact/dismissMatch.ts +52 -0
  50. package/src/client/types/app/bsky/contact/getMatches.ts +53 -0
  51. package/src/client/types/app/bsky/contact/getSyncStatus.ts +49 -0
  52. package/src/client/types/app/bsky/contact/importContacts.ts +58 -0
  53. package/src/client/types/app/bsky/contact/removeData.ts +49 -0
  54. package/src/client/types/app/bsky/contact/startPhoneVerification.ts +52 -0
  55. package/src/client/types/app/bsky/contact/verifyPhone.ts +57 -0
  56. package/src/client/types/app/bsky/graph/defs.ts +8 -0
  57. package/tsconfig.build.tsbuildinfo +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.18.4",
3
+ "version": "0.18.5",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -21,17 +21,17 @@
21
21
  "multiformats": "^9.9.0",
22
22
  "tlds": "^1.234.0",
23
23
  "zod": "^3.23.8",
24
- "@atproto/common-web": "^0.4.6",
25
- "@atproto/lexicon": "^0.5.2",
24
+ "@atproto/common-web": "^0.4.7",
25
+ "@atproto/lexicon": "^0.6.0",
26
26
  "@atproto/syntax": "^0.4.2",
27
- "@atproto/xrpc": "^0.7.6"
27
+ "@atproto/xrpc": "^0.7.7"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@jest/globals": "^28.1.3",
31
31
  "jest": "^28.1.2",
32
32
  "prettier": "^3.2.5",
33
33
  "typescript": "^5.6.3",
34
- "@atproto/lex-cli": "^0.9.7"
34
+ "@atproto/lex-cli": "^0.9.8"
35
35
  },
36
36
  "scripts": {
37
37
  "codegen": "node ./scripts/generate-code.mjs && lex gen-api --yes ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/*",
@@ -27,6 +27,14 @@ 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 AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'
37
+ import * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'
30
38
  import * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
31
39
  import * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
32
40
  import * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
@@ -325,6 +333,14 @@ export * as AppBskyBookmarkCreateBookmark from './types/app/bsky/bookmark/create
325
333
  export * as AppBskyBookmarkDefs from './types/app/bsky/bookmark/defs.js'
326
334
  export * as AppBskyBookmarkDeleteBookmark from './types/app/bsky/bookmark/deleteBookmark.js'
327
335
  export * as AppBskyBookmarkGetBookmarks from './types/app/bsky/bookmark/getBookmarks.js'
336
+ export * as AppBskyContactDefs from './types/app/bsky/contact/defs.js'
337
+ export * as AppBskyContactDismissMatch from './types/app/bsky/contact/dismissMatch.js'
338
+ export * as AppBskyContactGetMatches from './types/app/bsky/contact/getMatches.js'
339
+ export * as AppBskyContactGetSyncStatus from './types/app/bsky/contact/getSyncStatus.js'
340
+ export * as AppBskyContactImportContacts from './types/app/bsky/contact/importContacts.js'
341
+ export * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.js'
342
+ export * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'
343
+ export * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'
328
344
  export * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
329
345
  export * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
330
346
  export * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
@@ -748,6 +764,7 @@ export class AppBskyNS {
748
764
  actor: AppBskyActorNS
749
765
  ageassurance: AppBskyAgeassuranceNS
750
766
  bookmark: AppBskyBookmarkNS
767
+ contact: AppBskyContactNS
751
768
  embed: AppBskyEmbedNS
752
769
  feed: AppBskyFeedNS
753
770
  graph: AppBskyGraphNS
@@ -762,6 +779,7 @@ export class AppBskyNS {
762
779
  this.actor = new AppBskyActorNS(client)
763
780
  this.ageassurance = new AppBskyAgeassuranceNS(client)
764
781
  this.bookmark = new AppBskyBookmarkNS(client)
782
+ this.contact = new AppBskyContactNS(client)
765
783
  this.embed = new AppBskyEmbedNS(client)
766
784
  this.feed = new AppBskyFeedNS(client)
767
785
  this.graph = new AppBskyGraphNS(client)
@@ -1122,6 +1140,91 @@ export class AppBskyBookmarkNS {
1122
1140
  }
1123
1141
  }
1124
1142
 
1143
+ export class AppBskyContactNS {
1144
+ _client: XrpcClient
1145
+
1146
+ constructor(client: XrpcClient) {
1147
+ this._client = client
1148
+ }
1149
+
1150
+ dismissMatch(
1151
+ data?: AppBskyContactDismissMatch.InputSchema,
1152
+ opts?: AppBskyContactDismissMatch.CallOptions,
1153
+ ): Promise<AppBskyContactDismissMatch.Response> {
1154
+ return this._client
1155
+ .call('app.bsky.contact.dismissMatch', opts?.qp, data, opts)
1156
+ .catch((e) => {
1157
+ throw AppBskyContactDismissMatch.toKnownErr(e)
1158
+ })
1159
+ }
1160
+
1161
+ getMatches(
1162
+ params?: AppBskyContactGetMatches.QueryParams,
1163
+ opts?: AppBskyContactGetMatches.CallOptions,
1164
+ ): Promise<AppBskyContactGetMatches.Response> {
1165
+ return this._client
1166
+ .call('app.bsky.contact.getMatches', params, undefined, opts)
1167
+ .catch((e) => {
1168
+ throw AppBskyContactGetMatches.toKnownErr(e)
1169
+ })
1170
+ }
1171
+
1172
+ getSyncStatus(
1173
+ params?: AppBskyContactGetSyncStatus.QueryParams,
1174
+ opts?: AppBskyContactGetSyncStatus.CallOptions,
1175
+ ): Promise<AppBskyContactGetSyncStatus.Response> {
1176
+ return this._client
1177
+ .call('app.bsky.contact.getSyncStatus', params, undefined, opts)
1178
+ .catch((e) => {
1179
+ throw AppBskyContactGetSyncStatus.toKnownErr(e)
1180
+ })
1181
+ }
1182
+
1183
+ importContacts(
1184
+ data?: AppBskyContactImportContacts.InputSchema,
1185
+ opts?: AppBskyContactImportContacts.CallOptions,
1186
+ ): Promise<AppBskyContactImportContacts.Response> {
1187
+ return this._client
1188
+ .call('app.bsky.contact.importContacts', opts?.qp, data, opts)
1189
+ .catch((e) => {
1190
+ throw AppBskyContactImportContacts.toKnownErr(e)
1191
+ })
1192
+ }
1193
+
1194
+ removeData(
1195
+ data?: AppBskyContactRemoveData.InputSchema,
1196
+ opts?: AppBskyContactRemoveData.CallOptions,
1197
+ ): Promise<AppBskyContactRemoveData.Response> {
1198
+ return this._client
1199
+ .call('app.bsky.contact.removeData', opts?.qp, data, opts)
1200
+ .catch((e) => {
1201
+ throw AppBskyContactRemoveData.toKnownErr(e)
1202
+ })
1203
+ }
1204
+
1205
+ startPhoneVerification(
1206
+ data?: AppBskyContactStartPhoneVerification.InputSchema,
1207
+ opts?: AppBskyContactStartPhoneVerification.CallOptions,
1208
+ ): Promise<AppBskyContactStartPhoneVerification.Response> {
1209
+ return this._client
1210
+ .call('app.bsky.contact.startPhoneVerification', opts?.qp, data, opts)
1211
+ .catch((e) => {
1212
+ throw AppBskyContactStartPhoneVerification.toKnownErr(e)
1213
+ })
1214
+ }
1215
+
1216
+ verifyPhone(
1217
+ data?: AppBskyContactVerifyPhone.InputSchema,
1218
+ opts?: AppBskyContactVerifyPhone.CallOptions,
1219
+ ): Promise<AppBskyContactVerifyPhone.Response> {
1220
+ return this._client
1221
+ .call('app.bsky.contact.verifyPhone', opts?.qp, data, opts)
1222
+ .catch((e) => {
1223
+ throw AppBskyContactVerifyPhone.toKnownErr(e)
1224
+ })
1225
+ }
1226
+ }
1227
+
1125
1228
  export class AppBskyEmbedNS {
1126
1229
  _client: XrpcClient
1127
1230
 
@@ -1736,6 +1736,348 @@ export const schemaDict = {
1736
1736
  },
1737
1737
  },
1738
1738
  },
1739
+ AppBskyContactDefs: {
1740
+ lexicon: 1,
1741
+ id: 'app.bsky.contact.defs',
1742
+ defs: {
1743
+ matchAndContactIndex: {
1744
+ description:
1745
+ '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.',
1746
+ type: 'object',
1747
+ required: ['match', 'contactIndex'],
1748
+ properties: {
1749
+ match: {
1750
+ description: 'Profile of the matched user.',
1751
+ type: 'ref',
1752
+ ref: 'lex:app.bsky.actor.defs#profileView',
1753
+ },
1754
+ contactIndex: {
1755
+ description: 'The index of this match in the import contact input.',
1756
+ type: 'integer',
1757
+ minimum: 0,
1758
+ maximum: 999,
1759
+ },
1760
+ },
1761
+ },
1762
+ syncStatus: {
1763
+ type: 'object',
1764
+ required: ['syncedAt', 'matchesCount'],
1765
+ properties: {
1766
+ syncedAt: {
1767
+ description: 'Last date when contacts where imported.',
1768
+ type: 'string',
1769
+ format: 'datetime',
1770
+ },
1771
+ matchesCount: {
1772
+ description:
1773
+ '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.',
1774
+ type: 'integer',
1775
+ minimum: 0,
1776
+ },
1777
+ },
1778
+ },
1779
+ },
1780
+ },
1781
+ AppBskyContactDismissMatch: {
1782
+ lexicon: 1,
1783
+ id: 'app.bsky.contact.dismissMatch',
1784
+ defs: {
1785
+ main: {
1786
+ type: 'procedure',
1787
+ description:
1788
+ "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.",
1789
+ input: {
1790
+ encoding: 'application/json',
1791
+ schema: {
1792
+ type: 'object',
1793
+ required: ['subject'],
1794
+ properties: {
1795
+ subject: {
1796
+ description: "The subject's DID to dismiss the match with.",
1797
+ type: 'string',
1798
+ format: 'did',
1799
+ },
1800
+ },
1801
+ },
1802
+ },
1803
+ output: {
1804
+ encoding: 'application/json',
1805
+ schema: {
1806
+ type: 'object',
1807
+ properties: {},
1808
+ },
1809
+ },
1810
+ errors: [
1811
+ {
1812
+ name: 'TODO',
1813
+ description: 'TODO',
1814
+ },
1815
+ ],
1816
+ },
1817
+ },
1818
+ },
1819
+ AppBskyContactGetMatches: {
1820
+ lexicon: 1,
1821
+ id: 'app.bsky.contact.getMatches',
1822
+ defs: {
1823
+ main: {
1824
+ type: 'query',
1825
+ description:
1826
+ "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.",
1827
+ parameters: {
1828
+ type: 'params',
1829
+ properties: {
1830
+ limit: {
1831
+ type: 'integer',
1832
+ minimum: 1,
1833
+ maximum: 100,
1834
+ default: 50,
1835
+ },
1836
+ cursor: {
1837
+ type: 'string',
1838
+ },
1839
+ },
1840
+ },
1841
+ output: {
1842
+ encoding: 'application/json',
1843
+ schema: {
1844
+ type: 'object',
1845
+ required: ['matches'],
1846
+ properties: {
1847
+ cursor: {
1848
+ type: 'string',
1849
+ },
1850
+ matches: {
1851
+ type: 'array',
1852
+ items: {
1853
+ type: 'ref',
1854
+ ref: 'lex:app.bsky.actor.defs#profileView',
1855
+ },
1856
+ },
1857
+ },
1858
+ },
1859
+ },
1860
+ errors: [
1861
+ {
1862
+ name: 'TODO',
1863
+ description: 'TODO',
1864
+ },
1865
+ ],
1866
+ },
1867
+ },
1868
+ },
1869
+ AppBskyContactGetSyncStatus: {
1870
+ lexicon: 1,
1871
+ id: 'app.bsky.contact.getSyncStatus',
1872
+ defs: {
1873
+ main: {
1874
+ type: 'query',
1875
+ description:
1876
+ "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.",
1877
+ parameters: {
1878
+ type: 'params',
1879
+ properties: {},
1880
+ },
1881
+ output: {
1882
+ encoding: 'application/json',
1883
+ schema: {
1884
+ type: 'object',
1885
+ properties: {
1886
+ syncStatus: {
1887
+ description:
1888
+ "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.",
1889
+ type: 'ref',
1890
+ ref: 'lex:app.bsky.contact.defs#syncStatus',
1891
+ },
1892
+ },
1893
+ },
1894
+ },
1895
+ errors: [
1896
+ {
1897
+ name: 'TODO',
1898
+ description: 'TODO',
1899
+ },
1900
+ ],
1901
+ },
1902
+ },
1903
+ },
1904
+ AppBskyContactImportContacts: {
1905
+ lexicon: 1,
1906
+ id: 'app.bsky.contact.importContacts',
1907
+ defs: {
1908
+ main: {
1909
+ type: 'procedure',
1910
+ description:
1911
+ "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.",
1912
+ input: {
1913
+ encoding: 'application/json',
1914
+ schema: {
1915
+ type: 'object',
1916
+ required: ['token', 'contacts'],
1917
+ properties: {
1918
+ token: {
1919
+ description:
1920
+ 'JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`.',
1921
+ type: 'string',
1922
+ },
1923
+ contacts: {
1924
+ description:
1925
+ "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`.",
1926
+ type: 'array',
1927
+ items: {
1928
+ type: 'string',
1929
+ },
1930
+ minLength: 1,
1931
+ maxLength: 1000,
1932
+ },
1933
+ },
1934
+ },
1935
+ },
1936
+ output: {
1937
+ encoding: 'application/json',
1938
+ schema: {
1939
+ type: 'object',
1940
+ required: ['matchesAndContactIndexes'],
1941
+ properties: {
1942
+ matchesAndContactIndexes: {
1943
+ description:
1944
+ 'The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list.',
1945
+ type: 'array',
1946
+ items: {
1947
+ type: 'ref',
1948
+ ref: 'lex:app.bsky.contact.defs#matchAndContactIndex',
1949
+ },
1950
+ },
1951
+ },
1952
+ },
1953
+ },
1954
+ errors: [
1955
+ {
1956
+ name: 'TODO',
1957
+ description: 'TODO',
1958
+ },
1959
+ ],
1960
+ },
1961
+ },
1962
+ },
1963
+ AppBskyContactRemoveData: {
1964
+ lexicon: 1,
1965
+ id: 'app.bsky.contact.removeData',
1966
+ defs: {
1967
+ main: {
1968
+ type: 'procedure',
1969
+ description:
1970
+ "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.",
1971
+ input: {
1972
+ encoding: 'application/json',
1973
+ schema: {
1974
+ type: 'object',
1975
+ properties: {},
1976
+ },
1977
+ },
1978
+ output: {
1979
+ encoding: 'application/json',
1980
+ schema: {
1981
+ type: 'object',
1982
+ properties: {},
1983
+ },
1984
+ },
1985
+ errors: [
1986
+ {
1987
+ name: 'TODO',
1988
+ description: 'TODO',
1989
+ },
1990
+ ],
1991
+ },
1992
+ },
1993
+ },
1994
+ AppBskyContactStartPhoneVerification: {
1995
+ lexicon: 1,
1996
+ id: 'app.bsky.contact.startPhoneVerification',
1997
+ defs: {
1998
+ main: {
1999
+ type: 'procedure',
2000
+ description:
2001
+ "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.",
2002
+ input: {
2003
+ encoding: 'application/json',
2004
+ schema: {
2005
+ type: 'object',
2006
+ required: ['phone'],
2007
+ properties: {
2008
+ phone: {
2009
+ description: 'The phone number to receive the code via SMS.',
2010
+ type: 'string',
2011
+ },
2012
+ },
2013
+ },
2014
+ },
2015
+ output: {
2016
+ encoding: 'application/json',
2017
+ schema: {
2018
+ type: 'object',
2019
+ properties: {},
2020
+ },
2021
+ },
2022
+ errors: [
2023
+ {
2024
+ name: 'TODO',
2025
+ description: 'TODO',
2026
+ },
2027
+ ],
2028
+ },
2029
+ },
2030
+ },
2031
+ AppBskyContactVerifyPhone: {
2032
+ lexicon: 1,
2033
+ id: 'app.bsky.contact.verifyPhone',
2034
+ defs: {
2035
+ main: {
2036
+ type: 'procedure',
2037
+ description:
2038
+ "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.",
2039
+ input: {
2040
+ encoding: 'application/json',
2041
+ schema: {
2042
+ type: 'object',
2043
+ required: ['phone', 'code'],
2044
+ properties: {
2045
+ phone: {
2046
+ description:
2047
+ 'The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`.',
2048
+ type: 'string',
2049
+ },
2050
+ code: {
2051
+ description:
2052
+ 'The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`.',
2053
+ type: 'string',
2054
+ },
2055
+ },
2056
+ },
2057
+ },
2058
+ output: {
2059
+ encoding: 'application/json',
2060
+ schema: {
2061
+ type: 'object',
2062
+ required: ['token'],
2063
+ properties: {
2064
+ token: {
2065
+ description:
2066
+ 'JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call.',
2067
+ type: 'string',
2068
+ },
2069
+ },
2070
+ },
2071
+ },
2072
+ errors: [
2073
+ {
2074
+ name: 'TODO',
2075
+ description: 'TODO',
2076
+ },
2077
+ ],
2078
+ },
2079
+ },
2080
+ },
1739
2081
  AppBskyEmbedDefs: {
1740
2082
  lexicon: 1,
1741
2083
  id: 'app.bsky.embed.defs',
@@ -4461,6 +4803,30 @@ export const schemaDict = {
4461
4803
  description:
4462
4804
  'if the actor is followed by this DID, contains the AT-URI of the follow record',
4463
4805
  },
4806
+ blocking: {
4807
+ type: 'string',
4808
+ format: 'at-uri',
4809
+ description:
4810
+ 'if the actor blocks this DID, this is the AT-URI of the block record',
4811
+ },
4812
+ blockedBy: {
4813
+ type: 'string',
4814
+ format: 'at-uri',
4815
+ description:
4816
+ 'if the actor is blocked by this DID, contains the AT-URI of the block record',
4817
+ },
4818
+ blockingByList: {
4819
+ type: 'string',
4820
+ format: 'at-uri',
4821
+ description:
4822
+ 'if the actor blocks this DID via a block list, this is the AT-URI of the listblock record',
4823
+ },
4824
+ blockedByList: {
4825
+ type: 'string',
4826
+ format: 'at-uri',
4827
+ description:
4828
+ 'if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record',
4829
+ },
4464
4830
  },
4465
4831
  },
4466
4832
  },
@@ -15485,6 +15851,7 @@ export const schemaDict = {
15485
15851
  },
15486
15852
  comment: {
15487
15853
  type: 'string',
15854
+ minLength: 1,
15488
15855
  description: 'Comment describing the reason for the override.',
15489
15856
  },
15490
15857
  },
@@ -15496,6 +15863,7 @@ export const schemaDict = {
15496
15863
  required: ['comment'],
15497
15864
  properties: {
15498
15865
  comment: {
15866
+ minLength: 1,
15499
15867
  type: 'string',
15500
15868
  description: 'Comment describing the reason for the revocation.',
15501
15869
  },
@@ -19575,6 +19943,15 @@ export const ids = {
19575
19943
  AppBskyBookmarkDefs: 'app.bsky.bookmark.defs',
19576
19944
  AppBskyBookmarkDeleteBookmark: 'app.bsky.bookmark.deleteBookmark',
19577
19945
  AppBskyBookmarkGetBookmarks: 'app.bsky.bookmark.getBookmarks',
19946
+ AppBskyContactDefs: 'app.bsky.contact.defs',
19947
+ AppBskyContactDismissMatch: 'app.bsky.contact.dismissMatch',
19948
+ AppBskyContactGetMatches: 'app.bsky.contact.getMatches',
19949
+ AppBskyContactGetSyncStatus: 'app.bsky.contact.getSyncStatus',
19950
+ AppBskyContactImportContacts: 'app.bsky.contact.importContacts',
19951
+ AppBskyContactRemoveData: 'app.bsky.contact.removeData',
19952
+ AppBskyContactStartPhoneVerification:
19953
+ 'app.bsky.contact.startPhoneVerification',
19954
+ AppBskyContactVerifyPhone: 'app.bsky.contact.verifyPhone',
19578
19955
  AppBskyEmbedDefs: 'app.bsky.embed.defs',
19579
19956
  AppBskyEmbedExternal: 'app.bsky.embed.external',
19580
19957
  AppBskyEmbedImages: 'app.bsky.embed.images',
@@ -0,0 +1,52 @@
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 AppBskyActorDefs from '../actor/defs.js'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'app.bsky.contact.defs'
17
+
18
+ /** 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. */
19
+ export interface MatchAndContactIndex {
20
+ $type?: 'app.bsky.contact.defs#matchAndContactIndex'
21
+ match: AppBskyActorDefs.ProfileView
22
+ /** The index of this match in the import contact input. */
23
+ contactIndex: number
24
+ }
25
+
26
+ const hashMatchAndContactIndex = 'matchAndContactIndex'
27
+
28
+ export function isMatchAndContactIndex<V>(v: V) {
29
+ return is$typed(v, id, hashMatchAndContactIndex)
30
+ }
31
+
32
+ export function validateMatchAndContactIndex<V>(v: V) {
33
+ return validate<MatchAndContactIndex & V>(v, id, hashMatchAndContactIndex)
34
+ }
35
+
36
+ export interface SyncStatus {
37
+ $type?: 'app.bsky.contact.defs#syncStatus'
38
+ /** Last date when contacts where imported. */
39
+ syncedAt: string
40
+ /** 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. */
41
+ matchesCount: number
42
+ }
43
+
44
+ const hashSyncStatus = 'syncStatus'
45
+
46
+ export function isSyncStatus<V>(v: V) {
47
+ return is$typed(v, id, hashSyncStatus)
48
+ }
49
+
50
+ export function validateSyncStatus<V>(v: V) {
51
+ return validate<SyncStatus & V>(v, id, hashSyncStatus)
52
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc'
5
+ import { type ValidationResult, BlobRef } from '@atproto/lexicon'
6
+ import { CID } from 'multiformats/cid'
7
+ import { validate as _validate } from '../../../../lexicons'
8
+ import {
9
+ type $Typed,
10
+ is$typed as _is$typed,
11
+ type OmitKey,
12
+ } from '../../../../util'
13
+
14
+ const is$typed = _is$typed,
15
+ validate = _validate
16
+ const id = 'app.bsky.contact.dismissMatch'
17
+
18
+ export type QueryParams = {}
19
+
20
+ export interface InputSchema {
21
+ /** The subject's DID to dismiss the match with. */
22
+ subject: string
23
+ }
24
+
25
+ export interface OutputSchema {}
26
+
27
+ export interface CallOptions {
28
+ signal?: AbortSignal
29
+ headers?: HeadersMap
30
+ qp?: QueryParams
31
+ encoding?: 'application/json'
32
+ }
33
+
34
+ export interface Response {
35
+ success: boolean
36
+ headers: HeadersMap
37
+ data: OutputSchema
38
+ }
39
+
40
+ export class TODOError extends XRPCError {
41
+ constructor(src: XRPCError) {
42
+ super(src.status, src.error, src.message, src.headers, { cause: src })
43
+ }
44
+ }
45
+
46
+ export function toKnownErr(e: any) {
47
+ if (e instanceof XRPCError) {
48
+ if (e.error === 'TODO') return new TODOError(e)
49
+ }
50
+
51
+ return e
52
+ }