@onyx.dev/onyx-database 2.0.0 → 2.0.1

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/edge.d.cts CHANGED
@@ -1,9 +1,6 @@
1
- import { O as OnyxFacade } from './aggregates-BJT5DGGX.cjs';
2
- export { s as AiChatClient, l as AiChatCompletionChoice, p as AiChatCompletionChunk, o as AiChatCompletionChunkChoice, n as AiChatCompletionChunkDelta, j as AiChatCompletionRequest, m as AiChatCompletionResponse, q as AiChatCompletionStream, k as AiChatCompletionUsage, f as AiChatMessage, r as AiChatOptions, c as AiChatRole, y as AiClient, x as AiErrorResponse, w as AiModel, v as AiModelsResponse, A as AiRequestOptions, t as AiScriptApprovalRequest, u as AiScriptApprovalResponse, h as AiTool, e as AiToolCall, d as AiToolCallFunction, i as AiToolChoice, g as AiToolFunction, a8 as FetchImpl, a7 as FetchResponse, F as FullTextQuery, ah as ICascadeBuilder, ai as ICascadeRelationshipBuilder, ae as IConditionBuilder, I as IOnyxDatabase, af as IQueryBuilder, ag as ISaveBuilder, a3 as LogicalOperator, b as OnyxConfig, a6 as OnyxDocument, aa as QueryCondition, a9 as QueryCriteria, a2 as QueryCriteriaOperator, ad as QueryPage, Q as QueryResults, a as QueryResultsPromise, R as RetryOptions, H as SchemaAttribute, Y as SchemaAttributeChange, D as SchemaDataType, a1 as SchemaDiff, P as SchemaEntity, V as SchemaHistoryEntry, G as SchemaIdentifier, E as SchemaIdentifierGenerator, K as SchemaIndex, Z as SchemaIndexChange, J as SchemaIndexType, L as SchemaResolver, _ as SchemaResolverChange, U as SchemaRevision, T as SchemaRevisionMetadata, a0 as SchemaTableDiff, N as SchemaTrigger, $ as SchemaTriggerChange, M as SchemaTriggerEvent, W as SchemaUpsertRequest, X as SchemaValidationResult, S as SecretMetadata, z as SecretRecord, C as SecretSaveRequest, B as SecretsListResponse, ab as SelectQuery, a4 as Sort, a5 as StreamAction, ac as UpdateQuery, aj as asc, aJ as avg, ar as between, aB as contains, aC as containsIgnoreCase, aL as count, ak as desc, al as eq, as as gt, at as gte, an as inOp, aH as isNull, az as like, aS as lower, au as lt, av as lte, aw as matches, aN as max, aQ as median, aM as min, am as neq, aD as notContains, aE as notContainsIgnoreCase, ap as notIn, aA as notLike, ay as notMatches, aI as notNull, aG as notStartsWith, aq as notWithin, aV as percentile, aU as replace, ax as search, aF as startsWith, aO as std, aT as substring, aK as sum, aR as upper, aP as variance, ao as within } from './aggregates-BJT5DGGX.cjs';
1
+ import { O as OnyxFacade } from './aggregates-BPpzRHGH.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-BPpzRHGH.cjs';
3
3
 
4
4
  declare const onyx: OnyxFacade;
5
5
 
6
- declare const sdkName = "@onyx.dev/onyx-database";
7
- declare const sdkVersion = "0.1.0";
8
-
9
- export { OnyxFacade, onyx, sdkName, sdkVersion };
6
+ export { OnyxFacade, onyx };
package/dist/edge.d.ts CHANGED
@@ -1,9 +1,6 @@
1
- import { O as OnyxFacade } from './aggregates-BJT5DGGX.js';
2
- export { s as AiChatClient, l as AiChatCompletionChoice, p as AiChatCompletionChunk, o as AiChatCompletionChunkChoice, n as AiChatCompletionChunkDelta, j as AiChatCompletionRequest, m as AiChatCompletionResponse, q as AiChatCompletionStream, k as AiChatCompletionUsage, f as AiChatMessage, r as AiChatOptions, c as AiChatRole, y as AiClient, x as AiErrorResponse, w as AiModel, v as AiModelsResponse, A as AiRequestOptions, t as AiScriptApprovalRequest, u as AiScriptApprovalResponse, h as AiTool, e as AiToolCall, d as AiToolCallFunction, i as AiToolChoice, g as AiToolFunction, a8 as FetchImpl, a7 as FetchResponse, F as FullTextQuery, ah as ICascadeBuilder, ai as ICascadeRelationshipBuilder, ae as IConditionBuilder, I as IOnyxDatabase, af as IQueryBuilder, ag as ISaveBuilder, a3 as LogicalOperator, b as OnyxConfig, a6 as OnyxDocument, aa as QueryCondition, a9 as QueryCriteria, a2 as QueryCriteriaOperator, ad as QueryPage, Q as QueryResults, a as QueryResultsPromise, R as RetryOptions, H as SchemaAttribute, Y as SchemaAttributeChange, D as SchemaDataType, a1 as SchemaDiff, P as SchemaEntity, V as SchemaHistoryEntry, G as SchemaIdentifier, E as SchemaIdentifierGenerator, K as SchemaIndex, Z as SchemaIndexChange, J as SchemaIndexType, L as SchemaResolver, _ as SchemaResolverChange, U as SchemaRevision, T as SchemaRevisionMetadata, a0 as SchemaTableDiff, N as SchemaTrigger, $ as SchemaTriggerChange, M as SchemaTriggerEvent, W as SchemaUpsertRequest, X as SchemaValidationResult, S as SecretMetadata, z as SecretRecord, C as SecretSaveRequest, B as SecretsListResponse, ab as SelectQuery, a4 as Sort, a5 as StreamAction, ac as UpdateQuery, aj as asc, aJ as avg, ar as between, aB as contains, aC as containsIgnoreCase, aL as count, ak as desc, al as eq, as as gt, at as gte, an as inOp, aH as isNull, az as like, aS as lower, au as lt, av as lte, aw as matches, aN as max, aQ as median, aM as min, am as neq, aD as notContains, aE as notContainsIgnoreCase, ap as notIn, aA as notLike, ay as notMatches, aI as notNull, aG as notStartsWith, aq as notWithin, aV as percentile, aU as replace, ax as search, aF as startsWith, aO as std, aT as substring, aK as sum, aR as upper, aP as variance, ao as within } from './aggregates-BJT5DGGX.js';
1
+ import { O as OnyxFacade } from './aggregates-BPpzRHGH.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-BPpzRHGH.js';
3
3
 
4
4
  declare const onyx: OnyxFacade;
5
5
 
6
- declare const sdkName = "@onyx.dev/onyx-database";
7
- declare const sdkVersion = "0.1.0";
8
-
9
- export { OnyxFacade, onyx, sdkName, sdkVersion };
6
+ export { OnyxFacade, onyx };
package/dist/edge.js CHANGED
@@ -1,3 +1,7 @@
1
+ // package.json
2
+ var name = "@onyx.dev/onyx-database";
3
+ var version = "2.0.1";
4
+
1
5
  // src/config/defaults.ts
2
6
  var DEFAULT_BASE_URL = "https://api.onyx.dev";
3
7
  var DEFAULT_AI_BASE_URL = "https://ai.onyx.dev";
@@ -801,8 +805,8 @@ var CascadeRelationshipBuilder = class {
801
805
  * builder.graph('programs');
802
806
  * ```
803
807
  */
804
- graph(name) {
805
- this.graphName = name;
808
+ graph(name2) {
809
+ this.graphName = name2;
806
810
  return this;
807
811
  }
808
812
  /**
@@ -889,24 +893,24 @@ function diffAttributes(apiAttrs, localAttrs) {
889
893
  const added = [];
890
894
  const removed = [];
891
895
  const changed = [];
892
- for (const [name, local] of localMap.entries()) {
893
- if (!apiMap.has(name)) {
896
+ for (const [name2, local] of localMap.entries()) {
897
+ if (!apiMap.has(name2)) {
894
898
  added.push(local);
895
899
  continue;
896
900
  }
897
- const api = apiMap.get(name);
901
+ const api = apiMap.get(name2);
898
902
  const apiNull = Boolean(api.isNullable);
899
903
  const localNull = Boolean(local.isNullable);
900
904
  if (api.type !== local.type || apiNull !== localNull) {
901
905
  changed.push({
902
- name,
906
+ name: name2,
903
907
  from: { type: api.type, isNullable: apiNull },
904
908
  to: { type: local.type, isNullable: localNull }
905
909
  });
906
910
  }
907
911
  }
908
- for (const name of apiMap.keys()) {
909
- if (!localMap.has(name)) removed.push(name);
912
+ for (const name2 of apiMap.keys()) {
913
+ if (!localMap.has(name2)) removed.push(name2);
910
914
  }
911
915
  added.sort((a, b) => a.name.localeCompare(b.name));
912
916
  removed.sort();
@@ -920,22 +924,22 @@ function diffIndexes(apiIndexes, localIndexes) {
920
924
  const added = [];
921
925
  const removed = [];
922
926
  const changed = [];
923
- for (const [name, local] of localMap.entries()) {
924
- if (!apiMap.has(name)) {
927
+ for (const [name2, local] of localMap.entries()) {
928
+ if (!apiMap.has(name2)) {
925
929
  added.push(local);
926
930
  continue;
927
931
  }
928
- const api = apiMap.get(name);
932
+ const api = apiMap.get(name2);
929
933
  const apiType = api.type ?? "DEFAULT";
930
934
  const localType = local.type ?? "DEFAULT";
931
935
  const apiScore = api.minimumScore;
932
936
  const localScore = local.minimumScore;
933
937
  if (apiType !== localType || apiScore !== localScore) {
934
- changed.push({ name, from: api, to: local });
938
+ changed.push({ name: name2, from: api, to: local });
935
939
  }
936
940
  }
937
- for (const name of apiMap.keys()) {
938
- if (!localMap.has(name)) removed.push(name);
941
+ for (const name2 of apiMap.keys()) {
942
+ if (!localMap.has(name2)) removed.push(name2);
939
943
  }
940
944
  added.sort((a, b) => a.name.localeCompare(b.name));
941
945
  removed.sort();
@@ -949,18 +953,18 @@ function diffResolvers(apiResolvers, localResolvers) {
949
953
  const added = [];
950
954
  const removed = [];
951
955
  const changed = [];
952
- for (const [name, local] of localMap.entries()) {
953
- if (!apiMap.has(name)) {
956
+ for (const [name2, local] of localMap.entries()) {
957
+ if (!apiMap.has(name2)) {
954
958
  added.push(local);
955
959
  continue;
956
960
  }
957
- const api = apiMap.get(name);
961
+ const api = apiMap.get(name2);
958
962
  if (api.resolver !== local.resolver) {
959
- changed.push({ name, from: api, to: local });
963
+ changed.push({ name: name2, from: api, to: local });
960
964
  }
961
965
  }
962
- for (const name of apiMap.keys()) {
963
- if (!localMap.has(name)) removed.push(name);
966
+ for (const name2 of apiMap.keys()) {
967
+ if (!localMap.has(name2)) removed.push(name2);
964
968
  }
965
969
  added.sort((a, b) => a.name.localeCompare(b.name));
966
970
  removed.sort();
@@ -974,18 +978,18 @@ function diffTriggers(apiTriggers, localTriggers) {
974
978
  const added = [];
975
979
  const removed = [];
976
980
  const changed = [];
977
- for (const [name, local] of localMap.entries()) {
978
- if (!apiMap.has(name)) {
981
+ for (const [name2, local] of localMap.entries()) {
982
+ if (!apiMap.has(name2)) {
979
983
  added.push(local);
980
984
  continue;
981
985
  }
982
- const api = apiMap.get(name);
986
+ const api = apiMap.get(name2);
983
987
  if (api.event !== local.event || api.trigger !== local.trigger) {
984
- changed.push({ name, from: api, to: local });
988
+ changed.push({ name: name2, from: api, to: local });
985
989
  }
986
990
  }
987
- for (const name of apiMap.keys()) {
988
- if (!localMap.has(name)) removed.push(name);
991
+ for (const name2 of apiMap.keys()) {
992
+ if (!localMap.has(name2)) removed.push(name2);
989
993
  }
990
994
  added.sort((a, b) => a.name.localeCompare(b.name));
991
995
  removed.sort();
@@ -1001,13 +1005,13 @@ function computeSchemaDiff(apiSchema, localSchema) {
1001
1005
  const newTables = [];
1002
1006
  const removedTables = [];
1003
1007
  const changedTables = [];
1004
- for (const [name, localEntity] of localMap.entries()) {
1005
- if (!apiMap.has(name)) {
1006
- newTables.push(name);
1008
+ for (const [name2, localEntity] of localMap.entries()) {
1009
+ if (!apiMap.has(name2)) {
1010
+ newTables.push(name2);
1007
1011
  continue;
1008
1012
  }
1009
- const apiEntity = apiMap.get(name);
1010
- const tableDiff = { name };
1013
+ const apiEntity = apiMap.get(name2);
1014
+ const tableDiff = { name: name2 };
1011
1015
  const partitionFrom = normalizePartition(apiEntity.partition);
1012
1016
  const partitionTo = normalizePartition(localEntity.partition);
1013
1017
  if (partitionFrom !== partitionTo) {
@@ -1032,8 +1036,8 @@ function computeSchemaDiff(apiSchema, localSchema) {
1032
1036
  changedTables.push(tableDiff);
1033
1037
  }
1034
1038
  }
1035
- for (const name of apiMap.keys()) {
1036
- if (!localMap.has(name)) removedTables.push(name);
1039
+ for (const name2 of apiMap.keys()) {
1040
+ if (!localMap.has(name2)) removedTables.push(name2);
1037
1041
  }
1038
1042
  newTables.sort();
1039
1043
  removedTables.sort();
@@ -2177,12 +2181,9 @@ var upper = (attribute) => `upper(${attribute})`;
2177
2181
  var lower = (attribute) => `lower(${attribute})`;
2178
2182
  var substring = (attribute, from, length) => `substring(${attribute},${from},${length})`;
2179
2183
  var replace = (attribute, pattern, repl) => `replace(${attribute}, '${pattern.replace(/'/g, "\\'")}', '${repl.replace(/'/g, "\\'")}')`;
2184
+ var format = (attribute, formatter) => `format(${attribute}, '${formatter.replace(/'/g, "\\'")}')`;
2180
2185
  var percentile = (attribute, p) => `percentile(${attribute}, ${p})`;
2181
2186
 
2182
- // src/edge.ts
2183
- var sdkName = "@onyx.dev/onyx-database";
2184
- var sdkVersion = "0.1.0";
2185
-
2186
- export { QueryResults, asc, avg, between, contains, containsIgnoreCase, count, desc, eq, gt, gte, inOp, isNull, like, lower, lt, lte, matches, max, median, min, neq, notContains, notContainsIgnoreCase, notIn, notLike, notMatches, notNull, notStartsWith, notWithin, onyx, percentile, replace, sdkName, sdkVersion, search, startsWith, std, substring, sum, upper, variance, within };
2187
+ export { QueryResults, asc, avg, between, contains, containsIgnoreCase, count, desc, eq, format, gt, gte, inOp, isNull, like, lower, lt, lte, matches, max, median, min, neq, notContains, notContainsIgnoreCase, notIn, notLike, notMatches, notNull, notStartsWith, notWithin, onyx, percentile, replace, name as sdkName, version as sdkVersion, search, startsWith, std, substring, sum, upper, variance, within };
2187
2188
  //# sourceMappingURL=edge.js.map
2188
2189
  //# sourceMappingURL=edge.js.map