@singi-labs/sifa-sdk 0.19.70 → 0.19.71

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.
@@ -11,11 +11,21 @@ import {
11
11
  } from "./shared.js";
12
12
  var OrgEmploymentAttestationRecordSchema = z.object({
13
13
  subject: didSchema,
14
- position: strongRefSchema,
15
- status: z.enum(["current", "past"]),
16
- title: z.string().min(1).refine(maxGraphemes(256)).max(2560),
17
- startedAt: partialDateSchema,
14
+ position: strongRefSchema.optional(),
15
+ status: z.enum([
16
+ "id.sifa.defs#employmentCurrent",
17
+ "id.sifa.defs#employmentPast",
18
+ "current",
19
+ "past"
20
+ ]),
21
+ source: z.enum(["id.sifa.defs#attestationManual", "id.sifa.defs#attestationDirectory"]).optional(),
22
+ title: z.string().min(1).refine(maxGraphemes(256)).max(2560).optional(),
23
+ startedAt: partialDateSchema.optional(),
18
24
  entityRef: uriSchema.optional(),
25
+ /**
26
+ * @deprecated The author DID is the organization. Still parsed so a record
27
+ * that carries it validates; readers must not use it for anything.
28
+ */
19
29
  companyDid: didSchema.optional(),
20
30
  endedAt: partialDateSchema.optional(),
21
31
  comment: z.string().refine(maxGraphemes(300)).max(3e3).optional(),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/org-employment-attestation.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n strongRefSchema,\n uriSchema,\n} from './shared.js';\n\n/**\n * Zod schema for `id.sifa.org.employmentAttestation` records -- an\n * organization's attestation that a person is or was employed in a specific\n * position. Lives in the org's PDS (the org is implicit: whoever owns the repo).\n *\n * The position identity is pinned via a snapshot triple (`title`, `startedAt`,\n * and the entity identifier `entityRef` | `companyDid`) so editing those pinned\n * fields on the referenced position record voids the attestation. The free-text\n * company name is never pinned (a rebrand must not invalidate the attestation).\n *\n * `startedAt` / `endedAt` mirror the position lexicon's freeform `YYYY-MM` /\n * `YYYY-MM-DD` date shape, not strict `datetime`.\n */\nexport const OrgEmploymentAttestationRecordSchema = z.object({\n subject: didSchema,\n position: strongRefSchema,\n status: z.enum(['current', 'past']),\n title: z.string().min(1).refine(maxGraphemes(256)).max(2560),\n startedAt: partialDateSchema,\n entityRef: uriSchema.optional(),\n companyDid: didSchema.optional(),\n endedAt: partialDateSchema.optional(),\n comment: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type OrgEmploymentAttestationRecord = z.infer<typeof OrgEmploymentAttestationRecordSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAeA,IAAM,uCAAuC,EAAE,OAAO;AAAA,EAC3D,SAAS;AAAA,EACT,UAAU;AAAA,EACV,QAAQ,EAAE,KAAK,CAAC,WAAW,MAAM,CAAC;AAAA,EAClC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,aAAa,GAAG,CAAC,EAAE,IAAI,IAAI;AAAA,EAC3D,WAAW;AAAA,EACX,WAAW,UAAU,SAAS;AAAA,EAC9B,YAAY,UAAU,SAAS;AAAA,EAC/B,SAAS,kBAAkB,SAAS;AAAA,EACpC,SAAS,EAAE,OAAO,EAAE,OAAO,aAAa,GAAG,CAAC,EAAE,IAAI,GAAI,EAAE,SAAS;AAAA,EACjE,QAAQ,iBAAiB,SAAS;AAAA,EAClC,WAAW;AACb,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/schemas/org-employment-attestation.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport {\n datetimeSchema,\n didSchema,\n maxGraphemes,\n partialDateSchema,\n selfLabelsSchema,\n strongRefSchema,\n uriSchema,\n} from './shared.js';\n\n/**\n * Zod schema for `id.sifa.org.employmentAttestation` records (lexicon 0.13):\n * an organization's attestation that a person is or was employed at its\n * entity. Lives in the org's PDS (the org is whoever owns the repo).\n *\n * `position`, `title` and `startedAt` are optional. The org attests\n * employment at the entity, not a job title; the snapshots let a consumer\n * notice a later edit of the position, which makes the attestation stale,\n * never void. `status` and `source` take the `id.sifa.defs` tokens; the bare\n * words are still accepted for records written before the tokens existed.\n * `companyDid` is deprecated (the author is the org) and ignored by readers.\n */\nexport const OrgEmploymentAttestationRecordSchema = z.object({\n subject: didSchema,\n position: strongRefSchema.optional(),\n status: z.enum([\n 'id.sifa.defs#employmentCurrent',\n 'id.sifa.defs#employmentPast',\n 'current',\n 'past',\n ]),\n source: z\n .enum(['id.sifa.defs#attestationManual', 'id.sifa.defs#attestationDirectory'])\n .optional(),\n title: z.string().min(1).refine(maxGraphemes(256)).max(2560).optional(),\n startedAt: partialDateSchema.optional(),\n entityRef: uriSchema.optional(),\n /**\n * @deprecated The author DID is the organization. Still parsed so a record\n * that carries it validates; readers must not use it for anything.\n */\n companyDid: didSchema.optional(),\n endedAt: partialDateSchema.optional(),\n comment: z.string().refine(maxGraphemes(300)).max(3000).optional(),\n labels: selfLabelsSchema.optional(),\n createdAt: datetimeSchema,\n});\n\nexport type OrgEmploymentAttestationRecord = z.infer<typeof OrgEmploymentAttestationRecordSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAcA,IAAM,uCAAuC,EAAE,OAAO;AAAA,EAC3D,SAAS;AAAA,EACT,UAAU,gBAAgB,SAAS;AAAA,EACnC,QAAQ,EAAE,KAAK;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAAA,EACD,QAAQ,EACL,KAAK,CAAC,kCAAkC,mCAAmC,CAAC,EAC5E,SAAS;AAAA,EACZ,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,aAAa,GAAG,CAAC,EAAE,IAAI,IAAI,EAAE,SAAS;AAAA,EACtE,WAAW,kBAAkB,SAAS;AAAA,EACtC,WAAW,UAAU,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAK9B,YAAY,UAAU,SAAS;AAAA,EAC/B,SAAS,kBAAkB,SAAS;AAAA,EACpC,SAAS,EAAE,OAAO,EAAE,OAAO,aAAa,GAAG,CAAC,EAAE,IAAI,GAAI,EAAE,SAAS;AAAA,EACjE,QAAQ,iBAAiB,SAAS;AAAA,EAClC,WAAW;AACb,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singi-labs/sifa-sdk",
3
- "version": "0.19.70",
3
+ "version": "0.19.71",
4
4
  "description": "Sifa SDK — public client library for the Sifa AppView on AT Protocol. Shared by sifa-web and sifa-app.",
5
5
  "license": "MIT",
6
6
  "type": "module",