@atproto/pds 0.4.197 → 0.4.199

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 +26 -0
  2. package/dist/actor-store/preference/reader.d.ts.map +1 -1
  3. package/dist/actor-store/preference/reader.js +15 -2
  4. package/dist/actor-store/preference/reader.js.map +1 -1
  5. package/dist/actor-store/preference/transactor.d.ts.map +1 -1
  6. package/dist/actor-store/preference/transactor.js +3 -1
  7. package/dist/actor-store/preference/transactor.js.map +1 -1
  8. package/dist/actor-store/preference/util.d.ts +4 -0
  9. package/dist/actor-store/preference/util.d.ts.map +1 -1
  10. package/dist/actor-store/preference/util.js +20 -3
  11. package/dist/actor-store/preference/util.js.map +1 -1
  12. package/dist/lexicon/index.d.ts +21 -0
  13. package/dist/lexicon/index.d.ts.map +1 -1
  14. package/dist/lexicon/index.js +52 -1
  15. package/dist/lexicon/index.js.map +1 -1
  16. package/dist/lexicon/lexicons.d.ts +812 -2
  17. package/dist/lexicon/lexicons.d.ts.map +1 -1
  18. package/dist/lexicon/lexicons.js +429 -0
  19. package/dist/lexicon/lexicons.js.map +1 -1
  20. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +13 -1
  21. package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
  22. package/dist/lexicon/types/app/bsky/actor/defs.js +9 -0
  23. package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
  24. package/dist/lexicon/types/app/bsky/contact/defs.d.ts +34 -0
  25. package/dist/lexicon/types/app/bsky/contact/defs.d.ts.map +1 -0
  26. package/dist/lexicon/types/app/bsky/contact/defs.js +34 -0
  27. package/dist/lexicon/types/app/bsky/contact/defs.js.map +1 -0
  28. package/dist/lexicon/types/app/bsky/contact/dismissMatch.d.ts +25 -0
  29. package/dist/lexicon/types/app/bsky/contact/dismissMatch.d.ts.map +1 -0
  30. package/dist/lexicon/types/app/bsky/contact/dismissMatch.js +7 -0
  31. package/dist/lexicon/types/app/bsky/contact/dismissMatch.js.map +1 -0
  32. package/dist/lexicon/types/app/bsky/contact/getMatches.d.ts +25 -0
  33. package/dist/lexicon/types/app/bsky/contact/getMatches.d.ts.map +1 -0
  34. package/dist/lexicon/types/app/bsky/contact/getMatches.js +7 -0
  35. package/dist/lexicon/types/app/bsky/contact/getMatches.js.map +1 -0
  36. package/dist/lexicon/types/app/bsky/contact/getSyncStatus.d.ts +21 -0
  37. package/dist/lexicon/types/app/bsky/contact/getSyncStatus.d.ts.map +1 -0
  38. package/dist/lexicon/types/app/bsky/contact/getSyncStatus.js +7 -0
  39. package/dist/lexicon/types/app/bsky/contact/getSyncStatus.js.map +1 -0
  40. package/dist/lexicon/types/app/bsky/contact/importContacts.d.ts +30 -0
  41. package/dist/lexicon/types/app/bsky/contact/importContacts.d.ts.map +1 -0
  42. package/dist/lexicon/types/app/bsky/contact/importContacts.js +7 -0
  43. package/dist/lexicon/types/app/bsky/contact/importContacts.js.map +1 -0
  44. package/dist/lexicon/types/app/bsky/contact/removeData.d.ts +23 -0
  45. package/dist/lexicon/types/app/bsky/contact/removeData.d.ts.map +1 -0
  46. package/dist/lexicon/types/app/bsky/contact/removeData.js +7 -0
  47. package/dist/lexicon/types/app/bsky/contact/removeData.js.map +1 -0
  48. package/dist/lexicon/types/app/bsky/contact/sendNotification.d.ts +26 -0
  49. package/dist/lexicon/types/app/bsky/contact/sendNotification.d.ts.map +1 -0
  50. package/dist/lexicon/types/app/bsky/contact/sendNotification.js +7 -0
  51. package/dist/lexicon/types/app/bsky/contact/sendNotification.js.map +1 -0
  52. package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.d.ts +25 -0
  53. package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.d.ts.map +1 -0
  54. package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.js +7 -0
  55. package/dist/lexicon/types/app/bsky/contact/startPhoneVerification.js.map +1 -0
  56. package/dist/lexicon/types/app/bsky/contact/verifyPhone.d.ts +29 -0
  57. package/dist/lexicon/types/app/bsky/contact/verifyPhone.d.ts.map +1 -0
  58. package/dist/lexicon/types/app/bsky/contact/verifyPhone.js +7 -0
  59. package/dist/lexicon/types/app/bsky/contact/verifyPhone.js.map +1 -0
  60. package/dist/lexicon/types/app/bsky/graph/defs.d.ts +8 -0
  61. package/dist/lexicon/types/app/bsky/graph/defs.d.ts.map +1 -1
  62. package/dist/lexicon/types/app/bsky/graph/defs.js.map +1 -1
  63. package/package.json +14 -14
  64. package/src/actor-store/preference/reader.ts +27 -3
  65. package/src/actor-store/preference/transactor.ts +9 -7
  66. package/src/actor-store/preference/util.ts +21 -3
  67. package/src/lexicon/index.ts +114 -0
  68. package/src/lexicon/lexicons.ts +456 -0
  69. package/src/lexicon/types/app/bsky/actor/defs.ts +22 -0
  70. package/src/lexicon/types/app/bsky/contact/defs.ts +71 -0
  71. package/src/lexicon/types/app/bsky/contact/dismissMatch.ts +43 -0
  72. package/src/lexicon/types/app/bsky/contact/getMatches.ts +43 -0
  73. package/src/lexicon/types/app/bsky/contact/getSyncStatus.ts +39 -0
  74. package/src/lexicon/types/app/bsky/contact/importContacts.ts +49 -0
  75. package/src/lexicon/types/app/bsky/contact/removeData.ts +40 -0
  76. package/src/lexicon/types/app/bsky/contact/sendNotification.ts +44 -0
  77. package/src/lexicon/types/app/bsky/contact/startPhoneVerification.ts +43 -0
  78. package/src/lexicon/types/app/bsky/contact/verifyPhone.ts +48 -0
  79. package/src/lexicon/types/app/bsky/graph/defs.ts +8 -0
  80. package/tests/preferences.test.ts +96 -1
  81. package/tsconfig.build.tsbuildinfo +1 -1
@@ -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. */
@@ -0,0 +1,71 @@
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
+ }
53
+
54
+ /** A stash object to be sent via bsync representing a notification to be created. */
55
+ export interface Notification {
56
+ $type?: 'app.bsky.contact.defs#notification'
57
+ /** The DID of who this notification comes from. */
58
+ from: string
59
+ /** The DID of who this notification should go to. */
60
+ to: string
61
+ }
62
+
63
+ const hashNotification = 'notification'
64
+
65
+ export function isNotification<V>(v: V) {
66
+ return is$typed(v, id, hashNotification)
67
+ }
68
+
69
+ export function validateNotification<V>(v: V) {
70
+ return validate<Notification & V>(v, id, hashNotification)
71
+ }
@@ -0,0 +1,43 @@
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
+
13
+ const is$typed = _is$typed,
14
+ validate = _validate
15
+ const id = 'app.bsky.contact.dismissMatch'
16
+
17
+ export type QueryParams = {}
18
+
19
+ export interface InputSchema {
20
+ /** The subject's DID to dismiss the match with. */
21
+ subject: string
22
+ }
23
+
24
+ export interface OutputSchema {}
25
+
26
+ export interface HandlerInput {
27
+ encoding: 'application/json'
28
+ body: InputSchema
29
+ }
30
+
31
+ export interface HandlerSuccess {
32
+ encoding: 'application/json'
33
+ body: OutputSchema
34
+ headers?: { [key: string]: string }
35
+ }
36
+
37
+ export interface HandlerError {
38
+ status: number
39
+ message?: string
40
+ error?: 'TODO'
41
+ }
42
+
43
+ export type HandlerOutput = HandlerError | HandlerSuccess
@@ -0,0 +1,43 @@
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.getMatches'
17
+
18
+ export type QueryParams = {
19
+ limit: number
20
+ cursor?: string
21
+ }
22
+ export type InputSchema = undefined
23
+
24
+ export interface OutputSchema {
25
+ cursor?: string
26
+ matches: AppBskyActorDefs.ProfileView[]
27
+ }
28
+
29
+ export type HandlerInput = void
30
+
31
+ export interface HandlerSuccess {
32
+ encoding: 'application/json'
33
+ body: OutputSchema
34
+ headers?: { [key: string]: string }
35
+ }
36
+
37
+ export interface HandlerError {
38
+ status: number
39
+ message?: string
40
+ error?: 'TODO'
41
+ }
42
+
43
+ export type HandlerOutput = HandlerError | HandlerSuccess