@objectql/types 3.0.0 → 4.0.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.
Files changed (82) hide show
  1. package/dist/action.d.ts +28 -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 +61 -0
  20. package/dist/driver.js +7 -0
  21. package/dist/driver.js.map +1 -1
  22. package/dist/field.d.ts +129 -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 +89 -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 +37 -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.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,43 @@
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 type { ServiceObject, IndexSchema } from '@objectstack/spec';
1
9
  import { FieldConfig } from './field';
2
10
  import { ActionConfig } from './action';
3
11
  import { AnyValidationRule } from './validation';
12
+ /**
13
+ * Re-export Protocol Types from the Constitution
14
+ *
15
+ * @deprecated Import directly from @objectstack/spec instead
16
+ */
17
+ export type { ServiceObject as SpecObject, IndexSchema };
18
+ /**
19
+ * RUNTIME-SPECIFIC TYPES
20
+ * The following types extend or complement the Protocol Constitution
21
+ */
22
+ /**
23
+ * Index Configuration (compatible with Protocol)
24
+ *
25
+ * The Protocol defines IndexSchema. We provide a simpler alias for runtime convenience.
26
+ */
4
27
  export interface IndexConfig {
28
+ /** Index name (optional, auto-generated if not provided) */
29
+ name?: string;
5
30
  /** List of fields involved in the index */
6
31
  fields: string[];
7
32
  /** Whether the index enforces uniqueness */
8
33
  unique?: boolean;
9
34
  }
35
+ /**
36
+ * AI Search Configuration
37
+ *
38
+ * RUNTIME EXTENSION: Not part of the wire protocol.
39
+ * Defines semantic search capabilities for the runtime engine.
40
+ */
10
41
  export interface AiSearchConfig {
11
42
  /** Enable semantic search for this object */
12
43
  enabled: boolean;
@@ -17,22 +48,74 @@ export interface AiSearchConfig {
17
48
  /** Optional: Target vector field name if manually defined */
18
49
  target_field?: string;
19
50
  }
51
+ /**
52
+ * Object AI Configuration
53
+ *
54
+ * RUNTIME EXTENSION: Not part of the wire protocol.
55
+ */
20
56
  export interface ObjectAiConfig {
21
57
  /** Configuration for semantic search / RAG */
22
58
  search?: AiSearchConfig;
23
59
  }
60
+ /**
61
+ * Runtime Object Configuration
62
+ *
63
+ * Extends the Protocol ServiceObject with runtime-specific properties.
64
+ * The Protocol Constitution (SpecObject) defines the core object schema.
65
+ * This adds runtime conveniences like actions, AI config, and validation rules.
66
+ */
24
67
  export interface ObjectConfig {
68
+ /** Object name (required by Protocol) */
25
69
  name: string;
26
- datasource?: string;
70
+ /** Display label */
27
71
  label?: string;
28
- icon?: string;
72
+ /** Plural label */
73
+ pluralLabel?: string;
74
+ /** Description */
29
75
  description?: string;
76
+ /** Icon identifier */
77
+ icon?: string;
78
+ /** Datasource name (defaults to 'default') */
79
+ datasource?: string;
80
+ /** Custom table name (defaults to object name) */
81
+ tableName?: string;
82
+ /** Whether this is a system object */
83
+ isSystem?: boolean;
84
+ /**
85
+ * Field definitions
86
+ * Maps field names to their configurations
87
+ */
30
88
  fields: Record<string, FieldConfig>;
89
+ /**
90
+ * Index definitions
91
+ * Maps index names to their configurations
92
+ */
31
93
  indexes?: Record<string, IndexConfig>;
32
- /** AI capabilities configuration */
94
+ /** Primary display field */
95
+ nameField?: string;
96
+ /** Object capabilities (from Protocol) */
97
+ enable?: {
98
+ /** Enable history tracking (Audit Trail) */
99
+ trackHistory?: boolean;
100
+ /** Enable global search indexing */
101
+ searchable?: boolean;
102
+ /** Enable REST/GraphQL API access */
103
+ apiEnabled?: boolean;
104
+ /** Enable attachments/files */
105
+ files?: boolean;
106
+ /** Enable discussions/chatter */
107
+ feedEnabled?: boolean;
108
+ /** Enable Recycle Bin mechanics */
109
+ trash?: boolean;
110
+ };
111
+ /**
112
+ * RUNTIME EXTENSIONS BELOW
113
+ */
114
+ /** AI capabilities configuration (RUNTIME ONLY) */
33
115
  ai?: ObjectAiConfig;
116
+ /** Custom actions (RUNTIME ONLY) */
34
117
  actions?: Record<string, ActionConfig>;
35
- /** Validation rules for this object */
118
+ /** Validation rules for this object (RUNTIME ONLY) */
36
119
  validation?: {
37
120
  /** Validation rules */
38
121
  rules?: AnyValidationRule[];
@@ -45,6 +128,8 @@ export interface ObjectConfig {
45
128
  }
46
129
  /**
47
130
  * Base interface for all ObjectQL documents.
131
+ *
132
+ * RUNTIME TYPE: Represents a document instance in the database.
48
133
  */
49
134
  export interface ObjectDoc {
50
135
  _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,52 @@
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 type { FilterCondition } from '@objectstack/spec';
9
+ /**
10
+ * Modern Query Filter using @objectstack/spec FilterCondition
11
+ *
12
+ * Supports MongoDB/Prisma-style object-based syntax:
13
+ * - Implicit equality: { field: value }
14
+ * - Explicit operators: { field: { $eq: value, $gt: 10 } }
15
+ * - Logical operators: { $and: [...], $or: [...] }
16
+ * - String operators: { name: { $contains: "text" } }
17
+ * - Range operators: { age: { $gte: 18, $lte: 65 } }
18
+ * - Set operators: { status: { $in: ["active", "pending"] } }
19
+ * - Null checks: { field: { $null: true } }
20
+ *
21
+ * Note: $not operator is not supported. Use $ne for field-level negation.
22
+ */
23
+ export type Filter = FilterCondition;
3
24
  export type AggregateFunction = 'count' | 'sum' | 'avg' | 'min' | 'max';
4
25
  export interface AggregateOption {
5
26
  func: AggregateFunction;
6
27
  field: string;
7
28
  alias?: string;
8
29
  }
30
+ /**
31
+ * Unified Query Interface
32
+ *
33
+ * Provides a consistent query API across all ObjectQL drivers.
34
+ */
9
35
  export interface UnifiedQuery {
36
+ /** Field selection - specify which fields to return */
10
37
  fields?: string[];
11
- filters?: FilterExpression[];
38
+ /** Filter conditions using modern FilterCondition syntax */
39
+ filters?: Filter;
40
+ /** Sort order - array of [field, direction] tuples */
12
41
  sort?: [string, 'asc' | 'desc'][];
42
+ /** Pagination - number of records to skip */
13
43
  skip?: number;
44
+ /** Pagination - maximum number of records to return */
14
45
  limit?: number;
46
+ /** Relation expansion - load related records */
15
47
  expand?: Record<string, UnifiedQuery>;
48
+ /** Aggregation - group by fields */
16
49
  groupBy?: string[];
50
+ /** Aggregation - aggregate functions to apply */
17
51
  aggregate?: AggregateOption[];
18
52
  }
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 @objectstack/runtime
10
+ *
11
+ * As of Week 3 refactoring, metadata management has been moved to the
12
+ * @objectstack/runtime package to enable sharing across the ecosystem.
13
+ */
14
+ export { MetadataRegistry, MetadataItem } from '@objectstack/runtime';
15
+ /**
16
+ * Legacy Metadata interface - kept for backward compatibility
17
+ * @deprecated Use MetadataItem from @objectstack/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
  }