@singi-labs/sifa-sdk 0.19.29 → 0.19.31

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.
Files changed (43) hide show
  1. package/dist/{index-4R221H7q.d.ts → index-CpbCm2Fe.d.ts} +9 -1
  2. package/dist/{index-BKSZeo7T.d.cts → index-piLIwMN1.d.cts} +9 -1
  3. package/dist/index.cjs +46 -3
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +43 -7
  6. package/dist/index.d.ts +43 -7
  7. package/dist/index.js +39 -4
  8. package/dist/index.js.map +1 -1
  9. package/dist/jsonld/index.d.cts +1 -1
  10. package/dist/jsonld/index.d.ts +1 -1
  11. package/dist/{network-map-CINTZ-yD.d.cts → network-map-9VAyPnle.d.cts} +4 -4
  12. package/dist/{network-map-BodcEDOy.d.ts → network-map-BgeHssxs.d.ts} +4 -4
  13. package/dist/{org-KxSrohNR.d.cts → org-BIbPhHLx.d.cts} +2 -2
  14. package/dist/{org-BzFN82QG.d.ts → org-Dx8K7Mh8.d.ts} +2 -2
  15. package/dist/{profile-investment-CuuO0dlN.d.cts → profile-investment-PDLfao_i.d.cts} +4 -0
  16. package/dist/{profile-investment-CuuO0dlN.d.ts → profile-investment-PDLfao_i.d.ts} +4 -0
  17. package/dist/{profile-summary-BVZT3Ac9.d.cts → profile-summary-Bm3gJPKC.d.cts} +1 -1
  18. package/dist/{profile-summary-AXilYQJe.d.ts → profile-summary-CHUPtU__.d.ts} +1 -1
  19. package/dist/query/fetchers/index.d.cts +6 -6
  20. package/dist/query/fetchers/index.d.ts +6 -6
  21. package/dist/query/hooks/index.d.cts +5 -5
  22. package/dist/query/hooks/index.d.ts +5 -5
  23. package/dist/query/index.d.cts +8 -8
  24. package/dist/query/index.d.ts +8 -8
  25. package/dist/resume/index.d.cts +1 -1
  26. package/dist/resume/index.d.ts +1 -1
  27. package/dist/schemas/index.cjs +10 -2
  28. package/dist/schemas/index.cjs.map +1 -1
  29. package/dist/schemas/index.d.cts +1 -1
  30. package/dist/schemas/index.d.ts +1 -1
  31. package/dist/schemas/index.js +10 -2
  32. package/dist/schemas/index.js.map +1 -1
  33. package/dist/schemas/write/index.cjs +19 -3
  34. package/dist/schemas/write/index.cjs.map +1 -1
  35. package/dist/schemas/write/index.d.cts +11 -1
  36. package/dist/schemas/write/index.d.ts +11 -1
  37. package/dist/schemas/write/index.js +19 -4
  38. package/dist/schemas/write/index.js.map +1 -1
  39. package/dist/{types-BSh5PfxH.d.cts → types-Mosj_JIx.d.ts} +7 -1
  40. package/dist/{types-Dsy2rDvg.d.ts → types-mmGgHkik.d.cts} +7 -1
  41. package/dist/{use-org-notification-emails-B_oWy2oV.d.ts → use-org-notification-emails-Dsek36iZ.d.ts} +3 -3
  42. package/dist/{use-org-notification-emails-BdQFta6U.d.cts → use-org-notification-emails-OHgt6WRP.d.cts} +3 -3
  43. package/package.json +1 -1
@@ -503,6 +503,14 @@ interface ProfileCourse {
503
503
  /** Date the course was completed, as an RFC 3339 datetime. Optional; the
504
504
  * editor collects month granularity (YYYY-MM). */
505
505
  completedAt?: string;
506
+ /** `id.sifa.defs#courseRole` token. Absent means the user took the course. */
507
+ role?: string;
508
+ /** Teaching period of a taught or assisted course (YYYY, YYYY-MM or YYYY-MM-DD). */
509
+ startedAt?: string;
510
+ endedAt?: string;
511
+ /** rkey of the position the course was taught under. The AppView resolves
512
+ * it from the record's `position` at-uri when building the profile view. */
513
+ positionRkey?: string;
506
514
  hidden?: boolean;
507
515
  }
508
516
  /** A related link on a presentation or delivery, as returned by the AppView. */
@@ -576,7 +584,7 @@ interface ProfilePresentationDelivery {
576
584
  title?: string | null;
577
585
  role?: string | null;
578
586
  eventName?: string | null;
579
- /** Day-only date, YYYY-MM-DD. */
587
+ /** YYYY-MM-DD, or YYYY-MM / YYYY when the exact day is unknown. */
580
588
  date?: string | null;
581
589
  location?: string | null;
582
590
  locationCountry?: string | null;
@@ -503,6 +503,14 @@ interface ProfileCourse {
503
503
  /** Date the course was completed, as an RFC 3339 datetime. Optional; the
504
504
  * editor collects month granularity (YYYY-MM). */
505
505
  completedAt?: string;
506
+ /** `id.sifa.defs#courseRole` token. Absent means the user took the course. */
507
+ role?: string;
508
+ /** Teaching period of a taught or assisted course (YYYY, YYYY-MM or YYYY-MM-DD). */
509
+ startedAt?: string;
510
+ endedAt?: string;
511
+ /** rkey of the position the course was taught under. The AppView resolves
512
+ * it from the record's `position` at-uri when building the profile view. */
513
+ positionRkey?: string;
506
514
  hidden?: boolean;
507
515
  }
508
516
  /** A related link on a presentation or delivery, as returned by the AppView. */
@@ -576,7 +584,7 @@ interface ProfilePresentationDelivery {
576
584
  title?: string | null;
577
585
  role?: string | null;
578
586
  eventName?: string | null;
579
- /** Day-only date, YYYY-MM-DD. */
587
+ /** YYYY-MM-DD, or YYYY-MM / YYYY when the exact day is unknown. */
580
588
  date?: string | null;
581
589
  location?: string | null;
582
590
  locationCountry?: string | null;
package/dist/index.cjs CHANGED
@@ -2257,6 +2257,33 @@ function getInvolvementKindHeading(value) {
2257
2257
  return INVOLVEMENT_KIND_HEADINGS[value] ?? "Other";
2258
2258
  }
2259
2259
 
2260
+ // src/taxonomy/course-role.ts
2261
+ var COURSE_ROLE_TAKEN = "id.sifa.defs#courseTaken";
2262
+ var COURSE_ROLE_TAUGHT = "id.sifa.defs#courseTaught";
2263
+ var COURSE_ROLE_TEACHING_ASSISTANT = "id.sifa.defs#courseTeachingAssistant";
2264
+ var COURSE_ROLE_OPTIONS = [
2265
+ { value: COURSE_ROLE_TAKEN, label: "Student" },
2266
+ { value: COURSE_ROLE_TAUGHT, label: "Instructor" },
2267
+ { value: COURSE_ROLE_TEACHING_ASSISTANT, label: "Teaching assistant" }
2268
+ ];
2269
+ var COURSE_ROLE_LABELS = Object.fromEntries(
2270
+ COURSE_ROLE_OPTIONS.map((o) => [o.value, o.label])
2271
+ );
2272
+ function getCourseRoleLabel(value) {
2273
+ if (!value) return void 0;
2274
+ return COURSE_ROLE_LABELS[value];
2275
+ }
2276
+ var TEACHING_ROLES = /* @__PURE__ */ new Set([COURSE_ROLE_TAUGHT, COURSE_ROLE_TEACHING_ASSISTANT]);
2277
+ function isTeachingCourse(course) {
2278
+ return !!course.role && TEACHING_ROLES.has(course.role);
2279
+ }
2280
+ function splitCoursesByRole(courses) {
2281
+ const taken = [];
2282
+ const teaching = [];
2283
+ for (const c of courses) (isTeachingCourse(c) ? teaching : taken).push(c);
2284
+ return { taken, teaching };
2285
+ }
2286
+
2260
2287
  // src/taxonomy/artifact-link-kind.ts
2261
2288
  var ARTIFACT_LINK_KIND_OPTIONS = [
2262
2289
  { value: "pull-request", label: "Pull request" },
@@ -6099,6 +6126,14 @@ var ProfileCourseRecordSchema = zod.z.object({
6099
6126
  // at-uri (not a strongRef) so the link tracks the live certification.
6100
6127
  credential: atUriSchema.optional(),
6101
6128
  completedAt: partialDateSchema.optional(),
6129
+ // id.sifa.defs#courseRole token; absent means the user took the course.
6130
+ role: zod.z.string().refine(maxGraphemes(64)).max(640).optional(),
6131
+ // Teaching period of a taught or assisted course.
6132
+ startedAt: partialDateSchema.optional(),
6133
+ endedAt: partialDateSchema.optional(),
6134
+ // AT-URI of the id.sifa.profile.position the course was taught under. Plain
6135
+ // at-uri (not a strongRef) so the link tracks the live position.
6136
+ position: atUriSchema.optional(),
6102
6137
  createdAt: datetimeSchema
6103
6138
  });
6104
6139
  var ProfileEducationRecordSchema = zod.z.object({
@@ -6272,8 +6307,8 @@ var ProfilePresentationDeliveryRecordSchema = zod.z.object({
6272
6307
  title: zod.z.string().refine(maxGraphemes(300)).max(3e3).optional(),
6273
6308
  role: zod.z.string().refine(maxGraphemes(64)).max(640).optional(),
6274
6309
  eventName: zod.z.string().refine(maxGraphemes(300)).max(3e3).optional(),
6275
- // Calendar date as YYYY-MM-DD (day only).
6276
- date: zod.z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "date must be YYYY-MM-DD").optional(),
6310
+ // Calendar date as YYYY-MM-DD, or YYYY-MM / YYYY when the exact day is unknown.
6311
+ date: zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2})?)?$/, "date must be YYYY, YYYY-MM or YYYY-MM-DD").optional(),
6277
6312
  location: zod.z.string().refine(maxGraphemes(256)).max(2560).optional(),
6278
6313
  // Structured community.lexicon.location.address for the occasion. The
6279
6314
  // free-text `location` string above stays as a legacy fallback.
@@ -6661,7 +6696,7 @@ function describeSifaRecord(collection, value) {
6661
6696
  }
6662
6697
 
6663
6698
  // src/index.ts
6664
- var SIFA_SDK_VERSION = "0.19.29";
6699
+ var SIFA_SDK_VERSION = "0.19.31";
6665
6700
 
6666
6701
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
6667
6702
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -6687,6 +6722,11 @@ exports.COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS = COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIE
6687
6722
  exports.COMPLETENESS_MAX_SCORE = COMPLETENESS_MAX_SCORE;
6688
6723
  exports.CONTINENTS = CONTINENTS;
6689
6724
  exports.COUNTRIES = COUNTRIES;
6725
+ exports.COURSE_ROLE_LABELS = COURSE_ROLE_LABELS;
6726
+ exports.COURSE_ROLE_OPTIONS = COURSE_ROLE_OPTIONS;
6727
+ exports.COURSE_ROLE_TAKEN = COURSE_ROLE_TAKEN;
6728
+ exports.COURSE_ROLE_TAUGHT = COURSE_ROLE_TAUGHT;
6729
+ exports.COURSE_ROLE_TEACHING_ASSISTANT = COURSE_ROLE_TEACHING_ASSISTANT;
6690
6730
  exports.DIMENSIONS_MAX_SCORE = DIMENSIONS_MAX_SCORE;
6691
6731
  exports.EMPLOYMENT_TYPE_GROUPS = EMPLOYMENT_TYPE_GROUPS;
6692
6732
  exports.EMPLOYMENT_TYPE_LABELS = EMPLOYMENT_TYPE_LABELS;
@@ -6829,6 +6869,7 @@ exports.getArtifactLinkKindLabel = getArtifactLinkKindLabel;
6829
6869
  exports.getCalendarEventModeLabel = getCalendarEventModeLabel;
6830
6870
  exports.getCalendarEventStatusLabel = getCalendarEventStatusLabel;
6831
6871
  exports.getContinent = getContinent;
6872
+ exports.getCourseRoleLabel = getCourseRoleLabel;
6832
6873
  exports.getDisplayLabel = getDisplayLabel;
6833
6874
  exports.getEmploymentTypeLabel = getEmploymentTypeLabel;
6834
6875
  exports.getFaviconUrl = getFaviconUrl;
@@ -6875,6 +6916,7 @@ exports.isRelationalActivity = isRelationalActivity;
6875
6916
  exports.isRoleLineRedundant = isRoleLineRedundant;
6876
6917
  exports.isSectionPopulated = isSectionPopulated;
6877
6918
  exports.isSelfAuthoredRich = isSelfAuthoredRich;
6919
+ exports.isTeachingCourse = isTeachingCourse;
6878
6920
  exports.isValidRgbColor = isValidRgbColor;
6879
6921
  exports.isVisibleActivityItem = isVisibleActivityItem;
6880
6922
  exports.languageTagSchema = languageTagSchema;
@@ -6941,6 +6983,7 @@ exports.sortLanguagesByProficiency = sortLanguagesByProficiency;
6941
6983
  exports.sortPositions = sortPositions;
6942
6984
  exports.sortProjects = sortProjects;
6943
6985
  exports.sortPublications = sortPublications;
6986
+ exports.splitCoursesByRole = splitCoursesByRole;
6944
6987
  exports.streamAddressSchema = streamAddressSchema;
6945
6988
  exports.streamAuthorSchema = streamAuthorSchema;
6946
6989
  exports.streamCardBodySchema = streamCardBodySchema;