@singi-labs/sifa-sdk 0.11.5 → 0.11.6
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-Bwr392Yu.d.cts → adult-content-B5hAdi76.d.cts} +1 -1
- package/dist/{adult-content-Bwr392Yu.d.ts → adult-content-B5hAdi76.d.ts} +1 -1
- package/dist/index.cjs +36 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -3
- package/dist/index.d.ts +29 -3
- package/dist/index.js +36 -2
- package/dist/index.js.map +1 -1
- package/dist/{keys-BfRke4RH.d.ts → keys-_UjR-zwC.d.ts} +1 -1
- package/dist/{keys-opBDjxEP.d.cts → keys-qoNpril5.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 +3 -3
- package/dist/query/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -406,4 +406,4 @@ declare function hasAdultContent(item: {
|
|
|
406
406
|
labels?: ActivityLabel[];
|
|
407
407
|
}): boolean;
|
|
408
408
|
|
|
409
|
-
export { type AdultContentLabel as A, hasAdultContent as B, type ExternalAccount as E, type FeedItem as F, type LocationValue as L, type ProfileSkill as P, type SkillSuggestion as S, type TrustStat as T, type VerifiedAccount as V, type ActivityLabel as a, type
|
|
409
|
+
export { type AdultContentLabel as A, hasAdultContent as B, type ExternalAccount as E, type FeedItem as F, type LocationValue as L, type ProfileSkill as P, type SkillSuggestion as S, type TrustStat as T, type VerifiedAccount as V, type ActivityLabel as a, type ProfilePresentationDelivery as b, type PdsProviderInfo as c, type Profile as d, ADULT_CONTENT_LABELS as e, type ActiveApp as f, type Endorsement as g, type EndorsementData as h, type ExternalAccountKeytraceClaim as i, type LanguageProficiency as j, type PresentationLinkView as k, type ProfileCertification as l, type ProfileCourse as m, type ProfileEducation as n, type ProfileHonor as o, type ProfileIndustry as p, type ProfileLanguage as q, type ProfileLocation as r, type ProfileOverrideSource as s, type ProfilePosition as t, type ProfilePresentation as u, type ProfileProject as v, type ProfilePublication as w, type ProfileVolunteering as x, type PublicationContributor as y, type SkillRef as z };
|
|
@@ -406,4 +406,4 @@ declare function hasAdultContent(item: {
|
|
|
406
406
|
labels?: ActivityLabel[];
|
|
407
407
|
}): boolean;
|
|
408
408
|
|
|
409
|
-
export { type AdultContentLabel as A, hasAdultContent as B, type ExternalAccount as E, type FeedItem as F, type LocationValue as L, type ProfileSkill as P, type SkillSuggestion as S, type TrustStat as T, type VerifiedAccount as V, type ActivityLabel as a, type
|
|
409
|
+
export { type AdultContentLabel as A, hasAdultContent as B, type ExternalAccount as E, type FeedItem as F, type LocationValue as L, type ProfileSkill as P, type SkillSuggestion as S, type TrustStat as T, type VerifiedAccount as V, type ActivityLabel as a, type ProfilePresentationDelivery as b, type PdsProviderInfo as c, type Profile as d, ADULT_CONTENT_LABELS as e, type ActiveApp as f, type Endorsement as g, type EndorsementData as h, type ExternalAccountKeytraceClaim as i, type LanguageProficiency as j, type PresentationLinkView as k, type ProfileCertification as l, type ProfileCourse as m, type ProfileEducation as n, type ProfileHonor as o, type ProfileIndustry as p, type ProfileLanguage as q, type ProfileLocation as r, type ProfileOverrideSource as s, type ProfilePosition as t, type ProfilePresentation as u, type ProfileProject as v, type ProfilePublication as w, type ProfileVolunteering as x, type PublicationContributor as y, type SkillRef as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1414,6 +1414,40 @@ function formatPresentationDuration(duration) {
|
|
|
1414
1414
|
return `${minMinutes} min`;
|
|
1415
1415
|
}
|
|
1416
1416
|
|
|
1417
|
+
// src/format/summarize-deliveries.ts
|
|
1418
|
+
var CANCELLED_STATUS = "community.lexicon.calendar.event#cancelled";
|
|
1419
|
+
var KEYNOTE_ROLE = "id.sifa.defs#keynote";
|
|
1420
|
+
function summarizePresentationDeliveries(deliveries, options = {}) {
|
|
1421
|
+
const venueLimit = options.venueLimit ?? 3;
|
|
1422
|
+
const counted = (deliveries ?? []).filter((delivery) => delivery.status !== CANCELLED_STATUS);
|
|
1423
|
+
const sorted = [...counted].sort((a, b) => (b.date ?? "").localeCompare(a.date ?? ""));
|
|
1424
|
+
let recentYear;
|
|
1425
|
+
for (const delivery of counted) {
|
|
1426
|
+
if (!delivery.date) continue;
|
|
1427
|
+
const year = Number(delivery.date.slice(0, 4));
|
|
1428
|
+
if (!Number.isNaN(year) && (recentYear === void 0 || year > recentYear)) {
|
|
1429
|
+
recentYear = year;
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1433
|
+
const distinctVenues = [];
|
|
1434
|
+
for (const delivery of sorted) {
|
|
1435
|
+
const name = delivery.eventName?.trim();
|
|
1436
|
+
if (name && !seen.has(name)) {
|
|
1437
|
+
seen.add(name);
|
|
1438
|
+
distinctVenues.push(name);
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
const venues = distinctVenues.slice(0, venueLimit);
|
|
1442
|
+
return {
|
|
1443
|
+
count: counted.length,
|
|
1444
|
+
recentYear,
|
|
1445
|
+
keynoteCount: counted.filter((delivery) => delivery.role === KEYNOTE_ROLE).length,
|
|
1446
|
+
venues,
|
|
1447
|
+
moreVenues: distinctVenues.length - venues.length
|
|
1448
|
+
};
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1417
1451
|
// src/format/sort-by-date.ts
|
|
1418
1452
|
var FAR_FUTURE = "9999-12-31";
|
|
1419
1453
|
var FAR_PAST = "0000-01-01";
|
|
@@ -2550,7 +2584,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
2550
2584
|
});
|
|
2551
2585
|
|
|
2552
2586
|
// src/index.ts
|
|
2553
|
-
var SIFA_SDK_VERSION = "0.11.
|
|
2587
|
+
var SIFA_SDK_VERSION = "0.11.6";
|
|
2554
2588
|
|
|
2555
2589
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
2556
2590
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|
|
@@ -2705,6 +2739,7 @@ exports.singleDateExtractor = singleDateExtractor;
|
|
|
2705
2739
|
exports.sortByDateDesc = sortByDateDesc;
|
|
2706
2740
|
exports.stripHtmlToText = stripHtmlToText;
|
|
2707
2741
|
exports.strongRefSchema = strongRefSchema;
|
|
2742
|
+
exports.summarizePresentationDeliveries = summarizePresentationDeliveries;
|
|
2708
2743
|
exports.truncateGraphemes = truncateGraphemes;
|
|
2709
2744
|
exports.uriSchema = uriSchema;
|
|
2710
2745
|
//# sourceMappingURL=index.cjs.map
|