@singi-labs/sifa-sdk 0.19.55 → 0.19.57
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/dist/{follow-profile-D1l6pulB.d.ts → follow-profile-CQ3DTTak.d.cts} +3 -0
- package/dist/{follow-profile-D1l6pulB.d.cts → follow-profile-ceqefXAw.d.ts} +3 -0
- package/dist/{index-DmlIG8sJ.d.cts → index-BeQbepFn.d.cts} +7 -1
- package/dist/{index-D9GC0u__.d.ts → index-CT-A3BEe.d.ts} +7 -1
- package/dist/index.cjs +16 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -81
- package/dist/index.d.ts +10 -81
- package/dist/index.js +1 -1
- package/dist/jsonld/index.d.cts +2 -2
- package/dist/jsonld/index.d.ts +2 -2
- package/dist/{network-map-CiWrQ1fF.d.ts → network-map-CKF7Yozc.d.ts} +4 -4
- package/dist/{network-map-CdYpUy-t.d.cts → network-map-DHOOMSCP.d.cts} +4 -4
- package/dist/{org-fmpG85L0.d.cts → org-Bq3HbpLD.d.cts} +33 -6
- package/dist/{org-hxHnoBfg.d.ts → org-CelDIOiN.d.ts} +33 -6
- package/dist/{profile-summary-5T1hDw6Q.d.cts → profile-summary-CD3-QflX.d.cts} +1 -1
- package/dist/{profile-summary-Bj7ufSDK.d.ts → profile-summary-CyRzFe7f.d.ts} +1 -1
- package/dist/query/fetchers/discovery.js.map +1 -1
- package/dist/query/fetchers/follow.js +13 -4
- package/dist/query/fetchers/follow.js.map +1 -1
- package/dist/query/fetchers/index.cjs +21 -6
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +8 -8
- package/dist/query/fetchers/index.d.ts +8 -8
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/fetchers/search.js +8 -2
- package/dist/query/fetchers/search.js.map +1 -1
- package/dist/query/hooks/index.cjs +17 -4
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +6 -6
- package/dist/query/hooks/index.d.ts +6 -6
- package/dist/query/hooks/use-follow.js +1 -1
- package/dist/query/hooks/use-follow.js.map +1 -1
- package/dist/query/index.cjs +22 -7
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +12 -12
- package/dist/query/index.d.ts +12 -12
- package/dist/query/index.js.map +1 -1
- package/dist/resume/index.d.cts +2 -2
- package/dist/resume/index.d.ts +2 -2
- package/dist/schemas/follow-profile.js +18 -1
- package/dist/schemas/follow-profile.js.map +1 -1
- package/dist/schemas/index.cjs +53 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +2 -2
- package/dist/schemas/index.d.ts +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/{types-jB67EFpw.d.ts → types-BHnGSJ3z.d.cts} +34 -4
- package/dist/{types-DHT7jcZc.d.cts → types-BKEBVobU.d.ts} +34 -4
- package/dist/{use-org-notification-emails-Cj8IDI_7.d.cts → use-org-notification-emails-BTR2Yxq8.d.cts} +9 -8
- package/dist/{use-org-notification-emails-CWLCWkmb.d.ts → use-org-notification-emails-DDIi6giD.d.ts} +9 -8
- package/dist/verification-providers-7il3kPQS.d.cts +158 -0
- package/dist/verification-providers-7il3kPQS.d.ts +158 -0
- package/package.json +1 -1
- package/dist/shared-v0vl5hov.d.cts +0 -87
- package/dist/shared-v0vl5hov.d.ts +0 -87
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Grapheme-aware refinement matching the AT Protocol lexicon `maxGraphemes`
|
|
5
|
+
* constraint. JS strings are sequences of UTF-16 code units, but lexicon
|
|
6
|
+
* `maxGraphemes` counts user-perceived characters (grapheme clusters), so
|
|
7
|
+
* emoji sequences, regional indicators, ZWJ joins, and combining marks all
|
|
8
|
+
* count as one unit each. We use `Intl.Segmenter` to enforce this correctly.
|
|
9
|
+
*/
|
|
10
|
+
declare function maxGraphemes(max: number): (value: string) => boolean;
|
|
11
|
+
/** Decentralized identifier, AT Protocol `format: did`. */
|
|
12
|
+
declare const didSchema: z.ZodString;
|
|
13
|
+
/** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */
|
|
14
|
+
declare const datetimeSchema: z.ZodString;
|
|
15
|
+
/**
|
|
16
|
+
* Freeform calendar date for user-facing profile dates (start/end, issued,
|
|
17
|
+
* completed, awarded, published, etc.). Accepts a bare year, year-month,
|
|
18
|
+
* year-month-day, or a full datetime (so a legacy record's RFC-3339 date maps
|
|
19
|
+
* through on backfill without loss). NOT strict `datetime` -- users typically
|
|
20
|
+
* remember only month/year, and LinkedIn-importer writes carry partial dates,
|
|
21
|
+
* so the lexicons document these as freeform `YYYY-MM` / `YYYY-MM-DD`. Record
|
|
22
|
+
* metadata like `createdAt` stays on `datetimeSchema`.
|
|
23
|
+
*/
|
|
24
|
+
declare const partialDateSchema: z.ZodString;
|
|
25
|
+
/** Generic AT-URI, AT Protocol `format: at-uri`. */
|
|
26
|
+
declare const atUriSchema: z.ZodString;
|
|
27
|
+
/** Content identifier, AT Protocol `format: cid`. Loose validation -- accepts CIDv0 and CIDv1. */
|
|
28
|
+
declare const cidSchema: z.ZodString;
|
|
29
|
+
/** BCP 47 language tag, AT Protocol `format: language`. */
|
|
30
|
+
declare const languageTagSchema: z.ZodString;
|
|
31
|
+
/** Generic URI, AT Protocol `format: uri`. */
|
|
32
|
+
declare const uriSchema: z.ZodString;
|
|
33
|
+
/**
|
|
34
|
+
* StrongRef shape from `com.atproto.repo.strongRef` -- pins a record by both
|
|
35
|
+
* AT-URI (identity) and CID (version).
|
|
36
|
+
*/
|
|
37
|
+
declare const strongRefSchema: z.ZodObject<{
|
|
38
|
+
uri: z.ZodString;
|
|
39
|
+
cid: z.ZodString;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
/**
|
|
42
|
+
* Reference to an `id.sifa.profile.skill` record by AT-URI. Mirrors
|
|
43
|
+
* `id.sifa.defs#skillRef`, which carries no CID at all: skills are mutable
|
|
44
|
+
* records in the same user's repo, so the reference resolves live and tracks
|
|
45
|
+
* edits to the target.
|
|
46
|
+
*/
|
|
47
|
+
declare const skillRefSchema: z.ZodObject<{
|
|
48
|
+
uri: z.ZodString;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
/**
|
|
51
|
+
* Reference to a record by AT-URI, with an optional CID. Mirrors
|
|
52
|
+
* `id.sifa.defs#externalRecordRef`. Unlike a strongRef the CID is optional:
|
|
53
|
+
* consumers resolve the AT-URI live so the reference tracks edits to the
|
|
54
|
+
* target, and the CID is a best-effort integrity hint only.
|
|
55
|
+
*/
|
|
56
|
+
declare const externalRecordRefSchema: z.ZodObject<{
|
|
57
|
+
uri: z.ZodString;
|
|
58
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
/**
|
|
61
|
+
* Shared reference to an organization or person named by a record. Mirrors
|
|
62
|
+
* `id.sifa.defs#agentRef`. `name` is a point-in-time snapshot label captured
|
|
63
|
+
* when the record was saved; `did` and `entityRef` are the durable identity and
|
|
64
|
+
* should be resolved live. `name` is required so an empty object cannot validate
|
|
65
|
+
* as a no-op. `.passthrough()` (not `.strict()`): external apps may emit fields a
|
|
66
|
+
* newer schema will define, and dropping them on a round-trip would silently
|
|
67
|
+
* lose data.
|
|
68
|
+
*/
|
|
69
|
+
declare const agentRefSchema: z.ZodObject<{
|
|
70
|
+
name: z.ZodString;
|
|
71
|
+
did: z.ZodOptional<z.ZodString>;
|
|
72
|
+
entityRef: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$loose>;
|
|
74
|
+
type AgentRef = z.infer<typeof agentRefSchema>;
|
|
75
|
+
/**
|
|
76
|
+
* Self-labels shape from `com.atproto.label.defs#selfLabels`. Modelled
|
|
77
|
+
* permissively because clients rarely construct this directly; the AppView
|
|
78
|
+
* handles label validation.
|
|
79
|
+
*/
|
|
80
|
+
declare const selfLabelsSchema: z.ZodObject<{
|
|
81
|
+
$type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
|
|
82
|
+
values: z.ZodArray<z.ZodObject<{
|
|
83
|
+
val: z.ZodString;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Verification providers -- the trust roots Sifa recognizes for AT Protocol
|
|
89
|
+
* `app.bsky.graph.verification` records.
|
|
90
|
+
*
|
|
91
|
+
* Framing (see decisions/2026-07-13-third-party-verification-providers.md, D4):
|
|
92
|
+
* a verification checkmark is ONE low-tier trust layer, not Sifa's headline.
|
|
93
|
+
* Most of what it certifies is "this account is who they claim to be" -- useful,
|
|
94
|
+
* and worth carrying because it's an already-recognized network signal, but low
|
|
95
|
+
* value on its own. It sits among Sifa's other trust signals and never becomes a
|
|
96
|
+
* score or a gate. This registry only decides which issuers Sifa displays and
|
|
97
|
+
* with what provenance.
|
|
98
|
+
*
|
|
99
|
+
* Data-only: badge colors and icons are consumer concerns (React DOM on web,
|
|
100
|
+
* React Native on mobile), same split as {@link PLATFORM_LABELS}. Consumers map
|
|
101
|
+
* a provider id to a token/color.
|
|
102
|
+
*/
|
|
103
|
+
type VerificationProviderId = 'bluesky' | 'mu';
|
|
104
|
+
/** How Sifa learns about a provider's verifications. */
|
|
105
|
+
type VerificationSource = 'bluesky-api' | 'firehose';
|
|
106
|
+
interface VerificationProvider {
|
|
107
|
+
id: VerificationProviderId;
|
|
108
|
+
/** Human label for the badge popover, e.g. "Bluesky", "mu (Eurosky)". */
|
|
109
|
+
label: string;
|
|
110
|
+
/**
|
|
111
|
+
* Primary-display priority (D1): when an account holds verifications from
|
|
112
|
+
* multiple providers, the lowest number wins the single inline badge and the
|
|
113
|
+
* rest move into the popover. Must be unique across providers.
|
|
114
|
+
*/
|
|
115
|
+
priority: number;
|
|
116
|
+
/**
|
|
117
|
+
* - `bluesky-api`: sourced from Bluesky's public-API `verifiedStatus`. Bluesky
|
|
118
|
+
* maintains its own trusted-verifier set, so Sifa keeps no local DID list.
|
|
119
|
+
* - `firehose`: sourced from the Jetstream, gated on {@link verifierDids}.
|
|
120
|
+
*/
|
|
121
|
+
source: VerificationSource;
|
|
122
|
+
/**
|
|
123
|
+
* Trusted verifier DIDs for firehose-sourced providers. A verification record
|
|
124
|
+
* counts only if its ISSUER DID is in this list. Empty for `bluesky-api`
|
|
125
|
+
* providers (Bluesky's AppView owns that decision). DIDs, not handles: a handle
|
|
126
|
+
* takeover must never confer verifier status.
|
|
127
|
+
*/
|
|
128
|
+
verifierDids: readonly string[];
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* A verification held by an account, as surfaced to the UI. `issuerDid` is
|
|
132
|
+
* present for firehose-sourced providers and absent for `bluesky-api`.
|
|
133
|
+
*/
|
|
134
|
+
interface AccountVerification {
|
|
135
|
+
provider: VerificationProviderId;
|
|
136
|
+
verifiedAt?: string | null;
|
|
137
|
+
issuerDid?: string | null;
|
|
138
|
+
}
|
|
139
|
+
declare const VERIFICATION_PROVIDERS: Record<VerificationProviderId, VerificationProvider>;
|
|
140
|
+
declare function isKnownVerificationProvider(id: string): id is VerificationProviderId;
|
|
141
|
+
declare function getVerificationProvider(id: string): VerificationProvider | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* The firehose issuer gate: given the DID that authored an
|
|
144
|
+
* `app.bsky.graph.verification` record, return the provider it verifies for, or
|
|
145
|
+
* `null` if the issuer is not a recognized firehose verifier. API-sourced
|
|
146
|
+
* providers (Bluesky) are never matched here -- their verifications do not enter
|
|
147
|
+
* through the firehose, so a self-issued record cannot resolve to them.
|
|
148
|
+
*/
|
|
149
|
+
declare function resolveVerifierProvider(issuerDid: string): VerificationProviderId | null;
|
|
150
|
+
/**
|
|
151
|
+
* D1 primary-provider selection: from all verifications an account holds, pick
|
|
152
|
+
* the one whose provider has the highest priority (lowest `priority` number) for
|
|
153
|
+
* the single inline badge. The rest belong in the popover. Verifications from
|
|
154
|
+
* unknown providers are ignored. Returns `null` when nothing is displayable.
|
|
155
|
+
*/
|
|
156
|
+
declare function primaryVerification(verifications: readonly AccountVerification[]): AccountVerification | null;
|
|
157
|
+
|
|
158
|
+
export { type AgentRef as A, VERIFICATION_PROVIDERS as V, type AccountVerification as a, type VerificationProvider as b, type VerificationProviderId as c, type VerificationSource as d, agentRefSchema as e, atUriSchema as f, cidSchema as g, datetimeSchema as h, didSchema as i, externalRecordRefSchema as j, getVerificationProvider as k, isKnownVerificationProvider as l, languageTagSchema as m, maxGraphemes as n, primaryVerification as o, partialDateSchema as p, skillRefSchema as q, resolveVerifierProvider as r, selfLabelsSchema as s, strongRefSchema as t, uriSchema as u };
|
package/package.json
CHANGED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Grapheme-aware refinement matching the AT Protocol lexicon `maxGraphemes`
|
|
5
|
-
* constraint. JS strings are sequences of UTF-16 code units, but lexicon
|
|
6
|
-
* `maxGraphemes` counts user-perceived characters (grapheme clusters), so
|
|
7
|
-
* emoji sequences, regional indicators, ZWJ joins, and combining marks all
|
|
8
|
-
* count as one unit each. We use `Intl.Segmenter` to enforce this correctly.
|
|
9
|
-
*/
|
|
10
|
-
declare function maxGraphemes(max: number): (value: string) => boolean;
|
|
11
|
-
/** Decentralized identifier, AT Protocol `format: did`. */
|
|
12
|
-
declare const didSchema: z.ZodString;
|
|
13
|
-
/** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */
|
|
14
|
-
declare const datetimeSchema: z.ZodString;
|
|
15
|
-
/**
|
|
16
|
-
* Freeform calendar date for user-facing profile dates (start/end, issued,
|
|
17
|
-
* completed, awarded, published, etc.). Accepts a bare year, year-month,
|
|
18
|
-
* year-month-day, or a full datetime (so a legacy record's RFC-3339 date maps
|
|
19
|
-
* through on backfill without loss). NOT strict `datetime` -- users typically
|
|
20
|
-
* remember only month/year, and LinkedIn-importer writes carry partial dates,
|
|
21
|
-
* so the lexicons document these as freeform `YYYY-MM` / `YYYY-MM-DD`. Record
|
|
22
|
-
* metadata like `createdAt` stays on `datetimeSchema`.
|
|
23
|
-
*/
|
|
24
|
-
declare const partialDateSchema: z.ZodString;
|
|
25
|
-
/** Generic AT-URI, AT Protocol `format: at-uri`. */
|
|
26
|
-
declare const atUriSchema: z.ZodString;
|
|
27
|
-
/** Content identifier, AT Protocol `format: cid`. Loose validation -- accepts CIDv0 and CIDv1. */
|
|
28
|
-
declare const cidSchema: z.ZodString;
|
|
29
|
-
/** BCP 47 language tag, AT Protocol `format: language`. */
|
|
30
|
-
declare const languageTagSchema: z.ZodString;
|
|
31
|
-
/** Generic URI, AT Protocol `format: uri`. */
|
|
32
|
-
declare const uriSchema: z.ZodString;
|
|
33
|
-
/**
|
|
34
|
-
* StrongRef shape from `com.atproto.repo.strongRef` -- pins a record by both
|
|
35
|
-
* AT-URI (identity) and CID (version).
|
|
36
|
-
*/
|
|
37
|
-
declare const strongRefSchema: z.ZodObject<{
|
|
38
|
-
uri: z.ZodString;
|
|
39
|
-
cid: z.ZodString;
|
|
40
|
-
}, z.core.$strip>;
|
|
41
|
-
/**
|
|
42
|
-
* Reference to an `id.sifa.profile.skill` record by AT-URI. Mirrors
|
|
43
|
-
* `id.sifa.defs#skillRef`, which carries no CID at all: skills are mutable
|
|
44
|
-
* records in the same user's repo, so the reference resolves live and tracks
|
|
45
|
-
* edits to the target.
|
|
46
|
-
*/
|
|
47
|
-
declare const skillRefSchema: z.ZodObject<{
|
|
48
|
-
uri: z.ZodString;
|
|
49
|
-
}, z.core.$strip>;
|
|
50
|
-
/**
|
|
51
|
-
* Reference to a record by AT-URI, with an optional CID. Mirrors
|
|
52
|
-
* `id.sifa.defs#externalRecordRef`. Unlike a strongRef the CID is optional:
|
|
53
|
-
* consumers resolve the AT-URI live so the reference tracks edits to the
|
|
54
|
-
* target, and the CID is a best-effort integrity hint only.
|
|
55
|
-
*/
|
|
56
|
-
declare const externalRecordRefSchema: z.ZodObject<{
|
|
57
|
-
uri: z.ZodString;
|
|
58
|
-
cid: z.ZodOptional<z.ZodString>;
|
|
59
|
-
}, z.core.$strip>;
|
|
60
|
-
/**
|
|
61
|
-
* Shared reference to an organization or person named by a record. Mirrors
|
|
62
|
-
* `id.sifa.defs#agentRef`. `name` is a point-in-time snapshot label captured
|
|
63
|
-
* when the record was saved; `did` and `entityRef` are the durable identity and
|
|
64
|
-
* should be resolved live. `name` is required so an empty object cannot validate
|
|
65
|
-
* as a no-op. `.passthrough()` (not `.strict()`): external apps may emit fields a
|
|
66
|
-
* newer schema will define, and dropping them on a round-trip would silently
|
|
67
|
-
* lose data.
|
|
68
|
-
*/
|
|
69
|
-
declare const agentRefSchema: z.ZodObject<{
|
|
70
|
-
name: z.ZodString;
|
|
71
|
-
did: z.ZodOptional<z.ZodString>;
|
|
72
|
-
entityRef: z.ZodOptional<z.ZodString>;
|
|
73
|
-
}, z.core.$loose>;
|
|
74
|
-
type AgentRef = z.infer<typeof agentRefSchema>;
|
|
75
|
-
/**
|
|
76
|
-
* Self-labels shape from `com.atproto.label.defs#selfLabels`. Modelled
|
|
77
|
-
* permissively because clients rarely construct this directly; the AppView
|
|
78
|
-
* handles label validation.
|
|
79
|
-
*/
|
|
80
|
-
declare const selfLabelsSchema: z.ZodObject<{
|
|
81
|
-
$type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
|
|
82
|
-
values: z.ZodArray<z.ZodObject<{
|
|
83
|
-
val: z.ZodString;
|
|
84
|
-
}, z.core.$strip>>;
|
|
85
|
-
}, z.core.$strip>;
|
|
86
|
-
|
|
87
|
-
export { type AgentRef as A, agentRefSchema as a, atUriSchema as b, cidSchema as c, datetimeSchema as d, didSchema as e, externalRecordRefSchema as f, skillRefSchema as g, strongRefSchema as h, languageTagSchema as l, maxGraphemes as m, partialDateSchema as p, selfLabelsSchema as s, uriSchema as u };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Grapheme-aware refinement matching the AT Protocol lexicon `maxGraphemes`
|
|
5
|
-
* constraint. JS strings are sequences of UTF-16 code units, but lexicon
|
|
6
|
-
* `maxGraphemes` counts user-perceived characters (grapheme clusters), so
|
|
7
|
-
* emoji sequences, regional indicators, ZWJ joins, and combining marks all
|
|
8
|
-
* count as one unit each. We use `Intl.Segmenter` to enforce this correctly.
|
|
9
|
-
*/
|
|
10
|
-
declare function maxGraphemes(max: number): (value: string) => boolean;
|
|
11
|
-
/** Decentralized identifier, AT Protocol `format: did`. */
|
|
12
|
-
declare const didSchema: z.ZodString;
|
|
13
|
-
/** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */
|
|
14
|
-
declare const datetimeSchema: z.ZodString;
|
|
15
|
-
/**
|
|
16
|
-
* Freeform calendar date for user-facing profile dates (start/end, issued,
|
|
17
|
-
* completed, awarded, published, etc.). Accepts a bare year, year-month,
|
|
18
|
-
* year-month-day, or a full datetime (so a legacy record's RFC-3339 date maps
|
|
19
|
-
* through on backfill without loss). NOT strict `datetime` -- users typically
|
|
20
|
-
* remember only month/year, and LinkedIn-importer writes carry partial dates,
|
|
21
|
-
* so the lexicons document these as freeform `YYYY-MM` / `YYYY-MM-DD`. Record
|
|
22
|
-
* metadata like `createdAt` stays on `datetimeSchema`.
|
|
23
|
-
*/
|
|
24
|
-
declare const partialDateSchema: z.ZodString;
|
|
25
|
-
/** Generic AT-URI, AT Protocol `format: at-uri`. */
|
|
26
|
-
declare const atUriSchema: z.ZodString;
|
|
27
|
-
/** Content identifier, AT Protocol `format: cid`. Loose validation -- accepts CIDv0 and CIDv1. */
|
|
28
|
-
declare const cidSchema: z.ZodString;
|
|
29
|
-
/** BCP 47 language tag, AT Protocol `format: language`. */
|
|
30
|
-
declare const languageTagSchema: z.ZodString;
|
|
31
|
-
/** Generic URI, AT Protocol `format: uri`. */
|
|
32
|
-
declare const uriSchema: z.ZodString;
|
|
33
|
-
/**
|
|
34
|
-
* StrongRef shape from `com.atproto.repo.strongRef` -- pins a record by both
|
|
35
|
-
* AT-URI (identity) and CID (version).
|
|
36
|
-
*/
|
|
37
|
-
declare const strongRefSchema: z.ZodObject<{
|
|
38
|
-
uri: z.ZodString;
|
|
39
|
-
cid: z.ZodString;
|
|
40
|
-
}, z.core.$strip>;
|
|
41
|
-
/**
|
|
42
|
-
* Reference to an `id.sifa.profile.skill` record by AT-URI. Mirrors
|
|
43
|
-
* `id.sifa.defs#skillRef`, which carries no CID at all: skills are mutable
|
|
44
|
-
* records in the same user's repo, so the reference resolves live and tracks
|
|
45
|
-
* edits to the target.
|
|
46
|
-
*/
|
|
47
|
-
declare const skillRefSchema: z.ZodObject<{
|
|
48
|
-
uri: z.ZodString;
|
|
49
|
-
}, z.core.$strip>;
|
|
50
|
-
/**
|
|
51
|
-
* Reference to a record by AT-URI, with an optional CID. Mirrors
|
|
52
|
-
* `id.sifa.defs#externalRecordRef`. Unlike a strongRef the CID is optional:
|
|
53
|
-
* consumers resolve the AT-URI live so the reference tracks edits to the
|
|
54
|
-
* target, and the CID is a best-effort integrity hint only.
|
|
55
|
-
*/
|
|
56
|
-
declare const externalRecordRefSchema: z.ZodObject<{
|
|
57
|
-
uri: z.ZodString;
|
|
58
|
-
cid: z.ZodOptional<z.ZodString>;
|
|
59
|
-
}, z.core.$strip>;
|
|
60
|
-
/**
|
|
61
|
-
* Shared reference to an organization or person named by a record. Mirrors
|
|
62
|
-
* `id.sifa.defs#agentRef`. `name` is a point-in-time snapshot label captured
|
|
63
|
-
* when the record was saved; `did` and `entityRef` are the durable identity and
|
|
64
|
-
* should be resolved live. `name` is required so an empty object cannot validate
|
|
65
|
-
* as a no-op. `.passthrough()` (not `.strict()`): external apps may emit fields a
|
|
66
|
-
* newer schema will define, and dropping them on a round-trip would silently
|
|
67
|
-
* lose data.
|
|
68
|
-
*/
|
|
69
|
-
declare const agentRefSchema: z.ZodObject<{
|
|
70
|
-
name: z.ZodString;
|
|
71
|
-
did: z.ZodOptional<z.ZodString>;
|
|
72
|
-
entityRef: z.ZodOptional<z.ZodString>;
|
|
73
|
-
}, z.core.$loose>;
|
|
74
|
-
type AgentRef = z.infer<typeof agentRefSchema>;
|
|
75
|
-
/**
|
|
76
|
-
* Self-labels shape from `com.atproto.label.defs#selfLabels`. Modelled
|
|
77
|
-
* permissively because clients rarely construct this directly; the AppView
|
|
78
|
-
* handles label validation.
|
|
79
|
-
*/
|
|
80
|
-
declare const selfLabelsSchema: z.ZodObject<{
|
|
81
|
-
$type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
|
|
82
|
-
values: z.ZodArray<z.ZodObject<{
|
|
83
|
-
val: z.ZodString;
|
|
84
|
-
}, z.core.$strip>>;
|
|
85
|
-
}, z.core.$strip>;
|
|
86
|
-
|
|
87
|
-
export { type AgentRef as A, agentRefSchema as a, atUriSchema as b, cidSchema as c, datetimeSchema as d, didSchema as e, externalRecordRefSchema as f, skillRefSchema as g, strongRefSchema as h, languageTagSchema as l, maxGraphemes as m, partialDateSchema as p, selfLabelsSchema as s, uriSchema as u };
|