@budibase/frontend-core 2.32.10 → 2.32.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.
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "2.32.10",
3
+ "version": "2.32.12",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
7
7
  "svelte": "src/index.js",
8
8
  "dependencies": {
9
- "@budibase/bbui": "2.32.10",
10
- "@budibase/shared-core": "2.32.10",
11
- "@budibase/types": "2.32.10",
9
+ "@budibase/bbui": "2.32.12",
10
+ "@budibase/shared-core": "2.32.12",
11
+ "@budibase/types": "2.32.12",
12
12
  "dayjs": "^1.10.8",
13
13
  "lodash": "4.17.21",
14
14
  "shortid": "2.2.15",
15
15
  "socket.io-client": "^4.7.5"
16
16
  },
17
- "gitHead": "60aecc44be42547fbdfaeb6a4048567e0e16d067"
17
+ "gitHead": "2732aec0ace12941b3a40a68945eae29567954db"
18
18
  }
package/src/api/ai.js ADDED
@@ -0,0 +1,11 @@
1
+ export const buildAIEndpoints = API => ({
2
+ /**
3
+ * Generates a cron expression from a prompt
4
+ */
5
+ generateCronExpression: async ({ prompt }) => {
6
+ return await API.post({
7
+ url: "/api/ai/cron",
8
+ body: { prompt },
9
+ })
10
+ },
11
+ })
package/src/api/index.js CHANGED
@@ -2,6 +2,7 @@ import { Helpers } from "@budibase/bbui"
2
2
  import { Header } from "@budibase/shared-core"
3
3
  import { ApiVersion } from "../constants"
4
4
  import { buildAnalyticsEndpoints } from "./analytics"
5
+ import { buildAIEndpoints } from "./ai"
5
6
  import { buildAppEndpoints } from "./app"
6
7
  import { buildAttachmentEndpoints } from "./attachments"
7
8
  import { buildAuthEndpoints } from "./auth"
@@ -268,6 +269,7 @@ export const createAPIClient = config => {
268
269
  // Attach all endpoints
269
270
  return {
270
271
  ...API,
272
+ ...buildAIEndpoints(API),
271
273
  ...buildAnalyticsEndpoints(API),
272
274
  ...buildAppEndpoints(API),
273
275
  ...buildAttachmentEndpoints(API),