@absolutejs/engagement-apollo 0.0.11 → 0.0.12

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 (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -133,7 +133,10 @@ var apolloSource = (options) => {
133
133
  const enrichCompany = async (query) => {
134
134
  if (!query.domain)
135
135
  return null;
136
- const json = await get(`/v1/organizations/enrich?domain=${encodeURIComponent(query.domain)}`);
136
+ const params = new URLSearchParams({ domain: query.domain });
137
+ if (query.name?.trim())
138
+ params.set("name", query.name.trim());
139
+ const json = await get(`/v1/organizations/enrich?${params.toString()}`);
137
140
  const org = json && isRecord(json.organization) ? json.organization : null;
138
141
  if (!org)
139
142
  return null;
package/package.json CHANGED
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "type": "module",
46
46
  "types": "./dist/index.d.ts",
47
- "version": "0.0.11",
47
+ "version": "0.0.12",
48
48
  "exports": {
49
49
  ".": {
50
50
  "types": "./dist/index.d.ts",