@atproto/bsky 0.0.204 → 0.0.206
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.
- package/CHANGELOG.md +18 -0
- package/dist/api/age-assurance/const.d.ts.map +1 -1
- package/dist/api/age-assurance/const.js +8 -0
- package/dist/api/age-assurance/const.js.map +1 -1
- package/dist/api/app/bsky/actor/getProfile.js +1 -1
- package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
- package/dist/api/app/bsky/unspecced/getSuggestedUsers.js +1 -0
- package/dist/api/app/bsky/unspecced/getSuggestedUsers.js.map +1 -1
- package/dist/hydration/actor.d.ts +6 -0
- package/dist/hydration/actor.d.ts.map +1 -1
- package/dist/hydration/actor.js +2 -2
- package/dist/hydration/actor.js.map +1 -1
- package/dist/hydration/hydrator.d.ts +2 -2
- package/dist/hydration/hydrator.d.ts.map +1 -1
- package/dist/hydration/hydrator.js +9 -3
- package/dist/hydration/hydrator.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +26 -2
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +13 -1
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/ageassurance/defs.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/ageassurance/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/ageassurance/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.js.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.js.map +1 -1
- package/package.json +7 -7
- package/src/api/age-assurance/const.ts +8 -0
- package/src/api/app/bsky/actor/getProfile.ts +1 -1
- package/src/api/app/bsky/unspecced/getSuggestedUsers.ts +2 -0
- package/src/hydration/actor.ts +12 -2
- package/src/hydration/hydrator.ts +10 -3
- package/src/lexicon/lexicons.ts +16 -1
- package/src/lexicon/types/app/bsky/ageassurance/defs.ts +2 -0
- package/src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts +2 -0
- package/src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts +2 -0
- package/tests/views/age-assurance-v2.test.ts +4 -2
- package/tests/views/profile.test.ts +40 -0
- package/tsconfig.tests.tsbuildinfo +0 -1
|
@@ -39,6 +39,8 @@ export interface ConfigRegion {
|
|
|
39
39
|
countryCode: string;
|
|
40
40
|
/** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. */
|
|
41
41
|
regionCode?: string;
|
|
42
|
+
/** The minimum age (as a whole integer) required to use Bluesky in this region. */
|
|
43
|
+
minAccessAge: number;
|
|
42
44
|
/** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. */
|
|
43
45
|
rules: ($Typed<ConfigRegionRuleDefault> | $Typed<ConfigRegionRuleIfDeclaredOverAge> | $Typed<ConfigRegionRuleIfDeclaredUnderAge> | $Typed<ConfigRegionRuleIfAssuredOverAge> | $Typed<ConfigRegionRuleIfAssuredUnderAge> | $Typed<ConfigRegionRuleIfAccountNewerThan> | $Typed<ConfigRegionRuleIfAccountOlderThan> | {
|
|
44
46
|
$type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/ageassurance/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CA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AAwD;AACxD,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,kCAAkC,CAAA;IAC1C,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAA;IACjB,yFAAyF;IACzF,SAAS,EAAE,MAAM,CAAA;IACjB,+CAA+C;IAC/C,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IACrE,4EAA4E;IAC5E,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAC5D,0FAA0F;IAC1F,WAAW,EAAE,MAAM,CAAA;IACnB,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAID,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,0FAE9B;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,+BAEpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/ageassurance/defs.ts"],"names":[],"mappings":";;AAqCA,0BAEC;AAED,sCAEC;AAWD,0CAEC;AAED,sDAEC;AAUD,4BAEC;AAED,wCAEC;AAwBD,wCAEC;AAED,oDAEC;AAUD,8DAEC;AAED,0EAMC;AAaD,kFAEC;AAED,8FAMC;AAaD,oFAEC;AAED,gGAMC;AAYD,gFAEC;AAED,4FAMC;AAaD,kFAEC;AAED,8FAMC;AA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,EAAE,EAAE,qCAAqC,CAAC,CAAA;AAC/D,CAAC;AAED,SAAgB,yCAAyC,CAAI,CAAI;IAC/D,OAAO,QAAQ,CACb,CAAC,EACD,EAAE,EACF,qCAAqC,CACtC,CAAA;AACH,CAAC;AAUD,MAAM,sCAAsC,GAC1C,oCAAoC,CAAA;AAEtC,SAAgB,oCAAoC,CAAI,CAAI;IAC1D,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,sCAAsC,CAAC,CAAA;AAChE,CAAC;AAED,SAAgB,0CAA0C,CAAI,CAAI;IAChE,OAAO,QAAQ,CACb,CAAC,EACD,EAAE,EACF,sCAAsC,CACvC,CAAA;AACH,CAAC;AAUD,MAAM,sCAAsC,GAC1C,oCAAoC,CAAA;AAEtC,SAAgB,oCAAoC,CAAI,CAAI;IAC1D,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,sCAAsC,CAAC,CAAA;AAChE,CAAC;AAED,SAAgB,0CAA0C,CAAI,CAAI;IAChE,OAAO,QAAQ,CACb,CAAC,EACD,EAAE,EACF,sCAAsC,CACvC,CAAA;AACH,CAAC;AA6BD,MAAM,SAAS,GAAG,OAAO,CAAA;AAEzB,SAAgB,OAAO,CAAI,CAAI;IAC7B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;AACnC,CAAC;AAED,SAAgB,aAAa,CAAI,CAAI;IACnC,OAAO,QAAQ,CAAY,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;AAC9C,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.ageassurance.defs'\n\n/** The access level granted based on Age Assurance data we've processed. */\nexport type Access = 'unknown' | 'none' | 'safe' | 'full' | (string & {})\n/** The status of the Age Assurance process. */\nexport type Status =\n | 'unknown'\n | 'pending'\n | 'assured'\n | 'blocked'\n | (string & {})\n\n/** The user's computed Age Assurance state. */\nexport interface State {\n $type?: 'app.bsky.ageassurance.defs#state'\n /** The timestamp when this state was last updated. */\n lastInitiatedAt?: string\n status: Status\n access: Access\n}\n\nconst hashState = 'state'\n\nexport function isState<V>(v: V) {\n return is$typed(v, id, hashState)\n}\n\nexport function validateState<V>(v: V) {\n return validate<State & V>(v, id, hashState)\n}\n\n/** Additional metadata needed to compute Age Assurance state client-side. */\nexport interface StateMetadata {\n $type?: 'app.bsky.ageassurance.defs#stateMetadata'\n /** The account creation timestamp. */\n accountCreatedAt?: string\n}\n\nconst hashStateMetadata = 'stateMetadata'\n\nexport function isStateMetadata<V>(v: V) {\n return is$typed(v, id, hashStateMetadata)\n}\n\nexport function validateStateMetadata<V>(v: V) {\n return validate<StateMetadata & V>(v, id, hashStateMetadata)\n}\n\nexport interface Config {\n $type?: 'app.bsky.ageassurance.defs#config'\n /** The per-region Age Assurance configuration. */\n regions: ConfigRegion[]\n}\n\nconst hashConfig = 'config'\n\nexport function isConfig<V>(v: V) {\n return is$typed(v, id, hashConfig)\n}\n\nexport function validateConfig<V>(v: V) {\n return validate<Config & V>(v, id, hashConfig)\n}\n\n/** The Age Assurance configuration for a specific region. */\nexport interface ConfigRegion {\n $type?: 'app.bsky.ageassurance.defs#configRegion'\n /** The ISO 3166-1 alpha-2 country code this configuration applies to. */\n countryCode: string\n /** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. */\n regionCode?: string\n /** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. */\n rules: (\n | $Typed<ConfigRegionRuleDefault>\n | $Typed<ConfigRegionRuleIfDeclaredOverAge>\n | $Typed<ConfigRegionRuleIfDeclaredUnderAge>\n | $Typed<ConfigRegionRuleIfAssuredOverAge>\n | $Typed<ConfigRegionRuleIfAssuredUnderAge>\n | $Typed<ConfigRegionRuleIfAccountNewerThan>\n | $Typed<ConfigRegionRuleIfAccountOlderThan>\n | { $type: string }\n )[]\n}\n\nconst hashConfigRegion = 'configRegion'\n\nexport function isConfigRegion<V>(v: V) {\n return is$typed(v, id, hashConfigRegion)\n}\n\nexport function validateConfigRegion<V>(v: V) {\n return validate<ConfigRegion & V>(v, id, hashConfigRegion)\n}\n\n/** Age Assurance rule that applies by default. */\nexport interface ConfigRegionRuleDefault {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleDefault'\n access: Access\n}\n\nconst hashConfigRegionRuleDefault = 'configRegionRuleDefault'\n\nexport function isConfigRegionRuleDefault<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleDefault)\n}\n\nexport function validateConfigRegionRuleDefault<V>(v: V) {\n return validate<ConfigRegionRuleDefault & V>(\n v,\n id,\n hashConfigRegionRuleDefault,\n )\n}\n\n/** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. */\nexport interface ConfigRegionRuleIfDeclaredOverAge {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge'\n /** The age threshold as a whole integer. */\n age: number\n access: Access\n}\n\nconst hashConfigRegionRuleIfDeclaredOverAge =\n 'configRegionRuleIfDeclaredOverAge'\n\nexport function isConfigRegionRuleIfDeclaredOverAge<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfDeclaredOverAge)\n}\n\nexport function validateConfigRegionRuleIfDeclaredOverAge<V>(v: V) {\n return validate<ConfigRegionRuleIfDeclaredOverAge & V>(\n v,\n id,\n hashConfigRegionRuleIfDeclaredOverAge,\n )\n}\n\n/** Age Assurance rule that applies if the user has declared themselves under a certain age. */\nexport interface ConfigRegionRuleIfDeclaredUnderAge {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge'\n /** The age threshold as a whole integer. */\n age: number\n access: Access\n}\n\nconst hashConfigRegionRuleIfDeclaredUnderAge =\n 'configRegionRuleIfDeclaredUnderAge'\n\nexport function isConfigRegionRuleIfDeclaredUnderAge<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfDeclaredUnderAge)\n}\n\nexport function validateConfigRegionRuleIfDeclaredUnderAge<V>(v: V) {\n return validate<ConfigRegionRuleIfDeclaredUnderAge & V>(\n v,\n id,\n hashConfigRegionRuleIfDeclaredUnderAge,\n )\n}\n\n/** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. */\nexport interface ConfigRegionRuleIfAssuredOverAge {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge'\n /** The age threshold as a whole integer. */\n age: number\n access: Access\n}\n\nconst hashConfigRegionRuleIfAssuredOverAge = 'configRegionRuleIfAssuredOverAge'\n\nexport function isConfigRegionRuleIfAssuredOverAge<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfAssuredOverAge)\n}\n\nexport function validateConfigRegionRuleIfAssuredOverAge<V>(v: V) {\n return validate<ConfigRegionRuleIfAssuredOverAge & V>(\n v,\n id,\n hashConfigRegionRuleIfAssuredOverAge,\n )\n}\n\n/** Age Assurance rule that applies if the user has been assured to be under a certain age. */\nexport interface ConfigRegionRuleIfAssuredUnderAge {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge'\n /** The age threshold as a whole integer. */\n age: number\n access: Access\n}\n\nconst hashConfigRegionRuleIfAssuredUnderAge =\n 'configRegionRuleIfAssuredUnderAge'\n\nexport function isConfigRegionRuleIfAssuredUnderAge<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfAssuredUnderAge)\n}\n\nexport function validateConfigRegionRuleIfAssuredUnderAge<V>(v: V) {\n return validate<ConfigRegionRuleIfAssuredUnderAge & V>(\n v,\n id,\n hashConfigRegionRuleIfAssuredUnderAge,\n )\n}\n\n/** Age Assurance rule that applies if the account is equal-to or newer than a certain date. */\nexport interface ConfigRegionRuleIfAccountNewerThan {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan'\n /** The date threshold as a datetime string. */\n date: string\n access: Access\n}\n\nconst hashConfigRegionRuleIfAccountNewerThan =\n 'configRegionRuleIfAccountNewerThan'\n\nexport function isConfigRegionRuleIfAccountNewerThan<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfAccountNewerThan)\n}\n\nexport function validateConfigRegionRuleIfAccountNewerThan<V>(v: V) {\n return validate<ConfigRegionRuleIfAccountNewerThan & V>(\n v,\n id,\n hashConfigRegionRuleIfAccountNewerThan,\n )\n}\n\n/** Age Assurance rule that applies if the account is older than a certain date. */\nexport interface ConfigRegionRuleIfAccountOlderThan {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan'\n /** The date threshold as a datetime string. */\n date: string\n access: Access\n}\n\nconst hashConfigRegionRuleIfAccountOlderThan =\n 'configRegionRuleIfAccountOlderThan'\n\nexport function isConfigRegionRuleIfAccountOlderThan<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfAccountOlderThan)\n}\n\nexport function validateConfigRegionRuleIfAccountOlderThan<V>(v: V) {\n return validate<ConfigRegionRuleIfAccountOlderThan & V>(\n v,\n id,\n hashConfigRegionRuleIfAccountOlderThan,\n )\n}\n\n/** Object used to store Age Assurance data in stash. */\nexport interface Event {\n $type?: 'app.bsky.ageassurance.defs#event'\n /** The date and time of this write operation. */\n createdAt: string\n /** The unique identifier for this instance of the Age Assurance flow, in UUID format. */\n attemptId: string\n /** The status of the Age Assurance process. */\n status: 'unknown' | 'pending' | 'assured' | 'blocked' | (string & {})\n /** The access level granted based on Age Assurance data we've processed. */\n access: 'unknown' | 'none' | 'safe' | 'full' | (string & {})\n /** The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. */\n countryCode: string\n /** The ISO 3166-2 region code provided when beginning the Age Assurance flow. */\n regionCode?: string\n /** The email used for Age Assurance. */\n email?: string\n /** The IP address used when initiating the Age Assurance flow. */\n initIp?: string\n /** The user agent used when initiating the Age Assurance flow. */\n initUa?: string\n /** The IP address used when completing the Age Assurance flow. */\n completeIp?: string\n /** The user agent used when completing the Age Assurance flow. */\n completeUa?: string\n}\n\nconst hashEvent = 'event'\n\nexport function isEvent<V>(v: V) {\n return is$typed(v, id, hashEvent)\n}\n\nexport function validateEvent<V>(v: V) {\n return validate<Event & V>(v, id, hashEvent)\n}\n"]}
|
|
1
|
+
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/ageassurance/defs.ts"],"names":[],"mappings":";;AAqCA,0BAEC;AAED,sCAEC;AAWD,0CAEC;AAED,sDAEC;AAUD,4BAEC;AAED,wCAEC;AA0BD,wCAEC;AAED,oDAEC;AAUD,8DAEC;AAED,0EAMC;AAaD,kFAEC;AAED,8FAMC;AAaD,oFAEC;AAED,gGAMC;AAYD,gFAEC;AAED,4FAMC;AAaD,kFAEC;AAED,8FAMC;AAaD,oFAEC;AAED,gGAMC;AAaD,oFAEC;AAED,gGAMC;AA+BD,0BAEC;AAED,sCAEC;AAzSD,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,4BAA4B,CAAA;AAqBvC,MAAM,SAAS,GAAG,OAAO,CAAA;AAEzB,SAAgB,OAAO,CAAI,CAAI;IAC7B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;AACnC,CAAC;AAED,SAAgB,aAAa,CAAI,CAAI;IACnC,OAAO,QAAQ,CAAY,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;AAC9C,CAAC;AASD,MAAM,iBAAiB,GAAG,eAAe,CAAA;AAEzC,SAAgB,eAAe,CAAI,CAAI;IACrC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,iBAAiB,CAAC,CAAA;AAC3C,CAAC;AAED,SAAgB,qB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CACb,CAAC,EACD,EAAE,EACF,sCAAsC,CACvC,CAAA;AACH,CAAC;AA6BD,MAAM,SAAS,GAAG,OAAO,CAAA;AAEzB,SAAgB,OAAO,CAAI,CAAI;IAC7B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;AACnC,CAAC;AAED,SAAgB,aAAa,CAAI,CAAI;IACnC,OAAO,QAAQ,CAAY,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;AAC9C,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.ageassurance.defs'\n\n/** The access level granted based on Age Assurance data we've processed. */\nexport type Access = 'unknown' | 'none' | 'safe' | 'full' | (string & {})\n/** The status of the Age Assurance process. */\nexport type Status =\n | 'unknown'\n | 'pending'\n | 'assured'\n | 'blocked'\n | (string & {})\n\n/** The user's computed Age Assurance state. */\nexport interface State {\n $type?: 'app.bsky.ageassurance.defs#state'\n /** The timestamp when this state was last updated. */\n lastInitiatedAt?: string\n status: Status\n access: Access\n}\n\nconst hashState = 'state'\n\nexport function isState<V>(v: V) {\n return is$typed(v, id, hashState)\n}\n\nexport function validateState<V>(v: V) {\n return validate<State & V>(v, id, hashState)\n}\n\n/** Additional metadata needed to compute Age Assurance state client-side. */\nexport interface StateMetadata {\n $type?: 'app.bsky.ageassurance.defs#stateMetadata'\n /** The account creation timestamp. */\n accountCreatedAt?: string\n}\n\nconst hashStateMetadata = 'stateMetadata'\n\nexport function isStateMetadata<V>(v: V) {\n return is$typed(v, id, hashStateMetadata)\n}\n\nexport function validateStateMetadata<V>(v: V) {\n return validate<StateMetadata & V>(v, id, hashStateMetadata)\n}\n\nexport interface Config {\n $type?: 'app.bsky.ageassurance.defs#config'\n /** The per-region Age Assurance configuration. */\n regions: ConfigRegion[]\n}\n\nconst hashConfig = 'config'\n\nexport function isConfig<V>(v: V) {\n return is$typed(v, id, hashConfig)\n}\n\nexport function validateConfig<V>(v: V) {\n return validate<Config & V>(v, id, hashConfig)\n}\n\n/** The Age Assurance configuration for a specific region. */\nexport interface ConfigRegion {\n $type?: 'app.bsky.ageassurance.defs#configRegion'\n /** The ISO 3166-1 alpha-2 country code this configuration applies to. */\n countryCode: string\n /** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. */\n regionCode?: string\n /** The minimum age (as a whole integer) required to use Bluesky in this region. */\n minAccessAge: number\n /** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. */\n rules: (\n | $Typed<ConfigRegionRuleDefault>\n | $Typed<ConfigRegionRuleIfDeclaredOverAge>\n | $Typed<ConfigRegionRuleIfDeclaredUnderAge>\n | $Typed<ConfigRegionRuleIfAssuredOverAge>\n | $Typed<ConfigRegionRuleIfAssuredUnderAge>\n | $Typed<ConfigRegionRuleIfAccountNewerThan>\n | $Typed<ConfigRegionRuleIfAccountOlderThan>\n | { $type: string }\n )[]\n}\n\nconst hashConfigRegion = 'configRegion'\n\nexport function isConfigRegion<V>(v: V) {\n return is$typed(v, id, hashConfigRegion)\n}\n\nexport function validateConfigRegion<V>(v: V) {\n return validate<ConfigRegion & V>(v, id, hashConfigRegion)\n}\n\n/** Age Assurance rule that applies by default. */\nexport interface ConfigRegionRuleDefault {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleDefault'\n access: Access\n}\n\nconst hashConfigRegionRuleDefault = 'configRegionRuleDefault'\n\nexport function isConfigRegionRuleDefault<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleDefault)\n}\n\nexport function validateConfigRegionRuleDefault<V>(v: V) {\n return validate<ConfigRegionRuleDefault & V>(\n v,\n id,\n hashConfigRegionRuleDefault,\n )\n}\n\n/** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. */\nexport interface ConfigRegionRuleIfDeclaredOverAge {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge'\n /** The age threshold as a whole integer. */\n age: number\n access: Access\n}\n\nconst hashConfigRegionRuleIfDeclaredOverAge =\n 'configRegionRuleIfDeclaredOverAge'\n\nexport function isConfigRegionRuleIfDeclaredOverAge<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfDeclaredOverAge)\n}\n\nexport function validateConfigRegionRuleIfDeclaredOverAge<V>(v: V) {\n return validate<ConfigRegionRuleIfDeclaredOverAge & V>(\n v,\n id,\n hashConfigRegionRuleIfDeclaredOverAge,\n )\n}\n\n/** Age Assurance rule that applies if the user has declared themselves under a certain age. */\nexport interface ConfigRegionRuleIfDeclaredUnderAge {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge'\n /** The age threshold as a whole integer. */\n age: number\n access: Access\n}\n\nconst hashConfigRegionRuleIfDeclaredUnderAge =\n 'configRegionRuleIfDeclaredUnderAge'\n\nexport function isConfigRegionRuleIfDeclaredUnderAge<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfDeclaredUnderAge)\n}\n\nexport function validateConfigRegionRuleIfDeclaredUnderAge<V>(v: V) {\n return validate<ConfigRegionRuleIfDeclaredUnderAge & V>(\n v,\n id,\n hashConfigRegionRuleIfDeclaredUnderAge,\n )\n}\n\n/** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. */\nexport interface ConfigRegionRuleIfAssuredOverAge {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge'\n /** The age threshold as a whole integer. */\n age: number\n access: Access\n}\n\nconst hashConfigRegionRuleIfAssuredOverAge = 'configRegionRuleIfAssuredOverAge'\n\nexport function isConfigRegionRuleIfAssuredOverAge<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfAssuredOverAge)\n}\n\nexport function validateConfigRegionRuleIfAssuredOverAge<V>(v: V) {\n return validate<ConfigRegionRuleIfAssuredOverAge & V>(\n v,\n id,\n hashConfigRegionRuleIfAssuredOverAge,\n )\n}\n\n/** Age Assurance rule that applies if the user has been assured to be under a certain age. */\nexport interface ConfigRegionRuleIfAssuredUnderAge {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge'\n /** The age threshold as a whole integer. */\n age: number\n access: Access\n}\n\nconst hashConfigRegionRuleIfAssuredUnderAge =\n 'configRegionRuleIfAssuredUnderAge'\n\nexport function isConfigRegionRuleIfAssuredUnderAge<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfAssuredUnderAge)\n}\n\nexport function validateConfigRegionRuleIfAssuredUnderAge<V>(v: V) {\n return validate<ConfigRegionRuleIfAssuredUnderAge & V>(\n v,\n id,\n hashConfigRegionRuleIfAssuredUnderAge,\n )\n}\n\n/** Age Assurance rule that applies if the account is equal-to or newer than a certain date. */\nexport interface ConfigRegionRuleIfAccountNewerThan {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan'\n /** The date threshold as a datetime string. */\n date: string\n access: Access\n}\n\nconst hashConfigRegionRuleIfAccountNewerThan =\n 'configRegionRuleIfAccountNewerThan'\n\nexport function isConfigRegionRuleIfAccountNewerThan<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfAccountNewerThan)\n}\n\nexport function validateConfigRegionRuleIfAccountNewerThan<V>(v: V) {\n return validate<ConfigRegionRuleIfAccountNewerThan & V>(\n v,\n id,\n hashConfigRegionRuleIfAccountNewerThan,\n )\n}\n\n/** Age Assurance rule that applies if the account is older than a certain date. */\nexport interface ConfigRegionRuleIfAccountOlderThan {\n $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan'\n /** The date threshold as a datetime string. */\n date: string\n access: Access\n}\n\nconst hashConfigRegionRuleIfAccountOlderThan =\n 'configRegionRuleIfAccountOlderThan'\n\nexport function isConfigRegionRuleIfAccountOlderThan<V>(v: V) {\n return is$typed(v, id, hashConfigRegionRuleIfAccountOlderThan)\n}\n\nexport function validateConfigRegionRuleIfAccountOlderThan<V>(v: V) {\n return validate<ConfigRegionRuleIfAccountOlderThan & V>(\n v,\n id,\n hashConfigRegionRuleIfAccountOlderThan,\n )\n}\n\n/** Object used to store Age Assurance data in stash. */\nexport interface Event {\n $type?: 'app.bsky.ageassurance.defs#event'\n /** The date and time of this write operation. */\n createdAt: string\n /** The unique identifier for this instance of the Age Assurance flow, in UUID format. */\n attemptId: string\n /** The status of the Age Assurance process. */\n status: 'unknown' | 'pending' | 'assured' | 'blocked' | (string & {})\n /** The access level granted based on Age Assurance data we've processed. */\n access: 'unknown' | 'none' | 'safe' | 'full' | (string & {})\n /** The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. */\n countryCode: string\n /** The ISO 3166-2 region code provided when beginning the Age Assurance flow. */\n regionCode?: string\n /** The email used for Age Assurance. */\n email?: string\n /** The IP address used when initiating the Age Assurance flow. */\n initIp?: string\n /** The user agent used when initiating the Age Assurance flow. */\n initUa?: string\n /** The IP address used when completing the Age Assurance flow. */\n completeIp?: string\n /** The user agent used when completing the Age Assurance flow. */\n completeUa?: string\n}\n\nconst hashEvent = 'event'\n\nexport function isEvent<V>(v: V) {\n return is$typed(v, id, hashEvent)\n}\n\nexport function validateEvent<V>(v: V) {\n return validate<Event & V>(v, id, hashEvent)\n}\n"]}
|
|
@@ -7,6 +7,8 @@ export type QueryParams = {
|
|
|
7
7
|
export type InputSchema = undefined;
|
|
8
8
|
export interface OutputSchema {
|
|
9
9
|
actors: AppBskyActorDefs.ProfileView[];
|
|
10
|
+
/** Snowflake for this recommendation, use when submitting recommendation events. */
|
|
11
|
+
recId?: number;
|
|
10
12
|
}
|
|
11
13
|
export type HandlerInput = void;
|
|
12
14
|
export interface HandlerSuccess {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSuggestedUsers.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AAMzD,MAAM,MAAM,WAAW,GAAG;IACxB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,gBAAgB,CAAC,WAAW,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"getSuggestedUsers.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AAMzD,MAAM,MAAM,WAAW,GAAG;IACxB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,gBAAgB,CAAC,WAAW,EAAE,CAAA;IACtC,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSuggestedUsers.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,sCAAsC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyActorDefs from '../actor/defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.unspecced.getSuggestedUsers'\n\nexport type QueryParams = {\n /** Category of users to get suggestions for. */\n category?: string\n limit: number\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n actors: AppBskyActorDefs.ProfileView[]\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
1
|
+
{"version":3,"file":"getSuggestedUsers.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,sCAAsC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyActorDefs from '../actor/defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.unspecced.getSuggestedUsers'\n\nexport type QueryParams = {\n /** Category of users to get suggestions for. */\n category?: string\n limit: number\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n actors: AppBskyActorDefs.ProfileView[]\n /** Snowflake for this recommendation, use when submitting recommendation events. */\n recId?: number\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -8,6 +8,8 @@ export type QueryParams = {
|
|
|
8
8
|
export type InputSchema = undefined;
|
|
9
9
|
export interface OutputSchema {
|
|
10
10
|
dids: string[];
|
|
11
|
+
/** Snowflake for this recommendation, use when submitting recommendation events. */
|
|
12
|
+
recId?: number;
|
|
11
13
|
}
|
|
12
14
|
export type HandlerInput = void;
|
|
13
15
|
export interface HandlerSuccess {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSuggestedUsersSkeleton.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG;IACxB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"getSuggestedUsersSkeleton.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG;IACxB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSuggestedUsersSkeleton.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,8CAA8C,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.unspecced.getSuggestedUsersSkeleton'\n\nexport type QueryParams = {\n /** DID of the account making the request (not included for public/unauthenticated queries). */\n viewer?: string\n /** Category of users to get suggestions for. */\n category?: string\n limit: number\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n dids: string[]\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
1
|
+
{"version":3,"file":"getSuggestedUsersSkeleton.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,8CAA8C,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.unspecced.getSuggestedUsersSkeleton'\n\nexport type QueryParams = {\n /** DID of the account making the request (not included for public/unauthenticated queries). */\n viewer?: string\n /** Category of users to get suggestions for. */\n category?: string\n limit: number\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n dids: string[]\n /** Snowflake for this recommendation, use when submitting recommendation events. */\n recId?: number\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/bsky",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.206",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Reference implementation of app.bsky App View (Bluesky API)",
|
|
6
6
|
"keywords": [
|
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
"zod": "3.23.8",
|
|
54
54
|
"@atproto-labs/fetch-node": "0.2.0",
|
|
55
55
|
"@atproto-labs/xrpc-utils": "0.0.24",
|
|
56
|
-
"@atproto/api": "^0.18.
|
|
57
|
-
"@atproto/common": "^0.5.
|
|
56
|
+
"@atproto/api": "^0.18.11",
|
|
57
|
+
"@atproto/common": "^0.5.6",
|
|
58
58
|
"@atproto/crypto": "^0.4.5",
|
|
59
|
-
"@atproto/did": "^0.2.
|
|
59
|
+
"@atproto/did": "^0.2.4",
|
|
60
60
|
"@atproto/identity": "^0.4.10",
|
|
61
61
|
"@atproto/lexicon": "^0.6.0",
|
|
62
62
|
"@atproto/repo": "^0.8.12",
|
|
63
63
|
"@atproto/sync": "^0.1.39",
|
|
64
64
|
"@atproto/syntax": "^0.4.2",
|
|
65
|
-
"@atproto/xrpc-server": "^0.10.
|
|
65
|
+
"@atproto/xrpc-server": "^0.10.7"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@bufbuild/buf": "^1.28.1",
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"jest": "^28.1.2",
|
|
79
79
|
"ts-node": "^10.8.2",
|
|
80
80
|
"typescript": "^5.6.3",
|
|
81
|
-
"@atproto/api": "^0.18.
|
|
81
|
+
"@atproto/api": "^0.18.11",
|
|
82
82
|
"@atproto/lex-cli": "^0.9.8",
|
|
83
|
-
"@atproto/pds": "^0.4.
|
|
83
|
+
"@atproto/pds": "^0.4.202",
|
|
84
84
|
"@atproto/xrpc": "^0.7.7"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
@@ -16,6 +16,7 @@ export const AGE_ASSURANCE_CONFIG: AppBskyAgeassuranceDefs.Config = {
|
|
|
16
16
|
{
|
|
17
17
|
countryCode: 'GB',
|
|
18
18
|
regionCode: undefined,
|
|
19
|
+
minAccessAge: 13,
|
|
19
20
|
rules: [
|
|
20
21
|
{
|
|
21
22
|
$type: ids.IfAssuredOverAge,
|
|
@@ -36,6 +37,7 @@ export const AGE_ASSURANCE_CONFIG: AppBskyAgeassuranceDefs.Config = {
|
|
|
36
37
|
{
|
|
37
38
|
countryCode: 'AU',
|
|
38
39
|
regionCode: undefined,
|
|
40
|
+
minAccessAge: 16,
|
|
39
41
|
rules: [
|
|
40
42
|
{
|
|
41
43
|
$type: ids.IfAccountNewerThan,
|
|
@@ -66,6 +68,7 @@ export const AGE_ASSURANCE_CONFIG: AppBskyAgeassuranceDefs.Config = {
|
|
|
66
68
|
{
|
|
67
69
|
countryCode: 'US',
|
|
68
70
|
regionCode: 'SD',
|
|
71
|
+
minAccessAge: 13,
|
|
69
72
|
rules: [
|
|
70
73
|
{
|
|
71
74
|
$type: ids.IfAssuredOverAge,
|
|
@@ -86,6 +89,7 @@ export const AGE_ASSURANCE_CONFIG: AppBskyAgeassuranceDefs.Config = {
|
|
|
86
89
|
{
|
|
87
90
|
countryCode: 'US',
|
|
88
91
|
regionCode: 'WY',
|
|
92
|
+
minAccessAge: 13,
|
|
89
93
|
rules: [
|
|
90
94
|
{
|
|
91
95
|
$type: ids.IfAssuredOverAge,
|
|
@@ -106,6 +110,7 @@ export const AGE_ASSURANCE_CONFIG: AppBskyAgeassuranceDefs.Config = {
|
|
|
106
110
|
{
|
|
107
111
|
countryCode: 'US',
|
|
108
112
|
regionCode: 'OH',
|
|
113
|
+
minAccessAge: 13,
|
|
109
114
|
rules: [
|
|
110
115
|
{
|
|
111
116
|
$type: ids.IfAssuredOverAge,
|
|
@@ -126,6 +131,7 @@ export const AGE_ASSURANCE_CONFIG: AppBskyAgeassuranceDefs.Config = {
|
|
|
126
131
|
{
|
|
127
132
|
countryCode: 'US',
|
|
128
133
|
regionCode: 'MS',
|
|
134
|
+
minAccessAge: 18,
|
|
129
135
|
rules: [
|
|
130
136
|
{
|
|
131
137
|
$type: ids.IfAssuredOverAge,
|
|
@@ -141,6 +147,7 @@ export const AGE_ASSURANCE_CONFIG: AppBskyAgeassuranceDefs.Config = {
|
|
|
141
147
|
{
|
|
142
148
|
countryCode: 'US',
|
|
143
149
|
regionCode: 'VA',
|
|
150
|
+
minAccessAge: 16,
|
|
144
151
|
rules: [
|
|
145
152
|
{
|
|
146
153
|
$type: ids.IfAssuredOverAge,
|
|
@@ -161,6 +168,7 @@ export const AGE_ASSURANCE_CONFIG: AppBskyAgeassuranceDefs.Config = {
|
|
|
161
168
|
{
|
|
162
169
|
countryCode: 'US',
|
|
163
170
|
regionCode: 'TN',
|
|
171
|
+
minAccessAge: 18,
|
|
164
172
|
rules: [
|
|
165
173
|
{
|
|
166
174
|
$type: ids.IfAssuredOverAge,
|
|
@@ -114,6 +114,7 @@ const presentation = (
|
|
|
114
114
|
) => {
|
|
115
115
|
const { ctx, skeleton, hydration } = input
|
|
116
116
|
return {
|
|
117
|
+
recId: skeleton.recId,
|
|
117
118
|
actors: mapDefined(skeleton.dids, (did) =>
|
|
118
119
|
ctx.views.profile(did, hydration),
|
|
119
120
|
),
|
|
@@ -134,4 +135,5 @@ type Params = QueryParams & {
|
|
|
134
135
|
|
|
135
136
|
type SkeletonState = {
|
|
136
137
|
dids: string[]
|
|
138
|
+
recId?: number
|
|
137
139
|
}
|
package/src/hydration/actor.ts
CHANGED
|
@@ -160,10 +160,20 @@ export class ActorHydrator {
|
|
|
160
160
|
dids: string[],
|
|
161
161
|
opts: {
|
|
162
162
|
includeTakedowns?: boolean
|
|
163
|
+
/**
|
|
164
|
+
* The raw `HydrationCtx.includeTakedowns` value, independent of any
|
|
165
|
+
* special casing that may apply to `includeTakedowns` within this
|
|
166
|
+
* method.
|
|
167
|
+
*/
|
|
168
|
+
includeTakedownsBase?: boolean
|
|
163
169
|
skipCacheForDids?: string[]
|
|
164
170
|
} = {},
|
|
165
171
|
): Promise<Actors> {
|
|
166
|
-
const {
|
|
172
|
+
const {
|
|
173
|
+
includeTakedowns = false,
|
|
174
|
+
skipCacheForDids,
|
|
175
|
+
includeTakedownsBase = false,
|
|
176
|
+
} = opts
|
|
167
177
|
if (!dids.length) return new HydrationMap<Actor>()
|
|
168
178
|
const res = await this.dataplane.getActors({ dids, skipCacheForDids })
|
|
169
179
|
return dids.reduce((acc, did, i) => {
|
|
@@ -184,7 +194,7 @@ export class ActorHydrator {
|
|
|
184
194
|
: undefined
|
|
185
195
|
|
|
186
196
|
const status = actor.statusRecord
|
|
187
|
-
? parseRecord<StatusRecord>(actor.statusRecord,
|
|
197
|
+
? parseRecord<StatusRecord>(actor.statusRecord, includeTakedownsBase)
|
|
188
198
|
: undefined
|
|
189
199
|
|
|
190
200
|
const verifications = mapDefined(
|
|
@@ -80,7 +80,7 @@ export class HydrateCtx {
|
|
|
80
80
|
labelers = this.vals.labelers
|
|
81
81
|
viewer = this.vals.viewer !== null ? serviceRefToDid(this.vals.viewer) : null
|
|
82
82
|
includeTakedowns = this.vals.includeTakedowns
|
|
83
|
-
|
|
83
|
+
overrideIncludeTakedownsForActor = this.vals.overrideIncludeTakedownsForActor
|
|
84
84
|
include3pBlocks = this.vals.include3pBlocks
|
|
85
85
|
includeDebugField = this.vals.includeDebugField
|
|
86
86
|
featureGates: CheckedFeatureGatesMap = this.vals.featureGates || new Map()
|
|
@@ -99,7 +99,7 @@ export type HydrateCtxVals = {
|
|
|
99
99
|
labelers: ParsedLabelers
|
|
100
100
|
viewer: string | null
|
|
101
101
|
includeTakedowns?: boolean
|
|
102
|
-
|
|
102
|
+
overrideIncludeTakedownsForActor?: boolean
|
|
103
103
|
include3pBlocks?: boolean
|
|
104
104
|
includeDebugField?: boolean
|
|
105
105
|
featureGates?: CheckedFeatureGatesMap
|
|
@@ -228,10 +228,17 @@ export class Hydrator {
|
|
|
228
228
|
dids: string[],
|
|
229
229
|
ctx: HydrateCtx,
|
|
230
230
|
): Promise<HydrationState> {
|
|
231
|
-
|
|
231
|
+
/**
|
|
232
|
+
* Special case here, we want to include takedowns in special cases, like
|
|
233
|
+
* `getProfile`, since we throw client-facing errors later in the pipeline.
|
|
234
|
+
*/
|
|
235
|
+
const includeTakedowns =
|
|
236
|
+
ctx.includeTakedowns || ctx.overrideIncludeTakedownsForActor
|
|
237
|
+
const includeTakedownsBase = ctx.includeTakedowns
|
|
232
238
|
const [actors, labels, profileViewersState] = await Promise.all([
|
|
233
239
|
this.actor.getActors(dids, {
|
|
234
240
|
includeTakedowns,
|
|
241
|
+
includeTakedownsBase,
|
|
235
242
|
skipCacheForDids: ctx.skipCacheForViewer,
|
|
236
243
|
}),
|
|
237
244
|
this.label.getLabelsForSubjects(labelSubjectsForDid(dids), ctx.labelers),
|
package/src/lexicon/lexicons.ts
CHANGED
|
@@ -1345,7 +1345,7 @@ export const schemaDict = {
|
|
|
1345
1345
|
configRegion: {
|
|
1346
1346
|
type: 'object',
|
|
1347
1347
|
description: 'The Age Assurance configuration for a specific region.',
|
|
1348
|
-
required: ['countryCode', 'rules'],
|
|
1348
|
+
required: ['countryCode', 'minAccessAge', 'rules'],
|
|
1349
1349
|
properties: {
|
|
1350
1350
|
countryCode: {
|
|
1351
1351
|
type: 'string',
|
|
@@ -1357,6 +1357,11 @@ export const schemaDict = {
|
|
|
1357
1357
|
description:
|
|
1358
1358
|
'The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country.',
|
|
1359
1359
|
},
|
|
1360
|
+
minAccessAge: {
|
|
1361
|
+
type: 'integer',
|
|
1362
|
+
description:
|
|
1363
|
+
'The minimum age (as a whole integer) required to use Bluesky in this region.',
|
|
1364
|
+
},
|
|
1360
1365
|
rules: {
|
|
1361
1366
|
type: 'array',
|
|
1362
1367
|
description:
|
|
@@ -8012,6 +8017,11 @@ export const schemaDict = {
|
|
|
8012
8017
|
ref: 'lex:app.bsky.actor.defs#profileView',
|
|
8013
8018
|
},
|
|
8014
8019
|
},
|
|
8020
|
+
recId: {
|
|
8021
|
+
type: 'integer',
|
|
8022
|
+
description:
|
|
8023
|
+
'Snowflake for this recommendation, use when submitting recommendation events.',
|
|
8024
|
+
},
|
|
8015
8025
|
},
|
|
8016
8026
|
},
|
|
8017
8027
|
},
|
|
@@ -8060,6 +8070,11 @@ export const schemaDict = {
|
|
|
8060
8070
|
format: 'did',
|
|
8061
8071
|
},
|
|
8062
8072
|
},
|
|
8073
|
+
recId: {
|
|
8074
|
+
type: 'integer',
|
|
8075
|
+
description:
|
|
8076
|
+
'Snowflake for this recommendation, use when submitting recommendation events.',
|
|
8077
|
+
},
|
|
8063
8078
|
},
|
|
8064
8079
|
},
|
|
8065
8080
|
},
|
|
@@ -83,6 +83,8 @@ export interface ConfigRegion {
|
|
|
83
83
|
countryCode: string
|
|
84
84
|
/** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. */
|
|
85
85
|
regionCode?: string
|
|
86
|
+
/** The minimum age (as a whole integer) required to use Bluesky in this region. */
|
|
87
|
+
minAccessAge: number
|
|
86
88
|
/** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. */
|
|
87
89
|
rules: (
|
|
88
90
|
| $Typed<ConfigRegionRuleDefault>
|
|
@@ -24,6 +24,8 @@ export type InputSchema = undefined
|
|
|
24
24
|
|
|
25
25
|
export interface OutputSchema {
|
|
26
26
|
actors: AppBskyActorDefs.ProfileView[]
|
|
27
|
+
/** Snowflake for this recommendation, use when submitting recommendation events. */
|
|
28
|
+
recId?: number
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
export type HandlerInput = void
|
|
@@ -2,7 +2,7 @@ import crypto from 'node:crypto'
|
|
|
2
2
|
import { once } from 'node:events'
|
|
3
3
|
import { Server, createServer } from 'node:http'
|
|
4
4
|
import { AddressInfo } from 'node:net'
|
|
5
|
-
import express, { Application } from 'express'
|
|
5
|
+
import express, { Application, json } from 'express'
|
|
6
6
|
import {
|
|
7
7
|
AppBskyAgeassuranceDefs,
|
|
8
8
|
AtpAgent,
|
|
@@ -33,6 +33,7 @@ jest.mock('../../dist/api/age-assurance/const.js', () => {
|
|
|
33
33
|
{
|
|
34
34
|
countryCode: 'AA',
|
|
35
35
|
regionCode: undefined,
|
|
36
|
+
minAccessAge: 13,
|
|
36
37
|
rules: [
|
|
37
38
|
{
|
|
38
39
|
$type: ruleIds.IfAssuredOverAge,
|
|
@@ -48,6 +49,7 @@ jest.mock('../../dist/api/age-assurance/const.js', () => {
|
|
|
48
49
|
{
|
|
49
50
|
countryCode: 'BB',
|
|
50
51
|
regionCode: undefined,
|
|
52
|
+
minAccessAge: 13,
|
|
51
53
|
rules: [
|
|
52
54
|
{
|
|
53
55
|
$type: ruleIds.IfAssuredOverAge,
|
|
@@ -665,7 +667,7 @@ class MockKwsServer {
|
|
|
665
667
|
sendAdultVerifiedFlowEmailMock: jest.Mock
|
|
666
668
|
}) {
|
|
667
669
|
this.app = express()
|
|
668
|
-
.use(
|
|
670
|
+
.use(json())
|
|
669
671
|
.post('/auth/realms/kws/protocol/openid-connect/token', (_, res) =>
|
|
670
672
|
oauthMock(_, res),
|
|
671
673
|
)
|
|
@@ -493,6 +493,46 @@ describe('pds profile views', () => {
|
|
|
493
493
|
expect(data.status).toMatchSnapshot()
|
|
494
494
|
})
|
|
495
495
|
})
|
|
496
|
+
|
|
497
|
+
describe('when taken down', () => {
|
|
498
|
+
it('it does not return the live status', async () => {
|
|
499
|
+
const res = await sc.agent.com.atproto.repo.putRecord(
|
|
500
|
+
{
|
|
501
|
+
repo: alice,
|
|
502
|
+
collection: ids.AppBskyActorStatus,
|
|
503
|
+
rkey: 'self',
|
|
504
|
+
record: {
|
|
505
|
+
status: 'app.bsky.actor.status#live',
|
|
506
|
+
embed,
|
|
507
|
+
durationMinutes: 10,
|
|
508
|
+
createdAt: new Date().toISOString(),
|
|
509
|
+
},
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
headers: sc.getHeaders(alice),
|
|
513
|
+
encoding: 'application/json',
|
|
514
|
+
},
|
|
515
|
+
)
|
|
516
|
+
await network.processAll()
|
|
517
|
+
|
|
518
|
+
await network.bsky.ctx.dataplane.takedownRecord({
|
|
519
|
+
recordUri: res.data.uri,
|
|
520
|
+
})
|
|
521
|
+
await network.processAll()
|
|
522
|
+
|
|
523
|
+
const { data } = await agent.api.app.bsky.actor.getProfile(
|
|
524
|
+
{ actor: alice },
|
|
525
|
+
{
|
|
526
|
+
headers: await network.serviceHeaders(
|
|
527
|
+
alice,
|
|
528
|
+
ids.AppBskyActorGetProfile,
|
|
529
|
+
),
|
|
530
|
+
},
|
|
531
|
+
)
|
|
532
|
+
|
|
533
|
+
expect(data.status).toBeUndefined()
|
|
534
|
+
})
|
|
535
|
+
})
|
|
496
536
|
})
|
|
497
537
|
|
|
498
538
|
async function updateProfile(did: string, record: Record<string, unknown>) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./tests/_util.ts","./tests/auth.test.ts","./tests/blob-resolver.test.ts","./tests/entryway-auth.test.ts","./tests/etcd.test.ts","./tests/feed-generation.test.ts","./tests/label-hydration.test.ts","./tests/postgates.test.ts","./tests/query-labels.test.ts","./tests/redis-cache.test.ts","./tests/server.test.ts","./tests/sitemap.test.ts","./tests/stash.test.ts","./tests/utils.test.ts","./tests/admin/admin-auth.test.ts","./tests/admin/moderation.test.ts","./tests/data-plane/db.test.ts","./tests/data-plane/duplicate-records.test.ts","./tests/data-plane/handle-invalidation.test.ts","./tests/data-plane/indexing.test.ts","./tests/data-plane/subscription.test.ts","./tests/data-plane/thread-mutes.test.ts","./tests/hydration/util.test.ts","./tests/image/server.test.ts","./tests/image/sharp.test.ts","./tests/image/uri.test.ts","./tests/seed/feed-hidden-replies.ts","./tests/seed/get-suggested-starter-packs.ts","./tests/seed/get-trends.ts","./tests/seed/known-followers.ts","./tests/seed/postgates.ts","./tests/views/account-deactivation.test.ts","./tests/views/actor-likes.test.ts","./tests/views/actor-search.test.ts","./tests/views/age-assurance-v2.test.ts","./tests/views/age-assurance.test.ts","./tests/views/author-feed.test.ts","./tests/views/block-lists.test.ts","./tests/views/blocks.test.ts","./tests/views/bookmarks.test.ts","./tests/views/feed-hidden-replies.test.ts","./tests/views/feed-view-post.test.ts","./tests/views/follows.test.ts","./tests/views/get-config.test.ts","./tests/views/get-suggested-starter-packs.test.ts","./tests/views/get-trends.test.ts","./tests/views/known-followers.test.ts","./tests/views/labeler-service.test.ts","./tests/views/labels-needs-review.test.ts","./tests/views/labels-takedown.test.ts","./tests/views/likes.test.ts","./tests/views/list-feed.test.ts","./tests/views/lists.test.ts","./tests/views/mute-lists.test.ts","./tests/views/mutes.test.ts","./tests/views/notifications.test.ts","./tests/views/post-search.test.ts","./tests/views/posts-debug.test.ts","./tests/views/posts.test.ts","./tests/views/profile-debug.test.ts","./tests/views/profile.test.ts","./tests/views/quotes.test.ts","./tests/views/reposts.test.ts","./tests/views/starter-packs.test.ts","./tests/views/suggested-follows.test.ts","./tests/views/suggestions.test.ts","./tests/views/thread-v2.test.ts","./tests/views/thread.test.ts","./tests/views/threadgating.test.ts","./tests/views/timeline.test.ts","./tests/views/verification.test.ts"],"version":"5.8.3"}
|