@singi-labs/sifa-sdk 0.18.11 → 0.18.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/index.cjs +29 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +28 -3
  4. package/dist/index.d.ts +28 -3
  5. package/dist/index.js +28 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/{network-map-CMod-9od.d.ts → network-map-5WbfyFed.d.ts} +12 -3
  8. package/dist/{network-map-CH37aj_Q.d.cts → network-map-Cwv7SsL0.d.cts} +12 -3
  9. package/dist/{org-3gFPQ_pC.d.cts → org-BHz9ymjp.d.cts} +122 -4
  10. package/dist/{org-CTSJ5zTZ.d.ts → org-Bgz5parA.d.ts} +122 -4
  11. package/dist/{profile-investment-CmiQxk5C.d.cts → profile-investment-CIG7Hy8g.d.cts} +16 -1
  12. package/dist/{profile-investment-CmiQxk5C.d.ts → profile-investment-CIG7Hy8g.d.ts} +16 -1
  13. package/dist/publishing/index.cjs +5 -0
  14. package/dist/publishing/index.cjs.map +1 -1
  15. package/dist/publishing/index.js +5 -0
  16. package/dist/publishing/index.js.map +1 -1
  17. package/dist/query/fetchers/index.cjs +121 -5
  18. package/dist/query/fetchers/index.cjs.map +1 -1
  19. package/dist/query/fetchers/index.d.cts +3 -3
  20. package/dist/query/fetchers/index.d.ts +3 -3
  21. package/dist/query/fetchers/index.js +118 -6
  22. package/dist/query/fetchers/index.js.map +1 -1
  23. package/dist/query/hooks/index.cjs +157 -4
  24. package/dist/query/hooks/index.cjs.map +1 -1
  25. package/dist/query/hooks/index.d.cts +3 -3
  26. package/dist/query/hooks/index.d.ts +3 -3
  27. package/dist/query/hooks/index.js +155 -5
  28. package/dist/query/hooks/index.js.map +1 -1
  29. package/dist/query/index.cjs +161 -5
  30. package/dist/query/index.cjs.map +1 -1
  31. package/dist/query/index.d.cts +5 -5
  32. package/dist/query/index.d.ts +5 -5
  33. package/dist/query/index.js +155 -6
  34. package/dist/query/index.js.map +1 -1
  35. package/dist/schemas/index.cjs +6 -0
  36. package/dist/schemas/index.cjs.map +1 -1
  37. package/dist/schemas/index.d.cts +1 -1
  38. package/dist/schemas/index.d.ts +1 -1
  39. package/dist/schemas/index.js +6 -1
  40. package/dist/schemas/index.js.map +1 -1
  41. package/dist/schemas/write/index.cjs +7 -2
  42. package/dist/schemas/write/index.cjs.map +1 -1
  43. package/dist/schemas/write/index.js +7 -2
  44. package/dist/schemas/write/index.js.map +1 -1
  45. package/dist/{use-org-notification-emails-J29DcsSu.d.ts → use-org-notification-emails-C9CWyhSC.d.ts} +24 -2
  46. package/dist/{use-org-notification-emails-CdRgTAj4.d.cts → use-org-notification-emails-vNekuQKF.d.cts} +24 -2
  47. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -4283,6 +4283,11 @@ var externalRecordRefSchema = zod.z.object({
4283
4283
  uri: atUriSchema,
4284
4284
  cid: cidSchema.optional()
4285
4285
  });
4286
+ var agentRefSchema = zod.z.object({
4287
+ name: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
4288
+ did: didSchema.optional(),
4289
+ entityRef: uriSchema.optional()
4290
+ }).passthrough();
4286
4291
  var selfLabelsSchema = zod.z.object({
4287
4292
  $type: zod.z.literal("com.atproto.label.defs#selfLabels").optional(),
4288
4293
  values: zod.z.array(zod.z.object({ val: zod.z.string() }))
@@ -5217,6 +5222,27 @@ function isLinked(entityRef) {
5217
5222
  return classifyEntityRef(entityRef) !== "unlinked";
5218
5223
  }
5219
5224
 
5225
+ // src/logic/agent-ref.ts
5226
+ function clean3(value) {
5227
+ const trimmed = value?.trim();
5228
+ return trimmed ? trimmed : void 0;
5229
+ }
5230
+ function normalize2(name, did, entityRef) {
5231
+ const out = { name };
5232
+ const d = clean3(did);
5233
+ const e = clean3(entityRef);
5234
+ if (d) out.did = d;
5235
+ if (e) out.entityRef = e;
5236
+ return out;
5237
+ }
5238
+ function resolveAgentRef(nested, flat) {
5239
+ const nestedName = clean3(nested?.name);
5240
+ if (nestedName) return normalize2(nestedName, nested?.did, nested?.entityRef);
5241
+ const flatName = clean3(flat?.name);
5242
+ if (flatName) return normalize2(flatName, flat?.did, flat?.entityRef);
5243
+ return void 0;
5244
+ }
5245
+
5220
5246
  // src/logic/org-floor.ts
5221
5247
  var KNOWN_HANDLE_HOST_SUFFIXES = [
5222
5248
  ".bsky.social",
@@ -6201,7 +6227,7 @@ function describeSifaRecord(collection, value) {
6201
6227
  }
6202
6228
 
6203
6229
  // src/index.ts
6204
- var SIFA_SDK_VERSION = "0.18.11";
6230
+ var SIFA_SDK_VERSION = "0.18.13";
6205
6231
 
6206
6232
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
6207
6233
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -6315,6 +6341,7 @@ exports.VERIFICATION_PROVIDERS = VERIFICATION_PROVIDERS;
6315
6341
  exports.WORKPLACE_TYPE_LABELS = WORKPLACE_TYPE_LABELS;
6316
6342
  exports.WORKPLACE_TYPE_OPTIONS = WORKPLACE_TYPE_OPTIONS;
6317
6343
  exports.actorShowsIdentity = actorShowsIdentity;
6344
+ exports.agentRefSchema = agentRefSchema;
6318
6345
  exports.atUriSchema = atUriSchema;
6319
6346
  exports.buildMetaDescription = buildMetaDescription;
6320
6347
  exports.buildTalkSlug = buildTalkSlug;
@@ -6443,6 +6470,7 @@ exports.rendersCompanyProfile = rendersCompanyProfile;
6443
6470
  exports.rendersPersonalProfile = rendersPersonalProfile;
6444
6471
  exports.repoGroupForCollection = repoGroupForCollection;
6445
6472
  exports.resolveAccountFacetMode = resolveAccountFacetMode;
6473
+ exports.resolveAgentRef = resolveAgentRef;
6446
6474
  exports.resolveCardHealth = resolveCardHealth;
6447
6475
  exports.resolveCardUrl = resolveCardUrl;
6448
6476
  exports.resolveEmbed = resolveEmbed;