@singi-labs/sifa-sdk 0.10.7 → 0.10.8

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.
@@ -417,6 +417,13 @@ interface SearchFilters {
417
417
  domain?: string;
418
418
  workplace?: string;
419
419
  app?: string;
420
+ /**
421
+ * Open-to filter. Values are short tokens (e.g. "fullTime", "mentor",
422
+ * "collab") matching `OPEN_TO_OPTIONS[].token` from the taxonomy. The
423
+ * API expands tokens to lex values server-side. Multiple tokens are
424
+ * OR-combined (profile matches if any selected token is set).
425
+ */
426
+ openTo?: string[];
420
427
  limit?: number;
421
428
  }
422
429
  interface SearchResponse {
@@ -446,6 +453,16 @@ interface FilterOptions {
446
453
  appId: string;
447
454
  count: number;
448
455
  }[];
456
+ /**
457
+ * Distribution of openTo selections across indexed profiles. Each entry
458
+ * maps a short token (see {@link SearchFilters.openTo}) to the number of
459
+ * profiles that have it set. Omitted from older API responses; treat
460
+ * absence as "no data" rather than "all zero".
461
+ */
462
+ openTo?: {
463
+ token: string;
464
+ count: number;
465
+ }[];
449
466
  }
450
467
  /**
451
468
  * Search profiles by free-text query and optional filters. Returns an
@@ -417,6 +417,13 @@ interface SearchFilters {
417
417
  domain?: string;
418
418
  workplace?: string;
419
419
  app?: string;
420
+ /**
421
+ * Open-to filter. Values are short tokens (e.g. "fullTime", "mentor",
422
+ * "collab") matching `OPEN_TO_OPTIONS[].token` from the taxonomy. The
423
+ * API expands tokens to lex values server-side. Multiple tokens are
424
+ * OR-combined (profile matches if any selected token is set).
425
+ */
426
+ openTo?: string[];
420
427
  limit?: number;
421
428
  }
422
429
  interface SearchResponse {
@@ -446,6 +453,16 @@ interface FilterOptions {
446
453
  appId: string;
447
454
  count: number;
448
455
  }[];
456
+ /**
457
+ * Distribution of openTo selections across indexed profiles. Each entry
458
+ * maps a short token (see {@link SearchFilters.openTo}) to the number of
459
+ * profiles that have it set. Omitted from older API responses; treat
460
+ * absence as "no data" rather than "all zero".
461
+ */
462
+ openTo?: {
463
+ token: string;
464
+ count: number;
465
+ }[];
449
466
  }
450
467
  /**
451
468
  * Search profiles by free-text query and optional filters. Returns an
@@ -487,7 +487,7 @@ async function fetchHiddenApps(config, options = {}) {
487
487
 
488
488
  // src/query/fetchers/search.ts
489
489
  var EMPTY_SEARCH = { profiles: [], total: 0, limit: 20, offset: 0 };
490
- var EMPTY_FILTERS = { countries: [], industries: [], apps: [] };
490
+ var EMPTY_FILTERS = { countries: [], industries: [], apps: [], openTo: [] };
491
491
  async function fetchSearchProfiles(config, filters, options = {}) {
492
492
  const params = new URLSearchParams();
493
493
  if (filters.q) params.set("q", filters.q);
@@ -497,6 +497,11 @@ async function fetchSearchProfiles(config, filters, options = {}) {
497
497
  if (filters.domain) params.set("domain", filters.domain);
498
498
  if (filters.workplace) params.set("workplace", filters.workplace);
499
499
  if (filters.app) params.set("app", filters.app);
500
+ if (filters.openTo && filters.openTo.length > 0) {
501
+ for (const token of filters.openTo) {
502
+ if (token) params.append("openTo", token);
503
+ }
504
+ }
500
505
  if (filters.limit !== void 0) params.set("limit", String(filters.limit));
501
506
  if (params.size === 0) return EMPTY_SEARCH;
502
507
  return apiFetch(config, `/api/search/profiles?${params.toString()}`, {