@singi-labs/sifa-sdk 0.11.11 → 0.11.13

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.
@@ -180,11 +180,25 @@ interface PresentationLinkView {
180
180
  label?: string;
181
181
  type?: string;
182
182
  }
183
+ /**
184
+ * A co-speaker on a delivery, hydrated from a stored DID to a profile card.
185
+ * Any atproto account; `hasSifaProfile` is true when they have a claimed Sifa
186
+ * profile (vs an unclaimed atproto account that still renders at /p/<handle>).
187
+ */
188
+ interface CoSpeaker {
189
+ did: string;
190
+ handle: string;
191
+ displayName?: string;
192
+ avatar?: string;
193
+ hasSifaProfile?: boolean;
194
+ }
183
195
  /** An occasion on which a presentation was delivered (the AppView view-model). */
184
196
  interface ProfilePresentationDelivery {
185
197
  rkey: string;
186
198
  /** rkey of the parent presentation when this delivery references one. */
187
199
  presentationRkey?: string | null;
200
+ /** Co-speakers at this occasion, hydrated from the stored DIDs. */
201
+ coSpeakers?: CoSpeaker[];
188
202
  title?: string | null;
189
203
  role?: string | null;
190
204
  eventName?: string | null;
@@ -406,4 +420,4 @@ declare function hasAdultContent(item: {
406
420
  labels?: ActivityLabel[];
407
421
  }): boolean;
408
422
 
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 };
423
+ export { type AdultContentLabel as A, hasAdultContent as B, type CoSpeaker as C, 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 };
@@ -180,11 +180,25 @@ interface PresentationLinkView {
180
180
  label?: string;
181
181
  type?: string;
182
182
  }
183
+ /**
184
+ * A co-speaker on a delivery, hydrated from a stored DID to a profile card.
185
+ * Any atproto account; `hasSifaProfile` is true when they have a claimed Sifa
186
+ * profile (vs an unclaimed atproto account that still renders at /p/<handle>).
187
+ */
188
+ interface CoSpeaker {
189
+ did: string;
190
+ handle: string;
191
+ displayName?: string;
192
+ avatar?: string;
193
+ hasSifaProfile?: boolean;
194
+ }
183
195
  /** An occasion on which a presentation was delivered (the AppView view-model). */
184
196
  interface ProfilePresentationDelivery {
185
197
  rkey: string;
186
198
  /** rkey of the parent presentation when this delivery references one. */
187
199
  presentationRkey?: string | null;
200
+ /** Co-speakers at this occasion, hydrated from the stored DIDs. */
201
+ coSpeakers?: CoSpeaker[];
188
202
  title?: string | null;
189
203
  role?: string | null;
190
204
  eventName?: string | null;
@@ -406,4 +420,4 @@ declare function hasAdultContent(item: {
406
420
  labels?: ActivityLabel[];
407
421
  }): boolean;
408
422
 
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 };
423
+ export { type AdultContentLabel as A, hasAdultContent as B, type CoSpeaker as C, 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
@@ -1754,7 +1754,17 @@ function normalizePresentationRole(value) {
1754
1754
  const v = clean(value).toLowerCase();
1755
1755
  if (!v) return void 0;
1756
1756
  if (v.startsWith("id.sifa.defs#")) return v;
1757
- return ROLE_TOKENS[v] ?? v;
1757
+ const exact = ROLE_TOKENS[v];
1758
+ if (exact) return exact;
1759
+ if (v.includes("keynote")) return ROLE_TOKENS.keynote;
1760
+ if (v.includes("workshop") || v.includes("masterclass") || v.includes("training"))
1761
+ return ROLE_TOKENS.workshop;
1762
+ if (v.includes("panel")) return ROLE_TOKENS.panelist;
1763
+ if (v.includes("host") || v.includes("moderat") || v.includes("emcee") || v.includes("chair"))
1764
+ return ROLE_TOKENS.host;
1765
+ if (v.includes("speaker") || v.includes("present") || v.includes("talk"))
1766
+ return ROLE_TOKENS.presenter;
1767
+ return void 0;
1758
1768
  }
1759
1769
  var MODE_FRAGMENTS = {
1760
1770
  inperson: "#inperson",
@@ -2637,6 +2647,8 @@ var ProfilePresentationDeliveryRecordSchema = zod.z.object({
2637
2647
  links: zod.z.array(PresentationLinkSchema).max(20).optional(),
2638
2648
  // Optional reference to a community.lexicon.calendar.event for this occasion.
2639
2649
  eventRef: externalRecordRefSchema.optional(),
2650
+ // DIDs of co-speakers who presented alongside the author at this occasion.
2651
+ coSpeakers: zod.z.array(zod.z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID")).max(20).optional(),
2640
2652
  createdAt: datetimeSchema
2641
2653
  });
2642
2654
  var ProfileProjectRecordSchema = zod.z.object({
@@ -2693,7 +2705,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
2693
2705
  });
2694
2706
 
2695
2707
  // src/index.ts
2696
- var SIFA_SDK_VERSION = "0.11.11";
2708
+ var SIFA_SDK_VERSION = "0.11.13";
2697
2709
 
2698
2710
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
2699
2711
  exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;