@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
package/dist/edge.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OnyxFacade } from './aggregates-
|
|
2
|
-
export {
|
|
1
|
+
import { O as OnyxFacade } from './aggregates-BpGa31jk.cjs';
|
|
2
|
+
export { A as AiChatClient, a as AiChatCompletionChoice, b as AiChatCompletionChunk, c as AiChatCompletionChunkChoice, d as AiChatCompletionChunkDelta, e as AiChatCompletionRequest, f as AiChatCompletionResponse, g as AiChatCompletionStream, h as AiChatCompletionUsage, i as AiChatMessage, j as AiChatOptions, k as AiChatRole, l as AiClient, m as AiErrorResponse, n as AiModel, o as AiModelsResponse, p as AiRequestOptions, q as AiScriptApprovalRequest, r as AiScriptApprovalResponse, s as AiTool, t as AiToolCall, u as AiToolCallFunction, v as AiToolChoice, w as AiToolFunction, F as FetchImpl, x as FetchResponse, y as FullTextQuery, I as ICascadeBuilder, z as ICascadeRelationshipBuilder, B as IConditionBuilder, C as IOnyxDatabase, D as IQueryBuilder, E as ISaveBuilder, L as LogicalOperator, G as OnyxConfig, H as OnyxDocument, P as PublishedModelPredictionInput, J as PublishedModelPredictionInputs, K as PublishedModelPredictionResponse, M as PublishedModelRawPredictionRequest, N as PublishedModelScriptPredictionRequest, Q as QueryCondition, R as QueryCriteria, S as QueryCriteriaOperator, T as QueryPage, U as QueryResults, V as QueryResultsPromise, W as RetryOptions, X as SchemaAttribute, Y as SchemaAttributeChange, Z as SchemaDataType, _ as SchemaDiff, $ as SchemaEntity, a0 as SchemaHistoryEntry, a1 as SchemaIdentifier, a2 as SchemaIdentifierGenerator, a3 as SchemaIndex, a4 as SchemaIndexChange, a5 as SchemaIndexType, a6 as SchemaResolver, a7 as SchemaResolverChange, a8 as SchemaRevision, a9 as SchemaRevisionMetadata, aa as SchemaTableDiff, ab as SchemaTrigger, ac as SchemaTriggerChange, ad as SchemaTriggerEvent, ae as SchemaUpsertRequest, af as SchemaValidationResult, ag as SecretMetadata, ah as SecretRecord, ai as SecretSaveRequest, aj as SecretsListResponse, ak as SelectQuery, al as Sort, am as StreamAction, an as UpdateQuery, ao as asc, ap as avg, aq as between, ar as contains, as as containsIgnoreCase, at as count, au as desc, av as eq, aw as format, ax as gt, ay as gte, az as inOp, aA as isNull, aB as like, aC as lower, aD as lt, aE as lte, aF as matches, aG as max, aH as median, aI as min, aJ as neq, aK as notContains, aL as notContainsIgnoreCase, aM as notIn, aN as notLike, aO as notMatches, aP as notNull, aQ as notStartsWith, aR as notWithin, aS as percentile, aT as replace, aU as sdkName, aV as sdkVersion, aW as search, aX as startsWith, aY as std, aZ as substring, a_ as sum, a$ as upper, b0 as variance, b1 as within } from './aggregates-BpGa31jk.cjs';
|
|
3
3
|
|
|
4
4
|
declare const onyx: OnyxFacade;
|
|
5
5
|
|
package/dist/edge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OnyxFacade } from './aggregates-
|
|
2
|
-
export {
|
|
1
|
+
import { O as OnyxFacade } from './aggregates-BpGa31jk.js';
|
|
2
|
+
export { A as AiChatClient, a as AiChatCompletionChoice, b as AiChatCompletionChunk, c as AiChatCompletionChunkChoice, d as AiChatCompletionChunkDelta, e as AiChatCompletionRequest, f as AiChatCompletionResponse, g as AiChatCompletionStream, h as AiChatCompletionUsage, i as AiChatMessage, j as AiChatOptions, k as AiChatRole, l as AiClient, m as AiErrorResponse, n as AiModel, o as AiModelsResponse, p as AiRequestOptions, q as AiScriptApprovalRequest, r as AiScriptApprovalResponse, s as AiTool, t as AiToolCall, u as AiToolCallFunction, v as AiToolChoice, w as AiToolFunction, F as FetchImpl, x as FetchResponse, y as FullTextQuery, I as ICascadeBuilder, z as ICascadeRelationshipBuilder, B as IConditionBuilder, C as IOnyxDatabase, D as IQueryBuilder, E as ISaveBuilder, L as LogicalOperator, G as OnyxConfig, H as OnyxDocument, P as PublishedModelPredictionInput, J as PublishedModelPredictionInputs, K as PublishedModelPredictionResponse, M as PublishedModelRawPredictionRequest, N as PublishedModelScriptPredictionRequest, Q as QueryCondition, R as QueryCriteria, S as QueryCriteriaOperator, T as QueryPage, U as QueryResults, V as QueryResultsPromise, W as RetryOptions, X as SchemaAttribute, Y as SchemaAttributeChange, Z as SchemaDataType, _ as SchemaDiff, $ as SchemaEntity, a0 as SchemaHistoryEntry, a1 as SchemaIdentifier, a2 as SchemaIdentifierGenerator, a3 as SchemaIndex, a4 as SchemaIndexChange, a5 as SchemaIndexType, a6 as SchemaResolver, a7 as SchemaResolverChange, a8 as SchemaRevision, a9 as SchemaRevisionMetadata, aa as SchemaTableDiff, ab as SchemaTrigger, ac as SchemaTriggerChange, ad as SchemaTriggerEvent, ae as SchemaUpsertRequest, af as SchemaValidationResult, ag as SecretMetadata, ah as SecretRecord, ai as SecretSaveRequest, aj as SecretsListResponse, ak as SelectQuery, al as Sort, am as StreamAction, an as UpdateQuery, ao as asc, ap as avg, aq as between, ar as contains, as as containsIgnoreCase, at as count, au as desc, av as eq, aw as format, ax as gt, ay as gte, az as inOp, aA as isNull, aB as like, aC as lower, aD as lt, aE as lte, aF as matches, aG as max, aH as median, aI as min, aJ as neq, aK as notContains, aL as notContainsIgnoreCase, aM as notIn, aN as notLike, aO as notMatches, aP as notNull, aQ as notStartsWith, aR as notWithin, aS as percentile, aT as replace, aU as sdkName, aV as sdkVersion, aW as search, aX as startsWith, aY as std, aZ as substring, a_ as sum, a$ as upper, b0 as variance, b1 as within } from './aggregates-BpGa31jk.js';
|
|
3
3
|
|
|
4
4
|
declare const onyx: OnyxFacade;
|
|
5
5
|
|
package/dist/edge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var name = "@onyx.dev/onyx-database";
|
|
3
|
-
var version = "2.
|
|
3
|
+
var version = "2.3.0";
|
|
4
4
|
|
|
5
5
|
// src/config/defaults.ts
|
|
6
6
|
var DEFAULT_BASE_URL = "https://api.onyx.dev";
|
|
@@ -98,7 +98,6 @@ async function resolveConfig(input) {
|
|
|
98
98
|
const maxRetries = retryConfig.maxRetries ?? 3;
|
|
99
99
|
const retryInitialDelayMs = retryConfig.initialDelayMs ?? 300;
|
|
100
100
|
const missing = [];
|
|
101
|
-
if (!databaseId) missing.push("databaseId");
|
|
102
101
|
if (!apiKey) missing.push("apiKey");
|
|
103
102
|
if (!apiSecret) missing.push("apiSecret");
|
|
104
103
|
if (missing.length) {
|
|
@@ -1278,6 +1277,27 @@ var OnyxDatabaseImpl = class {
|
|
|
1278
1277
|
const { http } = await this.ensureAiClient();
|
|
1279
1278
|
return http.request("POST", "/api/script-approvals", input);
|
|
1280
1279
|
}
|
|
1280
|
+
async predict(publishedModelId, inputs) {
|
|
1281
|
+
const { http, databaseId } = await this.ensureClient();
|
|
1282
|
+
const path = `/data/${encodeURIComponent(
|
|
1283
|
+
databaseId
|
|
1284
|
+
)}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict`;
|
|
1285
|
+
return http.request(
|
|
1286
|
+
"POST",
|
|
1287
|
+
path,
|
|
1288
|
+
serializeDates({ inputs })
|
|
1289
|
+
);
|
|
1290
|
+
}
|
|
1291
|
+
async predictFromScript(publishedModelId, scriptId, scriptParameters = {}) {
|
|
1292
|
+
const { http, databaseId } = await this.ensureClient();
|
|
1293
|
+
const path = `/data/${encodeURIComponent(
|
|
1294
|
+
databaseId
|
|
1295
|
+
)}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict/script`;
|
|
1296
|
+
return http.request("POST", path, {
|
|
1297
|
+
scriptId,
|
|
1298
|
+
scriptParameters
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1281
1301
|
from(table) {
|
|
1282
1302
|
return new QueryBuilderImpl(this, String(table), this.defaultPartition);
|
|
1283
1303
|
}
|