@singi-labs/sifa-sdk 0.12.75 → 0.12.76
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/{network-map-DpEQ65cq.d.ts → network-map-BFjdjlj3.d.ts} +1 -1
- package/dist/{network-map-CpwO3k-e.d.cts → network-map-D5PJAs_l.d.cts} +1 -1
- package/dist/{org-DJyiwPcL.d.cts → org-BOivj-0M.d.cts} +36 -1
- package/dist/{org-DxhtogOn.d.ts → org-Co9muK52.d.ts} +36 -1
- package/dist/query/fetchers/index.cjs +15 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +3 -3
- package/dist/query/fetchers/index.d.ts +3 -3
- package/dist/query/fetchers/index.js +15 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +23 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +3 -3
- package/dist/query/hooks/index.d.ts +3 -3
- package/dist/query/hooks/index.js +23 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +1 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/query/index.js +1 -0
- package/dist/query/index.js.map +1 -1
- package/dist/{use-org-notification-emails-C3TuUp8c.d.ts → use-org-notification-emails-Cz6OldEp.d.ts} +8 -2
- package/dist/{use-org-notification-emails-ChctAwP5.d.cts → use-org-notification-emails-Do-Zjtf8.d.cts} +8 -2
- package/package.json +1 -1
|
@@ -170,6 +170,7 @@ var sifaQueryKeys = {
|
|
|
170
170
|
search: {
|
|
171
171
|
all: () => ["sifa", "search"],
|
|
172
172
|
profiles: (filters) => ["sifa", "search", "profiles", filters],
|
|
173
|
+
companies: (filters) => ["sifa", "search", "companies", filters],
|
|
173
174
|
skills: (query) => ["sifa", "search", "skills", query],
|
|
174
175
|
canonicalSkills: (query, limit) => ["sifa", "search", "canonical-skills", query, limit],
|
|
175
176
|
filters: () => ["sifa", "search", "filters"]
|
|
@@ -1600,6 +1601,7 @@ function useHiddenApps(options) {
|
|
|
1600
1601
|
// src/query/fetchers/search.ts
|
|
1601
1602
|
var EMPTY_SEARCH = { profiles: [], total: 0, limit: 20, offset: 0 };
|
|
1602
1603
|
var EMPTY_FILTERS = { countries: [], industries: [], apps: [], openTo: [] };
|
|
1604
|
+
var EMPTY_COMPANY_SEARCH = { results: [], hasMore: false };
|
|
1603
1605
|
async function fetchSearchProfiles(config, filters, options = {}) {
|
|
1604
1606
|
const params = new URLSearchParams();
|
|
1605
1607
|
if (filters.q) params.set("q", filters.q);
|
|
@@ -1621,6 +1623,18 @@ async function fetchSearchProfiles(config, filters, options = {}) {
|
|
|
1621
1623
|
...options
|
|
1622
1624
|
});
|
|
1623
1625
|
}
|
|
1626
|
+
async function fetchSearchCompanies(config, filters, options = {}) {
|
|
1627
|
+
const q = filters.q?.trim();
|
|
1628
|
+
if (!q) return EMPTY_COMPANY_SEARCH;
|
|
1629
|
+
const params = new URLSearchParams({ q });
|
|
1630
|
+
if (filters.country) params.set("country", filters.country);
|
|
1631
|
+
if (filters.industry) params.set("industry", filters.industry);
|
|
1632
|
+
if (filters.limit !== void 0) params.set("limit", String(filters.limit));
|
|
1633
|
+
return apiFetch(config, `/api/search/companies?${params.toString()}`, {
|
|
1634
|
+
cache: "no-store",
|
|
1635
|
+
...options
|
|
1636
|
+
});
|
|
1637
|
+
}
|
|
1624
1638
|
async function fetchSkillSuggestions(config, query, options = {}) {
|
|
1625
1639
|
if (!query.trim()) return [];
|
|
1626
1640
|
const path = `/api/search/skills?q=${encodeURIComponent(query)}&limit=8`;
|
|
@@ -1689,6 +1703,14 @@ function useSearchFilters(options) {
|
|
|
1689
1703
|
...options
|
|
1690
1704
|
});
|
|
1691
1705
|
}
|
|
1706
|
+
function useSearchCompanies(filters, options) {
|
|
1707
|
+
const config = useSifaConfig();
|
|
1708
|
+
return reactQuery.useQuery({
|
|
1709
|
+
queryKey: sifaQueryKeys.search.companies(filters),
|
|
1710
|
+
queryFn: () => fetchSearchCompanies(config, filters),
|
|
1711
|
+
...options
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1692
1714
|
|
|
1693
1715
|
// src/query/fetchers/discovery.ts
|
|
1694
1716
|
async function fetchSimilarProfiles(config, did, opts = {}) {
|
|
@@ -3226,6 +3248,7 @@ exports.useRetractRoadmapVote = useRetractRoadmapVote;
|
|
|
3226
3248
|
exports.useRevealMarqueDomain = useRevealMarqueDomain;
|
|
3227
3249
|
exports.useRevokeConfirmation = useRevokeConfirmation;
|
|
3228
3250
|
exports.useRoadmapVotes = useRoadmapVotes;
|
|
3251
|
+
exports.useSearchCompanies = useSearchCompanies;
|
|
3229
3252
|
exports.useSearchFilters = useSearchFilters;
|
|
3230
3253
|
exports.useSearchProfiles = useSearchProfiles;
|
|
3231
3254
|
exports.useSelectEntity = useSelectEntity;
|