@singi-labs/sifa-sdk 0.12.1 → 0.12.3

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/index.cjs CHANGED
@@ -3366,7 +3366,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
3366
3366
  });
3367
3367
 
3368
3368
  // src/index.ts
3369
- var SIFA_SDK_VERSION = "0.12.1";
3369
+ var SIFA_SDK_VERSION = "0.12.3";
3370
3370
 
3371
3371
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
3372
3372
  exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
package/dist/index.js CHANGED
@@ -3364,7 +3364,7 @@ var ProfileVolunteeringRecordSchema = z.object({
3364
3364
  });
3365
3365
 
3366
3366
  // src/index.ts
3367
- var SIFA_SDK_VERSION = "0.12.1";
3367
+ var SIFA_SDK_VERSION = "0.12.3";
3368
3368
 
3369
3369
  export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVOLVEMENT_NSID, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SECTION_GROUPS, SECTION_LABELS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, hasAdultContent, hoistPrimary, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isPseudoEmployer, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, resolveVerifierProvider, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, truncateGraphemes, uriSchema, visibleItems };
3370
3370
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,307 @@
1
+ 'use strict';
2
+
3
+ var zod = require('zod');
4
+
5
+ // src/schemas/write/shared.ts
6
+ function normalizeUrl(val) {
7
+ const trimmed = val.trim();
8
+ if (/^https?:\/\//i.test(trimmed)) return trimmed;
9
+ return `https://${trimmed}`;
10
+ }
11
+ var optionalUrl = () => zod.z.string().optional().transform((val) => {
12
+ if (!val) return void 0;
13
+ try {
14
+ new URL(val);
15
+ return val;
16
+ } catch {
17
+ return void 0;
18
+ }
19
+ });
20
+ var writeLocationSchema = zod.z.union([
21
+ zod.z.object({
22
+ country: zod.z.string().nullish(),
23
+ countryCode: zod.z.string().length(2).nullish(),
24
+ region: zod.z.string().nullish(),
25
+ city: zod.z.string().nullish(),
26
+ locality: zod.z.string().nullish(),
27
+ street: zod.z.string().nullish(),
28
+ postalCode: zod.z.string().nullish(),
29
+ name: zod.z.string().nullish()
30
+ }),
31
+ zod.z.string()
32
+ ]).nullable().optional();
33
+ var skillRefSchema = zod.z.object({
34
+ uri: zod.z.string()
35
+ });
36
+ var VALID_PLATFORMS = [
37
+ "rss",
38
+ "fediverse",
39
+ "twitter",
40
+ "instagram",
41
+ "github",
42
+ "codeberg",
43
+ "gitlab",
44
+ "forgejo",
45
+ "gitea",
46
+ "youtube",
47
+ "linkedin",
48
+ "substack",
49
+ "website",
50
+ "orcid",
51
+ "keyoxide",
52
+ "other"
53
+ ];
54
+ function httpUrlOrNull(input) {
55
+ if (typeof input !== "string") return null;
56
+ try {
57
+ const url = new URL(input);
58
+ return url.protocol === "http:" || url.protocol === "https:" ? input : null;
59
+ } catch {
60
+ return null;
61
+ }
62
+ }
63
+ var DATE_ONLY_RE = /^\d{4}-\d{2}-\d{2}$/;
64
+ function isValidDateOnly(input) {
65
+ if (typeof input !== "string" || !DATE_ONLY_RE.test(input)) return false;
66
+ const parsed = /* @__PURE__ */ new Date(`${input}T00:00:00Z`);
67
+ return !Number.isNaN(parsed.getTime()) && parsed.toISOString().startsWith(input);
68
+ }
69
+ var entityRefSchema = zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional();
70
+ var artifactLinkSchema = zod.z.object({
71
+ url: zod.z.string().max(2048).refine((v) => httpUrlOrNull(v) !== null, "must be an http(s) URL"),
72
+ kind: zod.z.string().max(64).nullable().optional(),
73
+ label: zod.z.string().max(2e3).nullable().optional()
74
+ });
75
+ var externalRecordRefSchema = zod.z.object({
76
+ uri: zod.z.string().regex(/^at:\/\/[^/\s]+\/[^/\s]+\/[^/\s]+$/, "must be an at-uri"),
77
+ // CIDv0 (`Qm…`) or CIDv1 (base32, `b…`). Loose but rejects arbitrary strings.
78
+ cid: zod.z.string().max(256).regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z2-7]+)$/, "must be a CID").optional()
79
+ });
80
+ var presentationLinkSchema = zod.z.object({
81
+ uri: zod.z.string().max(2048).refine((v) => httpUrlOrNull(v) !== null, "must be an http(s) URL"),
82
+ label: zod.z.string().max(640).nullable().optional(),
83
+ type: zod.z.string().max(256).nullable().optional()
84
+ });
85
+ var CertificationWriteSchema = zod.z.object({
86
+ name: zod.z.string().min(1).max(256),
87
+ authority: zod.z.string().max(256).nullable().optional(),
88
+ entityRef: entityRefSchema,
89
+ credentialId: zod.z.string().max(256).nullable().optional(),
90
+ credentialUrl: optionalUrl(),
91
+ issuedAt: zod.z.string().nullable().optional(),
92
+ expiresAt: zod.z.string().nullable().optional()
93
+ });
94
+ var CourseWriteSchema = zod.z.object({
95
+ name: zod.z.string().min(1).max(200),
96
+ number: zod.z.string().max(50).nullable().optional(),
97
+ institution: zod.z.string().max(256).nullable().optional(),
98
+ entityRef: entityRefSchema,
99
+ /**
100
+ * at-uri of the linked `id.sifa.profile.certification` record. Structurally
101
+ * validated (`at://authority/collection/rkey`) so a bad value can't be
102
+ * stored and later split into a bogus rkey.
103
+ */
104
+ credential: zod.z.string().max(512).regex(/^at:\/\/[^/\s]+\/[^/\s]+\/[^/\s]+$/, "must be an at-uri").nullable().optional(),
105
+ /**
106
+ * RFC 3339 datetime the course was completed. The editor collects month
107
+ * granularity (YYYY-MM) and converts to a datetime before the write; stored
108
+ * and passed through as-is, mirroring `certification.issuedAt`.
109
+ */
110
+ completedAt: zod.z.string().nullable().optional()
111
+ });
112
+ var EducationWriteSchema = zod.z.object({
113
+ institution: zod.z.string().min(1).max(256),
114
+ entityRef: entityRefSchema,
115
+ degree: zod.z.string().max(256).nullable().optional(),
116
+ fieldOfStudy: zod.z.string().max(256).nullable().optional(),
117
+ description: zod.z.string().max(5e4).nullable().optional(),
118
+ activities: zod.z.string().max(1e3).nullable().optional(),
119
+ startedAt: zod.z.string().nullable().optional(),
120
+ endedAt: zod.z.string().nullable().optional()
121
+ });
122
+ var ExternalAccountWriteSchema = zod.z.object({
123
+ platform: zod.z.enum(VALID_PLATFORMS),
124
+ url: zod.z.string().max(2e3).transform(normalizeUrl).pipe(zod.z.string().url()),
125
+ label: zod.z.string().max(100).optional(),
126
+ feedUrl: zod.z.string().max(2e3).transform(normalizeUrl).pipe(zod.z.string().url()).optional()
127
+ });
128
+ var HonorWriteSchema = zod.z.object({
129
+ title: zod.z.string().min(1).max(200),
130
+ issuer: zod.z.string().max(256).nullable().optional(),
131
+ entityRef: entityRefSchema,
132
+ description: zod.z.string().max(5e4).nullable().optional(),
133
+ awardedAt: zod.z.string().nullable().optional()
134
+ });
135
+ var InvolvementWriteSchema = zod.z.object({
136
+ kind: zod.z.string().min(1).max(256),
137
+ upstream: zod.z.string().max(2560).nullable().optional(),
138
+ upstreamDid: zod.z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID").nullable().optional(),
139
+ upstreamUrl: optionalUrl(),
140
+ role: zod.z.string().max(2560).nullable().optional(),
141
+ description: zod.z.string().max(5e4).nullable().optional(),
142
+ // Freeform YYYY / YYYY-MM / YYYY-MM-DD; validated loosely so partial dates pass.
143
+ startedAt: zod.z.string().max(32).nullable().optional(),
144
+ endedAt: zod.z.string().max(32).nullable().optional(),
145
+ links: zod.z.array(artifactLinkSchema).max(50).nullable().optional(),
146
+ entityRef: entityRefSchema,
147
+ location: writeLocationSchema,
148
+ skills: zod.z.array(skillRefSchema).max(50).nullable().optional()
149
+ });
150
+ var LanguageWriteSchema = zod.z.object({
151
+ name: zod.z.string().min(1).max(64),
152
+ proficiency: zod.z.string().max(50).optional()
153
+ });
154
+ var OrgEmploymentAttestationWriteSchema = zod.z.object({
155
+ subject: zod.z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID"),
156
+ position: externalRecordRefSchema,
157
+ status: zod.z.enum(["current", "past"]),
158
+ title: zod.z.string().min(1).max(2560),
159
+ startedAt: zod.z.string().max(32),
160
+ entityRef: zod.z.string().max(2048).nullable().optional(),
161
+ companyDid: zod.z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID").nullable().optional(),
162
+ endedAt: zod.z.string().max(32).nullable().optional(),
163
+ comment: zod.z.string().max(3e3).nullable().optional(),
164
+ createdAt: zod.z.string()
165
+ });
166
+ var OrgProfileWriteSchema = zod.z.object({
167
+ name: zod.z.string().min(1).max(2e3),
168
+ description: zod.z.string().max(5e4).nullable().optional(),
169
+ logo: zod.z.unknown().nullable().optional(),
170
+ website: zod.z.string().max(2048).nullable().optional(),
171
+ entityRefs: zod.z.array(zod.z.string().max(2048)).max(20).nullable().optional(),
172
+ contact: zod.z.string().max(320).nullable().optional(),
173
+ createdAt: zod.z.string()
174
+ });
175
+ var PositionWriteSchema = zod.z.object({
176
+ company: zod.z.string().min(1).max(256).nullable().optional(),
177
+ entityRef: entityRefSchema,
178
+ title: zod.z.string().min(1).max(256),
179
+ description: zod.z.string().max(5e4).nullable().optional(),
180
+ employmentType: zod.z.string().nullable().optional(),
181
+ workplaceType: zod.z.string().nullable().optional(),
182
+ location: writeLocationSchema,
183
+ startedAt: zod.z.string().nullable().optional(),
184
+ endedAt: zod.z.string().nullable().optional(),
185
+ skills: zod.z.array(skillRefSchema).max(50).nullable().optional()
186
+ });
187
+ var PresentationDeliveryWriteSchema = zod.z.object({
188
+ presentationRef: externalRecordRefSchema.optional(),
189
+ title: zod.z.string().max(3e3).nullable().optional(),
190
+ role: zod.z.string().max(640).nullable().optional(),
191
+ eventName: zod.z.string().max(3e3).nullable().optional(),
192
+ date: zod.z.string().refine(isValidDateOnly, "must be a valid YYYY-MM-DD date").nullable().optional(),
193
+ location: zod.z.string().max(2560).nullable().optional(),
194
+ mode: zod.z.string().max(256).nullable().optional(),
195
+ status: zod.z.string().max(256).nullable().optional(),
196
+ links: zod.z.array(presentationLinkSchema).max(20).optional(),
197
+ eventRef: externalRecordRefSchema.optional(),
198
+ coSpeakers: zod.z.array(zod.z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID")).max(20).optional()
199
+ });
200
+ var PresentationWriteSchema = zod.z.object({
201
+ title: zod.z.string().min(1).max(3e3),
202
+ description: zod.z.string().max(5e4).nullable().optional(),
203
+ duration: zod.z.object({
204
+ minMinutes: zod.z.number().int().min(1),
205
+ maxMinutes: zod.z.number().int().min(1).optional()
206
+ }).refine((d) => d.maxMinutes === void 0 || d.maxMinutes >= d.minMinutes, {
207
+ message: "maxMinutes must be greater than or equal to minMinutes",
208
+ path: ["maxMinutes"]
209
+ }).optional(),
210
+ intendedAudiences: zod.z.array(zod.z.string().max(1e3)).max(20).optional(),
211
+ links: zod.z.array(presentationLinkSchema).max(20).optional(),
212
+ writeupRef: externalRecordRefSchema.optional()
213
+ });
214
+ var ProfileLocationWriteSchema = zod.z.object({
215
+ address: zod.z.object({
216
+ country: zod.z.string().nullish(),
217
+ countryCode: zod.z.string().length(2).nullish(),
218
+ region: zod.z.string().nullish(),
219
+ city: zod.z.string().nullish(),
220
+ locality: zod.z.string().nullish(),
221
+ street: zod.z.string().nullish(),
222
+ postalCode: zod.z.string().nullish(),
223
+ name: zod.z.string().nullish()
224
+ }),
225
+ type: zod.z.string().min(1),
226
+ label: zod.z.string().max(60).nullable().optional(),
227
+ isPrimary: zod.z.boolean().optional()
228
+ });
229
+ var ProfileSelfWriteSchema = zod.z.object({
230
+ headline: zod.z.string().max(300).optional(),
231
+ about: zod.z.string().max(5e4).optional(),
232
+ givenName: zod.z.string().max(640).optional(),
233
+ familyName: zod.z.string().max(640).optional(),
234
+ industries: zod.z.array(
235
+ zod.z.object({
236
+ industry: zod.z.string().max(100),
237
+ domain: zod.z.string().max(100).optional()
238
+ })
239
+ ).max(10).optional(),
240
+ location: writeLocationSchema,
241
+ openTo: zod.z.array(zod.z.string()).max(10).optional(),
242
+ preferredWorkplace: zod.z.array(zod.z.string()).max(5).optional(),
243
+ availableFromUtc: zod.z.number().int().min(0).max(23).optional(),
244
+ availableToUtc: zod.z.number().int().min(0).max(23).optional(),
245
+ langs: zod.z.array(zod.z.string()).max(3).optional(),
246
+ discoverable: zod.z.boolean().optional()
247
+ }).passthrough();
248
+ var ProjectWriteSchema = zod.z.object({
249
+ name: zod.z.string().min(1).max(256),
250
+ description: zod.z.string().max(5e4).nullable().optional(),
251
+ url: optionalUrl(),
252
+ startedAt: zod.z.string().nullable().optional(),
253
+ endedAt: zod.z.string().nullable().optional()
254
+ });
255
+ var PublicationWriteSchema = zod.z.object({
256
+ title: zod.z.string().min(1).max(200),
257
+ subtitle: zod.z.string().max(2e3).nullable().optional(),
258
+ publisher: zod.z.string().max(256).nullable().optional(),
259
+ url: optionalUrl(),
260
+ description: zod.z.string().max(5e4).nullable().optional(),
261
+ publishedAt: zod.z.string().nullable().optional()
262
+ });
263
+ var SkillWriteSchema = zod.z.object({
264
+ name: zod.z.string().min(1).max(100),
265
+ category: zod.z.string().max(100).optional()
266
+ });
267
+ var VolunteeringWriteSchema = zod.z.object({
268
+ organization: zod.z.string().min(1).max(256),
269
+ entityRef: entityRefSchema,
270
+ role: zod.z.string().max(256).nullable().optional(),
271
+ cause: zod.z.string().max(256).nullable().optional(),
272
+ description: zod.z.string().max(5e4).nullable().optional(),
273
+ startedAt: zod.z.string().nullable().optional(),
274
+ endedAt: zod.z.string().nullable().optional()
275
+ });
276
+
277
+ exports.CertificationWriteSchema = CertificationWriteSchema;
278
+ exports.CourseWriteSchema = CourseWriteSchema;
279
+ exports.EducationWriteSchema = EducationWriteSchema;
280
+ exports.ExternalAccountWriteSchema = ExternalAccountWriteSchema;
281
+ exports.HonorWriteSchema = HonorWriteSchema;
282
+ exports.InvolvementWriteSchema = InvolvementWriteSchema;
283
+ exports.LanguageWriteSchema = LanguageWriteSchema;
284
+ exports.OrgEmploymentAttestationWriteSchema = OrgEmploymentAttestationWriteSchema;
285
+ exports.OrgProfileWriteSchema = OrgProfileWriteSchema;
286
+ exports.PositionWriteSchema = PositionWriteSchema;
287
+ exports.PresentationDeliveryWriteSchema = PresentationDeliveryWriteSchema;
288
+ exports.PresentationWriteSchema = PresentationWriteSchema;
289
+ exports.ProfileLocationWriteSchema = ProfileLocationWriteSchema;
290
+ exports.ProfileSelfWriteSchema = ProfileSelfWriteSchema;
291
+ exports.ProjectWriteSchema = ProjectWriteSchema;
292
+ exports.PublicationWriteSchema = PublicationWriteSchema;
293
+ exports.SkillWriteSchema = SkillWriteSchema;
294
+ exports.VALID_PLATFORMS = VALID_PLATFORMS;
295
+ exports.VolunteeringWriteSchema = VolunteeringWriteSchema;
296
+ exports.artifactLinkSchema = artifactLinkSchema;
297
+ exports.entityRefSchema = entityRefSchema;
298
+ exports.externalRecordRefSchema = externalRecordRefSchema;
299
+ exports.httpUrlOrNull = httpUrlOrNull;
300
+ exports.isValidDateOnly = isValidDateOnly;
301
+ exports.normalizeUrl = normalizeUrl;
302
+ exports.optionalUrl = optionalUrl;
303
+ exports.presentationLinkSchema = presentationLinkSchema;
304
+ exports.skillRefSchema = skillRefSchema;
305
+ exports.writeLocationSchema = writeLocationSchema;
306
+ //# sourceMappingURL=index.cjs.map
307
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/schemas/write/shared.ts","../../../src/schemas/write/certification.ts","../../../src/schemas/write/course.ts","../../../src/schemas/write/education.ts","../../../src/schemas/write/external-account.ts","../../../src/schemas/write/honor.ts","../../../src/schemas/write/involvement.ts","../../../src/schemas/write/language.ts","../../../src/schemas/write/org-employment-attestation.ts","../../../src/schemas/write/org-profile.ts","../../../src/schemas/write/position.ts","../../../src/schemas/write/presentation-delivery.ts","../../../src/schemas/write/presentation.ts","../../../src/schemas/write/profile-location.ts","../../../src/schemas/write/profile-self.ts","../../../src/schemas/write/project.ts","../../../src/schemas/write/publication.ts","../../../src/schemas/write/skill.ts","../../../src/schemas/write/volunteering.ts"],"names":["z"],"mappings":";;;;;AAGO,SAAS,aAAa,GAAA,EAAqB;AAChD,EAAA,MAAM,OAAA,GAAU,IAAI,IAAA,EAAK;AACzB,EAAA,IAAI,eAAA,CAAgB,IAAA,CAAK,OAAO,CAAA,EAAG,OAAO,OAAA;AAC1C,EAAA,OAAO,WAAW,OAAO,CAAA,CAAA;AAC3B;AAMO,IAAM,WAAA,GAAc,MACzBA,KAAA,CACG,MAAA,GACA,QAAA,EAAS,CACT,SAAA,CAAU,CAAC,GAAA,KAAQ;AAClB,EAAA,IAAI,CAAC,KAAK,OAAO,MAAA;AACjB,EAAA,IAAI;AACF,IAAA,IAAI,IAAI,GAAG,CAAA;AACX,IAAA,OAAO,GAAA;AAAA,EACT,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,MAAA;AAAA,EACT;AACF,CAAC;AAiBE,IAAM,mBAAA,GAAsBA,MAChC,KAAA,CAAM;AAAA,EACLA,MAAE,MAAA,CAAO;AAAA,IACP,OAAA,EAASA,KAAA,CAAE,MAAA,EAAO,CAAE,OAAA,EAAQ;AAAA,IAC5B,aAAaA,KAAA,CAAE,MAAA,GAAS,MAAA,CAAO,CAAC,EAAE,OAAA,EAAQ;AAAA,IAC1C,MAAA,EAAQA,KAAA,CAAE,MAAA,EAAO,CAAE,OAAA,EAAQ;AAAA,IAC3B,IAAA,EAAMA,KAAA,CAAE,MAAA,EAAO,CAAE,OAAA,EAAQ;AAAA,IACzB,QAAA,E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 'zod';\n\n/** Prepend `https://` if no scheme is present. */\nexport function normalizeUrl(val: string): string {\n const trimmed = val.trim();\n if (/^https?:\\/\\//i.test(trimmed)) return trimmed;\n return `https://${trimmed}`;\n}\n\n/**\n * Accept a URL string or silently drop it if invalid (returns `undefined`).\n * Preserves the write-time policy: bad URLs from imports are dropped, not rejected.\n */\nexport const optionalUrl = () =>\n z\n .string()\n .optional()\n .transform((val) => {\n if (!val) return undefined;\n try {\n new URL(val);\n return val;\n } catch {\n return undefined;\n }\n });\n\n/**\n * Location shape accepted by the sifa-api write endpoints.\n *\n * Accepts BOTH the legacy shape (`id.sifa.defs#locationAddress`: `countryCode`,\n * `region`, `city`) AND the new community shape\n * (`community.lexicon.location.address`: `country`, `region`, `locality`,\n * `street?`, `postalCode?`, `name?`). The frontend reads location records from\n * the API and echoes them back on save. The API serializer emits explicit `null`\n * for absent fields (not `undefined`), so every field uses `.nullish()`\n * (`string | null | undefined`) instead of `.optional()` (`string | undefined`).\n *\n * `buildPdsLocation` on the server handles conversion to the PDS shape (always\n * emitting the new community shape) and returns `undefined` when neither\n * `country` nor `countryCode` is usable.\n */\nexport const writeLocationSchema = z\n .union([\n z.object({\n country: z.string().nullish(),\n countryCode: z.string().length(2).nullish(),\n region: z.string().nullish(),\n city: z.string().nullish(),\n locality: z.string().nullish(),\n street: z.string().nullish(),\n postalCode: z.string().nullish(),\n name: z.string().nullish(),\n }),\n z.string(),\n ])\n .nullable()\n .optional();\n\n/** Skill reference: a strong ref to a canonical skill record. */\nexport const skillRefSchema = z.object({\n uri: z.string(),\n});\n\n/**\n * Platforms accepted by the external-account write endpoint.\n *\n * NOTE: this list intentionally differs from `PLATFORM_LABELS` in the SDK's\n * `/taxonomy` subpath. `VALID_PLATFORMS` is what sifa-api's `POST /external-accounts`\n * endpoint enforces; `PLATFORM_LABELS` is the display taxonomy used by the profile\n * UI. Reconciling them is a separate follow-up (see #TBD). For now the two are\n * mirrored verbatim from their prior definitions to preserve behavior.\n */\nexport const VALID_PLATFORMS = [\n 'rss',\n 'fediverse',\n 'twitter',\n 'instagram',\n 'github',\n 'codeberg',\n 'gitlab',\n 'forgejo',\n 'gitea',\n 'youtube',\n 'linkedin',\n 'substack',\n 'website',\n 'orcid',\n 'keyoxide',\n 'other',\n] as const;\n\nexport type ValidPlatform = (typeof VALID_PLATFORMS)[number];\n\n// ---- pure sanitization primitives (previously in sifa-api/src/lib/sanitize.ts) ----\n\n/**\n * Returns `input` when it is an http(s) URL string, else `null`. Blocks\n * dangerous schemes (`javascript:`, `data:`, etc.) from being stored and\n * later rendered.\n */\nexport function httpUrlOrNull(input: unknown): string | null {\n if (typeof input !== 'string') return null;\n try {\n const url = new URL(input);\n return url.protocol === 'http:' || url.protocol === 'https:' ? input : null;\n } catch {\n return null;\n }\n}\n\nconst DATE_ONLY_RE = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n/**\n * Strict calendar-date validator. Returns `true` for `YYYY-MM-DD` strings\n * that name a real day, rejecting impossible values (`2024-02-30`, `2024-13-01`)\n * by requiring the JavaScript `Date` round-trip to preserve the input.\n */\nexport function isValidDateOnly(input: unknown): boolean {\n if (typeof input !== 'string' || !DATE_ONLY_RE.test(input)) return false;\n const parsed = new Date(`${input}T00:00:00Z`);\n return !Number.isNaN(parsed.getTime()) && parsed.toISOString().startsWith(input);\n}\n\n// ---- shared write-schema fragments used by multiple sections ----\n\n/**\n * Portable org entity identifier (Wikidata / ROR / LEI / sifa.id URI) chosen\n * from the typeahead. Constrained to http(s) so a script-bearing scheme can't\n * be written to the PDS record. Absent for free-text / unlinked records.\n * Shared by the org-bearing sections (position, education, certification,\n * volunteering, course, honor).\n */\nexport const entityRefSchema = z\n .string()\n .url()\n .refine((s) => /^https?:\\/\\//i.test(s), { message: 'entityRef must be an http(s) URL' })\n .max(2048)\n .optional();\n\n/**\n * One proof link on an involvement record (`id.sifa.defs#artifactLink`).\n * Only http(s) URLs are accepted so a dangerous scheme is never written to\n * the PDS.\n */\nexport const artifactLinkSchema = z.object({\n url: z\n .string()\n .max(2048)\n .refine((v) => httpUrlOrNull(v) !== null, 'must be an http(s) URL'),\n kind: z.string().max(64).nullable().optional(),\n label: z.string().max(2000).nullable().optional(),\n});\n\n/**\n * Reference to a record by at-uri, with an optional CID\n * (`id.sifa.defs#externalRecordRef`).\n */\nexport const externalRecordRefSchema = z.object({\n uri: z.string().regex(/^at:\\/\\/[^/\\s]+\\/[^/\\s]+\\/[^/\\s]+$/, 'must be an at-uri'),\n // CIDv0 (`Qm…`) or CIDv1 (base32, `b…`). Loose but rejects arbitrary strings.\n cid: z\n .string()\n .max(256)\n .regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z2-7]+)$/, 'must be a CID')\n .optional(),\n});\n\n/** Link attached to a presentation record. */\nexport const presentationLinkSchema = z.object({\n uri: z\n .string()\n .max(2048)\n .refine((v) => httpUrlOrNull(v) !== null, 'must be an http(s) URL'),\n label: z.string().max(640).nullable().optional(),\n type: z.string().max(256).nullable().optional(),\n});\n","import { z } from 'zod';\n\nimport { entityRefSchema, optionalUrl } from './shared.js';\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.certification`. */\nexport const CertificationWriteSchema = z.object({\n name: z.string().min(1).max(256),\n authority: z.string().max(256).nullable().optional(),\n entityRef: entityRefSchema,\n credentialId: z.string().max(256).nullable().optional(),\n credentialUrl: optionalUrl(),\n issuedAt: z.string().nullable().optional(),\n expiresAt: z.string().nullable().optional(),\n});\n\nexport type CertificationWriteInput = z.infer<typeof CertificationWriteSchema>;\n","import { z } from 'zod';\n\nimport { entityRefSchema } from './shared.js';\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.course`. */\nexport const CourseWriteSchema = z.object({\n name: z.string().min(1).max(200),\n number: z.string().max(50).nullable().optional(),\n institution: z.string().max(256).nullable().optional(),\n entityRef: entityRefSchema,\n /**\n * at-uri of the linked `id.sifa.profile.certification` record. Structurally\n * validated (`at://authority/collection/rkey`) so a bad value can't be\n * stored and later split into a bogus rkey.\n */\n credential: z\n .string()\n .max(512)\n .regex(/^at:\\/\\/[^/\\s]+\\/[^/\\s]+\\/[^/\\s]+$/, 'must be an at-uri')\n .nullable()\n .optional(),\n /**\n * RFC 3339 datetime the course was completed. The editor collects month\n * granularity (YYYY-MM) and converts to a datetime before the write; stored\n * and passed through as-is, mirroring `certification.issuedAt`.\n */\n completedAt: z.string().nullable().optional(),\n});\n\nexport type CourseWriteInput = z.infer<typeof CourseWriteSchema>;\n","import { z } from 'zod';\n\nimport { entityRefSchema } from './shared.js';\n\n/** Schema enforced by `POST /profile/education` on sifa-api. */\nexport const EducationWriteSchema = z.object({\n institution: z.string().min(1).max(256),\n entityRef: entityRefSchema,\n degree: z.string().max(256).nullable().optional(),\n fieldOfStudy: z.string().max(256).nullable().optional(),\n description: z.string().max(50000).nullable().optional(),\n activities: z.string().max(1000).nullable().optional(),\n startedAt: z.string().nullable().optional(),\n endedAt: z.string().nullable().optional(),\n});\n\nexport type EducationWriteInput = z.infer<typeof EducationWriteSchema>;\n","import { z } from 'zod';\n\nimport { VALID_PLATFORMS, normalizeUrl } from './shared.js';\n\n/** Schema enforced by `POST /external-accounts` on sifa-api. */\nexport const ExternalAccountWriteSchema = z.object({\n platform: z.enum(VALID_PLATFORMS),\n url: z.string().max(2000).transform(normalizeUrl).pipe(z.string().url()),\n label: z.string().max(100).optional(),\n feedUrl: z.string().max(2000).transform(normalizeUrl).pipe(z.string().url()).optional(),\n});\n\nexport type ExternalAccountWriteInput = z.infer<typeof ExternalAccountWriteSchema>;\n","import { z } from 'zod';\n\nimport { entityRefSchema } from './shared.js';\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.honor`. */\nexport const HonorWriteSchema = z.object({\n title: z.string().min(1).max(200),\n issuer: z.string().max(256).nullable().optional(),\n entityRef: entityRefSchema,\n description: z.string().max(50000).nullable().optional(),\n awardedAt: z.string().nullable().optional(),\n});\n\nexport type HonorWriteInput = z.infer<typeof HonorWriteSchema>;\n","import { z } from 'zod';\n\nimport {\n artifactLinkSchema,\n entityRefSchema,\n optionalUrl,\n skillRefSchema,\n writeLocationSchema,\n} from './shared.js';\n\n/**\n * Schema enforced by the generic-record write endpoint for `id.sifa.profile.involvement`.\n *\n * Represents contribution to an upstream project or community\n * (open-source maintainership, community volunteering, etc.). `upstream` /\n * `upstreamDid` / `upstreamUrl` describe what the user contributed to;\n * `links` collect proof artifacts.\n */\nexport const InvolvementWriteSchema = z.object({\n kind: z.string().min(1).max(256),\n upstream: z.string().max(2560).nullable().optional(),\n upstreamDid: z\n .string()\n .regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID')\n .nullable()\n .optional(),\n upstreamUrl: optionalUrl(),\n role: z.string().max(2560).nullable().optional(),\n description: z.string().max(50000).nullable().optional(),\n // Freeform YYYY / YYYY-MM / YYYY-MM-DD; validated loosely so partial dates pass.\n startedAt: z.string().max(32).nullable().optional(),\n endedAt: z.string().max(32).nullable().optional(),\n links: z.array(artifactLinkSchema).max(50).nullable().optional(),\n entityRef: entityRefSchema,\n location: writeLocationSchema,\n skills: z.array(skillRefSchema).max(50).nullable().optional(),\n});\n\nexport type InvolvementWriteInput = z.infer<typeof InvolvementWriteSchema>;\n","import { z } from 'zod';\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.language`. */\nexport const LanguageWriteSchema = z.object({\n name: z.string().min(1).max(64),\n proficiency: z.string().max(50).optional(),\n});\n\nexport type LanguageWriteInput = z.infer<typeof LanguageWriteSchema>;\n","import { z } from 'zod';\n\nimport { externalRecordRefSchema } from './shared.js';\n\n/**\n * Schema enforced by the org-employment-attestation write endpoint on sifa-api.\n *\n * An org attests that a Sifa user (`subject`) held a specific `position` record\n * with `title` between `startedAt` and `endedAt` (inclusive of \"current\" status).\n * The attestation itself is signed by the org's DID; `entityRef` / `companyDid`\n * optionally cross-link the org identifier(s) used at the time.\n */\nexport const OrgEmploymentAttestationWriteSchema = z.object({\n subject: z.string().regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID'),\n position: externalRecordRefSchema,\n status: z.enum(['current', 'past']),\n title: z.string().min(1).max(2560),\n startedAt: z.string().max(32),\n entityRef: z.string().max(2048).nullable().optional(),\n companyDid: z\n .string()\n .regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID')\n .nullable()\n .optional(),\n endedAt: z.string().max(32).nullable().optional(),\n comment: z.string().max(3000).nullable().optional(),\n createdAt: z.string(),\n});\n\nexport type OrgEmploymentAttestationWriteInput = z.infer<\n typeof OrgEmploymentAttestationWriteSchema\n>;\n","import { z } from 'zod';\n\n/**\n * Schema enforced by the org-profile write endpoint on sifa-api.\n *\n * Sifa-managed org identity: name + description + contact channel plus\n * `entityRefs` linking the org to portable identifiers (Wikidata / ROR /\n * LEI / sifa.id URI, http(s) enforced elsewhere).\n */\nexport const OrgProfileWriteSchema = z.object({\n name: z.string().min(1).max(2000),\n description: z.string().max(50000).nullable().optional(),\n logo: z.unknown().nullable().optional(),\n website: z.string().max(2048).nullable().optional(),\n entityRefs: z.array(z.string().max(2048)).max(20).nullable().optional(),\n contact: z.string().max(320).nullable().optional(),\n createdAt: z.string(),\n});\n\nexport type OrgProfileWriteInput = z.infer<typeof OrgProfileWriteSchema>;\n","import { z } from 'zod';\n\nimport { entityRefSchema, skillRefSchema, writeLocationSchema } from './shared.js';\n\n/**\n * Schema enforced by `POST /profile/positions` on sifa-api.\n *\n * Client-side callers can `.safeParse(...)` this before submitting to catch\n * obvious problems (empty `title`, over-length text) before the network\n * round-trip. If it passes here, the API will accept the write modulo\n * transport / auth failures.\n *\n * `company` is optional to support freelancer / independent employment types\n * where the position has no employer. This matches sifa-api's current\n * behavior in `src/routes/schemas.ts` and the SDK's lexicon schema\n * (`ProfilePositionRecordSchema`) since sifa-sdk #184.\n */\nexport const PositionWriteSchema = z.object({\n company: z.string().min(1).max(256).nullable().optional(),\n entityRef: entityRefSchema,\n title: z.string().min(1).max(256),\n description: z.string().max(50000).nullable().optional(),\n employmentType: z.string().nullable().optional(),\n workplaceType: z.string().nullable().optional(),\n location: writeLocationSchema,\n startedAt: z.string().nullable().optional(),\n endedAt: z.string().nullable().optional(),\n skills: z.array(skillRefSchema).max(50).nullable().optional(),\n});\n\nexport type PositionWriteInput = z.infer<typeof PositionWriteSchema>;\n","import { z } from 'zod';\n\nimport { externalRecordRefSchema, isValidDateOnly, presentationLinkSchema } from './shared.js';\n\n/**\n * Schema enforced by the generic-record write endpoint for `id.sifa.profile.presentationDelivery`.\n *\n * Records a specific delivery of a presentation (e.g., at a conference).\n * `presentationRef` optionally points at the parent `id.sifa.profile.presentation`\n * record; `eventRef` optionally links a Sifa event record; `coSpeakers` are\n * DIDs of people who delivered alongside the profile owner.\n */\nexport const PresentationDeliveryWriteSchema = z.object({\n presentationRef: externalRecordRefSchema.optional(),\n title: z.string().max(3000).nullable().optional(),\n role: z.string().max(640).nullable().optional(),\n eventName: z.string().max(3000).nullable().optional(),\n date: z.string().refine(isValidDateOnly, 'must be a valid YYYY-MM-DD date').nullable().optional(),\n location: z.string().max(2560).nullable().optional(),\n mode: z.string().max(256).nullable().optional(),\n status: z.string().max(256).nullable().optional(),\n links: z.array(presentationLinkSchema).max(20).optional(),\n eventRef: externalRecordRefSchema.optional(),\n coSpeakers: z\n .array(z.string().regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID'))\n .max(20)\n .optional(),\n});\n\nexport type PresentationDeliveryWriteInput = z.infer<typeof PresentationDeliveryWriteSchema>;\n","import { z } from 'zod';\n\nimport { externalRecordRefSchema, presentationLinkSchema } from './shared.js';\n\n/**\n * Schema enforced by the generic-record write endpoint for `id.sifa.profile.presentation`.\n *\n * Describes a talk / presentation the user can give. `duration` bounds the\n * runtime; `intendedAudiences` names who it's aimed at; `writeupRef` is an\n * optional at-uri pointer to a companion writeup record.\n */\nexport const PresentationWriteSchema = z.object({\n title: z.string().min(1).max(3000),\n description: z.string().max(50000).nullable().optional(),\n duration: z\n .object({\n minMinutes: z.number().int().min(1),\n maxMinutes: z.number().int().min(1).optional(),\n })\n .refine((d) => d.maxMinutes === undefined || d.maxMinutes >= d.minMinutes, {\n message: 'maxMinutes must be greater than or equal to minMinutes',\n path: ['maxMinutes'],\n })\n .optional(),\n intendedAudiences: z.array(z.string().max(1000)).max(20).optional(),\n links: z.array(presentationLinkSchema).max(20).optional(),\n writeupRef: externalRecordRefSchema.optional(),\n});\n\nexport type PresentationWriteInput = z.infer<typeof PresentationWriteSchema>;\n","import { z } from 'zod';\n\n/**\n * Schema enforced by `POST /profile/locations` on sifa-api.\n *\n * Mirrors the inner object of `writeLocationSchema`: accepts both the community\n * shape (`country`, `locality`) and the legacy shape (`countryCode`, `city`)\n * during the dual-read window. sifa-web #840 switched outbound writes to the\n * community shape; older clients may still send the legacy shape. All address\n * fields are `.nullish()` so explicit `null` from API echoes is accepted\n * (see sifa-api #426).\n *\n * The route handler hands `address` to `buildPdsLocation`, which normalizes\n * either input and enforces alpha-2 on the wire to PDS — returning a 400 with\n * `message: \"address.country (alpha-2) is required\"` when no usable code is\n * present. The schema stays permissive on country length here and lets\n * `buildPdsLocation` be the single enforcement point.\n */\nexport const ProfileLocationWriteSchema = z.object({\n address: z.object({\n country: z.string().nullish(),\n countryCode: z.string().length(2).nullish(),\n region: z.string().nullish(),\n city: z.string().nullish(),\n locality: z.string().nullish(),\n street: z.string().nullish(),\n postalCode: z.string().nullish(),\n name: z.string().nullish(),\n }),\n type: z.string().min(1),\n label: z.string().max(60).nullable().optional(),\n isPrimary: z.boolean().optional(),\n});\n\nexport type ProfileLocationWriteInput = z.infer<typeof ProfileLocationWriteSchema>;\n","import { z } from 'zod';\n\nimport { writeLocationSchema } from './shared.js';\n\n/**\n * Schema enforced by `POST /profile/self` on sifa-api.\n *\n * `.passthrough()` so the API accepts fields not yet enumerated here (used for\n * gradual rollout of new profile-self keys without requiring lockstep bumps\n * between web/api). Note this means client validation on this schema will\n * NEVER reject \"unknown\" fields — the divergence is intentional.\n *\n * Grapheme caps (e.g. 64 on given/familyName) are enforced client-side by the\n * SDK's lexicon schema; the write schema only guards the byte-length ceiling.\n */\nexport const ProfileSelfWriteSchema = z\n .object({\n headline: z.string().max(300).optional(),\n about: z.string().max(50000).optional(),\n givenName: z.string().max(640).optional(),\n familyName: z.string().max(640).optional(),\n industries: z\n .array(\n z.object({\n industry: z.string().max(100),\n domain: z.string().max(100).optional(),\n }),\n )\n .max(10)\n .optional(),\n location: writeLocationSchema,\n openTo: z.array(z.string()).max(10).optional(),\n preferredWorkplace: z.array(z.string()).max(5).optional(),\n availableFromUtc: z.number().int().min(0).max(23).optional(),\n availableToUtc: z.number().int().min(0).max(23).optional(),\n langs: z.array(z.string()).max(3).optional(),\n discoverable: z.boolean().optional(),\n })\n .passthrough();\n\nexport type ProfileSelfWriteInput = z.infer<typeof ProfileSelfWriteSchema>;\n","import { z } from 'zod';\n\nimport { optionalUrl } from './shared.js';\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.project`. */\nexport const ProjectWriteSchema = z.object({\n name: z.string().min(1).max(256),\n description: z.string().max(50000).nullable().optional(),\n url: optionalUrl(),\n startedAt: z.string().nullable().optional(),\n endedAt: z.string().nullable().optional(),\n});\n\nexport type ProjectWriteInput = z.infer<typeof ProjectWriteSchema>;\n","import { z } from 'zod';\n\nimport { optionalUrl } from './shared.js';\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.publication`. */\nexport const PublicationWriteSchema = z.object({\n title: z.string().min(1).max(200),\n subtitle: z.string().max(2000).nullable().optional(),\n publisher: z.string().max(256).nullable().optional(),\n url: optionalUrl(),\n description: z.string().max(50000).nullable().optional(),\n publishedAt: z.string().nullable().optional(),\n});\n\nexport type PublicationWriteInput = z.infer<typeof PublicationWriteSchema>;\n","import { z } from 'zod';\n\n/** Schema enforced by `POST /profile/skills` on sifa-api. */\nexport const SkillWriteSchema = z.object({\n name: z.string().min(1).max(100),\n category: z.string().max(100).optional(),\n});\n\nexport type SkillWriteInput = z.infer<typeof SkillWriteSchema>;\n","import { z } from 'zod';\n\nimport { entityRefSchema } from './shared.js';\n\n/** Schema enforced by the generic-record write endpoint for `id.sifa.profile.volunteering`. */\nexport const VolunteeringWriteSchema = z.object({\n organization: z.string().min(1).max(256),\n entityRef: entityRefSchema,\n role: z.string().max(256).nullable().optional(),\n cause: z.string().max(256).nullable().optional(),\n description: z.string().max(50000).nullable().optional(),\n startedAt: z.string().nullable().optional(),\n endedAt: z.string().nullable().optional(),\n});\n\nexport type VolunteeringWriteInput = z.infer<typeof VolunteeringWriteSchema>;\n"]}