@singi-labs/sifa-sdk 0.11.25 → 0.11.27
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-pvNBfDQL.d.cts → adult-content-B6QylaCW.d.cts} +16 -0
- package/dist/{adult-content-pvNBfDQL.d.ts → adult-content-B6QylaCW.d.ts} +16 -0
- package/dist/{index-BXi6sYhX.d.ts → index-AEgV1kLI.d.ts} +2 -2
- package/dist/{index-CCi2sg_u.d.ts → index-BgoYJYDg.d.ts} +2 -2
- package/dist/{index-CtH-frgT.d.cts → index-C6lkRZEu.d.cts} +2 -2
- package/dist/{index-OBJQIB9t.d.cts → index-Cnf3ptEg.d.cts} +2 -2
- package/dist/index.cjs +85 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +85 -2
- package/dist/index.js.map +1 -1
- package/dist/{keys-c5LIN2pO.d.cts → keys-9usqNSXo.d.cts} +1 -1
- package/dist/{keys-CxTXTPnI.d.ts → keys-BrOsePaR.d.ts} +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 +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/schemas/index.cjs +7 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +5 -0
- package/dist/schemas/index.d.ts +5 -0
- package/dist/schemas/index.js +7 -0
- package/dist/schemas/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -238,6 +238,22 @@ interface ProfileInvolvement {
|
|
|
238
238
|
startedAt?: string;
|
|
239
239
|
endedAt?: string;
|
|
240
240
|
links?: ProfileInvolvementLink[];
|
|
241
|
+
/**
|
|
242
|
+
* Portable org entity identifier (Wikidata/ROR/LEI URI) written when the user
|
|
243
|
+
* picks the upstream from the resolver typeahead. Absent for free-text or
|
|
244
|
+
* one-off involvement.
|
|
245
|
+
*/
|
|
246
|
+
entityRef?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Resolved current canonical name of the durably-linked upstream, computed by
|
|
249
|
+
* the AppView at read time. Render over `upstream` when present. Absent for
|
|
250
|
+
* free-text or unresolved entries.
|
|
251
|
+
*/
|
|
252
|
+
entityName?: string;
|
|
253
|
+
location?: LocationValue | null;
|
|
254
|
+
skills?: SkillRef[];
|
|
255
|
+
/** Skill records resolved from `skills`, for display. */
|
|
256
|
+
linkedSkills?: ProfileSkill[];
|
|
241
257
|
/**
|
|
242
258
|
* True when this row is a mapped legacy `id.sifa.profile.volunteering` record
|
|
243
259
|
* (no `kind`), rendered under "Volunteering". Editing it backfills to an
|
|
@@ -238,6 +238,22 @@ interface ProfileInvolvement {
|
|
|
238
238
|
startedAt?: string;
|
|
239
239
|
endedAt?: string;
|
|
240
240
|
links?: ProfileInvolvementLink[];
|
|
241
|
+
/**
|
|
242
|
+
* Portable org entity identifier (Wikidata/ROR/LEI URI) written when the user
|
|
243
|
+
* picks the upstream from the resolver typeahead. Absent for free-text or
|
|
244
|
+
* one-off involvement.
|
|
245
|
+
*/
|
|
246
|
+
entityRef?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Resolved current canonical name of the durably-linked upstream, computed by
|
|
249
|
+
* the AppView at read time. Render over `upstream` when present. Absent for
|
|
250
|
+
* free-text or unresolved entries.
|
|
251
|
+
*/
|
|
252
|
+
entityName?: string;
|
|
253
|
+
location?: LocationValue | null;
|
|
254
|
+
skills?: SkillRef[];
|
|
255
|
+
/** Skill records resolved from `skills`, for display. */
|
|
256
|
+
linkedSkills?: ProfileSkill[];
|
|
241
257
|
/**
|
|
242
258
|
* True when this row is a mapped legacy `id.sifa.profile.volunteering` record
|
|
243
259
|
* (no `kind`), rendered under "Volunteering". Editing it backfills to an
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, a5 as RefreshPdsResult, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, j as CreateResult, U as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, am as VerifyExternalAccountResult, E as EndorsementInput, a4 as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ag as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, ab as SearchFilters, ac as SearchResponse, af as SkillSearchResult, l as FeaturedProfile, ae as SimilarProfile, v as FetchSuggestionsOptions, ai as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, a3 as ReactionStatus, a2 as ReactionResult, a1 as ReactionError, aa as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult } from './keys-
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, a5 as RefreshPdsResult, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, j as CreateResult, U as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, am as VerifyExternalAccountResult, E as EndorsementInput, a4 as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ag as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, ab as SearchFilters, ac as SearchResponse, af as SkillSearchResult, l as FeaturedProfile, ae as SimilarProfile, v as FetchSuggestionsOptions, ai as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, a3 as ReactionStatus, a2 as ReactionResult, a1 as ReactionError, aa as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult } from './keys-BrOsePaR.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { d as Profile, v as ProfilePosition, D as SkillRef, E as ExternalAccount, S as SkillSuggestion } from './adult-content-
|
|
6
|
+
import { d as Profile, v as ProfilePosition, D as SkillRef, E as ExternalAccount, S as SkillSuggestion } from './adult-content-B6QylaCW.js';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.js';
|
|
8
8
|
|
|
9
9
|
interface SifaProviderProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-
|
|
2
|
-
import { d as Profile, v as ProfilePosition, D as SkillRef } from './adult-content-
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-BrOsePaR.js';
|
|
2
|
+
import { d as Profile, v as ProfilePosition, D as SkillRef } from './adult-content-B6QylaCW.js';
|
|
3
3
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-D2ZV8Eaj.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, a5 as RefreshPdsResult, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, j as CreateResult, U as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, am as VerifyExternalAccountResult, E as EndorsementInput, a4 as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ag as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, ab as SearchFilters, ac as SearchResponse, af as SkillSearchResult, l as FeaturedProfile, ae as SimilarProfile, v as FetchSuggestionsOptions, ai as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, a3 as ReactionStatus, a2 as ReactionResult, a1 as ReactionError, aa as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult } from './keys-
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, a5 as RefreshPdsResult, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, j as CreateResult, U as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, am as VerifyExternalAccountResult, E as EndorsementInput, a4 as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ag as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, ab as SearchFilters, ac as SearchResponse, af as SkillSearchResult, l as FeaturedProfile, ae as SimilarProfile, v as FetchSuggestionsOptions, ai as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, a3 as ReactionStatus, a2 as ReactionResult, a1 as ReactionError, aa as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult } from './keys-9usqNSXo.cjs';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { d as Profile, v as ProfilePosition, D as SkillRef, E as ExternalAccount, S as SkillSuggestion } from './adult-content-
|
|
6
|
+
import { d as Profile, v as ProfilePosition, D as SkillRef, E as ExternalAccount, S as SkillSuggestion } from './adult-content-B6QylaCW.cjs';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.cjs';
|
|
8
8
|
|
|
9
9
|
interface SifaProviderProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-
|
|
2
|
-
import { d as Profile, v as ProfilePosition, D as SkillRef } from './adult-content-
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-9usqNSXo.cjs';
|
|
2
|
+
import { d as Profile, v as ProfilePosition, D as SkillRef } from './adult-content-B6QylaCW.cjs';
|
|
3
3
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-D2ZV8Eaj.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -1538,6 +1538,82 @@ function formatCompanyName(name) {
|
|
|
1538
1538
|
}).join("");
|
|
1539
1539
|
}
|
|
1540
1540
|
|
|
1541
|
+
// src/format/normalize-legal-form.ts
|
|
1542
|
+
var CANONICAL_LEGAL_FORMS = {
|
|
1543
|
+
llc: "LLC",
|
|
1544
|
+
inc: "Inc",
|
|
1545
|
+
ltd: "Ltd",
|
|
1546
|
+
ltda: "Ltda",
|
|
1547
|
+
corp: "Corp",
|
|
1548
|
+
co: "Co",
|
|
1549
|
+
plc: "PLC",
|
|
1550
|
+
llp: "LLP",
|
|
1551
|
+
lp: "LP",
|
|
1552
|
+
gmbh: "GmbH",
|
|
1553
|
+
ag: "AG",
|
|
1554
|
+
ab: "AB",
|
|
1555
|
+
as: "AS",
|
|
1556
|
+
aps: "ApS",
|
|
1557
|
+
oy: "Oy",
|
|
1558
|
+
oyj: "Oyj",
|
|
1559
|
+
nv: "NV",
|
|
1560
|
+
bv: "BV",
|
|
1561
|
+
sa: "SA",
|
|
1562
|
+
sas: "SAS",
|
|
1563
|
+
sarl: "SARL",
|
|
1564
|
+
kk: "KK",
|
|
1565
|
+
sl: "SL",
|
|
1566
|
+
pty: "Pty"
|
|
1567
|
+
};
|
|
1568
|
+
var AMBIGUOUS_WHEN_LEADING = /* @__PURE__ */ new Set(["as"]);
|
|
1569
|
+
function recase(token, canonical) {
|
|
1570
|
+
let li = 0;
|
|
1571
|
+
let out = "";
|
|
1572
|
+
for (const ch of token) {
|
|
1573
|
+
if (/[A-Za-z]/.test(ch)) {
|
|
1574
|
+
out += canonical.charAt(li);
|
|
1575
|
+
li += 1;
|
|
1576
|
+
} else {
|
|
1577
|
+
out += ch;
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
return out;
|
|
1581
|
+
}
|
|
1582
|
+
function normalizeToken(token, isLeading) {
|
|
1583
|
+
const letters = token.replace(/\./g, "");
|
|
1584
|
+
if (!/^[A-Za-z]+$/.test(letters)) return token;
|
|
1585
|
+
const key = letters.toLowerCase();
|
|
1586
|
+
const canonical = CANONICAL_LEGAL_FORMS[key];
|
|
1587
|
+
if (!canonical) return token;
|
|
1588
|
+
if (isLeading && AMBIGUOUS_WHEN_LEADING.has(key)) return token;
|
|
1589
|
+
return recase(token, canonical);
|
|
1590
|
+
}
|
|
1591
|
+
function normalizeLegalForm(name) {
|
|
1592
|
+
if (!name || hasNonAsciiLetter(name)) return name;
|
|
1593
|
+
const parts = name.split(/(\s+)/);
|
|
1594
|
+
const wordIndices = [];
|
|
1595
|
+
for (let i = 0; i < parts.length; i += 1) {
|
|
1596
|
+
const part = parts[i];
|
|
1597
|
+
if (part !== void 0 && part.length > 0 && !/^\s+$/.test(part)) wordIndices.push(i);
|
|
1598
|
+
}
|
|
1599
|
+
if (wordIndices.length === 0) return name;
|
|
1600
|
+
const firstIdx = wordIndices[0];
|
|
1601
|
+
const lastIdx = wordIndices[wordIndices.length - 1];
|
|
1602
|
+
if (firstIdx === void 0 || lastIdx === void 0) return name;
|
|
1603
|
+
const candidateIndices = firstIdx === lastIdx ? [firstIdx] : [firstIdx, lastIdx];
|
|
1604
|
+
let changed = false;
|
|
1605
|
+
for (const idx of candidateIndices) {
|
|
1606
|
+
const original = parts[idx];
|
|
1607
|
+
if (original === void 0) continue;
|
|
1608
|
+
const rewritten = normalizeToken(original, idx === firstIdx);
|
|
1609
|
+
if (rewritten !== original) {
|
|
1610
|
+
parts[idx] = rewritten;
|
|
1611
|
+
changed = true;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
return changed ? parts.join("") : name;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1541
1617
|
// src/format/normalize-company-key.ts
|
|
1542
1618
|
var COMBINING_MARKS = /[\u0300-\u036f]/g;
|
|
1543
1619
|
function normalizeCompanyKey(name) {
|
|
@@ -2907,6 +2983,13 @@ var ProfileInvolvementRecordSchema = zod.z.object({
|
|
|
2907
2983
|
startedAt: partialDateSchema.optional(),
|
|
2908
2984
|
endedAt: partialDateSchema.optional(),
|
|
2909
2985
|
links: zod.z.array(ArtifactLinkSchema).max(50).optional(),
|
|
2986
|
+
// Portable org entity identifier (Wikidata/ROR/LEI URI) from the resolver
|
|
2987
|
+
// typeahead, constrained to http(s) so a script scheme is never a valid ref.
|
|
2988
|
+
entityRef: zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional(),
|
|
2989
|
+
// community.lexicon.location.address — validated at the app layer.
|
|
2990
|
+
location: zod.z.unknown().optional(),
|
|
2991
|
+
// id.sifa.defs#skillRef references (at-uri to a skill record in the same repo).
|
|
2992
|
+
skills: zod.z.array(zod.z.object({ uri: zod.z.string() })).max(50).optional(),
|
|
2910
2993
|
labels: selfLabelsSchema.optional(),
|
|
2911
2994
|
createdAt: datetimeSchema
|
|
2912
2995
|
}).passthrough();
|
|
@@ -3032,7 +3115,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
3032
3115
|
});
|
|
3033
3116
|
|
|
3034
3117
|
// src/index.ts
|
|
3035
|
-
var SIFA_SDK_VERSION = "0.11.
|
|
3118
|
+
var SIFA_SDK_VERSION = "0.11.27";
|
|
3036
3119
|
|
|
3037
3120
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
3038
3121
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|
|
@@ -3190,6 +3273,7 @@ exports.makeGraphFollowRecordSchema = makeGraphFollowRecordSchema;
|
|
|
3190
3273
|
exports.maxGraphemes = maxGraphemes;
|
|
3191
3274
|
exports.meetsContrastAA = meetsContrastAA;
|
|
3192
3275
|
exports.normalizeCompanyKey = normalizeCompanyKey;
|
|
3276
|
+
exports.normalizeLegalForm = normalizeLegalForm;
|
|
3193
3277
|
exports.normalizeOpenTo = normalizeOpenTo;
|
|
3194
3278
|
exports.normalizePlatformId = normalizePlatformId;
|
|
3195
3279
|
exports.normalizePresentationMode = normalizePresentationMode;
|