@singi-labs/sifa-sdk 0.12.10 → 0.12.12
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/{adult-content-DE7XOP9c.d.cts → adult-content-D2Dy1w2s.d.cts} +11 -0
- package/dist/{adult-content-DE7XOP9c.d.ts → adult-content-D2Dy1w2s.d.ts} +11 -0
- package/dist/{index-B__7m2Xg.d.cts → index-B9aqJbsG.d.cts} +2 -2
- package/dist/{index-DdfDo0Nx.d.ts → index-BQ46POs-.d.ts} +2 -2
- package/dist/{index-nNxAiYxw.d.ts → index-Br8vBw4N.d.ts} +2 -2
- package/dist/{index-CsvSv1S_.d.cts → index-CZ8BkCCc.d.cts} +2 -2
- package/dist/index.cjs +366 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -5
- package/dist/index.d.ts +73 -5
- package/dist/index.js +361 -7
- package/dist/index.js.map +1 -1
- package/dist/{org-BCqhEA6J.d.ts → org-Bflg9EiB.d.ts} +1 -1
- package/dist/{org-It9hf-ni.d.cts → org-Df5IjADP.d.cts} +1 -1
- package/dist/query/fetchers/index.d.cts +3 -3
- package/dist/query/fetchers/index.d.ts +3 -3
- package/dist/query/hooks/index.d.cts +3 -3
- package/dist/query/hooks/index.d.ts +3 -3
- package/dist/query/index.d.cts +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/schemas/index.cjs +21 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +33 -1
- package/dist/schemas/index.d.ts +33 -1
- package/dist/schemas/index.js +21 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/write/index.cjs +13 -1
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +18 -0
- package/dist/schemas/write/index.d.ts +18 -0
- package/dist/schemas/write/index.js +13 -1
- package/dist/schemas/write/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1902,6 +1902,136 @@ function detectPdsProvider(handle) {
|
|
|
1902
1902
|
return null;
|
|
1903
1903
|
}
|
|
1904
1904
|
|
|
1905
|
+
// src/format/embed.ts
|
|
1906
|
+
var LINK = { kind: "link" };
|
|
1907
|
+
var YOUTUBE_ID = /^[A-Za-z0-9_-]{6,}$/;
|
|
1908
|
+
function bareHost(hostname) {
|
|
1909
|
+
return hostname.toLowerCase().replace(/^www\./, "");
|
|
1910
|
+
}
|
|
1911
|
+
function resolveEmbed(url) {
|
|
1912
|
+
let parsed3;
|
|
1913
|
+
try {
|
|
1914
|
+
parsed3 = new URL(url);
|
|
1915
|
+
} catch {
|
|
1916
|
+
return LINK;
|
|
1917
|
+
}
|
|
1918
|
+
if (parsed3.protocol !== "https:") return LINK;
|
|
1919
|
+
const host = bareHost(parsed3.hostname);
|
|
1920
|
+
const segments = parsed3.pathname.split("/").filter(Boolean);
|
|
1921
|
+
if (host === "youtu.be") {
|
|
1922
|
+
const id = segments[0];
|
|
1923
|
+
if (id && YOUTUBE_ID.test(id)) {
|
|
1924
|
+
return youtubeEmbed(id);
|
|
1925
|
+
}
|
|
1926
|
+
return LINK;
|
|
1927
|
+
}
|
|
1928
|
+
if (host === "youtube.com" || host === "m.youtube.com") {
|
|
1929
|
+
if (parsed3.pathname === "/watch") {
|
|
1930
|
+
const id = parsed3.searchParams.get("v");
|
|
1931
|
+
if (id && YOUTUBE_ID.test(id)) return youtubeEmbed(id);
|
|
1932
|
+
return LINK;
|
|
1933
|
+
}
|
|
1934
|
+
if (segments[0] === "embed" || segments[0] === "shorts") {
|
|
1935
|
+
const id = segments[1];
|
|
1936
|
+
if (id && YOUTUBE_ID.test(id)) return youtubeEmbed(id);
|
|
1937
|
+
}
|
|
1938
|
+
return LINK;
|
|
1939
|
+
}
|
|
1940
|
+
if (host === "vimeo.com") {
|
|
1941
|
+
const id = segments[0];
|
|
1942
|
+
if (id && /^\d+$/.test(id)) {
|
|
1943
|
+
return {
|
|
1944
|
+
kind: "iframe",
|
|
1945
|
+
provider: "vimeo",
|
|
1946
|
+
src: `https://player.vimeo.com/video/${id}`,
|
|
1947
|
+
aspectRatio: "16:9"
|
|
1948
|
+
};
|
|
1949
|
+
}
|
|
1950
|
+
return LINK;
|
|
1951
|
+
}
|
|
1952
|
+
if (host === "player.vimeo.com") {
|
|
1953
|
+
if (segments[0] === "video" && segments[1] && /^\d+$/.test(segments[1])) {
|
|
1954
|
+
return {
|
|
1955
|
+
kind: "iframe",
|
|
1956
|
+
provider: "vimeo",
|
|
1957
|
+
src: `https://player.vimeo.com/video/${segments[1]}`,
|
|
1958
|
+
aspectRatio: "16:9"
|
|
1959
|
+
};
|
|
1960
|
+
}
|
|
1961
|
+
return LINK;
|
|
1962
|
+
}
|
|
1963
|
+
if (host === "speakerdeck.com") {
|
|
1964
|
+
if (segments[0] === "player" && segments[1]) {
|
|
1965
|
+
return { kind: "iframe", provider: "speakerdeck", src: parsed3.href, aspectRatio: "4:3" };
|
|
1966
|
+
}
|
|
1967
|
+
return LINK;
|
|
1968
|
+
}
|
|
1969
|
+
if (host === "slideshare.net") {
|
|
1970
|
+
if (segments[0] === "slideshow" && segments[1] === "embed_code") {
|
|
1971
|
+
return { kind: "iframe", provider: "slideshare", src: parsed3.href, aspectRatio: "4:3" };
|
|
1972
|
+
}
|
|
1973
|
+
return LINK;
|
|
1974
|
+
}
|
|
1975
|
+
if (host === "docs.google.com") {
|
|
1976
|
+
if (segments[0] === "presentation" && segments[1] === "d" && segments[2]) {
|
|
1977
|
+
return {
|
|
1978
|
+
kind: "iframe",
|
|
1979
|
+
provider: "googleslides",
|
|
1980
|
+
src: `https://docs.google.com/presentation/d/${segments[2]}/embed`,
|
|
1981
|
+
aspectRatio: "16:9"
|
|
1982
|
+
};
|
|
1983
|
+
}
|
|
1984
|
+
return LINK;
|
|
1985
|
+
}
|
|
1986
|
+
if (host === "loom.com") {
|
|
1987
|
+
if (segments[0] === "share" && segments[1]) {
|
|
1988
|
+
return {
|
|
1989
|
+
kind: "iframe",
|
|
1990
|
+
provider: "loom",
|
|
1991
|
+
src: `https://www.loom.com/embed/${segments[1]}`,
|
|
1992
|
+
aspectRatio: "16:9"
|
|
1993
|
+
};
|
|
1994
|
+
}
|
|
1995
|
+
return LINK;
|
|
1996
|
+
}
|
|
1997
|
+
if (host === "canva.com") {
|
|
1998
|
+
if (segments[0] === "design" && segments[1] && segments[2] === "view") {
|
|
1999
|
+
return {
|
|
2000
|
+
kind: "iframe",
|
|
2001
|
+
provider: "canva",
|
|
2002
|
+
src: `https://www.canva.com/design/${segments[1]}/view?embed`,
|
|
2003
|
+
aspectRatio: "16:9"
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
2006
|
+
return LINK;
|
|
2007
|
+
}
|
|
2008
|
+
return LINK;
|
|
2009
|
+
}
|
|
2010
|
+
function youtubeEmbed(id) {
|
|
2011
|
+
return {
|
|
2012
|
+
kind: "iframe",
|
|
2013
|
+
provider: "youtube",
|
|
2014
|
+
src: `https://www.youtube-nocookie.com/embed/${id}`,
|
|
2015
|
+
aspectRatio: "16:9"
|
|
2016
|
+
};
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
// src/format/talk-slug.ts
|
|
2020
|
+
var MAX_SLUG_LENGTH = 60;
|
|
2021
|
+
var COMBINING_MARKS2 = /[̀-ͯ]/g;
|
|
2022
|
+
function slugifyTitle(title) {
|
|
2023
|
+
const slug = title.normalize("NFKD").replace(COMBINING_MARKS2, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
2024
|
+
return slug.slice(0, MAX_SLUG_LENGTH).replace(/-+$/g, "");
|
|
2025
|
+
}
|
|
2026
|
+
function buildTalkSlug(title, rkey) {
|
|
2027
|
+
const slug = slugifyTitle(title);
|
|
2028
|
+
return slug ? `${slug}-${rkey}` : rkey;
|
|
2029
|
+
}
|
|
2030
|
+
function parseTalkRkey(segment) {
|
|
2031
|
+
const idx = segment.lastIndexOf("-");
|
|
2032
|
+
return idx === -1 ? segment : segment.slice(idx + 1);
|
|
2033
|
+
}
|
|
2034
|
+
|
|
1905
2035
|
// src/format/text-sanitize.ts
|
|
1906
2036
|
var COMBINING_MARK = /\p{M}/u;
|
|
1907
2037
|
var BIDI_CONTROLS = /[--]/gu;
|
|
@@ -2718,17 +2848,40 @@ var streamAddressSchema = z.object({
|
|
|
2718
2848
|
country: z.string().optional(),
|
|
2719
2849
|
postalCode: z.string().optional()
|
|
2720
2850
|
});
|
|
2851
|
+
var streamRichSegmentSchema = z.object({
|
|
2852
|
+
text: z.string(),
|
|
2853
|
+
link: z.string().optional(),
|
|
2854
|
+
mention: z.string().optional(),
|
|
2855
|
+
tag: z.string().optional()
|
|
2856
|
+
});
|
|
2721
2857
|
var streamCardBodySchema = z.discriminatedUnion("kind", [
|
|
2722
|
-
z.object({
|
|
2723
|
-
|
|
2724
|
-
|
|
2858
|
+
z.object({
|
|
2859
|
+
kind: z.literal("text"),
|
|
2860
|
+
text: z.string(),
|
|
2861
|
+
richSegments: z.array(streamRichSegmentSchema).optional(),
|
|
2862
|
+
tags: z.array(z.string()).optional()
|
|
2863
|
+
}),
|
|
2864
|
+
z.object({
|
|
2865
|
+
kind: z.literal("media"),
|
|
2866
|
+
text: z.string().optional(),
|
|
2867
|
+
tags: z.array(z.string()).optional()
|
|
2868
|
+
}),
|
|
2869
|
+
z.object({
|
|
2870
|
+
kind: z.literal("link"),
|
|
2871
|
+
text: z.string().optional(),
|
|
2872
|
+
tags: z.array(z.string()).optional()
|
|
2873
|
+
}),
|
|
2725
2874
|
z.object({
|
|
2726
2875
|
kind: z.literal("track"),
|
|
2727
2876
|
text: z.string().optional(),
|
|
2728
2877
|
trackTitle: z.string().optional(),
|
|
2729
2878
|
artist: z.string().optional()
|
|
2730
2879
|
}),
|
|
2731
|
-
z.object({
|
|
2880
|
+
z.object({
|
|
2881
|
+
kind: z.literal("generic"),
|
|
2882
|
+
text: z.string().optional(),
|
|
2883
|
+
tags: z.array(z.string()).optional()
|
|
2884
|
+
}),
|
|
2732
2885
|
z.object({
|
|
2733
2886
|
kind: z.literal("github-pr"),
|
|
2734
2887
|
repoOwner: z.string(),
|
|
@@ -3314,6 +3467,188 @@ function applyAsqAnswer(vm, record) {
|
|
|
3314
3467
|
vm.body = { kind: "generic" };
|
|
3315
3468
|
return vm;
|
|
3316
3469
|
}
|
|
3470
|
+
function nonBlankString(value) {
|
|
3471
|
+
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
3472
|
+
}
|
|
3473
|
+
function readBodyField(value) {
|
|
3474
|
+
const direct = nonBlankString(value);
|
|
3475
|
+
if (direct) return direct;
|
|
3476
|
+
return nonBlankString(asRecord(value)?.value);
|
|
3477
|
+
}
|
|
3478
|
+
function httpUrl(value) {
|
|
3479
|
+
return typeof value === "string" && /^https?:\/\//i.test(value) ? value : void 0;
|
|
3480
|
+
}
|
|
3481
|
+
var GENERIC_TEXT_ORDER = [
|
|
3482
|
+
"text",
|
|
3483
|
+
"title",
|
|
3484
|
+
"name",
|
|
3485
|
+
"description",
|
|
3486
|
+
"content",
|
|
3487
|
+
"body",
|
|
3488
|
+
"message",
|
|
3489
|
+
"note",
|
|
3490
|
+
"caption",
|
|
3491
|
+
"summary",
|
|
3492
|
+
"status"
|
|
3493
|
+
];
|
|
3494
|
+
function genericText(collection, record) {
|
|
3495
|
+
if (collection === "social.passports.fiftyStates.visit") {
|
|
3496
|
+
return nonBlankString(record.city);
|
|
3497
|
+
}
|
|
3498
|
+
for (const field of GENERIC_TEXT_ORDER) {
|
|
3499
|
+
if (field === "body") {
|
|
3500
|
+
const body = readBodyField(record.body);
|
|
3501
|
+
if (body) return body;
|
|
3502
|
+
continue;
|
|
3503
|
+
}
|
|
3504
|
+
const value = nonBlankString(record[field]);
|
|
3505
|
+
if (value) return value;
|
|
3506
|
+
}
|
|
3507
|
+
return void 0;
|
|
3508
|
+
}
|
|
3509
|
+
function genericTags(record) {
|
|
3510
|
+
const tags = record.tags;
|
|
3511
|
+
if (!Array.isArray(tags)) return void 0;
|
|
3512
|
+
const out = tags.filter((t) => typeof t === "string" && t.length > 0);
|
|
3513
|
+
return out.length > 0 ? out : void 0;
|
|
3514
|
+
}
|
|
3515
|
+
function genericMedia(record, did, alt) {
|
|
3516
|
+
const fromArray = (raw) => {
|
|
3517
|
+
const img = asRecord(raw);
|
|
3518
|
+
if (!img) return void 0;
|
|
3519
|
+
return blobMedia(img.image ?? raw, did, asNonEmptyString(img.alt) ?? alt);
|
|
3520
|
+
};
|
|
3521
|
+
const images = record.images;
|
|
3522
|
+
if (Array.isArray(images)) {
|
|
3523
|
+
const out = images.map(fromArray).filter((m) => m !== void 0);
|
|
3524
|
+
if (out.length > 0) return out;
|
|
3525
|
+
}
|
|
3526
|
+
const embed = asRecord(record.embed);
|
|
3527
|
+
if (embed && Array.isArray(embed.images)) {
|
|
3528
|
+
const out = embed.images.map(fromArray).filter((m) => m !== void 0);
|
|
3529
|
+
if (out.length > 0) return out;
|
|
3530
|
+
}
|
|
3531
|
+
const single = blobMedia(record.image, did, alt) ?? blobMedia(record.thumbnail, did, alt) ?? blobMedia(record.thumb, did, alt) ?? blobMedia(record.photo, did, alt) ?? (embed ? blobMedia(embed.thumbnail, did, alt) : void 0);
|
|
3532
|
+
if (single) return [single];
|
|
3533
|
+
const coverCid = asRecord(record.galleryMeta)?.coverPhotoCid;
|
|
3534
|
+
if (typeof coverCid === "string" && coverCid.length > 0) {
|
|
3535
|
+
return [{ did, cid: coverCid, alt }];
|
|
3536
|
+
}
|
|
3537
|
+
return [];
|
|
3538
|
+
}
|
|
3539
|
+
function genericExternalLink(record) {
|
|
3540
|
+
const embed = asRecord(record.embed);
|
|
3541
|
+
if (embed) {
|
|
3542
|
+
const fromEmbed = bskyExternal(embed);
|
|
3543
|
+
if (fromEmbed) return fromEmbed;
|
|
3544
|
+
}
|
|
3545
|
+
const url = httpUrl(record.source) ?? httpUrl(record.subject) ?? httpUrl(record.url);
|
|
3546
|
+
return url ? { url } : void 0;
|
|
3547
|
+
}
|
|
3548
|
+
function genericSubject(record) {
|
|
3549
|
+
const subject = record.subject;
|
|
3550
|
+
if (typeof subject === "string") {
|
|
3551
|
+
if (subject.startsWith("at://")) return { kind: "record", uri: subject };
|
|
3552
|
+
if (subject.startsWith("did:")) return { kind: "person", did: subject };
|
|
3553
|
+
return void 0;
|
|
3554
|
+
}
|
|
3555
|
+
const uri = nonBlankString(asRecord(subject)?.uri);
|
|
3556
|
+
if (uri && uri.startsWith("at://")) return { kind: "record", uri };
|
|
3557
|
+
return void 0;
|
|
3558
|
+
}
|
|
3559
|
+
function parseFacetFeature(features) {
|
|
3560
|
+
for (const raw of features) {
|
|
3561
|
+
const feat = asRecord(raw);
|
|
3562
|
+
if (!feat) continue;
|
|
3563
|
+
const type = asNonEmptyString(feat["$type"]) ?? "";
|
|
3564
|
+
const uri = asNonEmptyString(feat.uri);
|
|
3565
|
+
const did = asNonEmptyString(feat.did);
|
|
3566
|
+
const tag = asNonEmptyString(feat.tag);
|
|
3567
|
+
if (type.endsWith("#link") && uri) return { link: uri };
|
|
3568
|
+
if (type.endsWith("#mention") && did) return { mention: did };
|
|
3569
|
+
if (type.endsWith("#tag") && tag) return { tag };
|
|
3570
|
+
if (uri) return { link: uri };
|
|
3571
|
+
if (did) return { mention: did };
|
|
3572
|
+
if (tag) return { tag };
|
|
3573
|
+
}
|
|
3574
|
+
return void 0;
|
|
3575
|
+
}
|
|
3576
|
+
function genericRichSegments(text, record) {
|
|
3577
|
+
const facets = record.facets;
|
|
3578
|
+
if (!Array.isArray(facets)) return void 0;
|
|
3579
|
+
const parsed3 = [];
|
|
3580
|
+
for (const raw of facets) {
|
|
3581
|
+
const facet = asRecord(raw);
|
|
3582
|
+
const index = asRecord(facet?.index);
|
|
3583
|
+
const start = asFiniteNumber(index?.byteStart);
|
|
3584
|
+
const end = asFiniteNumber(index?.byteEnd);
|
|
3585
|
+
if (start === void 0 || end === void 0 || start < 0 || end <= start) continue;
|
|
3586
|
+
const features = facet?.features;
|
|
3587
|
+
if (!Array.isArray(features)) continue;
|
|
3588
|
+
const feature = parseFacetFeature(features);
|
|
3589
|
+
if (!feature) continue;
|
|
3590
|
+
parsed3.push({ start, end, ...feature });
|
|
3591
|
+
}
|
|
3592
|
+
if (parsed3.length === 0) return void 0;
|
|
3593
|
+
const bytes = new TextEncoder().encode(text);
|
|
3594
|
+
const decoder = new TextDecoder();
|
|
3595
|
+
parsed3.sort((a, b) => a.start - b.start);
|
|
3596
|
+
const segments = [];
|
|
3597
|
+
let cursor = 0;
|
|
3598
|
+
for (const span of parsed3) {
|
|
3599
|
+
if (span.start < cursor || span.start > bytes.length) continue;
|
|
3600
|
+
const end = Math.min(span.end, bytes.length);
|
|
3601
|
+
if (span.start > cursor) {
|
|
3602
|
+
const plain = decoder.decode(bytes.slice(cursor, span.start));
|
|
3603
|
+
if (plain) segments.push({ text: plain });
|
|
3604
|
+
}
|
|
3605
|
+
const seg = { text: decoder.decode(bytes.slice(span.start, end)) };
|
|
3606
|
+
if (span.link) seg.link = span.link;
|
|
3607
|
+
if (span.mention) seg.mention = span.mention;
|
|
3608
|
+
if (span.tag) seg.tag = span.tag;
|
|
3609
|
+
segments.push(seg);
|
|
3610
|
+
cursor = end;
|
|
3611
|
+
}
|
|
3612
|
+
if (cursor < bytes.length) {
|
|
3613
|
+
const rest = decoder.decode(bytes.slice(cursor));
|
|
3614
|
+
if (rest) segments.push({ text: rest });
|
|
3615
|
+
}
|
|
3616
|
+
return segments.some((s) => s.link ?? s.mention ?? s.tag) ? segments : void 0;
|
|
3617
|
+
}
|
|
3618
|
+
function applyGeneric(vm, item, record) {
|
|
3619
|
+
if (!record) return withGeneric(vm);
|
|
3620
|
+
const text = genericText(item.collection, record);
|
|
3621
|
+
const tags = genericTags(record);
|
|
3622
|
+
const did = didFromUri(item.uri);
|
|
3623
|
+
if (did) {
|
|
3624
|
+
const media = genericMedia(record, did, text ?? "");
|
|
3625
|
+
if (media.length > 0) vm.media = media;
|
|
3626
|
+
}
|
|
3627
|
+
const externalLink = genericExternalLink(record);
|
|
3628
|
+
if (externalLink) vm.externalLink = externalLink;
|
|
3629
|
+
if (!vm.subject) {
|
|
3630
|
+
const subject = genericSubject(record);
|
|
3631
|
+
if (subject) vm.subject = subject;
|
|
3632
|
+
}
|
|
3633
|
+
let body;
|
|
3634
|
+
if (text) {
|
|
3635
|
+
body = { kind: "text", text };
|
|
3636
|
+
const richSegments = genericRichSegments(text, record);
|
|
3637
|
+
if (richSegments) body.richSegments = richSegments;
|
|
3638
|
+
if (tags) body.tags = tags;
|
|
3639
|
+
} else if (vm.media) {
|
|
3640
|
+
body = { kind: "media" };
|
|
3641
|
+
if (tags) body.tags = tags;
|
|
3642
|
+
} else if (vm.externalLink) {
|
|
3643
|
+
body = { kind: "link" };
|
|
3644
|
+
if (tags) body.tags = tags;
|
|
3645
|
+
} else {
|
|
3646
|
+
body = { kind: "generic" };
|
|
3647
|
+
if (tags) body.tags = tags;
|
|
3648
|
+
}
|
|
3649
|
+
vm.body = body;
|
|
3650
|
+
return vm;
|
|
3651
|
+
}
|
|
3317
3652
|
function toStreamCardVM(item, options = {}) {
|
|
3318
3653
|
const verb = verbForCollection(item.collection);
|
|
3319
3654
|
const source = buildSource(item, options);
|
|
@@ -3362,7 +3697,7 @@ function toStreamCardVM(item, options = {}) {
|
|
|
3362
3697
|
if (record && item.collection.startsWith("social.popfeed.feed.")) {
|
|
3363
3698
|
return applyMediaReview(vm, item, record);
|
|
3364
3699
|
}
|
|
3365
|
-
return
|
|
3700
|
+
return applyGeneric(vm, item, record);
|
|
3366
3701
|
}
|
|
3367
3702
|
function toStreamCardVMs(items, options = {}) {
|
|
3368
3703
|
const out = [];
|
|
@@ -3778,6 +4113,12 @@ function groupInvolvementByHeading(items) {
|
|
|
3778
4113
|
}
|
|
3779
4114
|
return groups;
|
|
3780
4115
|
}
|
|
4116
|
+
var BlobRefSchema = z.object({
|
|
4117
|
+
$type: z.literal("blob"),
|
|
4118
|
+
ref: z.object({ $link: z.string().min(1) }),
|
|
4119
|
+
mimeType: z.string().min(1).max(255),
|
|
4120
|
+
size: z.number().int().nonnegative()
|
|
4121
|
+
});
|
|
3781
4122
|
var EndorsementConfirmationRecordSchema = z.object({
|
|
3782
4123
|
endorsement: strongRefSchema,
|
|
3783
4124
|
createdAt: datetimeSchema
|
|
@@ -4093,8 +4434,18 @@ var ProfilePresentationRecordSchema = z.object({
|
|
|
4093
4434
|
// Optional reference to a long-form write-up (pub.leaflet.document or
|
|
4094
4435
|
// site.standard.document). Plain at-uri + optional cid so it tracks edits.
|
|
4095
4436
|
writeupRef: externalRecordRefSchema.optional(),
|
|
4437
|
+
// Optional uploaded cover image for the talk page.
|
|
4438
|
+
coverImage: BlobRefSchema.optional(),
|
|
4096
4439
|
createdAt: datetimeSchema
|
|
4097
4440
|
});
|
|
4441
|
+
var communityAddressSchema = z.object({
|
|
4442
|
+
country: z.string().optional(),
|
|
4443
|
+
postalCode: z.string().optional(),
|
|
4444
|
+
region: z.string().optional(),
|
|
4445
|
+
locality: z.string().optional(),
|
|
4446
|
+
street: z.string().optional(),
|
|
4447
|
+
name: z.string().optional()
|
|
4448
|
+
});
|
|
4098
4449
|
var ProfilePresentationDeliveryRecordSchema = z.object({
|
|
4099
4450
|
// Optional reference to the id.sifa.profile.presentation delivered here.
|
|
4100
4451
|
presentationRef: externalRecordRefSchema.optional(),
|
|
@@ -4105,6 +4456,9 @@ var ProfilePresentationDeliveryRecordSchema = z.object({
|
|
|
4105
4456
|
// Calendar date as YYYY-MM-DD (day only).
|
|
4106
4457
|
date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "date must be YYYY-MM-DD").optional(),
|
|
4107
4458
|
location: z.string().refine(maxGraphemes(256)).max(2560).optional(),
|
|
4459
|
+
// Structured community.lexicon.location.address for the occasion. The
|
|
4460
|
+
// free-text `location` string above stays as a legacy fallback.
|
|
4461
|
+
address: communityAddressSchema.optional(),
|
|
4108
4462
|
mode: z.string().optional(),
|
|
4109
4463
|
status: z.string().optional(),
|
|
4110
4464
|
links: z.array(PresentationLinkSchema).max(20).optional(),
|
|
@@ -4172,8 +4526,8 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
4172
4526
|
});
|
|
4173
4527
|
|
|
4174
4528
|
// src/index.ts
|
|
4175
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
4529
|
+
var SIFA_SDK_VERSION = "0.12.12";
|
|
4176
4530
|
|
|
4177
|
-
export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVOLVEMENT_NSID, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, hasAdultContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems };
|
|
4531
|
+
export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, BlobRefSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVOLVEMENT_NSID, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, hasAdultContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems };
|
|
4178
4532
|
//# sourceMappingURL=index.js.map
|
|
4179
4533
|
//# sourceMappingURL=index.js.map
|