@singi-labs/sifa-sdk 0.21.0 → 0.23.0
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/{follow-profile-CgLLLQtJ.d.cts → follow-profile-BG_6eZwW.d.cts} +1 -1
- package/dist/{follow-profile-CVcA2w1v.d.ts → follow-profile-DGZzB5iM.d.ts} +1 -1
- package/dist/{index-BQAKeEoj.d.cts → index-BKvI1Bvg.d.cts} +1 -1
- package/dist/{index-DDh2RLvx.d.ts → index-BR8LDBo1.d.ts} +1 -1
- package/dist/index.cjs +35 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/jsonld/index.d.cts +2 -2
- package/dist/jsonld/index.d.ts +2 -2
- package/dist/{network-map-2OKh3wSB.d.ts → network-map-CMyjk6jc.d.ts} +4 -4
- package/dist/{network-map-DJonNOl0.d.cts → network-map-CqLYThmY.d.cts} +4 -4
- package/dist/{org-settings-BShvhyFp.d.ts → org-settings-BliQdqbB.d.cts} +57 -1
- package/dist/{profile-investment-QSwX2GL5.d.cts → profile-investment-BmuXFlZw.d.cts} +2 -0
- package/dist/{profile-investment-QSwX2GL5.d.ts → profile-investment-BmuXFlZw.d.ts} +2 -0
- package/dist/{org-settings-C73Sin5E.d.cts → profile-self-D59D_rhI.d.ts} +57 -1
- package/dist/{profile-summary-BCOKt3qS.d.cts → profile-summary-CoTNGDpt.d.cts} +1 -1
- package/dist/{profile-summary-DF8-evvA.d.ts → profile-summary-Sv6rqQbx.d.ts} +1 -1
- package/dist/publishing/index.cjs +21 -1
- package/dist/publishing/index.cjs.map +1 -1
- package/dist/query/fetchers/index.cjs +21 -1
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +9 -9
- package/dist/query/fetchers/index.d.ts +9 -9
- package/dist/query/fetchers/profile-mutations.js.map +1 -1
- package/dist/query/hooks/index.cjs +21 -1
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +7 -7
- package/dist/query/hooks/index.d.ts +7 -7
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +12 -12
- package/dist/query/index.d.ts +12 -12
- package/dist/resume/index.d.cts +2 -2
- package/dist/resume/index.d.ts +2 -2
- package/dist/schemas/index.cjs +29 -6
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +3 -3
- package/dist/schemas/index.d.ts +3 -3
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/profile-self.js +18 -6
- package/dist/schemas/profile-self.js.map +1 -1
- package/dist/schemas/shared.js +28 -1
- package/dist/schemas/shared.js.map +1 -1
- package/dist/schemas/write/certification.js +3 -3
- package/dist/schemas/write/certification.js.map +1 -1
- package/dist/schemas/write/course.js +5 -10
- package/dist/schemas/write/course.js.map +1 -1
- package/dist/schemas/write/education.js +3 -3
- package/dist/schemas/write/education.js.map +1 -1
- package/dist/schemas/write/honor.js +2 -2
- package/dist/schemas/write/honor.js.map +1 -1
- package/dist/schemas/write/index.cjs +58 -32
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +21 -64
- package/dist/schemas/write/index.d.ts +21 -64
- package/dist/schemas/write/index.js +5 -1
- package/dist/schemas/write/index.js.map +1 -1
- package/dist/schemas/write/investment.js +3 -3
- package/dist/schemas/write/investment.js.map +1 -1
- package/dist/schemas/write/involvement.js +3 -3
- package/dist/schemas/write/involvement.js.map +1 -1
- package/dist/schemas/write/position.js +8 -3
- package/dist/schemas/write/position.js.map +1 -1
- package/dist/schemas/write/profile-self.js +19 -5
- package/dist/schemas/write/profile-self.js.map +1 -1
- package/dist/schemas/write/project.js +3 -3
- package/dist/schemas/write/project.js.map +1 -1
- package/dist/schemas/write/publication.js +2 -2
- package/dist/schemas/write/publication.js.map +1 -1
- package/dist/schemas/write/shared.js +6 -0
- package/dist/schemas/write/shared.js.map +1 -1
- package/dist/schemas/write/volunteering.js +3 -3
- package/dist/schemas/write/volunteering.js.map +1 -1
- package/dist/testing/index.d.cts +2 -2
- package/dist/testing/index.d.ts +2 -2
- package/dist/{types-JydVIhN5.d.cts → types-BC4A9-W9.d.cts} +2 -2
- package/dist/{types-CkomzDlY.d.ts → types-CcVRIHcX.d.ts} +2 -2
- package/dist/{use-user-settings-DQ6Dyby7.d.ts → use-user-settings-CI9eZQpp.d.ts} +11 -6
- package/dist/{use-user-settings-Bn6g8bgr.d.cts → use-user-settings-CfQKSBAC.d.cts} +11 -6
- package/dist/{user-settings-BdNrDa9O.d.ts → user-settings-BVFxLAOa.d.cts} +6 -11
- package/dist/{user-settings-C8JUD4DM.d.cts → user-settings-C65eFsPR.d.ts} +6 -11
- package/dist/{verification-providers-DeyGqaoC.d.cts → verification-providers-DQLIOSCK.d.cts} +7 -1
- package/dist/{verification-providers-DeyGqaoC.d.ts → verification-providers-DQLIOSCK.d.ts} +7 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { a as AccountVerification } from './verification-providers-
|
|
2
|
+
import { a as AccountVerification } from './verification-providers-DQLIOSCK.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A single typeahead row. Discriminated on `source`: a curated `entity` row
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { a as AccountVerification } from './verification-providers-
|
|
2
|
+
import { a as AccountVerification } from './verification-providers-DQLIOSCK.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A single typeahead row. Discriminated on `source`: a curated `entity` row
|
package/dist/index.cjs
CHANGED
|
@@ -3819,6 +3819,11 @@ function isValidPartialDate(input) {
|
|
|
3819
3819
|
if (typeof input !== "string") return false;
|
|
3820
3820
|
return PARTIAL_DATE_RE.test(input) || isValidDateOnly(input);
|
|
3821
3821
|
}
|
|
3822
|
+
var DATETIME_DAY_RE = /^(\d{4}-\d{2}-\d{2})T\d{2}:\d{2}/;
|
|
3823
|
+
zod.z.string().transform((v) => DATETIME_DAY_RE.exec(v)?.[1] ?? v).refine(
|
|
3824
|
+
(v) => v === "" || isValidPartialDate(v),
|
|
3825
|
+
"must be a valid YYYY, YYYY-MM or YYYY-MM-DD date"
|
|
3826
|
+
).nullable().optional();
|
|
3822
3827
|
zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional();
|
|
3823
3828
|
zod.z.object({
|
|
3824
3829
|
url: zod.z.string().max(2048).refine((v) => httpUrlOrNull(v) !== null, "must be an http(s) URL"),
|
|
@@ -3836,8 +3841,8 @@ var presentationLinkSchema = zod.z.object({
|
|
|
3836
3841
|
type: zod.z.string().max(256).nullable().optional()
|
|
3837
3842
|
});
|
|
3838
3843
|
function maxGraphemes(max) {
|
|
3844
|
+
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
3839
3845
|
return (value) => {
|
|
3840
|
-
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
3841
3846
|
let count = 0;
|
|
3842
3847
|
for (const _ of segmenter.segment(value)) {
|
|
3843
3848
|
count++;
|
|
@@ -3846,6 +3851,26 @@ function maxGraphemes(max) {
|
|
|
3846
3851
|
return true;
|
|
3847
3852
|
};
|
|
3848
3853
|
}
|
|
3854
|
+
function maxBytes(max) {
|
|
3855
|
+
const encoder = new TextEncoder();
|
|
3856
|
+
return (value) => {
|
|
3857
|
+
if (value.length * 3 <= max) return true;
|
|
3858
|
+
return encoder.encode(value).length <= max;
|
|
3859
|
+
};
|
|
3860
|
+
}
|
|
3861
|
+
function lexiconString(graphemes, bytes) {
|
|
3862
|
+
return zod.z.string().refine(maxGraphemes(graphemes), {
|
|
3863
|
+
message: `Must be at most ${graphemes} characters`,
|
|
3864
|
+
abort: true
|
|
3865
|
+
}).refine(maxBytes(bytes), {
|
|
3866
|
+
message: "This text is too long. Emoji and some scripts take more space, so shorten it a little."
|
|
3867
|
+
});
|
|
3868
|
+
}
|
|
3869
|
+
var profileDisplayNameSchema = lexiconString(64, 640);
|
|
3870
|
+
var profileNameSchema = lexiconString(64, 640);
|
|
3871
|
+
var profilePronounsSchema = lexiconString(20, 200);
|
|
3872
|
+
var profileHeadlineSchema = lexiconString(120, 1200);
|
|
3873
|
+
var profileAboutSchema = lexiconString(5e3, 5e4);
|
|
3849
3874
|
var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
|
|
3850
3875
|
var datetimeSchema = zod.z.string().datetime({ offset: true });
|
|
3851
3876
|
var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
|
|
@@ -7680,12 +7705,14 @@ var ProfilePublicationRecordSchema = zod.z.object({
|
|
|
7680
7705
|
createdAt: datetimeSchema
|
|
7681
7706
|
});
|
|
7682
7707
|
var ProfileSelfRecordSchema = zod.z.object({
|
|
7683
|
-
|
|
7684
|
-
|
|
7708
|
+
displayName: profileDisplayNameSchema.optional(),
|
|
7709
|
+
pronouns: profilePronounsSchema.optional(),
|
|
7710
|
+
headline: profileHeadlineSchema.optional(),
|
|
7711
|
+
about: profileAboutSchema.optional(),
|
|
7685
7712
|
industry: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
|
|
7686
|
-
givenName:
|
|
7687
|
-
familyName:
|
|
7688
|
-
namePronunciation:
|
|
7713
|
+
givenName: profileNameSchema.optional(),
|
|
7714
|
+
familyName: profileNameSchema.optional(),
|
|
7715
|
+
namePronunciation: profileNameSchema.optional(),
|
|
7689
7716
|
location: zod.z.unknown().optional(),
|
|
7690
7717
|
openTo: zod.z.array(zod.z.string()).max(10).optional(),
|
|
7691
7718
|
preferredWorkplace: zod.z.array(zod.z.string()).max(3).optional(),
|
|
@@ -8005,7 +8032,7 @@ function describeSifaRecord(collection, value) {
|
|
|
8005
8032
|
}
|
|
8006
8033
|
|
|
8007
8034
|
// src/index.ts
|
|
8008
|
-
var SIFA_SDK_VERSION = "0.
|
|
8035
|
+
var SIFA_SDK_VERSION = "0.23.0";
|
|
8009
8036
|
|
|
8010
8037
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
8011
8038
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
|
@@ -8280,6 +8307,7 @@ exports.looksLikeDomain = looksLikeDomain;
|
|
|
8280
8307
|
exports.makeGraphFollowRecordSchema = makeGraphFollowRecordSchema;
|
|
8281
8308
|
exports.matchesSiteActivityPreset = matchesSiteActivityPreset;
|
|
8282
8309
|
exports.matchesSitePresetTags = matchesSitePresetTags;
|
|
8310
|
+
exports.maxBytes = maxBytes;
|
|
8283
8311
|
exports.maxGraphemes = maxGraphemes;
|
|
8284
8312
|
exports.meetsContrastAA = meetsContrastAA;
|
|
8285
8313
|
exports.normalizeCompanyKey = normalizeCompanyKey;
|