@singi-labs/sifa-sdk 0.19.70 → 0.19.72

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 (42) hide show
  1. package/dist/{index-BrubXw_E.d.ts → index-BFdNI6jA.d.ts} +22 -1
  2. package/dist/{index-IuZw47nV.d.cts → index-BzkaABDb.d.cts} +22 -1
  3. package/dist/index.cjs +58 -5
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +7 -7
  6. package/dist/index.d.ts +7 -7
  7. package/dist/index.js +9 -1
  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-CmiepDVi.d.ts → network-map-D-VXi2yc.d.ts} +3 -3
  12. package/dist/{network-map-D3UpQ8QN.d.cts → network-map-DfXwB2Eq.d.cts} +3 -3
  13. package/dist/{org-Cd2aa9IE.d.cts → org-A9Tz-Uv9.d.cts} +2 -2
  14. package/dist/{org-CHHnaCZj.d.ts → org-Spq8yU-B.d.ts} +2 -2
  15. package/dist/{profile-investment-BiHM7C5q.d.cts → profile-investment-Cn5b--EG.d.cts} +76 -15
  16. package/dist/{profile-investment-BiHM7C5q.d.ts → profile-investment-Cn5b--EG.d.ts} +76 -15
  17. package/dist/{profile-summary-CL1qv4Ej.d.ts → profile-summary-6GySSJvO.d.ts} +1 -1
  18. package/dist/{profile-summary-9nNof-UK.d.cts → profile-summary-X4MGExfS.d.cts} +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 +4 -4
  22. package/dist/query/hooks/index.d.ts +4 -4
  23. package/dist/query/index.d.cts +9 -9
  24. package/dist/query/index.d.ts +9 -9
  25. package/dist/resume/index.d.cts +1 -1
  26. package/dist/resume/index.d.ts +1 -1
  27. package/dist/schemas/employment-verification.js +56 -0
  28. package/dist/schemas/employment-verification.js.map +1 -0
  29. package/dist/schemas/index.cjs +57 -4
  30. package/dist/schemas/index.cjs.map +1 -1
  31. package/dist/schemas/index.d.cts +1 -1
  32. package/dist/schemas/index.d.ts +1 -1
  33. package/dist/schemas/index.js +10 -0
  34. package/dist/schemas/index.js.map +1 -1
  35. package/dist/schemas/org-employment-attestation.js +14 -4
  36. package/dist/schemas/org-employment-attestation.js.map +1 -1
  37. package/dist/types/index.js.map +1 -1
  38. package/dist/{types-ENHrgIPb.d.cts → types-DXep6553.d.cts} +1 -1
  39. package/dist/{types-BwdoIqu3.d.ts → types-DxMMqOJo.d.ts} +1 -1
  40. package/dist/{use-org-notification-emails-Cj_taxxR.d.cts → use-org-notification-emails-5V3ZAlRd.d.cts} +3 -3
  41. package/dist/{use-org-notification-emails-QGewFqt7.d.ts → use-org-notification-emails-CfDfHwBl.d.ts} +3 -3
  42. package/package.json +1 -1
@@ -259,6 +259,25 @@ interface ProfileCertification {
259
259
  credentialUrl?: string;
260
260
  hidden?: boolean;
261
261
  }
262
+ /**
263
+ * A calendar event a project organized or hosted, with display fields the
264
+ * AppView resolved from the referenced community.lexicon.calendar.event.
265
+ */
266
+ interface ProjectEventView {
267
+ /** AT-URI of the community.lexicon.calendar.event. */
268
+ uri: string;
269
+ /** The user's role at this occurrence, when it differs from the project's role. */
270
+ role?: string;
271
+ name?: string;
272
+ /** ISO datetime. Use the date part for display; the time is not meaningful for past events. */
273
+ startsAt?: string;
274
+ /** community.lexicon.calendar.event mode token. */
275
+ mode?: string;
276
+ locality?: string;
277
+ /** ISO 3166-1 alpha-2. */
278
+ country?: string;
279
+ url?: string;
280
+ }
262
281
  interface ProfileProject {
263
282
  rkey: string;
264
283
  name: string;
@@ -277,6 +296,8 @@ interface ProfileProject {
277
296
  */
278
297
  /** AT-URI of the same record on another person's profile, when they keep one. */
279
298
  sameAs?: string;
299
+ /** Calendar events this project organized or hosted, newest first. */
300
+ events?: ProjectEventView[];
280
301
  hidden?: boolean;
281
302
  /** User-flagged primary project, surfaced in the Highlights block. Ongoing only. */
282
303
  primary?: boolean;
@@ -1010,4 +1031,4 @@ interface Profile {
1010
1031
  externalAccounts?: ExternalAccount[];
1011
1032
  }
1012
1033
 
1013
- export { type AccountFacetMode as A, type ProfileCourse as B, type CoSpeaker as C, type ProfileIndustry as D, type Endorsement as E, type FeedItem as F, type ProfileInvestment as G, type ProfileInvestmentLink as H, type ProfileInvolvementLink as I, type ProfileLocation as J, type ProfileOverrideSource as K, type LocationValue as L, type ProfilePresentation as M, type ProfileVolunteering as N, type OrgAddressView as O, type ProfileSkill as P, type ProjectMemberCard as Q, type RelatedIdentifier as R, type ProjectRole as S, type PublicationContributor as T, type RecognizedEntity as U, type SkillRef as V, type SkillSuggestion as W, type TrustStat as X, type VerifiedAccount as Y, type ProfilePresentationDelivery as a, type PdsProviderInfo as b, type Profile as c, type ProfilePosition as d, type ProfileCertification as e, type ProfileEducation as f, type ProfileHonor as g, type ProfileLanguage as h, type ProfileProject as i, type ProfilePublication as j, type ProfileInvolvement as k, type ActiveApp as l, type ActorCard as m, type AuthorSuggestion as n, type EndorsementData as o, type ExternalAccount as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type OrgFloorVerdict as s, type OrgLinkView as t, type OrgProfileView as u, PROJECT_ROLES as v, type PositionConfirmations as w, type PositionOrgVerification as x, type PositionViewerConfirmation as y, type PresentationLinkView as z };
1034
+ export { type AccountFacetMode as A, type ProfileCourse as B, type CoSpeaker as C, type ProfileIndustry as D, type Endorsement as E, type FeedItem as F, type ProfileInvestment as G, type ProfileInvestmentLink as H, type ProfileInvolvementLink as I, type ProfileLocation as J, type ProfileOverrideSource as K, type LocationValue as L, type ProfilePresentation as M, type ProfileVolunteering as N, type OrgAddressView as O, type ProfileSkill as P, type ProjectEventView as Q, type RelatedIdentifier as R, type ProjectMemberCard as S, type ProjectRole as T, type PublicationContributor as U, type RecognizedEntity as V, type SkillRef as W, type SkillSuggestion as X, type TrustStat as Y, type VerifiedAccount as Z, type ProfilePresentationDelivery as a, type PdsProviderInfo as b, type Profile as c, type ProfilePosition as d, type ProfileCertification as e, type ProfileEducation as f, type ProfileHonor as g, type ProfileLanguage as h, type ProfileProject as i, type ProfilePublication as j, type ProfileInvolvement as k, type ActiveApp as l, type ActorCard as m, type AuthorSuggestion as n, type EndorsementData as o, type ExternalAccount as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type OrgFloorVerdict as s, type OrgLinkView as t, type OrgProfileView as u, PROJECT_ROLES as v, type PositionConfirmations as w, type PositionOrgVerification as x, type PositionViewerConfirmation as y, type PresentationLinkView as z };
@@ -259,6 +259,25 @@ interface ProfileCertification {
259
259
  credentialUrl?: string;
260
260
  hidden?: boolean;
261
261
  }
262
+ /**
263
+ * A calendar event a project organized or hosted, with display fields the
264
+ * AppView resolved from the referenced community.lexicon.calendar.event.
265
+ */
266
+ interface ProjectEventView {
267
+ /** AT-URI of the community.lexicon.calendar.event. */
268
+ uri: string;
269
+ /** The user's role at this occurrence, when it differs from the project's role. */
270
+ role?: string;
271
+ name?: string;
272
+ /** ISO datetime. Use the date part for display; the time is not meaningful for past events. */
273
+ startsAt?: string;
274
+ /** community.lexicon.calendar.event mode token. */
275
+ mode?: string;
276
+ locality?: string;
277
+ /** ISO 3166-1 alpha-2. */
278
+ country?: string;
279
+ url?: string;
280
+ }
262
281
  interface ProfileProject {
263
282
  rkey: string;
264
283
  name: string;
@@ -277,6 +296,8 @@ interface ProfileProject {
277
296
  */
278
297
  /** AT-URI of the same record on another person's profile, when they keep one. */
279
298
  sameAs?: string;
299
+ /** Calendar events this project organized or hosted, newest first. */
300
+ events?: ProjectEventView[];
280
301
  hidden?: boolean;
281
302
  /** User-flagged primary project, surfaced in the Highlights block. Ongoing only. */
282
303
  primary?: boolean;
@@ -1010,4 +1031,4 @@ interface Profile {
1010
1031
  externalAccounts?: ExternalAccount[];
1011
1032
  }
1012
1033
 
1013
- export { type AccountFacetMode as A, type ProfileCourse as B, type CoSpeaker as C, type ProfileIndustry as D, type Endorsement as E, type FeedItem as F, type ProfileInvestment as G, type ProfileInvestmentLink as H, type ProfileInvolvementLink as I, type ProfileLocation as J, type ProfileOverrideSource as K, type LocationValue as L, type ProfilePresentation as M, type ProfileVolunteering as N, type OrgAddressView as O, type ProfileSkill as P, type ProjectMemberCard as Q, type RelatedIdentifier as R, type ProjectRole as S, type PublicationContributor as T, type RecognizedEntity as U, type SkillRef as V, type SkillSuggestion as W, type TrustStat as X, type VerifiedAccount as Y, type ProfilePresentationDelivery as a, type PdsProviderInfo as b, type Profile as c, type ProfilePosition as d, type ProfileCertification as e, type ProfileEducation as f, type ProfileHonor as g, type ProfileLanguage as h, type ProfileProject as i, type ProfilePublication as j, type ProfileInvolvement as k, type ActiveApp as l, type ActorCard as m, type AuthorSuggestion as n, type EndorsementData as o, type ExternalAccount as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type OrgFloorVerdict as s, type OrgLinkView as t, type OrgProfileView as u, PROJECT_ROLES as v, type PositionConfirmations as w, type PositionOrgVerification as x, type PositionViewerConfirmation as y, type PresentationLinkView as z };
1034
+ export { type AccountFacetMode as A, type ProfileCourse as B, type CoSpeaker as C, type ProfileIndustry as D, type Endorsement as E, type FeedItem as F, type ProfileInvestment as G, type ProfileInvestmentLink as H, type ProfileInvolvementLink as I, type ProfileLocation as J, type ProfileOverrideSource as K, type LocationValue as L, type ProfilePresentation as M, type ProfileVolunteering as N, type OrgAddressView as O, type ProfileSkill as P, type ProjectEventView as Q, type RelatedIdentifier as R, type ProjectMemberCard as S, type ProjectRole as T, type PublicationContributor as U, type RecognizedEntity as V, type SkillRef as W, type SkillSuggestion as X, type TrustStat as Y, type VerifiedAccount as Z, type ProfilePresentationDelivery as a, type PdsProviderInfo as b, type Profile as c, type ProfilePosition as d, type ProfileCertification as e, type ProfileEducation as f, type ProfileHonor as g, type ProfileLanguage as h, type ProfileProject as i, type ProfilePublication as j, type ProfileInvolvement as k, type ActiveApp as l, type ActorCard as m, type AuthorSuggestion as n, type EndorsementData as o, type ExternalAccount as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type OrgFloorVerdict as s, type OrgLinkView as t, type OrgProfileView as u, PROJECT_ROLES as v, type PositionConfirmations as w, type PositionOrgVerification as x, type PositionViewerConfirmation as y, type PresentationLinkView as z };
package/dist/index.cjs CHANGED
@@ -6474,17 +6474,66 @@ var OrgProfileRecordSchema = zod.z.object({
6474
6474
  });
6475
6475
  var OrgEmploymentAttestationRecordSchema = zod.z.object({
6476
6476
  subject: didSchema,
6477
- position: strongRefSchema,
6478
- status: zod.z.enum(["current", "past"]),
6479
- title: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
6480
- startedAt: partialDateSchema,
6477
+ position: strongRefSchema.optional(),
6478
+ status: zod.z.enum([
6479
+ "id.sifa.defs#employmentCurrent",
6480
+ "id.sifa.defs#employmentPast",
6481
+ "current",
6482
+ "past"
6483
+ ]),
6484
+ source: zod.z.enum(["id.sifa.defs#attestationManual", "id.sifa.defs#attestationDirectory"]).optional(),
6485
+ title: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560).optional(),
6486
+ startedAt: partialDateSchema.optional(),
6481
6487
  entityRef: uriSchema.optional(),
6488
+ /**
6489
+ * @deprecated The author DID is the organization. Still parsed so a record
6490
+ * that carries it validates; readers must not use it for anything.
6491
+ */
6482
6492
  companyDid: didSchema.optional(),
6483
6493
  endedAt: partialDateSchema.optional(),
6484
6494
  comment: zod.z.string().refine(maxGraphemes(300)).max(3e3).optional(),
6485
6495
  labels: selfLabelsSchema.optional(),
6486
6496
  createdAt: datetimeSchema
6487
6497
  });
6498
+ var EMPLOYMENT_STATUS_TOKENS = [
6499
+ "id.sifa.defs#employmentCurrent",
6500
+ "id.sifa.defs#employmentPast"
6501
+ ];
6502
+ var VERIFICATION_METHOD_TOKENS = [
6503
+ "id.sifa.defs#verifiedByEmail",
6504
+ "id.sifa.defs#verifiedByOrg",
6505
+ "id.sifa.defs#verifiedByDirectory",
6506
+ "id.sifa.defs#verifiedByPeer"
6507
+ ];
6508
+ var EmploymentVerificationRecordSchema = zod.z.object({
6509
+ $type: zod.z.literal("id.sifa.verification.employment").optional(),
6510
+ subject: didSchema,
6511
+ position: externalRecordRefSchema,
6512
+ status: zod.z.enum(EMPLOYMENT_STATUS_TOKENS),
6513
+ // Open on purpose, like the lexicon's knownValues: a method Sifa adds
6514
+ // later must not make an older client reject the whole record. Compare
6515
+ // against VERIFICATION_METHOD_TOKENS when you need a specific one.
6516
+ methods: zod.z.array(zod.z.string().min(1)).min(1).max(4),
6517
+ title: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
6518
+ startedAt: partialDateSchema,
6519
+ endedAt: partialDateSchema.optional(),
6520
+ entityRef: uriSchema.optional(),
6521
+ organization: didSchema.optional(),
6522
+ evidence: zod.z.array(externalRecordRefSchema).max(20).optional(),
6523
+ verifiedAt: datetimeSchema,
6524
+ expiresAt: datetimeSchema.optional(),
6525
+ createdAt: datetimeSchema
6526
+ }).strict();
6527
+ function resolveEmploymentVerification(value, options) {
6528
+ if (options.repoDid !== options.issuerDid) return { ok: false, reason: "not-issuer" };
6529
+ const parsed3 = EmploymentVerificationRecordSchema.safeParse(value);
6530
+ if (!parsed3.success) return { ok: false, reason: "malformed" };
6531
+ const now = options.now ?? /* @__PURE__ */ new Date();
6532
+ if (parsed3.data.expiresAt && new Date(parsed3.data.expiresAt).getTime() <= now.getTime()) {
6533
+ return { ok: false, reason: "lapsed" };
6534
+ }
6535
+ return { ok: true, record: parsed3.data };
6536
+ }
6488
6537
  var GraphFollowRecordSchema = zod.z.object({
6489
6538
  subject: didSchema,
6490
6539
  createdAt: datetimeSchema,
@@ -7201,7 +7250,7 @@ function describeSifaRecord(collection, value) {
7201
7250
  }
7202
7251
 
7203
7252
  // src/index.ts
7204
- var SIFA_SDK_VERSION = "0.19.70";
7253
+ var SIFA_SDK_VERSION = "0.19.72";
7205
7254
 
7206
7255
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
7207
7256
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -7236,11 +7285,13 @@ exports.COURSE_ROLE_TAUGHT = COURSE_ROLE_TAUGHT;
7236
7285
  exports.COURSE_ROLE_TEACHING_ASSISTANT = COURSE_ROLE_TEACHING_ASSISTANT;
7237
7286
  exports.DATE_LOOKAHEAD_MONTHS = DATE_LOOKAHEAD_MONTHS;
7238
7287
  exports.DIMENSIONS_MAX_SCORE = DIMENSIONS_MAX_SCORE;
7288
+ exports.EMPLOYMENT_STATUS_TOKENS = EMPLOYMENT_STATUS_TOKENS;
7239
7289
  exports.EMPLOYMENT_TYPE_GROUPS = EMPLOYMENT_TYPE_GROUPS;
7240
7290
  exports.EMPLOYMENT_TYPE_LABELS = EMPLOYMENT_TYPE_LABELS;
7241
7291
  exports.ENTITY_REF_ANCHORS = ENTITY_REF_ANCHORS;
7242
7292
  exports.EQF_LEVEL_LABELS = EQF_LEVEL_LABELS;
7243
7293
  exports.EQF_LEVEL_OPTIONS = EQF_LEVEL_OPTIONS;
7294
+ exports.EmploymentVerificationRecordSchema = EmploymentVerificationRecordSchema;
7244
7295
  exports.EndorsementConfirmationRecordSchema = EndorsementConfirmationRecordSchema;
7245
7296
  exports.EndorsementRecordSchema = EndorsementRecordSchema;
7246
7297
  exports.EntityImportSearchResponseSchema = EntityImportSearchResponseSchema;
@@ -7326,6 +7377,7 @@ exports.SKILL_CATEGORIES = SKILL_CATEGORIES;
7326
7377
  exports.STANDARD_PUBLISHER_ID = STANDARD_PUBLISHER_ID;
7327
7378
  exports.STREAM_VERBS = STREAM_VERBS;
7328
7379
  exports.SifaFeedItemSchema = SifaFeedItemSchema;
7380
+ exports.VERIFICATION_METHOD_TOKENS = VERIFICATION_METHOD_TOKENS;
7329
7381
  exports.VERIFICATION_PROVIDERS = VERIFICATION_PROVIDERS;
7330
7382
  exports.WORKPLACE_TYPE_LABELS = WORKPLACE_TYPE_LABELS;
7331
7383
  exports.WORKPLACE_TYPE_OPTIONS = WORKPLACE_TYPE_OPTIONS;
@@ -7488,6 +7540,7 @@ exports.resolveAgentRef = resolveAgentRef;
7488
7540
  exports.resolveCardHealth = resolveCardHealth;
7489
7541
  exports.resolveCardUrl = resolveCardUrl;
7490
7542
  exports.resolveEmbed = resolveEmbed;
7543
+ exports.resolveEmploymentVerification = resolveEmploymentVerification;
7491
7544
  exports.resolveVerifierProvider = resolveVerifierProvider;
7492
7545
  exports.rgbToString = rgbToString;
7493
7546
  exports.roadmapIssueUrl = roadmapIssueUrl;