@singi-labs/sifa-sdk 0.11.30 → 0.11.32

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
@@ -2719,6 +2719,7 @@ function maxGraphemes(max) {
2719
2719
  }
2720
2720
  var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
2721
2721
  var datetimeSchema = zod.z.string().datetime({ offset: true });
2722
+ var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
2722
2723
  var atUriSchema = zod.z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
2723
2724
  var cidSchema = zod.z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
2724
2725
  var languageTagSchema = zod.z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
@@ -2903,8 +2904,8 @@ var ProfileCertificationRecordSchema = zod.z.object({
2903
2904
  entityRef: zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional(),
2904
2905
  credentialId: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
2905
2906
  credentialUrl: uriSchema.optional(),
2906
- issuedAt: datetimeSchema.optional(),
2907
- expiresAt: datetimeSchema.optional(),
2907
+ issuedAt: partialDateSchema.optional(),
2908
+ expiresAt: partialDateSchema.optional(),
2908
2909
  labels: selfLabelsSchema.optional(),
2909
2910
  createdAt: datetimeSchema
2910
2911
  });
@@ -2919,9 +2920,7 @@ var ProfileCourseRecordSchema = zod.z.object({
2919
2920
  // AT-URI of the associated id.sifa.profile.certification record. Plain
2920
2921
  // at-uri (not a strongRef) so the link tracks the live certification.
2921
2922
  credential: atUriSchema.optional(),
2922
- // Date the course was completed. Stored as an RFC 3339 datetime to match the
2923
- // other profile date fields; the editor collects month granularity (YYYY-MM).
2924
- completedAt: datetimeSchema.optional(),
2923
+ completedAt: partialDateSchema.optional(),
2925
2924
  createdAt: datetimeSchema
2926
2925
  });
2927
2926
  var ProfileEducationRecordSchema = zod.z.object({
@@ -2936,8 +2935,8 @@ var ProfileEducationRecordSchema = zod.z.object({
2936
2935
  activities: zod.z.string().refine(maxGraphemes(1e3)).max(1e4).optional(),
2937
2936
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
2938
2937
  location: zod.z.unknown().optional(),
2939
- startedAt: datetimeSchema.optional(),
2940
- endedAt: datetimeSchema.optional(),
2938
+ startedAt: partialDateSchema.optional(),
2939
+ endedAt: partialDateSchema.optional(),
2941
2940
  labels: selfLabelsSchema.optional(),
2942
2941
  createdAt: datetimeSchema
2943
2942
  });
@@ -2957,11 +2956,10 @@ var ProfileHonorRecordSchema = zod.z.object({
2957
2956
  // Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).
2958
2957
  entityRef: zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional(),
2959
2958
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
2960
- awardedAt: datetimeSchema.optional(),
2959
+ awardedAt: partialDateSchema.optional(),
2961
2960
  createdAt: datetimeSchema
2962
2961
  });
2963
2962
  var PROFILE_INVOLVEMENT_NSID = "id.sifa.profile.involvement";
2964
- var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
2965
2963
  var ArtifactLinkSchema = zod.z.object({
2966
2964
  url: uriSchema,
2967
2965
  kind: zod.z.string().optional(),
@@ -3003,8 +3001,8 @@ var ProfilePositionRecordSchema = zod.z.object({
3003
3001
  employmentType: zod.z.string().optional(),
3004
3002
  workplaceType: zod.z.string().optional(),
3005
3003
  location: zod.z.unknown().optional(),
3006
- startedAt: datetimeSchema,
3007
- endedAt: datetimeSchema.optional(),
3004
+ startedAt: partialDateSchema,
3005
+ endedAt: partialDateSchema.optional(),
3008
3006
  skills: zod.z.array(strongRefSchema).max(50).optional(),
3009
3007
  labels: selfLabelsSchema.optional(),
3010
3008
  createdAt: datetimeSchema
@@ -3056,8 +3054,8 @@ var ProfileProjectRecordSchema = zod.z.object({
3056
3054
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
3057
3055
  url: uriSchema.optional(),
3058
3056
  position: strongRefSchema.optional(),
3059
- startedAt: datetimeSchema.optional(),
3060
- endedAt: datetimeSchema.optional(),
3057
+ startedAt: partialDateSchema.optional(),
3058
+ endedAt: partialDateSchema.optional(),
3061
3059
  labels: selfLabelsSchema.optional(),
3062
3060
  createdAt: datetimeSchema
3063
3061
  });
@@ -3072,7 +3070,7 @@ var ProfilePublicationRecordSchema = zod.z.object({
3072
3070
  url: uriSchema.optional(),
3073
3071
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
3074
3072
  authors: zod.z.array(PublicationAuthorSchema).max(50).optional(),
3075
- publishedAt: datetimeSchema.optional(),
3073
+ publishedAt: partialDateSchema.optional(),
3076
3074
  createdAt: datetimeSchema
3077
3075
  });
3078
3076
  var ProfileSelfRecordSchema = zod.z.object({
@@ -3103,13 +3101,13 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
3103
3101
  role: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
3104
3102
  cause: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
3105
3103
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
3106
- startedAt: datetimeSchema.optional(),
3107
- endedAt: datetimeSchema.optional(),
3104
+ startedAt: partialDateSchema.optional(),
3105
+ endedAt: partialDateSchema.optional(),
3108
3106
  createdAt: datetimeSchema
3109
3107
  });
3110
3108
 
3111
3109
  // src/index.ts
3112
- var SIFA_SDK_VERSION = "0.11.30";
3110
+ var SIFA_SDK_VERSION = "0.11.32";
3113
3111
 
3114
3112
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
3115
3113
  exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
@@ -3278,6 +3276,7 @@ exports.openToValueToToken = openToValueToToken;
3278
3276
  exports.parseIntendedAudiences = parseIntendedAudiences;
3279
3277
  exports.parseLocationString = parseLocationString;
3280
3278
  exports.parsePresentationDuration = parsePresentationDuration;
3279
+ exports.partialDateSchema = partialDateSchema;
3281
3280
  exports.pdsProviderFromApi = pdsProviderFromApi;
3282
3281
  exports.pickPrimaryPosition = pickPrimaryPosition;
3283
3282
  exports.presentationCsvRowToRecord = presentationCsvRowToRecord;