@credal/actions 0.1.30 → 0.1.31

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.
@@ -809,8 +809,13 @@ exports.snowflakeRunSnowflakeQueryDefinition = {
809
809
  },
810
810
  output: {
811
811
  type: "object",
812
- required: ["content", "rowCount"],
812
+ required: ["format", "content", "rowCount"],
813
813
  properties: {
814
+ format: {
815
+ type: "string",
816
+ description: "The format of the output",
817
+ enum: ["json", "csv"],
818
+ },
814
819
  content: {
815
820
  type: "string",
816
821
  description: "The content of the query result (json)",
@@ -1203,6 +1208,7 @@ exports.lookerEnableUserByEmailDefinition = {
1203
1208
  },
1204
1209
  userDetails: {
1205
1210
  type: "object",
1211
+ required: ["id", "firstName", "lastName", "email", "isDisabled"],
1206
1212
  description: "Details about the user",
1207
1213
  properties: {
1208
1214
  id: {
@@ -805,13 +805,16 @@ export declare const snowflakeRunSnowflakeQueryParamsSchema: z.ZodObject<{
805
805
  }>;
806
806
  export type snowflakeRunSnowflakeQueryParamsType = z.infer<typeof snowflakeRunSnowflakeQueryParamsSchema>;
807
807
  export declare const snowflakeRunSnowflakeQueryOutputSchema: z.ZodObject<{
808
+ format: z.ZodEnum<["json", "csv"]>;
808
809
  content: z.ZodString;
809
810
  rowCount: z.ZodNumber;
810
811
  }, "strip", z.ZodTypeAny, {
811
812
  content: string;
813
+ format: "json" | "csv";
812
814
  rowCount: number;
813
815
  }, {
814
816
  content: string;
817
+ format: "json" | "csv";
815
818
  rowCount: number;
816
819
  }>;
817
820
  export type snowflakeRunSnowflakeQueryOutputType = z.infer<typeof snowflakeRunSnowflakeQueryOutputSchema>;
@@ -262,6 +262,7 @@ exports.snowflakeRunSnowflakeQueryParamsSchema = zod_1.z.object({
262
262
  outputFormat: zod_1.z.enum(["json", "csv"]).describe("The format of the output").optional(),
263
263
  });
264
264
  exports.snowflakeRunSnowflakeQueryOutputSchema = zod_1.z.object({
265
+ format: zod_1.z.enum(["json", "csv"]).describe("The format of the output"),
265
266
  content: zod_1.z.string().describe("The content of the query result (json)"),
266
267
  rowCount: zod_1.z.number().describe("The number of rows returned by the query"),
267
268
  });
@@ -373,7 +374,6 @@ exports.finnhubGetBasicFinancialsOutputSchema = zod_1.z.object({
373
374
  })
374
375
  .describe("The basic financials of the stock"),
375
376
  });
376
- // Looker enableUserByEmail types
377
377
  exports.lookerEnableUserByEmailParamsSchema = zod_1.z.object({
378
378
  userEmail: zod_1.z.string().describe("The email address of the user to search for"),
379
379
  });
@@ -87,6 +87,7 @@ const runSnowflakeQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({ p
87
87
  return {
88
88
  rowCount: resultsLength,
89
89
  content: formattedData,
90
+ format: outputFormat,
90
91
  };
91
92
  }
92
93
  catch (error) {
@@ -11,9 +11,16 @@ const createXSharePostUrl = ({ params, }) => {
11
11
  if (params.url) {
12
12
  queryParams.append("url", params.url);
13
13
  }
14
+ let hashtags = [];
15
+ if (typeof params.hashtag == "string") {
16
+ hashtags = [params.hashtag];
17
+ }
18
+ else if (Array.isArray(params.hashtag)) {
19
+ hashtags = params.hashtag;
20
+ }
14
21
  // Add hashtags parameter if it exists
15
- if (params.hashtag && params.hashtag.length > 0) {
16
- const cleanedHashtags = params.hashtag.map(tag => tag.replace(/^#+/, "").trim()).filter(tag => tag.length > 0);
22
+ if (hashtags.length > 0) {
23
+ const cleanedHashtags = hashtags.map(tag => tag.replace(/^#+/, "").trim()).filter(tag => tag.length > 0);
17
24
  if (cleanedHashtags.length > 0) {
18
25
  queryParams.append("hashtags", cleanedHashtags.join(","));
19
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "AI Actions by Credal AI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",