@singi-labs/sifa-sdk 0.11.29 → 0.11.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.
@@ -114,7 +114,19 @@ interface ProfileLocation {
114
114
  interface ProfileCertification {
115
115
  rkey: string;
116
116
  name: string;
117
- issuingOrg: string;
117
+ /**
118
+ * Issuing organization. The write contract names this field `authority`
119
+ * everywhere (record schema, DB column, PDS record); the AppView read view
120
+ * emits `authority` as the canonical field (#249). Optional during the
121
+ * deprecation window while consumers migrate off the legacy `issuingOrg`
122
+ * alias below.
123
+ */
124
+ authority?: string;
125
+ /**
126
+ * @deprecated Legacy read-view alias for {@link authority} (#249). Carries the
127
+ * same value; will be dropped once web + SDK consumers read `authority`.
128
+ */
129
+ issuingOrg?: string;
118
130
  /**
119
131
  * Portable org entity identifier (Wikidata/ROR/LEI URI) linking the issuing
120
132
  * organization to a resolved entity (#159/#241). Absent for free-text entries.
@@ -123,9 +135,9 @@ interface ProfileCertification {
123
135
  entityRef?: string;
124
136
  /**
125
137
  * Resolved current canonical name of the durably-linked issuing organization
126
- * (#252), computed by the AppView at read time. Render this over `issuingOrg`
138
+ * (#252), computed by the AppView at read time. Render this over `authority`
127
139
  * for a linked entry. Absent for free-text or unresolved entries (fall back to
128
- * `issuingOrg`).
140
+ * `authority`).
129
141
  */
130
142
  entityName?: string;
131
143
  issueDate?: string;
@@ -114,7 +114,19 @@ interface ProfileLocation {
114
114
  interface ProfileCertification {
115
115
  rkey: string;
116
116
  name: string;
117
- issuingOrg: string;
117
+ /**
118
+ * Issuing organization. The write contract names this field `authority`
119
+ * everywhere (record schema, DB column, PDS record); the AppView read view
120
+ * emits `authority` as the canonical field (#249). Optional during the
121
+ * deprecation window while consumers migrate off the legacy `issuingOrg`
122
+ * alias below.
123
+ */
124
+ authority?: string;
125
+ /**
126
+ * @deprecated Legacy read-view alias for {@link authority} (#249). Carries the
127
+ * same value; will be dropped once web + SDK consumers read `authority`.
128
+ */
129
+ issuingOrg?: string;
118
130
  /**
119
131
  * Portable org entity identifier (Wikidata/ROR/LEI URI) linking the issuing
120
132
  * organization to a resolved entity (#159/#241). Absent for free-text entries.
@@ -123,9 +135,9 @@ interface ProfileCertification {
123
135
  entityRef?: string;
124
136
  /**
125
137
  * Resolved current canonical name of the durably-linked issuing organization
126
- * (#252), computed by the AppView at read time. Render this over `issuingOrg`
138
+ * (#252), computed by the AppView at read time. Render this over `authority`
127
139
  * for a linked entry. Absent for free-text or unresolved entries (fall back to
128
- * `issuingOrg`).
140
+ * `authority`).
129
141
  */
130
142
  entityName?: string;
131
143
  issueDate?: string;
@@ -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-CA2WLIM6.cjs';
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-B9_KrPw_.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-C34UkvI6.cjs';
6
+ import { d as Profile, v as ProfilePosition, D as SkillRef, E as ExternalAccount, S as SkillSuggestion } from './adult-content-BO4nea-m.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-BAdZNl3S.js';
2
- import { d as Profile, v as ProfilePosition, D as SkillRef } from './adult-content-C34UkvI6.js';
1
+ import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-Cy0T900D.js';
2
+ import { d as Profile, v as ProfilePosition, D as SkillRef } from './adult-content-BO4nea-m.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,5 +1,5 @@
1
- import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-CA2WLIM6.cjs';
2
- import { d as Profile, v as ProfilePosition, D as SkillRef } from './adult-content-C34UkvI6.cjs';
1
+ import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './keys-B9_KrPw_.cjs';
2
+ import { d as Profile, v as ProfilePosition, D as SkillRef } from './adult-content-BO4nea-m.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
  /**
@@ -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-BAdZNl3S.js';
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-Cy0T900D.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-C34UkvI6.js';
6
+ import { d as Profile, v as ProfilePosition, D as SkillRef, E as ExternalAccount, S as SkillSuggestion } from './adult-content-BO4nea-m.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 {
package/dist/index.cjs CHANGED
@@ -1565,7 +1565,6 @@ var CANONICAL_LEGAL_FORMS = {
1565
1565
  sl: "SL",
1566
1566
  pty: "Pty"
1567
1567
  };
1568
- var AMBIGUOUS_WHEN_LEADING = /* @__PURE__ */ new Set(["as"]);
1569
1568
  function recase(token, canonical) {
1570
1569
  let li = 0;
1571
1570
  let out = "";
@@ -1579,13 +1578,12 @@ function recase(token, canonical) {
1579
1578
  }
1580
1579
  return out;
1581
1580
  }
1582
- function normalizeToken(token, isLeading) {
1581
+ function normalizeToken(token) {
1583
1582
  const letters = token.replace(/\./g, "");
1584
1583
  if (!/^[A-Za-z]+$/.test(letters)) return token;
1585
1584
  const key = letters.toLowerCase();
1586
1585
  const canonical = CANONICAL_LEGAL_FORMS[key];
1587
1586
  if (typeof canonical !== "string") return token;
1588
- if (isLeading && AMBIGUOUS_WHEN_LEADING.has(key)) return token;
1589
1587
  return recase(token, canonical);
1590
1588
  }
1591
1589
  function normalizeLegalForm(name) {
@@ -1597,21 +1595,14 @@ function normalizeLegalForm(name) {
1597
1595
  if (part !== void 0 && part.length > 0 && !/^\s+$/.test(part)) wordIndices.push(i);
1598
1596
  }
1599
1597
  if (wordIndices.length === 0) return name;
1600
- const firstIdx = wordIndices[0];
1601
1598
  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;
1599
+ if (lastIdx === void 0) return name;
1600
+ const original = parts[lastIdx];
1601
+ if (original === void 0) return name;
1602
+ const rewritten = normalizeToken(original);
1603
+ if (rewritten === original) return name;
1604
+ parts[lastIdx] = rewritten;
1605
+ return parts.join("");
1615
1606
  }
1616
1607
 
1617
1608
  // src/format/normalize-company-key.ts
@@ -2912,8 +2903,10 @@ var ProfileCertificationRecordSchema = zod.z.object({
2912
2903
  entityRef: zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional(),
2913
2904
  credentialId: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
2914
2905
  credentialUrl: uriSchema.optional(),
2915
- issuedAt: datetimeSchema.optional(),
2916
- expiresAt: datetimeSchema.optional(),
2906
+ // Freeform YYYY-MM or YYYY-MM-DD (not a strict datetime) so partial dates
2907
+ // and LinkedIn-importer writes are accepted. See sifa-lexicons#256.
2908
+ issuedAt: zod.z.string().optional(),
2909
+ expiresAt: zod.z.string().optional(),
2917
2910
  labels: selfLabelsSchema.optional(),
2918
2911
  createdAt: datetimeSchema
2919
2912
  });
@@ -2928,9 +2921,10 @@ var ProfileCourseRecordSchema = zod.z.object({
2928
2921
  // AT-URI of the associated id.sifa.profile.certification record. Plain
2929
2922
  // at-uri (not a strongRef) so the link tracks the live certification.
2930
2923
  credential: atUriSchema.optional(),
2931
- // Date the course was completed. Stored as an RFC 3339 datetime to match the
2932
- // other profile date fields; the editor collects month granularity (YYYY-MM).
2933
- completedAt: datetimeSchema.optional(),
2924
+ // Date the course was completed. Freeform YYYY-MM or YYYY-MM-DD (not a strict
2925
+ // datetime) so month-granularity and partial dates are accepted. See
2926
+ // sifa-lexicons#256.
2927
+ completedAt: zod.z.string().optional(),
2934
2928
  createdAt: datetimeSchema
2935
2929
  });
2936
2930
  var ProfileEducationRecordSchema = zod.z.object({
@@ -2945,8 +2939,10 @@ var ProfileEducationRecordSchema = zod.z.object({
2945
2939
  activities: zod.z.string().refine(maxGraphemes(1e3)).max(1e4).optional(),
2946
2940
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
2947
2941
  location: zod.z.unknown().optional(),
2948
- startedAt: datetimeSchema.optional(),
2949
- endedAt: datetimeSchema.optional(),
2942
+ // Freeform YYYY-MM or YYYY-MM-DD (not a strict datetime) so partial dates
2943
+ // and LinkedIn-importer writes are accepted. See sifa-lexicons#256.
2944
+ startedAt: zod.z.string().optional(),
2945
+ endedAt: zod.z.string().optional(),
2950
2946
  labels: selfLabelsSchema.optional(),
2951
2947
  createdAt: datetimeSchema
2952
2948
  });
@@ -2966,7 +2962,9 @@ var ProfileHonorRecordSchema = zod.z.object({
2966
2962
  // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).
2967
2963
  entityRef: zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional(),
2968
2964
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
2969
- awardedAt: datetimeSchema.optional(),
2965
+ // Freeform YYYY-MM or YYYY-MM-DD (not a strict datetime) so partial dates
2966
+ // and LinkedIn-importer writes are accepted. See sifa-lexicons#256.
2967
+ awardedAt: zod.z.string().optional(),
2970
2968
  createdAt: datetimeSchema
2971
2969
  });
2972
2970
  var PROFILE_INVOLVEMENT_NSID = "id.sifa.profile.involvement";
@@ -3012,8 +3010,10 @@ var ProfilePositionRecordSchema = zod.z.object({
3012
3010
  employmentType: zod.z.string().optional(),
3013
3011
  workplaceType: zod.z.string().optional(),
3014
3012
  location: zod.z.unknown().optional(),
3015
- startedAt: datetimeSchema,
3016
- endedAt: datetimeSchema.optional(),
3013
+ // Freeform YYYY-MM or YYYY-MM-DD (not a strict datetime) so partial dates
3014
+ // and LinkedIn-importer writes are accepted. See sifa-lexicons#256.
3015
+ startedAt: zod.z.string(),
3016
+ endedAt: zod.z.string().optional(),
3017
3017
  skills: zod.z.array(strongRefSchema).max(50).optional(),
3018
3018
  labels: selfLabelsSchema.optional(),
3019
3019
  createdAt: datetimeSchema
@@ -3065,8 +3065,10 @@ var ProfileProjectRecordSchema = zod.z.object({
3065
3065
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
3066
3066
  url: uriSchema.optional(),
3067
3067
  position: strongRefSchema.optional(),
3068
- startedAt: datetimeSchema.optional(),
3069
- endedAt: datetimeSchema.optional(),
3068
+ // Freeform YYYY-MM or YYYY-MM-DD (not a strict datetime) so partial dates
3069
+ // and LinkedIn-importer writes are accepted. See sifa-lexicons#256.
3070
+ startedAt: zod.z.string().optional(),
3071
+ endedAt: zod.z.string().optional(),
3070
3072
  labels: selfLabelsSchema.optional(),
3071
3073
  createdAt: datetimeSchema
3072
3074
  });
@@ -3081,7 +3083,9 @@ var ProfilePublicationRecordSchema = zod.z.object({
3081
3083
  url: uriSchema.optional(),
3082
3084
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
3083
3085
  authors: zod.z.array(PublicationAuthorSchema).max(50).optional(),
3084
- publishedAt: datetimeSchema.optional(),
3086
+ // Freeform YYYY-MM or YYYY-MM-DD (not a strict datetime) so partial dates
3087
+ // and LinkedIn-importer writes are accepted. See sifa-lexicons#256.
3088
+ publishedAt: zod.z.string().optional(),
3085
3089
  createdAt: datetimeSchema
3086
3090
  });
3087
3091
  var ProfileSelfRecordSchema = zod.z.object({
@@ -3112,13 +3116,15 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
3112
3116
  role: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
3113
3117
  cause: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
3114
3118
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
3115
- startedAt: datetimeSchema.optional(),
3116
- endedAt: datetimeSchema.optional(),
3119
+ // Freeform YYYY-MM or YYYY-MM-DD (not a strict datetime) so partial dates
3120
+ // and LinkedIn-importer writes are accepted. See sifa-lexicons#256.
3121
+ startedAt: zod.z.string().optional(),
3122
+ endedAt: zod.z.string().optional(),
3117
3123
  createdAt: datetimeSchema
3118
3124
  });
3119
3125
 
3120
3126
  // src/index.ts
3121
- var SIFA_SDK_VERSION = "0.11.29";
3127
+ var SIFA_SDK_VERSION = "0.11.31";
3122
3128
 
3123
3129
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
3124
3130
  exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;