@singi-labs/sifa-sdk 0.19.87 → 0.19.89
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-ceqefXAw.d.ts → follow-profile-CVcA2w1v.d.ts} +1 -1
- package/dist/{follow-profile-CQ3DTTak.d.cts → follow-profile-CgLLLQtJ.d.cts} +1 -1
- package/dist/{index-B0BDMGLm.d.ts → index-BEAuoL6l.d.ts} +1 -1
- package/dist/{index-BrWWVQLL.d.cts → index-DU0pYHch.d.cts} +1 -1
- package/dist/index.cjs +48 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/jsonld/index.d.cts +2 -2
- package/dist/jsonld/index.d.ts +2 -2
- package/dist/{network-map-NbEQwn91.d.ts → network-map-Bx5ohCEV.d.ts} +4 -4
- package/dist/{network-map-BRoBXwPG.d.cts → network-map-D39CQj9J.d.cts} +4 -4
- package/dist/{profile-summary-BpfRgE0z.d.cts → profile-summary-D56VII1x.d.cts} +1 -1
- package/dist/{profile-summary-BGIJ6ovO.d.ts → profile-summary-DPNTzeDv.d.ts} +1 -1
- package/dist/query/fetchers/index.d.cts +8 -8
- package/dist/query/fetchers/index.d.ts +8 -8
- package/dist/query/hooks/index.d.cts +6 -6
- package/dist/query/hooks/index.d.ts +6 -6
- package/dist/query/index.d.cts +11 -11
- package/dist/query/index.d.ts +11 -11
- package/dist/resume/index.d.cts +2 -2
- package/dist/resume/index.d.ts +2 -2
- package/dist/schemas/follow-profile.js +3 -1
- package/dist/schemas/follow-profile.js.map +1 -1
- package/dist/schemas/index.cjs +9 -5
- 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/taxonomy/index.js +8 -2
- package/dist/taxonomy/index.js.map +1 -1
- package/dist/taxonomy/verification-providers.js +45 -6
- package/dist/taxonomy/verification-providers.js.map +1 -1
- package/dist/tokens/colors.js +6 -1
- package/dist/tokens/colors.js.map +1 -1
- package/dist/tokens/index.cjs +5 -0
- package/dist/tokens/index.cjs.map +1 -1
- package/dist/tokens/index.d.cts +17 -1
- package/dist/tokens/index.d.ts +17 -1
- package/dist/tokens/index.js +3 -2
- package/dist/tokens/index.js.map +1 -1
- package/dist/{types-D2IffOnb.d.ts → types-BqxbmLY6.d.ts} +2 -2
- package/dist/{types-CPi-Xcur.d.cts → types-Dd7UMXIz.d.cts} +2 -2
- package/dist/{use-user-settings-BxIVvuk3.d.cts → use-user-settings-CBH1CeDP.d.cts} +4 -4
- package/dist/{use-user-settings-D_APuRP2.d.ts → use-user-settings-CFhaGcAq.d.ts} +4 -4
- package/dist/{user-settings-BFyyuR3C.d.cts → user-settings-ChPm0BFN.d.cts} +4 -4
- package/dist/{user-settings-BSlRJc0W.d.ts → user-settings-D1zKOWa2.d.ts} +4 -4
- package/dist/{verification-providers-7il3kPQS.d.cts → verification-providers-DeyGqaoC.d.cts} +66 -12
- package/dist/{verification-providers-7il3kPQS.d.ts → verification-providers-DeyGqaoC.d.ts} +66 -12
- package/package.json +1 -1
|
@@ -96,9 +96,9 @@ declare const selfLabelsSchema: z.ZodObject<{
|
|
|
96
96
|
* score or a gate. This registry only decides which issuers Sifa displays and
|
|
97
97
|
* with what provenance.
|
|
98
98
|
*
|
|
99
|
-
* Data-only: badge colors
|
|
100
|
-
*
|
|
101
|
-
*
|
|
99
|
+
* Data-only: badge colors live in the `/tokens` entry point
|
|
100
|
+
* (`verificationColors`, keyed by provider id); icons and components are
|
|
101
|
+
* consumer concerns (React DOM on web, React Native on mobile).
|
|
102
102
|
*/
|
|
103
103
|
type VerificationProviderId = 'bluesky' | 'mu';
|
|
104
104
|
/** How Sifa learns about a provider's verifications. */
|
|
@@ -120,12 +120,25 @@ interface VerificationProvider {
|
|
|
120
120
|
*/
|
|
121
121
|
source: VerificationSource;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* providers (Bluesky's AppView owns that decision). DIDs, not
|
|
126
|
-
* takeover must never confer verifier status.
|
|
123
|
+
* Trust-root DIDs for firehose-sourced providers. A verification record counts
|
|
124
|
+
* if its ISSUER DID is a root or a member of {@link verifierListUri}. Empty for
|
|
125
|
+
* `bluesky-api` providers (Bluesky's AppView owns that decision). DIDs, not
|
|
126
|
+
* handles: a handle takeover must never confer verifier status.
|
|
127
127
|
*/
|
|
128
128
|
verifierDids: readonly string[];
|
|
129
|
+
/**
|
|
130
|
+
* AT-URI of the `app.bsky.graph.list` where the provider publishes its
|
|
131
|
+
* trusted verifiers. Consumers load its members at runtime and pass them to
|
|
132
|
+
* {@link resolveVerifierProvider}, so a verifier the provider adds counts on
|
|
133
|
+
* Sifa without a release. The list owner must be in {@link verifierDids}.
|
|
134
|
+
*/
|
|
135
|
+
verifierListUri?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Verifiers last confirmed by hand, used ONLY when the caller supplies no
|
|
138
|
+
* list members (list not loaded yet, or a consumer that does not load it).
|
|
139
|
+
* Keeps such callers working; once members are supplied, the list wins.
|
|
140
|
+
*/
|
|
141
|
+
fallbackVerifierDids?: readonly string[];
|
|
129
142
|
}
|
|
130
143
|
/**
|
|
131
144
|
* A verification held by an account, as surfaced to the UI. `issuerDid` is
|
|
@@ -135,6 +148,8 @@ interface AccountVerification {
|
|
|
135
148
|
provider: VerificationProviderId;
|
|
136
149
|
verifiedAt?: string | null;
|
|
137
150
|
issuerDid?: string | null;
|
|
151
|
+
/** Display name of the issuer (firehose providers), when the API knows it. */
|
|
152
|
+
issuerName?: string | null;
|
|
138
153
|
}
|
|
139
154
|
declare const VERIFICATION_PROVIDERS: Record<VerificationProviderId, VerificationProvider>;
|
|
140
155
|
declare function isKnownVerificationProvider(id: string): id is VerificationProviderId;
|
|
@@ -142,11 +157,30 @@ declare function getVerificationProvider(id: string): VerificationProvider | und
|
|
|
142
157
|
/**
|
|
143
158
|
* The firehose issuer gate: given the DID that authored an
|
|
144
159
|
* `app.bsky.graph.verification` record, return the provider it verifies for, or
|
|
145
|
-
* `null` if the issuer is not a recognized firehose verifier.
|
|
146
|
-
*
|
|
147
|
-
*
|
|
160
|
+
* `null` if the issuer is not a recognized firehose verifier. A DID counts if it
|
|
161
|
+
* is a provider's trust root, or if `listMembers` (built with
|
|
162
|
+
* {@link buildVerifierListMembers}) maps it to a firehose provider. Without
|
|
163
|
+
* `listMembers`, each provider's `fallbackVerifierDids` apply instead.
|
|
164
|
+
* API-sourced providers (Bluesky) are never matched here -- their verifications
|
|
165
|
+
* do not enter through the firehose, so a self-issued record cannot resolve to
|
|
166
|
+
* them.
|
|
148
167
|
*/
|
|
149
|
-
declare function resolveVerifierProvider(issuerDid: string): VerificationProviderId | null;
|
|
168
|
+
declare function resolveVerifierProvider(issuerDid: string, listMembers?: ReadonlyMap<string, VerificationProviderId>): VerificationProviderId | null;
|
|
169
|
+
/** One `app.bsky.graph.listitem` record value, plus the repo it was read from. */
|
|
170
|
+
interface VerifierListItem {
|
|
171
|
+
/** DID of the repo the listitem record was read from. */
|
|
172
|
+
repoDid: string;
|
|
173
|
+
list: unknown;
|
|
174
|
+
subject: unknown;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Build the `listMembers` map for {@link resolveVerifierProvider} from raw
|
|
178
|
+
* listitem records. An item counts only if it belongs to a firehose provider's
|
|
179
|
+
* {@link VerificationProvider.verifierListUri}, was read from that list owner's
|
|
180
|
+
* repo, and that owner is one of the provider's trust roots. Anything else
|
|
181
|
+
* (a list item someone else wrote, another list, a malformed subject) is dropped.
|
|
182
|
+
*/
|
|
183
|
+
declare function buildVerifierListMembers(items: readonly VerifierListItem[]): Map<string, VerificationProviderId>;
|
|
150
184
|
/**
|
|
151
185
|
* D1 primary-provider selection: from all verifications an account holds, pick
|
|
152
186
|
* the one whose provider has the highest priority (lowest `priority` number) for
|
|
@@ -154,5 +188,25 @@ declare function resolveVerifierProvider(issuerDid: string): VerificationProvide
|
|
|
154
188
|
* unknown providers are ignored. Returns `null` when nothing is displayable.
|
|
155
189
|
*/
|
|
156
190
|
declare function primaryVerification(verifications: readonly AccountVerification[]): AccountVerification | null;
|
|
191
|
+
/**
|
|
192
|
+
* Label for one verification: the verifier's own display name (`issuerName`,
|
|
193
|
+
* sent by the API for firehose providers such as mu, where each verifier is
|
|
194
|
+
* shown by name), otherwise the provider label. Long names are shortened with
|
|
195
|
+
* an ellipsis. A provider this SDK version does not know falls back to its raw
|
|
196
|
+
* id ({@link resolveVerificationBadges} already drops those).
|
|
197
|
+
*/
|
|
198
|
+
declare function verificationLabel(v: Pick<AccountVerification, 'provider' | 'issuerName'>): string;
|
|
199
|
+
/**
|
|
200
|
+
* The verifications a badge should render, as a new array. Keeps the API's
|
|
201
|
+
* `verificationBadges` from providers this SDK knows; an empty array means
|
|
202
|
+
* "none", even with the legacy flag. When the array is absent, or holds only
|
|
203
|
+
* unknown providers, builds a Bluesky entry from the legacy `blueskyVerified`
|
|
204
|
+
* flag (payloads that predate `verificationBadges`).
|
|
205
|
+
*/
|
|
206
|
+
declare function resolveVerificationBadges(input: {
|
|
207
|
+
verificationBadges?: readonly AccountVerification[] | null;
|
|
208
|
+
blueskyVerified?: boolean;
|
|
209
|
+
blueskyVerifiedAt?: string | null;
|
|
210
|
+
}): AccountVerification[];
|
|
157
211
|
|
|
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,
|
|
212
|
+
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, type VerifierListItem as e, agentRefSchema as f, atUriSchema as g, buildVerifierListMembers as h, cidSchema as i, datetimeSchema as j, didSchema as k, externalRecordRefSchema as l, getVerificationProvider as m, isKnownVerificationProvider as n, languageTagSchema as o, maxGraphemes as p, partialDateSchema as q, primaryVerification as r, resolveVerificationBadges as s, resolveVerifierProvider as t, selfLabelsSchema as u, skillRefSchema as v, strongRefSchema as w, uriSchema as x, verificationLabel as y };
|
package/package.json
CHANGED