@singi-labs/sifa-sdk 0.19.85 → 0.19.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2987,6 +2987,20 @@ function openAlexWorkUrl(id) {
2987
2987
  return match ? `https://openalex.org/${match[1]}` : void 0;
2988
2988
  }
2989
2989
 
2990
+ // src/jsonld/url.ts
2991
+ var DEFAULT_BASE_URL = "https://sifa.id";
2992
+ function normaliseBaseUrl(baseUrl) {
2993
+ const value = baseUrl ?? DEFAULT_BASE_URL;
2994
+ let end = value.length;
2995
+ while (end > 0 && value.charCodeAt(end - 1) === 47) end -= 1;
2996
+ return value.slice(0, end);
2997
+ }
2998
+
2999
+ // src/format/blob-proxy-url.ts
3000
+ function blobProxyUrl(baseUrl, did, cid, variant) {
3001
+ return `${normaliseBaseUrl(baseUrl)}/api/blob/${encodeURIComponent(did)}/${encodeURIComponent(cid)}?v=${variant}`;
3002
+ }
3003
+
2990
3004
  // src/format/endorsement-context.ts
2991
3005
  var RELATIONSHIP_PREFIX = /^\[(\w+?)(?:: ([^\]]+))?\]\s*/;
2992
3006
  function formatRelationship(type, detail) {
@@ -3621,6 +3635,7 @@ var ROLE_TOKENS = {
3621
3635
  workshop: "id.sifa.defs#workshop",
3622
3636
  host: "id.sifa.defs#host"
3623
3637
  };
3638
+ var PRESENTATION_ROLE_VALUES = Object.keys(ROLE_TOKENS);
3624
3639
  function normalizePresentationRole(value) {
3625
3640
  const v = clean2(value).toLowerCase();
3626
3641
  if (!v) return void 0;
@@ -3646,6 +3661,7 @@ var MODE_FRAGMENTS = {
3646
3661
  remote: "#virtual",
3647
3662
  hybrid: "#hybrid"
3648
3663
  };
3664
+ var PRESENTATION_MODE_VALUES = Object.keys(MODE_FRAGMENTS);
3649
3665
  function normalizePresentationMode(value) {
3650
3666
  const v = clean2(value).toLowerCase();
3651
3667
  if (!v) return void 0;
@@ -3694,6 +3710,297 @@ function presentationDeliveryCsvRowToRecord(row) {
3694
3710
  if (links.length) record.links = links;
3695
3711
  return { presentationKey: clean2(row.presentation_key) || void 0, record };
3696
3712
  }
3713
+ var writeLocationSchema = zod.z.union([
3714
+ zod.z.object({
3715
+ country: zod.z.string().nullish(),
3716
+ countryCode: zod.z.string().length(2).nullish(),
3717
+ region: zod.z.string().nullish(),
3718
+ city: zod.z.string().nullish(),
3719
+ locality: zod.z.string().nullish(),
3720
+ street: zod.z.string().nullish(),
3721
+ postalCode: zod.z.string().nullish(),
3722
+ name: zod.z.string().nullish()
3723
+ }),
3724
+ zod.z.string()
3725
+ ]).nullable().optional();
3726
+ zod.z.object({
3727
+ uri: zod.z.string()
3728
+ });
3729
+ function httpUrlOrNull(input) {
3730
+ if (typeof input !== "string") return null;
3731
+ try {
3732
+ const url = new URL(input);
3733
+ return url.protocol === "http:" || url.protocol === "https:" ? input : null;
3734
+ } catch {
3735
+ return null;
3736
+ }
3737
+ }
3738
+ var DATE_ONLY_RE = /^\d{4}-\d{2}-\d{2}$/;
3739
+ function isValidDateOnly(input) {
3740
+ if (typeof input !== "string" || !DATE_ONLY_RE.test(input)) return false;
3741
+ const parsed3 = /* @__PURE__ */ new Date(`${input}T00:00:00Z`);
3742
+ return !Number.isNaN(parsed3.getTime()) && parsed3.toISOString().startsWith(input);
3743
+ }
3744
+ var PARTIAL_DATE_RE = /^\d{4}(-(0[1-9]|1[0-2]))?$/;
3745
+ function isValidPartialDate(input) {
3746
+ if (typeof input !== "string") return false;
3747
+ return PARTIAL_DATE_RE.test(input) || isValidDateOnly(input);
3748
+ }
3749
+ zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional();
3750
+ zod.z.object({
3751
+ url: zod.z.string().max(2048).refine((v) => httpUrlOrNull(v) !== null, "must be an http(s) URL"),
3752
+ kind: zod.z.string().max(64).nullable().optional(),
3753
+ label: zod.z.string().max(2e3).nullable().optional()
3754
+ });
3755
+ var externalRecordRefSchema = zod.z.object({
3756
+ uri: zod.z.string().regex(/^at:\/\/[^/\s]+\/[^/\s]+\/[^/\s]+$/, "must be an at-uri"),
3757
+ // CIDv0 (`Qm…`) or CIDv1 (base32, `b…`). Loose but rejects arbitrary strings.
3758
+ cid: zod.z.string().max(256).regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z2-7]+)$/, "must be a CID").optional()
3759
+ });
3760
+ var presentationLinkSchema = zod.z.object({
3761
+ uri: zod.z.string().max(2048).refine((v) => httpUrlOrNull(v) !== null, "must be an http(s) URL"),
3762
+ label: zod.z.string().max(640).nullable().optional(),
3763
+ type: zod.z.string().max(256).nullable().optional()
3764
+ });
3765
+ var PresentationDeliveryWriteSchema = zod.z.object({
3766
+ presentationRef: externalRecordRefSchema.optional(),
3767
+ /**
3768
+ * The same session as recorded on another person's profile. Distinct from
3769
+ * presentationRef above, which points at the talk this session delivered.
3770
+ */
3771
+ sameAs: externalRecordRefSchema.optional(),
3772
+ title: zod.z.string().max(3e3).nullable().optional(),
3773
+ role: zod.z.string().max(640).nullable().optional(),
3774
+ eventName: zod.z.string().max(3e3).nullable().optional(),
3775
+ // YYYY-MM-DD, or YYYY-MM / YYYY when the exact day is unknown.
3776
+ date: zod.z.string().refine(isValidPartialDate, "must be a valid YYYY, YYYY-MM or YYYY-MM-DD date").nullable().optional(),
3777
+ location: zod.z.string().max(2560).nullable().optional(),
3778
+ // Structured community.lexicon.location.address; `location` above stays as
3779
+ // the legacy free-text fallback. writeLocationSchema is already nullable+optional.
3780
+ address: writeLocationSchema,
3781
+ mode: zod.z.string().max(256).nullable().optional(),
3782
+ status: zod.z.string().max(256).nullable().optional(),
3783
+ links: zod.z.array(presentationLinkSchema).max(20).optional(),
3784
+ eventRef: externalRecordRefSchema.optional(),
3785
+ coSpeakers: zod.z.array(zod.z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID")).max(20).optional()
3786
+ });
3787
+ var BlobRefSchema = zod.z.object({
3788
+ $type: zod.z.literal("blob"),
3789
+ ref: zod.z.object({ $link: zod.z.string().min(1) }),
3790
+ mimeType: zod.z.string().min(1).max(255),
3791
+ size: zod.z.number().int().nonnegative()
3792
+ });
3793
+
3794
+ // src/schemas/write/presentation.ts
3795
+ var PresentationWriteSchema = zod.z.object({
3796
+ title: zod.z.string().min(1).max(3e3),
3797
+ description: zod.z.string().max(5e4).nullable().optional(),
3798
+ duration: zod.z.object({
3799
+ minMinutes: zod.z.number().int().min(1),
3800
+ maxMinutes: zod.z.number().int().min(1).optional()
3801
+ }).refine((d) => d.maxMinutes === void 0 || d.maxMinutes >= d.minMinutes, {
3802
+ message: "maxMinutes must be greater than or equal to minMinutes",
3803
+ path: ["maxMinutes"]
3804
+ }).optional(),
3805
+ intendedAudiences: zod.z.array(zod.z.string().max(1e3)).max(20).optional(),
3806
+ links: zod.z.array(presentationLinkSchema).max(20).optional(),
3807
+ writeupRef: externalRecordRefSchema.optional(),
3808
+ coverImage: BlobRefSchema.nullable().optional()
3809
+ });
3810
+ function maxGraphemes(max) {
3811
+ return (value) => {
3812
+ const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
3813
+ let count = 0;
3814
+ for (const _ of segmenter.segment(value)) {
3815
+ count++;
3816
+ if (count > max) return false;
3817
+ }
3818
+ return true;
3819
+ };
3820
+ }
3821
+ var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
3822
+ var datetimeSchema = zod.z.string().datetime({ offset: true });
3823
+ var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
3824
+ var atUriSchema = zod.z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
3825
+ var cidSchema = zod.z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
3826
+ var languageTagSchema = zod.z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
3827
+ var uriSchema = zod.z.string().url();
3828
+ var strongRefSchema = zod.z.object({
3829
+ uri: atUriSchema,
3830
+ cid: cidSchema
3831
+ });
3832
+ var skillRefSchema2 = zod.z.object({
3833
+ uri: atUriSchema
3834
+ });
3835
+ var externalRecordRefSchema2 = zod.z.object({
3836
+ uri: atUriSchema,
3837
+ cid: cidSchema.optional()
3838
+ });
3839
+ var agentRefSchema = zod.z.object({
3840
+ name: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
3841
+ did: didSchema.optional(),
3842
+ entityRef: uriSchema.optional()
3843
+ }).passthrough();
3844
+ var selfLabelsSchema = zod.z.object({
3845
+ $type: zod.z.literal("com.atproto.label.defs#selfLabels").optional(),
3846
+ values: zod.z.array(zod.z.object({ val: zod.z.string() }))
3847
+ });
3848
+
3849
+ // src/import/talks-import-validation.ts
3850
+ var PRESENTATION_URL_COLUMNS = ["slides_url", "recording_url", "writeup_url"];
3851
+ var DELIVERY_URL_COLUMNS = ["event_url", "recording_url"];
3852
+ var RECORD_FIELD_COLUMNS = {
3853
+ title: "title",
3854
+ description: "description",
3855
+ intendedAudiences: "intended_audiences",
3856
+ eventName: "event_name",
3857
+ location: "location"
3858
+ };
3859
+ function schemaErrorColumn(error) {
3860
+ const field = error.issues[0]?.path[0];
3861
+ return typeof field === "string" ? RECORD_FIELD_COLUMNS[field] : void 0;
3862
+ }
3863
+ function cell(row, column) {
3864
+ return (row[column] ?? "").trim();
3865
+ }
3866
+ function urlIssues(row, rowNumber, file, columns) {
3867
+ return columns.flatMap((column) => {
3868
+ const value = cell(row, column);
3869
+ return value && httpUrlOrNull(value) === null ? [{ file, row: rowNumber, column, value, code: "invalidUrl", severity: "error" }] : [];
3870
+ });
3871
+ }
3872
+ function validateTalksImport(input, now = /* @__PURE__ */ new Date()) {
3873
+ const issues = [];
3874
+ const presentations = [];
3875
+ const deliveries = [];
3876
+ const validKeys = /* @__PURE__ */ new Set();
3877
+ const skippedKeys = /* @__PURE__ */ new Set();
3878
+ input.presentationRows.forEach((row, index) => {
3879
+ const rowNumber = index + 2;
3880
+ const rowIssues = [];
3881
+ const parsed3 = presentationCsvRowToRecord(row);
3882
+ if (!parsed3.record.title) {
3883
+ rowIssues.push({
3884
+ file: "presentations",
3885
+ row: rowNumber,
3886
+ column: "title",
3887
+ code: "missingTitle",
3888
+ severity: "error"
3889
+ });
3890
+ }
3891
+ rowIssues.push(...urlIssues(row, rowNumber, "presentations", PRESENTATION_URL_COLUMNS));
3892
+ const schema = rowIssues.length === 0 ? PresentationWriteSchema.safeParse(parsed3.record) : null;
3893
+ if (schema && !schema.success) {
3894
+ const column = schemaErrorColumn(schema.error);
3895
+ rowIssues.push({
3896
+ file: "presentations",
3897
+ row: rowNumber,
3898
+ ...column ? { column } : {},
3899
+ code: "invalidRecord",
3900
+ severity: "error"
3901
+ });
3902
+ }
3903
+ issues.push(...rowIssues);
3904
+ if (rowIssues.length > 0) {
3905
+ if (parsed3.key) skippedKeys.add(parsed3.key);
3906
+ return;
3907
+ }
3908
+ presentations.push(parsed3);
3909
+ if (parsed3.key) validKeys.add(parsed3.key);
3910
+ });
3911
+ input.deliveryRows.forEach((row, index) => {
3912
+ const rowNumber = index + 2;
3913
+ const rowIssues = [];
3914
+ const parsed3 = presentationDeliveryCsvRowToRecord(row);
3915
+ const { record, presentationKey } = parsed3;
3916
+ const linked = presentationKey !== void 0 && validKeys.has(presentationKey);
3917
+ if (presentationKey !== void 0 && skippedKeys.has(presentationKey) && !linked) {
3918
+ rowIssues.push({
3919
+ file: "deliveries",
3920
+ row: rowNumber,
3921
+ column: "presentation_key",
3922
+ value: presentationKey,
3923
+ code: "linkedTalkSkipped",
3924
+ severity: "error"
3925
+ });
3926
+ } else if (presentationKey !== void 0 && !linked) {
3927
+ rowIssues.push({
3928
+ file: "deliveries",
3929
+ row: rowNumber,
3930
+ column: "presentation_key",
3931
+ value: presentationKey,
3932
+ code: "unknownPresentationKey",
3933
+ severity: "warning"
3934
+ });
3935
+ }
3936
+ if (!record.title && !record.eventName && !linked && !skippedKeys.has(presentationKey ?? "")) {
3937
+ rowIssues.push({
3938
+ file: "deliveries",
3939
+ row: rowNumber,
3940
+ code: "missingTitleOrEvent",
3941
+ severity: "error"
3942
+ });
3943
+ }
3944
+ if (record.date && !isValidPartialDate(record.date)) {
3945
+ rowIssues.push({
3946
+ file: "deliveries",
3947
+ row: rowNumber,
3948
+ column: "date",
3949
+ value: record.date,
3950
+ code: "invalidDate",
3951
+ severity: "error"
3952
+ });
3953
+ } else if (record.date && isBeyondLookahead(record.date, DATE_LOOKAHEAD_MONTHS.talk, now)) {
3954
+ rowIssues.push({
3955
+ file: "deliveries",
3956
+ row: rowNumber,
3957
+ column: "date",
3958
+ value: record.date,
3959
+ code: "dateTooFarAhead",
3960
+ severity: "error"
3961
+ });
3962
+ }
3963
+ rowIssues.push(...urlIssues(row, rowNumber, "deliveries", DELIVERY_URL_COLUMNS));
3964
+ const role = cell(row, "role");
3965
+ if (role && !record.role) {
3966
+ rowIssues.push({
3967
+ file: "deliveries",
3968
+ row: rowNumber,
3969
+ column: "role",
3970
+ value: role,
3971
+ code: "unknownRole",
3972
+ severity: "warning"
3973
+ });
3974
+ }
3975
+ const mode = cell(row, "mode");
3976
+ if (mode && !record.mode) {
3977
+ rowIssues.push({
3978
+ file: "deliveries",
3979
+ row: rowNumber,
3980
+ column: "mode",
3981
+ value: mode,
3982
+ code: "unknownMode",
3983
+ severity: "warning"
3984
+ });
3985
+ }
3986
+ let hasError = rowIssues.some((i) => i.severity === "error");
3987
+ const schema = hasError ? null : PresentationDeliveryWriteSchema.safeParse(record);
3988
+ if (schema && !schema.success) {
3989
+ const column = schemaErrorColumn(schema.error);
3990
+ rowIssues.push({
3991
+ file: "deliveries",
3992
+ row: rowNumber,
3993
+ ...column ? { column } : {},
3994
+ code: "invalidRecord",
3995
+ severity: "error"
3996
+ });
3997
+ hasError = true;
3998
+ }
3999
+ issues.push(...rowIssues);
4000
+ if (!hasError) deliveries.push(parsed3);
4001
+ });
4002
+ return { presentations, deliveries, issues };
4003
+ }
3697
4004
 
3698
4005
  // src/cards/app-url-patterns.ts
3699
4006
  var APP_URL_PATTERNS = Object.freeze({
@@ -4576,7 +4883,8 @@ var streamMediaBlobSchema = zod.z.object({
4576
4883
  cid: zod.z.string(),
4577
4884
  alt: zod.z.string(),
4578
4885
  aspectRatio: aspectRatioSchema.optional(),
4579
- mimeType: zod.z.string().optional()
4886
+ mimeType: zod.z.string().optional(),
4887
+ size: zod.z.number().int().nonnegative().optional()
4580
4888
  });
4581
4889
  var streamMediaSchema = zod.z.union([
4582
4890
  streamMediaResolvedSchema,
@@ -4787,44 +5095,6 @@ var streamCardVMSchema = zod.z.lazy(
4787
5095
  certifiedDetails: certifiedDetailsSchema.optional()
4788
5096
  })
4789
5097
  );
4790
- function maxGraphemes(max) {
4791
- return (value) => {
4792
- const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
4793
- let count = 0;
4794
- for (const _ of segmenter.segment(value)) {
4795
- count++;
4796
- if (count > max) return false;
4797
- }
4798
- return true;
4799
- };
4800
- }
4801
- var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
4802
- var datetimeSchema = zod.z.string().datetime({ offset: true });
4803
- var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
4804
- var atUriSchema = zod.z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
4805
- var cidSchema = zod.z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
4806
- var languageTagSchema = zod.z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
4807
- var uriSchema = zod.z.string().url();
4808
- var strongRefSchema = zod.z.object({
4809
- uri: atUriSchema,
4810
- cid: cidSchema
4811
- });
4812
- var skillRefSchema = zod.z.object({
4813
- uri: atUriSchema
4814
- });
4815
- var externalRecordRefSchema = zod.z.object({
4816
- uri: atUriSchema,
4817
- cid: cidSchema.optional()
4818
- });
4819
- var agentRefSchema = zod.z.object({
4820
- name: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
4821
- did: didSchema.optional(),
4822
- entityRef: uriSchema.optional()
4823
- }).passthrough();
4824
- var selfLabelsSchema = zod.z.object({
4825
- $type: zod.z.literal("com.atproto.label.defs#selfLabels").optional(),
4826
- values: zod.z.array(zod.z.object({ val: zod.z.string() }))
4827
- });
4828
5098
 
4829
5099
  // src/publishing/registry.ts
4830
5100
  var STANDARD_SITE_PUBLISHERS = Object.freeze([
@@ -4882,6 +5152,9 @@ function aspectRatio(value) {
4882
5152
  function asFiniteNumber(value) {
4883
5153
  return typeof value === "number" && Number.isFinite(value) ? value : void 0;
4884
5154
  }
5155
+ function asByteSize(value) {
5156
+ return typeof value === "number" && Number.isInteger(value) && value >= 0 ? value : void 0;
5157
+ }
4885
5158
  function looseBlobCid(value) {
4886
5159
  const viaRef = blobCid(value);
4887
5160
  if (viaRef) return viaRef;
@@ -4896,6 +5169,8 @@ function blobMedia(value, did, alt) {
4896
5169
  if (ratio) media.aspectRatio = ratio;
4897
5170
  const mimeType = asNonEmptyString(asRecord(value)?.mimeType);
4898
5171
  if (mimeType) media.mimeType = mimeType;
5172
+ const size = asByteSize(asRecord(value)?.size);
5173
+ if (size !== void 0) media.size = size;
4899
5174
  return media;
4900
5175
  }
4901
5176
  function hashSuffix(value) {
@@ -5057,6 +5332,8 @@ function bskyImages(embed, did) {
5057
5332
  if (ratio) media.aspectRatio = ratio;
5058
5333
  const mimeType = asNonEmptyString(asRecord(img.image)?.mimeType);
5059
5334
  if (mimeType) media.mimeType = mimeType;
5335
+ const size = asByteSize(asRecord(img.image)?.size);
5336
+ if (size !== void 0) media.size = size;
5060
5337
  out.push(media);
5061
5338
  }
5062
5339
  return out;
@@ -5445,9 +5722,13 @@ function genericMedia(record, did, alt) {
5445
5722
  }
5446
5723
  const single = blobMedia(record.image, did, alt) ?? blobMedia(record.thumbnail, did, alt) ?? blobMedia(record.thumb, did, alt) ?? blobMedia(record.photo, did, alt) ?? (embed ? blobMedia(embed.thumbnail, did, alt) : void 0);
5447
5724
  if (single) return [single];
5448
- const coverCid = asRecord(record.galleryMeta)?.coverPhotoCid;
5725
+ const galleryMeta = asRecord(record.galleryMeta);
5726
+ const coverCid = galleryMeta?.coverPhotoCid;
5449
5727
  if (typeof coverCid === "string" && coverCid.length > 0) {
5450
- return [{ did, cid: coverCid, alt }];
5728
+ const cover = { did, cid: coverCid, alt };
5729
+ const size = asByteSize(galleryMeta?.coverPhotoSize);
5730
+ if (size !== void 0) cover.size = size;
5731
+ return [cover];
5451
5732
  }
5452
5733
  return [];
5453
5734
  }
@@ -6448,12 +6729,6 @@ function buildProfileHighlights(profile, { today }) {
6448
6729
  function shouldRenderHighlights(rows) {
6449
6730
  return rows.row1.length + rows.row2.length >= 2;
6450
6731
  }
6451
- var BlobRefSchema = zod.z.object({
6452
- $type: zod.z.literal("blob"),
6453
- ref: zod.z.object({ $link: zod.z.string().min(1) }),
6454
- mimeType: zod.z.string().min(1).max(255),
6455
- size: zod.z.number().int().nonnegative()
6456
- });
6457
6732
  var EndorsementConfirmationRecordSchema = zod.z.object({
6458
6733
  endorsement: strongRefSchema,
6459
6734
  /**
@@ -6631,7 +6906,7 @@ var VERIFICATION_METHOD_TOKENS = [
6631
6906
  var EmploymentVerificationRecordSchema = zod.z.object({
6632
6907
  $type: zod.z.literal("id.sifa.verification.employment").optional(),
6633
6908
  subject: didSchema,
6634
- position: externalRecordRefSchema,
6909
+ position: externalRecordRefSchema2,
6635
6910
  status: zod.z.enum(EMPLOYMENT_STATUS_TOKENS),
6636
6911
  // Open on purpose, like the lexicon's knownValues: a method Sifa adds
6637
6912
  // later must not make an older client reject the whole record. Compare
@@ -6642,7 +6917,7 @@ var EmploymentVerificationRecordSchema = zod.z.object({
6642
6917
  endedAt: partialDateSchema.optional(),
6643
6918
  entityRef: uriSchema.optional(),
6644
6919
  organization: didSchema.optional(),
6645
- evidence: zod.z.array(externalRecordRefSchema).max(20).optional(),
6920
+ evidence: zod.z.array(externalRecordRefSchema2).max(20).optional(),
6646
6921
  verifiedAt: datetimeSchema,
6647
6922
  expiresAt: datetimeSchema.optional(),
6648
6923
  createdAt: datetimeSchema
@@ -6865,7 +7140,7 @@ var ProfileProjectRecordSchema = zod.z.object({
6865
7140
  * its own record; this only says the two describe one thing. Resolves by
6866
7141
  * AT-URI, since they will keep editing their copy.
6867
7142
  */
6868
- sameAs: externalRecordRefSchema.optional(),
7143
+ sameAs: externalRecordRefSchema2.optional(),
6869
7144
  position: strongRefSchema.optional(),
6870
7145
  startedAt: partialDateSchema.optional(),
6871
7146
  endedAt: partialDateSchema.optional(),
@@ -6900,7 +7175,7 @@ var ProfileInvolvementRecordSchema = zod.z.object({
6900
7175
  skills: zod.z.array(zod.z.object({ uri: zod.z.string() })).max(50).optional(),
6901
7176
  labels: selfLabelsSchema.optional(),
6902
7177
  collaborators: zod.z.array(projectMemberRefSchema).max(50).optional(),
6903
- sameAs: externalRecordRefSchema.optional(),
7178
+ sameAs: externalRecordRefSchema2.optional(),
6904
7179
  isPrimary: zod.z.boolean().optional(),
6905
7180
  createdAt: datetimeSchema
6906
7181
  }).passthrough();
@@ -6932,7 +7207,7 @@ var ProfilePositionRecordSchema = zod.z.object({
6932
7207
  endedAt: partialDateSchema.optional(),
6933
7208
  // id.sifa.defs#skillRef -- at-uri only, no cid. Skills are mutable records
6934
7209
  // in the same repo, so the ref resolves live rather than pinning a version.
6935
- skills: zod.z.array(skillRefSchema).max(50).optional(),
7210
+ skills: zod.z.array(skillRefSchema2).max(50).optional(),
6936
7211
  isPrimary: zod.z.boolean().optional(),
6937
7212
  labels: selfLabelsSchema.optional(),
6938
7213
  createdAt: datetimeSchema
@@ -6957,7 +7232,7 @@ var ProfilePresentationRecordSchema = zod.z.object({
6957
7232
  links: zod.z.array(PresentationLinkSchema).max(20).optional(),
6958
7233
  // Optional reference to a long-form write-up (pub.leaflet.document or
6959
7234
  // site.standard.document). Plain at-uri + optional cid so it tracks edits.
6960
- writeupRef: externalRecordRefSchema.optional(),
7235
+ writeupRef: externalRecordRefSchema2.optional(),
6961
7236
  // Optional uploaded cover image for the talk page.
6962
7237
  coverImage: BlobRefSchema.optional(),
6963
7238
  isPrimary: zod.z.boolean().optional(),
@@ -6973,7 +7248,7 @@ var communityAddressSchema = zod.z.object({
6973
7248
  });
6974
7249
  var ProfilePresentationDeliveryRecordSchema = zod.z.object({
6975
7250
  // Optional reference to the id.sifa.profile.presentation delivered here.
6976
- presentationRef: externalRecordRefSchema.optional(),
7251
+ presentationRef: externalRecordRefSchema2.optional(),
6977
7252
  // Fallback title used when there is no presentationRef.
6978
7253
  title: zod.z.string().refine(maxGraphemes(300)).max(3e3).optional(),
6979
7254
  role: zod.z.string().refine(maxGraphemes(64)).max(640).optional(),
@@ -6988,7 +7263,7 @@ var ProfilePresentationDeliveryRecordSchema = zod.z.object({
6988
7263
  status: zod.z.string().optional(),
6989
7264
  links: zod.z.array(PresentationLinkSchema).max(20).optional(),
6990
7265
  // Optional reference to a community.lexicon.calendar.event for this occasion.
6991
- eventRef: externalRecordRefSchema.optional(),
7266
+ eventRef: externalRecordRefSchema2.optional(),
6992
7267
  // DIDs of co-speakers who presented alongside the author at this occasion.
6993
7268
  coSpeakers: zod.z.array(zod.z.string().regex(/^did:[a-z]+:[^\s]+$/, "must be a DID")).max(20).optional(),
6994
7269
  createdAt: datetimeSchema
@@ -7379,7 +7654,7 @@ function describeSifaRecord(collection, value) {
7379
7654
  }
7380
7655
 
7381
7656
  // src/index.ts
7382
- var SIFA_SDK_VERSION = "0.19.85";
7657
+ var SIFA_SDK_VERSION = "0.19.87";
7383
7658
 
7384
7659
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
7385
7660
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -7467,8 +7742,10 @@ exports.PLATFORM_LABELS = PLATFORM_LABELS;
7467
7742
  exports.PLATFORM_OPTIONS = PLATFORM_OPTIONS;
7468
7743
  exports.PRESENTATION_LINK_TYPE_LABELS = PRESENTATION_LINK_TYPE_LABELS;
7469
7744
  exports.PRESENTATION_LINK_TYPE_OPTIONS = PRESENTATION_LINK_TYPE_OPTIONS;
7745
+ exports.PRESENTATION_MODE_VALUES = PRESENTATION_MODE_VALUES;
7470
7746
  exports.PRESENTATION_ROLE_LABELS = PRESENTATION_ROLE_LABELS;
7471
7747
  exports.PRESENTATION_ROLE_OPTIONS = PRESENTATION_ROLE_OPTIONS;
7748
+ exports.PRESENTATION_ROLE_VALUES = PRESENTATION_ROLE_VALUES;
7472
7749
  exports.PROFILE_INVESTMENT_NSID = PROFILE_INVESTMENT_NSID;
7473
7750
  exports.PROFILE_INVOLVEMENT_NSID = PROFILE_INVOLVEMENT_NSID;
7474
7751
  exports.PROJECT_ROLES = PROJECT_ROLES;
@@ -7517,6 +7794,7 @@ exports.WORKPLACE_TYPE_OPTIONS = WORKPLACE_TYPE_OPTIONS;
7517
7794
  exports.actorShowsIdentity = actorShowsIdentity;
7518
7795
  exports.agentRefSchema = agentRefSchema;
7519
7796
  exports.atUriSchema = atUriSchema;
7797
+ exports.blobProxyUrl = blobProxyUrl;
7520
7798
  exports.buildMetaDescription = buildMetaDescription;
7521
7799
  exports.buildProfileHighlights = buildProfileHighlights;
7522
7800
  exports.buildTalkSlug = buildTalkSlug;
@@ -7545,7 +7823,7 @@ exports.encodeFeedCursor = encodeFeedCursor;
7545
7823
  exports.entityDisambiguationLabel = entityDisambiguationLabel;
7546
7824
  exports.entityResultKey = entityResultKey;
7547
7825
  exports.excludeSelfApp = excludeSelfApp;
7548
- exports.externalRecordRefSchema = externalRecordRefSchema;
7826
+ exports.externalRecordRefSchema = externalRecordRefSchema2;
7549
7827
  exports.filterHidden = filterHidden;
7550
7828
  exports.findIndustry = findIndustry;
7551
7829
  exports.followingFeedFallbackApp = followingFeedFallbackApp;
@@ -7692,7 +7970,7 @@ exports.shouldRenderHighlights = shouldRenderHighlights;
7692
7970
  exports.singleDateExtractor = singleDateExtractor;
7693
7971
  exports.siteActivityPresetSchema = siteActivityPresetSchema;
7694
7972
  exports.siteActivityPresetUpdateSchema = siteActivityPresetUpdateSchema;
7695
- exports.skillRefSchema = skillRefSchema;
7973
+ exports.skillRefSchema = skillRefSchema2;
7696
7974
  exports.slugifyTitle = slugifyTitle;
7697
7975
  exports.sortByActiveDateRange = sortByActiveDateRange;
7698
7976
  exports.sortByDateDesc = sortByDateDesc;
@@ -7729,6 +8007,7 @@ exports.toStreamCardVM = toStreamCardVM;
7729
8007
  exports.toStreamCardVMs = toStreamCardVMs;
7730
8008
  exports.truncateGraphemes = truncateGraphemes;
7731
8009
  exports.uriSchema = uriSchema;
8010
+ exports.validateTalksImport = validateTalksImport;
7732
8011
  exports.verbForCollection = verbForCollection;
7733
8012
  exports.visibleItems = visibleItems;
7734
8013
  exports.youtubeThumbnailUrl = youtubeThumbnailUrl;