@singi-labs/sifa-sdk 0.19.44 → 0.19.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atproto/index.js +9 -3
- package/dist/atproto/index.js.map +1 -1
- package/dist/badge/index.cjs.map +1 -1
- package/dist/badge/index.js +5 -141
- package/dist/badge/index.js.map +1 -1
- package/dist/cards/adult-content.js +14 -0
- package/dist/cards/adult-content.js.map +1 -0
- package/dist/cards/app-url-patterns.js +369 -0
- package/dist/cards/app-url-patterns.js.map +1 -0
- package/dist/cards/index.js +24 -0
- package/dist/cards/index.js.map +1 -0
- package/dist/cards/resolve-card-url.js +198 -0
- package/dist/cards/resolve-card-url.js.map +1 -0
- package/dist/cards/visibility.js +45 -0
- package/dist/cards/visibility.js.map +1 -0
- package/dist/flags/index.js +4 -3
- package/dist/flags/index.js.map +1 -1
- package/dist/format/collapse-contributors.js +19 -0
- package/dist/format/collapse-contributors.js.map +1 -0
- package/dist/format/company-name.js +61 -0
- package/dist/format/company-name.js.map +1 -0
- package/dist/format/compare-text.js +9 -0
- package/dist/format/compare-text.js.map +1 -0
- package/dist/format/doi.js +8 -0
- package/dist/format/doi.js.map +1 -0
- package/dist/format/embed.js +131 -0
- package/dist/format/embed.js.map +1 -0
- package/dist/format/endorsement-context.js +35 -0
- package/dist/format/endorsement-context.js.map +1 -0
- package/dist/format/format-display-url.js +42 -0
- package/dist/format/format-display-url.js.map +1 -0
- package/dist/format/format-duration.js +13 -0
- package/dist/format/format-duration.js.map +1 -0
- package/dist/format/format-time.js +30 -0
- package/dist/format/format-time.js.map +1 -0
- package/dist/format/handle-utils.js +19 -0
- package/dist/format/handle-utils.js.map +1 -0
- package/dist/format/index.js +106 -0
- package/dist/format/index.js.map +1 -0
- package/dist/format/location-segments.js +29 -0
- package/dist/format/location-segments.js.map +1 -0
- package/dist/format/location-utils.js +42 -0
- package/dist/format/location-utils.js.map +1 -0
- package/dist/format/meta-description.js +35 -0
- package/dist/format/meta-description.js.map +1 -0
- package/dist/format/normalize-company-key.js +12 -0
- package/dist/format/normalize-company-key.js.map +1 -0
- package/dist/format/normalize-legal-form.js +71 -0
- package/dist/format/normalize-legal-form.js.map +1 -0
- package/dist/format/pds-utils.js +73 -0
- package/dist/format/pds-utils.js.map +1 -0
- package/dist/format/sort-by-date.js +39 -0
- package/dist/format/sort-by-date.js.map +1 -0
- package/dist/format/summarize-deliveries.js +37 -0
- package/dist/format/summarize-deliveries.js.map +1 -0
- package/dist/format/talk-slug.js +21 -0
- package/dist/format/talk-slug.js.map +1 -0
- package/dist/format/text-sanitize.js +29 -0
- package/dist/format/text-sanitize.js.map +1 -0
- package/dist/format/text-truncate.js +14 -0
- package/dist/format/text-truncate.js.map +1 -0
- package/dist/format/time-utils.js +19 -0
- package/dist/format/time-utils.js.map +1 -0
- package/dist/format/timeline.js +33 -0
- package/dist/format/timeline.js.map +1 -0
- package/dist/format/wcag-contrast.js +34 -0
- package/dist/format/wcag-contrast.js.map +1 -0
- package/dist/import/index.js +22 -0
- package/dist/import/index.js.map +1 -0
- package/dist/import/presentation-csv.js +116 -0
- package/dist/import/presentation-csv.js.map +1 -0
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +677 -7086
- package/dist/index.js.map +1 -1
- package/dist/jev/index.js +18 -5
- package/dist/jev/index.js.map +1 -1
- package/dist/jsonld/index.cjs.map +1 -1
- package/dist/jsonld/index.js +30 -987
- package/dist/jsonld/index.js.map +1 -1
- package/dist/jsonld/profile.js +222 -0
- package/dist/jsonld/profile.js.map +1 -0
- package/dist/jsonld/terms.js +496 -0
- package/dist/jsonld/terms.js.map +1 -0
- package/dist/jsonld/url.js +17 -0
- package/dist/jsonld/url.js.map +1 -0
- package/dist/jsonld/works-graph.js +41 -0
- package/dist/jsonld/works-graph.js.map +1 -0
- package/dist/jsonld/works.js +178 -0
- package/dist/jsonld/works.js.map +1 -0
- package/dist/logic/actor-identity.js +8 -0
- package/dist/logic/actor-identity.js.map +1 -0
- package/dist/logic/agent-ref.js +24 -0
- package/dist/logic/agent-ref.js.map +1 -0
- package/dist/logic/company-page-indexable.js +23 -0
- package/dist/logic/company-page-indexable.js.map +1 -0
- package/dist/logic/date-lookahead.js +33 -0
- package/dist/logic/date-lookahead.js.map +1 -0
- package/dist/logic/domain-detect.js +43 -0
- package/dist/logic/domain-detect.js.map +1 -0
- package/dist/logic/entity-disambiguation.js +24 -0
- package/dist/logic/entity-disambiguation.js.map +1 -0
- package/dist/logic/entity-ref-anchor.js +33 -0
- package/dist/logic/entity-ref-anchor.js.map +1 -0
- package/dist/logic/index.js +91 -0
- package/dist/logic/index.js.map +1 -0
- package/dist/logic/org-floor.js +66 -0
- package/dist/logic/org-floor.js.map +1 -0
- package/dist/logic/primary-item.js +9 -0
- package/dist/logic/primary-item.js.map +1 -0
- package/dist/logic/primary-position.js +16 -0
- package/dist/logic/primary-position.js.map +1 -0
- package/dist/logic/profile-completeness.js +21 -0
- package/dist/logic/profile-completeness.js.map +1 -0
- package/dist/logic/profile-dimensions.js +50 -0
- package/dist/logic/profile-dimensions.js.map +1 -0
- package/dist/logic/profile-summary.js +23 -0
- package/dist/logic/profile-summary.js.map +1 -0
- package/dist/logic/pseudo-employer.js +34 -0
- package/dist/logic/pseudo-employer.js.map +1 -0
- package/dist/logic/recent-activity.js +10 -0
- package/dist/logic/recent-activity.js.map +1 -0
- package/dist/logic/self-app.js +10 -0
- package/dist/logic/self-app.js.map +1 -0
- package/dist/{org-BCrvebcf.d.ts → org-CxTEjjrm.d.ts} +1 -1
- package/dist/{org-settings-C73Sin5E.d.ts → org-settings-BShvhyFp.d.ts} +1 -1
- package/dist/profile/headline-role-dedupe.js +12 -0
- package/dist/profile/headline-role-dedupe.js.map +1 -0
- package/dist/profile/highlights.js +200 -0
- package/dist/profile/highlights.js.map +1 -0
- package/dist/profile/index.js +66 -0
- package/dist/profile/index.js.map +1 -0
- package/dist/profile/involvement-grouping.js +31 -0
- package/dist/profile/involvement-grouping.js.map +1 -0
- package/dist/profile/language-sort.js +24 -0
- package/dist/profile/language-sort.js.map +1 -0
- package/dist/profile/publication-versions.js +98 -0
- package/dist/profile/publication-versions.js.map +1 -0
- package/dist/profile/range-sort.js +14 -0
- package/dist/profile/range-sort.js.map +1 -0
- package/dist/profile/section-model.js +122 -0
- package/dist/profile/section-model.js.map +1 -0
- package/dist/profile/section-sorts.js +33 -0
- package/dist/profile/section-sorts.js.map +1 -0
- package/dist/publishers/index.js +16 -0
- package/dist/publishers/index.js.map +1 -0
- package/dist/publishers/registry.js +87 -0
- package/dist/publishers/registry.js.map +1 -0
- package/dist/publishing/index.js +46 -184
- package/dist/publishing/index.js.map +1 -1
- package/dist/publishing/linkblog.js +42 -0
- package/dist/publishing/linkblog.js.map +1 -0
- package/dist/publishing/registry.js +32 -0
- package/dist/publishing/registry.js.map +1 -0
- package/dist/publishing/schemas.js +74 -0
- package/dist/publishing/schemas.js.map +1 -0
- package/dist/publishing/types.js +32 -0
- package/dist/publishing/types.js.map +1 -0
- package/dist/query/client.js +119 -0
- package/dist/query/client.js.map +1 -0
- package/dist/query/config.js +23 -0
- package/dist/query/config.js.map +1 -0
- package/dist/query/fetchers/accounts.js +29 -0
- package/dist/query/fetchers/accounts.js.map +1 -0
- package/dist/query/fetchers/activity-items-hide.js +31 -0
- package/dist/query/fetchers/activity-items-hide.js.map +1 -0
- package/dist/query/fetchers/activity.js +61 -0
- package/dist/query/fetchers/activity.js.map +1 -0
- package/dist/query/fetchers/actor.js +30 -0
- package/dist/query/fetchers/actor.js.map +1 -0
- package/dist/query/fetchers/admin-feature-allowlists.js +41 -0
- package/dist/query/fetchers/admin-feature-allowlists.js.map +1 -0
- package/dist/query/fetchers/admin-review-queues.js +30 -0
- package/dist/query/fetchers/admin-review-queues.js.map +1 -0
- package/dist/query/fetchers/apps.js +31 -0
- package/dist/query/fetchers/apps.js.map +1 -0
- package/dist/query/fetchers/bsky-preferences.js +55 -0
- package/dist/query/fetchers/bsky-preferences.js.map +1 -0
- package/dist/query/fetchers/confirmations.js +55 -0
- package/dist/query/fetchers/confirmations.js.map +1 -0
- package/dist/query/fetchers/destructive.js +34 -0
- package/dist/query/fetchers/destructive.js.map +1 -0
- package/dist/query/fetchers/discovery.js +67 -0
- package/dist/query/fetchers/discovery.js.map +1 -0
- package/dist/query/fetchers/education.js +23 -0
- package/dist/query/fetchers/education.js.map +1 -0
- package/dist/query/fetchers/endorsement-inbox.js +36 -0
- package/dist/query/fetchers/endorsement-inbox.js.map +1 -0
- package/dist/query/fetchers/endorsement.js +23 -0
- package/dist/query/fetchers/endorsement.js.map +1 -0
- package/dist/query/fetchers/endorsements.js +20 -0
- package/dist/query/fetchers/endorsements.js.map +1 -0
- package/dist/query/fetchers/entities.js +65 -0
- package/dist/query/fetchers/entities.js.map +1 -0
- package/dist/query/fetchers/external-accounts.js +74 -0
- package/dist/query/fetchers/external-accounts.js.map +1 -0
- package/dist/query/fetchers/follow-extras.js +38 -0
- package/dist/query/fetchers/follow-extras.js.map +1 -0
- package/dist/query/fetchers/follow.js +105 -0
- package/dist/query/fetchers/follow.js.map +1 -0
- package/dist/query/fetchers/get-profile-view.js +21 -0
- package/dist/query/fetchers/get-profile-view.js.map +1 -0
- package/dist/query/fetchers/github-prs.js +45 -0
- package/dist/query/fetchers/github-prs.js.map +1 -0
- package/dist/query/fetchers/inbox.js +29 -0
- package/dist/query/fetchers/inbox.js.map +1 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.ts +2 -2
- package/dist/query/fetchers/index.js +360 -2045
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/fetchers/investments.js +18 -0
- package/dist/query/fetchers/investments.js.map +1 -0
- package/dist/query/fetchers/keytrace-claims.js +23 -0
- package/dist/query/fetchers/keytrace-claims.js.map +1 -0
- package/dist/query/fetchers/marque-domains.js +23 -0
- package/dist/query/fetchers/marque-domains.js.map +1 -0
- package/dist/query/fetchers/network-map.js +36 -0
- package/dist/query/fetchers/network-map.js.map +1 -0
- package/dist/query/fetchers/org.js +48 -0
- package/dist/query/fetchers/org.js.map +1 -0
- package/dist/query/fetchers/positions.js +77 -0
- package/dist/query/fetchers/positions.js.map +1 -0
- package/dist/query/fetchers/profile-completeness.js +45 -0
- package/dist/query/fetchers/profile-completeness.js.map +1 -0
- package/dist/query/fetchers/profile-items-hide.js +36 -0
- package/dist/query/fetchers/profile-items-hide.js.map +1 -0
- package/dist/query/fetchers/profile-locations.js +23 -0
- package/dist/query/fetchers/profile-locations.js.map +1 -0
- package/dist/query/fetchers/profile-mutations.js +82 -0
- package/dist/query/fetchers/profile-mutations.js.map +1 -0
- package/dist/query/fetchers/profile-summary.js +14 -0
- package/dist/query/fetchers/profile-summary.js.map +1 -0
- package/dist/query/fetchers/profile.js +31 -0
- package/dist/query/fetchers/profile.js.map +1 -0
- package/dist/query/fetchers/publications.js +66 -0
- package/dist/query/fetchers/publications.js.map +1 -0
- package/dist/query/fetchers/quoted-posts.js +40 -0
- package/dist/query/fetchers/quoted-posts.js.map +1 -0
- package/dist/query/fetchers/reactions.js +85 -0
- package/dist/query/fetchers/reactions.js.map +1 -0
- package/dist/query/fetchers/received-endorsements.js +20 -0
- package/dist/query/fetchers/received-endorsements.js.map +1 -0
- package/dist/query/fetchers/reciprocity.js +23 -0
- package/dist/query/fetchers/reciprocity.js.map +1 -0
- package/dist/query/fetchers/records.js +27 -0
- package/dist/query/fetchers/records.js.map +1 -0
- package/dist/query/fetchers/repo-inventory.js +23 -0
- package/dist/query/fetchers/repo-inventory.js.map +1 -0
- package/dist/query/fetchers/roadmap.js +73 -0
- package/dist/query/fetchers/roadmap.js.map +1 -0
- package/dist/query/fetchers/rpg.js +36 -0
- package/dist/query/fetchers/rpg.js.map +1 -0
- package/dist/query/fetchers/search.js +78 -0
- package/dist/query/fetchers/search.js.map +1 -0
- package/dist/query/fetchers/section-primary.js +23 -0
- package/dist/query/fetchers/section-primary.js.map +1 -0
- package/dist/query/fetchers/skills.js +30 -0
- package/dist/query/fetchers/skills.js.map +1 -0
- package/dist/query/fetchers/speakers.js +42 -0
- package/dist/query/fetchers/speakers.js.map +1 -0
- package/dist/query/fetchers/stats.js +16 -0
- package/dist/query/fetchers/stats.js.map +1 -0
- package/dist/query/fetchers/stream.js +30 -0
- package/dist/query/fetchers/stream.js.map +1 -0
- package/dist/query/fetchers/unlinked-positions.js +30 -0
- package/dist/query/fetchers/unlinked-positions.js.map +1 -0
- package/dist/query/hooks/index.d.ts +3 -3
- package/dist/query/hooks/index.js +283 -3555
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/hooks/use-accounts.js +19 -0
- package/dist/query/hooks/use-accounts.js.map +1 -0
- package/dist/query/hooks/use-activity-items-hide.js +52 -0
- package/dist/query/hooks/use-activity-items-hide.js.map +1 -0
- package/dist/query/hooks/use-activity.js +44 -0
- package/dist/query/hooks/use-activity.js.map +1 -0
- package/dist/query/hooks/use-admin-review-queues.js +21 -0
- package/dist/query/hooks/use-admin-review-queues.js.map +1 -0
- package/dist/query/hooks/use-apps.js +31 -0
- package/dist/query/hooks/use-apps.js.map +1 -0
- package/dist/query/hooks/use-bsky-content-prefs.js +45 -0
- package/dist/query/hooks/use-bsky-content-prefs.js.map +1 -0
- package/dist/query/hooks/use-confirmations.js +121 -0
- package/dist/query/hooks/use-confirmations.js.map +1 -0
- package/dist/query/hooks/use-create-position.js +28 -0
- package/dist/query/hooks/use-create-position.js.map +1 -0
- package/dist/query/hooks/use-destructive.js +63 -0
- package/dist/query/hooks/use-destructive.js.map +1 -0
- package/dist/query/hooks/use-discovery.js +53 -0
- package/dist/query/hooks/use-discovery.js.map +1 -0
- package/dist/query/hooks/use-education-mutations.js +67 -0
- package/dist/query/hooks/use-education-mutations.js.map +1 -0
- package/dist/query/hooks/use-endorsement-inbox.js +80 -0
- package/dist/query/hooks/use-endorsement-inbox.js.map +1 -0
- package/dist/query/hooks/use-endorsement-mutations.js +33 -0
- package/dist/query/hooks/use-endorsement-mutations.js.map +1 -0
- package/dist/query/hooks/use-endorsement.js +20 -0
- package/dist/query/hooks/use-endorsement.js.map +1 -0
- package/dist/query/hooks/use-entity-search.js +73 -0
- package/dist/query/hooks/use-entity-search.js.map +1 -0
- package/dist/query/hooks/use-external-accounts.js +143 -0
- package/dist/query/hooks/use-external-accounts.js.map +1 -0
- package/dist/query/hooks/use-feature-allowlist.js +104 -0
- package/dist/query/hooks/use-feature-allowlist.js.map +1 -0
- package/dist/query/hooks/use-follow-extras.js +38 -0
- package/dist/query/hooks/use-follow-extras.js.map +1 -0
- package/dist/query/hooks/use-follow.js +113 -0
- package/dist/query/hooks/use-follow.js.map +1 -0
- package/dist/query/hooks/use-get-profile-view.js +20 -0
- package/dist/query/hooks/use-get-profile-view.js.map +1 -0
- package/dist/query/hooks/use-github-prs.js +21 -0
- package/dist/query/hooks/use-github-prs.js.map +1 -0
- package/dist/query/hooks/use-inbox.js +19 -0
- package/dist/query/hooks/use-inbox.js.map +1 -0
- package/dist/query/hooks/use-investment-mutations.js +65 -0
- package/dist/query/hooks/use-investment-mutations.js.map +1 -0
- package/dist/query/hooks/use-keytrace-claims.js +50 -0
- package/dist/query/hooks/use-keytrace-claims.js.map +1 -0
- package/dist/query/hooks/use-location-mutations.js +71 -0
- package/dist/query/hooks/use-location-mutations.js.map +1 -0
- package/dist/query/hooks/use-marque-domains.js +50 -0
- package/dist/query/hooks/use-marque-domains.js.map +1 -0
- package/dist/query/hooks/use-org-claim.js +29 -0
- package/dist/query/hooks/use-org-claim.js.map +1 -0
- package/dist/query/hooks/use-org-domains.js +28 -0
- package/dist/query/hooks/use-org-domains.js.map +1 -0
- package/dist/query/hooks/use-org-notification-emails.js +28 -0
- package/dist/query/hooks/use-org-notification-emails.js.map +1 -0
- package/dist/query/hooks/use-org-profile-settings.js +29 -0
- package/dist/query/hooks/use-org-profile-settings.js.map +1 -0
- package/dist/query/hooks/use-org-profile.js +21 -0
- package/dist/query/hooks/use-org-profile.js.map +1 -0
- package/dist/query/hooks/use-position-mutations.js +128 -0
- package/dist/query/hooks/use-position-mutations.js.map +1 -0
- package/dist/query/hooks/use-profile-completeness.js +21 -0
- package/dist/query/hooks/use-profile-completeness.js.map +1 -0
- package/dist/query/hooks/use-profile-items-hide.js +53 -0
- package/dist/query/hooks/use-profile-items-hide.js.map +1 -0
- package/dist/query/hooks/use-profile-mutations.js +143 -0
- package/dist/query/hooks/use-profile-mutations.js.map +1 -0
- package/dist/query/hooks/use-profile.js +30 -0
- package/dist/query/hooks/use-profile.js.map +1 -0
- package/dist/query/hooks/use-publication-mutations.js +90 -0
- package/dist/query/hooks/use-publication-mutations.js.map +1 -0
- package/dist/query/hooks/use-reaction-mutations.js +48 -0
- package/dist/query/hooks/use-reaction-mutations.js.map +1 -0
- package/dist/query/hooks/use-reactions.js +32 -0
- package/dist/query/hooks/use-reactions.js.map +1 -0
- package/dist/query/hooks/use-received-endorsements.js +23 -0
- package/dist/query/hooks/use-received-endorsements.js.map +1 -0
- package/dist/query/hooks/use-reciprocity.js +19 -0
- package/dist/query/hooks/use-reciprocity.js.map +1 -0
- package/dist/query/hooks/use-record-mutations.js +67 -0
- package/dist/query/hooks/use-record-mutations.js.map +1 -0
- package/dist/query/hooks/use-repo-inventory.js +43 -0
- package/dist/query/hooks/use-repo-inventory.js.map +1 -0
- package/dist/query/hooks/use-roadmap-mutations.js +51 -0
- package/dist/query/hooks/use-roadmap-mutations.js.map +1 -0
- package/dist/query/hooks/use-roadmap.js +31 -0
- package/dist/query/hooks/use-roadmap.js.map +1 -0
- package/dist/query/hooks/use-search.js +63 -0
- package/dist/query/hooks/use-search.js.map +1 -0
- package/dist/query/hooks/use-section-primary-mutations.js +53 -0
- package/dist/query/hooks/use-section-primary-mutations.js.map +1 -0
- package/dist/query/hooks/use-skill-mutations.js +91 -0
- package/dist/query/hooks/use-skill-mutations.js.map +1 -0
- package/dist/query/hooks/use-stats.js +19 -0
- package/dist/query/hooks/use-stats.js.map +1 -0
- package/dist/query/hooks/use-stream.js +20 -0
- package/dist/query/hooks/use-stream.js.map +1 -0
- package/dist/query/hooks/use-unlinked-positions.js +45 -0
- package/dist/query/hooks/use-unlinked-positions.js.map +1 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.ts +4 -4
- package/dist/query/index.js +685 -3744
- package/dist/query/index.js.map +1 -1
- package/dist/query/keys.js +138 -0
- package/dist/query/keys.js.map +1 -0
- package/dist/repo/groups.js +81 -0
- package/dist/repo/groups.js.map +1 -0
- package/dist/repo/index.js +9 -0
- package/dist/repo/index.js.map +1 -0
- package/dist/repo/labels.js +121 -0
- package/dist/repo/labels.js.map +1 -0
- package/dist/repo/types.js +1 -0
- package/dist/repo/types.js.map +1 -0
- package/dist/resume/index.js +5 -179
- package/dist/resume/index.js.map +1 -1
- package/dist/resume/json-resume.js +153 -0
- package/dist/resume/json-resume.js.map +1 -0
- package/dist/roadmap/index.js +101 -0
- package/dist/roadmap/index.js.map +1 -0
- package/dist/rpg/catalog.js +101 -0
- package/dist/rpg/catalog.js.map +1 -0
- package/dist/rpg/index.js +13 -116
- package/dist/rpg/index.js.map +1 -1
- package/dist/rpg/unlocks.js +21 -0
- package/dist/rpg/unlocks.js.map +1 -0
- package/dist/schemas/blob-ref.js +12 -0
- package/dist/schemas/blob-ref.js.map +1 -0
- package/dist/schemas/confirmation.js +23 -0
- package/dist/schemas/confirmation.js.map +1 -0
- package/dist/schemas/endorsement-confirmation.js +18 -0
- package/dist/schemas/endorsement-confirmation.js.map +1 -0
- package/dist/schemas/endorsement.js +19 -0
- package/dist/schemas/endorsement.js.map +1 -0
- package/dist/schemas/entity.js +74 -0
- package/dist/schemas/entity.js.map +1 -0
- package/dist/schemas/feed.js +73 -0
- package/dist/schemas/feed.js.map +1 -0
- package/dist/schemas/follow-profile.js +32 -0
- package/dist/schemas/follow-profile.js.map +1 -0
- package/dist/schemas/graph-follow.js +19 -0
- package/dist/schemas/graph-follow.js.map +1 -0
- package/dist/schemas/index.js +164 -629
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/org-employment-attestation.js +28 -0
- package/dist/schemas/org-employment-attestation.js.map +1 -0
- package/dist/schemas/org-profile.js +64 -0
- package/dist/schemas/org-profile.js.map +1 -0
- package/dist/schemas/profile-certification.js +28 -0
- package/dist/schemas/profile-certification.js.map +1 -0
- package/dist/schemas/profile-course.js +32 -0
- package/dist/schemas/profile-course.js.map +1 -0
- package/dist/schemas/profile-education.js +33 -0
- package/dist/schemas/profile-education.js.map +1 -0
- package/dist/schemas/profile-external-account.js +15 -0
- package/dist/schemas/profile-external-account.js.map +1 -0
- package/dist/schemas/profile-honor.js +18 -0
- package/dist/schemas/profile-honor.js.map +1 -0
- package/dist/schemas/profile-investment.js +48 -0
- package/dist/schemas/profile-investment.js.map +1 -0
- package/dist/schemas/profile-involvement.js +47 -0
- package/dist/schemas/profile-involvement.js.map +1 -0
- package/dist/schemas/profile-language.js +12 -0
- package/dist/schemas/profile-language.js.map +1 -0
- package/dist/schemas/profile-position.js +42 -0
- package/dist/schemas/profile-position.js.map +1 -0
- package/dist/schemas/profile-presentation-delivery.js +38 -0
- package/dist/schemas/profile-presentation-delivery.js.map +1 -0
- package/dist/schemas/profile-presentation.js +36 -0
- package/dist/schemas/profile-presentation.js.map +1 -0
- package/dist/schemas/profile-project.js +48 -0
- package/dist/schemas/profile-project.js.map +1 -0
- package/dist/schemas/profile-publication.js +30 -0
- package/dist/schemas/profile-publication.js.map +1 -0
- package/dist/schemas/profile-self.js +22 -0
- package/dist/schemas/profile-self.js.map +1 -0
- package/dist/schemas/profile-skill.js +13 -0
- package/dist/schemas/profile-skill.js.map +1 -0
- package/dist/schemas/profile-volunteering.js +20 -0
- package/dist/schemas/profile-volunteering.js.map +1 -0
- package/dist/schemas/shared.js +56 -0
- package/dist/schemas/shared.js.map +1 -0
- package/dist/schemas/write/certification.js +16 -0
- package/dist/schemas/write/certification.js.map +1 -0
- package/dist/schemas/write/course.js +36 -0
- package/dist/schemas/write/course.js.map +1 -0
- package/dist/schemas/write/education.js +18 -0
- package/dist/schemas/write/education.js.map +1 -0
- package/dist/schemas/write/external-account.js +13 -0
- package/dist/schemas/write/external-account.js.map +1 -0
- package/dist/schemas/write/honor.js +14 -0
- package/dist/schemas/write/honor.js.map +1 -0
- package/dist/schemas/write/index.d.ts +1 -1
- package/dist/schemas/write/index.js +89 -593
- package/dist/schemas/write/index.js.map +1 -1
- package/dist/schemas/write/investment.js +32 -0
- package/dist/schemas/write/investment.js.map +1 -0
- package/dist/schemas/write/involvement.js +34 -0
- package/dist/schemas/write/involvement.js.map +1 -0
- package/dist/schemas/write/language.js +10 -0
- package/dist/schemas/write/language.js.map +1 -0
- package/dist/schemas/write/org-claim.js +56 -0
- package/dist/schemas/write/org-claim.js.map +1 -0
- package/dist/schemas/write/org-employment-attestation.js +19 -0
- package/dist/schemas/write/org-employment-attestation.js.map +1 -0
- package/dist/schemas/write/org-profile.js +54 -0
- package/dist/schemas/write/org-profile.js.map +1 -0
- package/dist/schemas/write/org-settings.js +81 -0
- package/dist/schemas/write/org-settings.js.map +1 -0
- package/dist/schemas/write/position.js +24 -0
- package/dist/schemas/write/position.js.map +1 -0
- package/dist/schemas/write/presentation-delivery.js +34 -0
- package/dist/schemas/write/presentation-delivery.js.map +1 -0
- package/dist/schemas/write/presentation.js +23 -0
- package/dist/schemas/write/presentation.js.map +1 -0
- package/dist/schemas/write/profile-location.js +21 -0
- package/dist/schemas/write/profile-location.js.map +1 -0
- package/dist/schemas/write/profile-self.js +27 -0
- package/dist/schemas/write/profile-self.js.map +1 -0
- package/dist/schemas/write/project.js +27 -0
- package/dist/schemas/write/project.js.map +1 -0
- package/dist/schemas/write/publication.js +41 -0
- package/dist/schemas/write/publication.js.map +1 -0
- package/dist/schemas/write/shared.js +96 -0
- package/dist/schemas/write/shared.js.map +1 -0
- package/dist/schemas/write/skill.js +18 -0
- package/dist/schemas/write/skill.js.map +1 -0
- package/dist/schemas/write/volunteering.js +16 -0
- package/dist/schemas/write/volunteering.js.map +1 -0
- package/dist/stream/activity-item.js +1 -0
- package/dist/stream/activity-item.js.map +1 -0
- package/dist/stream/index.js +49 -0
- package/dist/stream/index.js.map +1 -0
- package/dist/stream/stream-card-vm-schema.js +265 -0
- package/dist/stream/stream-card-vm-schema.js.map +1 -0
- package/dist/stream/stream-card-vm.js +1 -0
- package/dist/stream/stream-card-vm.js.map +1 -0
- package/dist/stream/to-stream-card-vm.js +793 -0
- package/dist/stream/to-stream-card-vm.js.map +1 -0
- package/dist/stream/two-tier.js +30 -0
- package/dist/stream/two-tier.js.map +1 -0
- package/dist/stream/verbs.js +120 -0
- package/dist/stream/verbs.js.map +1 -0
- package/dist/taxonomy/activity-tiers.js +956 -0
- package/dist/taxonomy/activity-tiers.js.map +1 -0
- package/dist/taxonomy/app-categories.js +42 -0
- package/dist/taxonomy/app-categories.js.map +1 -0
- package/dist/taxonomy/app-category-map.js +166 -0
- package/dist/taxonomy/app-category-map.js.map +1 -0
- package/dist/taxonomy/artifact-link-kind.js +29 -0
- package/dist/taxonomy/artifact-link-kind.js.map +1 -0
- package/dist/taxonomy/calendar-event.js +28 -0
- package/dist/taxonomy/calendar-event.js.map +1 -0
- package/dist/taxonomy/continents.js +215 -0
- package/dist/taxonomy/continents.js.map +1 -0
- package/dist/taxonomy/countries.js +203 -0
- package/dist/taxonomy/countries.js.map +1 -0
- package/dist/taxonomy/course-role.js +37 -0
- package/dist/taxonomy/course-role.js.map +1 -0
- package/dist/taxonomy/employment-type.js +82 -0
- package/dist/taxonomy/employment-type.js.map +1 -0
- package/dist/taxonomy/eqf-level.js +59 -0
- package/dist/taxonomy/eqf-level.js.map +1 -0
- package/dist/taxonomy/index.js +263 -0
- package/dist/taxonomy/index.js.map +1 -0
- package/dist/taxonomy/industry-taxonomy.js +281 -0
- package/dist/taxonomy/industry-taxonomy.js.map +1 -0
- package/dist/taxonomy/investment.js +54 -0
- package/dist/taxonomy/investment.js.map +1 -0
- package/dist/taxonomy/involvement-kind.js +30 -0
- package/dist/taxonomy/involvement-kind.js.map +1 -0
- package/dist/taxonomy/open-to.js +128 -0
- package/dist/taxonomy/open-to.js.map +1 -0
- package/dist/taxonomy/platforms.js +56 -0
- package/dist/taxonomy/platforms.js.map +1 -0
- package/dist/taxonomy/presentation-link-type.js +22 -0
- package/dist/taxonomy/presentation-link-type.js.map +1 -0
- package/dist/taxonomy/presentation-role.js +21 -0
- package/dist/taxonomy/presentation-role.js.map +1 -0
- package/dist/taxonomy/publication-type.js +54 -0
- package/dist/taxonomy/publication-type.js.map +1 -0
- package/dist/taxonomy/relational.js +25 -0
- package/dist/taxonomy/relational.js.map +1 -0
- package/dist/taxonomy/search-filter-defs.js +66 -0
- package/dist/taxonomy/search-filter-defs.js.map +1 -0
- package/dist/taxonomy/skill-categories.js +28 -0
- package/dist/taxonomy/skill-categories.js.map +1 -0
- package/dist/taxonomy/skill-display-groups.js +12 -0
- package/dist/taxonomy/skill-display-groups.js.map +1 -0
- package/dist/taxonomy/skill-grouping.js +90 -0
- package/dist/taxonomy/skill-grouping.js.map +1 -0
- package/dist/taxonomy/verification-providers.js +69 -0
- package/dist/taxonomy/verification-providers.js.map +1 -0
- package/dist/taxonomy/workplace-type.js +38 -0
- package/dist/taxonomy/workplace-type.js.map +1 -0
- package/dist/tokens/colors.js +11 -0
- package/dist/tokens/colors.js.map +1 -0
- package/dist/tokens/icons.js +15 -0
- package/dist/tokens/icons.js.map +1 -0
- package/dist/tokens/index.js +10 -39
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/typography.js +23 -0
- package/dist/tokens/typography.js.map +1 -0
- package/dist/types/index.js +10 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/profile-view.js +1 -0
- package/dist/types/profile-view.js.map +1 -0
- package/dist/{use-org-notification-emails-0hjt-dEw.d.ts → use-org-notification-emails-CWWi1D8t.d.ts} +2 -2
- package/package.json +4 -3
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/schemas/write/presentation-delivery.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import {
|
|
4
|
+
externalRecordRefSchema,
|
|
5
|
+
isValidPartialDate,
|
|
6
|
+
presentationLinkSchema,
|
|
7
|
+
writeLocationSchema
|
|
8
|
+
} from "./shared.js";
|
|
9
|
+
var PresentationDeliveryWriteSchema = z.object({
|
|
10
|
+
presentationRef: externalRecordRefSchema.optional(),
|
|
11
|
+
/**
|
|
12
|
+
* The same session as recorded on another person's profile. Distinct from
|
|
13
|
+
* presentationRef above, which points at the talk this session delivered.
|
|
14
|
+
*/
|
|
15
|
+
sameAs: externalRecordRefSchema.optional(),
|
|
16
|
+
title: z.string().max(3e3).nullable().optional(),
|
|
17
|
+
role: z.string().max(640).nullable().optional(),
|
|
18
|
+
eventName: z.string().max(3e3).nullable().optional(),
|
|
19
|
+
// YYYY-MM-DD, or YYYY-MM / YYYY when the exact day is unknown.
|
|
20
|
+
date: z.string().refine(isValidPartialDate, "must be a valid YYYY, YYYY-MM or YYYY-MM-DD date").nullable().optional(),
|
|
21
|
+
location: z.string().max(2560).nullable().optional(),
|
|
22
|
+
// Structured community.lexicon.location.address; `location` above stays as
|
|
23
|
+
// the legacy free-text fallback. writeLocationSchema is already nullable+optional.
|
|
24
|
+
address: writeLocationSchema,
|
|
25
|
+
mode: z.string().max(256).nullable().optional(),
|
|
26
|
+
status: z.string().max(256).nullable().optional(),
|
|
27
|
+
links: z.array(presentationLinkSchema).max(20).optional(),
|
|
28
|
+
eventRef: externalRecordRefSchema.optional(),
|
|
29
|
+
coSpeakers: z.array(z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID")).max(20).optional()
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
PresentationDeliveryWriteSchema
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=presentation-delivery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/write/presentation-delivery.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport {\n externalRecordRefSchema,\n isValidPartialDate,\n presentationLinkSchema,\n writeLocationSchema,\n} from './shared.js';\n\n/**\n * Schema enforced by the generic-record write endpoint for `id.sifa.profile.presentationDelivery`.\n *\n * Records a specific delivery of a presentation (e.g., at a conference).\n * `presentationRef` optionally points at the parent `id.sifa.profile.presentation`\n * record; `eventRef` optionally links a Sifa event record; `coSpeakers` are\n * DIDs of people who delivered alongside the profile owner.\n */\nexport const PresentationDeliveryWriteSchema = z.object({\n presentationRef: externalRecordRefSchema.optional(),\n /**\n * The same session as recorded on another person's profile. Distinct from\n * presentationRef above, which points at the talk this session delivered.\n */\n sameAs: externalRecordRefSchema.optional(),\n title: z.string().max(3000).nullable().optional(),\n role: z.string().max(640).nullable().optional(),\n eventName: z.string().max(3000).nullable().optional(),\n // YYYY-MM-DD, or YYYY-MM / YYYY when the exact day is unknown.\n date: z\n .string()\n .refine(isValidPartialDate, 'must be a valid YYYY, YYYY-MM or YYYY-MM-DD date')\n .nullable()\n .optional(),\n location: z.string().max(2560).nullable().optional(),\n // Structured community.lexicon.location.address; `location` above stays as\n // the legacy free-text fallback. writeLocationSchema is already nullable+optional.\n address: writeLocationSchema,\n mode: z.string().max(256).nullable().optional(),\n status: z.string().max(256).nullable().optional(),\n links: z.array(presentationLinkSchema).max(20).optional(),\n eventRef: externalRecordRefSchema.optional(),\n coSpeakers: z\n .array(z.string().regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID'))\n .max(20)\n .optional(),\n});\n\nexport type PresentationDeliveryWriteInput = z.infer<typeof PresentationDeliveryWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,IAAM,kCAAkC,EAAE,OAAO;AAAA,EACtD,iBAAiB,wBAAwB,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAKlD,QAAQ,wBAAwB,SAAS;AAAA,EACzC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EAChD,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,WAAW,EAAE,OAAO,EAAE,IAAI,GAAI,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA,EAEpD,MAAM,EACH,OAAO,EACP,OAAO,oBAAoB,kDAAkD,EAC7E,SAAS,EACT,SAAS;AAAA,EACZ,UAAU,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA;AAAA,EAGnD,SAAS;AAAA,EACT,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAChD,OAAO,EAAE,MAAM,sBAAsB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACxD,UAAU,wBAAwB,SAAS;AAAA,EAC3C,YAAY,EACT,MAAM,EAAE,OAAO,EAAE,MAAM,uBAAuB,eAAe,CAAC,EAC9D,IAAI,EAAE,EACN,SAAS;AACd,CAAC;","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/schemas/write/presentation.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { BlobRefSchema } from "../blob-ref.js";
|
|
4
|
+
import { externalRecordRefSchema, presentationLinkSchema } from "./shared.js";
|
|
5
|
+
var PresentationWriteSchema = z.object({
|
|
6
|
+
title: z.string().min(1).max(3e3),
|
|
7
|
+
description: z.string().max(5e4).nullable().optional(),
|
|
8
|
+
duration: z.object({
|
|
9
|
+
minMinutes: z.number().int().min(1),
|
|
10
|
+
maxMinutes: z.number().int().min(1).optional()
|
|
11
|
+
}).refine((d) => d.maxMinutes === void 0 || d.maxMinutes >= d.minMinutes, {
|
|
12
|
+
message: "maxMinutes must be greater than or equal to minMinutes",
|
|
13
|
+
path: ["maxMinutes"]
|
|
14
|
+
}).optional(),
|
|
15
|
+
intendedAudiences: z.array(z.string().max(1e3)).max(20).optional(),
|
|
16
|
+
links: z.array(presentationLinkSchema).max(20).optional(),
|
|
17
|
+
writeupRef: externalRecordRefSchema.optional(),
|
|
18
|
+
coverImage: BlobRefSchema.nullable().optional()
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
PresentationWriteSchema
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=presentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/write/presentation.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { BlobRefSchema } from '../blob-ref.js';\nimport { externalRecordRefSchema, presentationLinkSchema } from './shared.js';\n\n/**\n * Schema enforced by the generic-record write endpoint for `id.sifa.profile.presentation`.\n *\n * Describes a talk / presentation the user can give. `duration` bounds the\n * runtime; `intendedAudiences` names who it's aimed at; `writeupRef` is an\n * optional at-uri pointer to a companion writeup record.\n */\nexport const PresentationWriteSchema = z.object({\n title: z.string().min(1).max(3000),\n description: z.string().max(50000).nullable().optional(),\n duration: z\n .object({\n minMinutes: z.number().int().min(1),\n maxMinutes: z.number().int().min(1).optional(),\n })\n .refine((d) => d.maxMinutes === undefined || d.maxMinutes >= d.minMinutes, {\n message: 'maxMinutes must be greater than or equal to minMinutes',\n path: ['maxMinutes'],\n })\n .optional(),\n intendedAudiences: z.array(z.string().max(1000)).max(20).optional(),\n links: z.array(presentationLinkSchema).max(20).optional(),\n writeupRef: externalRecordRefSchema.optional(),\n coverImage: BlobRefSchema.nullable().optional(),\n});\n\nexport type PresentationWriteInput = z.infer<typeof PresentationWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB,8BAA8B;AASzD,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAI;AAAA,EACjC,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,UAAU,EACP,OAAO;AAAA,IACN,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC;AAAA,IAClC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EAC/C,CAAC,EACA,OAAO,CAAC,MAAM,EAAE,eAAe,UAAa,EAAE,cAAc,EAAE,YAAY;AAAA,IACzE,SAAS;AAAA,IACT,MAAM,CAAC,YAAY;AAAA,EACrB,CAAC,EACA,SAAS;AAAA,EACZ,mBAAmB,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,GAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAClE,OAAO,EAAE,MAAM,sBAAsB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACxD,YAAY,wBAAwB,SAAS;AAAA,EAC7C,YAAY,cAAc,SAAS,EAAE,SAAS;AAChD,CAAC;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/schemas/write/profile-location.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var ProfileLocationWriteSchema = z.object({
|
|
4
|
+
address: z.object({
|
|
5
|
+
country: z.string().nullish(),
|
|
6
|
+
countryCode: z.string().length(2).nullish(),
|
|
7
|
+
region: z.string().nullish(),
|
|
8
|
+
city: z.string().nullish(),
|
|
9
|
+
locality: z.string().nullish(),
|
|
10
|
+
street: z.string().nullish(),
|
|
11
|
+
postalCode: z.string().nullish(),
|
|
12
|
+
name: z.string().nullish()
|
|
13
|
+
}),
|
|
14
|
+
type: z.string().min(1),
|
|
15
|
+
label: z.string().max(60).nullable().optional(),
|
|
16
|
+
isPrimary: z.boolean().optional()
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
ProfileLocationWriteSchema
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=profile-location.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/write/profile-location.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Schema enforced by `POST /profile/locations` on sifa-api.\n *\n * Mirrors the inner object of `writeLocationSchema`: accepts both the community\n * shape (`country`, `locality`) and the legacy shape (`countryCode`, `city`)\n * during the dual-read window. sifa-web #840 switched outbound writes to the\n * community shape; older clients may still send the legacy shape. All address\n * fields are `.nullish()` so explicit `null` from API echoes is accepted\n * (see sifa-api #426).\n *\n * The route handler hands `address` to `buildPdsLocation`, which normalizes\n * either input and enforces alpha-2 on the wire to PDS — returning a 400 with\n * `message: \"address.country (alpha-2) is required\"` when no usable code is\n * present. The schema stays permissive on country length here and lets\n * `buildPdsLocation` be the single enforcement point.\n */\nexport const ProfileLocationWriteSchema = z.object({\n address: z.object({\n country: z.string().nullish(),\n countryCode: z.string().length(2).nullish(),\n region: z.string().nullish(),\n city: z.string().nullish(),\n locality: z.string().nullish(),\n street: z.string().nullish(),\n postalCode: z.string().nullish(),\n name: z.string().nullish(),\n }),\n type: z.string().min(1),\n label: z.string().max(60).nullable().optional(),\n isPrimary: z.boolean().optional(),\n});\n\nexport type ProfileLocationWriteInput = z.infer<typeof ProfileLocationWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAkBX,IAAM,6BAA6B,EAAE,OAAO;AAAA,EACjD,SAAS,EAAE,OAAO;AAAA,IAChB,SAAS,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC5B,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,QAAQ;AAAA,IAC1C,QAAQ,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC3B,MAAM,EAAE,OAAO,EAAE,QAAQ;AAAA,IACzB,UAAU,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC7B,QAAQ,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC3B,YAAY,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC/B,MAAM,EAAE,OAAO,EAAE,QAAQ;AAAA,EAC3B,CAAC;AAAA,EACD,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACtB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,WAAW,EAAE,QAAQ,EAAE,SAAS;AAClC,CAAC;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// src/schemas/write/profile-self.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { writeLocationSchema } from "./shared.js";
|
|
4
|
+
var ProfileSelfWriteSchema = z.object({
|
|
5
|
+
headline: z.string().max(300).optional(),
|
|
6
|
+
about: z.string().max(5e4).optional(),
|
|
7
|
+
givenName: z.string().max(640).optional(),
|
|
8
|
+
familyName: z.string().max(640).optional(),
|
|
9
|
+
namePronunciation: z.string().max(640).optional(),
|
|
10
|
+
industries: z.array(
|
|
11
|
+
z.object({
|
|
12
|
+
industry: z.string().max(100),
|
|
13
|
+
domain: z.string().max(100).optional()
|
|
14
|
+
})
|
|
15
|
+
).max(10).optional(),
|
|
16
|
+
location: writeLocationSchema,
|
|
17
|
+
openTo: z.array(z.string()).max(10).optional(),
|
|
18
|
+
preferredWorkplace: z.array(z.string()).max(5).optional(),
|
|
19
|
+
availableFromUtc: z.number().int().min(0).max(23).optional(),
|
|
20
|
+
availableToUtc: z.number().int().min(0).max(23).optional(),
|
|
21
|
+
langs: z.array(z.string()).max(3).optional(),
|
|
22
|
+
discoverable: z.boolean().optional()
|
|
23
|
+
}).passthrough();
|
|
24
|
+
export {
|
|
25
|
+
ProfileSelfWriteSchema
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=profile-self.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/write/profile-self.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { writeLocationSchema } from './shared.js';\n\n/**\n * Schema enforced by `POST /profile/self` on sifa-api.\n *\n * `.passthrough()` so the API accepts fields not yet enumerated here (used for\n * gradual rollout of new profile-self keys without requiring lockstep bumps\n * between web/api). Note this means client validation on this schema will\n * NEVER reject \"unknown\" fields — the divergence is intentional.\n *\n * Grapheme caps (e.g. 64 on given/familyName) are enforced client-side by the\n * SDK's lexicon schema; the write schema only guards the byte-length ceiling.\n */\nexport const ProfileSelfWriteSchema = z\n .object({\n headline: z.string().max(300).optional(),\n about: z.string().max(50000).optional(),\n givenName: z.string().max(640).optional(),\n familyName: z.string().max(640).optional(),\n namePronunciation: z.string().max(640).optional(),\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 location: writeLocationSchema,\n openTo: z.array(z.string()).max(10).optional(),\n preferredWorkplace: z.array(z.string()).max(5).optional(),\n availableFromUtc: z.number().int().min(0).max(23).optional(),\n availableToUtc: z.number().int().min(0).max(23).optional(),\n langs: z.array(z.string()).max(3).optional(),\n discoverable: z.boolean().optional(),\n })\n .passthrough();\n\nexport type ProfileSelfWriteInput = z.infer<typeof ProfileSelfWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,2BAA2B;AAa7B,IAAM,yBAAyB,EACnC,OAAO;AAAA,EACN,UAAU,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EACvC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS;AAAA,EACtC,WAAW,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EACxC,YAAY,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EACzC,mBAAmB,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EAChD,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,EACZ,UAAU;AAAA,EACV,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAC7C,oBAAoB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EACxD,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAC3D,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EACzD,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EAC3C,cAAc,EAAE,QAAQ,EAAE,SAAS;AACrC,CAAC,EACA,YAAY;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// src/schemas/write/project.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { externalRecordRefSchema, optionalUrl } from "./shared.js";
|
|
4
|
+
var projectMemberWriteSchema = z.object({
|
|
5
|
+
did: z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID"),
|
|
6
|
+
role: z.string().max(256).nullable().optional(),
|
|
7
|
+
title: z.string().max(1280).nullable().optional()
|
|
8
|
+
});
|
|
9
|
+
var ProjectWriteSchema = z.object({
|
|
10
|
+
name: z.string().min(1).max(256),
|
|
11
|
+
/** The user's own role on the project (#596), e.g. Maintainer. */
|
|
12
|
+
role: z.string().max(256).nullable().optional(),
|
|
13
|
+
description: z.string().max(5e4).nullable().optional(),
|
|
14
|
+
url: optionalUrl(),
|
|
15
|
+
members: z.array(projectMemberWriteSchema).max(50).optional(),
|
|
16
|
+
/** The canonical project.self this entry corresponds to. Composition, not peer sameness. */
|
|
17
|
+
projectRef: externalRecordRefSchema.optional(),
|
|
18
|
+
/** The same project as recorded on another person's profile. */
|
|
19
|
+
sameAs: externalRecordRefSchema.optional(),
|
|
20
|
+
startedAt: z.string().nullable().optional(),
|
|
21
|
+
endedAt: z.string().nullable().optional()
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
ProjectWriteSchema,
|
|
25
|
+
projectMemberWriteSchema
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/write/project.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { externalRecordRefSchema, optionalUrl } from './shared.js';\n\n/**\n * A person named as a member of the project. Naming someone is a claim: they\n * render as a bare handle until they publish an `id.sifa.confirmation`, and\n * confirming never puts this record on their profile. `role` is display only.\n */\nexport const projectMemberWriteSchema = z.object({\n did: z.string().regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID'),\n role: z.string().max(256).nullable().optional(),\n title: z.string().max(1280).nullable().optional(),\n});\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.project`. */\nexport const ProjectWriteSchema = z.object({\n name: z.string().min(1).max(256),\n /** The user's own role on the project (#596), e.g. Maintainer. */\n role: z.string().max(256).nullable().optional(),\n description: z.string().max(50000).nullable().optional(),\n url: optionalUrl(),\n members: z.array(projectMemberWriteSchema).max(50).optional(),\n /** The canonical project.self this entry corresponds to. Composition, not peer sameness. */\n projectRef: externalRecordRefSchema.optional(),\n /** The same project as recorded on another person's profile. */\n sameAs: externalRecordRefSchema.optional(),\n startedAt: z.string().nullable().optional(),\n endedAt: z.string().nullable().optional(),\n});\n\nexport type ProjectWriteInput = z.infer<typeof ProjectWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,yBAAyB,mBAAmB;AAO9C,IAAM,2BAA2B,EAAE,OAAO;AAAA,EAC/C,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,eAAe;AAAA,EAC5D,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS;AAClD,CAAC;AAGM,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA;AAAA,EAE/B,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,KAAK,YAAY;AAAA,EACjB,SAAS,EAAE,MAAM,wBAAwB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAE5D,YAAY,wBAAwB,SAAS;AAAA;AAAA,EAE7C,QAAQ,wBAAwB,SAAS;AAAA,EACzC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC1C,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAC1C,CAAC;","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/schemas/write/publication.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { normalizeDoi } from "../../format/doi.js";
|
|
4
|
+
import { optionalUrl } from "./shared.js";
|
|
5
|
+
var publicationAuthorWriteSchema = z.object({
|
|
6
|
+
name: z.string().min(1).max(100),
|
|
7
|
+
did: z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID").optional()
|
|
8
|
+
});
|
|
9
|
+
var relatedIdentifierWriteSchema = z.object({
|
|
10
|
+
identifier: z.string().min(1).max(2048),
|
|
11
|
+
identifierType: z.enum(["DOI", "AT-URI", "URL"]).optional(),
|
|
12
|
+
relationType: z.string().min(1).max(64)
|
|
13
|
+
}).transform(
|
|
14
|
+
(rel) => !rel.identifierType || rel.identifierType === "DOI" ? { ...rel, identifier: normalizeDoi(rel.identifier) } : rel
|
|
15
|
+
);
|
|
16
|
+
var PublicationWriteSchema = z.object({
|
|
17
|
+
title: z.string().min(1).max(200),
|
|
18
|
+
subtitle: z.string().max(2e3).nullable().optional(),
|
|
19
|
+
publisher: z.string().max(256).nullable().optional(),
|
|
20
|
+
url: optionalUrl(),
|
|
21
|
+
description: z.string().max(5e4).nullable().optional(),
|
|
22
|
+
publishedAt: z.string().nullable().optional(),
|
|
23
|
+
// Absent here until now, so the write route stripped every co-author before
|
|
24
|
+
// it reached the PDS: the lexicon field, the indexer, the claim flattening
|
|
25
|
+
// and the editor all existed, and nothing joined them. An object schema
|
|
26
|
+
// drops unknown keys silently, so the editor reported success and wrote
|
|
27
|
+
// nothing.
|
|
28
|
+
authors: z.array(publicationAuthorWriteSchema).max(50).optional(),
|
|
29
|
+
relatedIdentifiers: z.array(relatedIdentifierWriteSchema).max(20).optional(),
|
|
30
|
+
doi: z.string().max(256).nullable().optional().transform((val) => val ? normalizeDoi(val) : val),
|
|
31
|
+
// Open set. The known values are ORCID's work types (PUBLICATION_TYPE_OPTIONS),
|
|
32
|
+
// and a value outside them is kept as written: a publication that reached Sifa
|
|
33
|
+
// from Standard.site, RSS, or by hand need not fit ORCID's list.
|
|
34
|
+
type: z.string().max(64).nullable().optional()
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
PublicationWriteSchema,
|
|
38
|
+
publicationAuthorWriteSchema,
|
|
39
|
+
relatedIdentifierWriteSchema
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=publication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/write/publication.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { normalizeDoi } from '../../format/doi.js';\nimport { optionalUrl } from './shared.js';\n\n/**\n * A co-author named on the publication.\n *\n * Name-first, unlike a project member, and that is the lexicon's shape rather\n * than an inconsistency: a paper has co-authors whether or not they are on\n * atproto. A name alone is a complete entry that renders as written and claims\n * nothing about any account.\n *\n * `did` is the optional extra that turns the entry into a claim. The named\n * person renders as a bare name until they publish an `id.sifa.confirmation`,\n * and confirming never puts this record on their profile.\n */\nexport const publicationAuthorWriteSchema = z.object({\n name: z.string().min(1).max(100),\n did: z\n .string()\n .regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID')\n .optional(),\n});\n\n/**\n * A typed link to another version of the work (#590). A DOI identifier (the\n * default type) is stored bare, like the record's own `doi`, so it matches.\n */\nexport const relatedIdentifierWriteSchema = z\n .object({\n identifier: z.string().min(1).max(2048),\n identifierType: z.enum(['DOI', 'AT-URI', 'URL']).optional(),\n relationType: z.string().min(1).max(64),\n })\n .transform((rel) =>\n !rel.identifierType || rel.identifierType === 'DOI'\n ? { ...rel, identifier: normalizeDoi(rel.identifier) }\n : rel,\n );\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.publication`. */\nexport const PublicationWriteSchema = z.object({\n title: z.string().min(1).max(200),\n subtitle: z.string().max(2000).nullable().optional(),\n publisher: z.string().max(256).nullable().optional(),\n url: optionalUrl(),\n description: z.string().max(50000).nullable().optional(),\n publishedAt: z.string().nullable().optional(),\n // Absent here until now, so the write route stripped every co-author before\n // it reached the PDS: the lexicon field, the indexer, the claim flattening\n // and the editor all existed, and nothing joined them. An object schema\n // drops unknown keys silently, so the editor reported success and wrote\n // nothing.\n authors: z.array(publicationAuthorWriteSchema).max(50).optional(),\n relatedIdentifiers: z.array(relatedIdentifierWriteSchema).max(20).optional(),\n doi: z\n .string()\n .max(256)\n .nullable()\n .optional()\n .transform((val) => (val ? normalizeDoi(val) : val)),\n // Open set. The known values are ORCID's work types (PUBLICATION_TYPE_OPTIONS),\n // and a value outside them is kept as written: a publication that reached Sifa\n // from Standard.site, RSS, or by hand need not fit ORCID's list.\n type: z.string().max(64).nullable().optional(),\n});\n\nexport type PublicationWriteInput = z.infer<typeof PublicationWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAcrB,IAAM,+BAA+B,EAAE,OAAO;AAAA,EACnD,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAC/B,KAAK,EACF,OAAO,EACP,MAAM,uBAAuB,eAAe,EAC5C,SAAS;AACd,CAAC;AAMM,IAAM,+BAA+B,EACzC,OAAO;AAAA,EACN,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,IAAI;AAAA,EACtC,gBAAgB,EAAE,KAAK,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,SAAS;AAAA,EAC1D,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;AACxC,CAAC,EACA;AAAA,EAAU,CAAC,QACV,CAAC,IAAI,kBAAkB,IAAI,mBAAmB,QAC1C,EAAE,GAAG,KAAK,YAAY,aAAa,IAAI,UAAU,EAAE,IACnD;AACN;AAGK,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAChC,UAAU,EAAE,OAAO,EAAE,IAAI,GAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,WAAW,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,KAAK,YAAY;AAAA,EACjB,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5C,SAAS,EAAE,MAAM,4BAA4B,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAChE,oBAAoB,EAAE,MAAM,4BAA4B,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAC3E,KAAK,EACF,OAAO,EACP,IAAI,GAAG,EACP,SAAS,EACT,SAAS,EACT,UAAU,CAAC,QAAS,MAAM,aAAa,GAAG,IAAI,GAAI;AAAA;AAAA;AAAA;AAAA,EAIrD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAC/C,CAAC;","names":[]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// src/schemas/write/shared.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
function normalizeUrl(val) {
|
|
4
|
+
const trimmed = val.trim();
|
|
5
|
+
if (/^https?:\/\//i.test(trimmed)) return trimmed;
|
|
6
|
+
return `https://${trimmed}`;
|
|
7
|
+
}
|
|
8
|
+
var optionalUrl = () => z.string().optional().transform((val) => {
|
|
9
|
+
if (!val) return void 0;
|
|
10
|
+
return httpUrlOrNull(val) ?? void 0;
|
|
11
|
+
});
|
|
12
|
+
var writeLocationSchema = z.union([
|
|
13
|
+
z.object({
|
|
14
|
+
country: z.string().nullish(),
|
|
15
|
+
countryCode: z.string().length(2).nullish(),
|
|
16
|
+
region: z.string().nullish(),
|
|
17
|
+
city: z.string().nullish(),
|
|
18
|
+
locality: z.string().nullish(),
|
|
19
|
+
street: z.string().nullish(),
|
|
20
|
+
postalCode: z.string().nullish(),
|
|
21
|
+
name: z.string().nullish()
|
|
22
|
+
}),
|
|
23
|
+
z.string()
|
|
24
|
+
]).nullable().optional();
|
|
25
|
+
var skillRefSchema = z.object({
|
|
26
|
+
uri: z.string()
|
|
27
|
+
});
|
|
28
|
+
var VALID_PLATFORMS = [
|
|
29
|
+
"rss",
|
|
30
|
+
"fediverse",
|
|
31
|
+
"twitter",
|
|
32
|
+
"instagram",
|
|
33
|
+
"github",
|
|
34
|
+
"codeberg",
|
|
35
|
+
"gitlab",
|
|
36
|
+
"forgejo",
|
|
37
|
+
"gitea",
|
|
38
|
+
"youtube",
|
|
39
|
+
"linkedin",
|
|
40
|
+
"substack",
|
|
41
|
+
"website",
|
|
42
|
+
"orcid",
|
|
43
|
+
"keyoxide",
|
|
44
|
+
"other"
|
|
45
|
+
];
|
|
46
|
+
function httpUrlOrNull(input) {
|
|
47
|
+
if (typeof input !== "string") return null;
|
|
48
|
+
try {
|
|
49
|
+
const url = new URL(input);
|
|
50
|
+
return url.protocol === "http:" || url.protocol === "https:" ? input : null;
|
|
51
|
+
} catch {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
var DATE_ONLY_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
56
|
+
function isValidDateOnly(input) {
|
|
57
|
+
if (typeof input !== "string" || !DATE_ONLY_RE.test(input)) return false;
|
|
58
|
+
const parsed = /* @__PURE__ */ new Date(`${input}T00:00:00Z`);
|
|
59
|
+
return !Number.isNaN(parsed.getTime()) && parsed.toISOString().startsWith(input);
|
|
60
|
+
}
|
|
61
|
+
var PARTIAL_DATE_RE = /^\d{4}(-(0[1-9]|1[0-2]))?$/;
|
|
62
|
+
function isValidPartialDate(input) {
|
|
63
|
+
if (typeof input !== "string") return false;
|
|
64
|
+
return PARTIAL_DATE_RE.test(input) || isValidDateOnly(input);
|
|
65
|
+
}
|
|
66
|
+
var entityRefSchema = z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional();
|
|
67
|
+
var artifactLinkSchema = z.object({
|
|
68
|
+
url: z.string().max(2048).refine((v) => httpUrlOrNull(v) !== null, "must be an http(s) URL"),
|
|
69
|
+
kind: z.string().max(64).nullable().optional(),
|
|
70
|
+
label: z.string().max(2e3).nullable().optional()
|
|
71
|
+
});
|
|
72
|
+
var externalRecordRefSchema = z.object({
|
|
73
|
+
uri: z.string().regex(/^at:\/\/[^/\s]+\/[^/\s]+\/[^/\s]+$/, "must be an at-uri"),
|
|
74
|
+
// CIDv0 (`Qm…`) or CIDv1 (base32, `b…`). Loose but rejects arbitrary strings.
|
|
75
|
+
cid: z.string().max(256).regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z2-7]+)$/, "must be a CID").optional()
|
|
76
|
+
});
|
|
77
|
+
var presentationLinkSchema = z.object({
|
|
78
|
+
uri: z.string().max(2048).refine((v) => httpUrlOrNull(v) !== null, "must be an http(s) URL"),
|
|
79
|
+
label: z.string().max(640).nullable().optional(),
|
|
80
|
+
type: z.string().max(256).nullable().optional()
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
VALID_PLATFORMS,
|
|
84
|
+
artifactLinkSchema,
|
|
85
|
+
entityRefSchema,
|
|
86
|
+
externalRecordRefSchema,
|
|
87
|
+
httpUrlOrNull,
|
|
88
|
+
isValidDateOnly,
|
|
89
|
+
isValidPartialDate,
|
|
90
|
+
normalizeUrl,
|
|
91
|
+
optionalUrl,
|
|
92
|
+
presentationLinkSchema,
|
|
93
|
+
skillRefSchema,
|
|
94
|
+
writeLocationSchema
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/write/shared.ts"],"sourcesContent":["import { z } from 'zod';\n\n/** Prepend `https://` if no scheme is present. */\nexport function normalizeUrl(val: string): string {\n const trimmed = val.trim();\n if (/^https?:\\/\\//i.test(trimmed)) return trimmed;\n return `https://${trimmed}`;\n}\n\n/**\n * Accept an http(s) URL string or silently drop it (returns `undefined`).\n * Preserves the write-time policy: bad URLs from imports are dropped, not\n * rejected. A dangerous scheme (`javascript:`, `data:`, ...) parses as a URL, so\n * this drops anything that is not http(s) via {@link httpUrlOrNull} rather than a\n * bare parse check, keeping a script-bearing scheme out of the stored record. All\n * consumers of this schema are web-link fields (project/publication/involvement/\n * certification URLs), so no non-http scheme is legitimate here.\n */\nexport const optionalUrl = () =>\n z\n .string()\n .optional()\n .transform((val) => {\n if (!val) return undefined;\n return httpUrlOrNull(val) ?? undefined;\n });\n\n/**\n * Location shape accepted by the sifa-api write endpoints.\n *\n * Accepts BOTH the legacy shape (`id.sifa.defs#locationAddress`: `countryCode`,\n * `region`, `city`) AND the new community shape\n * (`community.lexicon.location.address`: `country`, `region`, `locality`,\n * `street?`, `postalCode?`, `name?`). The frontend reads location records from\n * the API and echoes them back on save. The API serializer emits explicit `null`\n * for absent fields (not `undefined`), so every field uses `.nullish()`\n * (`string | null | undefined`) instead of `.optional()` (`string | undefined`).\n *\n * `buildPdsLocation` on the server handles conversion to the PDS shape (always\n * emitting the new community shape) and returns `undefined` when neither\n * `country` nor `countryCode` is usable.\n */\nexport const writeLocationSchema = z\n .union([\n z.object({\n country: z.string().nullish(),\n countryCode: z.string().length(2).nullish(),\n region: z.string().nullish(),\n city: z.string().nullish(),\n locality: z.string().nullish(),\n street: z.string().nullish(),\n postalCode: z.string().nullish(),\n name: z.string().nullish(),\n }),\n z.string(),\n ])\n .nullable()\n .optional();\n\n/** Skill reference: a strong ref to a canonical skill record. */\nexport const skillRefSchema = z.object({\n uri: z.string(),\n});\n\n/**\n * Platforms accepted by the external-account write endpoint.\n *\n * NOTE: this list intentionally differs from `PLATFORM_LABELS` in the SDK's\n * `/taxonomy` subpath. `VALID_PLATFORMS` is what sifa-api's `POST /external-accounts`\n * endpoint enforces; `PLATFORM_LABELS` is the display taxonomy used by the profile\n * UI. Reconciling them is a separate follow-up (see #TBD). For now the two are\n * mirrored verbatim from their prior definitions to preserve behavior.\n */\nexport const VALID_PLATFORMS = [\n 'rss',\n 'fediverse',\n 'twitter',\n 'instagram',\n 'github',\n 'codeberg',\n 'gitlab',\n 'forgejo',\n 'gitea',\n 'youtube',\n 'linkedin',\n 'substack',\n 'website',\n 'orcid',\n 'keyoxide',\n 'other',\n] as const;\n\nexport type ValidPlatform = (typeof VALID_PLATFORMS)[number];\n\n// ---- pure sanitization primitives (previously in sifa-api/src/lib/sanitize.ts) ----\n\n/**\n * Returns `input` when it is an http(s) URL string, else `null`. Blocks\n * dangerous schemes (`javascript:`, `data:`, etc.) from being stored and\n * later rendered.\n */\nexport function httpUrlOrNull(input: unknown): string | null {\n if (typeof input !== 'string') return null;\n try {\n const url = new URL(input);\n return url.protocol === 'http:' || url.protocol === 'https:' ? input : null;\n } catch {\n return null;\n }\n}\n\nconst DATE_ONLY_RE = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n/**\n * Strict calendar-date validator. Returns `true` for `YYYY-MM-DD` strings\n * that name a real day, rejecting impossible values (`2024-02-30`, `2024-13-01`)\n * by requiring the JavaScript `Date` round-trip to preserve the input.\n */\nexport function isValidDateOnly(input: unknown): boolean {\n if (typeof input !== 'string' || !DATE_ONLY_RE.test(input)) return false;\n const parsed = new Date(`${input}T00:00:00Z`);\n return !Number.isNaN(parsed.getTime()) && parsed.toISOString().startsWith(input);\n}\n\nconst PARTIAL_DATE_RE = /^\\d{4}(-(0[1-9]|1[0-2]))?$/;\n\n/**\n * Partial calendar-date validator. Returns `true` for a year (`YYYY`), a month\n * (`YYYY-MM`, month 01-12), or a real day per {@link isValidDateOnly}. For\n * dates where the exact day is often unknown, such as a past talk session.\n */\nexport function isValidPartialDate(input: unknown): boolean {\n if (typeof input !== 'string') return false;\n return PARTIAL_DATE_RE.test(input) || isValidDateOnly(input);\n}\n\n// ---- shared write-schema fragments used by multiple sections ----\n\n/**\n * Portable org entity identifier (Wikidata / ROR / LEI / sifa.id URI) chosen\n * from the typeahead. Constrained to http(s) so a script-bearing scheme can't\n * be written to the PDS record. Absent for free-text / unlinked records.\n * Shared by the org-bearing sections (position, education, certification,\n * volunteering, course, honor).\n */\nexport const entityRefSchema = z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional();\n\n/**\n * One proof link on an involvement record (`id.sifa.defs#artifactLink`).\n * Only http(s) URLs are accepted so a dangerous scheme is never written to\n * the PDS.\n */\nexport const artifactLinkSchema = z.object({\n url: z\n .string()\n .max(2048)\n .refine((v) => httpUrlOrNull(v) !== null, 'must be an http(s) URL'),\n kind: z.string().max(64).nullable().optional(),\n label: z.string().max(2000).nullable().optional(),\n});\n\n/**\n * Reference to a record by at-uri, with an optional CID\n * (`id.sifa.defs#externalRecordRef`).\n */\nexport const externalRecordRefSchema = z.object({\n uri: z.string().regex(/^at:\\/\\/[^/\\s]+\\/[^/\\s]+\\/[^/\\s]+$/, 'must be an at-uri'),\n // CIDv0 (`Qm…`) or CIDv1 (base32, `b…`). Loose but rejects arbitrary strings.\n cid: z\n .string()\n .max(256)\n .regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z2-7]+)$/, 'must be a CID')\n .optional(),\n});\n\n/** Link attached to a presentation record. */\nexport const presentationLinkSchema = z.object({\n uri: z\n .string()\n .max(2048)\n .refine((v) => httpUrlOrNull(v) !== null, 'must be an http(s) URL'),\n label: z.string().max(640).nullable().optional(),\n type: z.string().max(256).nullable().optional(),\n});\n"],"mappings":";AAAA,SAAS,SAAS;AAGX,SAAS,aAAa,KAAqB;AAChD,QAAM,UAAU,IAAI,KAAK;AACzB,MAAI,gBAAgB,KAAK,OAAO,EAAG,QAAO;AAC1C,SAAO,WAAW,OAAO;AAC3B;AAWO,IAAM,cAAc,MACzB,EACG,OAAO,EACP,SAAS,EACT,UAAU,CAAC,QAAQ;AAClB,MAAI,CAAC,IAAK,QAAO;AACjB,SAAO,cAAc,GAAG,KAAK;AAC/B,CAAC;AAiBE,IAAM,sBAAsB,EAChC,MAAM;AAAA,EACL,EAAE,OAAO;AAAA,IACP,SAAS,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC5B,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,QAAQ;AAAA,IAC1C,QAAQ,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC3B,MAAM,EAAE,OAAO,EAAE,QAAQ;AAAA,IACzB,UAAU,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC7B,QAAQ,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC3B,YAAY,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC/B,MAAM,EAAE,OAAO,EAAE,QAAQ;AAAA,EAC3B,CAAC;AAAA,EACD,EAAE,OAAO;AACX,CAAC,EACA,SAAS,EACT,SAAS;AAGL,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,KAAK,EAAE,OAAO;AAChB,CAAC;AAWM,IAAM,kBAAkB;AAAA,EAC7B;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;AACF;AAWO,SAAS,cAAc,OAA+B;AAC3D,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI;AACF,UAAM,MAAM,IAAI,IAAI,KAAK;AACzB,WAAO,IAAI,aAAa,WAAW,IAAI,aAAa,WAAW,QAAQ;AAAA,EACzE,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAM,eAAe;AAOd,SAAS,gBAAgB,OAAyB;AACvD,MAAI,OAAO,UAAU,YAAY,CAAC,aAAa,KAAK,KAAK,EAAG,QAAO;AACnE,QAAM,SAAS,oBAAI,KAAK,GAAG,KAAK,YAAY;AAC5C,SAAO,CAAC,OAAO,MAAM,OAAO,QAAQ,CAAC,KAAK,OAAO,YAAY,EAAE,WAAW,KAAK;AACjF;AAEA,IAAM,kBAAkB;AAOjB,SAAS,mBAAmB,OAAyB;AAC1D,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,SAAO,gBAAgB,KAAK,KAAK,KAAK,gBAAgB,KAAK;AAC7D;AAWO,IAAM,kBAAkB,EAC5B,OAAO,EACP,IAAI,EACJ,OAAO,CAAC,MAAM,gBAAgB,KAAK,CAAC,GAAG,EAAE,SAAS,mCAAmC,CAAC,EACtF,IAAI,IAAI,EACR,SAAS;AAOL,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,KAAK,EACF,OAAO,EACP,IAAI,IAAI,EACR,OAAO,CAAC,MAAM,cAAc,CAAC,MAAM,MAAM,wBAAwB;AAAA,EACpE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAAA,EAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,GAAI,EAAE,SAAS,EAAE,SAAS;AAClD,CAAC;AAMM,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,mBAAmB;AAAA;AAAA,EAE/E,KAAK,EACF,OAAO,EACP,IAAI,GAAG,EACP,MAAM,gDAAgD,eAAe,EACrE,SAAS;AACd,CAAC;AAGM,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,KAAK,EACF,OAAO,EACP,IAAI,IAAI,EACR,OAAO,CAAC,MAAM,cAAc,CAAC,MAAM,MAAM,wBAAwB;AAAA,EACpE,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC/C,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAChD,CAAC;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/schemas/write/skill.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { maxGraphemes } from "../shared.js";
|
|
4
|
+
var SkillWriteSchema = z.object({
|
|
5
|
+
name: z.string().min(1).max(100),
|
|
6
|
+
category: z.string().max(100).optional(),
|
|
7
|
+
// Mirror the record schema bound (id.sifa.profile.skill) so a value that
|
|
8
|
+
// passes here cannot then fail the PDS write. Empty/whitespace-only input is
|
|
9
|
+
// treated as absent so we never persist a meaningless grouping label.
|
|
10
|
+
subCategory: z.preprocess(
|
|
11
|
+
(v) => typeof v === "string" && v.trim() === "" ? void 0 : v,
|
|
12
|
+
z.string().refine(maxGraphemes(64)).max(640).optional()
|
|
13
|
+
)
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
SkillWriteSchema
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/write/skill.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { maxGraphemes } from '../shared.js';\n\n/** Schema enforced by `POST /profile/skills` on sifa-api. */\nexport const SkillWriteSchema = z.object({\n name: z.string().min(1).max(100),\n category: z.string().max(100).optional(),\n // Mirror the record schema bound (id.sifa.profile.skill) so a value that\n // passes here cannot then fail the PDS write. Empty/whitespace-only input is\n // treated as absent so we never persist a meaningless grouping label.\n subCategory: z.preprocess(\n (v) => (typeof v === 'string' && v.trim() === '' ? undefined : v),\n z.string().refine(maxGraphemes(64)).max(640).optional(),\n ),\n});\n\nexport type SkillWriteInput = z.infer<typeof SkillWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,oBAAoB;AAGtB,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAC/B,UAAU,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,EAIvC,aAAa,EAAE;AAAA,IACb,CAAC,MAAO,OAAO,MAAM,YAAY,EAAE,KAAK,MAAM,KAAK,SAAY;AAAA,IAC/D,EAAE,OAAO,EAAE,OAAO,aAAa,EAAE,CAAC,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EACxD;AACF,CAAC;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/schemas/write/volunteering.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { entityRefSchema } from "./shared.js";
|
|
4
|
+
var VolunteeringWriteSchema = z.object({
|
|
5
|
+
organization: z.string().min(1).max(256),
|
|
6
|
+
entityRef: entityRefSchema,
|
|
7
|
+
role: z.string().max(256).nullable().optional(),
|
|
8
|
+
cause: z.string().max(256).nullable().optional(),
|
|
9
|
+
description: z.string().max(5e4).nullable().optional(),
|
|
10
|
+
startedAt: z.string().nullable().optional(),
|
|
11
|
+
endedAt: z.string().nullable().optional()
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
VolunteeringWriteSchema
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=volunteering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/write/volunteering.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { entityRefSchema } from './shared.js';\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.volunteering`. */\nexport const VolunteeringWriteSchema = z.object({\n organization: z.string().min(1).max(256),\n entityRef: entityRefSchema,\n role: z.string().max(256).nullable().optional(),\n cause: z.string().max(256).nullable().optional(),\n description: z.string().max(50000).nullable().optional(),\n startedAt: z.string().nullable().optional(),\n endedAt: z.string().nullable().optional(),\n});\n\nexport type VolunteeringWriteInput = z.infer<typeof VolunteeringWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,uBAAuB;AAGzB,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EACvC,WAAW;AAAA,EACX,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC/C,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC1C,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAC1C,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=activity-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// src/stream/index.ts
|
|
2
|
+
import {
|
|
3
|
+
ACTIVITY_VERBS,
|
|
4
|
+
STREAM_VERBS,
|
|
5
|
+
getActivityVerbsVersion,
|
|
6
|
+
streamVerbSchema,
|
|
7
|
+
verbForCollection
|
|
8
|
+
} from "./verbs.js";
|
|
9
|
+
import {
|
|
10
|
+
streamAddressSchema,
|
|
11
|
+
streamCardBodySchema,
|
|
12
|
+
streamCardSubjectSchema,
|
|
13
|
+
streamCardVMSchema,
|
|
14
|
+
streamExternalLinkSchema,
|
|
15
|
+
streamGeoSchema,
|
|
16
|
+
streamMediaSchema,
|
|
17
|
+
streamAuthorSchema,
|
|
18
|
+
streamRichSegmentSchema,
|
|
19
|
+
streamSourceSchema,
|
|
20
|
+
streamThemeSchema
|
|
21
|
+
} from "./stream-card-vm-schema.js";
|
|
22
|
+
import {
|
|
23
|
+
toStreamCardVM,
|
|
24
|
+
toStreamCardVMs
|
|
25
|
+
} from "./to-stream-card-vm.js";
|
|
26
|
+
import { isSelfAuthoredRich, renderAsLine } from "./two-tier.js";
|
|
27
|
+
export {
|
|
28
|
+
ACTIVITY_VERBS,
|
|
29
|
+
STREAM_VERBS,
|
|
30
|
+
getActivityVerbsVersion,
|
|
31
|
+
isSelfAuthoredRich,
|
|
32
|
+
renderAsLine,
|
|
33
|
+
streamAddressSchema,
|
|
34
|
+
streamAuthorSchema,
|
|
35
|
+
streamCardBodySchema,
|
|
36
|
+
streamCardSubjectSchema,
|
|
37
|
+
streamCardVMSchema,
|
|
38
|
+
streamExternalLinkSchema,
|
|
39
|
+
streamGeoSchema,
|
|
40
|
+
streamMediaSchema,
|
|
41
|
+
streamRichSegmentSchema,
|
|
42
|
+
streamSourceSchema,
|
|
43
|
+
streamThemeSchema,
|
|
44
|
+
streamVerbSchema,
|
|
45
|
+
toStreamCardVM,
|
|
46
|
+
toStreamCardVMs,
|
|
47
|
+
verbForCollection
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/stream/index.ts"],"sourcesContent":["export type { ActivityItem } from './activity-item.js';\nexport {\n ACTIVITY_VERBS,\n STREAM_VERBS,\n getActivityVerbsVersion,\n streamVerbSchema,\n verbForCollection,\n type ActivityVerbMap,\n type StreamVerb,\n} from './verbs.js';\nexport type {\n StreamAddress,\n StreamAuthor,\n StreamCardBody,\n StreamCardSubject,\n StreamCardVM,\n StreamExternalLink,\n StreamGeo,\n StreamMedia,\n StreamMediaBase,\n StreamMediaBlob,\n StreamMediaResolved,\n StreamRichSegment,\n StreamSource,\n StreamTheme,\n} from './stream-card-vm.js';\nexport {\n streamAddressSchema,\n streamCardBodySchema,\n streamCardSubjectSchema,\n streamCardVMSchema,\n streamExternalLinkSchema,\n streamGeoSchema,\n streamMediaSchema,\n streamAuthorSchema,\n streamRichSegmentSchema,\n streamSourceSchema,\n streamThemeSchema,\n} from './stream-card-vm-schema.js';\nexport {\n toStreamCardVM,\n toStreamCardVMs,\n type ToStreamCardVMOptions,\n} from './to-stream-card-vm.js';\nexport { isSelfAuthoredRich, renderAsLine } from './two-tier.js';\n"],"mappings":";AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAiBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,oBAAoB,oBAAoB;","names":[]}
|