@singi-labs/sifa-sdk 0.19.43 → 0.19.45
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.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 +100 -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 +29 -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 +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +675 -7080
- 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 +31 -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.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.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,138 @@
|
|
|
1
|
+
// src/query/keys.ts
|
|
2
|
+
var sifaQueryKeys = {
|
|
3
|
+
all: () => ["sifa"],
|
|
4
|
+
profile: {
|
|
5
|
+
all: () => ["sifa", "profile"],
|
|
6
|
+
byHandle: (handleOrDid) => ["sifa", "profile", handleOrDid],
|
|
7
|
+
atFundLink: (did) => ["sifa", "profile", "at-fund-link", did],
|
|
8
|
+
view: (actor) => ["sifa", "profile", "view", actor],
|
|
9
|
+
externalAccounts: (handleOrDid) => ["sifa", "profile", "external-accounts", handleOrDid],
|
|
10
|
+
// Session-scoped: the AppView reads the owner from the session cookie, so
|
|
11
|
+
// there is only ever one completeness result per client.
|
|
12
|
+
completeness: () => ["sifa", "profile", "completeness"]
|
|
13
|
+
},
|
|
14
|
+
position: {
|
|
15
|
+
all: () => ["sifa", "position"],
|
|
16
|
+
byOwner: (did) => ["sifa", "position", "by-owner", did],
|
|
17
|
+
// Session-scoped: the AppView reads the owner from the session cookie.
|
|
18
|
+
unlinked: () => ["sifa", "position", "unlinked"]
|
|
19
|
+
},
|
|
20
|
+
// Aggregate inbox counts for the header bell badge (session-scoped). The first
|
|
21
|
+
// aggregate namespace: it fans in across confirmations, endorsements, drift,
|
|
22
|
+
// unlinked positions and profile completeness on the server.
|
|
23
|
+
inbox: {
|
|
24
|
+
all: () => ["sifa", "inbox"],
|
|
25
|
+
counts: () => ["sifa", "inbox", "counts"]
|
|
26
|
+
},
|
|
27
|
+
search: {
|
|
28
|
+
all: () => ["sifa", "search"],
|
|
29
|
+
profiles: (filters) => ["sifa", "search", "profiles", filters],
|
|
30
|
+
companies: (filters) => ["sifa", "search", "companies", filters],
|
|
31
|
+
skills: (query) => ["sifa", "search", "skills", query],
|
|
32
|
+
canonicalSkills: (query, limit) => ["sifa", "search", "canonical-skills", query, limit],
|
|
33
|
+
filters: () => ["sifa", "search", "filters"]
|
|
34
|
+
},
|
|
35
|
+
entity: {
|
|
36
|
+
all: () => ["sifa", "entity"],
|
|
37
|
+
search: (query, limit) => ["sifa", "entity", "search", query, limit]
|
|
38
|
+
},
|
|
39
|
+
discovery: {
|
|
40
|
+
all: () => ["sifa", "discovery"],
|
|
41
|
+
similar: (did, limit) => ["sifa", "discovery", "similar", did, limit],
|
|
42
|
+
suggestions: (opts) => ["sifa", "discovery", "suggestions", opts],
|
|
43
|
+
suggestionCount: (since) => ["sifa", "discovery", "suggestion-count", since ?? null],
|
|
44
|
+
featured: () => ["sifa", "discovery", "featured"]
|
|
45
|
+
},
|
|
46
|
+
follow: {
|
|
47
|
+
all: () => ["sifa", "follow"],
|
|
48
|
+
following: (opts) => ["sifa", "follow", "following", opts],
|
|
49
|
+
followers: (handle) => ["sifa", "follow", "followers", handle],
|
|
50
|
+
followingOf: (handle) => ["sifa", "follow", "following-of", handle],
|
|
51
|
+
feed: (opts) => ["sifa", "follow", "feed", opts],
|
|
52
|
+
mutuals: (handle) => ["sifa", "follow", "mutuals", handle],
|
|
53
|
+
blueskySuggestions: () => ["sifa", "follow", "bluesky-suggestions"]
|
|
54
|
+
},
|
|
55
|
+
admin: {
|
|
56
|
+
all: () => ["sifa", "admin"],
|
|
57
|
+
featureAllowlist: (flag) => ["sifa", "admin", "feature-allowlist", flag],
|
|
58
|
+
reviewQueues: () => ["sifa", "admin", "review-queues"]
|
|
59
|
+
},
|
|
60
|
+
stats: {
|
|
61
|
+
all: () => ["sifa", "stats"],
|
|
62
|
+
homepage: () => ["sifa", "stats", "homepage"]
|
|
63
|
+
},
|
|
64
|
+
apps: {
|
|
65
|
+
all: () => ["sifa", "apps"],
|
|
66
|
+
registry: () => ["sifa", "apps", "registry"],
|
|
67
|
+
hidden: () => ["sifa", "apps", "hidden"]
|
|
68
|
+
},
|
|
69
|
+
auth: {
|
|
70
|
+
all: () => ["sifa", "auth"],
|
|
71
|
+
// Session-scoped: the AppView reads the account list from the browser's
|
|
72
|
+
// cookies, so there is only ever one list per client.
|
|
73
|
+
accounts: () => ["sifa", "auth", "accounts"]
|
|
74
|
+
},
|
|
75
|
+
activity: {
|
|
76
|
+
all: () => ["sifa", "activity"],
|
|
77
|
+
heatmap: (handleOrDid, days) => ["sifa", "activity", "heatmap", handleOrDid, days],
|
|
78
|
+
teaser: (handleOrDid) => ["sifa", "activity", "teaser", handleOrDid],
|
|
79
|
+
feed: (handleOrDid, opts) => ["sifa", "activity", "feed", handleOrDid, opts],
|
|
80
|
+
// Session-scoped: the AppView reads the caller's own hides from their
|
|
81
|
+
// cookie, so there is only ever one list per client.
|
|
82
|
+
hiddenItems: () => ["sifa", "activity", "hidden-items"]
|
|
83
|
+
},
|
|
84
|
+
github: {
|
|
85
|
+
all: () => ["sifa", "github"],
|
|
86
|
+
myPullRequests: (opts) => ["sifa", "github", "my-pull-requests", opts]
|
|
87
|
+
},
|
|
88
|
+
endorsement: {
|
|
89
|
+
all: () => ["sifa", "endorsement"],
|
|
90
|
+
count: (did) => ["sifa", "endorsement", "count", did],
|
|
91
|
+
// Scoped to the session rather than a DID -- the AppView reads the subject
|
|
92
|
+
// from the session cookie, so there is only ever one inbox per client.
|
|
93
|
+
pending: () => ["sifa", "endorsement", "pending"],
|
|
94
|
+
// Also session-scoped: the AppView picks the candidate from the viewer's
|
|
95
|
+
// own follows, dismissals and blocks.
|
|
96
|
+
reciprocity: () => ["sifa", "endorsement", "reciprocity"],
|
|
97
|
+
received: (did) => ["sifa", "endorsement", "received", did]
|
|
98
|
+
},
|
|
99
|
+
confirmation: {
|
|
100
|
+
all: () => ["sifa", "confirmation"],
|
|
101
|
+
// Scoped to the session for the same reason as the endorsement inbox: the
|
|
102
|
+
// AppView reads the subject from the session cookie, so there is only ever
|
|
103
|
+
// one inbox per client.
|
|
104
|
+
pending: () => ["sifa", "confirmation", "pending"],
|
|
105
|
+
/** Confirmations this session has given, for the withdraw surface. */
|
|
106
|
+
given: () => ["sifa", "confirmation", "given"]
|
|
107
|
+
},
|
|
108
|
+
stream: {
|
|
109
|
+
all: () => ["sifa", "stream"],
|
|
110
|
+
networkCount: (did) => ["sifa", "stream", "network-count", did]
|
|
111
|
+
},
|
|
112
|
+
reactions: {
|
|
113
|
+
all: () => ["sifa", "reactions"],
|
|
114
|
+
status: (uris) => ["sifa", "reactions", "status", uris],
|
|
115
|
+
accountCheck: (appId) => ["sifa", "reactions", "account-check", appId]
|
|
116
|
+
},
|
|
117
|
+
roadmap: {
|
|
118
|
+
all: () => ["sifa", "roadmap"],
|
|
119
|
+
votes: () => ["sifa", "roadmap", "votes"],
|
|
120
|
+
myVotes: () => ["sifa", "roadmap", "my-votes"]
|
|
121
|
+
},
|
|
122
|
+
bskyPreferences: {
|
|
123
|
+
all: () => ["sifa", "bsky-preferences"],
|
|
124
|
+
contentLabels: () => ["sifa", "bsky-preferences", "content-labels"]
|
|
125
|
+
},
|
|
126
|
+
repoInventory: {
|
|
127
|
+
all: () => ["sifa", "repo-inventory"],
|
|
128
|
+
list: () => ["sifa", "repo-inventory", "list"]
|
|
129
|
+
},
|
|
130
|
+
destructive: {
|
|
131
|
+
all: () => ["sifa", "destructive"],
|
|
132
|
+
wipePreview: () => ["sifa", "destructive", "wipe-preview"]
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
export {
|
|
136
|
+
sifaQueryKeys
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/query/keys.ts"],"sourcesContent":["/**\n * Query key factory for TanStack Query.\n *\n * Keys are read-only tuples; the hierarchy matches the SDK's fetcher\n * grouping. Use these instead of inline arrays so consumers can target\n * `queryClient.invalidateQueries({ queryKey: keys.profile.all() })` and\n * similar patterns without typos.\n *\n * Convention: every leaf key starts with the namespace ('sifa') so\n * consumers can invalidate everything Sifa-related in one call.\n */\nexport const sifaQueryKeys = {\n all: () => ['sifa'] as const,\n\n profile: {\n all: () => ['sifa', 'profile'] as const,\n byHandle: (handleOrDid: string) => ['sifa', 'profile', handleOrDid] as const,\n atFundLink: (did: string) => ['sifa', 'profile', 'at-fund-link', did] as const,\n view: (actor: string) => ['sifa', 'profile', 'view', actor] as const,\n externalAccounts: (handleOrDid: string) =>\n ['sifa', 'profile', 'external-accounts', handleOrDid] as const,\n // Session-scoped: the AppView reads the owner from the session cookie, so\n // there is only ever one completeness result per client.\n completeness: () => ['sifa', 'profile', 'completeness'] as const,\n },\n\n position: {\n all: () => ['sifa', 'position'] as const,\n byOwner: (did: string) => ['sifa', 'position', 'by-owner', did] as const,\n // Session-scoped: the AppView reads the owner from the session cookie.\n unlinked: () => ['sifa', 'position', 'unlinked'] as const,\n },\n\n // Aggregate inbox counts for the header bell badge (session-scoped). The first\n // aggregate namespace: it fans in across confirmations, endorsements, drift,\n // unlinked positions and profile completeness on the server.\n inbox: {\n all: () => ['sifa', 'inbox'] as const,\n counts: () => ['sifa', 'inbox', 'counts'] as const,\n },\n\n search: {\n all: () => ['sifa', 'search'] as const,\n profiles: (filters: Record<string, unknown>) =>\n ['sifa', 'search', 'profiles', filters] as const,\n companies: (filters: Record<string, unknown>) =>\n ['sifa', 'search', 'companies', filters] as const,\n skills: (query: string) => ['sifa', 'search', 'skills', query] as const,\n canonicalSkills: (query: string, limit: number) =>\n ['sifa', 'search', 'canonical-skills', query, limit] as const,\n filters: () => ['sifa', 'search', 'filters'] as const,\n },\n\n entity: {\n all: () => ['sifa', 'entity'] as const,\n search: (query: string, limit: number) => ['sifa', 'entity', 'search', query, limit] as const,\n },\n\n discovery: {\n all: () => ['sifa', 'discovery'] as const,\n similar: (did: string, limit: number) => ['sifa', 'discovery', 'similar', did, limit] as const,\n suggestions: (opts: Record<string, unknown>) =>\n ['sifa', 'discovery', 'suggestions', opts] as const,\n suggestionCount: (since: string | undefined) =>\n ['sifa', 'discovery', 'suggestion-count', since ?? null] as const,\n featured: () => ['sifa', 'discovery', 'featured'] as const,\n },\n\n follow: {\n all: () => ['sifa', 'follow'] as const,\n following: (opts: Record<string, unknown>) => ['sifa', 'follow', 'following', opts] as const,\n followers: (handle: string) => ['sifa', 'follow', 'followers', handle] as const,\n followingOf: (handle: string) => ['sifa', 'follow', 'following-of', handle] as const,\n feed: (opts: Record<string, unknown>) => ['sifa', 'follow', 'feed', opts] as const,\n mutuals: (handle: string) => ['sifa', 'follow', 'mutuals', handle] as const,\n blueskySuggestions: () => ['sifa', 'follow', 'bluesky-suggestions'] as const,\n },\n\n admin: {\n all: () => ['sifa', 'admin'] as const,\n featureAllowlist: (flag: string) => ['sifa', 'admin', 'feature-allowlist', flag] as const,\n reviewQueues: () => ['sifa', 'admin', 'review-queues'] as const,\n },\n\n stats: {\n all: () => ['sifa', 'stats'] as const,\n homepage: () => ['sifa', 'stats', 'homepage'] as const,\n },\n\n apps: {\n all: () => ['sifa', 'apps'] as const,\n registry: () => ['sifa', 'apps', 'registry'] as const,\n hidden: () => ['sifa', 'apps', 'hidden'] as const,\n },\n\n auth: {\n all: () => ['sifa', 'auth'] as const,\n // Session-scoped: the AppView reads the account list from the browser's\n // cookies, so there is only ever one list per client.\n accounts: () => ['sifa', 'auth', 'accounts'] as const,\n },\n\n activity: {\n all: () => ['sifa', 'activity'] as const,\n heatmap: (handleOrDid: string, days: number) =>\n ['sifa', 'activity', 'heatmap', handleOrDid, days] as const,\n teaser: (handleOrDid: string) => ['sifa', 'activity', 'teaser', handleOrDid] as const,\n feed: (handleOrDid: string, opts: Record<string, unknown>) =>\n ['sifa', 'activity', 'feed', handleOrDid, opts] as const,\n // Session-scoped: the AppView reads the caller's own hides from their\n // cookie, so there is only ever one list per client.\n hiddenItems: () => ['sifa', 'activity', 'hidden-items'] as const,\n },\n\n github: {\n all: () => ['sifa', 'github'] as const,\n myPullRequests: (opts: { limit?: number; offset?: number }) =>\n ['sifa', 'github', 'my-pull-requests', opts] as const,\n },\n\n endorsement: {\n all: () => ['sifa', 'endorsement'] as const,\n count: (did: string) => ['sifa', 'endorsement', 'count', did] as const,\n // Scoped to the session rather than a DID -- the AppView reads the subject\n // from the session cookie, so there is only ever one inbox per client.\n pending: () => ['sifa', 'endorsement', 'pending'] as const,\n // Also session-scoped: the AppView picks the candidate from the viewer's\n // own follows, dismissals and blocks.\n reciprocity: () => ['sifa', 'endorsement', 'reciprocity'] as const,\n received: (did: string) => ['sifa', 'endorsement', 'received', did] as const,\n },\n\n confirmation: {\n all: () => ['sifa', 'confirmation'] as const,\n // Scoped to the session for the same reason as the endorsement inbox: the\n // AppView reads the subject from the session cookie, so there is only ever\n // one inbox per client.\n pending: () => ['sifa', 'confirmation', 'pending'] as const,\n /** Confirmations this session has given, for the withdraw surface. */\n given: () => ['sifa', 'confirmation', 'given'] as const,\n },\n\n stream: {\n all: () => ['sifa', 'stream'] as const,\n networkCount: (did: string) => ['sifa', 'stream', 'network-count', did] as const,\n },\n\n reactions: {\n all: () => ['sifa', 'reactions'] as const,\n status: (uris: string[]) => ['sifa', 'reactions', 'status', uris] as const,\n accountCheck: (appId: string) => ['sifa', 'reactions', 'account-check', appId] as const,\n },\n\n roadmap: {\n all: () => ['sifa', 'roadmap'] as const,\n votes: () => ['sifa', 'roadmap', 'votes'] as const,\n myVotes: () => ['sifa', 'roadmap', 'my-votes'] as const,\n },\n\n bskyPreferences: {\n all: () => ['sifa', 'bsky-preferences'] as const,\n contentLabels: () => ['sifa', 'bsky-preferences', 'content-labels'] as const,\n },\n\n repoInventory: {\n all: () => ['sifa', 'repo-inventory'] as const,\n list: () => ['sifa', 'repo-inventory', 'list'] as const,\n },\n destructive: {\n all: () => ['sifa', 'destructive'] as const,\n wipePreview: () => ['sifa', 'destructive', 'wipe-preview'] as const,\n },\n} as const;\n\nexport type SifaQueryKey =\n | ReturnType<typeof sifaQueryKeys.all>\n | ReturnType<typeof sifaQueryKeys.profile.all>\n | ReturnType<typeof sifaQueryKeys.profile.byHandle>\n | ReturnType<typeof sifaQueryKeys.profile.atFundLink>\n | ReturnType<typeof sifaQueryKeys.profile.externalAccounts>\n | ReturnType<typeof sifaQueryKeys.profile.completeness>\n | ReturnType<typeof sifaQueryKeys.position.all>\n | ReturnType<typeof sifaQueryKeys.position.byOwner>\n | ReturnType<typeof sifaQueryKeys.position.unlinked>\n | ReturnType<typeof sifaQueryKeys.inbox.all>\n | ReturnType<typeof sifaQueryKeys.inbox.counts>\n | ReturnType<typeof sifaQueryKeys.search.all>\n | ReturnType<typeof sifaQueryKeys.search.profiles>\n | ReturnType<typeof sifaQueryKeys.search.canonicalSkills>\n | ReturnType<typeof sifaQueryKeys.search.skills>\n | ReturnType<typeof sifaQueryKeys.search.filters>\n | ReturnType<typeof sifaQueryKeys.entity.all>\n | ReturnType<typeof sifaQueryKeys.entity.search>\n | ReturnType<typeof sifaQueryKeys.discovery.all>\n | ReturnType<typeof sifaQueryKeys.discovery.similar>\n | ReturnType<typeof sifaQueryKeys.discovery.suggestions>\n | ReturnType<typeof sifaQueryKeys.discovery.suggestionCount>\n | ReturnType<typeof sifaQueryKeys.discovery.featured>\n | ReturnType<typeof sifaQueryKeys.follow.all>\n | ReturnType<typeof sifaQueryKeys.follow.following>\n | ReturnType<typeof sifaQueryKeys.follow.followers>\n | ReturnType<typeof sifaQueryKeys.follow.followingOf>\n | ReturnType<typeof sifaQueryKeys.follow.feed>\n | ReturnType<typeof sifaQueryKeys.follow.mutuals>\n | ReturnType<typeof sifaQueryKeys.follow.blueskySuggestions>\n | ReturnType<typeof sifaQueryKeys.admin.all>\n | ReturnType<typeof sifaQueryKeys.admin.featureAllowlist>\n | ReturnType<typeof sifaQueryKeys.admin.reviewQueues>\n | ReturnType<typeof sifaQueryKeys.stats.all>\n | ReturnType<typeof sifaQueryKeys.stats.homepage>\n | ReturnType<typeof sifaQueryKeys.apps.all>\n | ReturnType<typeof sifaQueryKeys.apps.registry>\n | ReturnType<typeof sifaQueryKeys.apps.hidden>\n | ReturnType<typeof sifaQueryKeys.activity.all>\n | ReturnType<typeof sifaQueryKeys.activity.heatmap>\n | ReturnType<typeof sifaQueryKeys.activity.teaser>\n | ReturnType<typeof sifaQueryKeys.activity.feed>\n | ReturnType<typeof sifaQueryKeys.activity.hiddenItems>\n | ReturnType<typeof sifaQueryKeys.endorsement.all>\n | ReturnType<typeof sifaQueryKeys.endorsement.count>\n | ReturnType<typeof sifaQueryKeys.endorsement.pending>\n | ReturnType<typeof sifaQueryKeys.endorsement.reciprocity>\n | ReturnType<typeof sifaQueryKeys.endorsement.received>\n | ReturnType<typeof sifaQueryKeys.confirmation.all>\n | ReturnType<typeof sifaQueryKeys.confirmation.pending>\n | ReturnType<typeof sifaQueryKeys.confirmation.given>\n | ReturnType<typeof sifaQueryKeys.stream.all>\n | ReturnType<typeof sifaQueryKeys.stream.networkCount>\n | ReturnType<typeof sifaQueryKeys.reactions.all>\n | ReturnType<typeof sifaQueryKeys.reactions.status>\n | ReturnType<typeof sifaQueryKeys.reactions.accountCheck>\n | ReturnType<typeof sifaQueryKeys.roadmap.all>\n | ReturnType<typeof sifaQueryKeys.roadmap.votes>\n | ReturnType<typeof sifaQueryKeys.roadmap.myVotes>\n | ReturnType<typeof sifaQueryKeys.bskyPreferences.all>\n | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels>\n | ReturnType<typeof sifaQueryKeys.destructive.all>\n | ReturnType<typeof sifaQueryKeys.destructive.wipePreview>\n | ReturnType<typeof sifaQueryKeys.repoInventory.all>\n | ReturnType<typeof sifaQueryKeys.repoInventory.list>;\n"],"mappings":";AAWO,IAAM,gBAAgB;AAAA,EAC3B,KAAK,MAAM,CAAC,MAAM;AAAA,EAElB,SAAS;AAAA,IACP,KAAK,MAAM,CAAC,QAAQ,SAAS;AAAA,IAC7B,UAAU,CAAC,gBAAwB,CAAC,QAAQ,WAAW,WAAW;AAAA,IAClE,YAAY,CAAC,QAAgB,CAAC,QAAQ,WAAW,gBAAgB,GAAG;AAAA,IACpE,MAAM,CAAC,UAAkB,CAAC,QAAQ,WAAW,QAAQ,KAAK;AAAA,IAC1D,kBAAkB,CAAC,gBACjB,CAAC,QAAQ,WAAW,qBAAqB,WAAW;AAAA;AAAA;AAAA,IAGtD,cAAc,MAAM,CAAC,QAAQ,WAAW,cAAc;AAAA,EACxD;AAAA,EAEA,UAAU;AAAA,IACR,KAAK,MAAM,CAAC,QAAQ,UAAU;AAAA,IAC9B,SAAS,C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IACxC,SAAS,MAAM,CAAC,QAAQ,WAAW,UAAU;AAAA,EAC/C;AAAA,EAEA,iBAAiB;AAAA,IACf,KAAK,MAAM,CAAC,QAAQ,kBAAkB;AAAA,IACtC,eAAe,MAAM,CAAC,QAAQ,oBAAoB,gBAAgB;AAAA,EACpE;AAAA,EAEA,eAAe;AAAA,IACb,KAAK,MAAM,CAAC,QAAQ,gBAAgB;AAAA,IACpC,MAAM,MAAM,CAAC,QAAQ,kBAAkB,MAAM;AAAA,EAC/C;AAAA,EACA,aAAa;AAAA,IACX,KAAK,MAAM,CAAC,QAAQ,aAAa;AAAA,IACjC,aAAa,MAAM,CAAC,QAAQ,eAAe,cAAc;AAAA,EAC3D;AACF;","names":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// src/repo/groups.ts
|
|
2
|
+
var SIFA_REPO_GROUPS = [
|
|
3
|
+
{
|
|
4
|
+
id: "profile-basics",
|
|
5
|
+
collections: [
|
|
6
|
+
"id.sifa.profile.self",
|
|
7
|
+
"id.sifa.profile.location",
|
|
8
|
+
"id.sifa.profile.language",
|
|
9
|
+
"id.sifa.profile.externalAccount",
|
|
10
|
+
"id.sifa.org.profile"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: "work-history",
|
|
15
|
+
collections: [
|
|
16
|
+
"id.sifa.profile.position",
|
|
17
|
+
"id.sifa.profile.volunteering",
|
|
18
|
+
"id.sifa.org.employmentAttestation"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "education",
|
|
23
|
+
collections: [
|
|
24
|
+
"id.sifa.profile.education",
|
|
25
|
+
"id.sifa.profile.course",
|
|
26
|
+
"id.sifa.profile.certification"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "skills-endorsements",
|
|
31
|
+
collections: [
|
|
32
|
+
"id.sifa.profile.skill",
|
|
33
|
+
"id.sifa.endorsement",
|
|
34
|
+
"id.sifa.endorsement.confirmation"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "projects",
|
|
39
|
+
collections: [
|
|
40
|
+
"id.sifa.profile.project",
|
|
41
|
+
"id.sifa.profile.involvement",
|
|
42
|
+
"id.sifa.project.self",
|
|
43
|
+
"id.sifa.project.member",
|
|
44
|
+
"id.sifa.project.membership"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "publications-talks",
|
|
49
|
+
collections: [
|
|
50
|
+
"id.sifa.profile.publication",
|
|
51
|
+
"id.sifa.profile.presentation",
|
|
52
|
+
"id.sifa.profile.presentationDelivery",
|
|
53
|
+
"id.sifa.profile.honor"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "people",
|
|
58
|
+
collections: ["id.sifa.graph.follow", "id.sifa.graph.connection", "id.sifa.confirmation"]
|
|
59
|
+
},
|
|
60
|
+
// The id.sifa.auth* lexicons are `permission-set` definitions -- OAuth scope
|
|
61
|
+
// identifiers published to the authority PDS and referenced from the API's
|
|
62
|
+
// scope builder. Nothing writes them into a user's repo, so listing them here
|
|
63
|
+
// promised a consent-management surface that could only ever be empty.
|
|
64
|
+
{
|
|
65
|
+
id: "meetings",
|
|
66
|
+
collections: ["id.sifa.meeting"]
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
var GROUP_BY_COLLECTION = new Map(
|
|
70
|
+
SIFA_REPO_GROUPS.flatMap(
|
|
71
|
+
(group) => group.collections.map((collection) => [collection, group.id])
|
|
72
|
+
)
|
|
73
|
+
);
|
|
74
|
+
function repoGroupForCollection(collection) {
|
|
75
|
+
return GROUP_BY_COLLECTION.get(collection) ?? "other";
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
SIFA_REPO_GROUPS,
|
|
79
|
+
repoGroupForCollection
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/repo/groups.ts"],"sourcesContent":["/**\n * The buckets a repo data-management UI shows instead of raw collections.\n *\n * \"id.sifa.profile.presentationDelivery\" means nothing to someone who has never\n * heard of a lexicon. Grouping is the whole difference between a developer tool\n * and something a user can act on, so it lives here rather than in one app: the\n * web settings page and a future native app must agree on what a bucket holds,\n * or the same repo reads differently depending where you look at it.\n *\n * Ids only, no display strings -- copy is translated at the surface.\n */\nexport type RepoGroupId =\n | 'profile-basics'\n | 'work-history'\n | 'education'\n | 'skills-endorsements'\n | 'projects'\n | 'publications-talks'\n | 'people'\n | 'meetings'\n | 'other';\n\nexport interface RepoGroupDefinition {\n id: RepoGroupId;\n /** Collections this bucket claims, in the order a UI should list them. */\n collections: readonly string[];\n}\n\n/**\n * Ordered so the buckets a user recognises come first and the machinery they\n * never think about (consents, access grants) comes last.\n *\n * `other` is deliberately absent: it is not a claim over a fixed set, it is\n * where anything unmapped lands. See {@link repoGroupForCollection}.\n */\nexport const SIFA_REPO_GROUPS: readonly RepoGroupDefinition[] = [\n {\n id: 'profile-basics',\n collections: [\n 'id.sifa.profile.self',\n 'id.sifa.profile.location',\n 'id.sifa.profile.language',\n 'id.sifa.profile.externalAccount',\n 'id.sifa.org.profile',\n ],\n },\n {\n id: 'work-history',\n collections: [\n 'id.sifa.profile.position',\n 'id.sifa.profile.volunteering',\n 'id.sifa.org.employmentAttestation',\n ],\n },\n {\n id: 'education',\n collections: [\n 'id.sifa.profile.education',\n 'id.sifa.profile.course',\n 'id.sifa.profile.certification',\n ],\n },\n {\n id: 'skills-endorsements',\n collections: [\n 'id.sifa.profile.skill',\n 'id.sifa.endorsement',\n 'id.sifa.endorsement.confirmation',\n ],\n },\n {\n id: 'projects',\n collections: [\n 'id.sifa.profile.project',\n 'id.sifa.profile.involvement',\n 'id.sifa.project.self',\n 'id.sifa.project.member',\n 'id.sifa.project.membership',\n ],\n },\n {\n id: 'publications-talks',\n collections: [\n 'id.sifa.profile.publication',\n 'id.sifa.profile.presentation',\n 'id.sifa.profile.presentationDelivery',\n 'id.sifa.profile.honor',\n ],\n },\n {\n id: 'people',\n collections: ['id.sifa.graph.follow', 'id.sifa.graph.connection', 'id.sifa.confirmation'],\n },\n // The id.sifa.auth* lexicons are `permission-set` definitions -- OAuth scope\n // identifiers published to the authority PDS and referenced from the API's\n // scope builder. Nothing writes them into a user's repo, so listing them here\n // promised a consent-management surface that could only ever be empty.\n {\n id: 'meetings',\n collections: ['id.sifa.meeting'],\n },\n];\n\nconst GROUP_BY_COLLECTION: ReadonlyMap<string, RepoGroupId> = new Map(\n SIFA_REPO_GROUPS.flatMap((group) =>\n group.collections.map((collection) => [collection, group.id] as const),\n ),\n);\n\n/**\n * Which bucket a collection belongs to, or `other` when we have not mapped it.\n *\n * Unmapped falls through to a visible bucket rather than being filtered out. A\n * lexicon we mint later would otherwise be invisible on the one page whose job\n * is to show everything in the repo -- the user would be told their data is\n * accounted for while some of it was silently omitted.\n */\nexport function repoGroupForCollection(collection: string): RepoGroupId {\n return GROUP_BY_COLLECTION.get(collection) ?? 'other';\n}\n"],"mappings":";AAmCO,IAAM,mBAAmD;AAAA,EAC9D;AAAA,IACE,IAAI;AAAA,IACJ,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,aAAa,CAAC,wBAAwB,4BAA4B,sBAAsB;AAAA,EAC1F;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA,IACE,IAAI;AAAA,IACJ,aAAa,CAAC,iBAAiB;AAAA,EACjC;AACF;AAEA,IAAM,sBAAwD,IAAI;AAAA,EAChE,iBAAiB;AAAA,IAAQ,CAAC,UACxB,MAAM,YAAY,IAAI,CAAC,eAAe,CAAC,YAAY,MAAM,EAAE,CAAU;AAAA,EACvE;AACF;AAUO,SAAS,uBAAuB,YAAiC;AACtE,SAAO,oBAAoB,IAAI,UAAU,KAAK;AAChD;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/repo/index.ts
|
|
2
|
+
import { SIFA_REPO_GROUPS, repoGroupForCollection } from "./groups.js";
|
|
3
|
+
import { describeSifaRecord } from "./labels.js";
|
|
4
|
+
export {
|
|
5
|
+
SIFA_REPO_GROUPS,
|
|
6
|
+
describeSifaRecord,
|
|
7
|
+
repoGroupForCollection
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/repo/index.ts"],"sourcesContent":["export { SIFA_REPO_GROUPS, repoGroupForCollection } from './groups.js';\nexport type { RepoGroupDefinition, RepoGroupId } from './groups.js';\nexport { describeSifaRecord } from './labels.js';\nexport type { RepoRecordLabel } from './labels.js';\nexport type {\n RepoCollectionGroup,\n RepoDeleteOutcome,\n RepoDeleteRecordResult,\n RepoDeleteResult,\n RepoInventory,\n RepoRecordSummary,\n} from './types.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,8BAA8B;AAEzD,SAAS,0BAA0B;","names":[]}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// src/repo/labels.ts
|
|
2
|
+
var LABEL_RULES = {
|
|
3
|
+
"id.sifa.profile.self": { primary: ["headline"] },
|
|
4
|
+
"id.sifa.profile.location": {
|
|
5
|
+
primary: ["address.locality", "address.region", "address.country"],
|
|
6
|
+
secondary: ["address.country"]
|
|
7
|
+
},
|
|
8
|
+
"id.sifa.profile.language": { primary: ["name"], secondary: ["proficiency"] },
|
|
9
|
+
"id.sifa.profile.externalAccount": { primary: ["label", "platform"], secondary: ["url"] },
|
|
10
|
+
"id.sifa.org.profile": { primary: ["name"] },
|
|
11
|
+
"id.sifa.profile.position": {
|
|
12
|
+
primary: ["title"],
|
|
13
|
+
secondary: ["company"],
|
|
14
|
+
date: ["startedAt"]
|
|
15
|
+
},
|
|
16
|
+
"id.sifa.profile.volunteering": {
|
|
17
|
+
primary: ["role", "organization"],
|
|
18
|
+
secondary: ["organization"],
|
|
19
|
+
date: ["startedAt"]
|
|
20
|
+
},
|
|
21
|
+
"id.sifa.org.employmentAttestation": {
|
|
22
|
+
primary: ["title"],
|
|
23
|
+
date: ["startedAt"],
|
|
24
|
+
subjectDid: ["subject"]
|
|
25
|
+
},
|
|
26
|
+
"id.sifa.profile.education": {
|
|
27
|
+
primary: ["degree", "fieldOfStudy"],
|
|
28
|
+
secondary: ["institution"],
|
|
29
|
+
date: ["startedAt"]
|
|
30
|
+
},
|
|
31
|
+
"id.sifa.profile.course": {
|
|
32
|
+
primary: ["name"],
|
|
33
|
+
secondary: ["institution"],
|
|
34
|
+
date: ["completedAt"]
|
|
35
|
+
},
|
|
36
|
+
"id.sifa.profile.certification": {
|
|
37
|
+
primary: ["name"],
|
|
38
|
+
secondary: ["authority"],
|
|
39
|
+
date: ["issuedAt"]
|
|
40
|
+
},
|
|
41
|
+
"id.sifa.profile.skill": { primary: ["name"], secondary: ["category"] },
|
|
42
|
+
"id.sifa.endorsement": { primary: ["skillName"], subjectDid: ["subject"] },
|
|
43
|
+
"id.sifa.endorsement.confirmation": { primary: ["skill"] },
|
|
44
|
+
"id.sifa.profile.project": {
|
|
45
|
+
primary: ["title", "name"],
|
|
46
|
+
secondary: ["role"],
|
|
47
|
+
date: ["startedAt"]
|
|
48
|
+
},
|
|
49
|
+
"id.sifa.profile.involvement": {
|
|
50
|
+
primary: ["role", "upstream"],
|
|
51
|
+
secondary: ["upstream"],
|
|
52
|
+
date: ["startedAt"]
|
|
53
|
+
},
|
|
54
|
+
"id.sifa.project.self": { primary: ["name", "title"] },
|
|
55
|
+
"id.sifa.project.member": { primary: ["role"], subjectDid: ["subject", "did"] },
|
|
56
|
+
"id.sifa.project.membership": { primary: ["role"], subjectDid: ["subject", "did"] },
|
|
57
|
+
"id.sifa.profile.publication": {
|
|
58
|
+
primary: ["title", "name"],
|
|
59
|
+
secondary: ["publisher"],
|
|
60
|
+
date: ["publishedAt"]
|
|
61
|
+
},
|
|
62
|
+
"id.sifa.profile.presentation": { primary: ["title", "label"] },
|
|
63
|
+
"id.sifa.profile.presentationDelivery": {
|
|
64
|
+
// A delivery without its own title is identified by the event it happened
|
|
65
|
+
// at. Falling straight to the leaf gave a run of rows all reading "a time
|
|
66
|
+
// you gave a talk", with the one distinguishing fact demoted underneath.
|
|
67
|
+
primary: ["title", "eventName"],
|
|
68
|
+
secondary: ["eventName"],
|
|
69
|
+
date: ["date"]
|
|
70
|
+
},
|
|
71
|
+
"id.sifa.profile.honor": { primary: ["title"], secondary: ["issuer"], date: ["awardedAt"] },
|
|
72
|
+
"id.sifa.graph.follow": { subjectDid: ["subject"] },
|
|
73
|
+
"id.sifa.meeting": { subjectDid: ["subject"] },
|
|
74
|
+
"id.sifa.graph.connection": { subjectDid: ["subject"] },
|
|
75
|
+
"id.sifa.confirmation": {
|
|
76
|
+
primary: ["subjectName"],
|
|
77
|
+
secondary: ["relation"],
|
|
78
|
+
subjectDid: ["subject"]
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
function collectionLeaf(collection) {
|
|
82
|
+
return collection.slice(collection.lastIndexOf(".") + 1);
|
|
83
|
+
}
|
|
84
|
+
function valueAtPath(record, path) {
|
|
85
|
+
let current = record;
|
|
86
|
+
for (const segment of path.split(".")) {
|
|
87
|
+
if (typeof current !== "object" || current === null) return void 0;
|
|
88
|
+
current = current[segment];
|
|
89
|
+
}
|
|
90
|
+
return current;
|
|
91
|
+
}
|
|
92
|
+
function pickString(record, fields) {
|
|
93
|
+
for (const field of fields) {
|
|
94
|
+
const raw = valueAtPath(record, field);
|
|
95
|
+
if (typeof raw !== "string") continue;
|
|
96
|
+
const trimmed = raw.trim();
|
|
97
|
+
if (trimmed.length > 0) return trimmed;
|
|
98
|
+
}
|
|
99
|
+
return void 0;
|
|
100
|
+
}
|
|
101
|
+
function describeSifaRecord(collection, value) {
|
|
102
|
+
const leaf = collectionLeaf(collection);
|
|
103
|
+
const rule = LABEL_RULES[collection];
|
|
104
|
+
if (!rule || typeof value !== "object" || value === null) {
|
|
105
|
+
return { primary: leaf, isFallback: true };
|
|
106
|
+
}
|
|
107
|
+
const record = value;
|
|
108
|
+
const primary = rule.primary && pickString(record, rule.primary);
|
|
109
|
+
const label = primary ? { primary } : { primary: leaf, isFallback: true };
|
|
110
|
+
const secondary = rule.secondary && pickString(record, rule.secondary);
|
|
111
|
+
if (secondary !== void 0 && secondary !== label.primary) label.secondary = secondary;
|
|
112
|
+
const date = rule.date && pickString(record, rule.date);
|
|
113
|
+
if (date !== void 0) label.date = date;
|
|
114
|
+
const subjectDid = rule.subjectDid && pickString(record, rule.subjectDid);
|
|
115
|
+
if (subjectDid !== void 0) label.subjectDid = subjectDid;
|
|
116
|
+
return label;
|
|
117
|
+
}
|
|
118
|
+
export {
|
|
119
|
+
describeSifaRecord
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/repo/labels.ts"],"sourcesContent":["/**\n * One line of text identifying a record to the person who wrote it.\n *\n * Split into parts rather than one joined string: joining needs a connective\n * (\"Senior Engineer at Acme\") and a connective is copy, which is translated at\n * the surface. Every value here comes straight from the user's own record, so\n * the SDK contributes no language of its own.\n */\nexport interface RepoRecordLabel {\n /** The record's own identifying text, or the collection leaf when it has none. */\n primary: string;\n /** Employer, institution, event, or publisher, when the record names one. */\n secondary?: string;\n /** The date the record is about, not when it was written. May be partial (\"2021-03\"). */\n date?: string;\n /**\n * The person a record is about, for records whose meaning is a relationship\n * rather than text: endorsements, follows, confirmations, attestations.\n *\n * Kept out of {@link primary} so a surface can resolve it to a handle and\n * avatar without parsing a DID back out of display text.\n */\n subjectDid?: string;\n /**\n * Handle and display name for {@link subjectDid}, when a surface resolved it.\n *\n * Records whose whole meaning is a relationship -- follows, meetings,\n * endorsements -- carry only a DID. A page listing 33 of them shows 33\n * identical rows and a column of did:plc: strings, which is unusable for\n * deciding which one to remove. Resolution has to be batched by the caller,\n * so the SDK leaves room for the answer rather than fetching it.\n */\n subjectHandle?: string;\n subjectName?: string;\n /**\n * Set when the record carried no readable text and {@link primary} is the\n * collection leaf rather than the user's own data.\n *\n * A surface must substitute its own wording for these -- a row reading\n * \"follow\" or \"location\" tells the reader nothing about which record they\n * are about to delete. The flag exists because the leaf is indistinguishable\n * from real content once it is a string: a headline that genuinely says\n * \"location\" must not be relabelled.\n */\n isFallback?: true;\n}\n\ninterface LabelRule {\n /**\n * Candidate fields for {@link RepoRecordLabel.primary}, first non-blank wins.\n *\n * A field may be a dotted path into a nested object (\"address.locality\").\n * Several lexicons nest their readable text one level down, and a rule that\n * could only see the top level fell through to the collection leaf -- the\n * user was shown the bare word \"location\" where their city should be.\n */\n primary?: readonly string[];\n secondary?: readonly string[];\n date?: readonly string[];\n subjectDid?: readonly string[];\n}\n\n/**\n * Which fields carry the identifying text, per collection.\n *\n * A table rather than a function per lexicon: the extraction is the same shape\n * every time, and 30 near-identical functions would hide the two or three that\n * genuinely differ.\n *\n * Collections absent from this table fall back to the collection leaf. That is\n * the right answer for records with nothing human-readable in them at all --\n * consent grants, access tokens -- which is most of what is missing here.\n */\nconst LABEL_RULES: Readonly<Record<string, LabelRule>> = {\n 'id.sifa.profile.self': { primary: ['headline'] },\n 'id.sifa.profile.location': {\n primary: ['address.locality', 'address.region', 'address.country'],\n secondary: ['address.country'],\n },\n 'id.sifa.profile.language': { primary: ['name'], secondary: ['proficiency'] },\n 'id.sifa.profile.externalAccount': { primary: ['label', 'platform'], secondary: ['url'] },\n 'id.sifa.org.profile': { primary: ['name'] },\n\n 'id.sifa.profile.position': {\n primary: ['title'],\n secondary: ['company'],\n date: ['startedAt'],\n },\n 'id.sifa.profile.volunteering': {\n primary: ['role', 'organization'],\n secondary: ['organization'],\n date: ['startedAt'],\n },\n 'id.sifa.org.employmentAttestation': {\n primary: ['title'],\n date: ['startedAt'],\n subjectDid: ['subject'],\n },\n\n 'id.sifa.profile.education': {\n primary: ['degree', 'fieldOfStudy'],\n secondary: ['institution'],\n date: ['startedAt'],\n },\n 'id.sifa.profile.course': {\n primary: ['name'],\n secondary: ['institution'],\n date: ['completedAt'],\n },\n 'id.sifa.profile.certification': {\n primary: ['name'],\n secondary: ['authority'],\n date: ['issuedAt'],\n },\n\n 'id.sifa.profile.skill': { primary: ['name'], secondary: ['category'] },\n 'id.sifa.endorsement': { primary: ['skillName'], subjectDid: ['subject'] },\n 'id.sifa.endorsement.confirmation': { primary: ['skill'] },\n\n 'id.sifa.profile.project': {\n primary: ['title', 'name'],\n secondary: ['role'],\n date: ['startedAt'],\n },\n 'id.sifa.profile.involvement': {\n primary: ['role', 'upstream'],\n secondary: ['upstream'],\n date: ['startedAt'],\n },\n 'id.sifa.project.self': { primary: ['name', 'title'] },\n 'id.sifa.project.member': { primary: ['role'], subjectDid: ['subject', 'did'] },\n 'id.sifa.project.membership': { primary: ['role'], subjectDid: ['subject', 'did'] },\n\n 'id.sifa.profile.publication': {\n primary: ['title', 'name'],\n secondary: ['publisher'],\n date: ['publishedAt'],\n },\n 'id.sifa.profile.presentation': { primary: ['title', 'label'] },\n 'id.sifa.profile.presentationDelivery': {\n // A delivery without its own title is identified by the event it happened\n // at. Falling straight to the leaf gave a run of rows all reading \"a time\n // you gave a talk\", with the one distinguishing fact demoted underneath.\n primary: ['title', 'eventName'],\n secondary: ['eventName'],\n date: ['date'],\n },\n 'id.sifa.profile.honor': { primary: ['title'], secondary: ['issuer'], date: ['awardedAt'] },\n\n 'id.sifa.graph.follow': { subjectDid: ['subject'] },\n 'id.sifa.meeting': { subjectDid: ['subject'] },\n 'id.sifa.graph.connection': { subjectDid: ['subject'] },\n 'id.sifa.confirmation': {\n primary: ['subjectName'],\n secondary: ['relation'],\n subjectDid: ['subject'],\n },\n};\n\n/** The part of an NSID after the last dot: \"id.sifa.profile.position\" -> \"position\". */\nfunction collectionLeaf(collection: string): string {\n return collection.slice(collection.lastIndexOf('.') + 1);\n}\n\n/** Walk a dotted path, stopping at the first step that is not an object. */\nfunction valueAtPath(record: Record<string, unknown>, path: string): unknown {\n let current: unknown = record;\n for (const segment of path.split('.')) {\n if (typeof current !== 'object' || current === null) return undefined;\n current = (current as Record<string, unknown>)[segment];\n }\n return current;\n}\n\n/**\n * First field holding a non-blank string, or undefined.\n *\n * Non-strings are skipped rather than coerced: a record that fails validation\n * still reaches this page (it is in the repo, so the user can see and delete\n * it), and \"[object Object]\" as a label helps nobody.\n */\nfunction pickString(\n record: Record<string, unknown>,\n fields: readonly string[],\n): string | undefined {\n for (const field of fields) {\n const raw = valueAtPath(record, field);\n if (typeof raw !== 'string') continue;\n const trimmed = raw.trim();\n if (trimmed.length > 0) return trimmed;\n }\n return undefined;\n}\n\n/**\n * Describe one record from the user's repo in terms they will recognise.\n *\n * Never throws and never returns an empty primary. This runs over whatever is\n * actually in the repo, including records written by older versions of Sifa and\n * records hand-edited elsewhere. A page that crashes on one malformed record\n * would hide the rest, which is exactly the data the user came to manage.\n */\nexport function describeSifaRecord(collection: string, value: unknown): RepoRecordLabel {\n const leaf = collectionLeaf(collection);\n const rule = LABEL_RULES[collection];\n if (!rule || typeof value !== 'object' || value === null) {\n return { primary: leaf, isFallback: true };\n }\n\n const record = value as Record<string, unknown>;\n const primary = rule.primary && pickString(record, rule.primary);\n const label: RepoRecordLabel = primary ? { primary } : { primary: leaf, isFallback: true };\n\n const secondary = rule.secondary && pickString(record, rule.secondary);\n if (secondary !== undefined && secondary !== label.primary) label.secondary = secondary;\n\n const date = rule.date && pickString(record, rule.date);\n if (date !== undefined) label.date = date;\n\n const subjectDid = rule.subjectDid && pickString(record, rule.subjectDid);\n if (subjectDid !== undefined) label.subjectDid = subjectDid;\n\n return label;\n}\n"],"mappings":";AAyEA,IAAM,cAAmD;AAAA,EACvD,wBAAwB,EAAE,SAAS,CAAC,UAAU,EAAE;AAAA,EAChD,4BAA4B;AAAA,IAC1B,SAAS,CAAC,oBAAoB,kBAAkB,iBAAiB;AAAA,IACjE,WAAW,CAAC,iBAAiB;AAAA,EAC/B;AAAA,EACA,4BAA4B,EAAE,SAAS,CAAC,MAAM,GAAG,WAAW,CAAC,aAAa,EAAE;AAAA,EAC5E,mCAAmC,EAAE,SAAS,CAAC,SAAS,UAAU,GAAG,WAAW,CAAC,KAAK,EAAE;AAAA,EACxF,uBAAuB,EAAE,SAAS,CAAC,MAAM,EAAE;AAAA,EAE3C,4BAA4B;AAAA,IAC1B,SAAS,CAAC,OAAO;AAAA,IACjB,WAAW,CAAC,SAAS;AAAA,IACrB,MAAM,CAAC,WAAW;AAAA,EACpB;AAAA,EACA,gCAAgC;AAAA,IAC9B,SAAS,CAAC,QAAQ,cAAc;AAAA,IAChC,WAAW,CAAC,cAAc;AAAA,IAC1B,MAAM,CAAC,WAAW;AAAA,EACpB;AAAA,EACA,qCAAqC;AAAA,IACnC,SAAS,CAAC,OAAO;AAAA,IACjB,MAAM,CAAC,WAAW;AAAA,IAClB,YAAY,CAAC,SAAS;AAAA,EACxB;AAAA,EAEA,6BAA6B;AAAA,IAC3B,SAAS,CAAC,UAAU,cAAc;AAA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,QAAQ,KAAK,OAAO;AAC/D,QAAM,QAAyB,UAAU,EAAE,QAAQ,IAAI,EAAE,SAAS,MAAM,YAAY,KAAK;AAEzF,QAAM,YAAY,KAAK,aAAa,WAAW,QAAQ,KAAK,SAAS;AACrE,MAAI,cAAc,UAAa,cAAc,MAAM,QAAS,OAAM,YAAY;AAE9E,QAAM,OAAO,KAAK,QAAQ,WAAW,QAAQ,KAAK,IAAI;AACtD,MAAI,SAAS,OAAW,OAAM,OAAO;AAErC,QAAM,aAAa,KAAK,cAAc,WAAW,QAAQ,KAAK,UAAU;AACxE,MAAI,eAAe,OAAW,OAAM,aAAa;AAEjD,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/resume/index.js
CHANGED
|
@@ -1,181 +1,7 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
{ suffix: ".northsky.social", name: "northsky" }
|
|
7
|
-
];
|
|
8
|
-
new Set(PDS_PROVIDERS.map((p) => p.name));
|
|
9
|
-
function formatStructuredName(givenName, familyName) {
|
|
10
|
-
const given = givenName?.trim();
|
|
11
|
-
const family = familyName?.trim();
|
|
12
|
-
if (given && family) return `${given} ${family}`;
|
|
13
|
-
return given || family || void 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// src/profile/section-model.ts
|
|
17
|
-
function filterHidden(items) {
|
|
18
|
-
return (items ?? []).filter((i) => !i.hidden);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// src/jsonld/url.ts
|
|
22
|
-
var DEFAULT_BASE_URL = "https://sifa.id";
|
|
23
|
-
function normaliseBaseUrl(baseUrl) {
|
|
24
|
-
const value = baseUrl ?? DEFAULT_BASE_URL;
|
|
25
|
-
let end = value.length;
|
|
26
|
-
while (end > 0 && value.charCodeAt(end - 1) === 47) end -= 1;
|
|
27
|
-
return value.slice(0, end);
|
|
28
|
-
}
|
|
29
|
-
function profileUrl(baseUrl, handle) {
|
|
30
|
-
return `${baseUrl}/p/${handle}`;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// src/resume/json-resume.ts
|
|
34
|
-
var SCHEMA_VERSION = "v1.0.0";
|
|
35
|
-
var RESUME_DATE_RE = /^(\d{4})(-\d{2})?(-\d{2})?/;
|
|
36
|
-
function toResumeDate(value) {
|
|
37
|
-
const trimmed = value?.trim();
|
|
38
|
-
if (!trimmed) return void 0;
|
|
39
|
-
const match = RESUME_DATE_RE.exec(trimmed);
|
|
40
|
-
return match ? match[0] : void 0;
|
|
41
|
-
}
|
|
42
|
-
var FLUENCY_LABELS = {
|
|
43
|
-
elementary: "Elementary",
|
|
44
|
-
limited_working: "Limited working",
|
|
45
|
-
professional_working: "Professional working",
|
|
46
|
-
full_professional: "Full professional",
|
|
47
|
-
native: "Native or bilingual"
|
|
1
|
+
// src/resume/index.ts
|
|
2
|
+
import { profileToJsonResume, toResumeDate } from "./json-resume.js";
|
|
3
|
+
export {
|
|
4
|
+
profileToJsonResume,
|
|
5
|
+
toResumeDate
|
|
48
6
|
};
|
|
49
|
-
var identity = (input) => input;
|
|
50
|
-
function compact(value) {
|
|
51
|
-
return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0));
|
|
52
|
-
}
|
|
53
|
-
function section(key, items) {
|
|
54
|
-
return items.length > 0 ? { [key]: items } : void 0;
|
|
55
|
-
}
|
|
56
|
-
function mapLocation(location, s) {
|
|
57
|
-
if (!location) return void 0;
|
|
58
|
-
const mapped = compact({
|
|
59
|
-
city: text(location.locality ?? location.city, s),
|
|
60
|
-
region: text(location.region, s),
|
|
61
|
-
countryCode: text(location.countryCode, s),
|
|
62
|
-
postalCode: text(location.postalCode, s)
|
|
63
|
-
});
|
|
64
|
-
return Object.keys(mapped).length > 0 ? mapped : void 0;
|
|
65
|
-
}
|
|
66
|
-
function text(value, s) {
|
|
67
|
-
const trimmed = value?.trim();
|
|
68
|
-
return trimmed ? s(trimmed) : void 0;
|
|
69
|
-
}
|
|
70
|
-
function orgName(entityName, stored, s) {
|
|
71
|
-
return text(entityName, s) ?? text(stored, s);
|
|
72
|
-
}
|
|
73
|
-
function profileToJsonResume(profile, options = {}) {
|
|
74
|
-
const s = options.sanitize ?? identity;
|
|
75
|
-
const baseUrl = normaliseBaseUrl(options.baseUrl);
|
|
76
|
-
const canonical = options.canonicalUrl ?? profileUrl(baseUrl, profile.handle);
|
|
77
|
-
const name = formatStructuredName(profile.givenName, profile.familyName) ?? text(profile.displayName, s) ?? profile.handle;
|
|
78
|
-
const profiles = filterHidden(profile.externalAccounts).map(
|
|
79
|
-
(account) => compact({
|
|
80
|
-
network: s(account.platform),
|
|
81
|
-
username: text(account.label, s),
|
|
82
|
-
url: text(account.url, s)
|
|
83
|
-
})
|
|
84
|
-
);
|
|
85
|
-
const basics = compact({
|
|
86
|
-
name,
|
|
87
|
-
label: text(profile.headline, s),
|
|
88
|
-
image: text(profile.avatar, s),
|
|
89
|
-
url: text(profile.website, s) ?? canonical,
|
|
90
|
-
summary: text(profile.about, s),
|
|
91
|
-
location: mapLocation(profile.location, s),
|
|
92
|
-
...section("profiles", profiles)
|
|
93
|
-
});
|
|
94
|
-
const work = filterHidden(profile.positions).map(
|
|
95
|
-
(position) => compact({
|
|
96
|
-
name: orgName(position.entityName, position.company, s),
|
|
97
|
-
position: s(position.title),
|
|
98
|
-
summary: text(position.description, s),
|
|
99
|
-
startDate: toResumeDate(position.startedAt),
|
|
100
|
-
endDate: toResumeDate(position.endedAt)
|
|
101
|
-
})
|
|
102
|
-
);
|
|
103
|
-
const volunteer = filterHidden(profile.volunteering).map(
|
|
104
|
-
(entry) => compact({
|
|
105
|
-
organization: orgName(entry.entityName, entry.organization, s),
|
|
106
|
-
position: text(entry.role, s),
|
|
107
|
-
summary: text(entry.description, s),
|
|
108
|
-
startDate: toResumeDate(entry.startDate),
|
|
109
|
-
endDate: toResumeDate(entry.endDate)
|
|
110
|
-
})
|
|
111
|
-
);
|
|
112
|
-
const education = filterHidden(profile.education).map(
|
|
113
|
-
(entry) => compact({
|
|
114
|
-
institution: orgName(entry.entityName, entry.institution, s),
|
|
115
|
-
area: text(entry.fieldOfStudy, s),
|
|
116
|
-
studyType: text(entry.degree, s),
|
|
117
|
-
startDate: toResumeDate(entry.startedAt),
|
|
118
|
-
endDate: toResumeDate(entry.endedAt)
|
|
119
|
-
})
|
|
120
|
-
);
|
|
121
|
-
const awards = filterHidden(profile.honors).map(
|
|
122
|
-
(honor) => compact({
|
|
123
|
-
title: s(honor.title),
|
|
124
|
-
date: toResumeDate(honor.date),
|
|
125
|
-
awarder: orgName(honor.entityName, honor.issuer, s),
|
|
126
|
-
summary: text(honor.description, s)
|
|
127
|
-
})
|
|
128
|
-
);
|
|
129
|
-
const certificates = filterHidden(profile.certifications).map(
|
|
130
|
-
(cert) => compact({
|
|
131
|
-
name: s(cert.name),
|
|
132
|
-
date: toResumeDate(cert.issueDate),
|
|
133
|
-
// `issuingOrg` is the deprecated read-view alias for `authority`; records
|
|
134
|
-
// indexed before the rename carry only the alias.
|
|
135
|
-
issuer: orgName(cert.entityName, cert.authority ?? cert.issuingOrg, s),
|
|
136
|
-
url: text(cert.credentialUrl, s)
|
|
137
|
-
})
|
|
138
|
-
);
|
|
139
|
-
const publications = filterHidden(profile.publications).map(
|
|
140
|
-
(publication) => compact({
|
|
141
|
-
name: s(publication.title),
|
|
142
|
-
publisher: text(publication.publisher, s),
|
|
143
|
-
releaseDate: toResumeDate(publication.date),
|
|
144
|
-
url: text(publication.url, s),
|
|
145
|
-
summary: text(publication.description, s)
|
|
146
|
-
})
|
|
147
|
-
);
|
|
148
|
-
const skills = (profile.skills ?? []).map((skill) => ({ name: s(skill.name) }));
|
|
149
|
-
const languages = filterHidden(profile.languages).map(
|
|
150
|
-
(language) => compact({
|
|
151
|
-
language: s(language.language),
|
|
152
|
-
fluency: language.proficiency ? FLUENCY_LABELS[language.proficiency] : void 0
|
|
153
|
-
})
|
|
154
|
-
);
|
|
155
|
-
const projects = filterHidden(profile.projects).map(
|
|
156
|
-
(project) => compact({
|
|
157
|
-
name: s(project.name),
|
|
158
|
-
description: text(project.description, s),
|
|
159
|
-
url: text(project.url, s),
|
|
160
|
-
startDate: toResumeDate(project.startDate),
|
|
161
|
-
endDate: toResumeDate(project.endDate)
|
|
162
|
-
})
|
|
163
|
-
);
|
|
164
|
-
return {
|
|
165
|
-
basics,
|
|
166
|
-
...section("work", work),
|
|
167
|
-
...section("volunteer", volunteer),
|
|
168
|
-
...section("education", education),
|
|
169
|
-
...section("awards", awards),
|
|
170
|
-
...section("certificates", certificates),
|
|
171
|
-
...section("publications", publications),
|
|
172
|
-
...section("skills", skills),
|
|
173
|
-
...section("languages", languages),
|
|
174
|
-
...section("projects", projects),
|
|
175
|
-
meta: { canonical, version: SCHEMA_VERSION }
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export { profileToJsonResume, toResumeDate };
|
|
180
|
-
//# sourceMappingURL=index.js.map
|
|
181
7
|
//# sourceMappingURL=index.js.map
|