@singi-labs/sifa-sdk 0.12.43 → 0.12.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.
Files changed (51) hide show
  1. package/dist/{adult-content-JKDlPIbL.d.cts → adult-content-DPbdzRqN.d.cts} +57 -1
  2. package/dist/{adult-content-JKDlPIbL.d.ts → adult-content-DPbdzRqN.d.ts} +57 -1
  3. package/dist/{feed-C8aHEPw4.d.cts → feed-dOSy_48Z.d.cts} +1 -1
  4. package/dist/{feed-C8aHEPw4.d.ts → feed-dOSy_48Z.d.ts} +1 -1
  5. package/dist/{index-BsIdD2su.d.ts → index-8tpQ3aa6.d.ts} +13 -6
  6. package/dist/{index-ti9RAkMn.d.cts → index-C5bE9r3L.d.cts} +13 -6
  7. package/dist/{index-CIQinrgP.d.ts → index-CC03zp-c.d.ts} +31 -4
  8. package/dist/{index-DFSDtTFz.d.cts → index-DtpqwUb4.d.cts} +31 -4
  9. package/dist/index.cjs +37 -7
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +7 -7
  12. package/dist/index.d.ts +7 -7
  13. package/dist/index.js +37 -7
  14. package/dist/index.js.map +1 -1
  15. package/dist/{org-EA4mshbf.d.ts → org-C827hinr.d.ts} +107 -7
  16. package/dist/{org-C0OTQnnV.d.cts → org-DvskXMpB.d.cts} +107 -7
  17. package/dist/{profile-summary-CSmXD7ll.d.cts → profile-summary-BawHMAG9.d.cts} +1 -1
  18. package/dist/{profile-summary-C9E-HPeP.d.ts → profile-summary-M_mQaHdp.d.ts} +1 -1
  19. package/dist/query/fetchers/index.cjs +41 -1
  20. package/dist/query/fetchers/index.cjs.map +1 -1
  21. package/dist/query/fetchers/index.d.cts +5 -5
  22. package/dist/query/fetchers/index.d.ts +5 -5
  23. package/dist/query/fetchers/index.js +38 -2
  24. package/dist/query/fetchers/index.js.map +1 -1
  25. package/dist/query/hooks/index.cjs +103 -0
  26. package/dist/query/hooks/index.cjs.map +1 -1
  27. package/dist/query/hooks/index.d.cts +4 -4
  28. package/dist/query/hooks/index.d.ts +4 -4
  29. package/dist/query/hooks/index.js +100 -1
  30. package/dist/query/hooks/index.js.map +1 -1
  31. package/dist/query/index.cjs +111 -1
  32. package/dist/query/index.cjs.map +1 -1
  33. package/dist/query/index.d.cts +9 -9
  34. package/dist/query/index.d.ts +9 -9
  35. package/dist/query/index.js +104 -2
  36. package/dist/query/index.js.map +1 -1
  37. package/dist/schemas/index.cjs +44 -2
  38. package/dist/schemas/index.cjs.map +1 -1
  39. package/dist/schemas/index.d.cts +20 -589
  40. package/dist/schemas/index.d.ts +20 -589
  41. package/dist/schemas/index.js +43 -3
  42. package/dist/schemas/index.js.map +1 -1
  43. package/dist/schemas/write/index.cjs +8 -0
  44. package/dist/schemas/write/index.cjs.map +1 -1
  45. package/dist/schemas/write/index.d.cts +9 -0
  46. package/dist/schemas/write/index.d.ts +9 -0
  47. package/dist/schemas/write/index.js +8 -0
  48. package/dist/schemas/write/index.js.map +1 -1
  49. package/dist/shared-CNr-iMpc.d.cts +614 -0
  50. package/dist/shared-CNr-iMpc.d.ts +614 -0
  51. package/package.json +1 -1
@@ -0,0 +1,614 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Duration of a presentation, in minutes. Mirrors
5
+ * `id.sifa.profile.presentation#duration`: a fixed length (minMinutes only) or
6
+ * a range (minMinutes to maxMinutes).
7
+ */
8
+ declare const PresentationDurationSchema: z.ZodObject<{
9
+ minMinutes: z.ZodNumber;
10
+ maxMinutes: z.ZodOptional<z.ZodNumber>;
11
+ }, z.core.$strip>;
12
+ type PresentationDuration = z.infer<typeof PresentationDurationSchema>;
13
+ /**
14
+ * A related link for a presentation or one of its deliveries. Mirrors
15
+ * `id.sifa.defs#presentationLink`. `type` is an open enum (knownValues), so any
16
+ * string is accepted.
17
+ */
18
+ declare const PresentationLinkSchema: z.ZodObject<{
19
+ uri: z.ZodString;
20
+ label: z.ZodOptional<z.ZodString>;
21
+ type: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$strip>;
23
+ type PresentationLink = z.infer<typeof PresentationLinkSchema>;
24
+ /** Zod schema for `id.sifa.profile.presentation` records (the reusable content). */
25
+ declare const ProfilePresentationRecordSchema: z.ZodObject<{
26
+ title: z.ZodString;
27
+ description: z.ZodOptional<z.ZodString>;
28
+ duration: z.ZodOptional<z.ZodObject<{
29
+ minMinutes: z.ZodNumber;
30
+ maxMinutes: z.ZodOptional<z.ZodNumber>;
31
+ }, z.core.$strip>>;
32
+ intendedAudiences: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
34
+ uri: z.ZodString;
35
+ label: z.ZodOptional<z.ZodString>;
36
+ type: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>>>;
38
+ writeupRef: z.ZodOptional<z.ZodObject<{
39
+ uri: z.ZodString;
40
+ cid: z.ZodOptional<z.ZodString>;
41
+ }, z.core.$strip>>;
42
+ coverImage: z.ZodOptional<z.ZodObject<{
43
+ $type: z.ZodLiteral<"blob">;
44
+ ref: z.ZodObject<{
45
+ $link: z.ZodString;
46
+ }, z.core.$strip>;
47
+ mimeType: z.ZodString;
48
+ size: z.ZodNumber;
49
+ }, z.core.$strip>>;
50
+ createdAt: z.ZodString;
51
+ }, z.core.$strip>;
52
+ type ProfilePresentationRecord = z.infer<typeof ProfilePresentationRecordSchema>;
53
+
54
+ /**
55
+ * Blob-ref passthrough shared by records that carry an uploaded blob (org logo,
56
+ * presentation cover image, ...). Mirrors the `blobRefSchema` validated by the
57
+ * sifa-api write endpoints -- the shape is validated, then written to the PDS
58
+ * verbatim.
59
+ */
60
+ declare const BlobRefSchema: z.ZodObject<{
61
+ $type: z.ZodLiteral<"blob">;
62
+ ref: z.ZodObject<{
63
+ $link: z.ZodString;
64
+ }, z.core.$strip>;
65
+ mimeType: z.ZodString;
66
+ size: z.ZodNumber;
67
+ }, z.core.$strip>;
68
+ type BlobRef = z.infer<typeof BlobRefSchema>;
69
+
70
+ /**
71
+ * Zod schema for `id.sifa.endorsement.confirmation` records.
72
+ * Lives in the endorsee's PDS to approve display of an endorsement.
73
+ */
74
+ declare const EndorsementConfirmationRecordSchema: z.ZodObject<{
75
+ endorsement: z.ZodObject<{
76
+ uri: z.ZodString;
77
+ cid: z.ZodString;
78
+ }, z.core.$strip>;
79
+ skill: z.ZodOptional<z.ZodObject<{
80
+ uri: z.ZodString;
81
+ cid: z.ZodString;
82
+ }, z.core.$strip>>;
83
+ createdAt: z.ZodString;
84
+ }, z.core.$strip>;
85
+ type EndorsementConfirmationRecord = z.infer<typeof EndorsementConfirmationRecordSchema>;
86
+
87
+ /**
88
+ * Zod schema for `id.sifa.endorsement` records. Lives in the endorser's PDS;
89
+ * the endorser identity is implicit (whoever owns the repository).
90
+ */
91
+ declare const EndorsementRecordSchema: z.ZodObject<{
92
+ subject: z.ZodString;
93
+ skill: z.ZodOptional<z.ZodObject<{
94
+ uri: z.ZodString;
95
+ cid: z.ZodString;
96
+ }, z.core.$strip>>;
97
+ skillName: z.ZodString;
98
+ comment: z.ZodOptional<z.ZodString>;
99
+ createdAt: z.ZodString;
100
+ }, z.core.$strip>;
101
+ type EndorsementRecord = z.infer<typeof EndorsementRecordSchema>;
102
+
103
+ /**
104
+ * Zod schema for `id.sifa.org.profile` records -- the self-declared
105
+ * organization profile. Singleton (record key `self`), lives in the org's PDS.
106
+ * Presence of this record marks the account as presenting as an organization;
107
+ * trust is layered separately (rendering floor, verification labels).
108
+ *
109
+ * Mirrors the lexicon wire shape (grapheme + byte caps, blob logo, uri refs).
110
+ * For the sifa-api write-endpoint contract, use the schemas under
111
+ * `@singi-labs/sifa-sdk/schemas/write` instead.
112
+ */
113
+ declare const OrgProfileRecordSchema: z.ZodObject<{
114
+ name: z.ZodString;
115
+ description: z.ZodOptional<z.ZodString>;
116
+ logo: z.ZodOptional<z.ZodUnknown>;
117
+ website: z.ZodOptional<z.ZodString>;
118
+ entityRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
119
+ contact: z.ZodOptional<z.ZodString>;
120
+ addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
121
+ country: z.ZodOptional<z.ZodString>;
122
+ postalCode: z.ZodOptional<z.ZodString>;
123
+ region: z.ZodOptional<z.ZodString>;
124
+ locality: z.ZodOptional<z.ZodString>;
125
+ street: z.ZodOptional<z.ZodString>;
126
+ name: z.ZodOptional<z.ZodString>;
127
+ }, z.core.$strip>>>;
128
+ companySize: z.ZodOptional<z.ZodString>;
129
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
+ name: z.ZodString;
131
+ url: z.ZodString;
132
+ }, z.core.$strip>>>;
133
+ personalProfileVisible: z.ZodOptional<z.ZodBoolean>;
134
+ labels: z.ZodOptional<z.ZodObject<{
135
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
136
+ values: z.ZodArray<z.ZodObject<{
137
+ val: z.ZodString;
138
+ }, z.core.$strip>>;
139
+ }, z.core.$strip>>;
140
+ createdAt: z.ZodString;
141
+ }, z.core.$strip>;
142
+ type OrgProfileRecord = z.infer<typeof OrgProfileRecordSchema>;
143
+
144
+ /**
145
+ * Zod schema for `id.sifa.org.employmentAttestation` records -- an
146
+ * organization's attestation that a person is or was employed in a specific
147
+ * position. Lives in the org's PDS (the org is implicit: whoever owns the repo).
148
+ *
149
+ * The position identity is pinned via a snapshot triple (`title`, `startedAt`,
150
+ * and the entity identifier `entityRef` | `companyDid`) so editing those pinned
151
+ * fields on the referenced position record voids the attestation. The free-text
152
+ * company name is never pinned (a rebrand must not invalidate the attestation).
153
+ *
154
+ * `startedAt` / `endedAt` mirror the position lexicon's freeform `YYYY-MM` /
155
+ * `YYYY-MM-DD` date shape, not strict `datetime`.
156
+ */
157
+ declare const OrgEmploymentAttestationRecordSchema: z.ZodObject<{
158
+ subject: z.ZodString;
159
+ position: z.ZodObject<{
160
+ uri: z.ZodString;
161
+ cid: z.ZodString;
162
+ }, z.core.$strip>;
163
+ status: z.ZodEnum<{
164
+ current: "current";
165
+ past: "past";
166
+ }>;
167
+ title: z.ZodString;
168
+ startedAt: z.ZodString;
169
+ entityRef: z.ZodOptional<z.ZodString>;
170
+ companyDid: z.ZodOptional<z.ZodString>;
171
+ endedAt: z.ZodOptional<z.ZodString>;
172
+ comment: z.ZodOptional<z.ZodString>;
173
+ labels: z.ZodOptional<z.ZodObject<{
174
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
175
+ values: z.ZodArray<z.ZodObject<{
176
+ val: z.ZodString;
177
+ }, z.core.$strip>>;
178
+ }, z.core.$strip>>;
179
+ createdAt: z.ZodString;
180
+ }, z.core.$strip>;
181
+ type OrgEmploymentAttestationRecord = z.infer<typeof OrgEmploymentAttestationRecordSchema>;
182
+
183
+ /**
184
+ * Zod schema for `id.sifa.graph.follow` records.
185
+ *
186
+ * One-way professional follow; the record lives in the follower's PDS. Per
187
+ * iter-1 decisions (`plans/2026-06-01-in-sifa-follow-primitive.md`), this is
188
+ * a **distinct** graph from `app.bsky.graph.follow`, not a superset — but
189
+ * the required field shape (`subject` + `createdAt`) is intentionally
190
+ * identical so generic Bluesky `listRecords` consumers get usable records.
191
+ *
192
+ * `note` is a Sifa addition: an optional reason for the follow ("why I
193
+ * followed"). Capped at 200 graphemes to match other profile-flavored
194
+ * lexicon fields.
195
+ */
196
+ declare const GraphFollowRecordSchema: z.ZodObject<{
197
+ subject: z.ZodString;
198
+ createdAt: z.ZodString;
199
+ note: z.ZodOptional<z.ZodString>;
200
+ }, z.core.$strip>;
201
+ type GraphFollowRecord = z.infer<typeof GraphFollowRecordSchema>;
202
+ /**
203
+ * Build a `GraphFollowRecordSchema` that rejects self-follow at the Zod
204
+ * layer (CLAUDE.md mandatory standards #3 — input validation; sifa-api#673
205
+ * E8 — defence in depth).
206
+ *
207
+ * Use this on the **client side** when constructing a new follow record
208
+ * (the follower DID is the authenticated user). The plain
209
+ * {@link GraphFollowRecordSchema} stays without the refine so firehose
210
+ * consumers can validate records without context.
211
+ */
212
+ declare function makeGraphFollowRecordSchema(followerDid: string): z.ZodObject<{
213
+ subject: z.ZodString;
214
+ createdAt: z.ZodString;
215
+ note: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$strip>;
217
+
218
+ /** Zod schema for `id.sifa.profile.certification` records. */
219
+ declare const ProfileCertificationRecordSchema: z.ZodObject<{
220
+ name: z.ZodString;
221
+ authority: z.ZodOptional<z.ZodString>;
222
+ authorityDid: z.ZodOptional<z.ZodString>;
223
+ entityRef: z.ZodOptional<z.ZodString>;
224
+ credentialId: z.ZodOptional<z.ZodString>;
225
+ credentialUrl: z.ZodOptional<z.ZodString>;
226
+ issuedAt: z.ZodOptional<z.ZodString>;
227
+ expiresAt: z.ZodOptional<z.ZodString>;
228
+ labels: z.ZodOptional<z.ZodObject<{
229
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
230
+ values: z.ZodArray<z.ZodObject<{
231
+ val: z.ZodString;
232
+ }, z.core.$strip>>;
233
+ }, z.core.$strip>>;
234
+ createdAt: z.ZodString;
235
+ }, z.core.$strip>;
236
+ type ProfileCertificationRecord = z.infer<typeof ProfileCertificationRecordSchema>;
237
+
238
+ /** Zod schema for `id.sifa.profile.course` records. */
239
+ declare const ProfileCourseRecordSchema: z.ZodObject<{
240
+ name: z.ZodString;
241
+ number: z.ZodOptional<z.ZodString>;
242
+ institution: z.ZodOptional<z.ZodString>;
243
+ entityRef: z.ZodOptional<z.ZodString>;
244
+ education: z.ZodOptional<z.ZodObject<{
245
+ uri: z.ZodString;
246
+ cid: z.ZodString;
247
+ }, z.core.$strip>>;
248
+ credential: z.ZodOptional<z.ZodString>;
249
+ completedAt: z.ZodOptional<z.ZodString>;
250
+ createdAt: z.ZodString;
251
+ }, z.core.$strip>;
252
+ type ProfileCourseRecord = z.infer<typeof ProfileCourseRecordSchema>;
253
+
254
+ /** Zod schema for `id.sifa.profile.education` records. */
255
+ declare const ProfileEducationRecordSchema: z.ZodObject<{
256
+ institution: z.ZodString;
257
+ institutionDid: z.ZodOptional<z.ZodString>;
258
+ entityRef: z.ZodOptional<z.ZodString>;
259
+ degree: z.ZodOptional<z.ZodString>;
260
+ fieldOfStudy: z.ZodOptional<z.ZodString>;
261
+ grade: z.ZodOptional<z.ZodString>;
262
+ activities: z.ZodOptional<z.ZodString>;
263
+ description: z.ZodOptional<z.ZodString>;
264
+ location: z.ZodOptional<z.ZodUnknown>;
265
+ startedAt: z.ZodOptional<z.ZodString>;
266
+ endedAt: z.ZodOptional<z.ZodString>;
267
+ labels: z.ZodOptional<z.ZodObject<{
268
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
269
+ values: z.ZodArray<z.ZodObject<{
270
+ val: z.ZodString;
271
+ }, z.core.$strip>>;
272
+ }, z.core.$strip>>;
273
+ createdAt: z.ZodString;
274
+ }, z.core.$strip>;
275
+ type ProfileEducationRecord = z.infer<typeof ProfileEducationRecordSchema>;
276
+
277
+ /**
278
+ * Zod schema for `id.sifa.profile.externalAccount` records.
279
+ *
280
+ * `platform` is advisory (`knownValues` in the lexicon) -- known values live
281
+ * under `id.sifa.defs#platform*` but unknown values are accepted.
282
+ */
283
+ declare const ProfileExternalAccountRecordSchema: z.ZodObject<{
284
+ platform: z.ZodString;
285
+ url: z.ZodString;
286
+ label: z.ZodOptional<z.ZodString>;
287
+ feedUrl: z.ZodOptional<z.ZodString>;
288
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
289
+ createdAt: z.ZodString;
290
+ }, z.core.$strip>;
291
+ type ProfileExternalAccountRecord = z.infer<typeof ProfileExternalAccountRecordSchema>;
292
+
293
+ /** Zod schema for `id.sifa.profile.honor` records. */
294
+ declare const ProfileHonorRecordSchema: z.ZodObject<{
295
+ title: z.ZodString;
296
+ issuer: z.ZodOptional<z.ZodString>;
297
+ issuerDid: z.ZodOptional<z.ZodString>;
298
+ entityRef: z.ZodOptional<z.ZodString>;
299
+ description: z.ZodOptional<z.ZodString>;
300
+ awardedAt: z.ZodOptional<z.ZodString>;
301
+ createdAt: z.ZodString;
302
+ }, z.core.$strip>;
303
+ type ProfileHonorRecord = z.infer<typeof ProfileHonorRecordSchema>;
304
+
305
+ /** Collection NSID for involvement records. Pass to the generic record helpers. */
306
+ declare const PROFILE_INVOLVEMENT_NSID = "id.sifa.profile.involvement";
307
+ /**
308
+ * A public artifact proving a piece of work. Mirrors `id.sifa.defs#artifactLink`.
309
+ * `kind` is an open enum (bare-string knownValues), so any string is accepted.
310
+ * `.passthrough()` keeps unknown fields a newer client or co-writer may emit.
311
+ */
312
+ declare const ArtifactLinkSchema: z.ZodObject<{
313
+ url: z.ZodString;
314
+ kind: z.ZodOptional<z.ZodString>;
315
+ label: z.ZodOptional<z.ZodString>;
316
+ }, z.core.$loose>;
317
+ type ArtifactLink = z.infer<typeof ArtifactLinkSchema>;
318
+ /**
319
+ * Zod schema for `id.sifa.profile.involvement` records.
320
+ *
321
+ * `.passthrough()` (not `.strict()`): external apps (Verak, weareonhire)
322
+ * co-write `id.sifa.*`, so an older SDK must not reject a record carrying a
323
+ * field it doesn't know yet. `kind` is an open enum matching the lexicon's
324
+ * knownValues but accepting any string for the same forward-compat reason.
325
+ */
326
+ declare const ProfileInvolvementRecordSchema: z.ZodObject<{
327
+ kind: z.ZodString;
328
+ upstream: z.ZodOptional<z.ZodString>;
329
+ upstreamDid: z.ZodOptional<z.ZodString>;
330
+ upstreamUrl: z.ZodOptional<z.ZodString>;
331
+ role: z.ZodOptional<z.ZodString>;
332
+ description: z.ZodOptional<z.ZodString>;
333
+ startedAt: z.ZodOptional<z.ZodString>;
334
+ endedAt: z.ZodOptional<z.ZodString>;
335
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
336
+ url: z.ZodString;
337
+ kind: z.ZodOptional<z.ZodString>;
338
+ label: z.ZodOptional<z.ZodString>;
339
+ }, z.core.$loose>>>;
340
+ entityRef: z.ZodOptional<z.ZodString>;
341
+ location: z.ZodOptional<z.ZodUnknown>;
342
+ skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
343
+ uri: z.ZodString;
344
+ }, z.core.$strip>>>;
345
+ labels: z.ZodOptional<z.ZodObject<{
346
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
347
+ values: z.ZodArray<z.ZodObject<{
348
+ val: z.ZodString;
349
+ }, z.core.$strip>>;
350
+ }, z.core.$strip>>;
351
+ createdAt: z.ZodString;
352
+ }, z.core.$loose>;
353
+ type ProfileInvolvementRecord = z.infer<typeof ProfileInvolvementRecordSchema>;
354
+
355
+ /**
356
+ * Zod schema for `id.sifa.profile.language` records.
357
+ *
358
+ * `proficiency` is advisory (`knownValues` in the lexicon) -- known values
359
+ * are the five-level LinkedIn-compatible scale under `id.sifa.defs#*`.
360
+ */
361
+ declare const ProfileLanguageRecordSchema: z.ZodObject<{
362
+ name: z.ZodString;
363
+ proficiency: z.ZodOptional<z.ZodString>;
364
+ createdAt: z.ZodString;
365
+ }, z.core.$strip>;
366
+ type ProfileLanguageRecord = z.infer<typeof ProfileLanguageRecordSchema>;
367
+
368
+ /** Zod schema for `id.sifa.profile.position` records. */
369
+ declare const ProfilePositionRecordSchema: z.ZodObject<{
370
+ company: z.ZodOptional<z.ZodString>;
371
+ companyDid: z.ZodOptional<z.ZodString>;
372
+ entityRef: z.ZodOptional<z.ZodString>;
373
+ title: z.ZodString;
374
+ description: z.ZodOptional<z.ZodString>;
375
+ employmentType: z.ZodOptional<z.ZodString>;
376
+ workplaceType: z.ZodOptional<z.ZodString>;
377
+ location: z.ZodOptional<z.ZodUnknown>;
378
+ startedAt: z.ZodString;
379
+ endedAt: z.ZodOptional<z.ZodString>;
380
+ skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
381
+ uri: z.ZodString;
382
+ }, z.core.$strip>>>;
383
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
384
+ labels: z.ZodOptional<z.ZodObject<{
385
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
386
+ values: z.ZodArray<z.ZodObject<{
387
+ val: z.ZodString;
388
+ }, z.core.$strip>>;
389
+ }, z.core.$strip>>;
390
+ createdAt: z.ZodString;
391
+ }, z.core.$loose>;
392
+ type ProfilePositionRecord = z.infer<typeof ProfilePositionRecordSchema>;
393
+
394
+ /**
395
+ * Zod schema for `id.sifa.profile.presentationDelivery` records (one occasion
396
+ * on which a presentation was delivered). Works standalone or linked to a
397
+ * presentation and/or a calendar event. `role`, `mode`, and `status` are open
398
+ * enums (knownValues); `mode`/`status` store the full
399
+ * `community.lexicon.calendar.event` token.
400
+ */
401
+ declare const ProfilePresentationDeliveryRecordSchema: z.ZodObject<{
402
+ presentationRef: z.ZodOptional<z.ZodObject<{
403
+ uri: z.ZodString;
404
+ cid: z.ZodOptional<z.ZodString>;
405
+ }, z.core.$strip>>;
406
+ title: z.ZodOptional<z.ZodString>;
407
+ role: z.ZodOptional<z.ZodString>;
408
+ eventName: z.ZodOptional<z.ZodString>;
409
+ date: z.ZodOptional<z.ZodString>;
410
+ location: z.ZodOptional<z.ZodString>;
411
+ address: z.ZodOptional<z.ZodObject<{
412
+ country: z.ZodOptional<z.ZodString>;
413
+ postalCode: z.ZodOptional<z.ZodString>;
414
+ region: z.ZodOptional<z.ZodString>;
415
+ locality: z.ZodOptional<z.ZodString>;
416
+ street: z.ZodOptional<z.ZodString>;
417
+ name: z.ZodOptional<z.ZodString>;
418
+ }, z.core.$strip>>;
419
+ mode: z.ZodOptional<z.ZodString>;
420
+ status: z.ZodOptional<z.ZodString>;
421
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
422
+ uri: z.ZodString;
423
+ label: z.ZodOptional<z.ZodString>;
424
+ type: z.ZodOptional<z.ZodString>;
425
+ }, z.core.$strip>>>;
426
+ eventRef: z.ZodOptional<z.ZodObject<{
427
+ uri: z.ZodString;
428
+ cid: z.ZodOptional<z.ZodString>;
429
+ }, z.core.$strip>>;
430
+ coSpeakers: z.ZodOptional<z.ZodArray<z.ZodString>>;
431
+ createdAt: z.ZodString;
432
+ }, z.core.$strip>;
433
+ type ProfilePresentationDeliveryRecord = z.infer<typeof ProfilePresentationDeliveryRecordSchema>;
434
+
435
+ /** Zod schema for `id.sifa.profile.project` records. */
436
+ declare const ProfileProjectRecordSchema: z.ZodObject<{
437
+ name: z.ZodString;
438
+ description: z.ZodOptional<z.ZodString>;
439
+ url: z.ZodOptional<z.ZodString>;
440
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
441
+ did: z.ZodString;
442
+ role: z.ZodOptional<z.ZodString>;
443
+ title: z.ZodOptional<z.ZodString>;
444
+ }, z.core.$strip>>>;
445
+ projectRef: z.ZodOptional<z.ZodObject<{
446
+ uri: z.ZodString;
447
+ cid: z.ZodString;
448
+ }, z.core.$strip>>;
449
+ position: z.ZodOptional<z.ZodObject<{
450
+ uri: z.ZodString;
451
+ cid: z.ZodString;
452
+ }, z.core.$strip>>;
453
+ startedAt: z.ZodOptional<z.ZodString>;
454
+ endedAt: z.ZodOptional<z.ZodString>;
455
+ labels: z.ZodOptional<z.ZodObject<{
456
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
457
+ values: z.ZodArray<z.ZodObject<{
458
+ val: z.ZodString;
459
+ }, z.core.$strip>>;
460
+ }, z.core.$strip>>;
461
+ createdAt: z.ZodString;
462
+ }, z.core.$strip>;
463
+ type ProfileProjectRecord = z.infer<typeof ProfileProjectRecordSchema>;
464
+
465
+ /** Author shape from `id.sifa.profile.publication#author`. */
466
+ declare const PublicationAuthorSchema: z.ZodObject<{
467
+ name: z.ZodString;
468
+ did: z.ZodOptional<z.ZodString>;
469
+ }, z.core.$strip>;
470
+ type PublicationAuthor = z.infer<typeof PublicationAuthorSchema>;
471
+ /** Zod schema for `id.sifa.profile.publication` records. */
472
+ declare const ProfilePublicationRecordSchema: z.ZodObject<{
473
+ title: z.ZodString;
474
+ subtitle: z.ZodOptional<z.ZodString>;
475
+ publisher: z.ZodOptional<z.ZodString>;
476
+ url: z.ZodOptional<z.ZodString>;
477
+ description: z.ZodOptional<z.ZodString>;
478
+ authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
479
+ name: z.ZodString;
480
+ did: z.ZodOptional<z.ZodString>;
481
+ }, z.core.$strip>>>;
482
+ publishedAt: z.ZodOptional<z.ZodString>;
483
+ createdAt: z.ZodString;
484
+ }, z.core.$strip>;
485
+ type ProfilePublicationRecord = z.infer<typeof ProfilePublicationRecordSchema>;
486
+
487
+ /**
488
+ * Zod schema for `id.sifa.profile.self` records. Singleton (record key `self`).
489
+ *
490
+ * `knownValues` on `openTo` and `preferredWorkplace` are advisory per the
491
+ * lexicon spec -- unknown values are allowed, but documented options live
492
+ * under the `id.sifa.defs#*` namespace.
493
+ */
494
+ declare const ProfileSelfRecordSchema: z.ZodObject<{
495
+ headline: z.ZodOptional<z.ZodString>;
496
+ about: z.ZodOptional<z.ZodString>;
497
+ industry: z.ZodOptional<z.ZodString>;
498
+ givenName: z.ZodOptional<z.ZodString>;
499
+ familyName: z.ZodOptional<z.ZodString>;
500
+ location: z.ZodOptional<z.ZodUnknown>;
501
+ openTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
502
+ preferredWorkplace: z.ZodOptional<z.ZodArray<z.ZodString>>;
503
+ langs: z.ZodOptional<z.ZodArray<z.ZodString>>;
504
+ labels: z.ZodOptional<z.ZodObject<{
505
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
506
+ values: z.ZodArray<z.ZodObject<{
507
+ val: z.ZodString;
508
+ }, z.core.$strip>>;
509
+ }, z.core.$strip>>;
510
+ discoverable: z.ZodOptional<z.ZodBoolean>;
511
+ createdAt: z.ZodString;
512
+ }, z.core.$strip>;
513
+ type ProfileSelfRecord = z.infer<typeof ProfileSelfRecordSchema>;
514
+
515
+ /**
516
+ * Zod schema for `id.sifa.profile.skill` records.
517
+ *
518
+ * `category` is advisory (`knownValues` in the lexicon) -- known values live
519
+ * under `id.sifa.defs#*` but unknown values are accepted. `subCategory` is a
520
+ * freeform user-defined grouping label nested under `category` (no known
521
+ * values); renderers decide its display label.
522
+ */
523
+ declare const ProfileSkillRecordSchema: z.ZodObject<{
524
+ name: z.ZodString;
525
+ category: z.ZodOptional<z.ZodString>;
526
+ subCategory: z.ZodOptional<z.ZodString>;
527
+ createdAt: z.ZodString;
528
+ }, z.core.$strip>;
529
+ type ProfileSkillRecord = z.infer<typeof ProfileSkillRecordSchema>;
530
+
531
+ /** Zod schema for `id.sifa.profile.volunteering` records. */
532
+ declare const ProfileVolunteeringRecordSchema: z.ZodObject<{
533
+ organization: z.ZodString;
534
+ organizationDid: z.ZodOptional<z.ZodString>;
535
+ entityRef: z.ZodOptional<z.ZodString>;
536
+ role: z.ZodOptional<z.ZodString>;
537
+ cause: z.ZodOptional<z.ZodString>;
538
+ description: z.ZodOptional<z.ZodString>;
539
+ startedAt: z.ZodOptional<z.ZodString>;
540
+ endedAt: z.ZodOptional<z.ZodString>;
541
+ createdAt: z.ZodString;
542
+ }, z.core.$strip>;
543
+ type ProfileVolunteeringRecord = z.infer<typeof ProfileVolunteeringRecordSchema>;
544
+
545
+ /**
546
+ * Grapheme-aware refinement matching the AT Protocol lexicon `maxGraphemes`
547
+ * constraint. JS strings are sequences of UTF-16 code units, but lexicon
548
+ * `maxGraphemes` counts user-perceived characters (grapheme clusters), so
549
+ * emoji sequences, regional indicators, ZWJ joins, and combining marks all
550
+ * count as one unit each. We use `Intl.Segmenter` to enforce this correctly.
551
+ */
552
+ declare function maxGraphemes(max: number): (value: string) => boolean;
553
+ /** Decentralized identifier, AT Protocol `format: did`. */
554
+ declare const didSchema: z.ZodString;
555
+ /** RFC 3339 datetime with timezone offset, AT Protocol `format: datetime`. */
556
+ declare const datetimeSchema: z.ZodString;
557
+ /**
558
+ * Freeform calendar date for user-facing profile dates (start/end, issued,
559
+ * completed, awarded, published, etc.). Accepts a bare year, year-month,
560
+ * year-month-day, or a full datetime (so a legacy record's RFC-3339 date maps
561
+ * through on backfill without loss). NOT strict `datetime` -- users typically
562
+ * remember only month/year, and LinkedIn-importer writes carry partial dates,
563
+ * so the lexicons document these as freeform `YYYY-MM` / `YYYY-MM-DD`. Record
564
+ * metadata like `createdAt` stays on `datetimeSchema`.
565
+ */
566
+ declare const partialDateSchema: z.ZodString;
567
+ /** Generic AT-URI, AT Protocol `format: at-uri`. */
568
+ declare const atUriSchema: z.ZodString;
569
+ /** Content identifier, AT Protocol `format: cid`. Loose validation -- accepts CIDv0 and CIDv1. */
570
+ declare const cidSchema: z.ZodString;
571
+ /** BCP 47 language tag, AT Protocol `format: language`. */
572
+ declare const languageTagSchema: z.ZodString;
573
+ /** Generic URI, AT Protocol `format: uri`. */
574
+ declare const uriSchema: z.ZodString;
575
+ /**
576
+ * StrongRef shape from `com.atproto.repo.strongRef` -- pins a record by both
577
+ * AT-URI (identity) and CID (version).
578
+ */
579
+ declare const strongRefSchema: z.ZodObject<{
580
+ uri: z.ZodString;
581
+ cid: z.ZodString;
582
+ }, z.core.$strip>;
583
+ /**
584
+ * Reference to an `id.sifa.profile.skill` record by AT-URI. Mirrors
585
+ * `id.sifa.defs#skillRef`, which carries no CID at all: skills are mutable
586
+ * records in the same user's repo, so the reference resolves live and tracks
587
+ * edits to the target.
588
+ */
589
+ declare const skillRefSchema: z.ZodObject<{
590
+ uri: z.ZodString;
591
+ }, z.core.$strip>;
592
+ /**
593
+ * Reference to a record by AT-URI, with an optional CID. Mirrors
594
+ * `id.sifa.defs#externalRecordRef`. Unlike a strongRef the CID is optional:
595
+ * consumers resolve the AT-URI live so the reference tracks edits to the
596
+ * target, and the CID is a best-effort integrity hint only.
597
+ */
598
+ declare const externalRecordRefSchema: z.ZodObject<{
599
+ uri: z.ZodString;
600
+ cid: z.ZodOptional<z.ZodString>;
601
+ }, z.core.$strip>;
602
+ /**
603
+ * Self-labels shape from `com.atproto.label.defs#selfLabels`. Modelled
604
+ * permissively because clients rarely construct this directly; the AppView
605
+ * handles label validation.
606
+ */
607
+ declare const selfLabelsSchema: z.ZodObject<{
608
+ $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
609
+ values: z.ZodArray<z.ZodObject<{
610
+ val: z.ZodString;
611
+ }, z.core.$strip>>;
612
+ }, z.core.$strip>;
613
+
614
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singi-labs/sifa-sdk",
3
- "version": "0.12.43",
3
+ "version": "0.12.45",
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",