@singi-labs/sifa-sdk 0.19.69 → 0.19.71
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-IeuOpcIB.d.ts → index-BrubXw_E.d.ts} +25 -1
- package/dist/{index-syVBnrbI.d.cts → index-IuZw47nV.d.cts} +25 -1
- package/dist/index.cjs +58 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/jsonld/index.d.cts +1 -1
- package/dist/jsonld/index.d.ts +1 -1
- package/dist/{network-map-Af1MVn5j.d.ts → network-map-CmiepDVi.d.ts} +3 -3
- package/dist/{network-map-CU7oqvKW.d.cts → network-map-D3UpQ8QN.d.cts} +3 -3
- package/dist/{org-PkrUsjXq.d.ts → org-CHHnaCZj.d.ts} +2 -2
- package/dist/{org-DLl_2oY6.d.cts → org-Cd2aa9IE.d.cts} +2 -2
- package/dist/{profile-investment-BiHM7C5q.d.cts → profile-investment-Cn5b--EG.d.cts} +76 -15
- package/dist/{profile-investment-BiHM7C5q.d.ts → profile-investment-Cn5b--EG.d.ts} +76 -15
- package/dist/{profile-summary-CU4sWBzF.d.cts → profile-summary-9nNof-UK.d.cts} +1 -1
- package/dist/{profile-summary-RT-roUtM.d.ts → profile-summary-CL1qv4Ej.d.ts} +1 -1
- package/dist/query/fetchers/index.d.cts +6 -6
- package/dist/query/fetchers/index.d.ts +6 -6
- package/dist/query/hooks/index.d.cts +4 -4
- package/dist/query/hooks/index.d.ts +4 -4
- package/dist/query/index.d.cts +9 -9
- package/dist/query/index.d.ts +9 -9
- package/dist/resume/index.d.cts +1 -1
- package/dist/resume/index.d.ts +1 -1
- package/dist/schemas/employment-verification.js +56 -0
- package/dist/schemas/employment-verification.js.map +1 -0
- package/dist/schemas/index.cjs +57 -4
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +10 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/org-employment-attestation.js +14 -4
- package/dist/schemas/org-employment-attestation.js.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/{types-Jb4KKbn9.d.ts → types-BwdoIqu3.d.ts} +1 -1
- package/dist/{types-BV-qBo9i.d.cts → types-ENHrgIPb.d.cts} +1 -1
- package/dist/{use-org-notification-emails-CcOMI3qF.d.cts → use-org-notification-emails-Cj_taxxR.d.cts} +3 -3
- package/dist/{use-org-notification-emails-i5dhCaw8.d.ts → use-org-notification-emails-QGewFqt7.d.ts} +3 -3
- package/package.json +1 -1
|
@@ -85,6 +85,30 @@ interface ProfilePosition {
|
|
|
85
85
|
* Absent for anonymous viewers, the owner, and anyone without a reason to know.
|
|
86
86
|
*/
|
|
87
87
|
viewerConfirmation?: PositionViewerConfirmation;
|
|
88
|
+
/**
|
|
89
|
+
* The organization's own attestation of this position (sifa-workspace#622),
|
|
90
|
+
* as indexed by the AppView. The strongest tier: only the org's account can
|
|
91
|
+
* produce it. Absent when no attestation covers the position; absence is
|
|
92
|
+
* not a negative signal.
|
|
93
|
+
*/
|
|
94
|
+
orgVerification?: PositionOrgVerification;
|
|
95
|
+
}
|
|
96
|
+
/** An organization attestation covering one position, as returned by the AppView. */
|
|
97
|
+
interface PositionOrgVerification {
|
|
98
|
+
/** DID of the attesting organization's account. */
|
|
99
|
+
orgDid: string;
|
|
100
|
+
status: 'current' | 'past';
|
|
101
|
+
/** How the attestation was written: by hand or by directory sync. */
|
|
102
|
+
source: 'manual' | 'directory';
|
|
103
|
+
/** When the organization attested it (the record's createdAt, ISO). */
|
|
104
|
+
verifiedAt: string;
|
|
105
|
+
/** The attested period, when the record carries one (YYYY-MM or YYYY-MM-DD). */
|
|
106
|
+
startedAt: string | null;
|
|
107
|
+
endedAt: string | null;
|
|
108
|
+
/** The record's title or start-month snapshot no longer matches the live position. */
|
|
109
|
+
stale: boolean;
|
|
110
|
+
/** AT-URI of the attestation record in the organization's repository. */
|
|
111
|
+
attestationUri: string;
|
|
88
112
|
}
|
|
89
113
|
/** Confirmations of one position, as returned by the AppView. */
|
|
90
114
|
interface PositionConfirmations {
|
|
@@ -986,4 +1010,4 @@ interface Profile {
|
|
|
986
1010
|
externalAccounts?: ExternalAccount[];
|
|
987
1011
|
}
|
|
988
1012
|
|
|
989
|
-
export { type AccountFacetMode as A, type
|
|
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 };
|
|
@@ -85,6 +85,30 @@ interface ProfilePosition {
|
|
|
85
85
|
* Absent for anonymous viewers, the owner, and anyone without a reason to know.
|
|
86
86
|
*/
|
|
87
87
|
viewerConfirmation?: PositionViewerConfirmation;
|
|
88
|
+
/**
|
|
89
|
+
* The organization's own attestation of this position (sifa-workspace#622),
|
|
90
|
+
* as indexed by the AppView. The strongest tier: only the org's account can
|
|
91
|
+
* produce it. Absent when no attestation covers the position; absence is
|
|
92
|
+
* not a negative signal.
|
|
93
|
+
*/
|
|
94
|
+
orgVerification?: PositionOrgVerification;
|
|
95
|
+
}
|
|
96
|
+
/** An organization attestation covering one position, as returned by the AppView. */
|
|
97
|
+
interface PositionOrgVerification {
|
|
98
|
+
/** DID of the attesting organization's account. */
|
|
99
|
+
orgDid: string;
|
|
100
|
+
status: 'current' | 'past';
|
|
101
|
+
/** How the attestation was written: by hand or by directory sync. */
|
|
102
|
+
source: 'manual' | 'directory';
|
|
103
|
+
/** When the organization attested it (the record's createdAt, ISO). */
|
|
104
|
+
verifiedAt: string;
|
|
105
|
+
/** The attested period, when the record carries one (YYYY-MM or YYYY-MM-DD). */
|
|
106
|
+
startedAt: string | null;
|
|
107
|
+
endedAt: string | null;
|
|
108
|
+
/** The record's title or start-month snapshot no longer matches the live position. */
|
|
109
|
+
stale: boolean;
|
|
110
|
+
/** AT-URI of the attestation record in the organization's repository. */
|
|
111
|
+
attestationUri: string;
|
|
88
112
|
}
|
|
89
113
|
/** Confirmations of one position, as returned by the AppView. */
|
|
90
114
|
interface PositionConfirmations {
|
|
@@ -986,4 +1010,4 @@ interface Profile {
|
|
|
986
1010
|
externalAccounts?: ExternalAccount[];
|
|
987
1011
|
}
|
|
988
1012
|
|
|
989
|
-
export { type AccountFacetMode as A, type
|
|
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 };
|
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([
|
|
6479
|
-
|
|
6480
|
-
|
|
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.
|
|
7253
|
+
var SIFA_SDK_VERSION = "0.19.71";
|
|
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;
|