@objectql/types 3.0.1 → 4.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.
Files changed (82) hide show
  1. package/dist/action.d.ts +29 -0
  2. package/dist/action.js +7 -0
  3. package/dist/action.js.map +1 -1
  4. package/dist/api.d.ts +13 -6
  5. package/dist/api.js +4 -3
  6. package/dist/api.js.map +1 -1
  7. package/dist/app.d.ts +12 -0
  8. package/dist/app.js +7 -0
  9. package/dist/app.js.map +1 -1
  10. package/dist/application.d.ts +7 -0
  11. package/dist/application.js +7 -0
  12. package/dist/application.js.map +1 -1
  13. package/dist/config.d.ts +11 -3
  14. package/dist/config.js +7 -0
  15. package/dist/config.js.map +1 -1
  16. package/dist/context.d.ts +7 -0
  17. package/dist/context.js +7 -0
  18. package/dist/context.js.map +1 -1
  19. package/dist/driver.d.ts +67 -0
  20. package/dist/driver.js +7 -0
  21. package/dist/driver.js.map +1 -1
  22. package/dist/field.d.ts +132 -53
  23. package/dist/field.js +7 -0
  24. package/dist/field.js.map +1 -1
  25. package/dist/form.d.ts +7 -0
  26. package/dist/form.js +4 -6
  27. package/dist/form.js.map +1 -1
  28. package/dist/formula.d.ts +7 -0
  29. package/dist/formula.js +9 -2
  30. package/dist/formula.js.map +1 -1
  31. package/dist/hook.d.ts +7 -0
  32. package/dist/hook.js +7 -0
  33. package/dist/hook.js.map +1 -1
  34. package/dist/index.d.ts +14 -1
  35. package/dist/index.js +14 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/loader.d.ts +7 -0
  38. package/dist/loader.js +7 -0
  39. package/dist/loader.js.map +1 -1
  40. package/dist/menu.d.ts +7 -0
  41. package/dist/menu.js +7 -0
  42. package/dist/menu.js.map +1 -1
  43. package/dist/migration.d.ts +7 -0
  44. package/dist/migration.js +7 -0
  45. package/dist/migration.js.map +1 -1
  46. package/dist/object.d.ts +91 -4
  47. package/dist/object.js +7 -0
  48. package/dist/object.js.map +1 -1
  49. package/dist/page.d.ts +7 -0
  50. package/dist/page.js +4 -6
  51. package/dist/page.js.map +1 -1
  52. package/dist/permission.d.ts +7 -0
  53. package/dist/permission.js +4 -6
  54. package/dist/permission.js.map +1 -1
  55. package/dist/query.d.ts +39 -3
  56. package/dist/query.js +7 -0
  57. package/dist/query.js.map +1 -1
  58. package/dist/registry.d.ts +19 -10
  59. package/dist/registry.js +15 -50
  60. package/dist/registry.js.map +1 -1
  61. package/dist/report.d.ts +7 -0
  62. package/dist/report.js +4 -5
  63. package/dist/report.js.map +1 -1
  64. package/dist/repository.d.ts +7 -0
  65. package/dist/repository.js +7 -0
  66. package/dist/repository.js.map +1 -1
  67. package/dist/validation.d.ts +7 -0
  68. package/dist/validation.js +5 -2
  69. package/dist/validation.js.map +1 -1
  70. package/dist/view.d.ts +7 -0
  71. package/dist/view.js +4 -6
  72. package/dist/view.js.map +1 -1
  73. package/dist/workflow.d.ts +7 -0
  74. package/dist/workflow.js +4 -5
  75. package/dist/workflow.js.map +1 -1
  76. package/package.json +12 -6
  77. package/schemas/app.schema.json +1 -0
  78. package/schemas/menu.schema.json +1 -0
  79. package/LICENSE +0 -21
  80. package/dist/plugin.d.ts +0 -5
  81. package/dist/plugin.js +0 -3
  82. package/dist/plugin.js.map +0 -1
package/dist/field.js CHANGED
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
+ /**
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  //# sourceMappingURL=field.js.map
package/dist/field.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sourceRoot":"","sources":["../src/field.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"field.js","sourceRoot":"","sources":["../src/field.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
package/dist/form.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
1
8
  /**
2
9
  * Form Metadata Definition
3
10
  *
package/dist/form.js CHANGED
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
  /**
3
- * Form Metadata Definition
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
4
5
  *
5
- * Defines the structure for forms, layouts, and field arrangements in ObjectQL.
6
- * Forms control how data is entered, edited, and displayed to users with
7
- * sections, tabs, columns, and conditional visibility.
8
- *
9
- * Based on patterns from Salesforce Page Layouts, Dynamics Forms, and similar platforms.
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
10
8
  */
11
9
  Object.defineProperty(exports, "__esModule", { value: true });
12
10
  //# sourceMappingURL=form.js.map
package/dist/form.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../src/form.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../src/form.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
package/dist/formula.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
1
8
  /**
2
9
  * Formula Engine Types
3
10
  *
package/dist/formula.js CHANGED
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ /**
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.FormulaError = exports.FormulaErrorType = void 0;
2
11
  /**
3
12
  * Formula Engine Types
4
13
  *
@@ -8,8 +17,6 @@
8
17
  *
9
18
  * @see docs/spec/formula.md for complete specification
10
19
  */
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.FormulaError = exports.FormulaErrorType = void 0;
13
20
  const api_1 = require("./api");
14
21
  /**
15
22
  * Error types that can occur during formula evaluation
@@ -1 +1 @@
1
- {"version":3,"file":"formula.js","sourceRoot":"","sources":["../src/formula.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,+BAAoD;AA0OpD;;GAEG;AACH,IAAY,gBAwBX;AAxBD,WAAY,gBAAgB;IACxB,qCAAqC;IACrC,iDAA6B,CAAA;IAE7B,sCAAsC;IACtC,uDAAmC,CAAA;IAEnC,iCAAiC;IACjC,6CAAyB,CAAA;IAEzB,uBAAuB;IACvB,yDAAqC,CAAA;IAErC,2CAA2C;IAC3C,qDAAiC,CAAA;IAEjC,yBAAyB;IACzB,uCAAmB,CAAA;IAEnB,gDAAgD;IAChD,6DAAyC,CAAA;IAEzC,4BAA4B;IAC5B,mDAA+B,CAAA;AACnC,CAAC,EAxBW,gBAAgB,gCAAhB,gBAAgB,QAwB3B;AAmBD;;;GAGG;AACH,MAAa,YAAa,SAAQ,mBAAa;IAK3C,YACI,IAAsB,EACtB,OAAe,EACf,UAAmB,EACnB,OAA6B;QAE7B,KAAK,CAAC;YACF,IAAI,EAAE,IAAc;YACpB,OAAO;YACP,OAAO,EAAE;gBACL,kBAAkB,EAAE,IAAI;gBACxB,UAAU;gBACV,GAAG,OAAO;aACb;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;IAChC,CAAC;CACJ;AAzBD,oCAyBC"}
1
+ {"version":3,"file":"formula.js","sourceRoot":"","sources":["../src/formula.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH;;;;;;;;GAQG;AAEH,+BAAoD;AA0OpD;;GAEG;AACH,IAAY,gBAwBX;AAxBD,WAAY,gBAAgB;IACxB,qCAAqC;IACrC,iDAA6B,CAAA;IAE7B,sCAAsC;IACtC,uDAAmC,CAAA;IAEnC,iCAAiC;IACjC,6CAAyB,CAAA;IAEzB,uBAAuB;IACvB,yDAAqC,CAAA;IAErC,2CAA2C;IAC3C,qDAAiC,CAAA;IAEjC,yBAAyB;IACzB,uCAAmB,CAAA;IAEnB,gDAAgD;IAChD,6DAAyC,CAAA;IAEzC,4BAA4B;IAC5B,mDAA+B,CAAA;AACnC,CAAC,EAxBW,gBAAgB,gCAAhB,gBAAgB,QAwB3B;AAmBD;;;GAGG;AACH,MAAa,YAAa,SAAQ,mBAAa;IAK3C,YACI,IAAsB,EACtB,OAAe,EACf,UAAmB,EACnB,OAA6B;QAE7B,KAAK,CAAC;YACF,IAAI,EAAE,IAAc;YACpB,OAAO;YACP,OAAO,EAAE;gBACL,kBAAkB,EAAE,IAAI;gBACxB,UAAU;gBACV,GAAG,OAAO;aACb;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;IAChC,CAAC;CACJ;AAzBD,oCAyBC"}
package/dist/hook.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
1
8
  /**
2
9
  * Standard CRUD operations supported by hooks.
3
10
  */
package/dist/hook.js CHANGED
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
+ /**
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  //# sourceMappingURL=hook.js.map
package/dist/hook.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"hook.js","sourceRoot":"","sources":["../src/hook.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"hook.js","sourceRoot":"","sources":["../src/hook.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,17 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ /**
9
+ * Export our runtime types.
10
+ *
11
+ * These modules import and extend types from @objectstack/spec where needed.
12
+ * Users of @objectql/types should import from here to get both protocol types
13
+ * and runtime extensions.
14
+ */
1
15
  export * from './field';
2
16
  export * from './object';
3
17
  export * from './driver';
@@ -7,7 +21,6 @@ export * from './hook';
7
21
  export * from './action';
8
22
  export * from './repository';
9
23
  export * from './app';
10
- export * from './plugin';
11
24
  export * from './config';
12
25
  export * from './context';
13
26
  export * from './validation';
package/dist/index.js CHANGED
@@ -1,4 +1,11 @@
1
1
  "use strict";
2
+ /**
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
2
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
10
  if (k2 === undefined) k2 = k;
4
11
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -14,6 +21,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
21
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
22
  };
16
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
+ /**
25
+ * Export our runtime types.
26
+ *
27
+ * These modules import and extend types from @objectstack/spec where needed.
28
+ * Users of @objectql/types should import from here to get both protocol types
29
+ * and runtime extensions.
30
+ */
17
31
  __exportStar(require("./field"), exports);
18
32
  __exportStar(require("./object"), exports);
19
33
  __exportStar(require("./driver"), exports);
@@ -23,7 +37,6 @@ __exportStar(require("./hook"), exports);
23
37
  __exportStar(require("./action"), exports);
24
38
  __exportStar(require("./repository"), exports);
25
39
  __exportStar(require("./app"), exports);
26
- __exportStar(require("./plugin"), exports);
27
40
  __exportStar(require("./config"), exports);
28
41
  __exportStar(require("./context"), exports);
29
42
  __exportStar(require("./validation"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,2CAAyB;AACzB,+CAA6B;AAC7B,wCAAsB;AACtB,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,2CAAyB;AACzB,gDAA8B;AAC9B,yCAAuB;AACvB,8CAA4B;AAC5B,wCAAsB;AACtB,yCAAuB;AACvB,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;AAEH;;;;;;GAMG;AACH,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,2CAAyB;AACzB,+CAA6B;AAC7B,wCAAsB;AACtB,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,2CAAyB;AACzB,gDAA8B;AAC9B,yCAAuB;AACvB,8CAA4B;AAC5B,wCAAsB;AACtB,yCAAuB;AACvB,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,4CAA0B"}
package/dist/loader.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
1
8
  import { MetadataRegistry } from './registry';
2
9
  export interface LoaderHandlerContext {
3
10
  file: string;
package/dist/loader.js CHANGED
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
+ /**
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  //# sourceMappingURL=loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
package/dist/menu.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
1
8
  export type MenuType = 'sidebar' | 'topnav' | 'context' | 'mobile' | 'admin';
2
9
  export type MenuItemType = 'page' | 'section' | 'url' | 'folder' | 'object' | 'action';
3
10
  export interface MenuItem {
package/dist/menu.js CHANGED
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
+ /**
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  //# sourceMappingURL=menu.js.map
package/dist/menu.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","sourceRoot":"","sources":["../src/menu.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["../src/menu.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -1,3 +1,10 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
1
8
  import { FieldConfig } from './field';
2
9
  /**
3
10
  * Represents the type of schema change operation.
package/dist/migration.js CHANGED
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
+ /**
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  //# sourceMappingURL=migration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration.js","sourceRoot":"","sources":["../src/migration.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"migration.js","sourceRoot":"","sources":["../src/migration.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
package/dist/object.d.ts CHANGED
@@ -1,12 +1,45 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Data } from '@objectstack/spec';
9
+ type ServiceObject = Data.ServiceObject;
10
+ type IndexSchema = NonNullable<ServiceObject['indexes']>[number];
1
11
  import { FieldConfig } from './field';
2
12
  import { ActionConfig } from './action';
3
13
  import { AnyValidationRule } from './validation';
14
+ /**
15
+ * Re-export Protocol Types from the Constitution
16
+ *
17
+ * @deprecated Import directly from @objectstack/spec instead
18
+ */
19
+ export type { ServiceObject as SpecObject, IndexSchema };
20
+ /**
21
+ * RUNTIME-SPECIFIC TYPES
22
+ * The following types extend or complement the Protocol Constitution
23
+ */
24
+ /**
25
+ * Index Configuration (compatible with Protocol)
26
+ *
27
+ * The Protocol defines IndexSchema. We provide a simpler alias for runtime convenience.
28
+ */
4
29
  export interface IndexConfig {
30
+ /** Index name (optional, auto-generated if not provided) */
31
+ name?: string;
5
32
  /** List of fields involved in the index */
6
33
  fields: string[];
7
34
  /** Whether the index enforces uniqueness */
8
35
  unique?: boolean;
9
36
  }
37
+ /**
38
+ * AI Search Configuration
39
+ *
40
+ * RUNTIME EXTENSION: Not part of the wire protocol.
41
+ * Defines semantic search capabilities for the runtime engine.
42
+ */
10
43
  export interface AiSearchConfig {
11
44
  /** Enable semantic search for this object */
12
45
  enabled: boolean;
@@ -17,22 +50,74 @@ export interface AiSearchConfig {
17
50
  /** Optional: Target vector field name if manually defined */
18
51
  target_field?: string;
19
52
  }
53
+ /**
54
+ * Object AI Configuration
55
+ *
56
+ * RUNTIME EXTENSION: Not part of the wire protocol.
57
+ */
20
58
  export interface ObjectAiConfig {
21
59
  /** Configuration for semantic search / RAG */
22
60
  search?: AiSearchConfig;
23
61
  }
62
+ /**
63
+ * Runtime Object Configuration
64
+ *
65
+ * Extends the Protocol ServiceObject with runtime-specific properties.
66
+ * The Protocol Constitution (SpecObject) defines the core object schema.
67
+ * This adds runtime conveniences like actions, AI config, and validation rules.
68
+ */
24
69
  export interface ObjectConfig {
70
+ /** Object name (required by Protocol) */
25
71
  name: string;
26
- datasource?: string;
72
+ /** Display label */
27
73
  label?: string;
28
- icon?: string;
74
+ /** Plural label */
75
+ pluralLabel?: string;
76
+ /** Description */
29
77
  description?: string;
78
+ /** Icon identifier */
79
+ icon?: string;
80
+ /** Datasource name (defaults to 'default') */
81
+ datasource?: string;
82
+ /** Custom table name (defaults to object name) */
83
+ tableName?: string;
84
+ /** Whether this is a system object */
85
+ isSystem?: boolean;
86
+ /**
87
+ * Field definitions
88
+ * Maps field names to their configurations
89
+ */
30
90
  fields: Record<string, FieldConfig>;
91
+ /**
92
+ * Index definitions
93
+ * Maps index names to their configurations
94
+ */
31
95
  indexes?: Record<string, IndexConfig>;
32
- /** AI capabilities configuration */
96
+ /** Primary display field */
97
+ nameField?: string;
98
+ /** Object capabilities (from Protocol) */
99
+ enable?: {
100
+ /** Enable history tracking (Audit Trail) */
101
+ trackHistory?: boolean;
102
+ /** Enable global search indexing */
103
+ searchable?: boolean;
104
+ /** Enable REST/GraphQL API access */
105
+ apiEnabled?: boolean;
106
+ /** Enable attachments/files */
107
+ files?: boolean;
108
+ /** Enable discussions/chatter */
109
+ feedEnabled?: boolean;
110
+ /** Enable Recycle Bin mechanics */
111
+ trash?: boolean;
112
+ };
113
+ /**
114
+ * RUNTIME EXTENSIONS BELOW
115
+ */
116
+ /** AI capabilities configuration (RUNTIME ONLY) */
33
117
  ai?: ObjectAiConfig;
118
+ /** Custom actions (RUNTIME ONLY) */
34
119
  actions?: Record<string, ActionConfig>;
35
- /** Validation rules for this object */
120
+ /** Validation rules for this object (RUNTIME ONLY) */
36
121
  validation?: {
37
122
  /** Validation rules */
38
123
  rules?: AnyValidationRule[];
@@ -45,6 +130,8 @@ export interface ObjectConfig {
45
130
  }
46
131
  /**
47
132
  * Base interface for all ObjectQL documents.
133
+ *
134
+ * RUNTIME TYPE: Represents a document instance in the database.
48
135
  */
49
136
  export interface ObjectDoc {
50
137
  _id?: string | number;
package/dist/object.js CHANGED
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
+ /**
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  //# sourceMappingURL=object.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"object.js","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"object.js","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
package/dist/page.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
1
8
  /**
2
9
  * Page Metadata Definition
3
10
  *
package/dist/page.js CHANGED
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
  /**
3
- * Page Metadata Definition
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
4
5
  *
5
- * Defines the structure for pages in ObjectQL applications.
6
- * Inspired by low-code platforms like Airtable, Retool, Appsmith, and Salesforce Lightning.
7
- *
8
- * Pages are composable UI containers that can render data from objects,
9
- * display custom components, and orchestrate user interactions.
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
10
8
  */
11
9
  Object.defineProperty(exports, "__esModule", { value: true });
12
10
  //# sourceMappingURL=page.js.map
package/dist/page.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"page.js","sourceRoot":"","sources":["../src/page.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
1
+ {"version":3,"file":"page.js","sourceRoot":"","sources":["../src/page.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -1,3 +1,10 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
1
8
  /**
2
9
  * Permission and Security Metadata Types
3
10
  *
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
  /**
3
- * Permission and Security Metadata Types
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
4
5
  *
5
- * This module defines the TypeScript interfaces for ObjectQL's permission system,
6
- * implementing role-based access control (RBAC), field-level security, and
7
- * record-level rules.
8
- *
9
- * Based on specification: docs/spec/permission.md
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
10
8
  */
11
9
  Object.defineProperty(exports, "__esModule", { value: true });
12
10
  //# sourceMappingURL=permission.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"permission.js","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
1
+ {"version":3,"file":"permission.js","sourceRoot":"","sources":["../src/permission.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
package/dist/query.d.ts CHANGED
@@ -1,18 +1,54 @@
1
- export type FilterCriterion = [string, string, any];
2
- export type FilterExpression = FilterCriterion | 'and' | 'or' | FilterExpression[];
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Data } from '@objectstack/spec';
9
+ type FilterCondition = Data.FilterCondition;
10
+ /**
11
+ * Modern Query Filter using @objectstack/spec FilterCondition
12
+ *
13
+ * Supports MongoDB/Prisma-style object-based syntax:
14
+ * - Implicit equality: { field: value }
15
+ * - Explicit operators: { field: { $eq: value, $gt: 10 } }
16
+ * - Logical operators: { $and: [...], $or: [...] }
17
+ * - String operators: { name: { $contains: "text" } }
18
+ * - Range operators: { age: { $gte: 18, $lte: 65 } }
19
+ * - Set operators: { status: { $in: ["active", "pending"] } }
20
+ * - Null checks: { field: { $null: true } }
21
+ *
22
+ * Note: $not operator is not supported. Use $ne for field-level negation.
23
+ */
24
+ export type Filter = FilterCondition;
3
25
  export type AggregateFunction = 'count' | 'sum' | 'avg' | 'min' | 'max';
4
26
  export interface AggregateOption {
5
27
  func: AggregateFunction;
6
28
  field: string;
7
29
  alias?: string;
8
30
  }
31
+ /**
32
+ * Unified Query Interface
33
+ *
34
+ * Provides a consistent query API across all ObjectQL drivers.
35
+ */
9
36
  export interface UnifiedQuery {
37
+ /** Field selection - specify which fields to return */
10
38
  fields?: string[];
11
- filters?: FilterExpression[];
39
+ /** Filter conditions using modern FilterCondition syntax */
40
+ filters?: Filter;
41
+ /** Sort order - array of [field, direction] tuples */
12
42
  sort?: [string, 'asc' | 'desc'][];
43
+ /** Pagination - number of records to skip */
13
44
  skip?: number;
45
+ /** Pagination - maximum number of records to return */
14
46
  limit?: number;
47
+ /** Relation expansion - load related records */
15
48
  expand?: Record<string, UnifiedQuery>;
49
+ /** Aggregation - group by fields */
16
50
  groupBy?: string[];
51
+ /** Aggregation - aggregate functions to apply */
17
52
  aggregate?: AggregateOption[];
18
53
  }
54
+ export {};
package/dist/query.js CHANGED
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
+ /**
3
+ * ObjectQL
4
+ * Copyright (c) 2026-present ObjectStack Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  //# sourceMappingURL=query.js.map
package/dist/query.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -1,16 +1,25 @@
1
+ /**
2
+ * ObjectQL
3
+ * Copyright (c) 2026-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ /**
9
+ * Re-export MetadataRegistry and MetadataItem from @objectql/runtime
10
+ *
11
+ * As of Week 3 refactoring, metadata management has been moved to the
12
+ * @objectql/runtime package to enable sharing across the ecosystem.
13
+ */
14
+ export { MetadataRegistry, MetadataItem } from '../../../objectstack/runtime/dist';
15
+ /**
16
+ * Legacy Metadata interface - kept for backward compatibility
17
+ * @deprecated Use MetadataItem from @objectql/runtime instead
18
+ */
1
19
  export interface Metadata {
2
20
  type: string;
3
21
  id: string;
4
22
  path?: string;
5
23
  package?: string;
6
- content: any;
7
- }
8
- export declare class MetadataRegistry {
9
- private store;
10
- register(type: string, metadata: Metadata): void;
11
- unregister(type: string, id: string): void;
12
- unregisterPackage(packageName: string): void;
13
- get<T = any>(type: string, id: string): T | undefined;
14
- list<T = any>(type: string): T[];
15
- getEntry(type: string, id: string): Metadata | undefined;
24
+ content: unknown;
16
25
  }