@singi-labs/sifa-sdk 0.12.68 → 0.12.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/{feed-dOSy_48Z.d.cts → feed-BMm9Pkew.d.cts} +1 -1
  2. package/dist/{feed-dOSy_48Z.d.ts → feed-BMm9Pkew.d.ts} +1 -1
  3. package/dist/{index-Cj6jfpAE.d.cts → index-a3xqWsNm.d.cts} +38 -1
  4. package/dist/{index-Cj6jfpAE.d.ts → index-a3xqWsNm.d.ts} +38 -1
  5. package/dist/index.cjs +88 -1
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +47 -9
  8. package/dist/index.d.ts +47 -9
  9. package/dist/index.js +77 -2
  10. package/dist/index.js.map +1 -1
  11. package/dist/jsonld/index.cjs +444 -457
  12. package/dist/jsonld/index.cjs.map +1 -1
  13. package/dist/jsonld/index.d.cts +32 -18
  14. package/dist/jsonld/index.d.ts +32 -18
  15. package/dist/jsonld/index.js +444 -457
  16. package/dist/jsonld/index.js.map +1 -1
  17. package/dist/{index-BARfrksZ.d.cts → network-map-BAuHfC6e.d.cts} +5 -5
  18. package/dist/{index-C0iPs_NQ.d.ts → network-map-l-qT7ada.d.ts} +5 -5
  19. package/dist/{org-ClPPJ3-J.d.cts → org-BaWCreh6.d.cts} +3 -3
  20. package/dist/{org-wLJm-WXC.d.ts → org-OaBu-89h.d.ts} +3 -3
  21. package/dist/{shared-BibYErTJ.d.cts → profile-investment-C97ssnBV.d.cts} +45 -1
  22. package/dist/{shared-BibYErTJ.d.ts → profile-investment-C97ssnBV.d.ts} +45 -1
  23. package/dist/{profile-summary-sEHAdvfm.d.cts → profile-summary-BTZAwG1z.d.cts} +1 -1
  24. package/dist/{profile-summary-Cbtnh04E.d.ts → profile-summary-Do5FY7Q0.d.ts} +1 -1
  25. package/dist/query/fetchers/index.cjs +138 -0
  26. package/dist/query/fetchers/index.cjs.map +1 -1
  27. package/dist/query/fetchers/index.d.cts +24 -6
  28. package/dist/query/fetchers/index.d.ts +24 -6
  29. package/dist/query/fetchers/index.js +136 -1
  30. package/dist/query/fetchers/index.js.map +1 -1
  31. package/dist/query/hooks/index.cjs +188 -0
  32. package/dist/query/hooks/index.cjs.map +1 -1
  33. package/dist/query/hooks/index.d.cts +26 -6
  34. package/dist/query/hooks/index.d.ts +26 -6
  35. package/dist/query/hooks/index.js +186 -1
  36. package/dist/query/hooks/index.js.map +1 -1
  37. package/dist/query/index.d.cts +9 -9
  38. package/dist/query/index.d.ts +9 -9
  39. package/dist/schemas/index.cjs +35 -0
  40. package/dist/schemas/index.cjs.map +1 -1
  41. package/dist/schemas/index.d.cts +2 -2
  42. package/dist/schemas/index.d.ts +2 -2
  43. package/dist/schemas/index.js +33 -1
  44. package/dist/schemas/index.js.map +1 -1
  45. package/dist/schemas/write/index.cjs +26 -0
  46. package/dist/schemas/write/index.cjs.map +1 -1
  47. package/dist/schemas/write/index.d.cts +36 -1
  48. package/dist/schemas/write/index.d.ts +36 -1
  49. package/dist/schemas/write/index.js +26 -1
  50. package/dist/schemas/write/index.js.map +1 -1
  51. package/dist/{types-BtoIc4cG.d.ts → types-C3xxTGUE.d.ts} +2 -2
  52. package/dist/{types-DNrRbi9D.d.cts → types-D0LWpGtY.d.cts} +2 -2
  53. package/dist/{index-DQrudL91.d.cts → use-org-notification-emails-CcuTb7LT.d.cts} +4 -4
  54. package/dist/{index-B61EZesA.d.ts → use-org-notification-emails-DG2qXAKu.d.ts} +4 -4
  55. package/package.json +3 -2
@@ -627,4 +627,48 @@ declare const selfLabelsSchema: z.ZodObject<{
627
627
  }, z.core.$strip>>;
628
628
  }, z.core.$strip>;
629
629
 
630
- export { datetimeSchema as $, type ArtifactLink as A, type BlobRef as B, ProfileLanguageRecordSchema as C, type ProfilePositionRecord as D, type EndorsementConfirmationRecord as E, ProfilePositionRecordSchema as F, type GraphFollowRecord as G, type ProfilePresentationDeliveryRecord as H, ProfilePresentationDeliveryRecordSchema as I, type ProfilePresentationRecord as J, ProfilePresentationRecordSchema as K, type ProfileProjectRecord as L, ProfileProjectRecordSchema as M, type ProfilePublicationRecord as N, type OrgEmploymentAttestationRecord as O, PROFILE_INVOLVEMENT_NSID as P, ProfilePublicationRecordSchema as Q, type ProfileSelfRecord as R, ProfileSelfRecordSchema as S, type ProfileSkillRecord as T, ProfileSkillRecordSchema as U, type ProfileVolunteeringRecord as V, ProfileVolunteeringRecordSchema as W, type PublicationAuthor as X, PublicationAuthorSchema as Y, atUriSchema as Z, cidSchema as _, ArtifactLinkSchema as a, didSchema as a0, externalRecordRefSchema as a1, languageTagSchema as a2, makeGraphFollowRecordSchema as a3, maxGraphemes as a4, partialDateSchema as a5, selfLabelsSchema as a6, skillRefSchema as a7, strongRefSchema as a8, uriSchema as a9, BlobRefSchema as b, EndorsementConfirmationRecordSchema as c, type EndorsementRecord as d, EndorsementRecordSchema as e, GraphFollowRecordSchema as f, OrgEmploymentAttestationRecordSchema as g, type OrgProfileRecord as h, OrgProfileRecordSchema as i, type PresentationDuration as j, PresentationDurationSchema as k, type PresentationLink as l, PresentationLinkSchema as m, type ProfileCertificationRecord as n, ProfileCertificationRecordSchema as o, type ProfileCourseRecord as p, ProfileCourseRecordSchema as q, type ProfileEducationRecord as r, ProfileEducationRecordSchema as s, type ProfileExternalAccountRecord as t, ProfileExternalAccountRecordSchema as u, type ProfileHonorRecord as v, ProfileHonorRecordSchema as w, type ProfileInvolvementRecord as x, ProfileInvolvementRecordSchema as y, type ProfileLanguageRecord as z };
630
+ /**
631
+ * A deliberately structured amount. Free text was rejected here: an unparseable
632
+ * money string is worse than no amount at all, and cannot be repaired once people
633
+ * have written them.
634
+ */
635
+ declare const InvestmentAmountSchema: z.ZodObject<{
636
+ value: z.ZodNumber;
637
+ currency: z.ZodString;
638
+ }, z.core.$strip>;
639
+ /** Collection NSID for investment records. */
640
+ declare const PROFILE_INVESTMENT_NSID = "id.sifa.profile.investment";
641
+ /** Zod schema for `id.sifa.profile.investment` records. */
642
+ declare const ProfileInvestmentRecordSchema: z.ZodObject<{
643
+ company: z.ZodString;
644
+ companyDid: z.ZodOptional<z.ZodString>;
645
+ entityRef: z.ZodOptional<z.ZodString>;
646
+ role: z.ZodOptional<z.ZodString>;
647
+ stage: z.ZodOptional<z.ZodString>;
648
+ status: z.ZodOptional<z.ZodString>;
649
+ via: z.ZodOptional<z.ZodString>;
650
+ viaDid: z.ZodOptional<z.ZodString>;
651
+ viaEntityRef: z.ZodOptional<z.ZodString>;
652
+ amount: z.ZodOptional<z.ZodObject<{
653
+ value: z.ZodNumber;
654
+ currency: z.ZodString;
655
+ }, z.core.$strip>>;
656
+ startedAt: z.ZodOptional<z.ZodString>;
657
+ endedAt: z.ZodOptional<z.ZodString>;
658
+ description: z.ZodOptional<z.ZodString>;
659
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
660
+ url: z.ZodString;
661
+ kind: z.ZodOptional<z.ZodString>;
662
+ label: z.ZodOptional<z.ZodString>;
663
+ }, z.core.$loose>>>;
664
+ labels: z.ZodOptional<z.ZodObject<{
665
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
666
+ values: z.ZodArray<z.ZodObject<{
667
+ val: z.ZodString;
668
+ }, z.core.$strip>>;
669
+ }, z.core.$strip>>;
670
+ createdAt: z.ZodString;
671
+ }, z.core.$loose>;
672
+ type ProfileInvestmentRecord = z.infer<typeof ProfileInvestmentRecordSchema>;
673
+
674
+ export { PublicationAuthorSchema as $, type ArtifactLink as A, type BlobRef as B, ProfileInvestmentRecordSchema as C, type ProfileInvolvementRecord as D, type EndorsementConfirmationRecord as E, ProfileInvolvementRecordSchema as F, type GraphFollowRecord as G, type ProfileLanguageRecord as H, InvestmentAmountSchema as I, ProfileLanguageRecordSchema as J, type ProfilePositionRecord as K, ProfilePositionRecordSchema as L, ProfilePresentationDeliveryRecordSchema as M, ProfilePresentationRecordSchema as N, type OrgProfileRecord as O, type PresentationDuration as P, type ProfileProjectRecord as Q, ProfileProjectRecordSchema as R, type ProfilePublicationRecord as S, ProfilePublicationRecordSchema as T, type ProfileSelfRecord as U, ProfileSelfRecordSchema as V, type ProfileSkillRecord as W, ProfileSkillRecordSchema as X, type ProfileVolunteeringRecord as Y, ProfileVolunteeringRecordSchema as Z, type PublicationAuthor as _, type ProfilePresentationDeliveryRecord as a, atUriSchema as a0, cidSchema as a1, datetimeSchema as a2, didSchema as a3, externalRecordRefSchema as a4, languageTagSchema as a5, makeGraphFollowRecordSchema as a6, maxGraphemes as a7, partialDateSchema as a8, selfLabelsSchema as a9, skillRefSchema as aa, strongRefSchema as ab, uriSchema as ac, type ProfileInvestmentRecord as ad, type ProfilePresentationRecord as b, ArtifactLinkSchema as c, BlobRefSchema as d, EndorsementConfirmationRecordSchema as e, type EndorsementRecord as f, EndorsementRecordSchema as g, GraphFollowRecordSchema as h, type OrgEmploymentAttestationRecord as i, OrgEmploymentAttestationRecordSchema as j, OrgProfileRecordSchema as k, PROFILE_INVESTMENT_NSID as l, PROFILE_INVOLVEMENT_NSID as m, PresentationDurationSchema as n, type PresentationLink as o, PresentationLinkSchema as p, type ProfileCertificationRecord as q, ProfileCertificationRecordSchema as r, type ProfileCourseRecord as s, ProfileCourseRecordSchema as t, type ProfileEducationRecord as u, ProfileEducationRecordSchema as v, type ProfileExternalAccountRecord as w, ProfileExternalAccountRecordSchema as x, type ProfileHonorRecord as y, ProfileHonorRecordSchema as z };
@@ -1,4 +1,4 @@
1
- import { P as ProfileView } from './types-DNrRbi9D.cjs';
1
+ import { n as ProfileView } from './types-D0LWpGtY.cjs';
2
2
 
3
3
  /**
4
4
  * Compact professional summary derived from a {@link ProfileView}.
@@ -1,4 +1,4 @@
1
- import { P as ProfileView } from './types-BtoIc4cG.js';
1
+ import { n as ProfileView } from './types-C3xxTGUE.js';
2
2
 
3
3
  /**
4
4
  * Compact professional summary derived from a {@link ProfileView}.
@@ -1548,6 +1548,141 @@ var sifaQueryKeys = {
1548
1548
  wipePreview: () => ["sifa", "destructive", "wipe-preview"]
1549
1549
  }
1550
1550
  };
1551
+ function maxGraphemes(max) {
1552
+ return (value) => {
1553
+ const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
1554
+ let count = 0;
1555
+ for (const _ of segmenter.segment(value)) {
1556
+ count++;
1557
+ if (count > max) return false;
1558
+ }
1559
+ return true;
1560
+ };
1561
+ }
1562
+ var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
1563
+ var datetimeSchema = zod.z.string().datetime({ offset: true });
1564
+ var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
1565
+ var atUriSchema = zod.z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
1566
+ var cidSchema = zod.z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
1567
+ zod.z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
1568
+ var uriSchema = zod.z.string().url();
1569
+ var strongRefSchema = zod.z.object({
1570
+ uri: atUriSchema,
1571
+ cid: cidSchema
1572
+ });
1573
+ zod.z.object({
1574
+ uri: atUriSchema
1575
+ });
1576
+ var externalRecordRefSchema = zod.z.object({
1577
+ uri: atUriSchema,
1578
+ cid: cidSchema.optional()
1579
+ });
1580
+ var selfLabelsSchema = zod.z.object({
1581
+ $type: zod.z.literal("com.atproto.label.defs#selfLabels").optional(),
1582
+ values: zod.z.array(zod.z.object({ val: zod.z.string() }))
1583
+ });
1584
+ var projectMemberRefSchema = zod.z.object({
1585
+ did: didSchema,
1586
+ role: zod.z.string().optional(),
1587
+ title: zod.z.string().refine(maxGraphemes(128)).max(1280).optional()
1588
+ });
1589
+ zod.z.object({
1590
+ name: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
1591
+ description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
1592
+ url: uriSchema.optional(),
1593
+ members: zod.z.array(projectMemberRefSchema).max(50).optional(),
1594
+ /**
1595
+ * The canonical `id.sifa.project.self` this personal entry corresponds to.
1596
+ * A composition link. For the same project recorded on someone else's
1597
+ * profile, see `sameAs`.
1598
+ */
1599
+ projectRef: strongRefSchema.optional(),
1600
+ /**
1601
+ * The same project as recorded on another person's profile. Each side stays
1602
+ * its own record; this only says the two describe one thing. Resolves by
1603
+ * AT-URI, since they will keep editing their copy.
1604
+ */
1605
+ sameAs: externalRecordRefSchema.optional(),
1606
+ position: strongRefSchema.optional(),
1607
+ startedAt: partialDateSchema.optional(),
1608
+ endedAt: partialDateSchema.optional(),
1609
+ labels: selfLabelsSchema.optional(),
1610
+ createdAt: datetimeSchema
1611
+ });
1612
+
1613
+ // src/schemas/profile-involvement.ts
1614
+ var ArtifactLinkSchema = zod.z.object({
1615
+ url: uriSchema,
1616
+ kind: zod.z.string().optional(),
1617
+ label: zod.z.string().refine(maxGraphemes(200)).max(2e3).optional()
1618
+ }).passthrough();
1619
+ zod.z.object({
1620
+ kind: zod.z.string(),
1621
+ upstream: zod.z.string().refine(maxGraphemes(256)).max(2560).optional(),
1622
+ upstreamDid: didSchema.optional(),
1623
+ upstreamUrl: uriSchema.optional(),
1624
+ role: zod.z.string().refine(maxGraphemes(256)).max(2560).optional(),
1625
+ description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
1626
+ startedAt: partialDateSchema.optional(),
1627
+ endedAt: partialDateSchema.optional(),
1628
+ links: zod.z.array(ArtifactLinkSchema).max(50).optional(),
1629
+ // Portable org entity identifier (Wikidata/ROR/LEI URI) from the resolver
1630
+ // typeahead, constrained to http(s) so a script scheme is never a valid ref.
1631
+ entityRef: zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional(),
1632
+ // community.lexicon.location.address — validated at the app layer.
1633
+ location: zod.z.unknown().optional(),
1634
+ // id.sifa.defs#skillRef references (at-uri to a skill record in the same repo).
1635
+ skills: zod.z.array(zod.z.object({ uri: zod.z.string() })).max(50).optional(),
1636
+ labels: selfLabelsSchema.optional(),
1637
+ collaborators: zod.z.array(projectMemberRefSchema).max(50).optional(),
1638
+ sameAs: externalRecordRefSchema.optional(),
1639
+ createdAt: datetimeSchema
1640
+ }).passthrough();
1641
+
1642
+ // src/schemas/profile-investment.ts
1643
+ var entityRefField = zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional();
1644
+ var InvestmentAmountSchema = zod.z.object({
1645
+ /** Whole major currency units (euros, not cents). Cheque sizes are round numbers. */
1646
+ value: zod.z.number().int().min(0),
1647
+ /** ISO 4217 three-letter code, uppercase. */
1648
+ currency: zod.z.string().length(3)
1649
+ });
1650
+ var PROFILE_INVESTMENT_NSID = "id.sifa.profile.investment";
1651
+ zod.z.object({
1652
+ /** For a limited-partner entry this names the fund, not a portfolio company. */
1653
+ company: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
1654
+ companyDid: didSchema.optional(),
1655
+ entityRef: entityRefField,
1656
+ role: zod.z.string().optional(),
1657
+ stage: zod.z.string().optional(),
1658
+ status: zod.z.string().optional(),
1659
+ /** The vehicle the capital went through. Absent for a cheque in the person's own name. */
1660
+ via: zod.z.string().refine(maxGraphemes(256)).max(2560).optional(),
1661
+ viaDid: didSchema.optional(),
1662
+ viaEntityRef: entityRefField,
1663
+ /**
1664
+ * Optional and empty by default. Cheque size is a personal financial disclosure,
1665
+ * and clients must not prompt for it.
1666
+ */
1667
+ amount: InvestmentAmountSchema.optional(),
1668
+ startedAt: partialDateSchema.optional(),
1669
+ endedAt: partialDateSchema.optional(),
1670
+ description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
1671
+ links: zod.z.array(ArtifactLinkSchema).max(50).optional(),
1672
+ labels: selfLabelsSchema.optional(),
1673
+ createdAt: datetimeSchema
1674
+ }).passthrough();
1675
+
1676
+ // src/query/fetchers/investments.ts
1677
+ function createInvestment(config, data, options = {}) {
1678
+ return createRecord(config, PROFILE_INVESTMENT_NSID, data, options);
1679
+ }
1680
+ function updateInvestment(config, rkey, data, options = {}) {
1681
+ return updateRecord(config, PROFILE_INVESTMENT_NSID, rkey, data, options);
1682
+ }
1683
+ function deleteInvestment(config, rkey, options = {}) {
1684
+ return deleteRecord(config, PROFILE_INVESTMENT_NSID, rkey, options);
1685
+ }
1551
1686
 
1552
1687
  exports.ApiError = ApiError;
1553
1688
  exports.HIDDEN_ITEM_SOURCES = HIDDEN_ITEM_SOURCES;
@@ -1571,6 +1706,7 @@ exports.createConfirmation = createConfirmation;
1571
1706
  exports.createEducation = createEducation;
1572
1707
  exports.createEndorsement = createEndorsement;
1573
1708
  exports.createExternalAccount = createExternalAccount;
1709
+ exports.createInvestment = createInvestment;
1574
1710
  exports.createPosition = createPosition;
1575
1711
  exports.createProfileLocation = createProfileLocation;
1576
1712
  exports.createReaction = createReaction;
@@ -1580,6 +1716,7 @@ exports.deleteAccount = deleteAccount;
1580
1716
  exports.deleteAvatarOverride = deleteAvatarOverride;
1581
1717
  exports.deleteEducation = deleteEducation;
1582
1718
  exports.deleteExternalAccount = deleteExternalAccount;
1719
+ exports.deleteInvestment = deleteInvestment;
1583
1720
  exports.deletePosition = deletePosition;
1584
1721
  exports.deleteProfileLocation = deleteProfileLocation;
1585
1722
  exports.deleteReaction = deleteReaction;
@@ -1666,6 +1803,7 @@ exports.unsetExternalAccountPrimary = unsetExternalAccountPrimary;
1666
1803
  exports.unsetPositionPrimary = unsetPositionPrimary;
1667
1804
  exports.updateEducation = updateEducation;
1668
1805
  exports.updateExternalAccount = updateExternalAccount;
1806
+ exports.updateInvestment = updateInvestment;
1669
1807
  exports.updateOrgProfile = updateOrgProfile;
1670
1808
  exports.updatePosition = updatePosition;
1671
1809
  exports.updateProfileLocation = updateProfileLocation;