@singi-labs/sifa-sdk 0.23.0 → 0.23.1

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 (57) hide show
  1. package/dist/badge/index.cjs.map +1 -1
  2. package/dist/{follow-profile-DGZzB5iM.d.ts → follow-profile-CCL1tT1x.d.ts} +1 -1
  3. package/dist/{follow-profile-BG_6eZwW.d.cts → follow-profile-RijPgyp-.d.cts} +1 -1
  4. package/dist/{index-BR8LDBo1.d.ts → index-Bcy443Qi.d.ts} +1 -1
  5. package/dist/{index-BKvI1Bvg.d.cts → index-Ck5zdubP.d.cts} +1 -1
  6. package/dist/index.cjs +25 -6
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +9 -9
  9. package/dist/index.d.ts +9 -9
  10. package/dist/index.js +15 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/jsonld/index.d.cts +2 -2
  13. package/dist/jsonld/index.d.ts +2 -2
  14. package/dist/{network-map-CMyjk6jc.d.ts → network-map-BGO1feWW.d.ts} +4 -4
  15. package/dist/{network-map-CqLYThmY.d.cts → network-map-DBiloRce.d.cts} +4 -4
  16. package/dist/{profile-summary-Sv6rqQbx.d.ts → profile-summary-5jNVFUR9.d.ts} +1 -1
  17. package/dist/{profile-summary-CoTNGDpt.d.cts → profile-summary-DJVnLbFV.d.cts} +1 -1
  18. package/dist/publishing/index.cjs +15 -5
  19. package/dist/publishing/index.cjs.map +1 -1
  20. package/dist/query/client.js +20 -1
  21. package/dist/query/client.js.map +1 -1
  22. package/dist/query/fetchers/index.cjs +35 -6
  23. package/dist/query/fetchers/index.cjs.map +1 -1
  24. package/dist/query/fetchers/index.d.cts +8 -8
  25. package/dist/query/fetchers/index.d.ts +8 -8
  26. package/dist/query/hooks/index.cjs +35 -6
  27. package/dist/query/hooks/index.cjs.map +1 -1
  28. package/dist/query/hooks/index.d.cts +6 -6
  29. package/dist/query/hooks/index.d.ts +6 -6
  30. package/dist/query/index.cjs +20 -1
  31. package/dist/query/index.cjs.map +1 -1
  32. package/dist/query/index.d.cts +11 -11
  33. package/dist/query/index.d.ts +11 -11
  34. package/dist/query/index.js.map +1 -1
  35. package/dist/resume/index.d.cts +2 -2
  36. package/dist/resume/index.d.ts +2 -2
  37. package/dist/schemas/index.cjs +24 -5
  38. package/dist/schemas/index.cjs.map +1 -1
  39. package/dist/schemas/index.d.cts +2 -2
  40. package/dist/schemas/index.d.ts +2 -2
  41. package/dist/schemas/index.js +14 -0
  42. package/dist/schemas/index.js.map +1 -1
  43. package/dist/schemas/shared.js +18 -5
  44. package/dist/schemas/shared.js.map +1 -1
  45. package/dist/schemas/write/index.cjs +15 -5
  46. package/dist/schemas/write/index.cjs.map +1 -1
  47. package/dist/testing/index.d.cts +2 -2
  48. package/dist/testing/index.d.ts +2 -2
  49. package/dist/{types-CcVRIHcX.d.ts → types-4MZHuQif.d.cts} +15 -3
  50. package/dist/{types-BC4A9-W9.d.cts → types-DJrmm7p0.d.ts} +15 -3
  51. package/dist/{use-user-settings-CI9eZQpp.d.ts → use-user-settings-BfGwI4x3.d.ts} +4 -4
  52. package/dist/{use-user-settings-CfQKSBAC.d.cts → use-user-settings-g8ATc9zm.d.cts} +4 -4
  53. package/dist/{user-settings-C65eFsPR.d.ts → user-settings-C3_y8_8T.d.ts} +4 -4
  54. package/dist/{user-settings-BVFxLAOa.d.cts → user-settings-CuqhXuTE.d.cts} +4 -4
  55. package/dist/{verification-providers-DQLIOSCK.d.cts → verification-providers-Dq6ni6e-.d.cts} +52 -1
  56. package/dist/{verification-providers-DQLIOSCK.d.ts → verification-providers-Dq6ni6e-.d.ts} +52 -1
  57. package/package.json +4 -1
@@ -94,9 +94,16 @@ import {
94
94
  didSchema,
95
95
  externalRecordRefSchema,
96
96
  languageTagSchema,
97
+ lexiconString,
97
98
  maxBytes,
98
99
  maxGraphemes,
100
+ PROFILE_TEXT_LIMITS,
99
101
  partialDateSchema,
102
+ profileAboutSchema,
103
+ profileDisplayNameSchema,
104
+ profileHeadlineSchema,
105
+ profileNameSchema,
106
+ profilePronounsSchema,
100
107
  selfLabelsSchema,
101
108
  skillRefSchema,
102
109
  strongRefSchema,
@@ -140,6 +147,7 @@ export {
140
147
  OrgProfileRecordSchema,
141
148
  PROFILE_INVESTMENT_NSID,
142
149
  PROFILE_INVOLVEMENT_NSID,
150
+ PROFILE_TEXT_LIMITS,
143
151
  PresentationDurationSchema,
144
152
  PresentationLinkSchema,
145
153
  ProfileCertificationRecordSchema,
@@ -171,10 +179,16 @@ export {
171
179
  encodeFeedCursor,
172
180
  externalRecordRefSchema,
173
181
  languageTagSchema,
182
+ lexiconString,
174
183
  makeGraphFollowRecordSchema,
175
184
  maxBytes,
176
185
  maxGraphemes,
177
186
  partialDateSchema,
187
+ profileAboutSchema,
188
+ profileDisplayNameSchema,
189
+ profileHeadlineSchema,
190
+ profileNameSchema,
191
+ profilePronounsSchema,
178
192
  resolveEmploymentVerification,
179
193
  selfLabelsSchema,
180
194
  skillRefSchema,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/index.ts"],"sourcesContent":["export { BlobRefSchema, type BlobRef } from './blob-ref.js';\nexport {\n EndorsementConfirmationRecordSchema,\n type EndorsementConfirmationRecord,\n} from './endorsement-confirmation.js';\nexport {\n EntitySearchResultSchema,\n EntitySearchResponseSchema,\n EntitySelectRequestSchema,\n EntitySelectResponseSchema,\n EntityImportSearchResponseSchema,\n EntityResolveDomainRequestSchema,\n EntityResolveDomainResponseSchema,\n EntityMintDomainResponseSchema,\n type EntitySearchResult,\n type EntitySearchResponse,\n type EntitySelectRequest,\n type EntitySelectResponse,\n type EntityImportSearchResponse,\n type EntityResolveDomainRequest,\n type EntityResolveDomainResponse,\n type EntityMintDomainResponse,\n} from './entity.js';\nexport { EndorsementRecordSchema, type EndorsementRecord } from './endorsement.js';\nexport {\n GermDeclarationRecordSchema,\n GERM_SHOW_BUTTON_TO_VALUES,\n type GermDeclarationRecord,\n type GermShowButtonTo,\n} from './germ-declaration.js';\nexport {\n ConfirmationRecordSchema,\n CONFIRMATION_RELATIONS,\n type ConfirmationRecord,\n type ConfirmationRelation,\n} from './confirmation.js';\nexport { OrgProfileRecordSchema, type OrgProfileRecord } from './org-profile.js';\nexport {\n OrgEmploymentAttestationRecordSchema,\n type OrgEmploymentAttestationRecord,\n} from './org-employment-attestation.js';\nexport {\n EmploymentVerificationRecordSchema,\n EMPLOYMENT_STATUS_TOKENS,\n VERIFICATION_METHOD_TOKENS,\n resolveEmploymentVerification,\n type EmploymentVerificationRecord,\n type EmploymentVerificationResolution,\n type ResolveEmploymentVerificationOptions,\n} from './employment-verification.js';\nexport {\n GraphFollowRecordSchema,\n makeGraphFollowRecordSchema,\n type GraphFollowRecord,\n} from './graph-follow.js';\nexport {\n FEATURE_FLAGS,\n FeatureAllowlistEntrySchema,\n FollowProfilePageSchema,\n FollowProfileSchema,\n type FeatureAllowlistEntry,\n type FeatureFlag,\n type FollowProfileItem,\n type FollowProfilePage,\n} from './follow-profile.js';\nexport {\n AtmosphereFeedItemSchema,\n FeedActorSchema,\n FollowFeedItemSchema,\n FollowFeedPageSchema,\n SifaFeedItemSchema,\n decodeFeedCursor,\n encodeFeedCursor,\n type AtmosphereFeedItem,\n type FeedActor,\n type FeedCursor,\n type FollowFeedItem,\n type FollowFeedPage,\n type SifaFeedItem,\n} from './feed.js';\nexport {\n ProfileCertificationRecordSchema,\n type ProfileCertificationRecord,\n} from './profile-certification.js';\nexport { ProfileCourseRecordSchema, type ProfileCourseRecord } from './profile-course.js';\nexport { ProfileEducationRecordSchema, type ProfileEducationRecord } from './profile-education.js';\nexport {\n ProfileExternalAccountRecordSchema,\n type ProfileExternalAccountRecord,\n} from './profile-external-account.js';\nexport { ProfileHonorRecordSchema, type ProfileHonorRecord } from './profile-honor.js';\nexport {\n ArtifactLinkSchema,\n PROFILE_INVOLVEMENT_NSID,\n ProfileInvolvementRecordSchema,\n type ArtifactLink,\n type ProfileInvolvementRecord,\n} from './profile-involvement.js';\nexport { ProfileLanguageRecordSchema, type ProfileLanguageRecord } from './profile-language.js';\nexport { ProfilePositionRecordSchema, type ProfilePositionRecord } from './profile-position.js';\nexport {\n PresentationDurationSchema,\n PresentationLinkSchema,\n ProfilePresentationRecordSchema,\n type PresentationDuration,\n type PresentationLink,\n type ProfilePresentationRecord,\n} from './profile-presentation.js';\nexport {\n ProfilePresentationDeliveryRecordSchema,\n type ProfilePresentationDeliveryRecord,\n} from './profile-presentation-delivery.js';\nexport { ProfileProjectRecordSchema, type ProfileProjectRecord } from './profile-project.js';\nexport {\n ProfilePublicationRecordSchema,\n PublicationAuthorSchema,\n RelatedIdentifierSchema,\n type ProfilePublicationRecord,\n type PublicationAuthor,\n} from './profile-publication.js';\nexport { ProfileSelfRecordSchema, type ProfileSelfRecord } from './profile-self.js';\nexport { ProfileSkillRecordSchema, type ProfileSkillRecord } from './profile-skill.js';\nexport {\n ProfileVolunteeringRecordSchema,\n type ProfileVolunteeringRecord,\n} from './profile-volunteering.js';\nexport {\n agentRefSchema,\n atUriSchema,\n cidSchema,\n datetimeSchema,\n didSchema,\n externalRecordRefSchema,\n languageTagSchema,\n maxBytes,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n skillRefSchema,\n strongRefSchema,\n uriSchema,\n type AgentRef,\n} from './shared.js';\nexport {\n ProfileInvestmentRecordSchema,\n InvestmentAmountSchema,\n PROFILE_INVESTMENT_NSID,\n type ProfileInvestmentRecord,\n} from './profile-investment.js';\n"],"mappings":";AAAA,SAAS,qBAAmC;AAC5C;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OASK;AACP,SAAS,+BAAuD;AAChE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,8BAAqD;AAC9D;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,iCAA2D;AACpE,SAAS,oCAAiE;AAC1E;AAAA,EACE;AAAA,OAEK;AACP,SAAS,gCAAyD;AAClE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,mCAA+D;AACxE,SAAS,mCAA+D;AACxE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,kCAA6D;AACtE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,+BAAuD;AAChE,SAAS,gCAAyD;AAClE;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
1
+ {"version":3,"sources":["../../src/schemas/index.ts"],"sourcesContent":["export { BlobRefSchema, type BlobRef } from './blob-ref.js';\nexport {\n EndorsementConfirmationRecordSchema,\n type EndorsementConfirmationRecord,\n} from './endorsement-confirmation.js';\nexport {\n EntitySearchResultSchema,\n EntitySearchResponseSchema,\n EntitySelectRequestSchema,\n EntitySelectResponseSchema,\n EntityImportSearchResponseSchema,\n EntityResolveDomainRequestSchema,\n EntityResolveDomainResponseSchema,\n EntityMintDomainResponseSchema,\n type EntitySearchResult,\n type EntitySearchResponse,\n type EntitySelectRequest,\n type EntitySelectResponse,\n type EntityImportSearchResponse,\n type EntityResolveDomainRequest,\n type EntityResolveDomainResponse,\n type EntityMintDomainResponse,\n} from './entity.js';\nexport { EndorsementRecordSchema, type EndorsementRecord } from './endorsement.js';\nexport {\n GermDeclarationRecordSchema,\n GERM_SHOW_BUTTON_TO_VALUES,\n type GermDeclarationRecord,\n type GermShowButtonTo,\n} from './germ-declaration.js';\nexport {\n ConfirmationRecordSchema,\n CONFIRMATION_RELATIONS,\n type ConfirmationRecord,\n type ConfirmationRelation,\n} from './confirmation.js';\nexport { OrgProfileRecordSchema, type OrgProfileRecord } from './org-profile.js';\nexport {\n OrgEmploymentAttestationRecordSchema,\n type OrgEmploymentAttestationRecord,\n} from './org-employment-attestation.js';\nexport {\n EmploymentVerificationRecordSchema,\n EMPLOYMENT_STATUS_TOKENS,\n VERIFICATION_METHOD_TOKENS,\n resolveEmploymentVerification,\n type EmploymentVerificationRecord,\n type EmploymentVerificationResolution,\n type ResolveEmploymentVerificationOptions,\n} from './employment-verification.js';\nexport {\n GraphFollowRecordSchema,\n makeGraphFollowRecordSchema,\n type GraphFollowRecord,\n} from './graph-follow.js';\nexport {\n FEATURE_FLAGS,\n FeatureAllowlistEntrySchema,\n FollowProfilePageSchema,\n FollowProfileSchema,\n type FeatureAllowlistEntry,\n type FeatureFlag,\n type FollowProfileItem,\n type FollowProfilePage,\n} from './follow-profile.js';\nexport {\n AtmosphereFeedItemSchema,\n FeedActorSchema,\n FollowFeedItemSchema,\n FollowFeedPageSchema,\n SifaFeedItemSchema,\n decodeFeedCursor,\n encodeFeedCursor,\n type AtmosphereFeedItem,\n type FeedActor,\n type FeedCursor,\n type FollowFeedItem,\n type FollowFeedPage,\n type SifaFeedItem,\n} from './feed.js';\nexport {\n ProfileCertificationRecordSchema,\n type ProfileCertificationRecord,\n} from './profile-certification.js';\nexport { ProfileCourseRecordSchema, type ProfileCourseRecord } from './profile-course.js';\nexport { ProfileEducationRecordSchema, type ProfileEducationRecord } from './profile-education.js';\nexport {\n ProfileExternalAccountRecordSchema,\n type ProfileExternalAccountRecord,\n} from './profile-external-account.js';\nexport { ProfileHonorRecordSchema, type ProfileHonorRecord } from './profile-honor.js';\nexport {\n ArtifactLinkSchema,\n PROFILE_INVOLVEMENT_NSID,\n ProfileInvolvementRecordSchema,\n type ArtifactLink,\n type ProfileInvolvementRecord,\n} from './profile-involvement.js';\nexport { ProfileLanguageRecordSchema, type ProfileLanguageRecord } from './profile-language.js';\nexport { ProfilePositionRecordSchema, type ProfilePositionRecord } from './profile-position.js';\nexport {\n PresentationDurationSchema,\n PresentationLinkSchema,\n ProfilePresentationRecordSchema,\n type PresentationDuration,\n type PresentationLink,\n type ProfilePresentationRecord,\n} from './profile-presentation.js';\nexport {\n ProfilePresentationDeliveryRecordSchema,\n type ProfilePresentationDeliveryRecord,\n} from './profile-presentation-delivery.js';\nexport { ProfileProjectRecordSchema, type ProfileProjectRecord } from './profile-project.js';\nexport {\n ProfilePublicationRecordSchema,\n PublicationAuthorSchema,\n RelatedIdentifierSchema,\n type ProfilePublicationRecord,\n type PublicationAuthor,\n} from './profile-publication.js';\nexport { ProfileSelfRecordSchema, type ProfileSelfRecord } from './profile-self.js';\nexport { ProfileSkillRecordSchema, type ProfileSkillRecord } from './profile-skill.js';\nexport {\n ProfileVolunteeringRecordSchema,\n type ProfileVolunteeringRecord,\n} from './profile-volunteering.js';\nexport {\n agentRefSchema,\n atUriSchema,\n cidSchema,\n datetimeSchema,\n didSchema,\n externalRecordRefSchema,\n languageTagSchema,\n lexiconString,\n maxBytes,\n maxGraphemes,\n PROFILE_TEXT_LIMITS,\n partialDateSchema,\n profileAboutSchema,\n profileDisplayNameSchema,\n profileHeadlineSchema,\n profileNameSchema,\n profilePronounsSchema,\n selfLabelsSchema,\n skillRefSchema,\n strongRefSchema,\n uriSchema,\n type AgentRef,\n} from './shared.js';\nexport {\n ProfileInvestmentRecordSchema,\n InvestmentAmountSchema,\n PROFILE_INVESTMENT_NSID,\n type ProfileInvestmentRecord,\n} from './profile-investment.js';\n"],"mappings":";AAAA,SAAS,qBAAmC;AAC5C;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OASK;AACP,SAAS,+BAAuD;AAChE;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,8BAAqD;AAC9D;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,iCAA2D;AACpE,SAAS,oCAAiE;AAC1E;AAAA,EACE;AAAA,OAEK;AACP,SAAS,gCAAyD;AAClE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,mCAA+D;AACxE,SAAS,mCAA+D;AACxE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,OAEK;AACP,SAAS,kCAA6D;AACtE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,+BAAuD;AAChE,SAAS,gCAAyD;AAClE;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
@@ -26,11 +26,23 @@ function lexiconString(graphemes, bytes) {
26
26
  message: "This text is too long. Emoji and some scripts take more space, so shorten it a little."
27
27
  });
28
28
  }
29
- var profileDisplayNameSchema = lexiconString(64, 640);
30
- var profileNameSchema = lexiconString(64, 640);
31
- var profilePronounsSchema = lexiconString(20, 200);
32
- var profileHeadlineSchema = lexiconString(120, 1200);
33
- var profileAboutSchema = lexiconString(5e3, 5e4);
29
+ var PROFILE_TEXT_LIMITS = {
30
+ displayName: { graphemes: 64, bytes: 640 },
31
+ givenName: { graphemes: 64, bytes: 640 },
32
+ familyName: { graphemes: 64, bytes: 640 },
33
+ namePronunciation: { graphemes: 64, bytes: 640 },
34
+ pronouns: { graphemes: 20, bytes: 200 },
35
+ headline: { graphemes: 120, bytes: 1200 },
36
+ about: { graphemes: 5e3, bytes: 5e4 }
37
+ };
38
+ function profileText(limit) {
39
+ return lexiconString(limit.graphemes, limit.bytes);
40
+ }
41
+ var profileDisplayNameSchema = profileText(PROFILE_TEXT_LIMITS.displayName);
42
+ var profileNameSchema = profileText(PROFILE_TEXT_LIMITS.givenName);
43
+ var profilePronounsSchema = profileText(PROFILE_TEXT_LIMITS.pronouns);
44
+ var profileHeadlineSchema = profileText(PROFILE_TEXT_LIMITS.headline);
45
+ var profileAboutSchema = profileText(PROFILE_TEXT_LIMITS.about);
34
46
  var didSchema = z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
35
47
  var datetimeSchema = z.string().datetime({ offset: true });
36
48
  var partialDateSchema = z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
@@ -59,6 +71,7 @@ var selfLabelsSchema = z.object({
59
71
  values: z.array(z.object({ val: z.string() }))
60
72
  });
61
73
  export {
74
+ PROFILE_TEXT_LIMITS,
62
75
  agentRefSchema,
63
76
  atUriSchema,
64
77
  cidSchema,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/shared.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Grapheme-aware refinement matching the AT Protocol lexicon `maxGraphemes`\n * constraint. JS strings are sequences of UTF-16 code units, but lexicon\n * `maxGraphemes` counts user-perceived characters (grapheme clusters), so\n * emoji sequences, regional indicators, ZWJ joins, and combining marks all\n * count as one unit each. We use `Intl.Segmenter` to enforce this correctly.\n */\nexport function maxGraphemes(max: number) {\n const segmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' });\n return (value: string): boolean => {\n let count = 0;\n for (const _ of segmenter.segment(value)) {\n count++;\n if (count > max) return false;\n }\n return true;\n };\n}\n\n/**\n * Byte-length refinement matching the AT Protocol lexicon string `maxLength`\n * constraint, which counts UTF-8 bytes (not UTF-16 code units). Uses\n * `TextEncoder` rather than `Buffer` so it also runs in browsers.\n */\nexport function maxBytes(max: number) {\n const encoder = new TextEncoder();\n return (value: string): boolean => {\n // UTF-8 uses at most 3 bytes per UTF-16 unit, so short strings cannot exceed `max`.\n if (value.length * 3 <= max) return true;\n return encoder.encode(value).length <= max;\n };\n}\n\n/**\n * A string capped by a lexicon `maxGraphemes` (user-perceived characters) and\n * `maxLength` (UTF-8 bytes) pair. The grapheme check aborts first, so an\n * over-long value reports only the character error.\n */\nexport function lexiconString(graphemes: number, bytes: number) {\n return z\n .string()\n .refine(maxGraphemes(graphemes), {\n message: `Must be at most ${graphemes} characters`,\n abort: true,\n })\n .refine(maxBytes(bytes), {\n message:\n 'This text is too long. Emoji and some scripts take more space, so shorten it a little.',\n });\n}\n\n/**\n * Field schemas for `id.sifa.profile.self`, shared by the record schema and the\n * write schemas so the lexicon limits live in one place.\n */\nexport const profileDisplayNameSchema = lexiconString(64, 640);\nexport const profileNameSchema = lexiconString(64, 640);\nexport const profilePronounsSchema = lexiconString(20, 200);\nexport const profileHeadlineSchema = lexiconString(120, 1200);\nexport const profileAboutSchema = lexiconString(5000, 50000);\n\n/** Decentralized identifier, AT Protocol `format: did`. */\nexport const didSchema = z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, 'Invalid DID');\n\n/** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */\nexport const datetimeSchema = z.string().datetime({ offset: true });\n\n/**\n * Freeform calendar date for user-facing profile dates (start/end, issued,\n * completed, awarded, published, etc.). Accepts a bare year, year-month,\n * year-month-day, or a full datetime (so a legacy record's RFC-3339 date maps\n * through on backfill without loss). NOT strict `datetime` -- users typically\n * remember only month/year, and LinkedIn-importer writes carry partial dates,\n * so the lexicons document these as freeform `YYYY-MM` / `YYYY-MM-DD`. Record\n * metadata like `createdAt` stays on `datetimeSchema`.\n */\nexport const partialDateSchema = z\n .string()\n .regex(/^\\d{4}(-\\d{2}(-\\d{2}(T.+)?)?)?$/, 'Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime');\n\n/** Generic AT-URI, AT Protocol `format: at-uri`. */\nexport const atUriSchema = z.string().regex(/^at:\\/\\/[^\\s]+$/, 'Invalid AT-URI');\n\n/** Content identifier, AT Protocol `format: cid`. Loose validation -- accepts CIDv0 and CIDv1. */\nexport const cidSchema = z\n .string()\n .regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, 'Invalid CID');\n\n/** BCP 47 language tag, AT Protocol `format: language`. */\nexport const languageTagSchema = z\n .string()\n .regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, 'Invalid BCP 47 language tag');\n\n/** Generic URI, AT Protocol `format: uri`. */\nexport const uriSchema = z.string().url();\n\n/**\n * StrongRef shape from `com.atproto.repo.strongRef` -- pins a record by both\n * AT-URI (identity) and CID (version).\n */\nexport const strongRefSchema = z.object({\n uri: atUriSchema,\n cid: cidSchema,\n});\n\n/**\n * Reference to an `id.sifa.profile.skill` record by AT-URI. Mirrors\n * `id.sifa.defs#skillRef`, which carries no CID at all: skills are mutable\n * records in the same user's repo, so the reference resolves live and tracks\n * edits to the target.\n */\nexport const skillRefSchema = z.object({\n uri: atUriSchema,\n});\n\n/**\n * Reference to a record by AT-URI, with an optional CID. Mirrors\n * `id.sifa.defs#externalRecordRef`. Unlike a strongRef the CID is optional:\n * consumers resolve the AT-URI live so the reference tracks edits to the\n * target, and the CID is a best-effort integrity hint only.\n */\nexport const externalRecordRefSchema = z.object({\n uri: atUriSchema,\n cid: cidSchema.optional(),\n});\n\n/**\n * Shared reference to an organization or person named by a record. Mirrors\n * `id.sifa.defs#agentRef`. `name` is a point-in-time snapshot label captured\n * when the record was saved; `did` and `entityRef` are the durable identity and\n * should be resolved live. `name` is required so an empty object cannot validate\n * as a no-op. `.passthrough()` (not `.strict()`): external apps may emit fields a\n * newer schema will define, and dropping them on a round-trip would silently\n * lose data.\n */\nexport const agentRefSchema = z\n .object({\n name: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n did: didSchema.optional(),\n entityRef: uriSchema.optional(),\n })\n .passthrough();\n\nexport type AgentRef = z.infer<typeof agentRefSchema>;\n\n/**\n * Self-labels shape from `com.atproto.label.defs#selfLabels`. Modelled\n * permissively because clients rarely construct this directly; the AppView\n * handles label validation.\n */\nexport const selfLabelsSchema = z.object({\n $type: z.literal('com.atproto.label.defs#selfLabels').optional(),\n values: z.array(z.object({ val: z.string() })),\n});\n"],"mappings":";AAAA,SAAS,SAAS;AASX,SAAS,aAAa,KAAa;AACxC,QAAM,YAAY,IAAI,KAAK,UAAU,QAAW,EAAE,aAAa,WAAW,CAAC;AAC3E,SAAO,CAAC,UAA2B;AACjC,QAAI,QAAQ;AACZ,eAAW,KAAK,UAAU,QAAQ,KAAK,GAAG;AACxC;AACA,UAAI,QAAQ,IAAK,QAAO;AAAA,IAC1B;AACA,WAAO;AAAA,EACT;AACF;AAOO,SAAS,SAAS,KAAa;AACpC,QAAM,UAAU,IAAI,YAAY;AAChC,SAAO,CAAC,UAA2B;AAEjC,QAAI,MAAM,SAAS,KAAK,IAAK,QAAO;AACpC,WAAO,QAAQ,OAAO,KAAK,EAAE,UAAU;AAAA,EACzC;AACF;AAOO,SAAS,cAAc,WAAmB,OAAe;AAC9D,SAAO,EACJ,OAAO,EACP,OAAO,aAAa,SAAS,GAAG;AAAA,IAC/B,SAAS,mBAAmB,SAAS;AAAA,IACrC,OAAO;AAAA,EACT,CAAC,EACA,OAAO,SAAS,KAAK,GAAG;AAAA,IACvB,SACE;AAAA,EACJ,CAAC;AACL;AAMO,IAAM,2BAA2B,cAAc,IAAI,GAAG;AACtD,IAAM,oBAAoB,cAAc,IAAI,GAAG;AAC/C,IAAM,wBAAwB,cAAc,IAAI,GAAG;AACnD,IAAM,wBAAwB,cAAc,KAAK,IAAI;AACrD,IAAM,qBAAqB,cAAc,KAAM,GAAK;AAGpD,IAAM,YAAY,EAAE,OAAO,EAAE,MAAM,kCAAkC,aAAa;AAGlF,IAAM,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,KAAK,CAAC;AAW3D,IAAM,oBAAoB,EAC9B,OAAO,EACP,MAAM,mCAAmC,mDAAmD;AAGxF,IAAM,cAAc,EAAE,OAAO,EAAE,MAAM,mBAAmB,gBAAgB;AAGxE,IAAM,YAAY,EACtB,OAAO,EACP,MAAM,mDAAmD,aAAa;AAGlE,IAAM,oBAAoB,EAC9B,OAAO,EACP,MAAM,uCAAuC,6BAA6B;AAGtE,IAAM,YAAY,EAAE,OAAO,EAAE,IAAI;AAMjC,IAAM,kBAAkB,EAAE,OAAO;AAAA,EACtC,KAAK;AAAA,EACL,KAAK;AACP,CAAC;AAQM,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,KAAK;AACP,CAAC;AAQM,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,KAAK;AAAA,EACL,KAAK,UAAU,SAAS;AAC1B,CAAC;AAWM,IAAM,iBAAiB,EAC3B,OAAO;AAAA,EACN,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,aAAa,GAAG,CAAC,EAAE,IAAI,IAAI;AAAA,EAC1D,KAAK,UAAU,SAAS;AAAA,EACxB,WAAW,UAAU,SAAS;AAChC,CAAC,EACA,YAAY;AASR,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,OAAO,EAAE,QAAQ,mCAAmC,EAAE,SAAS;AAAA,EAC/D,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/C,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/schemas/shared.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Grapheme-aware refinement matching the AT Protocol lexicon `maxGraphemes`\n * constraint. JS strings are sequences of UTF-16 code units, but lexicon\n * `maxGraphemes` counts user-perceived characters (grapheme clusters), so\n * emoji sequences, regional indicators, ZWJ joins, and combining marks all\n * count as one unit each. We use `Intl.Segmenter` to enforce this correctly.\n */\nexport function maxGraphemes(max: number) {\n const segmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' });\n return (value: string): boolean => {\n let count = 0;\n for (const _ of segmenter.segment(value)) {\n count++;\n if (count > max) return false;\n }\n return true;\n };\n}\n\n/**\n * Byte-length refinement matching the AT Protocol lexicon string `maxLength`\n * constraint, which counts UTF-8 bytes (not UTF-16 code units). Uses\n * `TextEncoder` rather than `Buffer` so it also runs in browsers.\n */\nexport function maxBytes(max: number) {\n const encoder = new TextEncoder();\n return (value: string): boolean => {\n // UTF-8 uses at most 3 bytes per UTF-16 unit, so short strings cannot exceed `max`.\n if (value.length * 3 <= max) return true;\n return encoder.encode(value).length <= max;\n };\n}\n\n/**\n * A string capped by a lexicon `maxGraphemes` (user-perceived characters) and\n * `maxLength` (UTF-8 bytes) pair. The grapheme check aborts first, so an\n * over-long value reports only the character error.\n */\nexport function lexiconString(graphemes: number, bytes: number) {\n return z\n .string()\n .refine(maxGraphemes(graphemes), {\n message: `Must be at most ${graphemes} characters`,\n abort: true,\n })\n .refine(maxBytes(bytes), {\n message:\n 'This text is too long. Emoji and some scripts take more space, so shorten it a little.',\n });\n}\n\n/**\n * Lexicon limits for the `id.sifa.profile.self` text fields: `graphemes` is the\n * `maxGraphemes` cap (user-perceived characters), `bytes` the `maxLength` cap\n * (UTF-8 bytes). The field schemas below are built from these numbers, so\n * forms can show counters and caps without duplicating them.\n */\nexport const PROFILE_TEXT_LIMITS = {\n displayName: { graphemes: 64, bytes: 640 },\n givenName: { graphemes: 64, bytes: 640 },\n familyName: { graphemes: 64, bytes: 640 },\n namePronunciation: { graphemes: 64, bytes: 640 },\n pronouns: { graphemes: 20, bytes: 200 },\n headline: { graphemes: 120, bytes: 1200 },\n about: { graphemes: 5000, bytes: 50000 },\n} as const;\n\nfunction profileText(limit: { readonly graphemes: number; readonly bytes: number }) {\n return lexiconString(limit.graphemes, limit.bytes);\n}\n\n/**\n * Field schemas for `id.sifa.profile.self`, shared by the record schema and the\n * write schemas so the lexicon limits live in one place.\n */\nexport const profileDisplayNameSchema = profileText(PROFILE_TEXT_LIMITS.displayName);\nexport const profileNameSchema = profileText(PROFILE_TEXT_LIMITS.givenName);\nexport const profilePronounsSchema = profileText(PROFILE_TEXT_LIMITS.pronouns);\nexport const profileHeadlineSchema = profileText(PROFILE_TEXT_LIMITS.headline);\nexport const profileAboutSchema = profileText(PROFILE_TEXT_LIMITS.about);\n\n/** Decentralized identifier, AT Protocol `format: did`. */\nexport const didSchema = z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, 'Invalid DID');\n\n/** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */\nexport const datetimeSchema = z.string().datetime({ offset: true });\n\n/**\n * Freeform calendar date for user-facing profile dates (start/end, issued,\n * completed, awarded, published, etc.). Accepts a bare year, year-month,\n * year-month-day, or a full datetime (so a legacy record's RFC-3339 date maps\n * through on backfill without loss). NOT strict `datetime` -- users typically\n * remember only month/year, and LinkedIn-importer writes carry partial dates,\n * so the lexicons document these as freeform `YYYY-MM` / `YYYY-MM-DD`. Record\n * metadata like `createdAt` stays on `datetimeSchema`.\n */\nexport const partialDateSchema = z\n .string()\n .regex(/^\\d{4}(-\\d{2}(-\\d{2}(T.+)?)?)?$/, 'Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime');\n\n/** Generic AT-URI, AT Protocol `format: at-uri`. */\nexport const atUriSchema = z.string().regex(/^at:\\/\\/[^\\s]+$/, 'Invalid AT-URI');\n\n/** Content identifier, AT Protocol `format: cid`. Loose validation -- accepts CIDv0 and CIDv1. */\nexport const cidSchema = z\n .string()\n .regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, 'Invalid CID');\n\n/** BCP 47 language tag, AT Protocol `format: language`. */\nexport const languageTagSchema = z\n .string()\n .regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, 'Invalid BCP 47 language tag');\n\n/** Generic URI, AT Protocol `format: uri`. */\nexport const uriSchema = z.string().url();\n\n/**\n * StrongRef shape from `com.atproto.repo.strongRef` -- pins a record by both\n * AT-URI (identity) and CID (version).\n */\nexport const strongRefSchema = z.object({\n uri: atUriSchema,\n cid: cidSchema,\n});\n\n/**\n * Reference to an `id.sifa.profile.skill` record by AT-URI. Mirrors\n * `id.sifa.defs#skillRef`, which carries no CID at all: skills are mutable\n * records in the same user's repo, so the reference resolves live and tracks\n * edits to the target.\n */\nexport const skillRefSchema = z.object({\n uri: atUriSchema,\n});\n\n/**\n * Reference to a record by AT-URI, with an optional CID. Mirrors\n * `id.sifa.defs#externalRecordRef`. Unlike a strongRef the CID is optional:\n * consumers resolve the AT-URI live so the reference tracks edits to the\n * target, and the CID is a best-effort integrity hint only.\n */\nexport const externalRecordRefSchema = z.object({\n uri: atUriSchema,\n cid: cidSchema.optional(),\n});\n\n/**\n * Shared reference to an organization or person named by a record. Mirrors\n * `id.sifa.defs#agentRef`. `name` is a point-in-time snapshot label captured\n * when the record was saved; `did` and `entityRef` are the durable identity and\n * should be resolved live. `name` is required so an empty object cannot validate\n * as a no-op. `.passthrough()` (not `.strict()`): external apps may emit fields a\n * newer schema will define, and dropping them on a round-trip would silently\n * lose data.\n */\nexport const agentRefSchema = z\n .object({\n name: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n did: didSchema.optional(),\n entityRef: uriSchema.optional(),\n })\n .passthrough();\n\nexport type AgentRef = z.infer<typeof agentRefSchema>;\n\n/**\n * Self-labels shape from `com.atproto.label.defs#selfLabels`. Modelled\n * permissively because clients rarely construct this directly; the AppView\n * handles label validation.\n */\nexport const selfLabelsSchema = z.object({\n $type: z.literal('com.atproto.label.defs#selfLabels').optional(),\n values: z.array(z.object({ val: z.string() })),\n});\n"],"mappings":"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","names":[]}
@@ -257,11 +257,21 @@ function lexiconString(graphemes, bytes) {
257
257
  message: "This text is too long. Emoji and some scripts take more space, so shorten it a little."
258
258
  });
259
259
  }
260
- var profileDisplayNameSchema = lexiconString(64, 640);
261
- var profileNameSchema = lexiconString(64, 640);
262
- var profilePronounsSchema = lexiconString(20, 200);
263
- var profileHeadlineSchema = lexiconString(120, 1200);
264
- var profileAboutSchema = lexiconString(5e3, 5e4);
260
+ var PROFILE_TEXT_LIMITS = {
261
+ displayName: { graphemes: 64, bytes: 640 },
262
+ givenName: { graphemes: 64, bytes: 640 },
263
+ pronouns: { graphemes: 20, bytes: 200 },
264
+ headline: { graphemes: 120, bytes: 1200 },
265
+ about: { graphemes: 5e3, bytes: 5e4 }
266
+ };
267
+ function profileText(limit) {
268
+ return lexiconString(limit.graphemes, limit.bytes);
269
+ }
270
+ var profileDisplayNameSchema = profileText(PROFILE_TEXT_LIMITS.displayName);
271
+ var profileNameSchema = profileText(PROFILE_TEXT_LIMITS.givenName);
272
+ var profilePronounsSchema = profileText(PROFILE_TEXT_LIMITS.pronouns);
273
+ var profileHeadlineSchema = profileText(PROFILE_TEXT_LIMITS.headline);
274
+ var profileAboutSchema = profileText(PROFILE_TEXT_LIMITS.about);
265
275
  var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
266
276
  var datetimeSchema = zod.z.string().datetime({ offset: true });
267
277
  zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");