@credal/actions 0.2.127 → 0.2.128

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.
@@ -41,13 +41,15 @@ const searchSalesforceRecords = (_a) => __awaiter(void 0, [_a], void 0, function
41
41
  }
42
42
  }
43
43
  // Salesforce record types are confusing and non standard
44
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
- const recordsWithUrl = response.data.searchRecords.map((record) => {
46
- const recordId = record.Id;
47
- const webUrl = recordId ? `${baseUrl}/lightning/r/${recordId}/view` : undefined;
48
- return Object.assign(Object.assign({}, record), { webUrl });
49
- });
50
- return { success: true, searchRecords: recordsWithUrl };
44
+ return {
45
+ success: true,
46
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
47
+ results: response.data.searchRecords.map((record) => {
48
+ const recordId = record.Id;
49
+ const webUrl = recordId ? `${baseUrl}/lightning/r/${recordId}/view` : undefined;
50
+ return { name: record.Name, url: webUrl, contents: record };
51
+ }),
52
+ };
51
53
  }
52
54
  catch (error) {
53
55
  console.error("Error retrieving Salesforce record:", error);
@@ -299,6 +299,13 @@ const searchSlack = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params,
299
299
  if (r.status === "fulfilled" && r.value)
300
300
  results.push(r.value);
301
301
  results.sort((a, b) => Number(b.ts) - Number(a.ts));
302
- return { query, results };
302
+ return {
303
+ query,
304
+ results: results.map(r => ({
305
+ name: r.text || "Untitled",
306
+ url: r.permalink || "",
307
+ contents: r,
308
+ })),
309
+ };
303
310
  });
304
311
  export default searchSlack;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.127",
3
+ "version": "0.2.128",
4
4
  "type": "module",
5
5
  "description": "AI Actions by Credal AI",
6
6
  "sideEffects": false,