@singi-labs/sifa-sdk 0.12.2 → 0.12.4

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 (47) hide show
  1. package/dist/{adult-content-DDGP8W1e.d.cts → adult-content-n2uy3rT3.d.cts} +31 -1
  2. package/dist/{adult-content-DDGP8W1e.d.ts → adult-content-n2uy3rT3.d.ts} +31 -1
  3. package/dist/{index-IMvNS08M.d.ts → index-BLv2bK_K.d.ts} +2 -2
  4. package/dist/{index-BS7zO7KI.d.cts → index-COjgkXRe.d.cts} +86 -3
  5. package/dist/{index-CNh-GI9A.d.cts → index-HTTNUcN4.d.cts} +2 -2
  6. package/dist/{index-iAzeLOcz.d.ts → index-tkWmoZAu.d.ts} +86 -3
  7. package/dist/index.cjs +73 -1
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +96 -5
  10. package/dist/index.d.ts +96 -5
  11. package/dist/index.js +68 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/{keys-5oyp950_.d.ts → org-BZcAnLab.d.ts} +88 -2
  14. package/dist/{keys-Bn36IA8Q.d.cts → org-lIB6pSYc.d.cts} +88 -2
  15. package/dist/org-settings-CmaSX5ZI.d.cts +74 -0
  16. package/dist/org-settings-CmaSX5ZI.d.ts +74 -0
  17. package/dist/query/fetchers/index.cjs +45 -0
  18. package/dist/query/fetchers/index.cjs.map +1 -1
  19. package/dist/query/fetchers/index.d.cts +4 -3
  20. package/dist/query/fetchers/index.d.ts +4 -3
  21. package/dist/query/fetchers/index.js +40 -1
  22. package/dist/query/fetchers/index.js.map +1 -1
  23. package/dist/query/hooks/index.cjs +118 -0
  24. package/dist/query/hooks/index.cjs.map +1 -1
  25. package/dist/query/hooks/index.d.cts +4 -3
  26. package/dist/query/hooks/index.d.ts +4 -3
  27. package/dist/query/hooks/index.js +112 -1
  28. package/dist/query/hooks/index.js.map +1 -1
  29. package/dist/query/index.cjs +122 -0
  30. package/dist/query/index.cjs.map +1 -1
  31. package/dist/query/index.d.cts +6 -5
  32. package/dist/query/index.d.ts +6 -5
  33. package/dist/query/index.js +110 -1
  34. package/dist/query/index.js.map +1 -1
  35. package/dist/schemas/index.cjs +27 -0
  36. package/dist/schemas/index.cjs.map +1 -1
  37. package/dist/schemas/index.d.cts +67 -1
  38. package/dist/schemas/index.d.ts +67 -1
  39. package/dist/schemas/index.js +26 -1
  40. package/dist/schemas/index.js.map +1 -1
  41. package/dist/schemas/write/index.cjs +161 -1
  42. package/dist/schemas/write/index.cjs.map +1 -1
  43. package/dist/schemas/write/index.d.cts +204 -8
  44. package/dist/schemas/write/index.d.ts +204 -8
  45. package/dist/schemas/write/index.js +146 -2
  46. package/dist/schemas/write/index.js.map +1 -1
  47. package/package.json +1 -1
@@ -1 +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/language.ts","../../../src/schemas/write/position.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,OA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AE,IAAI,GAAG,CAAA,CAAE,QAAA,EAAS,CAAE,QAAA,EAAS;AAAA,EAC/C,WAAA,EAAaA,MAAE,MAAA,EAAO,CAAE,IAAI,GAAK,CAAA,CAAE,QAAA,EAAS,CAAE,QAAA,EAAS;AAAA,EACvD,WAAWA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,GAAW,QAAA,EAAS;AAAA,EAC1C,SAASA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,GAAW,QAAA;AACjC,CAAC","file":"index.cjs","sourcesContent":["import { z } from '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","import { z } from 'zod';\n\nimport { 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 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\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});\n\nexport type CourseWriteInput = z.infer<typeof CourseWriteSchema>;\n","import { z } from 'zod';\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 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\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 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\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 { 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 intentionally optional to support freelancer / independent\n * employment types where the position has no employer. The current\n * `sifa-api/src/routes/schemas.ts` requires `company` (`.min(1)`); the\n * sifa-api adoption PR that consumes this schema will therefore be a\n * behavior change that unblocks the freelancer flow. The SDK's lexicon\n * schema (`ProfilePositionRecordSchema`) has treated `company` as optional\n * since sifa-sdk #184.\n */\nexport const PositionWriteSchema = z.object({\n company: z.string().min(1).max(256).nullable().optional(),\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\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 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\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 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"]}
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/org-claim.ts","../../../src/schemas/write/org-settings.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,MAA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AA,GAAW,QAAA;AACjC,CAAC","file":"index.cjs","sourcesContent":["import { z } from '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\n/**\n * Body accepted by `POST /api/org/claim` (the org claim wizard finalize).\n *\n * Mirrors `claimBodySchema` in sifa-api `src/routes/org-claim.ts` EXACTLY: the\n * editable profile fields plus `entityRefs` (at least one -- a claim without a\n * binding renders but aggregates nothing) and the `authorityAck` checkbox\n * (`literal(true)` -- the logged \"I am authorized to represent this org\"\n * assertion). `logo`/`createdAt` are NOT part of the claim body (the endpoint\n * sets `createdAt` server-side and the logo is uploaded separately).\n */\nexport const OrgClaimRequestSchema = z.object({\n name: z.string().min(1).max(2000),\n description: z.string().max(50000).optional(),\n website: z.string().max(2048).optional(),\n contact: z.string().max(320).optional(),\n entityRefs: z.array(z.string().min(1).max(2048)).min(1).max(20),\n authorityAck: z.literal(true),\n});\n\nexport type OrgClaimRequestInput = z.infer<typeof OrgClaimRequestSchema>;\n","import { z } from 'zod';\n\n/**\n * Blob-ref passthrough for the org logo. Mirrors the `blobRefSchema` validated\n * by `PUT /api/org/profile` in sifa-api `src/routes/org-settings.ts` -- the\n * shape is validated, then written to the PDS verbatim.\n */\nconst orgLogoBlobSchema = z.object({\n $type: z.literal('blob'),\n ref: z.object({ $link: z.string().min(1) }),\n mimeType: z.string().min(1).max(255),\n size: z.number().int().nonnegative(),\n});\n\n/**\n * Body accepted by `PUT /api/org/profile` (edit the org record).\n *\n * Mirrors `profileBodySchema` in sifa-api `src/routes/org-settings.ts` EXACTLY.\n * Distinct from {@link OrgClaimRequestSchema}: no `authorityAck` (already\n * asserted at claim time), and an optional `logo` blob ref (a cleared field is\n * omitted, driving the fresh-from-body PDS PUT -- no spread-merge).\n */\nexport const OrgProfileUpdateRequestSchema = z.object({\n name: z.string().min(1).max(2000),\n description: z.string().max(50000).optional(),\n website: z.string().max(2048).optional(),\n contact: z.string().max(320).optional(),\n entityRefs: z.array(z.string().min(1).max(2048)).min(1).max(20),\n logo: orgLogoBlobSchema.optional(),\n});\n\nexport type OrgProfileUpdateRequestInput = z.infer<typeof OrgProfileUpdateRequestSchema>;\n\n/**\n * Body accepted by `POST /api/org/domains/challenge` (issue a one-time DNS TXT\n * challenge). Mirrors `challengeBodySchema` in sifa-api.\n */\nexport const OrgDomainChallengeRequestSchema = z.object({\n domain: z.string().min(1).max(255),\n});\n\nexport type OrgDomainChallengeRequestInput = z.infer<typeof OrgDomainChallengeRequestSchema>;\n\n/**\n * Body accepted by `POST /api/org/domains/verify` (verify a challenge via DoH\n * TXT lookup). Mirrors `verifyBodySchema` in sifa-api.\n */\nexport const OrgDomainVerifyRequestSchema = z.object({\n token: z.string().min(1).max(2048),\n});\n\nexport type OrgDomainVerifyRequestInput = z.infer<typeof OrgDomainVerifyRequestSchema>;\n\n/**\n * Body accepted by `POST` and `DELETE /api/org/notification-emails` (add /\n * remove a notification address). Mirrors `notificationEmailBodySchema` in\n * sifa-api. The bound-domain check is server-side (the address must use a\n * domain the org controls).\n */\nexport const OrgNotificationEmailRequestSchema = z.object({\n email: z.string().email().max(320),\n});\n\nexport type OrgNotificationEmailRequestInput = z.infer<typeof OrgNotificationEmailRequestSchema>;\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"]}
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ export { O as OrgClaimRequestInput, a as OrgClaimRequestSchema, b as OrgDomainChallengeRequestInput, c as OrgDomainChallengeRequestSchema, d as OrgDomainVerifyRequestInput, e as OrgDomainVerifyRequestSchema, f as OrgNotificationEmailRequestInput, g as OrgNotificationEmailRequestSchema, h as OrgProfileUpdateRequestInput, i as OrgProfileUpdateRequestSchema } from '../../org-settings-CmaSX5ZI.cjs';
2
3
 
3
4
  /** Prepend `https://` if no scheme is present. */
4
5
  declare function normalizeUrl(val: string): string;
@@ -47,11 +48,56 @@ declare const skillRefSchema: z.ZodObject<{
47
48
  */
48
49
  declare const VALID_PLATFORMS: readonly ["rss", "fediverse", "twitter", "instagram", "github", "codeberg", "gitlab", "forgejo", "gitea", "youtube", "linkedin", "substack", "website", "orcid", "keyoxide", "other"];
49
50
  type ValidPlatform = (typeof VALID_PLATFORMS)[number];
51
+ /**
52
+ * Returns `input` when it is an http(s) URL string, else `null`. Blocks
53
+ * dangerous schemes (`javascript:`, `data:`, etc.) from being stored and
54
+ * later rendered.
55
+ */
56
+ declare function httpUrlOrNull(input: unknown): string | null;
57
+ /**
58
+ * Strict calendar-date validator. Returns `true` for `YYYY-MM-DD` strings
59
+ * that name a real day, rejecting impossible values (`2024-02-30`, `2024-13-01`)
60
+ * by requiring the JavaScript `Date` round-trip to preserve the input.
61
+ */
62
+ declare function isValidDateOnly(input: unknown): boolean;
63
+ /**
64
+ * Portable org entity identifier (Wikidata / ROR / LEI / sifa.id URI) chosen
65
+ * from the typeahead. Constrained to http(s) so a script-bearing scheme can't
66
+ * be written to the PDS record. Absent for free-text / unlinked records.
67
+ * Shared by the org-bearing sections (position, education, certification,
68
+ * volunteering, course, honor).
69
+ */
70
+ declare const entityRefSchema: z.ZodOptional<z.ZodString>;
71
+ /**
72
+ * One proof link on an involvement record (`id.sifa.defs#artifactLink`).
73
+ * Only http(s) URLs are accepted so a dangerous scheme is never written to
74
+ * the PDS.
75
+ */
76
+ declare const artifactLinkSchema: z.ZodObject<{
77
+ url: z.ZodString;
78
+ kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ }, z.core.$strip>;
81
+ /**
82
+ * Reference to a record by at-uri, with an optional CID
83
+ * (`id.sifa.defs#externalRecordRef`).
84
+ */
85
+ declare const externalRecordRefSchema: z.ZodObject<{
86
+ uri: z.ZodString;
87
+ cid: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strip>;
89
+ /** Link attached to a presentation record. */
90
+ declare const presentationLinkSchema: z.ZodObject<{
91
+ uri: z.ZodString;
92
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ }, z.core.$strip>;
50
95
 
51
96
  /** Schema enforced by the generic-record write endpoint for `id.sifa.profile.certification`. */
52
97
  declare const CertificationWriteSchema: z.ZodObject<{
53
98
  name: z.ZodString;
54
99
  authority: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ entityRef: z.ZodOptional<z.ZodString>;
55
101
  credentialId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
102
  credentialUrl: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
57
103
  issuedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -64,12 +110,16 @@ declare const CourseWriteSchema: z.ZodObject<{
64
110
  name: z.ZodString;
65
111
  number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
112
  institution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ entityRef: z.ZodOptional<z.ZodString>;
114
+ credential: z.ZodOptional<z.ZodNullable<z.ZodString>>;
115
+ completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
116
  }, z.core.$strip>;
68
117
  type CourseWriteInput = z.infer<typeof CourseWriteSchema>;
69
118
 
70
119
  /** Schema enforced by `POST /profile/education` on sifa-api. */
71
120
  declare const EducationWriteSchema: z.ZodObject<{
72
121
  institution: z.ZodString;
122
+ entityRef: z.ZodOptional<z.ZodString>;
73
123
  degree: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
124
  fieldOfStudy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
125
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -109,11 +159,51 @@ type ExternalAccountWriteInput = z.infer<typeof ExternalAccountWriteSchema>;
109
159
  declare const HonorWriteSchema: z.ZodObject<{
110
160
  title: z.ZodString;
111
161
  issuer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
+ entityRef: z.ZodOptional<z.ZodString>;
112
163
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
164
  awardedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
165
  }, z.core.$strip>;
115
166
  type HonorWriteInput = z.infer<typeof HonorWriteSchema>;
116
167
 
168
+ /**
169
+ * Schema enforced by the generic-record write endpoint for `id.sifa.profile.involvement`.
170
+ *
171
+ * Represents contribution to an upstream project or community
172
+ * (open-source maintainership, community volunteering, etc.). `upstream` /
173
+ * `upstreamDid` / `upstreamUrl` describe what the user contributed to;
174
+ * `links` collect proof artifacts.
175
+ */
176
+ declare const InvolvementWriteSchema: z.ZodObject<{
177
+ kind: z.ZodString;
178
+ upstream: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
+ upstreamDid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
+ upstreamUrl: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
181
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
+ endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
185
+ links: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
186
+ url: z.ZodString;
187
+ kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
188
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
+ }, z.core.$strip>>>>;
190
+ entityRef: z.ZodOptional<z.ZodString>;
191
+ location: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
192
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
193
+ countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
194
+ region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
195
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
+ locality: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
+ street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
+ postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
+ }, z.core.$strip>, z.ZodString]>>>;
201
+ skills: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
202
+ uri: z.ZodString;
203
+ }, z.core.$strip>>>>;
204
+ }, z.core.$strip>;
205
+ type InvolvementWriteInput = z.infer<typeof InvolvementWriteSchema>;
206
+
117
207
  /** Schema enforced by the generic-record write endpoint for `id.sifa.profile.language`. */
118
208
  declare const LanguageWriteSchema: z.ZodObject<{
119
209
  name: z.ZodString;
@@ -121,6 +211,52 @@ declare const LanguageWriteSchema: z.ZodObject<{
121
211
  }, z.core.$strip>;
122
212
  type LanguageWriteInput = z.infer<typeof LanguageWriteSchema>;
123
213
 
214
+ /**
215
+ * Schema enforced by the org-employment-attestation write endpoint on sifa-api.
216
+ *
217
+ * An org attests that a Sifa user (`subject`) held a specific `position` record
218
+ * with `title` between `startedAt` and `endedAt` (inclusive of "current" status).
219
+ * The attestation itself is signed by the org's DID; `entityRef` / `companyDid`
220
+ * optionally cross-link the org identifier(s) used at the time.
221
+ */
222
+ declare const OrgEmploymentAttestationWriteSchema: z.ZodObject<{
223
+ subject: z.ZodString;
224
+ position: z.ZodObject<{
225
+ uri: z.ZodString;
226
+ cid: z.ZodOptional<z.ZodString>;
227
+ }, z.core.$strip>;
228
+ status: z.ZodEnum<{
229
+ current: "current";
230
+ past: "past";
231
+ }>;
232
+ title: z.ZodString;
233
+ startedAt: z.ZodString;
234
+ entityRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
+ companyDid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
+ endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
+ createdAt: z.ZodString;
239
+ }, z.core.$strip>;
240
+ type OrgEmploymentAttestationWriteInput = z.infer<typeof OrgEmploymentAttestationWriteSchema>;
241
+
242
+ /**
243
+ * Schema enforced by the org-profile write endpoint on sifa-api.
244
+ *
245
+ * Sifa-managed org identity: name + description + contact channel plus
246
+ * `entityRefs` linking the org to portable identifiers (Wikidata / ROR /
247
+ * LEI / sifa.id URI, http(s) enforced elsewhere).
248
+ */
249
+ declare const OrgProfileWriteSchema: z.ZodObject<{
250
+ name: z.ZodString;
251
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
252
+ logo: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
253
+ website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
254
+ entityRefs: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
255
+ contact: z.ZodOptional<z.ZodNullable<z.ZodString>>;
256
+ createdAt: z.ZodString;
257
+ }, z.core.$strip>;
258
+ type OrgProfileWriteInput = z.infer<typeof OrgProfileWriteSchema>;
259
+
124
260
  /**
125
261
  * Schema enforced by `POST /profile/positions` on sifa-api.
126
262
  *
@@ -129,16 +265,14 @@ type LanguageWriteInput = z.infer<typeof LanguageWriteSchema>;
129
265
  * round-trip. If it passes here, the API will accept the write modulo
130
266
  * transport / auth failures.
131
267
  *
132
- * `company` is intentionally optional to support freelancer / independent
133
- * employment types where the position has no employer. The current
134
- * `sifa-api/src/routes/schemas.ts` requires `company` (`.min(1)`); the
135
- * sifa-api adoption PR that consumes this schema will therefore be a
136
- * behavior change that unblocks the freelancer flow. The SDK's lexicon
137
- * schema (`ProfilePositionRecordSchema`) has treated `company` as optional
138
- * since sifa-sdk #184.
268
+ * `company` is optional to support freelancer / independent employment types
269
+ * where the position has no employer. This matches sifa-api's current
270
+ * behavior in `src/routes/schemas.ts` and the SDK's lexicon schema
271
+ * (`ProfilePositionRecordSchema`) since sifa-sdk #184.
139
272
  */
140
273
  declare const PositionWriteSchema: z.ZodObject<{
141
274
  company: z.ZodOptional<z.ZodNullable<z.ZodString>>;
275
+ entityRef: z.ZodOptional<z.ZodString>;
142
276
  title: z.ZodString;
143
277
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
278
  employmentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -161,6 +295,66 @@ declare const PositionWriteSchema: z.ZodObject<{
161
295
  }, z.core.$strip>;
162
296
  type PositionWriteInput = z.infer<typeof PositionWriteSchema>;
163
297
 
298
+ /**
299
+ * Schema enforced by the generic-record write endpoint for `id.sifa.profile.presentationDelivery`.
300
+ *
301
+ * Records a specific delivery of a presentation (e.g., at a conference).
302
+ * `presentationRef` optionally points at the parent `id.sifa.profile.presentation`
303
+ * record; `eventRef` optionally links a Sifa event record; `coSpeakers` are
304
+ * DIDs of people who delivered alongside the profile owner.
305
+ */
306
+ declare const PresentationDeliveryWriteSchema: z.ZodObject<{
307
+ presentationRef: z.ZodOptional<z.ZodObject<{
308
+ uri: z.ZodString;
309
+ cid: z.ZodOptional<z.ZodString>;
310
+ }, z.core.$strip>>;
311
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
312
+ role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
313
+ eventName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
314
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
315
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
+ mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
318
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
319
+ uri: z.ZodString;
320
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
321
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
322
+ }, z.core.$strip>>>;
323
+ eventRef: z.ZodOptional<z.ZodObject<{
324
+ uri: z.ZodString;
325
+ cid: z.ZodOptional<z.ZodString>;
326
+ }, z.core.$strip>>;
327
+ coSpeakers: z.ZodOptional<z.ZodArray<z.ZodString>>;
328
+ }, z.core.$strip>;
329
+ type PresentationDeliveryWriteInput = z.infer<typeof PresentationDeliveryWriteSchema>;
330
+
331
+ /**
332
+ * Schema enforced by the generic-record write endpoint for `id.sifa.profile.presentation`.
333
+ *
334
+ * Describes a talk / presentation the user can give. `duration` bounds the
335
+ * runtime; `intendedAudiences` names who it's aimed at; `writeupRef` is an
336
+ * optional at-uri pointer to a companion writeup record.
337
+ */
338
+ declare const PresentationWriteSchema: z.ZodObject<{
339
+ title: z.ZodString;
340
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
341
+ duration: z.ZodOptional<z.ZodObject<{
342
+ minMinutes: z.ZodNumber;
343
+ maxMinutes: z.ZodOptional<z.ZodNumber>;
344
+ }, z.core.$strip>>;
345
+ intendedAudiences: z.ZodOptional<z.ZodArray<z.ZodString>>;
346
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
347
+ uri: z.ZodString;
348
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
349
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
350
+ }, z.core.$strip>>>;
351
+ writeupRef: z.ZodOptional<z.ZodObject<{
352
+ uri: z.ZodString;
353
+ cid: z.ZodOptional<z.ZodString>;
354
+ }, z.core.$strip>>;
355
+ }, z.core.$strip>;
356
+ type PresentationWriteInput = z.infer<typeof PresentationWriteSchema>;
357
+
164
358
  /**
165
359
  * Schema enforced by `POST /profile/locations` on sifa-api.
166
360
  *
@@ -246,6 +440,7 @@ type ProjectWriteInput = z.infer<typeof ProjectWriteSchema>;
246
440
  /** Schema enforced by the generic-record write endpoint for `id.sifa.profile.publication`. */
247
441
  declare const PublicationWriteSchema: z.ZodObject<{
248
442
  title: z.ZodString;
443
+ subtitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
249
444
  publisher: z.ZodOptional<z.ZodNullable<z.ZodString>>;
250
445
  url: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
251
446
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -263,6 +458,7 @@ type SkillWriteInput = z.infer<typeof SkillWriteSchema>;
263
458
  /** Schema enforced by the generic-record write endpoint for `id.sifa.profile.volunteering`. */
264
459
  declare const VolunteeringWriteSchema: z.ZodObject<{
265
460
  organization: z.ZodString;
461
+ entityRef: z.ZodOptional<z.ZodString>;
266
462
  role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
267
463
  cause: z.ZodOptional<z.ZodNullable<z.ZodString>>;
268
464
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -271,4 +467,4 @@ declare const VolunteeringWriteSchema: z.ZodObject<{
271
467
  }, z.core.$strip>;
272
468
  type VolunteeringWriteInput = z.infer<typeof VolunteeringWriteSchema>;
273
469
 
274
- export { type CertificationWriteInput, CertificationWriteSchema, type CourseWriteInput, CourseWriteSchema, type EducationWriteInput, EducationWriteSchema, type ExternalAccountWriteInput, ExternalAccountWriteSchema, type HonorWriteInput, HonorWriteSchema, type LanguageWriteInput, LanguageWriteSchema, type PositionWriteInput, PositionWriteSchema, type ProfileLocationWriteInput, ProfileLocationWriteSchema, type ProfileSelfWriteInput, ProfileSelfWriteSchema, type ProjectWriteInput, ProjectWriteSchema, type PublicationWriteInput, PublicationWriteSchema, type SkillWriteInput, SkillWriteSchema, VALID_PLATFORMS, type ValidPlatform, type VolunteeringWriteInput, VolunteeringWriteSchema, normalizeUrl, optionalUrl, skillRefSchema, writeLocationSchema };
470
+ export { type CertificationWriteInput, CertificationWriteSchema, type CourseWriteInput, CourseWriteSchema, type EducationWriteInput, EducationWriteSchema, type ExternalAccountWriteInput, ExternalAccountWriteSchema, type HonorWriteInput, HonorWriteSchema, type InvolvementWriteInput, InvolvementWriteSchema, type LanguageWriteInput, LanguageWriteSchema, type OrgEmploymentAttestationWriteInput, OrgEmploymentAttestationWriteSchema, type OrgProfileWriteInput, OrgProfileWriteSchema, type PositionWriteInput, PositionWriteSchema, type PresentationDeliveryWriteInput, PresentationDeliveryWriteSchema, type PresentationWriteInput, PresentationWriteSchema, type ProfileLocationWriteInput, ProfileLocationWriteSchema, type ProfileSelfWriteInput, ProfileSelfWriteSchema, type ProjectWriteInput, ProjectWriteSchema, type PublicationWriteInput, PublicationWriteSchema, type SkillWriteInput, SkillWriteSchema, VALID_PLATFORMS, type ValidPlatform, type VolunteeringWriteInput, VolunteeringWriteSchema, artifactLinkSchema, entityRefSchema, externalRecordRefSchema, httpUrlOrNull, isValidDateOnly, normalizeUrl, optionalUrl, presentationLinkSchema, skillRefSchema, writeLocationSchema };