@singi-labs/sifa-sdk 0.12.9 → 0.12.11
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/index.cjs +685 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +140 -5
- package/dist/index.d.ts +140 -5
- package/dist/index.js +683 -42
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2706,17 +2706,136 @@ var streamExternalLinkSchema = z.object({
|
|
|
2706
2706
|
title: z.string().optional(),
|
|
2707
2707
|
thumb: z.string().optional()
|
|
2708
2708
|
});
|
|
2709
|
+
var streamGeoSchema = z.object({
|
|
2710
|
+
latitude: z.number(),
|
|
2711
|
+
longitude: z.number()
|
|
2712
|
+
});
|
|
2713
|
+
var streamAddressSchema = z.object({
|
|
2714
|
+
name: z.string().optional(),
|
|
2715
|
+
street: z.string().optional(),
|
|
2716
|
+
locality: z.string().optional(),
|
|
2717
|
+
region: z.string().optional(),
|
|
2718
|
+
country: z.string().optional(),
|
|
2719
|
+
postalCode: z.string().optional()
|
|
2720
|
+
});
|
|
2721
|
+
var streamRichSegmentSchema = z.object({
|
|
2722
|
+
text: z.string(),
|
|
2723
|
+
link: z.string().optional(),
|
|
2724
|
+
mention: z.string().optional(),
|
|
2725
|
+
tag: z.string().optional()
|
|
2726
|
+
});
|
|
2709
2727
|
var streamCardBodySchema = z.discriminatedUnion("kind", [
|
|
2710
|
-
z.object({
|
|
2711
|
-
|
|
2712
|
-
|
|
2728
|
+
z.object({
|
|
2729
|
+
kind: z.literal("text"),
|
|
2730
|
+
text: z.string(),
|
|
2731
|
+
richSegments: z.array(streamRichSegmentSchema).optional(),
|
|
2732
|
+
tags: z.array(z.string()).optional()
|
|
2733
|
+
}),
|
|
2734
|
+
z.object({
|
|
2735
|
+
kind: z.literal("media"),
|
|
2736
|
+
text: z.string().optional(),
|
|
2737
|
+
tags: z.array(z.string()).optional()
|
|
2738
|
+
}),
|
|
2739
|
+
z.object({
|
|
2740
|
+
kind: z.literal("link"),
|
|
2741
|
+
text: z.string().optional(),
|
|
2742
|
+
tags: z.array(z.string()).optional()
|
|
2743
|
+
}),
|
|
2713
2744
|
z.object({
|
|
2714
2745
|
kind: z.literal("track"),
|
|
2715
2746
|
text: z.string().optional(),
|
|
2716
2747
|
trackTitle: z.string().optional(),
|
|
2717
2748
|
artist: z.string().optional()
|
|
2718
2749
|
}),
|
|
2719
|
-
z.object({
|
|
2750
|
+
z.object({
|
|
2751
|
+
kind: z.literal("generic"),
|
|
2752
|
+
text: z.string().optional(),
|
|
2753
|
+
tags: z.array(z.string()).optional()
|
|
2754
|
+
}),
|
|
2755
|
+
z.object({
|
|
2756
|
+
kind: z.literal("github-pr"),
|
|
2757
|
+
repoOwner: z.string(),
|
|
2758
|
+
repoName: z.string(),
|
|
2759
|
+
prNumber: z.number(),
|
|
2760
|
+
title: z.string(),
|
|
2761
|
+
url: z.string().optional(),
|
|
2762
|
+
language: z.string().optional(),
|
|
2763
|
+
additions: z.number(),
|
|
2764
|
+
deletions: z.number(),
|
|
2765
|
+
mergedAt: z.string().optional()
|
|
2766
|
+
}),
|
|
2767
|
+
z.object({
|
|
2768
|
+
kind: z.literal("book"),
|
|
2769
|
+
title: z.string(),
|
|
2770
|
+
authors: z.array(z.string()),
|
|
2771
|
+
stars: z.number().optional(),
|
|
2772
|
+
status: z.string().optional(),
|
|
2773
|
+
review: z.string().optional()
|
|
2774
|
+
}),
|
|
2775
|
+
z.object({
|
|
2776
|
+
kind: z.literal("media-review"),
|
|
2777
|
+
reviewKind: z.enum(["review", "post", "note", "other"]),
|
|
2778
|
+
title: z.string().optional(),
|
|
2779
|
+
mediaType: z.string().optional(),
|
|
2780
|
+
rating: z.number().optional(),
|
|
2781
|
+
mainCredit: z.string().optional(),
|
|
2782
|
+
reviewText: z.string().optional(),
|
|
2783
|
+
isRevisit: z.boolean()
|
|
2784
|
+
}),
|
|
2785
|
+
z.object({
|
|
2786
|
+
kind: z.literal("event-rsvp"),
|
|
2787
|
+
rsvpStatus: z.enum(["going", "interested", "notgoing", "unknown"]),
|
|
2788
|
+
eventName: z.string().optional(),
|
|
2789
|
+
startsAt: z.string().optional(),
|
|
2790
|
+
endsAt: z.string().optional(),
|
|
2791
|
+
mode: z.enum(["inperson", "virtual", "hybrid"]).optional(),
|
|
2792
|
+
locationName: z.string().optional(),
|
|
2793
|
+
locationLocality: z.string().optional(),
|
|
2794
|
+
locationCountry: z.string().optional()
|
|
2795
|
+
}),
|
|
2796
|
+
z.object({
|
|
2797
|
+
kind: z.literal("verification"),
|
|
2798
|
+
platform: z.string(),
|
|
2799
|
+
verified: z.boolean(),
|
|
2800
|
+
subjectLabel: z.string().optional(),
|
|
2801
|
+
handle: z.string().optional(),
|
|
2802
|
+
profileUrl: z.string().optional()
|
|
2803
|
+
}),
|
|
2804
|
+
z.object({
|
|
2805
|
+
kind: z.literal("membership"),
|
|
2806
|
+
communityName: z.string().optional(),
|
|
2807
|
+
description: z.string().optional(),
|
|
2808
|
+
communityUri: z.string().optional()
|
|
2809
|
+
}),
|
|
2810
|
+
z.object({
|
|
2811
|
+
kind: z.literal("location"),
|
|
2812
|
+
venueName: z.string().optional(),
|
|
2813
|
+
shout: z.string().optional(),
|
|
2814
|
+
address: streamAddressSchema.optional(),
|
|
2815
|
+
geo: streamGeoSchema.optional()
|
|
2816
|
+
}),
|
|
2817
|
+
z.object({
|
|
2818
|
+
kind: z.literal("travel"),
|
|
2819
|
+
origin: z.string().optional(),
|
|
2820
|
+
destination: z.string().optional(),
|
|
2821
|
+
transportation: z.string().optional(),
|
|
2822
|
+
carrier: z.string().optional(),
|
|
2823
|
+
carrierCode: z.string().optional(),
|
|
2824
|
+
startDate: z.string().optional(),
|
|
2825
|
+
endDate: z.string().optional()
|
|
2826
|
+
}),
|
|
2827
|
+
z.object({
|
|
2828
|
+
kind: z.literal("standard-site"),
|
|
2829
|
+
title: z.string().optional(),
|
|
2830
|
+
description: z.string().optional(),
|
|
2831
|
+
siteUrl: z.string().optional(),
|
|
2832
|
+
path: z.string().optional(),
|
|
2833
|
+
publisherName: z.string().optional(),
|
|
2834
|
+
icon: z.string().optional(),
|
|
2835
|
+
coverImageUrl: z.string().optional(),
|
|
2836
|
+
readingTime: z.number().optional(),
|
|
2837
|
+
publishedAt: z.string().optional()
|
|
2838
|
+
})
|
|
2720
2839
|
]);
|
|
2721
2840
|
var streamCardSubjectSchema = z.discriminatedUnion("kind", [
|
|
2722
2841
|
z.object({
|
|
@@ -2752,6 +2871,62 @@ var streamCardVMSchema = z.lazy(
|
|
|
2752
2871
|
subject: z.lazy(() => streamCardSubjectSchema).optional()
|
|
2753
2872
|
})
|
|
2754
2873
|
);
|
|
2874
|
+
function maxGraphemes(max) {
|
|
2875
|
+
return (value) => {
|
|
2876
|
+
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
2877
|
+
let count = 0;
|
|
2878
|
+
for (const _ of segmenter.segment(value)) {
|
|
2879
|
+
count++;
|
|
2880
|
+
if (count > max) return false;
|
|
2881
|
+
}
|
|
2882
|
+
return true;
|
|
2883
|
+
};
|
|
2884
|
+
}
|
|
2885
|
+
var didSchema = z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
|
|
2886
|
+
var datetimeSchema = z.string().datetime({ offset: true });
|
|
2887
|
+
var partialDateSchema = z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
|
|
2888
|
+
var atUriSchema = z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
|
|
2889
|
+
var cidSchema = z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
|
|
2890
|
+
var languageTagSchema = z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
|
|
2891
|
+
var uriSchema = z.string().url();
|
|
2892
|
+
var strongRefSchema = z.object({
|
|
2893
|
+
uri: atUriSchema,
|
|
2894
|
+
cid: cidSchema
|
|
2895
|
+
});
|
|
2896
|
+
var externalRecordRefSchema = z.object({
|
|
2897
|
+
uri: atUriSchema,
|
|
2898
|
+
cid: cidSchema.optional()
|
|
2899
|
+
});
|
|
2900
|
+
var selfLabelsSchema = z.object({
|
|
2901
|
+
$type: z.literal("com.atproto.label.defs#selfLabels").optional(),
|
|
2902
|
+
values: z.array(z.object({ val: z.string() }))
|
|
2903
|
+
});
|
|
2904
|
+
|
|
2905
|
+
// src/publishing/registry.ts
|
|
2906
|
+
var STANDARD_SITE_PUBLISHERS = Object.freeze([
|
|
2907
|
+
{ host: "leaflet.pub", name: "Leaflet", iconKey: "leaflet" },
|
|
2908
|
+
{ host: "pckt.blog", name: "pckt", iconKey: "pckt" },
|
|
2909
|
+
{ host: "offprint.app", name: "Offprint", iconKey: "offprint" }
|
|
2910
|
+
]);
|
|
2911
|
+
function hostMatches(host, target) {
|
|
2912
|
+
return host === target || host.endsWith("." + target);
|
|
2913
|
+
}
|
|
2914
|
+
function hostFromUri(uri) {
|
|
2915
|
+
if (!uri) return null;
|
|
2916
|
+
try {
|
|
2917
|
+
return new URL(uri).host.toLowerCase();
|
|
2918
|
+
} catch {
|
|
2919
|
+
return null;
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
function matchPublisherByHost(host) {
|
|
2923
|
+
if (!host) return null;
|
|
2924
|
+
const lower = host.toLowerCase();
|
|
2925
|
+
return STANDARD_SITE_PUBLISHERS.find((p) => hostMatches(lower, p.host)) ?? null;
|
|
2926
|
+
}
|
|
2927
|
+
function matchPublisherByUri(uri) {
|
|
2928
|
+
return matchPublisherByHost(hostFromUri(uri));
|
|
2929
|
+
}
|
|
2755
2930
|
|
|
2756
2931
|
// src/stream/to-stream-card-vm.ts
|
|
2757
2932
|
var DEFAULT_SOURCE_COLOR = "slate";
|
|
@@ -2780,6 +2955,69 @@ function aspectRatio(value) {
|
|
|
2780
2955
|
if (typeof width === "number" && typeof height === "number") return { width, height };
|
|
2781
2956
|
return void 0;
|
|
2782
2957
|
}
|
|
2958
|
+
function asFiniteNumber(value) {
|
|
2959
|
+
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
2960
|
+
}
|
|
2961
|
+
function looseBlobCid(value) {
|
|
2962
|
+
const viaRef = blobCid(value);
|
|
2963
|
+
if (viaRef) return viaRef;
|
|
2964
|
+
const cid = asRecord(value)?.cid;
|
|
2965
|
+
return typeof cid === "string" && cid.length > 0 ? cid : void 0;
|
|
2966
|
+
}
|
|
2967
|
+
function blobMedia(value, did, alt) {
|
|
2968
|
+
const cid = looseBlobCid(value);
|
|
2969
|
+
if (!cid) return void 0;
|
|
2970
|
+
const media = { did, cid, alt };
|
|
2971
|
+
const ratio = aspectRatio(asRecord(value)?.aspectRatio);
|
|
2972
|
+
if (ratio) media.aspectRatio = ratio;
|
|
2973
|
+
const mimeType = asNonEmptyString(asRecord(value)?.mimeType);
|
|
2974
|
+
if (mimeType) media.mimeType = mimeType;
|
|
2975
|
+
return media;
|
|
2976
|
+
}
|
|
2977
|
+
function hashSuffix(value) {
|
|
2978
|
+
const i = value.lastIndexOf("#");
|
|
2979
|
+
return i >= 0 ? value.slice(i) : "";
|
|
2980
|
+
}
|
|
2981
|
+
var WORDS_PER_MINUTE = 200;
|
|
2982
|
+
function estimateReadingTime(text) {
|
|
2983
|
+
if (!text) return void 0;
|
|
2984
|
+
const words = text.trim().split(/\s+/).filter(Boolean).length;
|
|
2985
|
+
if (words === 0) return void 0;
|
|
2986
|
+
return Math.max(1, Math.round(words / WORDS_PER_MINUTE));
|
|
2987
|
+
}
|
|
2988
|
+
function beaconGeo(value) {
|
|
2989
|
+
const rec = asRecord(value);
|
|
2990
|
+
if (!rec) return void 0;
|
|
2991
|
+
const { latitude, longitude } = rec;
|
|
2992
|
+
const okType = (v) => typeof v === "string" || typeof v === "number";
|
|
2993
|
+
if (!okType(latitude) || !okType(longitude)) return void 0;
|
|
2994
|
+
const lat = Number(latitude);
|
|
2995
|
+
const lng = Number(longitude);
|
|
2996
|
+
if (!Number.isFinite(lat) || !Number.isFinite(lng)) return void 0;
|
|
2997
|
+
return { latitude: lat, longitude: lng };
|
|
2998
|
+
}
|
|
2999
|
+
function beaconAddress(value) {
|
|
3000
|
+
const rec = asRecord(value);
|
|
3001
|
+
if (!rec) return void 0;
|
|
3002
|
+
const address = {};
|
|
3003
|
+
const name = asNonEmptyString(rec.name);
|
|
3004
|
+
if (name) address.name = name;
|
|
3005
|
+
const street = asNonEmptyString(rec.street);
|
|
3006
|
+
if (street) address.street = street;
|
|
3007
|
+
const locality = asNonEmptyString(rec.locality);
|
|
3008
|
+
if (locality) address.locality = locality;
|
|
3009
|
+
const region = asNonEmptyString(rec.region);
|
|
3010
|
+
if (region) address.region = region;
|
|
3011
|
+
const country = asNonEmptyString(rec.country);
|
|
3012
|
+
if (country) address.country = country;
|
|
3013
|
+
const postalCode = asNonEmptyString(rec.postalCode);
|
|
3014
|
+
if (postalCode) address.postalCode = postalCode;
|
|
3015
|
+
return Object.keys(address).length > 0 ? address : void 0;
|
|
3016
|
+
}
|
|
3017
|
+
function parseAuthors(value) {
|
|
3018
|
+
if (typeof value !== "string") return [];
|
|
3019
|
+
return value.split(" ").map((a) => a.trim()).filter((a) => a.length > 0);
|
|
3020
|
+
}
|
|
2783
3021
|
function buildSource(item, options) {
|
|
2784
3022
|
return {
|
|
2785
3023
|
appId: item.appId,
|
|
@@ -2871,6 +3109,416 @@ function applyBskyPost(vm, item, record) {
|
|
|
2871
3109
|
vm.body = body;
|
|
2872
3110
|
return vm;
|
|
2873
3111
|
}
|
|
3112
|
+
function withGeneric(vm) {
|
|
3113
|
+
vm.body = { kind: "generic" };
|
|
3114
|
+
return vm;
|
|
3115
|
+
}
|
|
3116
|
+
function applyGithubPr(vm, record) {
|
|
3117
|
+
const body = {
|
|
3118
|
+
kind: "github-pr",
|
|
3119
|
+
repoOwner: asNonEmptyString(record.repoOwner) ?? "",
|
|
3120
|
+
repoName: asNonEmptyString(record.repoName) ?? "",
|
|
3121
|
+
prNumber: asFiniteNumber(record.prNumber) ?? 0,
|
|
3122
|
+
title: asNonEmptyString(record.title) ?? "",
|
|
3123
|
+
additions: asFiniteNumber(record.additions) ?? 0,
|
|
3124
|
+
deletions: asFiniteNumber(record.deletions) ?? 0
|
|
3125
|
+
};
|
|
3126
|
+
const url = asNonEmptyString(record.url);
|
|
3127
|
+
if (url) body.url = url;
|
|
3128
|
+
const language = asNonEmptyString(record.language);
|
|
3129
|
+
if (language) body.language = language;
|
|
3130
|
+
const mergedAt = asNonEmptyString(record.mergedAt);
|
|
3131
|
+
if (mergedAt) body.mergedAt = mergedAt;
|
|
3132
|
+
vm.body = body;
|
|
3133
|
+
return vm;
|
|
3134
|
+
}
|
|
3135
|
+
function applyBook(vm, item, record) {
|
|
3136
|
+
const title = asNonEmptyString(record.title) ?? "Untitled book";
|
|
3137
|
+
const body = {
|
|
3138
|
+
kind: "book",
|
|
3139
|
+
title,
|
|
3140
|
+
authors: parseAuthors(record.authors)
|
|
3141
|
+
};
|
|
3142
|
+
const stars = asFiniteNumber(record.stars);
|
|
3143
|
+
if (stars !== void 0 && stars > 0) body.stars = stars;
|
|
3144
|
+
const status = asNonEmptyString(record.status);
|
|
3145
|
+
if (status) body.status = status;
|
|
3146
|
+
const review = asNonEmptyString(
|
|
3147
|
+
typeof record.review === "string" ? record.review.trim() : void 0
|
|
3148
|
+
);
|
|
3149
|
+
if (review) body.review = review;
|
|
3150
|
+
vm.body = body;
|
|
3151
|
+
const did = didFromUri(item.uri);
|
|
3152
|
+
if (did) {
|
|
3153
|
+
const cover = blobMedia(record.cover, did, `The cover of ${title}`);
|
|
3154
|
+
if (cover) vm.media = [cover];
|
|
3155
|
+
}
|
|
3156
|
+
return vm;
|
|
3157
|
+
}
|
|
3158
|
+
function popfeedReviewKind(collection) {
|
|
3159
|
+
if (collection.endsWith(".review")) return "review";
|
|
3160
|
+
if (collection.endsWith(".post")) return "post";
|
|
3161
|
+
if (collection.endsWith(".note")) return "note";
|
|
3162
|
+
return "other";
|
|
3163
|
+
}
|
|
3164
|
+
function applyMediaReview(vm, item, record) {
|
|
3165
|
+
const title = asNonEmptyString(record.title) ?? asNonEmptyString(record.name);
|
|
3166
|
+
const body = {
|
|
3167
|
+
kind: "media-review",
|
|
3168
|
+
reviewKind: popfeedReviewKind(item.collection),
|
|
3169
|
+
isRevisit: record.isRevisit === true
|
|
3170
|
+
};
|
|
3171
|
+
if (title) body.title = title;
|
|
3172
|
+
const mediaType = asNonEmptyString(record.creativeWorkType);
|
|
3173
|
+
if (mediaType) body.mediaType = mediaType;
|
|
3174
|
+
const rating = asFiniteNumber(record.rating);
|
|
3175
|
+
if (rating !== void 0) body.rating = rating;
|
|
3176
|
+
const mainCredit = asNonEmptyString(record.mainCredit);
|
|
3177
|
+
if (mainCredit) body.mainCredit = mainCredit;
|
|
3178
|
+
const reviewText = asNonEmptyString(record.text);
|
|
3179
|
+
if (reviewText) body.reviewText = reviewText;
|
|
3180
|
+
vm.body = body;
|
|
3181
|
+
const posterUrl = asNonEmptyString(record.posterUrl);
|
|
3182
|
+
if (posterUrl) vm.media = [{ url: posterUrl, alt: title ? `${title} poster` : "" }];
|
|
3183
|
+
return vm;
|
|
3184
|
+
}
|
|
3185
|
+
var RSVP_STATUS = {
|
|
3186
|
+
"#going": "going",
|
|
3187
|
+
"#interested": "interested",
|
|
3188
|
+
"#notgoing": "notgoing"
|
|
3189
|
+
};
|
|
3190
|
+
var RSVP_MODE = {
|
|
3191
|
+
"#inperson": "inperson",
|
|
3192
|
+
"#virtual": "virtual",
|
|
3193
|
+
"#hybrid": "hybrid"
|
|
3194
|
+
};
|
|
3195
|
+
function applyEventRsvp(vm, record) {
|
|
3196
|
+
const status = asNonEmptyString(record.status);
|
|
3197
|
+
const body = {
|
|
3198
|
+
kind: "event-rsvp",
|
|
3199
|
+
rsvpStatus: (status ? RSVP_STATUS[hashSuffix(status)] : void 0) ?? "unknown"
|
|
3200
|
+
};
|
|
3201
|
+
const meta = asRecord(record.eventMeta);
|
|
3202
|
+
if (meta) {
|
|
3203
|
+
const eventName = asNonEmptyString(meta.name);
|
|
3204
|
+
if (eventName) body.eventName = eventName;
|
|
3205
|
+
const startsAt = asNonEmptyString(meta.startsAt);
|
|
3206
|
+
if (startsAt) body.startsAt = startsAt;
|
|
3207
|
+
const endsAt = asNonEmptyString(meta.endsAt);
|
|
3208
|
+
if (endsAt) body.endsAt = endsAt;
|
|
3209
|
+
const mode = asNonEmptyString(meta.mode);
|
|
3210
|
+
const modeEnum = mode ? RSVP_MODE[hashSuffix(mode)] : void 0;
|
|
3211
|
+
if (modeEnum) body.mode = modeEnum;
|
|
3212
|
+
const locationName = asNonEmptyString(meta.locationName);
|
|
3213
|
+
if (locationName) body.locationName = locationName;
|
|
3214
|
+
const locationLocality = asNonEmptyString(meta.locationLocality);
|
|
3215
|
+
if (locationLocality) body.locationLocality = locationLocality;
|
|
3216
|
+
const locationCountry = asNonEmptyString(meta.locationCountry);
|
|
3217
|
+
if (locationCountry) body.locationCountry = locationCountry;
|
|
3218
|
+
}
|
|
3219
|
+
vm.body = body;
|
|
3220
|
+
return vm;
|
|
3221
|
+
}
|
|
3222
|
+
function applyKeytraceVerification(vm, record) {
|
|
3223
|
+
const identity = asRecord(record.identity) ?? {};
|
|
3224
|
+
const subject = asNonEmptyString(identity.subject);
|
|
3225
|
+
const displayName = asNonEmptyString(identity.displayName);
|
|
3226
|
+
const body = {
|
|
3227
|
+
kind: "verification",
|
|
3228
|
+
platform: asNonEmptyString(record.type) ?? "unknown",
|
|
3229
|
+
verified: record.status === "verified"
|
|
3230
|
+
};
|
|
3231
|
+
const subjectLabel = displayName ?? subject;
|
|
3232
|
+
if (subjectLabel) body.subjectLabel = subjectLabel;
|
|
3233
|
+
const profileUrl = asNonEmptyString(identity.profileUrl);
|
|
3234
|
+
if (profileUrl) body.profileUrl = profileUrl;
|
|
3235
|
+
vm.body = body;
|
|
3236
|
+
return vm;
|
|
3237
|
+
}
|
|
3238
|
+
function applyBskyVerification(vm, record) {
|
|
3239
|
+
const handle = asNonEmptyString(record.handle);
|
|
3240
|
+
const displayName = asNonEmptyString(record.displayName);
|
|
3241
|
+
const body = {
|
|
3242
|
+
kind: "verification",
|
|
3243
|
+
platform: "bluesky",
|
|
3244
|
+
verified: true
|
|
3245
|
+
};
|
|
3246
|
+
const subjectLabel = displayName ?? handle;
|
|
3247
|
+
if (subjectLabel) body.subjectLabel = subjectLabel;
|
|
3248
|
+
if (handle) body.handle = handle;
|
|
3249
|
+
vm.body = body;
|
|
3250
|
+
return vm;
|
|
3251
|
+
}
|
|
3252
|
+
function applyMembership(vm, record) {
|
|
3253
|
+
const body = { kind: "membership" };
|
|
3254
|
+
const communityUri = asNonEmptyString(record.community);
|
|
3255
|
+
if (communityUri) body.communityUri = communityUri;
|
|
3256
|
+
const meta = asRecord(record.communityMeta);
|
|
3257
|
+
const communityName = meta ? asNonEmptyString(meta.name) : void 0;
|
|
3258
|
+
if (communityName) body.communityName = communityName;
|
|
3259
|
+
const description = meta ? asNonEmptyString(meta.description) : void 0;
|
|
3260
|
+
if (description) body.description = description;
|
|
3261
|
+
vm.body = body;
|
|
3262
|
+
if (meta) {
|
|
3263
|
+
const ownerDid = asNonEmptyString(meta.ownerDid) ?? (communityUri ? didFromUri(communityUri) : void 0);
|
|
3264
|
+
if (ownerDid) {
|
|
3265
|
+
const picture = blobMedia(meta.picture, ownerDid, communityName ?? "");
|
|
3266
|
+
if (picture) vm.media = [picture];
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
return vm;
|
|
3270
|
+
}
|
|
3271
|
+
function applyLocation(vm, record) {
|
|
3272
|
+
const body = { kind: "location" };
|
|
3273
|
+
const venueName = asNonEmptyString(record.venueName);
|
|
3274
|
+
if (venueName) body.venueName = venueName;
|
|
3275
|
+
const shout = asNonEmptyString(record.shout);
|
|
3276
|
+
if (shout) body.shout = shout;
|
|
3277
|
+
const address = beaconAddress(record.addressDetails);
|
|
3278
|
+
if (address) body.address = address;
|
|
3279
|
+
const geo = beaconGeo(record.location);
|
|
3280
|
+
if (geo) body.geo = geo;
|
|
3281
|
+
vm.body = body;
|
|
3282
|
+
return vm;
|
|
3283
|
+
}
|
|
3284
|
+
function applyTravel(vm, record) {
|
|
3285
|
+
const body = { kind: "travel" };
|
|
3286
|
+
const origin = asNonEmptyString(record.originTransportCode);
|
|
3287
|
+
if (origin) body.origin = origin;
|
|
3288
|
+
const destination = asNonEmptyString(record.destinationTransportCode);
|
|
3289
|
+
if (destination) body.destination = destination;
|
|
3290
|
+
const transportation = asNonEmptyString(record.transportation);
|
|
3291
|
+
if (transportation) body.transportation = transportation;
|
|
3292
|
+
const carrier = asNonEmptyString(record.carrier);
|
|
3293
|
+
if (carrier) body.carrier = carrier;
|
|
3294
|
+
const carrierCode = asNonEmptyString(record.carrierCode);
|
|
3295
|
+
if (carrierCode) body.carrierCode = carrierCode;
|
|
3296
|
+
const startDate = asNonEmptyString(record.startDate);
|
|
3297
|
+
if (startDate) body.startDate = startDate;
|
|
3298
|
+
const endDate = asNonEmptyString(record.endDate);
|
|
3299
|
+
if (endDate) body.endDate = endDate;
|
|
3300
|
+
vm.body = body;
|
|
3301
|
+
return vm;
|
|
3302
|
+
}
|
|
3303
|
+
function applyStandardSite(vm, record) {
|
|
3304
|
+
const body = { kind: "standard-site" };
|
|
3305
|
+
const title = asNonEmptyString(record.title);
|
|
3306
|
+
if (title) body.title = title;
|
|
3307
|
+
const description = asNonEmptyString(record.description);
|
|
3308
|
+
if (description) body.description = description;
|
|
3309
|
+
const siteUrl = asNonEmptyString(record.siteUrl);
|
|
3310
|
+
if (siteUrl) {
|
|
3311
|
+
body.siteUrl = siteUrl;
|
|
3312
|
+
const publisherName = matchPublisherByUri(siteUrl)?.name;
|
|
3313
|
+
if (publisherName) body.publisherName = publisherName;
|
|
3314
|
+
}
|
|
3315
|
+
const path = asNonEmptyString(record.path);
|
|
3316
|
+
if (path) body.path = path;
|
|
3317
|
+
const icon = asNonEmptyString(record.publicationIcon);
|
|
3318
|
+
if (icon) body.icon = icon;
|
|
3319
|
+
const coverImageUrl = asNonEmptyString(record.coverImageUrl);
|
|
3320
|
+
if (coverImageUrl) body.coverImageUrl = coverImageUrl;
|
|
3321
|
+
const readingTime = estimateReadingTime(asNonEmptyString(record.textContent));
|
|
3322
|
+
if (readingTime !== void 0) body.readingTime = readingTime;
|
|
3323
|
+
const publishedAt = asNonEmptyString(record.publishedAt);
|
|
3324
|
+
if (publishedAt) body.publishedAt = publishedAt;
|
|
3325
|
+
vm.body = body;
|
|
3326
|
+
return vm;
|
|
3327
|
+
}
|
|
3328
|
+
function applyYouAndMe(vm, record) {
|
|
3329
|
+
const did = asNonEmptyString(record.subject);
|
|
3330
|
+
if (did) vm.subject = { kind: "person", did };
|
|
3331
|
+
vm.body = { kind: "generic" };
|
|
3332
|
+
return vm;
|
|
3333
|
+
}
|
|
3334
|
+
function applyAsqAnswer(vm, record) {
|
|
3335
|
+
const uri = asNonEmptyString(asRecord(record.subject)?.uri);
|
|
3336
|
+
if (uri) vm.subject = { kind: "record", uri };
|
|
3337
|
+
vm.body = { kind: "generic" };
|
|
3338
|
+
return vm;
|
|
3339
|
+
}
|
|
3340
|
+
function nonBlankString(value) {
|
|
3341
|
+
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
3342
|
+
}
|
|
3343
|
+
function readBodyField(value) {
|
|
3344
|
+
const direct = nonBlankString(value);
|
|
3345
|
+
if (direct) return direct;
|
|
3346
|
+
return nonBlankString(asRecord(value)?.value);
|
|
3347
|
+
}
|
|
3348
|
+
function httpUrl(value) {
|
|
3349
|
+
return typeof value === "string" && /^https?:\/\//i.test(value) ? value : void 0;
|
|
3350
|
+
}
|
|
3351
|
+
var GENERIC_TEXT_ORDER = [
|
|
3352
|
+
"text",
|
|
3353
|
+
"title",
|
|
3354
|
+
"name",
|
|
3355
|
+
"description",
|
|
3356
|
+
"content",
|
|
3357
|
+
"body",
|
|
3358
|
+
"message",
|
|
3359
|
+
"note",
|
|
3360
|
+
"caption",
|
|
3361
|
+
"summary",
|
|
3362
|
+
"status"
|
|
3363
|
+
];
|
|
3364
|
+
function genericText(collection, record) {
|
|
3365
|
+
if (collection === "social.passports.fiftyStates.visit") {
|
|
3366
|
+
return nonBlankString(record.city);
|
|
3367
|
+
}
|
|
3368
|
+
for (const field of GENERIC_TEXT_ORDER) {
|
|
3369
|
+
if (field === "body") {
|
|
3370
|
+
const body = readBodyField(record.body);
|
|
3371
|
+
if (body) return body;
|
|
3372
|
+
continue;
|
|
3373
|
+
}
|
|
3374
|
+
const value = nonBlankString(record[field]);
|
|
3375
|
+
if (value) return value;
|
|
3376
|
+
}
|
|
3377
|
+
return void 0;
|
|
3378
|
+
}
|
|
3379
|
+
function genericTags(record) {
|
|
3380
|
+
const tags = record.tags;
|
|
3381
|
+
if (!Array.isArray(tags)) return void 0;
|
|
3382
|
+
const out = tags.filter((t) => typeof t === "string" && t.length > 0);
|
|
3383
|
+
return out.length > 0 ? out : void 0;
|
|
3384
|
+
}
|
|
3385
|
+
function genericMedia(record, did, alt) {
|
|
3386
|
+
const fromArray = (raw) => {
|
|
3387
|
+
const img = asRecord(raw);
|
|
3388
|
+
if (!img) return void 0;
|
|
3389
|
+
return blobMedia(img.image ?? raw, did, asNonEmptyString(img.alt) ?? alt);
|
|
3390
|
+
};
|
|
3391
|
+
const images = record.images;
|
|
3392
|
+
if (Array.isArray(images)) {
|
|
3393
|
+
const out = images.map(fromArray).filter((m) => m !== void 0);
|
|
3394
|
+
if (out.length > 0) return out;
|
|
3395
|
+
}
|
|
3396
|
+
const embed = asRecord(record.embed);
|
|
3397
|
+
if (embed && Array.isArray(embed.images)) {
|
|
3398
|
+
const out = embed.images.map(fromArray).filter((m) => m !== void 0);
|
|
3399
|
+
if (out.length > 0) return out;
|
|
3400
|
+
}
|
|
3401
|
+
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);
|
|
3402
|
+
if (single) return [single];
|
|
3403
|
+
const coverCid = asRecord(record.galleryMeta)?.coverPhotoCid;
|
|
3404
|
+
if (typeof coverCid === "string" && coverCid.length > 0) {
|
|
3405
|
+
return [{ did, cid: coverCid, alt }];
|
|
3406
|
+
}
|
|
3407
|
+
return [];
|
|
3408
|
+
}
|
|
3409
|
+
function genericExternalLink(record) {
|
|
3410
|
+
const embed = asRecord(record.embed);
|
|
3411
|
+
if (embed) {
|
|
3412
|
+
const fromEmbed = bskyExternal(embed);
|
|
3413
|
+
if (fromEmbed) return fromEmbed;
|
|
3414
|
+
}
|
|
3415
|
+
const url = httpUrl(record.source) ?? httpUrl(record.subject) ?? httpUrl(record.url);
|
|
3416
|
+
return url ? { url } : void 0;
|
|
3417
|
+
}
|
|
3418
|
+
function genericSubject(record) {
|
|
3419
|
+
const subject = record.subject;
|
|
3420
|
+
if (typeof subject === "string") {
|
|
3421
|
+
if (subject.startsWith("at://")) return { kind: "record", uri: subject };
|
|
3422
|
+
if (subject.startsWith("did:")) return { kind: "person", did: subject };
|
|
3423
|
+
return void 0;
|
|
3424
|
+
}
|
|
3425
|
+
const uri = nonBlankString(asRecord(subject)?.uri);
|
|
3426
|
+
if (uri && uri.startsWith("at://")) return { kind: "record", uri };
|
|
3427
|
+
return void 0;
|
|
3428
|
+
}
|
|
3429
|
+
function parseFacetFeature(features) {
|
|
3430
|
+
for (const raw of features) {
|
|
3431
|
+
const feat = asRecord(raw);
|
|
3432
|
+
if (!feat) continue;
|
|
3433
|
+
const type = asNonEmptyString(feat["$type"]) ?? "";
|
|
3434
|
+
const uri = asNonEmptyString(feat.uri);
|
|
3435
|
+
const did = asNonEmptyString(feat.did);
|
|
3436
|
+
const tag = asNonEmptyString(feat.tag);
|
|
3437
|
+
if (type.endsWith("#link") && uri) return { link: uri };
|
|
3438
|
+
if (type.endsWith("#mention") && did) return { mention: did };
|
|
3439
|
+
if (type.endsWith("#tag") && tag) return { tag };
|
|
3440
|
+
if (uri) return { link: uri };
|
|
3441
|
+
if (did) return { mention: did };
|
|
3442
|
+
if (tag) return { tag };
|
|
3443
|
+
}
|
|
3444
|
+
return void 0;
|
|
3445
|
+
}
|
|
3446
|
+
function genericRichSegments(text, record) {
|
|
3447
|
+
const facets = record.facets;
|
|
3448
|
+
if (!Array.isArray(facets)) return void 0;
|
|
3449
|
+
const parsed3 = [];
|
|
3450
|
+
for (const raw of facets) {
|
|
3451
|
+
const facet = asRecord(raw);
|
|
3452
|
+
const index = asRecord(facet?.index);
|
|
3453
|
+
const start = asFiniteNumber(index?.byteStart);
|
|
3454
|
+
const end = asFiniteNumber(index?.byteEnd);
|
|
3455
|
+
if (start === void 0 || end === void 0 || start < 0 || end <= start) continue;
|
|
3456
|
+
const features = facet?.features;
|
|
3457
|
+
if (!Array.isArray(features)) continue;
|
|
3458
|
+
const feature = parseFacetFeature(features);
|
|
3459
|
+
if (!feature) continue;
|
|
3460
|
+
parsed3.push({ start, end, ...feature });
|
|
3461
|
+
}
|
|
3462
|
+
if (parsed3.length === 0) return void 0;
|
|
3463
|
+
const bytes = new TextEncoder().encode(text);
|
|
3464
|
+
const decoder = new TextDecoder();
|
|
3465
|
+
parsed3.sort((a, b) => a.start - b.start);
|
|
3466
|
+
const segments = [];
|
|
3467
|
+
let cursor = 0;
|
|
3468
|
+
for (const span of parsed3) {
|
|
3469
|
+
if (span.start < cursor || span.start > bytes.length) continue;
|
|
3470
|
+
const end = Math.min(span.end, bytes.length);
|
|
3471
|
+
if (span.start > cursor) {
|
|
3472
|
+
const plain = decoder.decode(bytes.slice(cursor, span.start));
|
|
3473
|
+
if (plain) segments.push({ text: plain });
|
|
3474
|
+
}
|
|
3475
|
+
const seg = { text: decoder.decode(bytes.slice(span.start, end)) };
|
|
3476
|
+
if (span.link) seg.link = span.link;
|
|
3477
|
+
if (span.mention) seg.mention = span.mention;
|
|
3478
|
+
if (span.tag) seg.tag = span.tag;
|
|
3479
|
+
segments.push(seg);
|
|
3480
|
+
cursor = end;
|
|
3481
|
+
}
|
|
3482
|
+
if (cursor < bytes.length) {
|
|
3483
|
+
const rest = decoder.decode(bytes.slice(cursor));
|
|
3484
|
+
if (rest) segments.push({ text: rest });
|
|
3485
|
+
}
|
|
3486
|
+
return segments.some((s) => s.link ?? s.mention ?? s.tag) ? segments : void 0;
|
|
3487
|
+
}
|
|
3488
|
+
function applyGeneric(vm, item, record) {
|
|
3489
|
+
if (!record) return withGeneric(vm);
|
|
3490
|
+
const text = genericText(item.collection, record);
|
|
3491
|
+
const tags = genericTags(record);
|
|
3492
|
+
const did = didFromUri(item.uri);
|
|
3493
|
+
if (did) {
|
|
3494
|
+
const media = genericMedia(record, did, text ?? "");
|
|
3495
|
+
if (media.length > 0) vm.media = media;
|
|
3496
|
+
}
|
|
3497
|
+
const externalLink = genericExternalLink(record);
|
|
3498
|
+
if (externalLink) vm.externalLink = externalLink;
|
|
3499
|
+
if (!vm.subject) {
|
|
3500
|
+
const subject = genericSubject(record);
|
|
3501
|
+
if (subject) vm.subject = subject;
|
|
3502
|
+
}
|
|
3503
|
+
let body;
|
|
3504
|
+
if (text) {
|
|
3505
|
+
body = { kind: "text", text };
|
|
3506
|
+
const richSegments = genericRichSegments(text, record);
|
|
3507
|
+
if (richSegments) body.richSegments = richSegments;
|
|
3508
|
+
if (tags) body.tags = tags;
|
|
3509
|
+
} else if (vm.media) {
|
|
3510
|
+
body = { kind: "media" };
|
|
3511
|
+
if (tags) body.tags = tags;
|
|
3512
|
+
} else if (vm.externalLink) {
|
|
3513
|
+
body = { kind: "link" };
|
|
3514
|
+
if (tags) body.tags = tags;
|
|
3515
|
+
} else {
|
|
3516
|
+
body = { kind: "generic" };
|
|
3517
|
+
if (tags) body.tags = tags;
|
|
3518
|
+
}
|
|
3519
|
+
vm.body = body;
|
|
3520
|
+
return vm;
|
|
3521
|
+
}
|
|
2874
3522
|
function toStreamCardVM(item, options = {}) {
|
|
2875
3523
|
const verb = verbForCollection(item.collection);
|
|
2876
3524
|
const source = buildSource(item, options);
|
|
@@ -2890,11 +3538,36 @@ function toStreamCardVM(item, options = {}) {
|
|
|
2890
3538
|
if (item.subject) {
|
|
2891
3539
|
vm.subject = { kind: "post", post: toStreamCardVM(item.subject, options) };
|
|
2892
3540
|
}
|
|
2893
|
-
|
|
2894
|
-
|
|
3541
|
+
switch (item.collection) {
|
|
3542
|
+
case "app.bsky.feed.post":
|
|
3543
|
+
return applyBskyPost(vm, item, record);
|
|
3544
|
+
case "github.pull_request":
|
|
3545
|
+
return record ? applyGithubPr(vm, record) : withGeneric(vm);
|
|
3546
|
+
case "buzz.bookhive.book":
|
|
3547
|
+
return record ? applyBook(vm, item, record) : withGeneric(vm);
|
|
3548
|
+
case "community.lexicon.calendar.rsvp":
|
|
3549
|
+
return record ? applyEventRsvp(vm, record) : withGeneric(vm);
|
|
3550
|
+
case "dev.keytrace.claim":
|
|
3551
|
+
return record ? applyKeytraceVerification(vm, record) : withGeneric(vm);
|
|
3552
|
+
case "app.bsky.graph.verification":
|
|
3553
|
+
return record ? applyBskyVerification(vm, record) : withGeneric(vm);
|
|
3554
|
+
case "social.colibri.membership":
|
|
3555
|
+
return record ? applyMembership(vm, record) : withGeneric(vm);
|
|
3556
|
+
case "app.beaconbits.beacon":
|
|
3557
|
+
return record ? applyLocation(vm, record) : withGeneric(vm);
|
|
3558
|
+
case "social.passports.travel.leg":
|
|
3559
|
+
return record ? applyTravel(vm, record) : withGeneric(vm);
|
|
3560
|
+
case "site.standard.document":
|
|
3561
|
+
return record ? applyStandardSite(vm, record) : withGeneric(vm);
|
|
3562
|
+
case "at.youandme.connection":
|
|
3563
|
+
return record ? applyYouAndMe(vm, record) : withGeneric(vm);
|
|
3564
|
+
case "fyi.asq.answer":
|
|
3565
|
+
return record ? applyAsqAnswer(vm, record) : withGeneric(vm);
|
|
2895
3566
|
}
|
|
2896
|
-
|
|
2897
|
-
|
|
3567
|
+
if (record && item.collection.startsWith("social.popfeed.feed.")) {
|
|
3568
|
+
return applyMediaReview(vm, item, record);
|
|
3569
|
+
}
|
|
3570
|
+
return applyGeneric(vm, item, record);
|
|
2898
3571
|
}
|
|
2899
3572
|
function toStreamCardVMs(items, options = {}) {
|
|
2900
3573
|
const out = [];
|
|
@@ -3310,38 +3983,6 @@ function groupInvolvementByHeading(items) {
|
|
|
3310
3983
|
}
|
|
3311
3984
|
return groups;
|
|
3312
3985
|
}
|
|
3313
|
-
function maxGraphemes(max) {
|
|
3314
|
-
return (value) => {
|
|
3315
|
-
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
3316
|
-
let count = 0;
|
|
3317
|
-
for (const _ of segmenter.segment(value)) {
|
|
3318
|
-
count++;
|
|
3319
|
-
if (count > max) return false;
|
|
3320
|
-
}
|
|
3321
|
-
return true;
|
|
3322
|
-
};
|
|
3323
|
-
}
|
|
3324
|
-
var didSchema = z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
|
|
3325
|
-
var datetimeSchema = z.string().datetime({ offset: true });
|
|
3326
|
-
var partialDateSchema = z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
|
|
3327
|
-
var atUriSchema = z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
|
|
3328
|
-
var cidSchema = z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
|
|
3329
|
-
var languageTagSchema = z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
|
|
3330
|
-
var uriSchema = z.string().url();
|
|
3331
|
-
var strongRefSchema = z.object({
|
|
3332
|
-
uri: atUriSchema,
|
|
3333
|
-
cid: cidSchema
|
|
3334
|
-
});
|
|
3335
|
-
var externalRecordRefSchema = z.object({
|
|
3336
|
-
uri: atUriSchema,
|
|
3337
|
-
cid: cidSchema.optional()
|
|
3338
|
-
});
|
|
3339
|
-
var selfLabelsSchema = z.object({
|
|
3340
|
-
$type: z.literal("com.atproto.label.defs#selfLabels").optional(),
|
|
3341
|
-
values: z.array(z.object({ val: z.string() }))
|
|
3342
|
-
});
|
|
3343
|
-
|
|
3344
|
-
// src/schemas/endorsement-confirmation.ts
|
|
3345
3986
|
var EndorsementConfirmationRecordSchema = z.object({
|
|
3346
3987
|
endorsement: strongRefSchema,
|
|
3347
3988
|
createdAt: datetimeSchema
|
|
@@ -3736,8 +4377,8 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
3736
4377
|
});
|
|
3737
4378
|
|
|
3738
4379
|
// src/index.ts
|
|
3739
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
4380
|
+
var SIFA_SDK_VERSION = "0.12.11";
|
|
3740
4381
|
|
|
3741
|
-
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, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamMediaSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems };
|
|
4382
|
+
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, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems };
|
|
3742
4383
|
//# sourceMappingURL=index.js.map
|
|
3743
4384
|
//# sourceMappingURL=index.js.map
|