@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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as OnyxFacade } from './aggregates-BFOBBZkW.cjs';
2
- export { t as AiChatClient, l as AiChatCompletionChoice, q as AiChatCompletionChunk, p as AiChatCompletionChunkChoice, o as AiChatCompletionChunkDelta, j as AiChatCompletionRequest, m as AiChatCompletionResponse, r as AiChatCompletionStream, k as AiChatCompletionUsage, f as AiChatMessage, s as AiChatOptions, c as AiChatRole, B as AiClient, z as AiErrorResponse, y as AiModel, x as AiModelsResponse, A as AiRequestOptions, u as AiScriptApprovalRequest, w as AiScriptApprovalResponse, h as AiTool, e as AiToolCall, d as AiToolCallFunction, i as AiToolChoice, g as AiToolFunction, aa as FetchImpl, a9 as FetchResponse, F as FullTextQuery, aj as ICascadeBuilder, ak as ICascadeRelationshipBuilder, ag as IConditionBuilder, I as IOnyxDatabase, ah as IQueryBuilder, ai as ISaveBuilder, a5 as LogicalOperator, b as OnyxConfig, a8 as OnyxDocument, ac as QueryCondition, ab as QueryCriteria, a4 as QueryCriteriaOperator, af as QueryPage, Q as QueryResults, a as QueryResultsPromise, R as RetryOptions, K as SchemaAttribute, _ as SchemaAttributeChange, G as SchemaDataType, a3 as SchemaDiff, U as SchemaEntity, X as SchemaHistoryEntry, J as SchemaIdentifier, H as SchemaIdentifierGenerator, M as SchemaIndex, $ as SchemaIndexChange, L as SchemaIndexType, N as SchemaResolver, a0 as SchemaResolverChange, W as SchemaRevision, V as SchemaRevisionMetadata, a2 as SchemaTableDiff, T as SchemaTrigger, a1 as SchemaTriggerChange, P as SchemaTriggerEvent, Y as SchemaUpsertRequest, Z as SchemaValidationResult, S as SecretMetadata, C as SecretRecord, E as SecretSaveRequest, D as SecretsListResponse, ad as SelectQuery, a6 as Sort, a7 as StreamAction, ae as UpdateQuery, al as asc, aL as avg, at as between, aD as contains, aE as containsIgnoreCase, aN as count, am as desc, an as eq, aX as format, au as gt, av as gte, ap as inOp, aJ as isNull, aB as like, aU as lower, aw as lt, ax as lte, ay as matches, aP as max, aS as median, aO as min, ao as neq, aF as notContains, aG as notContainsIgnoreCase, ar as notIn, aC as notLike, aA as notMatches, aK as notNull, aI as notStartsWith, as as notWithin, aY as percentile, aW as replace, n as sdkName, v as sdkVersion, az as search, aH as startsWith, aQ as std, aV as substring, aM as sum, aT as upper, aR as variance, aq as within } from './aggregates-BFOBBZkW.cjs';
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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { O as OnyxFacade } from './aggregates-BFOBBZkW.js';
2
- export { t as AiChatClient, l as AiChatCompletionChoice, q as AiChatCompletionChunk, p as AiChatCompletionChunkChoice, o as AiChatCompletionChunkDelta, j as AiChatCompletionRequest, m as AiChatCompletionResponse, r as AiChatCompletionStream, k as AiChatCompletionUsage, f as AiChatMessage, s as AiChatOptions, c as AiChatRole, B as AiClient, z as AiErrorResponse, y as AiModel, x as AiModelsResponse, A as AiRequestOptions, u as AiScriptApprovalRequest, w as AiScriptApprovalResponse, h as AiTool, e as AiToolCall, d as AiToolCallFunction, i as AiToolChoice, g as AiToolFunction, aa as FetchImpl, a9 as FetchResponse, F as FullTextQuery, aj as ICascadeBuilder, ak as ICascadeRelationshipBuilder, ag as IConditionBuilder, I as IOnyxDatabase, ah as IQueryBuilder, ai as ISaveBuilder, a5 as LogicalOperator, b as OnyxConfig, a8 as OnyxDocument, ac as QueryCondition, ab as QueryCriteria, a4 as QueryCriteriaOperator, af as QueryPage, Q as QueryResults, a as QueryResultsPromise, R as RetryOptions, K as SchemaAttribute, _ as SchemaAttributeChange, G as SchemaDataType, a3 as SchemaDiff, U as SchemaEntity, X as SchemaHistoryEntry, J as SchemaIdentifier, H as SchemaIdentifierGenerator, M as SchemaIndex, $ as SchemaIndexChange, L as SchemaIndexType, N as SchemaResolver, a0 as SchemaResolverChange, W as SchemaRevision, V as SchemaRevisionMetadata, a2 as SchemaTableDiff, T as SchemaTrigger, a1 as SchemaTriggerChange, P as SchemaTriggerEvent, Y as SchemaUpsertRequest, Z as SchemaValidationResult, S as SecretMetadata, C as SecretRecord, E as SecretSaveRequest, D as SecretsListResponse, ad as SelectQuery, a6 as Sort, a7 as StreamAction, ae as UpdateQuery, al as asc, aL as avg, at as between, aD as contains, aE as containsIgnoreCase, aN as count, am as desc, an as eq, aX as format, au as gt, av as gte, ap as inOp, aJ as isNull, aB as like, aU as lower, aw as lt, ax as lte, ay as matches, aP as max, aS as median, aO as min, ao as neq, aF as notContains, aG as notContainsIgnoreCase, ar as notIn, aC as notLike, aA as notMatches, aK as notNull, aI as notStartsWith, as as notWithin, aY as percentile, aW as replace, n as sdkName, v as sdkVersion, az as search, aH as startsWith, aQ as std, aV as substring, aM as sum, aT as upper, aR as variance, aq as within } from './aggregates-BFOBBZkW.js';
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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@onyx.dev/onyx-database";
3
- var version = "2.1.1";
3
+ var version = "2.3.0";
4
4
 
5
5
  // src/config/defaults.ts
6
6
  var DEFAULT_BASE_URL = "https://api.onyx.dev";
@@ -1425,6 +1425,27 @@ var OnyxDatabaseImpl = class {
1425
1425
  const { http } = await this.ensureAiClient();
1426
1426
  return http.request("POST", "/api/script-approvals", input);
1427
1427
  }
1428
+ async predict(publishedModelId, inputs) {
1429
+ const { http, databaseId } = await this.ensureClient();
1430
+ const path = `/data/${encodeURIComponent(
1431
+ databaseId
1432
+ )}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict`;
1433
+ return http.request(
1434
+ "POST",
1435
+ path,
1436
+ serializeDates({ inputs })
1437
+ );
1438
+ }
1439
+ async predictFromScript(publishedModelId, scriptId, scriptParameters = {}) {
1440
+ const { http, databaseId } = await this.ensureClient();
1441
+ const path = `/data/${encodeURIComponent(
1442
+ databaseId
1443
+ )}/model-builder/published-model/${encodeURIComponent(publishedModelId)}/predict/script`;
1444
+ return http.request("POST", path, {
1445
+ scriptId,
1446
+ scriptParameters
1447
+ });
1448
+ }
1428
1449
  from(table) {
1429
1450
  return new QueryBuilderImpl(this, String(table), this.defaultPartition);
1430
1451
  }