@singi-labs/sifa-sdk 0.23.0 → 0.23.1

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 (57) hide show
  1. package/dist/badge/index.cjs.map +1 -1
  2. package/dist/{follow-profile-DGZzB5iM.d.ts → follow-profile-CCL1tT1x.d.ts} +1 -1
  3. package/dist/{follow-profile-BG_6eZwW.d.cts → follow-profile-RijPgyp-.d.cts} +1 -1
  4. package/dist/{index-BR8LDBo1.d.ts → index-Bcy443Qi.d.ts} +1 -1
  5. package/dist/{index-BKvI1Bvg.d.cts → index-Ck5zdubP.d.cts} +1 -1
  6. package/dist/index.cjs +25 -6
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +9 -9
  9. package/dist/index.d.ts +9 -9
  10. package/dist/index.js +15 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/jsonld/index.d.cts +2 -2
  13. package/dist/jsonld/index.d.ts +2 -2
  14. package/dist/{network-map-CMyjk6jc.d.ts → network-map-BGO1feWW.d.ts} +4 -4
  15. package/dist/{network-map-CqLYThmY.d.cts → network-map-DBiloRce.d.cts} +4 -4
  16. package/dist/{profile-summary-Sv6rqQbx.d.ts → profile-summary-5jNVFUR9.d.ts} +1 -1
  17. package/dist/{profile-summary-CoTNGDpt.d.cts → profile-summary-DJVnLbFV.d.cts} +1 -1
  18. package/dist/publishing/index.cjs +15 -5
  19. package/dist/publishing/index.cjs.map +1 -1
  20. package/dist/query/client.js +20 -1
  21. package/dist/query/client.js.map +1 -1
  22. package/dist/query/fetchers/index.cjs +35 -6
  23. package/dist/query/fetchers/index.cjs.map +1 -1
  24. package/dist/query/fetchers/index.d.cts +8 -8
  25. package/dist/query/fetchers/index.d.ts +8 -8
  26. package/dist/query/hooks/index.cjs +35 -6
  27. package/dist/query/hooks/index.cjs.map +1 -1
  28. package/dist/query/hooks/index.d.cts +6 -6
  29. package/dist/query/hooks/index.d.ts +6 -6
  30. package/dist/query/index.cjs +20 -1
  31. package/dist/query/index.cjs.map +1 -1
  32. package/dist/query/index.d.cts +11 -11
  33. package/dist/query/index.d.ts +11 -11
  34. package/dist/query/index.js.map +1 -1
  35. package/dist/resume/index.d.cts +2 -2
  36. package/dist/resume/index.d.ts +2 -2
  37. package/dist/schemas/index.cjs +24 -5
  38. package/dist/schemas/index.cjs.map +1 -1
  39. package/dist/schemas/index.d.cts +2 -2
  40. package/dist/schemas/index.d.ts +2 -2
  41. package/dist/schemas/index.js +14 -0
  42. package/dist/schemas/index.js.map +1 -1
  43. package/dist/schemas/shared.js +18 -5
  44. package/dist/schemas/shared.js.map +1 -1
  45. package/dist/schemas/write/index.cjs +15 -5
  46. package/dist/schemas/write/index.cjs.map +1 -1
  47. package/dist/testing/index.d.cts +2 -2
  48. package/dist/testing/index.d.ts +2 -2
  49. package/dist/{types-CcVRIHcX.d.ts → types-4MZHuQif.d.cts} +15 -3
  50. package/dist/{types-BC4A9-W9.d.cts → types-DJrmm7p0.d.ts} +15 -3
  51. package/dist/{use-user-settings-CI9eZQpp.d.ts → use-user-settings-BfGwI4x3.d.ts} +4 -4
  52. package/dist/{use-user-settings-CfQKSBAC.d.cts → use-user-settings-g8ATc9zm.d.cts} +4 -4
  53. package/dist/{user-settings-C65eFsPR.d.ts → user-settings-C3_y8_8T.d.ts} +4 -4
  54. package/dist/{user-settings-BVFxLAOa.d.cts → user-settings-CuqhXuTE.d.cts} +4 -4
  55. package/dist/{verification-providers-DQLIOSCK.d.cts → verification-providers-Dq6ni6e-.d.cts} +52 -1
  56. package/dist/{verification-providers-DQLIOSCK.d.ts → verification-providers-Dq6ni6e-.d.ts} +52 -1
  57. package/package.json +4 -1
@@ -1,8 +1,8 @@
1
- import { a2 as WriteResult, a1 as SifaApiConfig, a0 as ApiFetchOptions, a3 as CreateResult, K as SiteActivityPreset, b as ActivityLabel, u as RepoDeleteResult, x as RepoInventory } from './types-CcVRIHcX.js';
1
+ import { a2 as WriteResult, a1 as SifaApiConfig, a0 as ApiFetchOptions, a3 as CreateResult, K as SiteActivityPreset, b as ActivityLabel, u as RepoDeleteResult, x as RepoInventory } from './types-DJrmm7p0.js';
2
2
  import { P as ProfileOverrideWriteInput, f as OrgNotificationEmailRequestInput, b as OrgDomainChallengeRequestInput, O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, d as OrgDomainVerifyRequestInput } from './profile-self-D59D_rhI.js';
3
- import { p as ExternalAccount, B as PositionViewerConfirmation } from './index-BR8LDBo1.js';
4
- import { a as AccountVerification } from './verification-providers-DQLIOSCK.js';
5
- import { s as FollowProfileItem, p as FeatureAllowlistEntry, r as FeatureFlag } from './follow-profile-DGZzB5iM.js';
3
+ import { p as ExternalAccount, B as PositionViewerConfirmation } from './index-Bcy443Qi.js';
4
+ import { a as AccountVerification } from './verification-providers-Dq6ni6e-.js';
5
+ import { s as FollowProfileItem, p as FeatureAllowlistEntry, r as FeatureFlag } from './follow-profile-CCL1tT1x.js';
6
6
  import { z } from 'zod';
7
7
 
8
8
  /** Industry/domain entry on the profile self record. */
@@ -1,8 +1,8 @@
1
- import { a2 as WriteResult, a1 as SifaApiConfig, a0 as ApiFetchOptions, a3 as CreateResult, K as SiteActivityPreset, b as ActivityLabel, u as RepoDeleteResult, x as RepoInventory } from './types-BC4A9-W9.cjs';
1
+ import { a2 as WriteResult, a1 as SifaApiConfig, a0 as ApiFetchOptions, a3 as CreateResult, K as SiteActivityPreset, b as ActivityLabel, u as RepoDeleteResult, x as RepoInventory } from './types-4MZHuQif.cjs';
2
2
  import { P as ProfileOverrideWriteInput, d as OrgNotificationEmailRequestInput, b as OrgDomainChallengeRequestInput, O as OrgClaimRequestInput, a as OrgProfileUpdateRequestInput, c as OrgDomainVerifyRequestInput } from './org-settings-BliQdqbB.cjs';
3
- import { p as ExternalAccount, B as PositionViewerConfirmation } from './index-BKvI1Bvg.cjs';
4
- import { a as AccountVerification } from './verification-providers-DQLIOSCK.cjs';
5
- import { s as FollowProfileItem, p as FeatureAllowlistEntry, r as FeatureFlag } from './follow-profile-BG_6eZwW.cjs';
3
+ import { p as ExternalAccount, B as PositionViewerConfirmation } from './index-Ck5zdubP.cjs';
4
+ import { a as AccountVerification } from './verification-providers-Dq6ni6e-.cjs';
5
+ import { s as FollowProfileItem, p as FeatureAllowlistEntry, r as FeatureFlag } from './follow-profile-RijPgyp-.cjs';
6
6
  import { z } from 'zod';
7
7
 
8
8
  /** Industry/domain entry on the profile self record. */
@@ -14,6 +14,57 @@ declare function maxGraphemes(max: number): (value: string) => boolean;
14
14
  * `TextEncoder` rather than `Buffer` so it also runs in browsers.
15
15
  */
16
16
  declare function maxBytes(max: number): (value: string) => boolean;
17
+ /**
18
+ * A string capped by a lexicon `maxGraphemes` (user-perceived characters) and
19
+ * `maxLength` (UTF-8 bytes) pair. The grapheme check aborts first, so an
20
+ * over-long value reports only the character error.
21
+ */
22
+ declare function lexiconString(graphemes: number, bytes: number): z.ZodString;
23
+ /**
24
+ * Lexicon limits for the `id.sifa.profile.self` text fields: `graphemes` is the
25
+ * `maxGraphemes` cap (user-perceived characters), `bytes` the `maxLength` cap
26
+ * (UTF-8 bytes). The field schemas below are built from these numbers, so
27
+ * forms can show counters and caps without duplicating them.
28
+ */
29
+ declare const PROFILE_TEXT_LIMITS: {
30
+ readonly displayName: {
31
+ readonly graphemes: 64;
32
+ readonly bytes: 640;
33
+ };
34
+ readonly givenName: {
35
+ readonly graphemes: 64;
36
+ readonly bytes: 640;
37
+ };
38
+ readonly familyName: {
39
+ readonly graphemes: 64;
40
+ readonly bytes: 640;
41
+ };
42
+ readonly namePronunciation: {
43
+ readonly graphemes: 64;
44
+ readonly bytes: 640;
45
+ };
46
+ readonly pronouns: {
47
+ readonly graphemes: 20;
48
+ readonly bytes: 200;
49
+ };
50
+ readonly headline: {
51
+ readonly graphemes: 120;
52
+ readonly bytes: 1200;
53
+ };
54
+ readonly about: {
55
+ readonly graphemes: 5000;
56
+ readonly bytes: 50000;
57
+ };
58
+ };
59
+ /**
60
+ * Field schemas for `id.sifa.profile.self`, shared by the record schema and the
61
+ * write schemas so the lexicon limits live in one place.
62
+ */
63
+ declare const profileDisplayNameSchema: z.ZodString;
64
+ declare const profileNameSchema: z.ZodString;
65
+ declare const profilePronounsSchema: z.ZodString;
66
+ declare const profileHeadlineSchema: z.ZodString;
67
+ declare const profileAboutSchema: z.ZodString;
17
68
  /** Decentralized identifier, AT Protocol `format: did`. */
18
69
  declare const didSchema: z.ZodString;
19
70
  /** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */
@@ -215,4 +266,4 @@ declare function resolveVerificationBadges(input: {
215
266
  blueskyVerifiedAt?: string | null;
216
267
  }): AccountVerification[];
217
268
 
218
- export { type AgentRef as A, VERIFICATION_PROVIDERS as V, type AccountVerification as a, type VerificationProvider as b, type VerificationProviderId as c, type VerificationSource as d, type VerifierListItem as e, agentRefSchema as f, atUriSchema as g, buildVerifierListMembers as h, cidSchema as i, datetimeSchema as j, didSchema as k, externalRecordRefSchema as l, getVerificationProvider as m, isKnownVerificationProvider as n, languageTagSchema as o, maxBytes as p, maxGraphemes as q, partialDateSchema as r, primaryVerification as s, resolveVerificationBadges as t, resolveVerifierProvider as u, selfLabelsSchema as v, skillRefSchema as w, strongRefSchema as x, uriSchema as y, verificationLabel as z };
269
+ export { type AgentRef as A, resolveVerifierProvider as B, selfLabelsSchema as C, skillRefSchema as D, strongRefSchema as E, uriSchema as F, verificationLabel as G, PROFILE_TEXT_LIMITS as P, VERIFICATION_PROVIDERS as V, type AccountVerification as a, type VerificationProvider as b, type VerificationProviderId as c, type VerificationSource as d, type VerifierListItem as e, agentRefSchema as f, atUriSchema as g, buildVerifierListMembers as h, cidSchema as i, datetimeSchema as j, didSchema as k, externalRecordRefSchema as l, getVerificationProvider as m, isKnownVerificationProvider as n, languageTagSchema as o, lexiconString as p, maxBytes as q, maxGraphemes as r, partialDateSchema as s, primaryVerification as t, profileAboutSchema as u, profileDisplayNameSchema as v, profileHeadlineSchema as w, profileNameSchema as x, profilePronounsSchema as y, resolveVerificationBadges as z };
@@ -14,6 +14,57 @@ declare function maxGraphemes(max: number): (value: string) => boolean;
14
14
  * `TextEncoder` rather than `Buffer` so it also runs in browsers.
15
15
  */
16
16
  declare function maxBytes(max: number): (value: string) => boolean;
17
+ /**
18
+ * A string capped by a lexicon `maxGraphemes` (user-perceived characters) and
19
+ * `maxLength` (UTF-8 bytes) pair. The grapheme check aborts first, so an
20
+ * over-long value reports only the character error.
21
+ */
22
+ declare function lexiconString(graphemes: number, bytes: number): z.ZodString;
23
+ /**
24
+ * Lexicon limits for the `id.sifa.profile.self` text fields: `graphemes` is the
25
+ * `maxGraphemes` cap (user-perceived characters), `bytes` the `maxLength` cap
26
+ * (UTF-8 bytes). The field schemas below are built from these numbers, so
27
+ * forms can show counters and caps without duplicating them.
28
+ */
29
+ declare const PROFILE_TEXT_LIMITS: {
30
+ readonly displayName: {
31
+ readonly graphemes: 64;
32
+ readonly bytes: 640;
33
+ };
34
+ readonly givenName: {
35
+ readonly graphemes: 64;
36
+ readonly bytes: 640;
37
+ };
38
+ readonly familyName: {
39
+ readonly graphemes: 64;
40
+ readonly bytes: 640;
41
+ };
42
+ readonly namePronunciation: {
43
+ readonly graphemes: 64;
44
+ readonly bytes: 640;
45
+ };
46
+ readonly pronouns: {
47
+ readonly graphemes: 20;
48
+ readonly bytes: 200;
49
+ };
50
+ readonly headline: {
51
+ readonly graphemes: 120;
52
+ readonly bytes: 1200;
53
+ };
54
+ readonly about: {
55
+ readonly graphemes: 5000;
56
+ readonly bytes: 50000;
57
+ };
58
+ };
59
+ /**
60
+ * Field schemas for `id.sifa.profile.self`, shared by the record schema and the
61
+ * write schemas so the lexicon limits live in one place.
62
+ */
63
+ declare const profileDisplayNameSchema: z.ZodString;
64
+ declare const profileNameSchema: z.ZodString;
65
+ declare const profilePronounsSchema: z.ZodString;
66
+ declare const profileHeadlineSchema: z.ZodString;
67
+ declare const profileAboutSchema: z.ZodString;
17
68
  /** Decentralized identifier, AT Protocol `format: did`. */
18
69
  declare const didSchema: z.ZodString;
19
70
  /** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */
@@ -215,4 +266,4 @@ declare function resolveVerificationBadges(input: {
215
266
  blueskyVerifiedAt?: string | null;
216
267
  }): AccountVerification[];
217
268
 
218
- export { type AgentRef as A, VERIFICATION_PROVIDERS as V, type AccountVerification as a, type VerificationProvider as b, type VerificationProviderId as c, type VerificationSource as d, type VerifierListItem as e, agentRefSchema as f, atUriSchema as g, buildVerifierListMembers as h, cidSchema as i, datetimeSchema as j, didSchema as k, externalRecordRefSchema as l, getVerificationProvider as m, isKnownVerificationProvider as n, languageTagSchema as o, maxBytes as p, maxGraphemes as q, partialDateSchema as r, primaryVerification as s, resolveVerificationBadges as t, resolveVerifierProvider as u, selfLabelsSchema as v, skillRefSchema as w, strongRefSchema as x, uriSchema as y, verificationLabel as z };
269
+ export { type AgentRef as A, resolveVerifierProvider as B, selfLabelsSchema as C, skillRefSchema as D, strongRefSchema as E, uriSchema as F, verificationLabel as G, PROFILE_TEXT_LIMITS as P, VERIFICATION_PROVIDERS as V, type AccountVerification as a, type VerificationProvider as b, type VerificationProviderId as c, type VerificationSource as d, type VerifierListItem as e, agentRefSchema as f, atUriSchema as g, buildVerifierListMembers as h, cidSchema as i, datetimeSchema as j, didSchema as k, externalRecordRefSchema as l, getVerificationProvider as m, isKnownVerificationProvider as n, languageTagSchema as o, lexiconString as p, maxBytes as q, maxGraphemes as r, partialDateSchema as s, primaryVerification as t, profileAboutSchema as u, profileDisplayNameSchema as v, profileHeadlineSchema as w, profileNameSchema as x, profilePronounsSchema as y, resolveVerificationBadges as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singi-labs/sifa-sdk",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "Sifa SDK — public client library for the Sifa AppView on AT Protocol. Shared by sifa-web and sifa-app.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -225,6 +225,7 @@
225
225
  "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsup",
226
226
  "dev": "tsup --watch",
227
227
  "lint": "eslint",
228
+ "knip": "knip",
228
229
  "lint:fix": "eslint --fix",
229
230
  "typecheck": "tsc --noEmit",
230
231
  "test": "vitest run",
@@ -274,9 +275,11 @@
274
275
  "@testing-library/react": "16.3.2",
275
276
  "@types/react": "19.2.17",
276
277
  "@vitest/coverage-v8": "3.2.1",
278
+ "esbuild": "0.27.7",
277
279
  "eslint": "10.8.1",
278
280
  "husky": "9.1.7",
279
281
  "jsdom": "30.0.1",
282
+ "knip": "6.42.0",
280
283
  "prettier": "3.9.6",
281
284
  "react": "19.2.7",
282
285
  "react-dom": "19.2.7",