@singi-labs/sifa-sdk 0.20.2 → 0.22.0

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 (65) hide show
  1. package/dist/index.cjs +6 -92
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +3 -16
  4. package/dist/index.d.ts +3 -16
  5. package/dist/index.js +2 -7
  6. package/dist/index.js.map +1 -1
  7. package/dist/query/fetchers/index.cjs +33 -75
  8. package/dist/query/fetchers/index.cjs.map +1 -1
  9. package/dist/query/fetchers/index.d.cts +1 -1
  10. package/dist/query/fetchers/index.d.ts +1 -1
  11. package/dist/query/fetchers/index.js +1 -9
  12. package/dist/query/fetchers/index.js.map +1 -1
  13. package/dist/query/fetchers/roadmap.js +34 -71
  14. package/dist/query/fetchers/roadmap.js.map +1 -1
  15. package/dist/query/hooks/index.cjs +24 -135
  16. package/dist/query/hooks/index.cjs.map +1 -1
  17. package/dist/query/hooks/index.d.cts +2 -2
  18. package/dist/query/hooks/index.d.ts +2 -2
  19. package/dist/query/hooks/index.js +1 -11
  20. package/dist/query/hooks/index.js.map +1 -1
  21. package/dist/query/hooks/use-roadmap-mutations.js +5 -63
  22. package/dist/query/hooks/use-roadmap-mutations.js.map +1 -1
  23. package/dist/query/index.cjs +35 -150
  24. package/dist/query/index.cjs.map +1 -1
  25. package/dist/query/index.d.cts +3 -3
  26. package/dist/query/index.d.ts +3 -3
  27. package/dist/query/index.js +2 -17
  28. package/dist/query/index.js.map +1 -1
  29. package/dist/query/keys.js +0 -5
  30. package/dist/query/keys.js.map +1 -1
  31. package/dist/roadmap/index.js +0 -91
  32. package/dist/roadmap/index.js.map +1 -1
  33. package/dist/schemas/write/certification.js +3 -3
  34. package/dist/schemas/write/certification.js.map +1 -1
  35. package/dist/schemas/write/course.js +5 -10
  36. package/dist/schemas/write/course.js.map +1 -1
  37. package/dist/schemas/write/education.js +3 -3
  38. package/dist/schemas/write/education.js.map +1 -1
  39. package/dist/schemas/write/honor.js +2 -2
  40. package/dist/schemas/write/honor.js.map +1 -1
  41. package/dist/schemas/write/index.cjs +25 -26
  42. package/dist/schemas/write/index.cjs.map +1 -1
  43. package/dist/schemas/write/index.d.cts +19 -19
  44. package/dist/schemas/write/index.d.ts +19 -19
  45. package/dist/schemas/write/investment.js +3 -3
  46. package/dist/schemas/write/investment.js.map +1 -1
  47. package/dist/schemas/write/involvement.js +3 -3
  48. package/dist/schemas/write/involvement.js.map +1 -1
  49. package/dist/schemas/write/position.js +8 -3
  50. package/dist/schemas/write/position.js.map +1 -1
  51. package/dist/schemas/write/project.js +3 -3
  52. package/dist/schemas/write/project.js.map +1 -1
  53. package/dist/schemas/write/publication.js +2 -2
  54. package/dist/schemas/write/publication.js.map +1 -1
  55. package/dist/schemas/write/shared.js +6 -0
  56. package/dist/schemas/write/shared.js.map +1 -1
  57. package/dist/schemas/write/volunteering.js +3 -3
  58. package/dist/schemas/write/volunteering.js.map +1 -1
  59. package/dist/{use-user-settings-Cq_AHkkM.d.cts → use-user-settings-Bn6g8bgr.d.cts} +7 -22
  60. package/dist/{use-user-settings-DoNP3tNl.d.ts → use-user-settings-DQ6Dyby7.d.ts} +7 -22
  61. package/dist/{user-settings-CBtacio1.d.ts → user-settings-BdNrDa9O.d.ts} +16 -50
  62. package/dist/{user-settings-DDP76dZH.d.cts → user-settings-C8JUD4DM.d.cts} +16 -50
  63. package/package.json +1 -1
  64. package/dist/query/hooks/use-roadmap.js +0 -31
  65. package/dist/query/hooks/use-roadmap.js.map +0 -1
@@ -111,8 +111,8 @@ declare const CertificationWriteSchema: z.ZodObject<{
111
111
  entityRef: z.ZodOptional<z.ZodString>;
112
112
  credentialId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
113
  credentialUrl: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
114
- issuedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
115
- expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
+ issuedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
115
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
116
116
  }, z.core.$strip>;
117
117
  type CertificationWriteInput = z.infer<typeof CertificationWriteSchema>;
118
118
 
@@ -123,10 +123,10 @@ declare const CourseWriteSchema: z.ZodObject<{
123
123
  institution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
124
  entityRef: z.ZodOptional<z.ZodString>;
125
125
  credential: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
- completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ completedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
127
127
  role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
128
- startedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
- endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
128
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
129
+ endedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
130
130
  position: z.ZodOptional<z.ZodNullable<z.ZodString>>;
131
131
  education: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
132
  }, z.core.$strip>;
@@ -141,8 +141,8 @@ declare const EducationWriteSchema: z.ZodObject<{
141
141
  eqfLevel: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
142
142
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
143
143
  activities: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
- startedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
145
- endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
145
+ endedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
146
146
  }, z.core.$strip>;
147
147
  type EducationWriteInput = z.infer<typeof EducationWriteSchema>;
148
148
 
@@ -178,7 +178,7 @@ declare const HonorWriteSchema: z.ZodObject<{
178
178
  issuer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
179
  entityRef: z.ZodOptional<z.ZodString>;
180
180
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
- awardedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
+ awardedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
182
182
  }, z.core.$strip>;
183
183
  type HonorWriteInput = z.infer<typeof HonorWriteSchema>;
184
184
 
@@ -197,8 +197,8 @@ declare const InvolvementWriteSchema: z.ZodObject<{
197
197
  upstreamUrl: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
198
198
  role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
199
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
- startedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
201
- endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
201
+ endedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
202
202
  links: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
203
203
  url: z.ZodString;
204
204
  kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -254,8 +254,8 @@ declare const InvestmentWriteSchema: z.ZodObject<{
254
254
  value: z.ZodNumber;
255
255
  currency: z.ZodString;
256
256
  }, z.core.$strip>>>;
257
- startedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
- endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
257
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
258
+ endedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
259
259
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
260
  links: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
261
261
  url: z.ZodString;
@@ -371,8 +371,8 @@ declare const PositionWriteSchema: z.ZodObject<{
371
371
  postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
372
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
373
373
  }, z.core.$strip>, z.ZodString]>>>;
374
- startedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
375
- endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
374
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
375
+ endedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
376
376
  skills: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
377
377
  uri: z.ZodString;
378
378
  }, z.core.$strip>>>>;
@@ -563,8 +563,8 @@ declare const ProjectWriteSchema: z.ZodObject<{
563
563
  }, z.core.$strip>;
564
564
  role: z.ZodOptional<z.ZodString>;
565
565
  }, z.core.$strip>>>;
566
- startedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
567
- endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
566
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
567
+ endedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
568
568
  }, z.core.$strip>;
569
569
  type ProjectWriteInput = z.infer<typeof ProjectWriteSchema>;
570
570
 
@@ -612,7 +612,7 @@ declare const PublicationWriteSchema: z.ZodObject<{
612
612
  publisher: z.ZodOptional<z.ZodNullable<z.ZodString>>;
613
613
  url: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
614
614
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
615
- publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
615
+ publishedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
616
616
  authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
617
617
  name: z.ZodString;
618
618
  did: z.ZodOptional<z.ZodString>;
@@ -654,8 +654,8 @@ declare const VolunteeringWriteSchema: z.ZodObject<{
654
654
  role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
655
655
  cause: z.ZodOptional<z.ZodNullable<z.ZodString>>;
656
656
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
657
- startedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
658
- endedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
657
+ startedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
658
+ endedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
659
659
  }, z.core.$strip>;
660
660
  type VolunteeringWriteInput = z.infer<typeof VolunteeringWriteSchema>;
661
661
 
@@ -1,6 +1,6 @@
1
1
  // src/schemas/write/investment.ts
2
2
  import { z } from "zod";
3
- import { artifactLinkSchema, entityRefSchema } from "./shared.js";
3
+ import { artifactLinkSchema, entityRefSchema, partialDateFieldSchema } from "./shared.js";
4
4
  var InvestmentWriteSchema = z.object({
5
5
  /** For a limited-partner entry this names the fund, not a portfolio company. */
6
6
  company: z.string().min(1).max(256),
@@ -21,8 +21,8 @@ var InvestmentWriteSchema = z.object({
21
21
  value: z.number().int().min(0),
22
22
  currency: z.string().length(3)
23
23
  }).nullable().optional(),
24
- startedAt: z.string().nullable().optional(),
25
- endedAt: z.string().nullable().optional(),
24
+ startedAt: partialDateFieldSchema,
25
+ endedAt: partialDateFieldSchema,
26
26
  description: z.string().max(5e4).nullable().optional(),
27
27
  links: z.array(artifactLinkSchema).max(50).nullable().optional()
28
28
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schemas/write/investment.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { artifactLinkSchema, entityRefSchema } from './shared.js';\n\n/**\n * Schema enforced by `POST /profile/investment` on sifa-api.\n *\n * An investment is capital the person put in. Roles with duties -- board seats,\n * advisory work -- are positions and use `PositionWriteSchema` instead.\n *\n * Every optional field is nullable so a client can clear it. Omitting a field on\n * update leaves the stored value in place, which would let a corrected status or a\n * withdrawn amount silently persist.\n */\nexport const InvestmentWriteSchema = z.object({\n /** For a limited-partner entry this names the fund, not a portfolio company. */\n company: z.string().min(1).max(256),\n companyDid: z.string().max(256).nullable().optional(),\n entityRef: entityRefSchema.nullable(),\n role: z.string().max(256).nullable().optional(),\n stage: z.string().max(256).nullable().optional(),\n status: z.string().max(256).nullable().optional(),\n via: z.string().max(256).nullable().optional(),\n viaDid: z.string().max(256).nullable().optional(),\n viaEntityRef: entityRefSchema.nullable(),\n /**\n * Optional and empty by default -- cheque size is a personal financial disclosure.\n * Structured rather than free text: an unparseable money string cannot be repaired\n * once people have written them.\n */\n amount: z\n .object({\n value: z.number().int().min(0),\n currency: z.string().length(3),\n })\n .nullable()\n .optional(),\n startedAt: z.string().nullable().optional(),\n endedAt: z.string().nullable().optional(),\n description: z.string().max(50000).nullable().optional(),\n links: z.array(artifactLinkSchema).max(50).nullable().optional(),\n});\n\nexport type InvestmentWriteInput = z.infer<typeof InvestmentWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,oBAAoB,uBAAuB;AAY7C,IAAM,wBAAwB,EAAE,OAAO;AAAA;AAAA,EAE5C,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAClC,YAAY,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACpD,WAAW,gBAAgB,SAAS;AAAA,EACpC,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC/C,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAChD,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC7C,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAChD,cAAc,gBAAgB,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvC,QAAQ,EACL,OAAO;AAAA,IACN,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC;AAAA,IAC7B,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC;AAAA,EAC/B,CAAC,EACA,SAAS,EACT,SAAS;AAAA,EACZ,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC1C,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EACxC,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,OAAO,EAAE,MAAM,kBAAkB,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AACjE,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/schemas/write/investment.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { artifactLinkSchema, entityRefSchema, partialDateFieldSchema } from './shared.js';\n\n/**\n * Schema enforced by `POST /profile/investment` on sifa-api.\n *\n * An investment is capital the person put in. Roles with duties -- board seats,\n * advisory work -- are positions and use `PositionWriteSchema` instead.\n *\n * Every optional field is nullable so a client can clear it. Omitting a field on\n * update leaves the stored value in place, which would let a corrected status or a\n * withdrawn amount silently persist.\n */\nexport const InvestmentWriteSchema = z.object({\n /** For a limited-partner entry this names the fund, not a portfolio company. */\n company: z.string().min(1).max(256),\n companyDid: z.string().max(256).nullable().optional(),\n entityRef: entityRefSchema.nullable(),\n role: z.string().max(256).nullable().optional(),\n stage: z.string().max(256).nullable().optional(),\n status: z.string().max(256).nullable().optional(),\n via: z.string().max(256).nullable().optional(),\n viaDid: z.string().max(256).nullable().optional(),\n viaEntityRef: entityRefSchema.nullable(),\n /**\n * Optional and empty by default -- cheque size is a personal financial disclosure.\n * Structured rather than free text: an unparseable money string cannot be repaired\n * once people have written them.\n */\n amount: z\n .object({\n value: z.number().int().min(0),\n currency: z.string().length(3),\n })\n .nullable()\n .optional(),\n startedAt: partialDateFieldSchema,\n endedAt: partialDateFieldSchema,\n description: z.string().max(50000).nullable().optional(),\n links: z.array(artifactLinkSchema).max(50).nullable().optional(),\n});\n\nexport type InvestmentWriteInput = z.infer<typeof InvestmentWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,oBAAoB,iBAAiB,8BAA8B;AAYrE,IAAM,wBAAwB,EAAE,OAAO;AAAA;AAAA,EAE5C,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAClC,YAAY,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACpD,WAAW,gBAAgB,SAAS;AAAA,EACpC,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC/C,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAChD,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC7C,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAChD,cAAc,gBAAgB,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvC,QAAQ,EACL,OAAO;AAAA,IACN,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC;AAAA,IAC7B,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC;AAAA,EAC/B,CAAC,EACA,SAAS,EACT,SAAS;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,OAAO,EAAE,MAAM,kBAAkB,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AACjE,CAAC;","names":[]}
@@ -6,6 +6,7 @@ import {
6
6
  entityRefSchema,
7
7
  externalRecordRefSchema,
8
8
  optionalUrl,
9
+ partialDateFieldSchema,
9
10
  skillRefSchema,
10
11
  writeLocationSchema
11
12
  } from "./shared.js";
@@ -16,9 +17,8 @@ var InvolvementWriteSchema = z.object({
16
17
  upstreamUrl: optionalUrl(),
17
18
  role: z.string().max(2560).nullable().optional(),
18
19
  description: z.string().max(5e4).nullable().optional(),
19
- // Freeform YYYY / YYYY-MM / YYYY-MM-DD; validated loosely so partial dates pass.
20
- startedAt: z.string().max(32).nullable().optional(),
21
- endedAt: z.string().max(32).nullable().optional(),
20
+ startedAt: partialDateFieldSchema,
21
+ endedAt: partialDateFieldSchema,
22
22
  links: z.array(artifactLinkSchema).max(50).nullable().optional(),
23
23
  /** Other people who worked on this alongside you. Same shape as project members. */
24
24
  collaborators: z.array(projectMemberWriteSchema).max(50).optional(),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schemas/write/involvement.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { projectMemberWriteSchema } from './project.js';\n\nimport {\n artifactLinkSchema,\n entityRefSchema,\n externalRecordRefSchema,\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 /** Other people who worked on this alongside you. Same shape as project members. */\n collaborators: z.array(projectMemberWriteSchema).max(50).optional(),\n /** The same involvement as recorded on another person's profile. */\n sameAs: externalRecordRefSchema.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"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,gCAAgC;AAEzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAC/B,UAAU,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,aAAa,EACV,OAAO,EACP,MAAM,uBAAuB,eAAe,EAC5C,SAAS,EACT,SAAS;AAAA,EACZ,aAAa,YAAY;AAAA,EACzB,MAAM,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EAC/C,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA,EAEvD,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAAA,EAClD,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAAA,EAChD,OAAO,EAAE,MAAM,kBAAkB,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA,EAE/D,eAAe,EAAE,MAAM,wBAAwB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAElE,QAAQ,wBAAwB,SAAS;AAAA,EACzC,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ,EAAE,MAAM,cAAc,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAC9D,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/schemas/write/involvement.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { projectMemberWriteSchema } from './project.js';\n\nimport {\n artifactLinkSchema,\n entityRefSchema,\n externalRecordRefSchema,\n optionalUrl,\n partialDateFieldSchema,\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 startedAt: partialDateFieldSchema,\n endedAt: partialDateFieldSchema,\n links: z.array(artifactLinkSchema).max(50).nullable().optional(),\n /** Other people who worked on this alongside you. Same shape as project members. */\n collaborators: z.array(projectMemberWriteSchema).max(50).optional(),\n /** The same involvement as recorded on another person's profile. */\n sameAs: externalRecordRefSchema.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"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,gCAAgC;AAEzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAC/B,UAAU,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,aAAa,EACV,OAAO,EACP,MAAM,uBAAuB,eAAe,EAC5C,SAAS,EACT,SAAS;AAAA,EACZ,aAAa,YAAY;AAAA,EACzB,MAAM,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EAC/C,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO,EAAE,MAAM,kBAAkB,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA,EAE/D,eAAe,EAAE,MAAM,wBAAwB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAElE,QAAQ,wBAAwB,SAAS;AAAA,EACzC,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ,EAAE,MAAM,cAAc,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAC9D,CAAC;","names":[]}
@@ -1,6 +1,11 @@
1
1
  // src/schemas/write/position.ts
2
2
  import { z } from "zod";
3
- import { entityRefSchema, skillRefSchema, writeLocationSchema } from "./shared.js";
3
+ import {
4
+ entityRefSchema,
5
+ partialDateFieldSchema,
6
+ skillRefSchema,
7
+ writeLocationSchema
8
+ } from "./shared.js";
4
9
  var PositionWriteSchema = z.object({
5
10
  company: z.string().min(1).max(256).nullable().optional(),
6
11
  entityRef: entityRefSchema,
@@ -14,8 +19,8 @@ var PositionWriteSchema = z.object({
14
19
  onBehalfOfEntityRef: entityRefSchema.nullable(),
15
20
  workplaceType: z.string().nullable().optional(),
16
21
  location: writeLocationSchema,
17
- startedAt: z.string().nullable().optional(),
18
- endedAt: z.string().nullable().optional(),
22
+ startedAt: partialDateFieldSchema,
23
+ endedAt: partialDateFieldSchema,
19
24
  skills: z.array(skillRefSchema).max(50).nullable().optional()
20
25
  });
21
26
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schemas/write/position.ts"],"sourcesContent":["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 // Held-on-behalf-of disclosure for board and advisory roles. Nullable so a client\n // can clear it when a seat stops being a representative one.\n onBehalfOf: z.string().max(256).nullable().optional(),\n onBehalfOfDid: z.string().max(256).nullable().optional(),\n onBehalfOfEntityRef: entityRefSchema.nullable(),\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"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,iBAAiB,gBAAgB,2BAA2B;AAe9D,IAAM,sBAAsB,EAAE,OAAO;AAAA,EAC1C,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACxD,WAAW;AAAA,EACX,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAChC,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA;AAAA,EAG/C,YAAY,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACpD,eAAe,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,qBAAqB,gBAAgB,SAAS;AAAA,EAC9C,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC1C,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EACxC,QAAQ,EAAE,MAAM,cAAc,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAC9D,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/schemas/write/position.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport {\n entityRefSchema,\n partialDateFieldSchema,\n skillRefSchema,\n writeLocationSchema,\n} 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 // Held-on-behalf-of disclosure for board and advisory roles. Nullable so a client\n // can clear it when a seat stops being a representative one.\n onBehalfOf: z.string().max(256).nullable().optional(),\n onBehalfOfDid: z.string().max(256).nullable().optional(),\n onBehalfOfEntityRef: entityRefSchema.nullable(),\n workplaceType: z.string().nullable().optional(),\n location: writeLocationSchema,\n startedAt: partialDateFieldSchema,\n endedAt: partialDateFieldSchema,\n skills: z.array(skillRefSchema).max(50).nullable().optional(),\n});\n\nexport type PositionWriteInput = z.infer<typeof PositionWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAeA,IAAM,sBAAsB,EAAE,OAAO;AAAA,EAC1C,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACxD,WAAW;AAAA,EACX,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAChC,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA;AAAA,EAG/C,YAAY,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACpD,eAAe,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,qBAAqB,gBAAgB,SAAS;AAAA,EAC9C,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ,EAAE,MAAM,cAAc,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAC9D,CAAC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  // src/schemas/write/project.ts
2
2
  import { z } from "zod";
3
- import { externalRecordRefSchema, optionalUrl } from "./shared.js";
3
+ import { externalRecordRefSchema, optionalUrl, partialDateFieldSchema } from "./shared.js";
4
4
  var projectMemberWriteSchema = z.object({
5
5
  did: z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID"),
6
6
  role: z.string().max(256).nullable().optional(),
@@ -23,8 +23,8 @@ var ProjectWriteSchema = z.object({
23
23
  sameAs: externalRecordRefSchema.optional(),
24
24
  /** Calendar events this project organized or hosted. An empty list clears them. */
25
25
  events: z.array(projectEventWriteSchema).max(200).optional(),
26
- startedAt: z.string().nullable().optional(),
27
- endedAt: z.string().nullable().optional()
26
+ startedAt: partialDateFieldSchema,
27
+ endedAt: partialDateFieldSchema
28
28
  });
29
29
  export {
30
30
  ProjectWriteSchema,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schemas/write/project.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { externalRecordRefSchema, optionalUrl } from './shared.js';\n\n/**\n * A person named as a member of the project. Naming someone is a claim: they\n * render as a bare handle until they publish an `id.sifa.confirmation`, and\n * confirming never puts this record on their profile. `role` is display only.\n */\nexport const projectMemberWriteSchema = z.object({\n did: z.string().regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID'),\n role: z.string().max(256).nullable().optional(),\n title: z.string().max(1280).nullable().optional(),\n});\n\n/**\n * One calendar event the project organized or hosted (lexicon `#projectEvent`).\n * `role` is the user's role at this occurrence when it differs from the\n * project's role.\n */\nexport const projectEventWriteSchema = z.object({\n event: externalRecordRefSchema,\n role: z.string().max(640).optional(),\n});\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 /** The user's own role on the project (#596), e.g. Maintainer. */\n role: z.string().max(256).nullable().optional(),\n description: z.string().max(50000).nullable().optional(),\n url: optionalUrl(),\n members: z.array(projectMemberWriteSchema).max(50).optional(),\n /** The canonical project.self this entry corresponds to. Composition, not peer sameness. */\n projectRef: externalRecordRefSchema.optional(),\n /** The same project as recorded on another person's profile. */\n sameAs: externalRecordRefSchema.optional(),\n /** Calendar events this project organized or hosted. An empty list clears them. */\n events: z.array(projectEventWriteSchema).max(200).optional(),\n startedAt: z.string().nullable().optional(),\n endedAt: z.string().nullable().optional(),\n});\n\nexport type ProjectWriteInput = z.infer<typeof ProjectWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,yBAAyB,mBAAmB;AAO9C,IAAM,2BAA2B,EAAE,OAAO;AAAA,EAC/C,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,eAAe;AAAA,EAC5D,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS;AAClD,CAAC;AAOM,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,OAAO;AAAA,EACP,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AACrC,CAAC;AAGM,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA;AAAA,EAE/B,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,KAAK,YAAY;AAAA,EACjB,SAAS,EAAE,MAAM,wBAAwB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAE5D,YAAY,wBAAwB,SAAS;AAAA;AAAA,EAE7C,QAAQ,wBAAwB,SAAS;AAAA;AAAA,EAEzC,QAAQ,EAAE,MAAM,uBAAuB,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EAC3D,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC1C,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAC1C,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/schemas/write/project.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { externalRecordRefSchema, optionalUrl, partialDateFieldSchema } from './shared.js';\n\n/**\n * A person named as a member of the project. Naming someone is a claim: they\n * render as a bare handle until they publish an `id.sifa.confirmation`, and\n * confirming never puts this record on their profile. `role` is display only.\n */\nexport const projectMemberWriteSchema = z.object({\n did: z.string().regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID'),\n role: z.string().max(256).nullable().optional(),\n title: z.string().max(1280).nullable().optional(),\n});\n\n/**\n * One calendar event the project organized or hosted (lexicon `#projectEvent`).\n * `role` is the user's role at this occurrence when it differs from the\n * project's role.\n */\nexport const projectEventWriteSchema = z.object({\n event: externalRecordRefSchema,\n role: z.string().max(640).optional(),\n});\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 /** The user's own role on the project (#596), e.g. Maintainer. */\n role: z.string().max(256).nullable().optional(),\n description: z.string().max(50000).nullable().optional(),\n url: optionalUrl(),\n members: z.array(projectMemberWriteSchema).max(50).optional(),\n /** The canonical project.self this entry corresponds to. Composition, not peer sameness. */\n projectRef: externalRecordRefSchema.optional(),\n /** The same project as recorded on another person's profile. */\n sameAs: externalRecordRefSchema.optional(),\n /** Calendar events this project organized or hosted. An empty list clears them. */\n events: z.array(projectEventWriteSchema).max(200).optional(),\n startedAt: partialDateFieldSchema,\n endedAt: partialDateFieldSchema,\n});\n\nexport type ProjectWriteInput = z.infer<typeof ProjectWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,yBAAyB,aAAa,8BAA8B;AAOtE,IAAM,2BAA2B,EAAE,OAAO;AAAA,EAC/C,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,eAAe;AAAA,EAC5D,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,SAAS,EAAE,SAAS;AAClD,CAAC;AAOM,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,OAAO;AAAA,EACP,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AACrC,CAAC;AAGM,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA;AAAA,EAE/B,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,KAAK,YAAY;AAAA,EACjB,SAAS,EAAE,MAAM,wBAAwB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA;AAAA,EAE5D,YAAY,wBAAwB,SAAS;AAAA;AAAA,EAE7C,QAAQ,wBAAwB,SAAS;AAAA;AAAA,EAEzC,QAAQ,EAAE,MAAM,uBAAuB,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EAC3D,WAAW;AAAA,EACX,SAAS;AACX,CAAC;","names":[]}
@@ -1,7 +1,7 @@
1
1
  // src/schemas/write/publication.ts
2
2
  import { z } from "zod";
3
3
  import { normalizeDoi } from "../../format/doi.js";
4
- import { optionalUrl } from "./shared.js";
4
+ import { optionalUrl, partialDateFieldSchema } from "./shared.js";
5
5
  var publicationAuthorWriteSchema = z.object({
6
6
  name: z.string().min(1).max(100),
7
7
  did: z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID").optional()
@@ -19,7 +19,7 @@ var PublicationWriteSchema = z.object({
19
19
  publisher: z.string().max(256).nullable().optional(),
20
20
  url: optionalUrl(),
21
21
  description: z.string().max(5e4).nullable().optional(),
22
- publishedAt: z.string().nullable().optional(),
22
+ publishedAt: partialDateFieldSchema,
23
23
  // Absent here until now, so the write route stripped every co-author before
24
24
  // it reached the PDS: the lexicon field, the indexer, the claim flattening
25
25
  // and the editor all existed, and nothing joined them. An object schema
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schemas/write/publication.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { normalizeDoi } from '../../format/doi.js';\nimport { optionalUrl } from './shared.js';\n\n/**\n * A co-author named on the publication.\n *\n * Name-first, unlike a project member, and that is the lexicon's shape rather\n * than an inconsistency: a paper has co-authors whether or not they are on\n * atproto. A name alone is a complete entry that renders as written and claims\n * nothing about any account.\n *\n * `did` is the optional extra that turns the entry into a claim. The named\n * person renders as a bare name until they publish an `id.sifa.confirmation`,\n * and confirming never puts this record on their profile.\n */\nexport const publicationAuthorWriteSchema = z.object({\n name: z.string().min(1).max(100),\n did: z\n .string()\n .regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID')\n .optional(),\n});\n\n/**\n * A typed link to another version of the work (#590). A DOI identifier (the\n * default type) is stored bare, like the record's own `doi`, so it matches.\n */\nexport const relatedIdentifierWriteSchema = z\n .object({\n identifier: z.string().min(1).max(2048),\n identifierType: z.enum(['DOI', 'AT-URI', 'URL']).optional(),\n relationType: z.string().min(1).max(64),\n })\n .transform((rel) =>\n !rel.identifierType || rel.identifierType === 'DOI'\n ? { ...rel, identifier: normalizeDoi(rel.identifier) }\n : rel,\n );\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 // Absent here until now, so the write route stripped every co-author before\n // it reached the PDS: the lexicon field, the indexer, the claim flattening\n // and the editor all existed, and nothing joined them. An object schema\n // drops unknown keys silently, so the editor reported success and wrote\n // nothing.\n authors: z.array(publicationAuthorWriteSchema).max(50).optional(),\n relatedIdentifiers: z.array(relatedIdentifierWriteSchema).max(20).optional(),\n doi: z\n .string()\n .max(256)\n .nullable()\n .optional()\n .transform((val) => (val ? normalizeDoi(val) : val)),\n // Open set. The known values are ORCID's work types (PUBLICATION_TYPE_OPTIONS),\n // and a value outside them is kept as written: a publication that reached Sifa\n // from Standard.site, RSS, or by hand need not fit ORCID's list.\n type: z.string().max(64).nullable().optional(),\n});\n\nexport type PublicationWriteInput = z.infer<typeof PublicationWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAcrB,IAAM,+BAA+B,EAAE,OAAO;AAAA,EACnD,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAC/B,KAAK,EACF,OAAO,EACP,MAAM,uBAAuB,eAAe,EAC5C,SAAS;AACd,CAAC;AAMM,IAAM,+BAA+B,EACzC,OAAO;AAAA,EACN,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,IAAI;AAAA,EACtC,gBAAgB,EAAE,KAAK,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,SAAS;AAAA,EAC1D,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;AACxC,CAAC,EACA;AAAA,EAAU,CAAC,QACV,CAAC,IAAI,kBAAkB,IAAI,mBAAmB,QAC1C,EAAE,GAAG,KAAK,YAAY,aAAa,IAAI,UAAU,EAAE,IACnD;AACN;AAGK,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAChC,UAAU,EAAE,OAAO,EAAE,IAAI,GAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,WAAW,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,KAAK,YAAY;AAAA,EACjB,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5C,SAAS,EAAE,MAAM,4BAA4B,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAChE,oBAAoB,EAAE,MAAM,4BAA4B,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAC3E,KAAK,EACF,OAAO,EACP,IAAI,GAAG,EACP,SAAS,EACT,SAAS,EACT,UAAU,CAAC,QAAS,MAAM,aAAa,GAAG,IAAI,GAAI;AAAA;AAAA;AAAA;AAAA,EAIrD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAC/C,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/schemas/write/publication.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { normalizeDoi } from '../../format/doi.js';\nimport { optionalUrl, partialDateFieldSchema } from './shared.js';\n\n/**\n * A co-author named on the publication.\n *\n * Name-first, unlike a project member, and that is the lexicon's shape rather\n * than an inconsistency: a paper has co-authors whether or not they are on\n * atproto. A name alone is a complete entry that renders as written and claims\n * nothing about any account.\n *\n * `did` is the optional extra that turns the entry into a claim. The named\n * person renders as a bare name until they publish an `id.sifa.confirmation`,\n * and confirming never puts this record on their profile.\n */\nexport const publicationAuthorWriteSchema = z.object({\n name: z.string().min(1).max(100),\n did: z\n .string()\n .regex(/^did:[a-z]+:[^\\s]+$/, 'must be a DID')\n .optional(),\n});\n\n/**\n * A typed link to another version of the work (#590). A DOI identifier (the\n * default type) is stored bare, like the record's own `doi`, so it matches.\n */\nexport const relatedIdentifierWriteSchema = z\n .object({\n identifier: z.string().min(1).max(2048),\n identifierType: z.enum(['DOI', 'AT-URI', 'URL']).optional(),\n relationType: z.string().min(1).max(64),\n })\n .transform((rel) =>\n !rel.identifierType || rel.identifierType === 'DOI'\n ? { ...rel, identifier: normalizeDoi(rel.identifier) }\n : rel,\n );\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: partialDateFieldSchema,\n // Absent here until now, so the write route stripped every co-author before\n // it reached the PDS: the lexicon field, the indexer, the claim flattening\n // and the editor all existed, and nothing joined them. An object schema\n // drops unknown keys silently, so the editor reported success and wrote\n // nothing.\n authors: z.array(publicationAuthorWriteSchema).max(50).optional(),\n relatedIdentifiers: z.array(relatedIdentifierWriteSchema).max(20).optional(),\n doi: z\n .string()\n .max(256)\n .nullable()\n .optional()\n .transform((val) => (val ? normalizeDoi(val) : val)),\n // Open set. The known values are ORCID's work types (PUBLICATION_TYPE_OPTIONS),\n // and a value outside them is kept as written: a publication that reached Sifa\n // from Standard.site, RSS, or by hand need not fit ORCID's list.\n type: z.string().max(64).nullable().optional(),\n});\n\nexport type PublicationWriteInput = z.infer<typeof PublicationWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,oBAAoB;AAC7B,SAAS,aAAa,8BAA8B;AAc7C,IAAM,+BAA+B,EAAE,OAAO;AAAA,EACnD,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAC/B,KAAK,EACF,OAAO,EACP,MAAM,uBAAuB,eAAe,EAC5C,SAAS;AACd,CAAC;AAMM,IAAM,+BAA+B,EACzC,OAAO;AAAA,EACN,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,IAAI;AAAA,EACtC,gBAAgB,EAAE,KAAK,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,SAAS;AAAA,EAC1D,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE;AACxC,CAAC,EACA;AAAA,EAAU,CAAC,QACV,CAAC,IAAI,kBAAkB,IAAI,mBAAmB,QAC1C,EAAE,GAAG,KAAK,YAAY,aAAa,IAAI,UAAU,EAAE,IACnD;AACN;AAGK,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAChC,UAAU,EAAE,OAAO,EAAE,IAAI,GAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,WAAW,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EACnD,KAAK,YAAY;AAAA,EACjB,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMb,SAAS,EAAE,MAAM,4BAA4B,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAChE,oBAAoB,EAAE,MAAM,4BAA4B,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,EAC3E,KAAK,EACF,OAAO,EACP,IAAI,GAAG,EACP,SAAS,EACT,SAAS,EACT,UAAU,CAAC,QAAS,MAAM,aAAa,GAAG,IAAI,GAAI;AAAA;AAAA;AAAA;AAAA,EAIrD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAC/C,CAAC;","names":[]}
@@ -63,6 +63,11 @@ function isValidPartialDate(input) {
63
63
  if (typeof input !== "string") return false;
64
64
  return PARTIAL_DATE_RE.test(input) || isValidDateOnly(input);
65
65
  }
66
+ var DATETIME_DAY_RE = /^(\d{4}-\d{2}-\d{2})T\d{2}:\d{2}/;
67
+ var partialDateFieldSchema = z.string().transform((v) => DATETIME_DAY_RE.exec(v)?.[1] ?? v).refine(
68
+ (v) => v === "" || isValidPartialDate(v),
69
+ "must be a valid YYYY, YYYY-MM or YYYY-MM-DD date"
70
+ ).nullable().optional();
66
71
  var entityRefSchema = z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional();
67
72
  var artifactLinkSchema = z.object({
68
73
  url: z.string().max(2048).refine((v) => httpUrlOrNull(v) !== null, "must be an http(s) URL"),
@@ -89,6 +94,7 @@ export {
89
94
  isValidPartialDate,
90
95
  normalizeUrl,
91
96
  optionalUrl,
97
+ partialDateFieldSchema,
92
98
  presentationLinkSchema,
93
99
  skillRefSchema,
94
100
  writeLocationSchema
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schemas/write/shared.ts"],"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 an http(s) URL string or silently drop it (returns `undefined`).\n * Preserves the write-time policy: bad URLs from imports are dropped, not\n * rejected. A dangerous scheme (`javascript:`, `data:`, ...) parses as a URL, so\n * this drops anything that is not http(s) via {@link httpUrlOrNull} rather than a\n * bare parse check, keeping a script-bearing scheme out of the stored record. All\n * consumers of this schema are web-link fields (project/publication/involvement/\n * certification URLs), so no non-http scheme is legitimate here.\n */\nexport const optionalUrl = () =>\n z\n .string()\n .optional()\n .transform((val) => {\n if (!val) return undefined;\n return httpUrlOrNull(val) ?? undefined;\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\nconst PARTIAL_DATE_RE = /^\\d{4}(-(0[1-9]|1[0-2]))?$/;\n\n/**\n * Partial calendar-date validator. Returns `true` for a year (`YYYY`), a month\n * (`YYYY-MM`, month 01-12), or a real day per {@link isValidDateOnly}. For\n * dates where the exact day is often unknown, such as a past talk session.\n */\nexport function isValidPartialDate(input: unknown): boolean {\n if (typeof input !== 'string') return false;\n return PARTIAL_DATE_RE.test(input) || isValidDateOnly(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"],"mappings":";AAAA,SAAS,SAAS;AAGX,SAAS,aAAa,KAAqB;AAChD,QAAM,UAAU,IAAI,KAAK;AACzB,MAAI,gBAAgB,KAAK,OAAO,EAAG,QAAO;AAC1C,SAAO,WAAW,OAAO;AAC3B;AAWO,IAAM,cAAc,MACzB,EACG,OAAO,EACP,SAAS,EACT,UAAU,CAAC,QAAQ;AAClB,MAAI,CAAC,IAAK,QAAO;AACjB,SAAO,cAAc,GAAG,KAAK;AAC/B,CAAC;AAiBE,IAAM,sBAAsB,EAChC,MAAM;AAAA,EACL,EAAE,OAAO;AAAA,IACP,SAAS,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC5B,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,QAAQ;AAAA,IAC1C,QAAQ,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC3B,MAAM,EAAE,OAAO,EAAE,QAAQ;AAAA,IACzB,UAAU,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC7B,QAAQ,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC3B,YAAY,EAAE,OAAO,EAAE,QAAQ;AAAA,IAC/B,MAAM,EAAE,OAAO,EAAE,QAAQ;AAAA,EAC3B,CAAC;AAAA,EACD,EAAE,OAAO;AACX,CAAC,EACA,SAAS,EACT,SAAS;AAGL,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,KAAK,EAAE,OAAO;AAChB,CAAC;AAWM,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAWO,SAAS,cAAc,OAA+B;AAC3D,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI;AACF,UAAM,MAAM,IAAI,IAAI,KAAK;AACzB,WAAO,IAAI,aAAa,WAAW,IAAI,aAAa,WAAW,QAAQ;AAAA,EACzE,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAM,eAAe;AAOd,SAAS,gBAAgB,OAAyB;AACvD,MAAI,OAAO,UAAU,YAAY,CAAC,aAAa,KAAK,KAAK,EAAG,QAAO;AACnE,QAAM,SAAS,oBAAI,KAAK,GAAG,KAAK,YAAY;AAC5C,SAAO,CAAC,OAAO,MAAM,OAAO,QAAQ,CAAC,KAAK,OAAO,YAAY,EAAE,WAAW,KAAK;AACjF;AAEA,IAAM,kBAAkB;AAOjB,SAAS,mBAAmB,OAAyB;AAC1D,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,SAAO,gBAAgB,KAAK,KAAK,KAAK,gBAAgB,KAAK;AAC7D;AAWO,IAAM,kBAAkB,EAC5B,OAAO,EACP,IAAI,EACJ,OAAO,CAAC,MAAM,gBAAgB,KAAK,CAAC,GAAG,EAAE,SAAS,mCAAmC,CAAC,EACtF,IAAI,IAAI,EACR,SAAS;AAOL,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,KAAK,EACF,OAAO,EACP,IAAI,IAAI,EACR,OAAO,CAAC,MAAM,cAAc,CAAC,MAAM,MAAM,wBAAwB;AAAA,EACpE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS;AAAA,EAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,GAAI,EAAE,SAAS,EAAE,SAAS;AAClD,CAAC;AAMM,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,mBAAmB;AAAA;AAAA,EAE/E,KAAK,EACF,OAAO,EACP,IAAI,GAAG,EACP,MAAM,gDAAgD,eAAe,EACrE,SAAS;AACd,CAAC;AAGM,IAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,KAAK,EACF,OAAO,EACP,IAAI,IAAI,EACR,OAAO,CAAC,MAAM,cAAc,CAAC,MAAM,MAAM,wBAAwB;AAAA,EACpE,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC/C,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAChD,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/schemas/write/shared.ts"],"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 an http(s) URL string or silently drop it (returns `undefined`).\n * Preserves the write-time policy: bad URLs from imports are dropped, not\n * rejected. A dangerous scheme (`javascript:`, `data:`, ...) parses as a URL, so\n * this drops anything that is not http(s) via {@link httpUrlOrNull} rather than a\n * bare parse check, keeping a script-bearing scheme out of the stored record. All\n * consumers of this schema are web-link fields (project/publication/involvement/\n * certification URLs), so no non-http scheme is legitimate here.\n */\nexport const optionalUrl = () =>\n z\n .string()\n .optional()\n .transform((val) => {\n if (!val) return undefined;\n return httpUrlOrNull(val) ?? undefined;\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\nconst PARTIAL_DATE_RE = /^\\d{4}(-(0[1-9]|1[0-2]))?$/;\n\n/**\n * Partial calendar-date validator. Returns `true` for a year (`YYYY`), a month\n * (`YYYY-MM`, month 01-12), or a real day per {@link isValidDateOnly}. For\n * dates where the exact day is often unknown, such as a past talk session.\n */\nexport function isValidPartialDate(input: unknown): boolean {\n if (typeof input !== 'string') return false;\n return PARTIAL_DATE_RE.test(input) || isValidDateOnly(input);\n}\n\nconst DATETIME_DAY_RE = /^(\\d{4}-\\d{2}-\\d{2})T\\d{2}:\\d{2}/;\n\n/**\n * Optional, clearable partial-date field (`YYYY`, `YYYY-MM` or `YYYY-MM-DD`,\n * no time) shared by the dated profile sections. `null` clears the date.\n *\n * Older records hold RFC 3339 datetimes and the editor sends a stored value\n * back unchanged, so a datetime is shortened to its calendar day rather than\n * rejected. An empty string stays accepted, as before this field was checked.\n */\nexport const partialDateFieldSchema = z\n .string()\n .transform((v) => DATETIME_DAY_RE.exec(v)?.[1] ?? v)\n .refine(\n (v) => v === '' || isValidPartialDate(v),\n 'must be a valid YYYY, YYYY-MM or YYYY-MM-DD date',\n )\n .nullable()\n .optional();\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"],"mappings":"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","names":[]}
@@ -1,14 +1,14 @@
1
1
  // src/schemas/write/volunteering.ts
2
2
  import { z } from "zod";
3
- import { entityRefSchema } from "./shared.js";
3
+ import { entityRefSchema, partialDateFieldSchema } from "./shared.js";
4
4
  var VolunteeringWriteSchema = z.object({
5
5
  organization: z.string().min(1).max(256),
6
6
  entityRef: entityRefSchema,
7
7
  role: z.string().max(256).nullable().optional(),
8
8
  cause: z.string().max(256).nullable().optional(),
9
9
  description: z.string().max(5e4).nullable().optional(),
10
- startedAt: z.string().nullable().optional(),
11
- endedAt: z.string().nullable().optional()
10
+ startedAt: partialDateFieldSchema,
11
+ endedAt: partialDateFieldSchema
12
12
  });
13
13
  export {
14
14
  VolunteeringWriteSchema
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schemas/write/volunteering.ts"],"sourcesContent":["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"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,uBAAuB;AAGzB,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EACvC,WAAW;AAAA,EACX,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC/C,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAC1C,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAC1C,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/schemas/write/volunteering.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { entityRefSchema, partialDateFieldSchema } 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: partialDateFieldSchema,\n endedAt: partialDateFieldSchema,\n});\n\nexport type VolunteeringWriteInput = z.infer<typeof VolunteeringWriteSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,SAAS,iBAAiB,8BAA8B;AAGjD,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC9C,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EACvC,WAAW;AAAA,EACX,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAC/C,aAAa,EAAE,OAAO,EAAE,IAAI,GAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACvD,WAAW;AAAA,EACX,SAAS;AACX,CAAC;","names":[]}
@@ -4,7 +4,7 @@ import { a1 as SifaApiConfig, a0 as ApiFetchOptions, a2 as WriteResult, o as Pro
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
  import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
6
6
  import { c as Profile, d as ProfilePosition, Y as SkillRef, p as ExternalAccount, Z as SkillSuggestion, s as OrgFloorVerdict } from './index-BQAKeEoj.cjs';
7
- import { s as sifaQueryKeys, aK as RefreshPdsResult, bb as UpdateProfileOverrideInput, bc as UpdateProfileSelfInput, bd as UploadAvatarResult, be as UploadPronunciationAudioResult, au as PrimarySection, b4 as SubCategoryBulkResult, az as ProfileLocationInput, q as ExternalAccountInput, n as CreateExternalAccountResult, bi as VerifyExternalAccountResult, E as EndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, a4 as GivenConfirmation, at as PendingConfirmationsPage, af as InboxCounts, p as DismissUnlinkedPositionInput, b9 as UnlinkedPositionsResult, o as DismissCompletenessSignalInput, av as ProfileCompleteness, aW as RpgClaimableResponse, a_ as RpgStatusResponse, aJ as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, ae as HideProfileItemInput, a9 as HiddenActivityItem, ad as HideActivityItemInput, b7 as UnhideActivityItemInput, f as ActivityPreferences, b2 as SiteActivityPresetResponse, ba as UpdateActivityPreferencesInput, b3 as StatsResponse, i as AppRegistryEntry, aa as HiddenApp, b as AccountSummary, r as FeaturedProfile, b1 as SimilarProfile, R as FetchSuggestionsOptions, b6 as SuggestionsResponse, X as FollowUserResult, y as FetchFollowListOptions, U as FollowListPage, a1 as FollowingResponse, G as FetchFollowingFeedOptions, $ as FollowingFeedResponse, a0 as FollowingFeedVersion, z as FetchFollowProfilePageOptions, W as FollowProfilePageResponse, F as FeatureAllowlistResponse, h as AdminReviewQueues, u as FetchActivityFeedOptions, c as ActivityFeedResponse, g as ActivityTeaserResponse, a8 as HeatmapResponse, ah as MyGithubPullRequestsResponse, A as AccountCheckResult, aI as ReactionStatus, aH as ReactionResult, aG as ReactionError, aV as RoadmapVotesResponse, j as CastRoadmapVoteResult, aR as RoadmapItemRef, D as DeleteAccountResult, aM as ResetProfileResult, bj as WipePreview, aL as RepoDeleteInput, aj as OrgClaimResult, ap as OrgProfileUpdateResult, ak as OrgDomainChallengeResult, al as OrgDomainVerifyResult, am as OrgNotificationEmailAddResult, an as OrgNotificationEmailRemoveResult, bf as UserSettings } from './user-settings-DDP76dZH.cjs';
7
+ import { s as sifaQueryKeys, aJ as RefreshPdsResult, b9 as UpdateProfileOverrideInput, ba as UpdateProfileSelfInput, bb as UploadAvatarResult, bc as UploadPronunciationAudioResult, at as PrimarySection, b2 as SubCategoryBulkResult, ay as ProfileLocationInput, q as ExternalAccountInput, n as CreateExternalAccountResult, bg as VerifyExternalAccountResult, E as EndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, a3 as GivenConfirmation, as as PendingConfirmationsPage, ae as InboxCounts, p as DismissUnlinkedPositionInput, b7 as UnlinkedPositionsResult, o as DismissCompletenessSignalInput, au as ProfileCompleteness, aU as RpgClaimableResponse, aY as RpgStatusResponse, aI as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, ad as HideProfileItemInput, a8 as HiddenActivityItem, ac as HideActivityItemInput, b5 as UnhideActivityItemInput, f as ActivityPreferences, b0 as SiteActivityPresetResponse, b8 as UpdateActivityPreferencesInput, b1 as StatsResponse, i as AppRegistryEntry, a9 as HiddenApp, b as AccountSummary, r as FeaturedProfile, a$ as SimilarProfile, Q as FetchSuggestionsOptions, b4 as SuggestionsResponse, W as FollowUserResult, y as FetchFollowListOptions, T as FollowListPage, a0 as FollowingResponse, G as FetchFollowingFeedOptions, _ as FollowingFeedResponse, $ as FollowingFeedVersion, z as FetchFollowProfilePageOptions, V as FollowProfilePageResponse, F as FeatureAllowlistResponse, h as AdminReviewQueues, u as FetchActivityFeedOptions, c as ActivityFeedResponse, g as ActivityTeaserResponse, a7 as HeatmapResponse, ag as MyGithubPullRequestsResponse, A as AccountCheckResult, aH as ReactionStatus, aG as ReactionResult, aF as ReactionError, j as CastRoadmapVoteResult, aQ as RoadmapItemRef, D as DeleteAccountResult, aL as ResetProfileResult, bh as WipePreview, aK as RepoDeleteInput, ai as OrgClaimResult, ao as OrgProfileUpdateResult, aj as OrgDomainChallengeResult, ak as OrgDomainVerifyResult, al as OrgNotificationEmailAddResult, am as OrgNotificationEmailRemoveResult, bd as UserSettings } from './user-settings-C8JUD4DM.cjs';
8
8
  import { z } from 'zod';
9
9
  import { i as EntitySearchResponse, E as EntitySearchResult, c as EntityMintDomainResponse, g as EntityResolveDomainResponse, n as EntitySelectResponse, l as EntitySelectRequest, r as FeatureFlag } from './follow-profile-CgLLLQtJ.cjs';
10
10
  import { O as OrgClaimRequestInput, a as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, c as OrgDomainVerifyRequestInput, d as OrgNotificationEmailRequestInput } from './org-settings-C73Sin5E.cjs';
@@ -1045,29 +1045,14 @@ interface DeleteReactionVariables {
1045
1045
  /** React hook for deleting a reaction. */
1046
1046
  declare function useDeleteReaction(options?: Omit<UseMutationOptions<WriteResult, Error, DeleteReactionVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, DeleteReactionVariables, unknown>;
1047
1047
 
1048
- /** Public roadmap vote tallies. Returns `{}` data on error. */
1049
- declare function useRoadmapVotes(options?: Omit<UseQueryOptions<RoadmapVotesResponse, Error, RoadmapVotesResponse, ReturnType<typeof sifaQueryKeys.roadmap.votes>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<RoadmapVotesResponse, Error>;
1050
- /** Roadmap items the authenticated viewer has voted on. Returns `[]` data on error. */
1051
- declare function useMyRoadmapVotes(options?: Omit<UseQueryOptions<string[], Error, string[], ReturnType<typeof sifaQueryKeys.roadmap.myVotes>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<string[], Error>;
1052
-
1053
- /**
1054
- * React hook for casting a roadmap vote. Variable: the item key.
1055
- *
1056
- * Returns the discriminated-union result so callers can detect
1057
- * `scope_insufficient` and trigger an OAuth scope-upgrade flow
1058
- * (see {@link castRoadmapVote}).
1059
- */
1060
- declare function useCastRoadmapVote(options?: Omit<UseMutationOptions<CastRoadmapVoteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CastRoadmapVoteResult, Error, string, unknown>;
1061
- /** React hook for retracting a previously-cast roadmap vote. */
1062
- declare function useRetractRoadmapVote(options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1063
1048
  /**
1064
1049
  * React hook for voting on a roadmap board item. Variable: the item's
1065
- * `{ did, rkey }`. Returns the same discriminated-union result as
1066
- * {@link useCastRoadmapVote}.
1050
+ * `{ did, rkey }`. Returns the discriminated-union result so callers can
1051
+ * detect `scope_insufficient` and trigger an OAuth scope-upgrade flow.
1067
1052
  *
1068
- * Board data from `fetchRoadmap` is usually server-rendered, so the
1069
- * invalidation here does not refresh it: keep optimistic local state or call
1070
- * `router.refresh()`. Voting twice is safe; the API answers 200.
1053
+ * Board data from `fetchRoadmap` is not held in the query cache, so nothing is
1054
+ * invalidated here: keep optimistic local state or call `router.refresh()`.
1055
+ * Voting twice is safe; the API answers 200.
1071
1056
  */
1072
1057
  declare function useCastRoadmapItemVote(options?: Omit<UseMutationOptions<CastRoadmapVoteResult, Error, RoadmapItemRef>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CastRoadmapVoteResult, Error, RoadmapItemRef, unknown>;
1073
1058
  /** React hook for retracting a vote on a roadmap board item. */
@@ -1267,4 +1252,4 @@ declare function useUpdateUserSettings(): _tanstack_react_query.UseMutationResul
1267
1252
  showCitationCounts: boolean;
1268
1253
  }>, unknown>;
1269
1254
 
1270
- export { revokeOrgAttestation as $, type AddFeatureAllowlistVariables as A, type UseMyGithubPullRequestsParams as B, type CreateOrgAttestationInput as C, type DeleteReactionVariables as D, type VerificationEventKind as E, type FetchOrgAttestationOptions as F, type VerificationLog as G, type VerificationLogEntry as H, VerificationLogEntrySchema as I, VerificationLogSchema as J, addProfileEmail as K, createOrgAttestation as L, fetchAttestationRequests as M, fetchOrgAttestations as N, type OrgAttestation as O, type PositionSkillLinkVariables as P, fetchProfileEmails as Q, type RemoveFeatureAllowlistVariables as R, SifaProvider as S, fetchVerificationLog as T, type UnfollowVariables as U, VERIFICATION_EVENT_KINDS as V, offboardOrgAttestation as W, rejectAttestationRequest as X, removeProfileEmail as Y, requestEmploymentConfirmation as Z, resendProfileEmailVerification as _, type AttestationRequest as a, useHideKeytraceClaim as a$, useAccounts as a0, useActivityFeed as a1, useActivityPreferences as a2, useActivityTeaser as a3, useAddFeatureAllowlist as a4, useAddOrgNotificationEmail as a5, useAddProfileEmail as a6, useAdminReviewQueues as a7, useAppAccountCheck as a8, useAppsRegistry as a9, useDeleteNamePronunciationAudio as aA, useDeletePosition as aB, useDeleteProfileLocation as aC, useDeleteReaction as aD, useDeleteRecord as aE, useDeleteRepoRecords as aF, useDeleteSkill as aG, useDismissCompletenessSignal as aH, useDismissConfirmation as aI, useDismissUnlinkedPosition as aJ, useEndorsementCount as aK, useEntitySearch as aL, useExternalAccounts as aM, useFeatureAllowlist as aN, useFeaturedProfile as aO, useFollow as aP, useFollowers as aQ, useFollowing as aR, useFollowingFeed as aS, useFollowingFeedVersion as aT, useFollowingList as aU, useGetProfileView as aV, useGivenConfirmations as aW, useHeatmapData as aX, useHiddenActivityItems as aY, useHiddenApps as aZ, useHideActivityItem as a_, useAtFundLink as aa, useAttestationRequests as ab, useBlueskySuggestions as ac, useBulkHideProfileItems as ad, useBulkHideStandardPublications as ae, useBulkUnhideProfileItems as af, useBulkUnhideStandardPublications as ag, useCanonicalSkillSearch as ah, useCastRoadmapItemVote as ai, useCastRoadmapVote as aj, useClearCompletenessDismissals as ak, useCreateConfirmation as al, useCreateEducation as am, useCreateEndorsement as an, useCreateExternalAccount as ao, useCreateOrgAttestation as ap, useCreatePosition as aq, useCreateProfileLocation as ar, useCreateReaction as as, useCreateRecord as at, useCreateSkill as au, useDebouncedValue as av, useDeleteAccount as aw, useDeleteAvatarOverride as ax, useDeleteEducation as ay, useDeleteExternalAccount as az, AttestationRequestSchema as b, useUnlinkedPositions as b$, useHideOrcidPublication as b0, useHideProfileItem as b1, useHideSifaPublication as b2, useHideStandardPublication as b3, useImportSearchEntities as b4, useInboxCounts as b5, useLinkSkillToPosition as b6, useMintEntityDomain as b7, useMutuals as b8, useMyGithubPullRequests as b9, useRevealMarqueDomain as bA, useRevokeConfirmation as bB, useRevokeOrgAttestation as bC, useRoadmapVotes as bD, useRpgClaimable as bE, useRpgStatus as bF, useSearchFilters as bG, useSearchProfiles as bH, useSelectEntity as bI, useSetExternalAccountPrimary as bJ, useSetPositionPrimary as bK, useSetSectionPrimary as bL, useSifaConfig as bM, useSimilarProfiles as bN, useSiteActivityPreset as bO, useSkillSuggestions as bP, useStats as bQ, useSuggestionCount as bR, useSuggestions as bS, useUnfollow as bT, useUnhideActivityItem as bU, useUnhideKeytraceClaim as bV, useUnhideOrcidPublication as bW, useUnhideProfileItem as bX, useUnhideSifaPublication as bY, useUnhideStandardPublication as bZ, useUnlinkSkillFromPosition as b_, useMyRoadmapVotes as ba, useNetworkStreamCount as bb, useOffboardOrgAttestation as bc, useOrgAttestations as bd, useOrgClaim as be, useOrgDomainChallenge as bf, useOrgDomainVerify as bg, useOrgProfile as bh, usePendingConfirmations as bi, useProfile as bj, useProfileCompleteness as bk, useProfileEmails as bl, useReactionStatus as bm, useRefreshOrcidPublications as bn, useRefreshPds as bo, useRejectAttestationRequest as bp, useRemoveFeatureAllowlist as bq, useRemoveOrgNotificationEmail as br, useRemoveProfileEmail as bs, useRepoInventory as bt, useRequestEmploymentConfirmation as bu, useResendProfileEmailVerification as bv, useResetProfile as bw, useResolveEntityDomain as bx, useRetractRoadmapItemVote as by, useRetractRoadmapVote as bz, type AttestationStatus as c, useUnrevealMarqueDomain as c0, useUnsetExternalAccountPrimary as c1, useUnsetPositionPrimary as c2, useUnsetSectionPrimary as c3, useUpdateActivityPreferences as c4, useUpdateEducation as c5, useUpdateExternalAccount as c6, useUpdateOrgProfile as c7, useUpdatePosition as c8, useUpdateProfileLocation as c9, useUpdateProfileOverride as ca, useUpdateProfileSelf as cb, useUpdateRecord as cc, useUpdateSkill as cd, useUpdateSkillSubCategories as ce, useUpdateUserSettings as cf, useUploadAvatar as cg, useUploadNamePronunciationAudio as ch, useUserSettings as ci, useVerificationLog as cj, useVerifyExternalAccount as ck, useWipePreview as cl, useSearchCompanies as cm, type CreateOrgAttestationResult as d, type CreateReactionVariables as e, type CreateRecordVariables as f, type DeleteRecordVariables as g, type FetchProfileEmailsOptions as h, type FetchVerificationLogOptions as i, type FollowVariables as j, OrgAttestationSchema as k, type ProfileEmail as l, ProfileEmailSchema as m, type ProfileEmailSendStatus as n, type ProfileEmails as o, type RequestEmploymentConfirmationInput as p, type RequestEmploymentConfirmationResult as q, type SifaProviderProps as r, type UpdateEducationVariables as s, type UpdateExternalAccountVariables as t, type UpdatePositionVariables as u, type UpdateProfileLocationVariables as v, type UpdateRecordVariables as w, type UpdateSkillSubCategoriesVariables as x, type UpdateSkillVariables as y, type UseEntitySearchOptions as z };
1255
+ export { revokeOrgAttestation as $, type AddFeatureAllowlistVariables as A, type UseMyGithubPullRequestsParams as B, type CreateOrgAttestationInput as C, type DeleteReactionVariables as D, type VerificationEventKind as E, type FetchOrgAttestationOptions as F, type VerificationLog as G, type VerificationLogEntry as H, VerificationLogEntrySchema as I, VerificationLogSchema as J, addProfileEmail as K, createOrgAttestation as L, fetchAttestationRequests as M, fetchOrgAttestations as N, type OrgAttestation as O, type PositionSkillLinkVariables as P, fetchProfileEmails as Q, type RemoveFeatureAllowlistVariables as R, SifaProvider as S, fetchVerificationLog as T, type UnfollowVariables as U, VERIFICATION_EVENT_KINDS as V, offboardOrgAttestation as W, rejectAttestationRequest as X, removeProfileEmail as Y, requestEmploymentConfirmation as Z, resendProfileEmailVerification as _, type AttestationRequest as a, useHideOrcidPublication as a$, useAccounts as a0, useActivityFeed as a1, useActivityPreferences as a2, useActivityTeaser as a3, useAddFeatureAllowlist as a4, useAddOrgNotificationEmail as a5, useAddProfileEmail as a6, useAdminReviewQueues as a7, useAppAccountCheck as a8, useAppsRegistry as a9, useDeletePosition as aA, useDeleteProfileLocation as aB, useDeleteReaction as aC, useDeleteRecord as aD, useDeleteRepoRecords as aE, useDeleteSkill as aF, useDismissCompletenessSignal as aG, useDismissConfirmation as aH, useDismissUnlinkedPosition as aI, useEndorsementCount as aJ, useEntitySearch as aK, useExternalAccounts as aL, useFeatureAllowlist as aM, useFeaturedProfile as aN, useFollow as aO, useFollowers as aP, useFollowing as aQ, useFollowingFeed as aR, useFollowingFeedVersion as aS, useFollowingList as aT, useGetProfileView as aU, useGivenConfirmations as aV, useHeatmapData as aW, useHiddenActivityItems as aX, useHiddenApps as aY, useHideActivityItem as aZ, useHideKeytraceClaim as a_, useAtFundLink as aa, useAttestationRequests as ab, useBlueskySuggestions as ac, useBulkHideProfileItems as ad, useBulkHideStandardPublications as ae, useBulkUnhideProfileItems as af, useBulkUnhideStandardPublications as ag, useCanonicalSkillSearch as ah, useCastRoadmapItemVote as ai, useClearCompletenessDismissals as aj, useCreateConfirmation as ak, useCreateEducation as al, useCreateEndorsement as am, useCreateExternalAccount as an, useCreateOrgAttestation as ao, useCreatePosition as ap, useCreateProfileLocation as aq, useCreateReaction as ar, useCreateRecord as as, useCreateSkill as at, useDebouncedValue as au, useDeleteAccount as av, useDeleteAvatarOverride as aw, useDeleteEducation as ax, useDeleteExternalAccount as ay, useDeleteNamePronunciationAudio as az, AttestationRequestSchema as b, useUnsetSectionPrimary as b$, useHideProfileItem as b0, useHideSifaPublication as b1, useHideStandardPublication as b2, useImportSearchEntities as b3, useInboxCounts as b4, useLinkSkillToPosition as b5, useMintEntityDomain as b6, useMutuals as b7, useMyGithubPullRequests as b8, useNetworkStreamCount as b9, useRpgClaimable as bA, useRpgStatus as bB, useSearchFilters as bC, useSearchProfiles as bD, useSelectEntity as bE, useSetExternalAccountPrimary as bF, useSetPositionPrimary as bG, useSetSectionPrimary as bH, useSifaConfig as bI, useSimilarProfiles as bJ, useSiteActivityPreset as bK, useSkillSuggestions as bL, useStats as bM, useSuggestionCount as bN, useSuggestions as bO, useUnfollow as bP, useUnhideActivityItem as bQ, useUnhideKeytraceClaim as bR, useUnhideOrcidPublication as bS, useUnhideProfileItem as bT, useUnhideSifaPublication as bU, useUnhideStandardPublication as bV, useUnlinkSkillFromPosition as bW, useUnlinkedPositions as bX, useUnrevealMarqueDomain as bY, useUnsetExternalAccountPrimary as bZ, useUnsetPositionPrimary as b_, useOffboardOrgAttestation as ba, useOrgAttestations as bb, useOrgClaim as bc, useOrgDomainChallenge as bd, useOrgDomainVerify as be, useOrgProfile as bf, usePendingConfirmations as bg, useProfile as bh, useProfileCompleteness as bi, useProfileEmails as bj, useReactionStatus as bk, useRefreshOrcidPublications as bl, useRefreshPds as bm, useRejectAttestationRequest as bn, useRemoveFeatureAllowlist as bo, useRemoveOrgNotificationEmail as bp, useRemoveProfileEmail as bq, useRepoInventory as br, useRequestEmploymentConfirmation as bs, useResendProfileEmailVerification as bt, useResetProfile as bu, useResolveEntityDomain as bv, useRetractRoadmapItemVote as bw, useRevealMarqueDomain as bx, useRevokeConfirmation as by, useRevokeOrgAttestation as bz, type AttestationStatus as c, useUpdateActivityPreferences as c0, useUpdateEducation as c1, useUpdateExternalAccount as c2, useUpdateOrgProfile as c3, useUpdatePosition as c4, useUpdateProfileLocation as c5, useUpdateProfileOverride as c6, useUpdateProfileSelf as c7, useUpdateRecord as c8, useUpdateSkill as c9, useUpdateSkillSubCategories as ca, useUpdateUserSettings as cb, useUploadAvatar as cc, useUploadNamePronunciationAudio as cd, useUserSettings as ce, useVerificationLog as cf, useVerifyExternalAccount as cg, useWipePreview as ch, useSearchCompanies as ci, type CreateOrgAttestationResult as d, type CreateReactionVariables as e, type CreateRecordVariables as f, type DeleteRecordVariables as g, type FetchProfileEmailsOptions as h, type FetchVerificationLogOptions as i, type FollowVariables as j, OrgAttestationSchema as k, type ProfileEmail as l, ProfileEmailSchema as m, type ProfileEmailSendStatus as n, type ProfileEmails as o, type RequestEmploymentConfirmationInput as p, type RequestEmploymentConfirmationResult as q, type SifaProviderProps as r, type UpdateEducationVariables as s, type UpdateExternalAccountVariables as t, type UpdatePositionVariables as u, type UpdateProfileLocationVariables as v, type UpdateRecordVariables as w, type UpdateSkillSubCategoriesVariables as x, type UpdateSkillVariables as y, type UseEntitySearchOptions as z };
@@ -4,7 +4,7 @@ import { a1 as SifaApiConfig, a0 as ApiFetchOptions, a2 as WriteResult, o as Pro
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
  import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
6
6
  import { c as Profile, d as ProfilePosition, Y as SkillRef, p as ExternalAccount, Z as SkillSuggestion, s as OrgFloorVerdict } from './index-DDh2RLvx.js';
7
- import { s as sifaQueryKeys, aK as RefreshPdsResult, bb as UpdateProfileOverrideInput, bc as UpdateProfileSelfInput, bd as UploadAvatarResult, be as UploadPronunciationAudioResult, au as PrimarySection, b4 as SubCategoryBulkResult, az as ProfileLocationInput, q as ExternalAccountInput, n as CreateExternalAccountResult, bi as VerifyExternalAccountResult, E as EndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, a4 as GivenConfirmation, at as PendingConfirmationsPage, af as InboxCounts, p as DismissUnlinkedPositionInput, b9 as UnlinkedPositionsResult, o as DismissCompletenessSignalInput, av as ProfileCompleteness, aW as RpgClaimableResponse, a_ as RpgStatusResponse, aJ as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, ae as HideProfileItemInput, a9 as HiddenActivityItem, ad as HideActivityItemInput, b7 as UnhideActivityItemInput, f as ActivityPreferences, b2 as SiteActivityPresetResponse, ba as UpdateActivityPreferencesInput, b3 as StatsResponse, i as AppRegistryEntry, aa as HiddenApp, b as AccountSummary, r as FeaturedProfile, b1 as SimilarProfile, R as FetchSuggestionsOptions, b6 as SuggestionsResponse, X as FollowUserResult, y as FetchFollowListOptions, U as FollowListPage, a1 as FollowingResponse, G as FetchFollowingFeedOptions, $ as FollowingFeedResponse, a0 as FollowingFeedVersion, z as FetchFollowProfilePageOptions, W as FollowProfilePageResponse, F as FeatureAllowlistResponse, h as AdminReviewQueues, u as FetchActivityFeedOptions, c as ActivityFeedResponse, g as ActivityTeaserResponse, a8 as HeatmapResponse, ah as MyGithubPullRequestsResponse, A as AccountCheckResult, aI as ReactionStatus, aH as ReactionResult, aG as ReactionError, aV as RoadmapVotesResponse, j as CastRoadmapVoteResult, aR as RoadmapItemRef, D as DeleteAccountResult, aM as ResetProfileResult, bj as WipePreview, aL as RepoDeleteInput, aj as OrgClaimResult, ap as OrgProfileUpdateResult, ak as OrgDomainChallengeResult, al as OrgDomainVerifyResult, am as OrgNotificationEmailAddResult, an as OrgNotificationEmailRemoveResult, bf as UserSettings } from './user-settings-CBtacio1.js';
7
+ import { s as sifaQueryKeys, aJ as RefreshPdsResult, b9 as UpdateProfileOverrideInput, ba as UpdateProfileSelfInput, bb as UploadAvatarResult, bc as UploadPronunciationAudioResult, at as PrimarySection, b2 as SubCategoryBulkResult, ay as ProfileLocationInput, q as ExternalAccountInput, n as CreateExternalAccountResult, bg as VerifyExternalAccountResult, E as EndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, a3 as GivenConfirmation, as as PendingConfirmationsPage, ae as InboxCounts, p as DismissUnlinkedPositionInput, b7 as UnlinkedPositionsResult, o as DismissCompletenessSignalInput, au as ProfileCompleteness, aU as RpgClaimableResponse, aY as RpgStatusResponse, aI as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, ad as HideProfileItemInput, a8 as HiddenActivityItem, ac as HideActivityItemInput, b5 as UnhideActivityItemInput, f as ActivityPreferences, b0 as SiteActivityPresetResponse, b8 as UpdateActivityPreferencesInput, b1 as StatsResponse, i as AppRegistryEntry, a9 as HiddenApp, b as AccountSummary, r as FeaturedProfile, a$ as SimilarProfile, Q as FetchSuggestionsOptions, b4 as SuggestionsResponse, W as FollowUserResult, y as FetchFollowListOptions, T as FollowListPage, a0 as FollowingResponse, G as FetchFollowingFeedOptions, _ as FollowingFeedResponse, $ as FollowingFeedVersion, z as FetchFollowProfilePageOptions, V as FollowProfilePageResponse, F as FeatureAllowlistResponse, h as AdminReviewQueues, u as FetchActivityFeedOptions, c as ActivityFeedResponse, g as ActivityTeaserResponse, a7 as HeatmapResponse, ag as MyGithubPullRequestsResponse, A as AccountCheckResult, aH as ReactionStatus, aG as ReactionResult, aF as ReactionError, j as CastRoadmapVoteResult, aQ as RoadmapItemRef, D as DeleteAccountResult, aL as ResetProfileResult, bh as WipePreview, aK as RepoDeleteInput, ai as OrgClaimResult, ao as OrgProfileUpdateResult, aj as OrgDomainChallengeResult, ak as OrgDomainVerifyResult, al as OrgNotificationEmailAddResult, am as OrgNotificationEmailRemoveResult, bd as UserSettings } from './user-settings-BdNrDa9O.js';
8
8
  import { z } from 'zod';
9
9
  import { i as EntitySearchResponse, E as EntitySearchResult, c as EntityMintDomainResponse, g as EntityResolveDomainResponse, n as EntitySelectResponse, l as EntitySelectRequest, r as FeatureFlag } from './follow-profile-CVcA2w1v.js';
10
10
  import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-BShvhyFp.js';
@@ -1045,29 +1045,14 @@ interface DeleteReactionVariables {
1045
1045
  /** React hook for deleting a reaction. */
1046
1046
  declare function useDeleteReaction(options?: Omit<UseMutationOptions<WriteResult, Error, DeleteReactionVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, DeleteReactionVariables, unknown>;
1047
1047
 
1048
- /** Public roadmap vote tallies. Returns `{}` data on error. */
1049
- declare function useRoadmapVotes(options?: Omit<UseQueryOptions<RoadmapVotesResponse, Error, RoadmapVotesResponse, ReturnType<typeof sifaQueryKeys.roadmap.votes>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<RoadmapVotesResponse, Error>;
1050
- /** Roadmap items the authenticated viewer has voted on. Returns `[]` data on error. */
1051
- declare function useMyRoadmapVotes(options?: Omit<UseQueryOptions<string[], Error, string[], ReturnType<typeof sifaQueryKeys.roadmap.myVotes>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<string[], Error>;
1052
-
1053
- /**
1054
- * React hook for casting a roadmap vote. Variable: the item key.
1055
- *
1056
- * Returns the discriminated-union result so callers can detect
1057
- * `scope_insufficient` and trigger an OAuth scope-upgrade flow
1058
- * (see {@link castRoadmapVote}).
1059
- */
1060
- declare function useCastRoadmapVote(options?: Omit<UseMutationOptions<CastRoadmapVoteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CastRoadmapVoteResult, Error, string, unknown>;
1061
- /** React hook for retracting a previously-cast roadmap vote. */
1062
- declare function useRetractRoadmapVote(options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1063
1048
  /**
1064
1049
  * React hook for voting on a roadmap board item. Variable: the item's
1065
- * `{ did, rkey }`. Returns the same discriminated-union result as
1066
- * {@link useCastRoadmapVote}.
1050
+ * `{ did, rkey }`. Returns the discriminated-union result so callers can
1051
+ * detect `scope_insufficient` and trigger an OAuth scope-upgrade flow.
1067
1052
  *
1068
- * Board data from `fetchRoadmap` is usually server-rendered, so the
1069
- * invalidation here does not refresh it: keep optimistic local state or call
1070
- * `router.refresh()`. Voting twice is safe; the API answers 200.
1053
+ * Board data from `fetchRoadmap` is not held in the query cache, so nothing is
1054
+ * invalidated here: keep optimistic local state or call `router.refresh()`.
1055
+ * Voting twice is safe; the API answers 200.
1071
1056
  */
1072
1057
  declare function useCastRoadmapItemVote(options?: Omit<UseMutationOptions<CastRoadmapVoteResult, Error, RoadmapItemRef>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CastRoadmapVoteResult, Error, RoadmapItemRef, unknown>;
1073
1058
  /** React hook for retracting a vote on a roadmap board item. */
@@ -1267,4 +1252,4 @@ declare function useUpdateUserSettings(): _tanstack_react_query.UseMutationResul
1267
1252
  showCitationCounts: boolean;
1268
1253
  }>, unknown>;
1269
1254
 
1270
- export { revokeOrgAttestation as $, type AddFeatureAllowlistVariables as A, type UseMyGithubPullRequestsParams as B, type CreateOrgAttestationInput as C, type DeleteReactionVariables as D, type VerificationEventKind as E, type FetchOrgAttestationOptions as F, type VerificationLog as G, type VerificationLogEntry as H, VerificationLogEntrySchema as I, VerificationLogSchema as J, addProfileEmail as K, createOrgAttestation as L, fetchAttestationRequests as M, fetchOrgAttestations as N, type OrgAttestation as O, type PositionSkillLinkVariables as P, fetchProfileEmails as Q, type RemoveFeatureAllowlistVariables as R, SifaProvider as S, fetchVerificationLog as T, type UnfollowVariables as U, VERIFICATION_EVENT_KINDS as V, offboardOrgAttestation as W, rejectAttestationRequest as X, removeProfileEmail as Y, requestEmploymentConfirmation as Z, resendProfileEmailVerification as _, type AttestationRequest as a, useHideKeytraceClaim as a$, useAccounts as a0, useActivityFeed as a1, useActivityPreferences as a2, useActivityTeaser as a3, useAddFeatureAllowlist as a4, useAddOrgNotificationEmail as a5, useAddProfileEmail as a6, useAdminReviewQueues as a7, useAppAccountCheck as a8, useAppsRegistry as a9, useDeleteNamePronunciationAudio as aA, useDeletePosition as aB, useDeleteProfileLocation as aC, useDeleteReaction as aD, useDeleteRecord as aE, useDeleteRepoRecords as aF, useDeleteSkill as aG, useDismissCompletenessSignal as aH, useDismissConfirmation as aI, useDismissUnlinkedPosition as aJ, useEndorsementCount as aK, useEntitySearch as aL, useExternalAccounts as aM, useFeatureAllowlist as aN, useFeaturedProfile as aO, useFollow as aP, useFollowers as aQ, useFollowing as aR, useFollowingFeed as aS, useFollowingFeedVersion as aT, useFollowingList as aU, useGetProfileView as aV, useGivenConfirmations as aW, useHeatmapData as aX, useHiddenActivityItems as aY, useHiddenApps as aZ, useHideActivityItem as a_, useAtFundLink as aa, useAttestationRequests as ab, useBlueskySuggestions as ac, useBulkHideProfileItems as ad, useBulkHideStandardPublications as ae, useBulkUnhideProfileItems as af, useBulkUnhideStandardPublications as ag, useCanonicalSkillSearch as ah, useCastRoadmapItemVote as ai, useCastRoadmapVote as aj, useClearCompletenessDismissals as ak, useCreateConfirmation as al, useCreateEducation as am, useCreateEndorsement as an, useCreateExternalAccount as ao, useCreateOrgAttestation as ap, useCreatePosition as aq, useCreateProfileLocation as ar, useCreateReaction as as, useCreateRecord as at, useCreateSkill as au, useDebouncedValue as av, useDeleteAccount as aw, useDeleteAvatarOverride as ax, useDeleteEducation as ay, useDeleteExternalAccount as az, AttestationRequestSchema as b, useUnlinkedPositions as b$, useHideOrcidPublication as b0, useHideProfileItem as b1, useHideSifaPublication as b2, useHideStandardPublication as b3, useImportSearchEntities as b4, useInboxCounts as b5, useLinkSkillToPosition as b6, useMintEntityDomain as b7, useMutuals as b8, useMyGithubPullRequests as b9, useRevealMarqueDomain as bA, useRevokeConfirmation as bB, useRevokeOrgAttestation as bC, useRoadmapVotes as bD, useRpgClaimable as bE, useRpgStatus as bF, useSearchFilters as bG, useSearchProfiles as bH, useSelectEntity as bI, useSetExternalAccountPrimary as bJ, useSetPositionPrimary as bK, useSetSectionPrimary as bL, useSifaConfig as bM, useSimilarProfiles as bN, useSiteActivityPreset as bO, useSkillSuggestions as bP, useStats as bQ, useSuggestionCount as bR, useSuggestions as bS, useUnfollow as bT, useUnhideActivityItem as bU, useUnhideKeytraceClaim as bV, useUnhideOrcidPublication as bW, useUnhideProfileItem as bX, useUnhideSifaPublication as bY, useUnhideStandardPublication as bZ, useUnlinkSkillFromPosition as b_, useMyRoadmapVotes as ba, useNetworkStreamCount as bb, useOffboardOrgAttestation as bc, useOrgAttestations as bd, useOrgClaim as be, useOrgDomainChallenge as bf, useOrgDomainVerify as bg, useOrgProfile as bh, usePendingConfirmations as bi, useProfile as bj, useProfileCompleteness as bk, useProfileEmails as bl, useReactionStatus as bm, useRefreshOrcidPublications as bn, useRefreshPds as bo, useRejectAttestationRequest as bp, useRemoveFeatureAllowlist as bq, useRemoveOrgNotificationEmail as br, useRemoveProfileEmail as bs, useRepoInventory as bt, useRequestEmploymentConfirmation as bu, useResendProfileEmailVerification as bv, useResetProfile as bw, useResolveEntityDomain as bx, useRetractRoadmapItemVote as by, useRetractRoadmapVote as bz, type AttestationStatus as c, useUnrevealMarqueDomain as c0, useUnsetExternalAccountPrimary as c1, useUnsetPositionPrimary as c2, useUnsetSectionPrimary as c3, useUpdateActivityPreferences as c4, useUpdateEducation as c5, useUpdateExternalAccount as c6, useUpdateOrgProfile as c7, useUpdatePosition as c8, useUpdateProfileLocation as c9, useUpdateProfileOverride as ca, useUpdateProfileSelf as cb, useUpdateRecord as cc, useUpdateSkill as cd, useUpdateSkillSubCategories as ce, useUpdateUserSettings as cf, useUploadAvatar as cg, useUploadNamePronunciationAudio as ch, useUserSettings as ci, useVerificationLog as cj, useVerifyExternalAccount as ck, useWipePreview as cl, useSearchCompanies as cm, type CreateOrgAttestationResult as d, type CreateReactionVariables as e, type CreateRecordVariables as f, type DeleteRecordVariables as g, type FetchProfileEmailsOptions as h, type FetchVerificationLogOptions as i, type FollowVariables as j, OrgAttestationSchema as k, type ProfileEmail as l, ProfileEmailSchema as m, type ProfileEmailSendStatus as n, type ProfileEmails as o, type RequestEmploymentConfirmationInput as p, type RequestEmploymentConfirmationResult as q, type SifaProviderProps as r, type UpdateEducationVariables as s, type UpdateExternalAccountVariables as t, type UpdatePositionVariables as u, type UpdateProfileLocationVariables as v, type UpdateRecordVariables as w, type UpdateSkillSubCategoriesVariables as x, type UpdateSkillVariables as y, type UseEntitySearchOptions as z };
1255
+ export { revokeOrgAttestation as $, type AddFeatureAllowlistVariables as A, type UseMyGithubPullRequestsParams as B, type CreateOrgAttestationInput as C, type DeleteReactionVariables as D, type VerificationEventKind as E, type FetchOrgAttestationOptions as F, type VerificationLog as G, type VerificationLogEntry as H, VerificationLogEntrySchema as I, VerificationLogSchema as J, addProfileEmail as K, createOrgAttestation as L, fetchAttestationRequests as M, fetchOrgAttestations as N, type OrgAttestation as O, type PositionSkillLinkVariables as P, fetchProfileEmails as Q, type RemoveFeatureAllowlistVariables as R, SifaProvider as S, fetchVerificationLog as T, type UnfollowVariables as U, VERIFICATION_EVENT_KINDS as V, offboardOrgAttestation as W, rejectAttestationRequest as X, removeProfileEmail as Y, requestEmploymentConfirmation as Z, resendProfileEmailVerification as _, type AttestationRequest as a, useHideOrcidPublication as a$, useAccounts as a0, useActivityFeed as a1, useActivityPreferences as a2, useActivityTeaser as a3, useAddFeatureAllowlist as a4, useAddOrgNotificationEmail as a5, useAddProfileEmail as a6, useAdminReviewQueues as a7, useAppAccountCheck as a8, useAppsRegistry as a9, useDeletePosition as aA, useDeleteProfileLocation as aB, useDeleteReaction as aC, useDeleteRecord as aD, useDeleteRepoRecords as aE, useDeleteSkill as aF, useDismissCompletenessSignal as aG, useDismissConfirmation as aH, useDismissUnlinkedPosition as aI, useEndorsementCount as aJ, useEntitySearch as aK, useExternalAccounts as aL, useFeatureAllowlist as aM, useFeaturedProfile as aN, useFollow as aO, useFollowers as aP, useFollowing as aQ, useFollowingFeed as aR, useFollowingFeedVersion as aS, useFollowingList as aT, useGetProfileView as aU, useGivenConfirmations as aV, useHeatmapData as aW, useHiddenActivityItems as aX, useHiddenApps as aY, useHideActivityItem as aZ, useHideKeytraceClaim as a_, useAtFundLink as aa, useAttestationRequests as ab, useBlueskySuggestions as ac, useBulkHideProfileItems as ad, useBulkHideStandardPublications as ae, useBulkUnhideProfileItems as af, useBulkUnhideStandardPublications as ag, useCanonicalSkillSearch as ah, useCastRoadmapItemVote as ai, useClearCompletenessDismissals as aj, useCreateConfirmation as ak, useCreateEducation as al, useCreateEndorsement as am, useCreateExternalAccount as an, useCreateOrgAttestation as ao, useCreatePosition as ap, useCreateProfileLocation as aq, useCreateReaction as ar, useCreateRecord as as, useCreateSkill as at, useDebouncedValue as au, useDeleteAccount as av, useDeleteAvatarOverride as aw, useDeleteEducation as ax, useDeleteExternalAccount as ay, useDeleteNamePronunciationAudio as az, AttestationRequestSchema as b, useUnsetSectionPrimary as b$, useHideProfileItem as b0, useHideSifaPublication as b1, useHideStandardPublication as b2, useImportSearchEntities as b3, useInboxCounts as b4, useLinkSkillToPosition as b5, useMintEntityDomain as b6, useMutuals as b7, useMyGithubPullRequests as b8, useNetworkStreamCount as b9, useRpgClaimable as bA, useRpgStatus as bB, useSearchFilters as bC, useSearchProfiles as bD, useSelectEntity as bE, useSetExternalAccountPrimary as bF, useSetPositionPrimary as bG, useSetSectionPrimary as bH, useSifaConfig as bI, useSimilarProfiles as bJ, useSiteActivityPreset as bK, useSkillSuggestions as bL, useStats as bM, useSuggestionCount as bN, useSuggestions as bO, useUnfollow as bP, useUnhideActivityItem as bQ, useUnhideKeytraceClaim as bR, useUnhideOrcidPublication as bS, useUnhideProfileItem as bT, useUnhideSifaPublication as bU, useUnhideStandardPublication as bV, useUnlinkSkillFromPosition as bW, useUnlinkedPositions as bX, useUnrevealMarqueDomain as bY, useUnsetExternalAccountPrimary as bZ, useUnsetPositionPrimary as b_, useOffboardOrgAttestation as ba, useOrgAttestations as bb, useOrgClaim as bc, useOrgDomainChallenge as bd, useOrgDomainVerify as be, useOrgProfile as bf, usePendingConfirmations as bg, useProfile as bh, useProfileCompleteness as bi, useProfileEmails as bj, useReactionStatus as bk, useRefreshOrcidPublications as bl, useRefreshPds as bm, useRejectAttestationRequest as bn, useRemoveFeatureAllowlist as bo, useRemoveOrgNotificationEmail as bp, useRemoveProfileEmail as bq, useRepoInventory as br, useRequestEmploymentConfirmation as bs, useResendProfileEmailVerification as bt, useResetProfile as bu, useResolveEntityDomain as bv, useRetractRoadmapItemVote as bw, useRevealMarqueDomain as bx, useRevokeConfirmation as by, useRevokeOrgAttestation as bz, type AttestationStatus as c, useUpdateActivityPreferences as c0, useUpdateEducation as c1, useUpdateExternalAccount as c2, useUpdateOrgProfile as c3, useUpdatePosition as c4, useUpdateProfileLocation as c5, useUpdateProfileOverride as c6, useUpdateProfileSelf as c7, useUpdateRecord as c8, useUpdateSkill as c9, useUpdateSkillSubCategories as ca, useUpdateUserSettings as cb, useUploadAvatar as cc, useUploadNamePronunciationAudio as cd, useUserSettings as ce, useVerificationLog as cf, useVerifyExternalAccount as cg, useWipePreview as ch, useSearchCompanies as ci, type CreateOrgAttestationResult as d, type CreateReactionVariables as e, type CreateRecordVariables as f, type DeleteRecordVariables as g, type FetchProfileEmailsOptions as h, type FetchVerificationLogOptions as i, type FollowVariables as j, OrgAttestationSchema as k, type ProfileEmail as l, ProfileEmailSchema as m, type ProfileEmailSendStatus as n, type ProfileEmails as o, type RequestEmploymentConfirmationInput as p, type RequestEmploymentConfirmationResult as q, type SifaProviderProps as r, type UpdateEducationVariables as s, type UpdateExternalAccountVariables as t, type UpdatePositionVariables as u, type UpdateProfileLocationVariables as v, type UpdateRecordVariables as w, type UpdateSkillSubCategoriesVariables as x, type UpdateSkillVariables as y, type UseEntitySearchOptions as z };