@onyx.dev/onyx-database 2.1.1 → 2.3.0
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/README.md +26 -0
- package/dist/{aggregates-BFOBBZkW.d.cts → aggregates-BpGa31jk.d.cts} +46 -2
- package/dist/{aggregates-BFOBBZkW.d.ts → aggregates-BpGa31jk.d.ts} +46 -2
- package/dist/edge.cjs +22 -1
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.d.cts +2 -2
- package/dist/edge.d.ts +2 -2
- package/dist/edge.js +22 -1
- package/dist/edge.js.map +1 -1
- package/dist/gen/cli/generate.cjs +21 -0
- package/dist/gen/cli/generate.cjs.map +1 -1
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/schema/cli/schema.cjs +21 -0
- package/dist/schema/cli/schema.cjs.map +1 -1
- package/package.json +5 -2
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// package.json
|
|
4
4
|
var name = "@onyx.dev/onyx-database";
|
|
5
|
-
var version = "2.
|
|
5
|
+
var version = "2.3.0";
|
|
6
6
|
|
|
7
7
|
// src/config/defaults.ts
|
|
8
8
|
var DEFAULT_BASE_URL = "https://api.onyx.dev";
|
|
@@ -1427,6 +1427,27 @@ var OnyxDatabaseImpl = class {
|
|
|
1427
1427
|
const { http } = await this.ensureAiClient();
|
|
1428
1428
|
return http.request("POST", "/api/script-approvals", input);
|
|
1429
1429
|
}
|
|
1430
|
+
async predict(publishedModelId, inputs) {
|
|
1431
|
+
const { http, databaseId } = await this.ensureClient();
|
|
1432
|
+
const path = `/data/${encodeURIComponent(
|
|
1433
|
+
databaseId
|
|
1434
|
+
)}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict`;
|
|
1435
|
+
return http.request(
|
|
1436
|
+
"POST",
|
|
1437
|
+
path,
|
|
1438
|
+
serializeDates({ inputs })
|
|
1439
|
+
);
|
|
1440
|
+
}
|
|
1441
|
+
async predictFromScript(publishedModelId, scriptId, scriptParameters = {}) {
|
|
1442
|
+
const { http, databaseId } = await this.ensureClient();
|
|
1443
|
+
const path = `/data/${encodeURIComponent(
|
|
1444
|
+
databaseId
|
|
1445
|
+
)}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict/script`;
|
|
1446
|
+
return http.request("POST", path, {
|
|
1447
|
+
scriptId,
|
|
1448
|
+
scriptParameters
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1430
1451
|
from(table) {
|
|
1431
1452
|
return new QueryBuilderImpl(this, String(table), this.defaultPartition);
|
|
1432
1453
|
}
|