@singi-labs/sifa-sdk 0.19.107 → 0.19.109

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 (51) hide show
  1. package/dist/germ-declaration-BQBocGww.d.cts +33 -0
  2. package/dist/germ-declaration-BQBocGww.d.ts +33 -0
  3. package/dist/index.cjs +182 -96
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +61 -1
  6. package/dist/index.d.ts +61 -1
  7. package/dist/index.js +18 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/logic/germ.js +71 -0
  10. package/dist/logic/germ.js.map +1 -0
  11. package/dist/logic/index.js +14 -0
  12. package/dist/logic/index.js.map +1 -1
  13. package/dist/{network-map-DTlhFNIf.d.ts → network-map-DVzGiX2h.d.ts} +36 -1
  14. package/dist/{network-map-CVr1LskK.d.cts → network-map-DsxrigjL.d.cts} +36 -1
  15. package/dist/query/fetchers/germ.js +46 -0
  16. package/dist/query/fetchers/germ.js.map +1 -0
  17. package/dist/query/fetchers/index.cjs +50 -0
  18. package/dist/query/fetchers/index.cjs.map +1 -1
  19. package/dist/query/fetchers/index.d.cts +2 -1
  20. package/dist/query/fetchers/index.d.ts +2 -1
  21. package/dist/query/fetchers/index.js +6 -0
  22. package/dist/query/fetchers/index.js.map +1 -1
  23. package/dist/query/index.cjs +50 -0
  24. package/dist/query/index.cjs.map +1 -1
  25. package/dist/query/index.d.cts +3 -2
  26. package/dist/query/index.d.ts +3 -2
  27. package/dist/query/index.js +6 -0
  28. package/dist/query/index.js.map +1 -1
  29. package/dist/schemas/germ-declaration.js +17 -0
  30. package/dist/schemas/germ-declaration.js.map +1 -0
  31. package/dist/schemas/index.cjs +18 -3
  32. package/dist/schemas/index.cjs.map +1 -1
  33. package/dist/schemas/index.d.cts +1 -0
  34. package/dist/schemas/index.d.ts +1 -0
  35. package/dist/schemas/index.js +6 -0
  36. package/dist/schemas/index.js.map +1 -1
  37. package/dist/schemas/org-profile.js +10 -4
  38. package/dist/schemas/org-profile.js.map +1 -1
  39. package/dist/schemas/write/index.cjs +126 -61
  40. package/dist/schemas/write/index.cjs.map +1 -1
  41. package/dist/schemas/write/index.d.cts +8 -2
  42. package/dist/schemas/write/index.d.ts +8 -2
  43. package/dist/schemas/write/index.js +5 -1
  44. package/dist/schemas/write/index.js.map +1 -1
  45. package/dist/schemas/write/org-claim.js +5 -6
  46. package/dist/schemas/write/org-claim.js.map +1 -1
  47. package/dist/schemas/write/org-profile.js +12 -4
  48. package/dist/schemas/write/org-profile.js.map +1 -1
  49. package/dist/schemas/write/org-settings.js +6 -4
  50. package/dist/schemas/write/org-settings.js.map +1 -1
  51. package/package.json +3 -3
@@ -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 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 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,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,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 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,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
@@ -13,9 +13,12 @@ var orgLinkSchema = z.object({
13
13
  name: z.string().refine(maxGraphemes(60)).max(600),
14
14
  url: uriSchema.max(2048)
15
15
  });
16
+ var orgNameField = z.string().min(1).refine(maxGraphemes(200)).max(2e3);
17
+ var orgDescriptionField = z.string().refine(maxGraphemes(5e3)).max(5e4);
18
+ var orgAliasField = z.string().refine(maxGraphemes(200)).max(2e3);
16
19
  var OrgProfileRecordSchema = z.object({
17
- name: z.string().min(1).refine(maxGraphemes(200)).max(2e3),
18
- description: z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
20
+ name: orgNameField,
21
+ description: orgDescriptionField.optional(),
19
22
  /** Blob ref for the org logo (`image/png` | `image/jpeg`). Not deeply validated client-side. */
20
23
  logo: z.unknown().optional(),
21
24
  website: uriSchema.optional(),
@@ -47,7 +50,7 @@ var OrgProfileRecordSchema = z.object({
47
50
  /** Self-declared founding date: a year (YYYY), month (YYYY-MM), or full date (YYYY-MM-DD). */
48
51
  founded: z.string().max(10).optional(),
49
52
  /** Self-declared alternative names / acronyms ("also known as"). */
50
- aliases: z.array(z.string().refine(maxGraphemes(200)).max(2e3)).max(20).optional(),
53
+ aliases: z.array(orgAliasField).max(20).optional(),
51
54
  /**
52
55
  * Whether the account holder's personal profile stays visible alongside this
53
56
  * org profile. For sole traders whose personal domain is also their trade
@@ -59,6 +62,9 @@ var OrgProfileRecordSchema = z.object({
59
62
  createdAt: datetimeSchema
60
63
  });
61
64
  export {
62
- OrgProfileRecordSchema
65
+ OrgProfileRecordSchema,
66
+ orgAliasField,
67
+ orgDescriptionField,
68
+ orgNameField
63
69
  };
64
70
  //# sourceMappingURL=org-profile.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/org-profile.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes, selfLabelsSchema, uriSchema } from './shared.js';\n\n/**\n * Structured physical address for an organization. Mirrors\n * `community.lexicon.location.address` (all fields optional). Sifa enforces\n * ISO 3166-1 alpha-2 country codes at the app layer.\n */\nconst orgAddressSchema = z.object({\n country: z.string().optional(),\n postalCode: z.string().optional(),\n region: z.string().optional(),\n locality: z.string().optional(),\n street: z.string().optional(),\n name: z.string().optional(),\n});\n\n/** A featured link on the org profile. Both `name` and `url` are required. */\nconst orgLinkSchema = z.object({\n name: z.string().refine(maxGraphemes(60)).max(600),\n url: uriSchema.max(2048),\n});\n\n/**\n * Zod schema for `id.sifa.org.profile` records -- the self-declared\n * organization profile. Singleton (record key `self`), lives in the org's PDS.\n * Presence of this record marks the account as presenting as an organization;\n * trust is layered separately (rendering floor, verification labels).\n *\n * Mirrors the lexicon wire shape (grapheme + byte caps, blob logo, uri refs).\n * For the sifa-api write-endpoint contract, use the schemas under\n * `@singi-labs/sifa-sdk/schemas/write` instead.\n */\nexport const OrgProfileRecordSchema = z.object({\n name: z.string().min(1).refine(maxGraphemes(200)).max(2000),\n description: z.string().refine(maxGraphemes(5000)).max(50000).optional(),\n /** Blob ref for the org logo (`image/png` | `image/jpeg`). Not deeply validated client-side. */\n logo: z.unknown().optional(),\n website: uriSchema.optional(),\n entityRefs: z.array(uriSchema).max(20).optional(),\n /** Contact email. NOT rendered publicly; validated as email at the app layer. */\n contact: z.string().optional(),\n /** Physical addresses (headquarters, offices). */\n addresses: z.array(orgAddressSchema).max(10).optional(),\n /**\n * Self-selected headcount range (a declared bucket, never a calculated count).\n * Open enum (bare-string knownValues in the lexicon): `1-10`, `11-50`,\n * `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000`, `10001+`. Any\n * string is accepted so future ranges do not break older records.\n */\n companySize: z.string().optional(),\n companyType: z.string().optional(),\n /** Featured links or content surfaced on the org profile. */\n links: z.array(orgLinkSchema).max(10).optional(),\n /**\n * Self-declared industry/domain pairs (same shape as the person profile's\n * `industries`). Registry-sourced classifications are layered separately.\n */\n industries: z\n .array(\n z.object({\n industry: z.string().max(100),\n domain: z.string().max(100).optional(),\n }),\n )\n .max(10)\n .optional(),\n /** Self-declared founding date: a year (YYYY), month (YYYY-MM), or full date (YYYY-MM-DD). */\n founded: z.string().max(10).optional(),\n /** Self-declared alternative names / acronyms (\"also known as\"). */\n aliases: z\n .array(z.string().refine(maxGraphemes(200)).max(2000))\n .max(20)\n .optional(),\n /**\n * Whether the account holder's personal profile stays visible alongside this\n * org profile. For sole traders whose personal domain is also their trade\n * name: one account, two facets, both pages render. Absent or false means the\n * account presents solely as an organization.\n */\n personalProfileVisible: z.boolean().optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type OrgProfileRecord = z.infer<typeof OrgProfileRecordSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,gBAAgB,cAAc,kBAAkB,iBAAiB;AAO1E,IAAM,mBAAmB,EAAE,OAAO;AAAA,EAChC,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,MAAM,EAAE,OAAO,EAAE,SAAS;AAC5B,CAAC;AAGD,IAAM,gBAAgB,EAAE,OAAO;AAAA,EAC7B,MAAM,EAAE,OAAO,EAAE,OAAO,aAAa,EAAE,CAAC,EAAE,IAAI,GAAG;AAAA,EACjD,KAAK,UAAU,IAAI,IAAI;AACzB,CAAC;AAYM,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,aAAa,GAAG,CAAC,EAAE,IAAI,GAAI;AAAA,EAC1D,aAAa,EAAE,OAAO,EAAE,OAAO,aAAa,GAAI,CAAC,EAAE,IAAI,GAAK,EAAE,SAAS;AAAA;AAAA,EAEvE,MAAM,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC3B,SAAS,UAAU,SAAS;AAAA,EAC5B,YAAY,EAAE,MAAM,SAAS,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAEhD,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAE7B,WAAW,EAAE,MAAM,gBAAgB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOtD,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAEjC,OAAO,EAAE,MAAM,aAAa,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAK/C,YAAY,EACT;AAAA,IACC,EAAE,OAAO;AAAA,MACP,UAAU,EAAE,OAAO,EAAE,IAAI,GAAG;AAAA,MAC5B,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,IACvC,CAAC;AAAA,EACH,EACC,IAAI,EAAE,EACN,SAAS;AAAA;AAAA,EAEZ,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAErC,SAAS,EACN,MAAM,EAAE,OAAO,EAAE,OAAO,aAAa,GAAG,CAAC,EAAE,IAAI,GAAI,CAAC,EACpD,IAAI,EAAE,EACN,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOZ,wBAAwB,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC7C,QAAQ,iBAAiB,SAAS;AAAA,EAClC,WAAW;AACb,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/schemas/org-profile.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { datetimeSchema, maxGraphemes, selfLabelsSchema, uriSchema } from './shared.js';\n\n/**\n * Structured physical address for an organization. Mirrors\n * `community.lexicon.location.address` (all fields optional). Sifa enforces\n * ISO 3166-1 alpha-2 country codes at the app layer.\n */\nconst orgAddressSchema = z.object({\n country: z.string().optional(),\n postalCode: z.string().optional(),\n region: z.string().optional(),\n locality: z.string().optional(),\n street: z.string().optional(),\n name: z.string().optional(),\n});\n\n/** A featured link on the org profile. Both `name` and `url` are required. */\nconst orgLinkSchema = z.object({\n name: z.string().refine(maxGraphemes(60)).max(600),\n url: uriSchema.max(2048),\n});\n\n/**\n * Lexicon string fields of `id.sifa.org.profile`: grapheme caps plus the\n * `maxLength` bound. Shared by the record, write and request schemas so the\n * limits live in one place (sifa-workspace#726).\n */\nexport const orgNameField = z.string().min(1).refine(maxGraphemes(200)).max(2000);\nexport const orgDescriptionField = z.string().refine(maxGraphemes(5000)).max(50000);\nexport const orgAliasField = z.string().refine(maxGraphemes(200)).max(2000);\n\n/**\n * Zod schema for `id.sifa.org.profile` records -- the self-declared\n * organization profile. Singleton (record key `self`), lives in the org's PDS.\n * Presence of this record marks the account as presenting as an organization;\n * trust is layered separately (rendering floor, verification labels).\n *\n * Mirrors the lexicon wire shape (grapheme + byte caps, blob logo, uri refs).\n * For the sifa-api write-endpoint contract, use the schemas under\n * `@singi-labs/sifa-sdk/schemas/write` instead.\n */\nexport const OrgProfileRecordSchema = z.object({\n name: orgNameField,\n description: orgDescriptionField.optional(),\n /** Blob ref for the org logo (`image/png` | `image/jpeg`). Not deeply validated client-side. */\n logo: z.unknown().optional(),\n website: uriSchema.optional(),\n entityRefs: z.array(uriSchema).max(20).optional(),\n /** Contact email. NOT rendered publicly; validated as email at the app layer. */\n contact: z.string().optional(),\n /** Physical addresses (headquarters, offices). */\n addresses: z.array(orgAddressSchema).max(10).optional(),\n /**\n * Self-selected headcount range (a declared bucket, never a calculated count).\n * Open enum (bare-string knownValues in the lexicon): `1-10`, `11-50`,\n * `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000`, `10001+`. Any\n * string is accepted so future ranges do not break older records.\n */\n companySize: z.string().optional(),\n companyType: z.string().optional(),\n /** Featured links or content surfaced on the org profile. */\n links: z.array(orgLinkSchema).max(10).optional(),\n /**\n * Self-declared industry/domain pairs (same shape as the person profile's\n * `industries`). Registry-sourced classifications are layered separately.\n */\n industries: z\n .array(\n z.object({\n industry: z.string().max(100),\n domain: z.string().max(100).optional(),\n }),\n )\n .max(10)\n .optional(),\n /** Self-declared founding date: a year (YYYY), month (YYYY-MM), or full date (YYYY-MM-DD). */\n founded: z.string().max(10).optional(),\n /** Self-declared alternative names / acronyms (\"also known as\"). */\n aliases: z.array(orgAliasField).max(20).optional(),\n /**\n * Whether the account holder's personal profile stays visible alongside this\n * org profile. For sole traders whose personal domain is also their trade\n * name: one account, two facets, both pages render. Absent or false means the\n * account presents solely as an organization.\n */\n personalProfileVisible: z.boolean().optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type OrgProfileRecord = z.infer<typeof OrgProfileRecordSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,gBAAgB,cAAc,kBAAkB,iBAAiB;AAO1E,IAAM,mBAAmB,EAAE,OAAO;AAAA,EAChC,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,MAAM,EAAE,OAAO,EAAE,SAAS;AAC5B,CAAC;AAGD,IAAM,gBAAgB,EAAE,OAAO;AAAA,EAC7B,MAAM,EAAE,OAAO,EAAE,OAAO,aAAa,EAAE,CAAC,EAAE,IAAI,GAAG;AAAA,EACjD,KAAK,UAAU,IAAI,IAAI;AACzB,CAAC;AAOM,IAAM,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,aAAa,GAAG,CAAC,EAAE,IAAI,GAAI;AACzE,IAAM,sBAAsB,EAAE,OAAO,EAAE,OAAO,aAAa,GAAI,CAAC,EAAE,IAAI,GAAK;AAC3E,IAAM,gBAAgB,EAAE,OAAO,EAAE,OAAO,aAAa,GAAG,CAAC,EAAE,IAAI,GAAI;AAYnE,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,MAAM;AAAA,EACN,aAAa,oBAAoB,SAAS;AAAA;AAAA,EAE1C,MAAM,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC3B,SAAS,UAAU,SAAS;AAAA,EAC5B,YAAY,EAAE,MAAM,SAAS,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAEhD,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAE7B,WAAW,EAAE,MAAM,gBAAgB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOtD,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAEjC,OAAO,EAAE,MAAM,aAAa,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAK/C,YAAY,EACT;AAAA,IACC,EAAE,OAAO;AAAA,MACP,UAAU,EAAE,OAAO,EAAE,IAAI,GAAG;AAAA,MAC5B,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,IACvC,CAAC;AAAA,EACH,EACC,IAAI,EAAE,EACN,SAAS;AAAA;AAAA,EAEZ,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAErC,SAAS,EAAE,MAAM,aAAa,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOjD,wBAAwB,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC7C,QAAQ,iBAAiB,SAAS;AAAA,EAClC,WAAW;AACb,CAAC;","names":[]}
@@ -232,6 +232,108 @@ var OrgEmploymentAttestationWriteSchema = zod.z.object({
232
232
  comment: zod.z.string().max(3e3).nullable().optional(),
233
233
  createdAt: zod.z.string()
234
234
  });
235
+ function maxGraphemes(max) {
236
+ return (value) => {
237
+ const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
238
+ let count = 0;
239
+ for (const _ of segmenter.segment(value)) {
240
+ count++;
241
+ if (count > max) return false;
242
+ }
243
+ return true;
244
+ };
245
+ }
246
+ var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
247
+ var datetimeSchema = zod.z.string().datetime({ offset: true });
248
+ zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
249
+ var atUriSchema = zod.z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
250
+ var cidSchema = zod.z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
251
+ zod.z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
252
+ var uriSchema = zod.z.string().url();
253
+ zod.z.object({
254
+ uri: atUriSchema,
255
+ cid: cidSchema
256
+ });
257
+ zod.z.object({
258
+ uri: atUriSchema
259
+ });
260
+ zod.z.object({
261
+ uri: atUriSchema,
262
+ cid: cidSchema.optional()
263
+ });
264
+ zod.z.object({
265
+ name: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
266
+ did: didSchema.optional(),
267
+ entityRef: uriSchema.optional()
268
+ }).passthrough();
269
+ var selfLabelsSchema = zod.z.object({
270
+ $type: zod.z.literal("com.atproto.label.defs#selfLabels").optional(),
271
+ values: zod.z.array(zod.z.object({ val: zod.z.string() }))
272
+ });
273
+
274
+ // src/schemas/org-profile.ts
275
+ var orgAddressSchema = zod.z.object({
276
+ country: zod.z.string().optional(),
277
+ postalCode: zod.z.string().optional(),
278
+ region: zod.z.string().optional(),
279
+ locality: zod.z.string().optional(),
280
+ street: zod.z.string().optional(),
281
+ name: zod.z.string().optional()
282
+ });
283
+ var orgLinkSchema = zod.z.object({
284
+ name: zod.z.string().refine(maxGraphemes(60)).max(600),
285
+ url: uriSchema.max(2048)
286
+ });
287
+ var orgNameField = zod.z.string().min(1).refine(maxGraphemes(200)).max(2e3);
288
+ var orgDescriptionField = zod.z.string().refine(maxGraphemes(5e3)).max(5e4);
289
+ var orgAliasField = zod.z.string().refine(maxGraphemes(200)).max(2e3);
290
+ zod.z.object({
291
+ name: orgNameField,
292
+ description: orgDescriptionField.optional(),
293
+ /** Blob ref for the org logo (`image/png` | `image/jpeg`). Not deeply validated client-side. */
294
+ logo: zod.z.unknown().optional(),
295
+ website: uriSchema.optional(),
296
+ entityRefs: zod.z.array(uriSchema).max(20).optional(),
297
+ /** Contact email. NOT rendered publicly; validated as email at the app layer. */
298
+ contact: zod.z.string().optional(),
299
+ /** Physical addresses (headquarters, offices). */
300
+ addresses: zod.z.array(orgAddressSchema).max(10).optional(),
301
+ /**
302
+ * Self-selected headcount range (a declared bucket, never a calculated count).
303
+ * Open enum (bare-string knownValues in the lexicon): `1-10`, `11-50`,
304
+ * `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000`, `10001+`. Any
305
+ * string is accepted so future ranges do not break older records.
306
+ */
307
+ companySize: zod.z.string().optional(),
308
+ companyType: zod.z.string().optional(),
309
+ /** Featured links or content surfaced on the org profile. */
310
+ links: zod.z.array(orgLinkSchema).max(10).optional(),
311
+ /**
312
+ * Self-declared industry/domain pairs (same shape as the person profile's
313
+ * `industries`). Registry-sourced classifications are layered separately.
314
+ */
315
+ industries: zod.z.array(
316
+ zod.z.object({
317
+ industry: zod.z.string().max(100),
318
+ domain: zod.z.string().max(100).optional()
319
+ })
320
+ ).max(10).optional(),
321
+ /** Self-declared founding date: a year (YYYY), month (YYYY-MM), or full date (YYYY-MM-DD). */
322
+ founded: zod.z.string().max(10).optional(),
323
+ /** Self-declared alternative names / acronyms ("also known as"). */
324
+ aliases: zod.z.array(orgAliasField).max(20).optional(),
325
+ /**
326
+ * Whether the account holder's personal profile stays visible alongside this
327
+ * org profile. For sole traders whose personal domain is also their trade
328
+ * name: one account, two facets, both pages render. Absent or false means the
329
+ * account presents solely as an organization.
330
+ */
331
+ personalProfileVisible: zod.z.boolean().optional(),
332
+ labels: selfLabelsSchema.optional(),
333
+ createdAt: datetimeSchema
334
+ });
335
+
336
+ // src/schemas/write/org-profile.ts
235
337
  var orgAddressWriteSchema = zod.z.object({
236
338
  country: zod.z.string().max(255).nullable().optional(),
237
339
  postalCode: zod.z.string().max(64).nullable().optional(),
@@ -254,9 +356,14 @@ var orgLinkWriteSchema = zod.z.object({
254
356
  { message: "Only http(s) URLs are allowed" }
255
357
  )
256
358
  });
359
+ var orgFoundedSchema = zod.z.string().max(10).refine(isValidPartialDate, {
360
+ message: "Must be a year (YYYY), month (YYYY-MM), or date (YYYY-MM-DD)"
361
+ });
257
362
  var OrgProfileWriteSchema = zod.z.object({
258
- name: zod.z.string().min(1).max(2e3),
259
- description: zod.z.string().max(5e4).nullable().optional(),
363
+ // The ingest gate: lexicon limits only (sifa-workspace#726), so a record
364
+ // written elsewhere is not dropped over a request-only rule.
365
+ name: orgNameField,
366
+ description: orgDescriptionField.nullable().optional(),
260
367
  logo: zod.z.unknown().nullable().optional(),
261
368
  website: zod.z.string().max(2048).nullable().optional(),
262
369
  entityRefs: zod.z.array(zod.z.string().max(2048)).max(20).nullable().optional(),
@@ -276,11 +383,11 @@ var OrgProfileWriteSchema = zod.z.object({
276
383
  })
277
384
  ).max(10).nullable().optional(),
278
385
  founded: zod.z.string().max(10).nullable().optional(),
279
- aliases: zod.z.array(zod.z.string().max(200)).max(20).nullable().optional(),
386
+ aliases: zod.z.array(orgAliasField).max(20).nullable().optional(),
280
387
  personalProfileVisible: zod.z.boolean().nullable().optional(),
281
388
  createdAt: zod.z.string()
282
389
  });
283
- var orgAddressSchema = zod.z.object({
390
+ var orgAddressSchema2 = zod.z.object({
284
391
  country: zod.z.string().max(255).optional(),
285
392
  postalCode: zod.z.string().max(64).optional(),
286
393
  region: zod.z.string().max(255).optional(),
@@ -288,7 +395,7 @@ var orgAddressSchema = zod.z.object({
288
395
  street: zod.z.string().max(2048).optional(),
289
396
  name: zod.z.string().max(255).optional()
290
397
  });
291
- var orgLinkSchema = zod.z.object({
398
+ var orgLinkSchema2 = zod.z.object({
292
399
  name: zod.z.string().min(1).max(255),
293
400
  url: zod.z.string().max(2048).refine(
294
401
  (u) => {
@@ -306,22 +413,19 @@ var orgIndustrySchema = zod.z.object({
306
413
  industry: zod.z.string().min(1).max(100),
307
414
  domain: zod.z.string().max(100).optional()
308
415
  });
309
- var orgFoundedSchema = zod.z.string().max(10).regex(/^\d{4}(-\d{2}(-\d{2})?)?$/, {
310
- message: "Must be a year (YYYY), month (YYYY-MM), or date (YYYY-MM-DD)"
311
- });
312
416
  var OrgClaimRequestSchema = zod.z.object({
313
- name: zod.z.string().min(1).max(2e3),
314
- description: zod.z.string().max(5e4).optional(),
417
+ name: orgNameField,
418
+ description: orgDescriptionField.optional(),
315
419
  website: zod.z.string().max(2048).optional(),
316
420
  contact: zod.z.string().max(320).optional(),
317
421
  entityRefs: zod.z.array(zod.z.string().min(1).max(2048)).min(1).max(20),
318
- addresses: zod.z.array(orgAddressSchema).max(20).optional(),
422
+ addresses: zod.z.array(orgAddressSchema2).max(20).optional(),
319
423
  companySize: zod.z.string().max(64).optional(),
320
424
  companyType: zod.z.string().max(64).optional(),
321
- links: zod.z.array(orgLinkSchema).max(20).optional(),
425
+ links: zod.z.array(orgLinkSchema2).max(20).optional(),
322
426
  industries: zod.z.array(orgIndustrySchema).max(10).optional(),
323
427
  founded: orgFoundedSchema.optional(),
324
- aliases: zod.z.array(zod.z.string().min(1).max(200)).max(20).optional(),
428
+ aliases: zod.z.array(orgAliasField.min(1)).max(20).optional(),
325
429
  /**
326
430
  * Sole-trader opt-in: keep the claimant's personal profile visible at `/p/`
327
431
  * alongside the new company page at `/c/`. Omitted or false presents the
@@ -336,7 +440,7 @@ var orgLogoBlobSchema = zod.z.object({
336
440
  mimeType: zod.z.string().min(1).max(255),
337
441
  size: zod.z.number().int().nonnegative()
338
442
  });
339
- var orgAddressSchema2 = zod.z.object({
443
+ var orgAddressSchema3 = zod.z.object({
340
444
  country: zod.z.string().max(255).optional(),
341
445
  postalCode: zod.z.string().max(64).optional(),
342
446
  region: zod.z.string().max(255).optional(),
@@ -344,7 +448,7 @@ var orgAddressSchema2 = zod.z.object({
344
448
  street: zod.z.string().max(2048).optional(),
345
449
  name: zod.z.string().max(255).optional()
346
450
  });
347
- var orgLinkSchema2 = zod.z.object({
451
+ var orgLinkSchema3 = zod.z.object({
348
452
  name: zod.z.string().min(1).max(255),
349
453
  url: zod.z.string().max(2048).refine(
350
454
  (u) => {
@@ -359,14 +463,14 @@ var orgLinkSchema2 = zod.z.object({
359
463
  )
360
464
  });
361
465
  var OrgProfileUpdateRequestSchema = zod.z.object({
362
- name: zod.z.string().min(1).max(2e3),
363
- description: zod.z.string().max(5e4).optional(),
466
+ name: orgNameField,
467
+ description: orgDescriptionField.optional(),
364
468
  website: zod.z.string().max(2048).optional(),
365
469
  contact: zod.z.string().max(320).optional(),
366
470
  entityRefs: zod.z.array(zod.z.string().min(1).max(2048)).min(1).max(20),
367
471
  logo: orgLogoBlobSchema.optional(),
368
472
  /** Structured physical locations (headquarters, offices) shown on the org page. */
369
- addresses: zod.z.array(orgAddressSchema2).max(20).optional(),
473
+ addresses: zod.z.array(orgAddressSchema3).max(20).optional(),
370
474
  /**
371
475
  * Self-selected headcount band (a declared bucket, never a calculated count).
372
476
  * Open string: any value is accepted so future ranges do not break the
@@ -375,7 +479,7 @@ var OrgProfileUpdateRequestSchema = zod.z.object({
375
479
  companySize: zod.z.string().max(64).optional(),
376
480
  companyType: zod.z.string().max(64).optional(),
377
481
  /** Featured links surfaced on the org page (each url http(s)). */
378
- links: zod.z.array(orgLinkSchema2).max(20).optional(),
482
+ links: zod.z.array(orgLinkSchema3).max(20).optional(),
379
483
  /**
380
484
  * Self-declared industry/domain pairs (same shape as the person profile).
381
485
  * Registry-sourced classifications are layered separately, not self-declared.
@@ -387,9 +491,9 @@ var OrgProfileUpdateRequestSchema = zod.z.object({
387
491
  })
388
492
  ).max(10).optional(),
389
493
  /** Self-declared founding date: year (YYYY), month (YYYY-MM), or full date (YYYY-MM-DD). */
390
- founded: zod.z.string().max(10).optional(),
494
+ founded: orgFoundedSchema.optional(),
391
495
  /** Self-declared alternative names / acronyms ("also known as"). */
392
- aliases: zod.z.array(zod.z.string().max(200)).max(20).optional(),
496
+ aliases: zod.z.array(orgAliasField.min(1)).max(20).optional(),
393
497
  /** Sole-trader opt-in; see {@link OrgClaimRequestSchema}. Flippable after the claim. */
394
498
  personalProfileVisible: zod.z.boolean().optional()
395
499
  });
@@ -549,46 +653,6 @@ var PublicationWriteSchema = zod.z.object({
549
653
  // from Standard.site, RSS, or by hand need not fit ORCID's list.
550
654
  type: zod.z.string().max(64).nullable().optional()
551
655
  });
552
- function maxGraphemes(max) {
553
- return (value) => {
554
- const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
555
- let count = 0;
556
- for (const _ of segmenter.segment(value)) {
557
- count++;
558
- if (count > max) return false;
559
- }
560
- return true;
561
- };
562
- }
563
- var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
564
- zod.z.string().datetime({ offset: true });
565
- zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
566
- var atUriSchema = zod.z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
567
- var cidSchema = zod.z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
568
- zod.z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
569
- var uriSchema = zod.z.string().url();
570
- zod.z.object({
571
- uri: atUriSchema,
572
- cid: cidSchema
573
- });
574
- zod.z.object({
575
- uri: atUriSchema
576
- });
577
- zod.z.object({
578
- uri: atUriSchema,
579
- cid: cidSchema.optional()
580
- });
581
- zod.z.object({
582
- name: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
583
- did: didSchema.optional(),
584
- entityRef: uriSchema.optional()
585
- }).passthrough();
586
- zod.z.object({
587
- $type: zod.z.literal("com.atproto.label.defs#selfLabels").optional(),
588
- values: zod.z.array(zod.z.object({ val: zod.z.string() }))
589
- });
590
-
591
- // src/schemas/write/skill.ts
592
656
  var SkillWriteSchema = zod.z.object({
593
657
  name: zod.z.string().min(1).max(100),
594
658
  category: zod.z.string().max(100).optional(),
@@ -643,6 +707,7 @@ exports.isValidDateOnly = isValidDateOnly;
643
707
  exports.isValidPartialDate = isValidPartialDate;
644
708
  exports.normalizeUrl = normalizeUrl;
645
709
  exports.optionalUrl = optionalUrl;
710
+ exports.orgFoundedSchema = orgFoundedSchema;
646
711
  exports.presentationLinkSchema = presentationLinkSchema;
647
712
  exports.publicationAuthorWriteSchema = publicationAuthorWriteSchema;
648
713
  exports.relatedIdentifierWriteSchema = relatedIdentifierWriteSchema;