@onyx.dev/onyx-database 2.1.0 → 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 +27 -1
- package/dist/{aggregates-DREvey7b.d.cts → aggregates-BpGa31jk.d.cts} +46 -2
- package/dist/{aggregates-DREvey7b.d.ts → aggregates-BpGa31jk.d.ts} +46 -2
- package/dist/edge.cjs +22 -2
- 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 -2
- package/dist/edge.js.map +1 -1
- package/dist/gen/cli/generate.cjs +26 -7
- package/dist/gen/cli/generate.cjs.map +1 -1
- package/dist/index.cjs +22 -2
- 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 -2
- package/dist/index.js.map +1 -1
- package/dist/schema/cli/schema.cjs +21 -1
- package/dist/schema/cli/schema.cjs.map +1 -1
- package/package.json +5 -2
|
@@ -233,7 +233,6 @@ async function resolveConfig(input) {
|
|
|
233
233
|
const maxRetries = retryConfig.maxRetries ?? 3;
|
|
234
234
|
const retryInitialDelayMs = retryConfig.initialDelayMs ?? 300;
|
|
235
235
|
const missing = [];
|
|
236
|
-
if (!databaseId) missing.push("databaseId");
|
|
237
236
|
if (!apiKey) missing.push("apiKey");
|
|
238
237
|
if (!apiSecret) missing.push("apiSecret");
|
|
239
238
|
if (missing.length) {
|
|
@@ -1559,6 +1558,27 @@ var OnyxDatabaseImpl = class {
|
|
|
1559
1558
|
const { http } = await this.ensureAiClient();
|
|
1560
1559
|
return http.request("POST", "/api/script-approvals", input);
|
|
1561
1560
|
}
|
|
1561
|
+
async predict(publishedModelId, inputs) {
|
|
1562
|
+
const { http, databaseId } = await this.ensureClient();
|
|
1563
|
+
const path2 = `/data/${encodeURIComponent(
|
|
1564
|
+
databaseId
|
|
1565
|
+
)}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict`;
|
|
1566
|
+
return http.request(
|
|
1567
|
+
"POST",
|
|
1568
|
+
path2,
|
|
1569
|
+
serializeDates({ inputs })
|
|
1570
|
+
);
|
|
1571
|
+
}
|
|
1572
|
+
async predictFromScript(publishedModelId, scriptId, scriptParameters = {}) {
|
|
1573
|
+
const { http, databaseId } = await this.ensureClient();
|
|
1574
|
+
const path2 = `/data/${encodeURIComponent(
|
|
1575
|
+
databaseId
|
|
1576
|
+
)}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict/script`;
|
|
1577
|
+
return http.request("POST", path2, {
|
|
1578
|
+
scriptId,
|
|
1579
|
+
scriptParameters
|
|
1580
|
+
});
|
|
1581
|
+
}
|
|
1562
1582
|
from(table) {
|
|
1563
1583
|
return new QueryBuilderImpl(this, String(table), this.defaultPartition);
|
|
1564
1584
|
}
|