@api-client/core 0.19.8 → 0.19.10

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 (106) hide show
  1. package/Testing.md +1 -1
  2. package/build/src/decorators/observed.d.ts.map +1 -1
  3. package/build/src/decorators/observed.js +91 -0
  4. package/build/src/decorators/observed.js.map +1 -1
  5. package/build/src/modeling/ApiModel.d.ts +21 -7
  6. package/build/src/modeling/ApiModel.d.ts.map +1 -1
  7. package/build/src/modeling/ApiModel.js +70 -29
  8. package/build/src/modeling/ApiModel.js.map +1 -1
  9. package/build/src/modeling/DomainValidation.d.ts +1 -1
  10. package/build/src/modeling/DomainValidation.d.ts.map +1 -1
  11. package/build/src/modeling/DomainValidation.js.map +1 -1
  12. package/build/src/modeling/ExposedEntity.d.ts +14 -0
  13. package/build/src/modeling/ExposedEntity.d.ts.map +1 -1
  14. package/build/src/modeling/ExposedEntity.js +59 -6
  15. package/build/src/modeling/ExposedEntity.js.map +1 -1
  16. package/build/src/modeling/actions/Action.d.ts +11 -1
  17. package/build/src/modeling/actions/Action.d.ts.map +1 -1
  18. package/build/src/modeling/actions/Action.js +21 -3
  19. package/build/src/modeling/actions/Action.js.map +1 -1
  20. package/build/src/modeling/actions/CreateAction.d.ts +2 -1
  21. package/build/src/modeling/actions/CreateAction.d.ts.map +1 -1
  22. package/build/src/modeling/actions/CreateAction.js +2 -2
  23. package/build/src/modeling/actions/CreateAction.js.map +1 -1
  24. package/build/src/modeling/actions/DeleteAction.d.ts +2 -1
  25. package/build/src/modeling/actions/DeleteAction.d.ts.map +1 -1
  26. package/build/src/modeling/actions/DeleteAction.js +2 -2
  27. package/build/src/modeling/actions/DeleteAction.js.map +1 -1
  28. package/build/src/modeling/actions/ListAction.d.ts +2 -1
  29. package/build/src/modeling/actions/ListAction.d.ts.map +1 -1
  30. package/build/src/modeling/actions/ListAction.js +2 -2
  31. package/build/src/modeling/actions/ListAction.js.map +1 -1
  32. package/build/src/modeling/actions/ReadAction.d.ts +2 -1
  33. package/build/src/modeling/actions/ReadAction.d.ts.map +1 -1
  34. package/build/src/modeling/actions/ReadAction.js +2 -2
  35. package/build/src/modeling/actions/ReadAction.js.map +1 -1
  36. package/build/src/modeling/actions/SearchAction.d.ts +2 -1
  37. package/build/src/modeling/actions/SearchAction.d.ts.map +1 -1
  38. package/build/src/modeling/actions/SearchAction.js +2 -2
  39. package/build/src/modeling/actions/SearchAction.js.map +1 -1
  40. package/build/src/modeling/actions/UpdateAction.d.ts +2 -1
  41. package/build/src/modeling/actions/UpdateAction.d.ts.map +1 -1
  42. package/build/src/modeling/actions/UpdateAction.js +2 -2
  43. package/build/src/modeling/actions/UpdateAction.js.map +1 -1
  44. package/build/src/modeling/actions/index.d.ts +2 -1
  45. package/build/src/modeling/actions/index.d.ts.map +1 -1
  46. package/build/src/modeling/actions/index.js +7 -7
  47. package/build/src/modeling/actions/index.js.map +1 -1
  48. package/build/src/modeling/ai/types.d.ts +4 -4
  49. package/build/src/modeling/ai/types.d.ts.map +1 -1
  50. package/build/src/modeling/ai/types.js.map +1 -1
  51. package/build/src/modeling/index.d.ts +1 -0
  52. package/build/src/modeling/index.d.ts.map +1 -1
  53. package/build/src/modeling/index.js +1 -0
  54. package/build/src/modeling/index.js.map +1 -1
  55. package/build/src/modeling/types.d.ts +67 -0
  56. package/build/src/modeling/types.d.ts.map +1 -1
  57. package/build/src/modeling/types.js.map +1 -1
  58. package/build/src/modeling/validation/api_model_rules.d.ts +15 -0
  59. package/build/src/modeling/validation/api_model_rules.d.ts.map +1 -0
  60. package/build/src/modeling/validation/api_model_rules.js +599 -0
  61. package/build/src/modeling/validation/api_model_rules.js.map +1 -0
  62. package/build/src/modeling/validation/association_validation.d.ts.map +1 -1
  63. package/build/src/modeling/validation/association_validation.js +1 -3
  64. package/build/src/modeling/validation/association_validation.js.map +1 -1
  65. package/build/src/sdk/AiSdk.d.ts.map +1 -1
  66. package/build/src/sdk/AiSdk.js +2 -1
  67. package/build/src/sdk/AiSdk.js.map +1 -1
  68. package/build/tsconfig.tsbuildinfo +1 -1
  69. package/data/models/example-generator-api.json +12 -12
  70. package/eslint.config.js +0 -1
  71. package/package.json +17 -122
  72. package/src/decorators/observed.ts +91 -0
  73. package/src/modeling/ApiModel.ts +73 -33
  74. package/src/modeling/DomainValidation.ts +1 -1
  75. package/src/modeling/ExposedEntity.ts +63 -9
  76. package/src/modeling/actions/Action.ts +25 -2
  77. package/src/modeling/actions/CreateAction.ts +3 -2
  78. package/src/modeling/actions/DeleteAction.ts +3 -2
  79. package/src/modeling/actions/ListAction.ts +3 -2
  80. package/src/modeling/actions/ReadAction.ts +3 -2
  81. package/src/modeling/actions/SearchAction.ts +3 -2
  82. package/src/modeling/actions/UpdateAction.ts +3 -2
  83. package/src/modeling/ai/types.ts +4 -4
  84. package/src/modeling/types.ts +70 -0
  85. package/src/modeling/validation/api_model_rules.ts +640 -0
  86. package/src/modeling/validation/api_model_validation_rules.md +58 -0
  87. package/src/modeling/validation/association_validation.ts +1 -3
  88. package/src/sdk/AiSdk.ts +5 -4
  89. package/tests/unit/modeling/actions/Action.spec.ts +40 -8
  90. package/tests/unit/modeling/actions/CreateAction.spec.ts +5 -5
  91. package/tests/unit/modeling/actions/DeleteAction.spec.ts +6 -6
  92. package/tests/unit/modeling/actions/ListAction.spec.ts +7 -7
  93. package/tests/unit/modeling/actions/ReadAction.spec.ts +6 -6
  94. package/tests/unit/modeling/actions/SearchAction.spec.ts +6 -6
  95. package/tests/unit/modeling/actions/UpdateAction.spec.ts +6 -6
  96. package/tests/unit/modeling/api_model.spec.ts +190 -13
  97. package/tests/unit/modeling/api_model_expose_entity.spec.ts +43 -19
  98. package/tests/unit/modeling/api_model_remove_entity.spec.ts +6 -6
  99. package/tests/unit/modeling/exposed_entity.spec.ts +123 -3
  100. package/tests/unit/modeling/exposed_entity_actions.spec.ts +41 -18
  101. package/tests/unit/modeling/exposed_entity_setter_validation.spec.ts +1 -1
  102. package/tests/unit/modeling/rules/restoring_rules.spec.ts +9 -5
  103. package/tests/unit/modeling/validation/api_model_rules.spec.ts +324 -0
  104. package/tsconfig.browser.json +1 -1
  105. package/tsconfig.node.json +1 -1
  106. package/bin/test-web.ts +0 -6
@@ -21,7 +21,7 @@ let Action = (() => {
21
21
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
22
22
  _kind_decorators = [observed()];
23
23
  _accessRule_decorators = [observed({ deep: true })];
24
- _rateLimiting_decorators = [observed({ deep: true })];
24
+ _rateLimiting_decorators = [observed()];
25
25
  __esDecorate(this, null, _kind_decorators, { kind: "accessor", name: "kind", static: false, private: false, access: { has: obj => "kind" in obj, get: obj => obj.kind, set: (obj, value) => { obj.kind = value; } }, metadata: _metadata }, _kind_initializers, _kind_extraInitializers);
26
26
  __esDecorate(this, null, _accessRule_decorators, { kind: "accessor", name: "accessRule", static: false, private: false, access: { has: obj => "accessRule" in obj, get: obj => obj.accessRule, set: (obj, value) => { obj.accessRule = value; } }, metadata: _metadata }, _accessRule_initializers, _accessRule_extraInitializers);
27
27
  __esDecorate(this, null, _rateLimiting_decorators, { kind: "accessor", name: "rateLimiting", static: false, private: false, access: { has: obj => "rateLimiting" in obj, get: obj => obj.rateLimiting, set: (obj, value) => { obj.rateLimiting = value; } }, metadata: _metadata }, _rateLimiting_initializers, _rateLimiting_extraInitializers);
@@ -36,9 +36,10 @@ let Action = (() => {
36
36
  #rateLimiting_accessor_storage = (__runInitializers(this, _accessRule_extraInitializers), __runInitializers(this, _rateLimiting_initializers, void 0));
37
37
  get rateLimiting() { return this.#rateLimiting_accessor_storage; }
38
38
  set rateLimiting(value) { this.#rateLimiting_accessor_storage = value; }
39
- constructor(state = {}) {
39
+ parent = __runInitializers(this, _rateLimiting_extraInitializers);
40
+ constructor(parent, state = {}) {
40
41
  super();
41
- __runInitializers(this, _rateLimiting_extraInitializers);
42
+ this.parent = parent;
42
43
  this.kind = state.kind || '';
43
44
  this.accessRule = state.accessRule ? state.accessRule.map((rule) => restoreAccessRule(rule)) : [];
44
45
  this.rateLimiting = state.rateLimiting ? new RateLimitingConfiguration(state.rateLimiting) : undefined;
@@ -58,6 +59,23 @@ let Action = (() => {
58
59
  }
59
60
  return result;
60
61
  }
62
+ /**
63
+ * Returns all access rules for this action, including the ones from all the parents up to the API.
64
+ */
65
+ getAllRules() {
66
+ const rules = [...this.parent.getAllRules(), ...this.accessRule];
67
+ return rules;
68
+ }
69
+ /**
70
+ * Returns all rate limiters for this action, including the ones from all the parents up to the API.
71
+ */
72
+ getAllRateLimiters() {
73
+ const rateLimiters = this.parent.getAllRateLimiters();
74
+ if (this.rateLimiting) {
75
+ rateLimiters.push(this.rateLimiting);
76
+ }
77
+ return rateLimiters;
78
+ }
61
79
  };
62
80
  })();
63
81
  export { Action };
@@ -1 +1 @@
1
- {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/modeling/actions/Action.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,yBAAyB,EAAmC,MAAM,uCAAuC,CAAA;AAClH,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AA8BrD;;GAEG;IACU,MAAM;sBAAS,WAAW;;;;;;;;;;iBAA1B,MAAO,SAAQ,WAAW;;;gCACpC,QAAQ,EAAE;sCACV,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;wCACxB,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAFb,iKAAS,IAAI,6BAAJ,IAAI,mFAAQ;YACP,mLAAS,UAAU,6BAAV,UAAU,+FAAc;YACjC,yLAAS,YAAY,6BAAZ,YAAY,mGAAuC;;;QAF1E,6EAAqB;QAArB,IAAS,IAAI,0CAAQ;QAArB,IAAS,IAAI,gDAAQ;QACP,6IAAiC;QAAjC,IAAS,UAAU,gDAAc;QAAjC,IAAS,UAAU,sDAAc;QACjC,uJAA4D;QAA5D,IAAS,YAAY,kDAAuC;QAA5D,IAAS,YAAY,wDAAuC;QAEtF,YAAY,QAA+B,EAAE;YAC3C,KAAK,EAAE,CAAA;;YACP,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAA;YAC5B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;YACjG,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,yBAAyB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;SACvG;QAED,YAAY;YACV,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;QACzC,CAAC;QAED,MAAM;YACJ,MAAM,MAAM,GAAiB;gBAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAA;YACD,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;gBAC3B,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;YAClE,CAAC;YACD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACtB,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAA;YAClD,CAAC;YACD,OAAO,MAAM,CAAA;QACf,CAAC;;;SA3BU,MAAM","sourcesContent":["import { AccessRule, AccessRuleSchema } from '../rules/AccessRule.js'\nimport { RateLimitingConfiguration, RateLimitingConfigurationSchema } from '../rules/RateLimitingConfiguration.js'\nimport { observed } from '../../decorators/observed.js'\nimport { restoreAccessRule } from '../rules/index.js'\n\n/**\n * A base interface for common properties across all actions.\n */\nexport interface ActionSchema {\n /**\n * The specific kind of action (e.g., 'List', 'Read', etc.)\n */\n kind: string\n /**\n * Access control rules defining who can perform this action. It is only applied if the\n * authorization strategy is set to 'RBAC'.\n * If no rules grant access, it's denied by default making it essentially private.\n *\n * Note, the API can defined top level access rules that apply to all actions. If this property is set,\n * it overrides the top level access rules for this specific action.\n *\n * It is an ordered list, meaning the first rule that matches the user will be applied.\n * If multiple rules match, the first one in the list takes precedence.\n * If no rules match, the action is denied.\n */\n accessRule?: AccessRuleSchema[]\n /**\n * Optional configuration for action-wide rate limiting and throttling.\n * Defines rules to protect the action from overuse.\n */\n rateLimiting?: RateLimitingConfigurationSchema\n}\n\n/**\n * A base class for common properties across all actions.\n */\nexport class Action extends EventTarget implements ActionSchema {\n @observed() accessor kind: string\n @observed({ deep: true }) accessor accessRule: AccessRule[]\n @observed({ deep: true }) accessor rateLimiting: RateLimitingConfiguration | undefined\n\n constructor(state: Partial<ActionSchema> = {}) {\n super()\n this.kind = state.kind || ''\n this.accessRule = state.accessRule ? state.accessRule.map((rule) => restoreAccessRule(rule)) : []\n this.rateLimiting = state.rateLimiting ? new RateLimitingConfiguration(state.rateLimiting) : undefined\n }\n\n notifyChange() {\n this.dispatchEvent(new Event('change'))\n }\n\n toJSON(): ActionSchema {\n const result: ActionSchema = {\n kind: this.kind,\n }\n if (this.accessRule.length) {\n result.accessRule = this.accessRule.map((rule) => rule.toJSON())\n }\n if (this.rateLimiting) {\n result.rateLimiting = this.rateLimiting.toJSON()\n }\n return result\n }\n}\n"]}
1
+ {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/modeling/actions/Action.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,yBAAyB,EAAmC,MAAM,uCAAuC,CAAA;AAClH,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;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ACD,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;gBAC3B,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;YAClE,CAAC;YACD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACtB,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAA;YAClD,CAAC;YACD,OAAO,MAAM,CAAA;QACf,CAAC;QAED;;WAEG;QACH,WAAW;YACT,MAAM,KAAK,GAAiB,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAA;YAC9E,OAAO,KAAK,CAAA;QACd,CAAC;QAED;;WAEG;QACH,kBAAkB;YAChB,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAA;YACrD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACtB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;YACtC,CAAC;YACD,OAAO,YAAY,CAAA;QACrB,CAAC;;;SAjDU,MAAM","sourcesContent":["import { AccessRule, AccessRuleSchema } from '../rules/AccessRule.js'\nimport { RateLimitingConfiguration, RateLimitingConfigurationSchema } from '../rules/RateLimitingConfiguration.js'\nimport { observed } from '../../decorators/observed.js'\nimport { restoreAccessRule } from '../rules/index.js'\nimport type { ExposedEntity } from '../ExposedEntity.js'\n\n/**\n * A base interface for common properties across all actions.\n */\nexport interface ActionSchema {\n /**\n * The specific kind of action (e.g., 'List', 'Read', etc.)\n */\n kind: string\n /**\n * Access control rules defining who can perform this action. It is only applied if the\n * authorization strategy is set to 'RBAC'.\n * If no rules grant access, it's denied by default making it essentially private.\n *\n * Note, the API can defined top level access rules that apply to all actions. If this property is set,\n * it overrides the top level access rules for this specific action.\n *\n * It is an ordered list, meaning the first rule that matches the user will be applied.\n * If multiple rules match, the first one in the list takes precedence.\n * If no rules match, the action is denied.\n */\n accessRule?: AccessRuleSchema[]\n /**\n * Optional configuration for action-wide rate limiting and throttling.\n * Defines rules to protect the action from overuse.\n */\n rateLimiting?: RateLimitingConfigurationSchema\n}\n\n/**\n * A base class for common properties across all actions.\n */\nexport class Action extends EventTarget implements ActionSchema {\n @observed() accessor kind: string\n @observed({ deep: true }) accessor accessRule: AccessRule[]\n @observed() accessor rateLimiting: RateLimitingConfiguration | undefined\n\n protected parent: ExposedEntity\n\n constructor(parent: ExposedEntity, state: Partial<ActionSchema> = {}) {\n super()\n this.parent = parent\n this.kind = state.kind || ''\n this.accessRule = state.accessRule ? state.accessRule.map((rule) => restoreAccessRule(rule)) : []\n this.rateLimiting = state.rateLimiting ? new RateLimitingConfiguration(state.rateLimiting) : undefined\n }\n\n notifyChange() {\n this.dispatchEvent(new Event('change'))\n }\n\n toJSON(): ActionSchema {\n const result: ActionSchema = {\n kind: this.kind,\n }\n if (this.accessRule.length) {\n result.accessRule = this.accessRule.map((rule) => rule.toJSON())\n }\n if (this.rateLimiting) {\n result.rateLimiting = this.rateLimiting.toJSON()\n }\n return result\n }\n\n /**\n * Returns all access rules for this action, including the ones from all the parents up to the API.\n */\n getAllRules(): AccessRule[] {\n const rules: AccessRule[] = [...this.parent.getAllRules(), ...this.accessRule]\n return rules\n }\n\n /**\n * Returns all rate limiters for this action, including the ones from all the parents up to the API.\n */\n getAllRateLimiters(): RateLimitingConfiguration[] {\n const rateLimiters = this.parent.getAllRateLimiters()\n if (this.rateLimiting) {\n rateLimiters.push(this.rateLimiting)\n }\n return rateLimiters\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { Action, type ActionSchema } from './Action.js';
2
+ import type { ExposedEntity } from '../ExposedEntity.js';
2
3
  /**
3
4
  * Enables adding a new resource to a collection.
4
5
  * Endpoint: POST /[entity-collection-name]
@@ -12,7 +13,7 @@ export interface CreateActionSchema extends ActionSchema {
12
13
  */
13
14
  export declare class CreateAction extends Action implements CreateActionSchema {
14
15
  accessor kind: 'create';
15
- constructor(state?: Partial<CreateActionSchema>);
16
+ constructor(parent: ExposedEntity, state?: Partial<CreateActionSchema>);
16
17
  toJSON(): CreateActionSchema;
17
18
  static isCreateAction(action: Action): action is CreateAction;
18
19
  static isCreateActionSchema(schema: ActionSchema): schema is CreateActionSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"CreateAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/CreateAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAGvD;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,IAAI,EAAE,QAAQ,CAAA;CACf;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,MAAO,YAAW,kBAAkB;IACpE,SAA8B,IAAI,EAAE,QAAQ,CAAA;gBAEhC,KAAK,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAK1C,MAAM,IAAI,kBAAkB;IAOrC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY;IAI7D,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,kBAAkB;CAGhF"}
1
+ {"version":3,"file":"CreateAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/CreateAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,IAAI,EAAE,QAAQ,CAAA;CACf;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,MAAO,YAAW,kBAAkB;IACpE,SAA8B,IAAI,EAAE,QAAQ,CAAA;gBAEhC,MAAM,EAAE,aAAa,EAAE,KAAK,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAKjE,MAAM,IAAI,kBAAkB;IAOrC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY;IAI7D,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,kBAAkB;CAGhF"}
@@ -20,8 +20,8 @@ let CreateAction = (() => {
20
20
  #kind_accessor_storage = __runInitializers(this, _kind_initializers, void 0);
21
21
  get kind() { return this.#kind_accessor_storage; }
22
22
  set kind(value) { this.#kind_accessor_storage = value; }
23
- constructor(state = {}) {
24
- super(state);
23
+ constructor(parent, state = {}) {
24
+ super(parent, state);
25
25
  __runInitializers(this, _kind_extraInitializers);
26
26
  this.kind = 'create';
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CreateAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/CreateAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAUvD;;;GAGG;IACU,YAAY;sBAAS,MAAM;;;;iBAA3B,YAAa,SAAQ,WAAM;;;gCACrC,QAAQ,EAAE;YAAC,iKAAkB,IAAI,6BAAJ,IAAI,mFAAU;;;QAAhC,6EAAgC;QAAhC,IAAkB,IAAI,0CAAU;QAAhC,IAAkB,IAAI,gDAAU;QAE5C,YAAY,QAAqC,EAAE;YACjD,KAAK,CAAC,KAAK,CAAC,CAAA;;YACZ,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;SACrB;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAyB;gBACzC,IAAI,EAAE,QAAQ;aACf,CAAA;QACH,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,MAAc;YAClC,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;QAED,MAAM,CAAC,oBAAoB,CAAC,MAAoB;YAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;;;SArBU,YAAY","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed } from '../../decorators/observed.js'\n\n/**\n * Enables adding a new resource to a collection.\n * Endpoint: POST /[entity-collection-name]\n */\nexport interface CreateActionSchema extends ActionSchema {\n kind: 'create'\n}\n\n/**\n * Enables adding a new resource to a collection.\n * Endpoint: POST /[entity-collection-name]\n */\nexport class CreateAction extends Action implements CreateActionSchema {\n @observed() override accessor kind: 'create'\n\n constructor(state: Partial<CreateActionSchema> = {}) {\n super(state)\n this.kind = 'create'\n }\n\n override toJSON(): CreateActionSchema {\n return {\n ...(super.toJSON() as CreateActionSchema),\n kind: 'create',\n }\n }\n\n static isCreateAction(action: Action): action is CreateAction {\n return action.kind === 'create'\n }\n\n static isCreateActionSchema(schema: ActionSchema): schema is CreateActionSchema {\n return schema.kind === 'create'\n }\n}\n"]}
1
+ {"version":3,"file":"CreateAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/CreateAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAWvD;;;GAGG;IACU,YAAY;sBAAS,MAAM;;;;iBAA3B,YAAa,SAAQ,WAAM;;;gCACrC,QAAQ,EAAE;YAAC,iKAAkB,IAAI,6BAAJ,IAAI,mFAAU;;;QAAhC,6EAAgC;QAAhC,IAAkB,IAAI,0CAAU;QAAhC,IAAkB,IAAI,gDAAU;QAE5C,YAAY,MAAqB,EAAE,QAAqC,EAAE;YACxE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;;YACpB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;SACrB;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAyB;gBACzC,IAAI,EAAE,QAAQ;aACf,CAAA;QACH,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,MAAc;YAClC,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;QAED,MAAM,CAAC,oBAAoB,CAAC,MAAoB;YAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;;;SArBU,YAAY","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed } from '../../decorators/observed.js'\nimport type { ExposedEntity } from '../ExposedEntity.js'\n\n/**\n * Enables adding a new resource to a collection.\n * Endpoint: POST /[entity-collection-name]\n */\nexport interface CreateActionSchema extends ActionSchema {\n kind: 'create'\n}\n\n/**\n * Enables adding a new resource to a collection.\n * Endpoint: POST /[entity-collection-name]\n */\nexport class CreateAction extends Action implements CreateActionSchema {\n @observed() override accessor kind: 'create'\n\n constructor(parent: ExposedEntity, state: Partial<CreateActionSchema> = {}) {\n super(parent, state)\n this.kind = 'create'\n }\n\n override toJSON(): CreateActionSchema {\n return {\n ...(super.toJSON() as CreateActionSchema),\n kind: 'create',\n }\n }\n\n static isCreateAction(action: Action): action is CreateAction {\n return action.kind === 'create'\n }\n\n static isCreateActionSchema(schema: ActionSchema): schema is CreateActionSchema {\n return schema.kind === 'create'\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { Action, type ActionSchema } from './Action.js';
2
+ import type { ExposedEntity } from '../ExposedEntity.js';
2
3
  export type DeleteStrategy = 'soft' | 'hard';
3
4
  /**
4
5
  * Enables removing an existing resource.
@@ -28,7 +29,7 @@ export declare class DeleteAction extends Action implements DeleteActionSchema {
28
29
  accessor kind: 'delete';
29
30
  accessor strategy: DeleteStrategy;
30
31
  accessor retentionPeriod: number;
31
- constructor(state?: Partial<DeleteActionSchema>);
32
+ constructor(parent: ExposedEntity, state?: Partial<DeleteActionSchema>);
32
33
  toJSON(): DeleteActionSchema;
33
34
  static isDeleteAction(action: Action): action is DeleteAction;
34
35
  static isDeleteActionSchema(schema: ActionSchema): schema is DeleteActionSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/DeleteAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAGvD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAA;AAE5C;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,IAAI,EAAE,QAAQ,CAAA;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,MAAO,YAAW,kBAAkB;IACpE,SAA8B,IAAI,EAAE,QAAQ,CAAA;IAChC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAA;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;gBAEhC,KAAK,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAO1C,MAAM,IAAI,kBAAkB;IASrC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY;IAI7D,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,kBAAkB;CAGhF"}
1
+ {"version":3,"file":"DeleteAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/DeleteAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAA;AAE5C;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,IAAI,EAAE,QAAQ,CAAA;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,MAAO,YAAW,kBAAkB;IACpE,SAA8B,IAAI,EAAE,QAAQ,CAAA;IAChC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAA;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;gBAEhC,MAAM,EAAE,aAAa,EAAE,KAAK,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAOjE,MAAM,IAAI,kBAAkB;IASrC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY;IAI7D,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,kBAAkB;CAGhF"}
@@ -36,8 +36,8 @@ let DeleteAction = (() => {
36
36
  #retentionPeriod_accessor_storage = (__runInitializers(this, _strategy_extraInitializers), __runInitializers(this, _retentionPeriod_initializers, void 0));
37
37
  get retentionPeriod() { return this.#retentionPeriod_accessor_storage; }
38
38
  set retentionPeriod(value) { this.#retentionPeriod_accessor_storage = value; }
39
- constructor(state = {}) {
40
- super(state);
39
+ constructor(parent, state = {}) {
40
+ super(parent, state);
41
41
  __runInitializers(this, _retentionPeriod_extraInitializers);
42
42
  this.kind = 'delete';
43
43
  this.strategy = state.strategy || 'soft';
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/DeleteAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAyBvD;;;GAGG;IACU,YAAY;sBAAS,MAAM;;;;;;;;;;iBAA3B,YAAa,SAAQ,WAAM;;;gCACrC,QAAQ,EAAE;oCACV,QAAQ,EAAE;2CACV,QAAQ,EAAE;YAFC,iKAAkB,IAAI,6BAAJ,IAAI,mFAAU;YAChC,6KAAS,QAAQ,6BAAR,QAAQ,2FAAgB;YACjC,kMAAS,eAAe,6BAAf,eAAe,yGAAQ;;;QAFhC,6EAAgC;QAAhC,IAAkB,IAAI,0CAAU;QAAhC,IAAkB,IAAI,gDAAU;QAChC,yIAAiC;QAAjC,IAAS,QAAQ,8CAAgB;QAAjC,IAAS,QAAQ,oDAAgB;QACjC,2JAAgC;QAAhC,IAAS,eAAe,qDAAQ;QAAhC,IAAS,eAAe,2DAAQ;QAE5C,YAAY,QAAqC,EAAE;YACjD,KAAK,CAAC,KAAK,CAAC,CAAA;;YACZ,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;YACpB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAA;YACxC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAA;SACnD;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAyB;gBACzC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,eAAe,EAAE,IAAI,CAAC,eAAe;aACtC,CAAA;QACH,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,MAAc;YAClC,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;QAED,MAAM,CAAC,oBAAoB,CAAC,MAAoB;YAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;;;SA3BU,YAAY","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed } from '../../decorators/observed.js'\n\nexport type DeleteStrategy = 'soft' | 'hard'\n\n/**\n * Enables removing an existing resource.\n * Endpoint: DELETE /[entity-collection-name]/{id}\n */\nexport interface DeleteActionSchema extends ActionSchema {\n kind: 'delete'\n /**\n * The strategy for deletion. Default: Soft Delete.\n *\n * @default 'soft'\n */\n strategy?: DeleteStrategy\n /**\n * The data retention period (in days) for soft-deleted resources.\n * This defines how long the data should be kept before it is permanently deleted.\n *\n * @default 30\n */\n retentionPeriod?: number\n}\n\n/**\n * Enables removing an existing resource.\n * Endpoint: DELETE /[entity-collection-name]/{id}\n */\nexport class DeleteAction extends Action implements DeleteActionSchema {\n @observed() override accessor kind: 'delete'\n @observed() accessor strategy: DeleteStrategy\n @observed() accessor retentionPeriod: number\n\n constructor(state: Partial<DeleteActionSchema> = {}) {\n super(state)\n this.kind = 'delete'\n this.strategy = state.strategy || 'soft'\n this.retentionPeriod = state.retentionPeriod ?? 30\n }\n\n override toJSON(): DeleteActionSchema {\n return {\n ...(super.toJSON() as DeleteActionSchema),\n kind: 'delete',\n strategy: this.strategy,\n retentionPeriod: this.retentionPeriod,\n }\n }\n\n static isDeleteAction(action: Action): action is DeleteAction {\n return action.kind === 'delete'\n }\n\n static isDeleteActionSchema(schema: ActionSchema): schema is DeleteActionSchema {\n return schema.kind === 'delete'\n }\n}\n"]}
1
+ {"version":3,"file":"DeleteAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/DeleteAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AA0BvD;;;GAGG;IACU,YAAY;sBAAS,MAAM;;;;;;;;;;iBAA3B,YAAa,SAAQ,WAAM;;;gCACrC,QAAQ,EAAE;oCACV,QAAQ,EAAE;2CACV,QAAQ,EAAE;YAFC,iKAAkB,IAAI,6BAAJ,IAAI,mFAAU;YAChC,6KAAS,QAAQ,6BAAR,QAAQ,2FAAgB;YACjC,kMAAS,eAAe,6BAAf,eAAe,yGAAQ;;;QAFhC,6EAAgC;QAAhC,IAAkB,IAAI,0CAAU;QAAhC,IAAkB,IAAI,gDAAU;QAChC,yIAAiC;QAAjC,IAAS,QAAQ,8CAAgB;QAAjC,IAAS,QAAQ,oDAAgB;QACjC,2JAAgC;QAAhC,IAAS,eAAe,qDAAQ;QAAhC,IAAS,eAAe,2DAAQ;QAE5C,YAAY,MAAqB,EAAE,QAAqC,EAAE;YACxE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;;YACpB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;YACpB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAA;YACxC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAA;SACnD;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAyB;gBACzC,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,eAAe,EAAE,IAAI,CAAC,eAAe;aACtC,CAAA;QACH,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,MAAc;YAClC,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;QAED,MAAM,CAAC,oBAAoB,CAAC,MAAoB;YAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;;;SA3BU,YAAY","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed } from '../../decorators/observed.js'\nimport type { ExposedEntity } from '../ExposedEntity.js'\n\nexport type DeleteStrategy = 'soft' | 'hard'\n\n/**\n * Enables removing an existing resource.\n * Endpoint: DELETE /[entity-collection-name]/{id}\n */\nexport interface DeleteActionSchema extends ActionSchema {\n kind: 'delete'\n /**\n * The strategy for deletion. Default: Soft Delete.\n *\n * @default 'soft'\n */\n strategy?: DeleteStrategy\n /**\n * The data retention period (in days) for soft-deleted resources.\n * This defines how long the data should be kept before it is permanently deleted.\n *\n * @default 30\n */\n retentionPeriod?: number\n}\n\n/**\n * Enables removing an existing resource.\n * Endpoint: DELETE /[entity-collection-name]/{id}\n */\nexport class DeleteAction extends Action implements DeleteActionSchema {\n @observed() override accessor kind: 'delete'\n @observed() accessor strategy: DeleteStrategy\n @observed() accessor retentionPeriod: number\n\n constructor(parent: ExposedEntity, state: Partial<DeleteActionSchema> = {}) {\n super(parent, state)\n this.kind = 'delete'\n this.strategy = state.strategy || 'soft'\n this.retentionPeriod = state.retentionPeriod ?? 30\n }\n\n override toJSON(): DeleteActionSchema {\n return {\n ...(super.toJSON() as DeleteActionSchema),\n kind: 'delete',\n strategy: this.strategy,\n retentionPeriod: this.retentionPeriod,\n }\n }\n\n static isDeleteAction(action: Action): action is DeleteAction {\n return action.kind === 'delete'\n }\n\n static isDeleteActionSchema(schema: ActionSchema): schema is DeleteActionSchema {\n return schema.kind === 'delete'\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import type { PaginationStrategy } from '../types.js';
2
2
  import { Action, type ActionSchema } from './Action.js';
3
+ import type { ExposedEntity } from '../ExposedEntity.js';
3
4
  /**
4
5
  * Enables retrieving a collection of resources.
5
6
  * Endpoint: GET /[entity-collection-name]
@@ -31,7 +32,7 @@ export declare class ListAction extends Action implements ListActionSchema {
31
32
  accessor pagination: PaginationStrategy;
32
33
  accessor filterableFields: string[];
33
34
  accessor sortableFields: string[];
34
- constructor(state?: Partial<ListActionSchema>);
35
+ constructor(parent: ExposedEntity, state?: Partial<ListActionSchema>);
35
36
  toJSON(): ListActionSchema;
36
37
  static isListAction(action: Action): action is ListAction;
37
38
  static isListActionSchema(schema: ActionSchema): schema is ListActionSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"ListAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/ListAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAGvD;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAA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B;IAChE,SAA8B,IAAI,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAA;IACvC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE,CAAK;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAK;gBAEpD,MAAM,EAAE,aAAa,EAAE,KAAK,GAAE,OAAO,CAAC,gBAAgB,CAAM;IAY/D,MAAM,IAAI,gBAAgB;IASnC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,UAAU;IAIzD,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB;CAG5E"}
@@ -44,8 +44,8 @@ let ListAction = (() => {
44
44
  #sortableFields_accessor_storage = (__runInitializers(this, _filterableFields_extraInitializers), __runInitializers(this, _sortableFields_initializers, []));
45
45
  get sortableFields() { return this.#sortableFields_accessor_storage; }
46
46
  set sortableFields(value) { this.#sortableFields_accessor_storage = value; }
47
- constructor(state = {}) {
48
- super(state);
47
+ constructor(parent, state = {}) {
48
+ super(parent, state);
49
49
  __runInitializers(this, _sortableFields_extraInitializers);
50
50
  this.kind = state.kind || 'list';
51
51
  this.pagination = state.pagination
@@ -1 +1 @@
1
- {"version":3,"file":"ListAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/ListAction.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAyB9D;;;GAGG;IACU,UAAU;sBAAS,MAAM;;;;;;;;;;;;;iBAAzB,UAAW,SAAQ,WAAM;;;gCACnC,QAAQ,EAAE;sCACV,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;4CACxB,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;0CACxB,QAAQ,CAAC,EAAE,IA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gBAAgB,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAa;gBACjF,cAAc,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAa;aAC9E,CAAA;QACH,CAAC;QAED,MAAM,CAAC,YAAY,CAAC,MAAc;YAChC,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAA;QAC/B,CAAC;QAED,MAAM,CAAC,kBAAkB,CAAC,MAAoB;YAC5C,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAA;QAC/B,CAAC;;;SAjCU,UAAU","sourcesContent":["import type { PaginationStrategy } from '../types.js'\nimport { Action, type ActionSchema } from './Action.js'\nimport { observed, toRaw } from '../../decorators/observed.js'\n\n/**\n * Enables retrieving a collection of resources.\n * Endpoint: GET /[entity-collection-name]\n */\nexport interface ListActionSchema extends ActionSchema {\n kind: 'list'\n /**\n * The pagination strategy used for this action.\n * This defines how the results are paginated when retrieving a collection of resources.\n * It can be either 'cursor' or 'offset'.\n */\n pagination: PaginationStrategy\n /**\n * Fields from the entity that can be used for filtering.\n * Must be marked as \"indexable\" in the Data Model.\n */\n filterableFields: string[]\n /**\n * Fields from the entity that can be used for sorting.\n */\n sortableFields: string[]\n}\n\n/**\n * Enables retrieving a collection of resources.\n * Endpoint: GET /[entity-collection-name]\n */\nexport class ListAction extends Action implements ListActionSchema {\n @observed() override accessor kind: 'list'\n @observed({ deep: true }) accessor pagination: PaginationStrategy\n @observed({ deep: true }) accessor filterableFields: string[] = []\n @observed({ deep: true }) accessor sortableFields: string[] = []\n\n constructor(state: Partial<ListActionSchema> = {}) {\n super(state)\n this.kind = state.kind || 'list'\n this.pagination = state.pagination\n ? { ...state.pagination }\n : {\n kind: 'offset',\n }\n this.filterableFields = state.filterableFields ? [...state.filterableFields] : []\n this.sortableFields = state.sortableFields ? [...state.sortableFields] : []\n }\n\n override toJSON(): ListActionSchema {\n return {\n ...(super.toJSON() as ListActionSchema),\n pagination: structuredClone(toRaw(this, this.pagination)) as PaginationStrategy,\n filterableFields: structuredClone(toRaw(this, this.filterableFields)) as string[],\n sortableFields: structuredClone(toRaw(this, this.sortableFields)) as string[],\n }\n }\n\n static isListAction(action: Action): action is ListAction {\n return action.kind === 'list'\n }\n\n static isListActionSchema(schema: ActionSchema): schema is ListActionSchema {\n return schema.kind === 'list'\n }\n}\n"]}
1
+ {"version":3,"file":"ListAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/ListAction.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AA0B9D;;;GAGG;IACU,UAAU;sBAAS,MAAM;;;;;;;;;;;;;iBAAzB,UAAW,SAAQ,WAAM;;;gCACnC,QAAQ,EAAE;sCACV,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;4CACxB,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;0CACxB,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAHb,iKAAkB,IAAI,6BAAJ,IAAI,mFAAQ;YAChB,mLAAS,UAAU,6BAAV,UAAU,+FAAoB;YACvC,qMAAS,gBAAgB,6BAAhB,gBAAgB,2GAAe;YACxC,+LAAS,cAAc,6BAAd,cAAc,uGAAe;;;QAHpD,6EAA8B;QAA9B,IAAkB,IAAI,0CAAQ;QAA9B,IAAkB,IAAI,gDAAQ;QAChB,6IAAuC;QAAvC,IAAS,UAAU,gDAAoB;QAAvC,IAAS,UAAU,sDAAoB;QACvC,sJAAsC,EAAE,GAAA;QAAxC,IAAS,gBAAgB,sDAAe;QAAxC,IAAS,gBAAgB,4DAAe;QACxC,wJAAoC,EAAE,GAAA;QAAtC,IAAS,cAAc,oDAAe;QAAtC,IAAS,cAAc,0DAAe;QAEhE,YAAY,MAAqB,EAAE,QAAmC,EAAE;YACtE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;;YACpB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,MAAM,CAAA;YAChC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU;gBAChC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,UAAU,EAAE;gBACzB,CAAC,CAAC;oBACE,IAAI,EAAE,QAAQ;iBACf,CAAA;YACL,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;YACjF,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;SAC5E;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAuB;gBACvC,UAAU,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAuB;gBAC/E,gBAAgB,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAa;gBACjF,cAAc,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAa;aAC9E,CAAA;QACH,CAAC;QAED,MAAM,CAAC,YAAY,CAAC,MAAc;YAChC,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAA;QAC/B,CAAC;QAED,MAAM,CAAC,kBAAkB,CAAC,MAAoB;YAC5C,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAA;QAC/B,CAAC;;;SAjCU,UAAU","sourcesContent":["import type { PaginationStrategy } from '../types.js'\nimport { Action, type ActionSchema } from './Action.js'\nimport { observed, toRaw } from '../../decorators/observed.js'\nimport type { ExposedEntity } from '../ExposedEntity.js'\n\n/**\n * Enables retrieving a collection of resources.\n * Endpoint: GET /[entity-collection-name]\n */\nexport interface ListActionSchema extends ActionSchema {\n kind: 'list'\n /**\n * The pagination strategy used for this action.\n * This defines how the results are paginated when retrieving a collection of resources.\n * It can be either 'cursor' or 'offset'.\n */\n pagination: PaginationStrategy\n /**\n * Fields from the entity that can be used for filtering.\n * Must be marked as \"indexable\" in the Data Model.\n */\n filterableFields: string[]\n /**\n * Fields from the entity that can be used for sorting.\n */\n sortableFields: string[]\n}\n\n/**\n * Enables retrieving a collection of resources.\n * Endpoint: GET /[entity-collection-name]\n */\nexport class ListAction extends Action implements ListActionSchema {\n @observed() override accessor kind: 'list'\n @observed({ deep: true }) accessor pagination: PaginationStrategy\n @observed({ deep: true }) accessor filterableFields: string[] = []\n @observed({ deep: true }) accessor sortableFields: string[] = []\n\n constructor(parent: ExposedEntity, state: Partial<ListActionSchema> = {}) {\n super(parent, state)\n this.kind = state.kind || 'list'\n this.pagination = state.pagination\n ? { ...state.pagination }\n : {\n kind: 'offset',\n }\n this.filterableFields = state.filterableFields ? [...state.filterableFields] : []\n this.sortableFields = state.sortableFields ? [...state.sortableFields] : []\n }\n\n override toJSON(): ListActionSchema {\n return {\n ...(super.toJSON() as ListActionSchema),\n pagination: structuredClone(toRaw(this, this.pagination)) as PaginationStrategy,\n filterableFields: structuredClone(toRaw(this, this.filterableFields)) as string[],\n sortableFields: structuredClone(toRaw(this, this.sortableFields)) as string[],\n }\n }\n\n static isListAction(action: Action): action is ListAction {\n return action.kind === 'list'\n }\n\n static isListActionSchema(schema: ActionSchema): schema is ListActionSchema {\n return schema.kind === 'list'\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { Action, type ActionSchema } from './Action.js';
2
+ import type { ExposedEntity } from '../ExposedEntity.js';
2
3
  /**
3
4
  * Enables retrieving a single resource by its ID.
4
5
  * Endpoint: GET /[entity-collection-name]/{id}
@@ -12,7 +13,7 @@ export interface ReadActionSchema extends ActionSchema {
12
13
  */
13
14
  export declare class ReadAction extends Action implements ReadActionSchema {
14
15
  accessor kind: 'read';
15
- constructor(state?: Partial<ReadActionSchema>);
16
+ constructor(parent: ExposedEntity, state?: Partial<ReadActionSchema>);
16
17
  toJSON(): ReadActionSchema;
17
18
  static isReadAction(action: Action): action is ReadAction;
18
19
  static isReadActionSchema(schema: ActionSchema): schema is ReadActionSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"ReadAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/ReadAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAGvD;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,IAAI,EAAE,MAAM,CAAA;CAGb;AAED;;;GAGG;AACH,qBAAa,UAAW,SAAQ,MAAO,YAAW,gBAAgB;IAChE,SAA8B,IAAI,EAAE,MAAM,CAAA;gBAE9B,KAAK,GAAE,OAAO,CAAC,gBAAgB,CAAM;IAKxC,MAAM,IAAI,gBAAgB;IAOnC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,UAAU;IAIzD,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB;CAG5E"}
1
+ {"version":3,"file":"ReadAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/ReadAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,IAAI,EAAE,MAAM,CAAA;CAGb;AAED;;;GAGG;AACH,qBAAa,UAAW,SAAQ,MAAO,YAAW,gBAAgB;IAChE,SAA8B,IAAI,EAAE,MAAM,CAAA;gBAE9B,MAAM,EAAE,aAAa,EAAE,KAAK,GAAE,OAAO,CAAC,gBAAgB,CAAM;IAK/D,MAAM,IAAI,gBAAgB;IAOnC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,UAAU;IAIzD,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,gBAAgB;CAG5E"}
@@ -20,8 +20,8 @@ let ReadAction = (() => {
20
20
  #kind_accessor_storage = __runInitializers(this, _kind_initializers, void 0);
21
21
  get kind() { return this.#kind_accessor_storage; }
22
22
  set kind(value) { this.#kind_accessor_storage = value; }
23
- constructor(state = {}) {
24
- super(state);
23
+ constructor(parent, state = {}) {
24
+ super(parent, state);
25
25
  __runInitializers(this, _kind_extraInitializers);
26
26
  this.kind = 'read';
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ReadAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/ReadAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAYvD;;;GAGG;IACU,UAAU;sBAAS,MAAM;;;;iBAAzB,UAAW,SAAQ,WAAM;;;gCACnC,QAAQ,EAAE;YAAC,iKAAkB,IAAI,6BAAJ,IAAI,mFAAQ;;;QAA9B,6EAA8B;QAA9B,IAAkB,IAAI,0CAAQ;QAA9B,IAAkB,IAAI,gDAAQ;QAE1C,YAAY,QAAmC,EAAE;YAC/C,KAAK,CAAC,KAAK,CAAC,CAAA;;YACZ,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;SACnB;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAuB;gBACvC,IAAI,EAAE,MAAM;aACb,CAAA;QACH,CAAC;QAED,MAAM,CAAC,YAAY,CAAC,MAAc;YAChC,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAA;QAC/B,CAAC;QAED,MAAM,CAAC,kBAAkB,CAAC,MAAoB;YAC5C,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAA;QAC/B,CAAC;;;SArBU,UAAU","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed } from '../../decorators/observed.js'\n\n/**\n * Enables retrieving a single resource by its ID.\n * Endpoint: GET /[entity-collection-name]/{id}\n */\nexport interface ReadActionSchema extends ActionSchema {\n kind: 'read'\n // Association handling (Link IDs vs. Embed) is defined on the\n // data association itself in the Data Modeler.\n}\n\n/**\n * Enables retrieving a single resource by its ID.\n * Endpoint: GET /[entity-collection-name]/{id}\n */\nexport class ReadAction extends Action implements ReadActionSchema {\n @observed() override accessor kind: 'read'\n\n constructor(state: Partial<ReadActionSchema> = {}) {\n super(state)\n this.kind = 'read'\n }\n\n override toJSON(): ReadActionSchema {\n return {\n ...(super.toJSON() as ReadActionSchema),\n kind: 'read',\n }\n }\n\n static isReadAction(action: Action): action is ReadAction {\n return action.kind === 'read'\n }\n\n static isReadActionSchema(schema: ActionSchema): schema is ReadActionSchema {\n return schema.kind === 'read'\n }\n}\n"]}
1
+ {"version":3,"file":"ReadAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/ReadAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAavD;;;GAGG;IACU,UAAU;sBAAS,MAAM;;;;iBAAzB,UAAW,SAAQ,WAAM;;;gCACnC,QAAQ,EAAE;YAAC,iKAAkB,IAAI,6BAAJ,IAAI,mFAAQ;;;QAA9B,6EAA8B;QAA9B,IAAkB,IAAI,0CAAQ;QAA9B,IAAkB,IAAI,gDAAQ;QAE1C,YAAY,MAAqB,EAAE,QAAmC,EAAE;YACtE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;;YACpB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;SACnB;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAuB;gBACvC,IAAI,EAAE,MAAM;aACb,CAAA;QACH,CAAC;QAED,MAAM,CAAC,YAAY,CAAC,MAAc;YAChC,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAA;QAC/B,CAAC;QAED,MAAM,CAAC,kBAAkB,CAAC,MAAoB;YAC5C,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAA;QAC/B,CAAC;;;SArBU,UAAU","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed } from '../../decorators/observed.js'\nimport type { ExposedEntity } from '../ExposedEntity.js'\n\n/**\n * Enables retrieving a single resource by its ID.\n * Endpoint: GET /[entity-collection-name]/{id}\n */\nexport interface ReadActionSchema extends ActionSchema {\n kind: 'read'\n // Association handling (Link IDs vs. Embed) is defined on the\n // data association itself in the Data Modeler.\n}\n\n/**\n * Enables retrieving a single resource by its ID.\n * Endpoint: GET /[entity-collection-name]/{id}\n */\nexport class ReadAction extends Action implements ReadActionSchema {\n @observed() override accessor kind: 'read'\n\n constructor(parent: ExposedEntity, state: Partial<ReadActionSchema> = {}) {\n super(parent, state)\n this.kind = 'read'\n }\n\n override toJSON(): ReadActionSchema {\n return {\n ...(super.toJSON() as ReadActionSchema),\n kind: 'read',\n }\n }\n\n static isReadAction(action: Action): action is ReadAction {\n return action.kind === 'read'\n }\n\n static isReadActionSchema(schema: ActionSchema): schema is ReadActionSchema {\n return schema.kind === 'read'\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { Action, type ActionSchema } from './Action.js';
2
+ import type { ExposedEntity } from '../ExposedEntity.js';
2
3
  /**
3
4
  * Enables keyword-based search across specified fields.
4
5
  * Endpoint: GET /[entity-collection-name]/search
@@ -18,7 +19,7 @@ export interface SearchActionSchema extends ActionSchema {
18
19
  export declare class SearchAction extends Action implements SearchActionSchema {
19
20
  accessor kind: 'search';
20
21
  accessor fields: string[];
21
- constructor(state?: Partial<SearchActionSchema>);
22
+ constructor(parent: ExposedEntity, state?: Partial<SearchActionSchema>);
22
23
  toJSON(): SearchActionSchema;
23
24
  static isSearchActionSchema(schema: ActionSchema): schema is SearchActionSchema;
24
25
  static isSearchAction(action: Action): action is SearchAction;
@@ -1 +1 @@
1
- {"version":3,"file":"SearchAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/SearchAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAGvD;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,IAAI,EAAE,QAAQ,CAAA;IACd;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,MAAO,YAAW,kBAAkB;IACpE,SAA8B,IAAI,EAAE,QAAQ,CAAA;IAClB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAA;gBAEvC,KAAK,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAM1C,MAAM,IAAI,kBAAkB;IAQrC,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,kBAAkB;IAI/E,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY;CAG9D"}
1
+ {"version":3,"file":"SearchAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/SearchAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,IAAI,EAAE,QAAQ,CAAA;IACd;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,MAAO,YAAW,kBAAkB;IACpE,SAA8B,IAAI,EAAE,QAAQ,CAAA;IAClB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAA;gBAEvC,MAAM,EAAE,aAAa,EAAE,KAAK,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAMjE,MAAM,IAAI,kBAAkB;IAQrC,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,kBAAkB;IAI/E,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY;CAG9D"}
@@ -28,8 +28,8 @@ let SearchAction = (() => {
28
28
  #fields_accessor_storage = (__runInitializers(this, _kind_extraInitializers), __runInitializers(this, _fields_initializers, void 0));
29
29
  get fields() { return this.#fields_accessor_storage; }
30
30
  set fields(value) { this.#fields_accessor_storage = value; }
31
- constructor(state = {}) {
32
- super(state);
31
+ constructor(parent, state = {}) {
32
+ super(parent, state);
33
33
  __runInitializers(this, _fields_extraInitializers);
34
34
  this.kind = 'search';
35
35
  this.fields = state.fields ? [...state.fields] : [];
@@ -1 +1 @@
1
- {"version":3,"file":"SearchAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/SearchAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAe9D;;;GAGG;IACU,YAAY;sBAAS,MAAM;;;;;;;iBAA3B,YAAa,SAAQ,WAAM;;;gCACrC,QAAQ,EAAE;kCACV,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YADb,iKAAkB,IAAI,6BAAJ,IAAI,mFAAU;YAClB,uKAAS,MAAM,6BAAN,MAAM,uFAAU;;;QADvC,6EAAgC;QAAhC,IAAkB,IAAI,0CAAU;QAAhC,IAAkB,IAAI,gDAAU;QAClB,qIAAyB;QAAzB,IAAS,MAAM,4CAAU;QAAzB,IAAS,MAAM,kDAAU;QAEnD,YAAY,QAAqC,EAAE;YACjD,KAAK,CAAC,KAAK,CAAC,CAAA;;YACZ,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;YACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;SACpD;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAyB;gBACzC,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAa;aAC9D,CAAA;QACH,CAAC;QAED,MAAM,CAAC,oBAAoB,CAAC,MAAoB;YAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,MAAc;YAClC,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;;;SAxBU,YAAY","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed, toRaw } from '../../decorators/observed.js'\n\n/**\n * Enables keyword-based search across specified fields.\n * Endpoint: GET /[entity-collection-name]/search\n */\nexport interface SearchActionSchema extends ActionSchema {\n kind: 'search'\n /**\n * The fields within the entity to be included in the search scope.\n * Must be \"indexable\" and typically text-based.\n */\n fields: string[]\n}\n\n/**\n * Enables keyword-based search across specified fields.\n * Endpoint: GET /[entity-collection-name]/search\n */\nexport class SearchAction extends Action implements SearchActionSchema {\n @observed() override accessor kind: 'search'\n @observed({ deep: true }) accessor fields: string[]\n\n constructor(state: Partial<SearchActionSchema> = {}) {\n super(state)\n this.kind = 'search'\n this.fields = state.fields ? [...state.fields] : []\n }\n\n override toJSON(): SearchActionSchema {\n return {\n ...(super.toJSON() as SearchActionSchema),\n kind: 'search',\n fields: structuredClone(toRaw(this, this.fields)) as string[],\n }\n }\n\n static isSearchActionSchema(schema: ActionSchema): schema is SearchActionSchema {\n return schema.kind === 'search'\n }\n\n static isSearchAction(action: Action): action is SearchAction {\n return action.kind === 'search'\n }\n}\n"]}
1
+ {"version":3,"file":"SearchAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/SearchAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAgB9D;;;GAGG;IACU,YAAY;sBAAS,MAAM;;;;;;;iBAA3B,YAAa,SAAQ,WAAM;;;gCACrC,QAAQ,EAAE;kCACV,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YADb,iKAAkB,IAAI,6BAAJ,IAAI,mFAAU;YAClB,uKAAS,MAAM,6BAAN,MAAM,uFAAU;;;QADvC,6EAAgC;QAAhC,IAAkB,IAAI,0CAAU;QAAhC,IAAkB,IAAI,gDAAU;QAClB,qIAAyB;QAAzB,IAAS,MAAM,4CAAU;QAAzB,IAAS,MAAM,kDAAU;QAEnD,YAAY,MAAqB,EAAE,QAAqC,EAAE;YACxE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;;YACpB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;YACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;SACpD;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAyB;gBACzC,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAa;aAC9D,CAAA;QACH,CAAC;QAED,MAAM,CAAC,oBAAoB,CAAC,MAAoB;YAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,MAAc;YAClC,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;;;SAxBU,YAAY","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed, toRaw } from '../../decorators/observed.js'\nimport type { ExposedEntity } from '../ExposedEntity.js'\n\n/**\n * Enables keyword-based search across specified fields.\n * Endpoint: GET /[entity-collection-name]/search\n */\nexport interface SearchActionSchema extends ActionSchema {\n kind: 'search'\n /**\n * The fields within the entity to be included in the search scope.\n * Must be \"indexable\" and typically text-based.\n */\n fields: string[]\n}\n\n/**\n * Enables keyword-based search across specified fields.\n * Endpoint: GET /[entity-collection-name]/search\n */\nexport class SearchAction extends Action implements SearchActionSchema {\n @observed() override accessor kind: 'search'\n @observed({ deep: true }) accessor fields: string[]\n\n constructor(parent: ExposedEntity, state: Partial<SearchActionSchema> = {}) {\n super(parent, state)\n this.kind = 'search'\n this.fields = state.fields ? [...state.fields] : []\n }\n\n override toJSON(): SearchActionSchema {\n return {\n ...(super.toJSON() as SearchActionSchema),\n kind: 'search',\n fields: structuredClone(toRaw(this, this.fields)) as string[],\n }\n }\n\n static isSearchActionSchema(schema: ActionSchema): schema is SearchActionSchema {\n return schema.kind === 'search'\n }\n\n static isSearchAction(action: Action): action is SearchAction {\n return action.kind === 'search'\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { Action, type ActionSchema } from './Action.js';
2
+ import type { ExposedEntity } from '../ExposedEntity.js';
2
3
  /**
3
4
  * Enables modifying an existing resource.
4
5
  * Endpoints: PUT or PATCH /[entity-collection-name]/{id}
@@ -21,7 +22,7 @@ export interface UpdateActionSchema extends ActionSchema {
21
22
  export declare class UpdateAction extends Action implements UpdateActionSchema {
22
23
  accessor kind: 'update';
23
24
  accessor allowedMethods: ('PUT' | 'PATCH')[];
24
- constructor(state?: Partial<UpdateActionSchema>);
25
+ constructor(parent: ExposedEntity, state?: Partial<UpdateActionSchema>);
25
26
  toJSON(): UpdateActionSchema;
26
27
  static isUpdateAction(action: Action): action is UpdateAction;
27
28
  static isUpdateActionSchema(schema: ActionSchema): schema is UpdateActionSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/UpdateAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAGvD;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,IAAI,EAAE,QAAQ,CAAA;IACd;;;;;;OAMG;IACH,cAAc,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC,EAAE,CAAA;CACpC;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,MAAO,YAAW,kBAAkB;IACpE,SAA8B,IAAI,EAAE,QAAQ,CAAA;IAClB,QAAQ,CAAC,cAAc,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC,EAAE,CAAA;gBAE1D,KAAK,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAM1C,MAAM,IAAI,kBAAkB;IAQrC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY;IAI7D,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,kBAAkB;CAGhF"}
1
+ {"version":3,"file":"UpdateAction.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/UpdateAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,IAAI,EAAE,QAAQ,CAAA;IACd;;;;;;OAMG;IACH,cAAc,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC,EAAE,CAAA;CACpC;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,MAAO,YAAW,kBAAkB;IACpE,SAA8B,IAAI,EAAE,QAAQ,CAAA;IAClB,QAAQ,CAAC,cAAc,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC,EAAE,CAAA;gBAE1D,MAAM,EAAE,aAAa,EAAE,KAAK,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAMjE,MAAM,IAAI,kBAAkB;IAQrC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,YAAY;IAI7D,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,kBAAkB;CAGhF"}
@@ -28,8 +28,8 @@ let UpdateAction = (() => {
28
28
  #allowedMethods_accessor_storage = (__runInitializers(this, _kind_extraInitializers), __runInitializers(this, _allowedMethods_initializers, void 0));
29
29
  get allowedMethods() { return this.#allowedMethods_accessor_storage; }
30
30
  set allowedMethods(value) { this.#allowedMethods_accessor_storage = value; }
31
- constructor(state = {}) {
32
- super(state);
31
+ constructor(parent, state = {}) {
32
+ super(parent, state);
33
33
  __runInitializers(this, _allowedMethods_extraInitializers);
34
34
  this.kind = 'update';
35
35
  this.allowedMethods = state.allowedMethods ? [...state.allowedMethods] : ['PATCH'];
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/UpdateAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAkB9D;;;GAGG;IACU,YAAY;sBAAS,MAAM;;;;;;;iBAA3B,YAAa,SAAQ,WAAM;;;gCACrC,QAAQ,EAAE;0CACV,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YADb,iKAAkB,IAAI,6BAAJ,IAAI,mFAAU;YAClB,+LAAS,cAAc,6BAAd,cAAc,uGAAqB;;;QAD1D,6EAAgC;QAAhC,IAAkB,IAAI,0CAAU;QAAhC,IAAkB,IAAI,gDAAU;QAClB,qJAA4C;QAA5C,IAAS,cAAc,oDAAqB;QAA5C,IAAS,cAAc,0DAAqB;QAEtE,YAAY,QAAqC,EAAE;YACjD,KAAK,CAAC,KAAK,CAAC,CAAA;;YACZ,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;YACpB,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;SACnF;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAyB;gBACzC,IAAI,EAAE,QAAQ;gBACd,cAAc,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAwB;aACzF,CAAA;QACH,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,MAAc;YAClC,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;QAED,MAAM,CAAC,oBAAoB,CAAC,MAAoB;YAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;;;SAxBU,YAAY","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed, toRaw } from '../../decorators/observed.js'\n\n/**\n * Enables modifying an existing resource.\n * Endpoints: PUT or PATCH /[entity-collection-name]/{id}\n */\nexport interface UpdateActionSchema extends ActionSchema {\n kind: 'update'\n /**\n * The allowed HTTP methods for updates. Default: PATCH only.\n *\n * These two methods represent the two common ways to update a resource:\n * - PUT: Replaces the entire resource with the provided data.\n * - PATCH: Applies a partial update to the resource, allowing for specific fields to be modified.\n */\n allowedMethods: ('PUT' | 'PATCH')[]\n}\n\n/**\n * Enables modifying an existing resource.\n * Endpoints: PUT or PATCH /[entity-collection-name]/{id}\n */\nexport class UpdateAction extends Action implements UpdateActionSchema {\n @observed() override accessor kind: 'update'\n @observed({ deep: true }) accessor allowedMethods: ('PUT' | 'PATCH')[]\n\n constructor(state: Partial<UpdateActionSchema> = {}) {\n super(state)\n this.kind = 'update'\n this.allowedMethods = state.allowedMethods ? [...state.allowedMethods] : ['PATCH']\n }\n\n override toJSON(): UpdateActionSchema {\n return {\n ...(super.toJSON() as UpdateActionSchema),\n kind: 'update',\n allowedMethods: structuredClone(toRaw(this, this.allowedMethods)) as ('PUT' | 'PATCH')[],\n }\n }\n\n static isUpdateAction(action: Action): action is UpdateAction {\n return action.kind === 'update'\n }\n\n static isUpdateActionSchema(schema: ActionSchema): schema is UpdateActionSchema {\n return schema.kind === 'update'\n }\n}\n"]}
1
+ {"version":3,"file":"UpdateAction.js","sourceRoot":"","sources":["../../../../src/modeling/actions/UpdateAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAmB9D;;;GAGG;IACU,YAAY;sBAAS,MAAM;;;;;;;iBAA3B,YAAa,SAAQ,WAAM;;;gCACrC,QAAQ,EAAE;0CACV,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YADb,iKAAkB,IAAI,6BAAJ,IAAI,mFAAU;YAClB,+LAAS,cAAc,6BAAd,cAAc,uGAAqB;;;QAD1D,6EAAgC;QAAhC,IAAkB,IAAI,0CAAU;QAAhC,IAAkB,IAAI,gDAAU;QAClB,qJAA4C;QAA5C,IAAS,cAAc,oDAAqB;QAA5C,IAAS,cAAc,0DAAqB;QAEtE,YAAY,MAAqB,EAAE,QAAqC,EAAE;YACxE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;;YACpB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;YACpB,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;SACnF;QAEQ,MAAM;YACb,OAAO;gBACL,GAAI,KAAK,CAAC,MAAM,EAAyB;gBACzC,IAAI,EAAE,QAAQ;gBACd,cAAc,EAAE,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAwB;aACzF,CAAA;QACH,CAAC;QAED,MAAM,CAAC,cAAc,CAAC,MAAc;YAClC,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;QAED,MAAM,CAAC,oBAAoB,CAAC,MAAoB;YAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAA;QACjC,CAAC;;;SAxBU,YAAY","sourcesContent":["import { Action, type ActionSchema } from './Action.js'\nimport { observed, toRaw } from '../../decorators/observed.js'\nimport type { ExposedEntity } from '../ExposedEntity.js'\n\n/**\n * Enables modifying an existing resource.\n * Endpoints: PUT or PATCH /[entity-collection-name]/{id}\n */\nexport interface UpdateActionSchema extends ActionSchema {\n kind: 'update'\n /**\n * The allowed HTTP methods for updates. Default: PATCH only.\n *\n * These two methods represent the two common ways to update a resource:\n * - PUT: Replaces the entire resource with the provided data.\n * - PATCH: Applies a partial update to the resource, allowing for specific fields to be modified.\n */\n allowedMethods: ('PUT' | 'PATCH')[]\n}\n\n/**\n * Enables modifying an existing resource.\n * Endpoints: PUT or PATCH /[entity-collection-name]/{id}\n */\nexport class UpdateAction extends Action implements UpdateActionSchema {\n @observed() override accessor kind: 'update'\n @observed({ deep: true }) accessor allowedMethods: ('PUT' | 'PATCH')[]\n\n constructor(parent: ExposedEntity, state: Partial<UpdateActionSchema> = {}) {\n super(parent, state)\n this.kind = 'update'\n this.allowedMethods = state.allowedMethods ? [...state.allowedMethods] : ['PATCH']\n }\n\n override toJSON(): UpdateActionSchema {\n return {\n ...(super.toJSON() as UpdateActionSchema),\n kind: 'update',\n allowedMethods: structuredClone(toRaw(this, this.allowedMethods)) as ('PUT' | 'PATCH')[],\n }\n }\n\n static isUpdateAction(action: Action): action is UpdateAction {\n return action.kind === 'update'\n }\n\n static isUpdateActionSchema(schema: ActionSchema): schema is UpdateActionSchema {\n return schema.kind === 'update'\n }\n}\n"]}
@@ -6,6 +6,7 @@ import { ReadAction, type ReadActionSchema } from './ReadAction.js';
6
6
  import { SearchAction, type SearchActionSchema } from './SearchAction.js';
7
7
  import { UpdateAction, type UpdateActionSchema } from './UpdateAction.js';
8
8
  import type { ActionSchema } from './Action.js';
9
+ import type { ExposedEntity } from '../ExposedEntity.js';
9
10
  export { CreateAction, DeleteAction, ListAction, ReadAction, SearchAction, UpdateAction };
10
11
  export type { CreateActionSchema, DeleteActionSchema, ListActionSchema, ReadActionSchema, SearchActionSchema, UpdateActionSchema, };
11
12
  /**
@@ -30,5 +31,5 @@ export type ActionKind = 'list' | 'read' | 'create' | 'update' | 'delete' | 'sea
30
31
  * @param schema The schema to restore the action from.
31
32
  * @returns The restored action.
32
33
  */
33
- export declare function restoreAction(schema: ActionSchema): ApiAction;
34
+ export declare function restoreAction(parent: ExposedEntity, schema: ActionSchema): ApiAction;
34
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modeling/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;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AAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,CAAA;AACzF,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,YAAY,CAAA;AAE3G;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB,kBAAkB,GAClB,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,CAAA;AAEtB;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEpF;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,SAAS,CAoBpF"}
@@ -15,20 +15,20 @@ export { CreateAction, DeleteAction, ListAction, ReadAction, SearchAction, Updat
15
15
  * @param schema The schema to restore the action from.
16
16
  * @returns The restored action.
17
17
  */
18
- export function restoreAction(schema) {
18
+ export function restoreAction(parent, schema) {
19
19
  switch (schema.kind) {
20
20
  case 'list':
21
- return new ListAction(schema);
21
+ return new ListAction(parent, schema);
22
22
  case 'read':
23
- return new ReadAction(schema);
23
+ return new ReadAction(parent, schema);
24
24
  case 'create':
25
- return new CreateAction(schema);
25
+ return new CreateAction(parent, schema);
26
26
  case 'update':
27
- return new UpdateAction(schema);
27
+ return new UpdateAction(parent, schema);
28
28
  case 'delete':
29
- return new DeleteAction(schema);
29
+ return new DeleteAction(parent, schema);
30
30
  case 'search':
31
- return new SearchAction(schema);
31
+ return new SearchAction(parent, schema);
32
32
  default:
33
33
  throw new Exception('Unknown action kind', {
34
34
  code: 'E_UNKNOWN_ACTION_KIND',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modeling/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,UAAU,EAAyB,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,UAAU,EAAyB,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAGzD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,CAAA;AAiCzF;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,MAAoB;IAChD,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,MAAM;YACT,OAAO,IAAI,UAAU,CAAC,MAA0B,CAAC,CAAA;QACnD,KAAK,MAAM;YACT,OAAO,IAAI,UAAU,CAAC,MAA0B,CAAC,CAAA;QACnD,KAAK,QAAQ;YACX,OAAO,IAAI,YAAY,CAAC,MAA4B,CAAC,CAAA;QACvD,KAAK,QAAQ;YACX,OAAO,IAAI,YAAY,CAAC,MAA4B,CAAC,CAAA;QACvD,KAAK,QAAQ;YACX,OAAO,IAAI,YAAY,CAAC,MAA4B,CAAC,CAAA;QACvD,KAAK,QAAQ;YACX,OAAO,IAAI,YAAY,CAAC,MAA4B,CAAC,CAAA;QACvD;YACE,MAAM,IAAI,SAAS,CAAC,qBAAqB,EAAE;gBACzC,IAAI,EAAE,uBAAuB;gBAC7B,MAAM,EAAE,GAAG;aACZ,CAAC,CAAA;IACN,CAAC;AACH,CAAC","sourcesContent":["export { Action, type ActionSchema } from './Action.js'\nimport { CreateAction, type CreateActionSchema } from './CreateAction.js'\nimport { DeleteAction, type DeleteActionSchema } from './DeleteAction.js'\nimport { ListAction, type ListActionSchema } from './ListAction.js'\nimport { ReadAction, type ReadActionSchema } from './ReadAction.js'\nimport { SearchAction, type SearchActionSchema } from './SearchAction.js'\nimport { UpdateAction, type UpdateActionSchema } from './UpdateAction.js'\nimport { Exception } from '../../exceptions/exception.js'\nimport type { ActionSchema } from './Action.js'\n\nexport { CreateAction, DeleteAction, ListAction, ReadAction, SearchAction, UpdateAction }\nexport type {\n CreateActionSchema,\n DeleteActionSchema,\n ListActionSchema,\n ReadActionSchema,\n SearchActionSchema,\n UpdateActionSchema,\n}\n\n/**\n * Represents a specific, configurable API operation applied to a Data Entity.\n * Corresponds to common RESTful interactions.\n */\nexport type ApiAction = CreateAction | DeleteAction | ListAction | ReadAction | SearchAction | UpdateAction\n\n/**\n * Schema representation of a specific, configurable API operation applied to a Data Entity.\n * Corresponds to common RESTful interactions.\n */\nexport type ApiActionSchema =\n | CreateActionSchema\n | DeleteActionSchema\n | ListActionSchema\n | ReadActionSchema\n | SearchActionSchema\n | UpdateActionSchema\n\n/**\n * The kind of action to perform.\n */\nexport type ActionKind = 'list' | 'read' | 'create' | 'update' | 'delete' | 'search'\n\n/**\n * Restores an action from a schema.\n *\n * It is a helper function to restore actions from schema.\n *\n * @param schema The schema to restore the action from.\n * @returns The restored action.\n */\nexport function restoreAction(schema: ActionSchema): ApiAction {\n switch (schema.kind) {\n case 'list':\n return new ListAction(schema as ListActionSchema)\n case 'read':\n return new ReadAction(schema as ReadActionSchema)\n case 'create':\n return new CreateAction(schema as CreateActionSchema)\n case 'update':\n return new UpdateAction(schema as UpdateActionSchema)\n case 'delete':\n return new DeleteAction(schema as DeleteActionSchema)\n case 'search':\n return new SearchAction(schema as SearchActionSchema)\n default:\n throw new Exception('Unknown action kind', {\n code: 'E_UNKNOWN_ACTION_KIND',\n status: 422,\n })\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modeling/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,UAAU,EAAyB,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,UAAU,EAAyB,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAIzD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,CAAA;AAiCzF;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,MAAoB;IACvE,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,MAAM;YACT,OAAO,IAAI,UAAU,CAAC,MAAM,EAAE,MAA0B,CAAC,CAAA;QAC3D,KAAK,MAAM;YACT,OAAO,IAAI,UAAU,CAAC,MAAM,EAAE,MAA0B,CAAC,CAAA;QAC3D,KAAK,QAAQ;YACX,OAAO,IAAI,YAAY,CAAC,MAAM,EAAE,MAA4B,CAAC,CAAA;QAC/D,KAAK,QAAQ;YACX,OAAO,IAAI,YAAY,CAAC,MAAM,EAAE,MAA4B,CAAC,CAAA;QAC/D,KAAK,QAAQ;YACX,OAAO,IAAI,YAAY,CAAC,MAAM,EAAE,MAA4B,CAAC,CAAA;QAC/D,KAAK,QAAQ;YACX,OAAO,IAAI,YAAY,CAAC,MAAM,EAAE,MAA4B,CAAC,CAAA;QAC/D;YACE,MAAM,IAAI,SAAS,CAAC,qBAAqB,EAAE;gBACzC,IAAI,EAAE,uBAAuB;gBAC7B,MAAM,EAAE,GAAG;aACZ,CAAC,CAAA;IACN,CAAC;AACH,CAAC","sourcesContent":["export { Action, type ActionSchema } from './Action.js'\nimport { CreateAction, type CreateActionSchema } from './CreateAction.js'\nimport { DeleteAction, type DeleteActionSchema } from './DeleteAction.js'\nimport { ListAction, type ListActionSchema } from './ListAction.js'\nimport { ReadAction, type ReadActionSchema } from './ReadAction.js'\nimport { SearchAction, type SearchActionSchema } from './SearchAction.js'\nimport { UpdateAction, type UpdateActionSchema } from './UpdateAction.js'\nimport { Exception } from '../../exceptions/exception.js'\nimport type { ActionSchema } from './Action.js'\nimport type { ExposedEntity } from '../ExposedEntity.js'\n\nexport { CreateAction, DeleteAction, ListAction, ReadAction, SearchAction, UpdateAction }\nexport type {\n CreateActionSchema,\n DeleteActionSchema,\n ListActionSchema,\n ReadActionSchema,\n SearchActionSchema,\n UpdateActionSchema,\n}\n\n/**\n * Represents a specific, configurable API operation applied to a Data Entity.\n * Corresponds to common RESTful interactions.\n */\nexport type ApiAction = CreateAction | DeleteAction | ListAction | ReadAction | SearchAction | UpdateAction\n\n/**\n * Schema representation of a specific, configurable API operation applied to a Data Entity.\n * Corresponds to common RESTful interactions.\n */\nexport type ApiActionSchema =\n | CreateActionSchema\n | DeleteActionSchema\n | ListActionSchema\n | ReadActionSchema\n | SearchActionSchema\n | UpdateActionSchema\n\n/**\n * The kind of action to perform.\n */\nexport type ActionKind = 'list' | 'read' | 'create' | 'update' | 'delete' | 'search'\n\n/**\n * Restores an action from a schema.\n *\n * It is a helper function to restore actions from schema.\n *\n * @param schema The schema to restore the action from.\n * @returns The restored action.\n */\nexport function restoreAction(parent: ExposedEntity, schema: ActionSchema): ApiAction {\n switch (schema.kind) {\n case 'list':\n return new ListAction(parent, schema as ListActionSchema)\n case 'read':\n return new ReadAction(parent, schema as ReadActionSchema)\n case 'create':\n return new CreateAction(parent, schema as CreateActionSchema)\n case 'update':\n return new UpdateAction(parent, schema as UpdateActionSchema)\n case 'delete':\n return new DeleteAction(parent, schema as DeleteActionSchema)\n case 'search':\n return new SearchAction(parent, schema as SearchActionSchema)\n default:\n throw new Exception('Unknown action kind', {\n code: 'E_UNKNOWN_ACTION_KIND',\n status: 422,\n })\n }\n}\n"]}
@@ -5,7 +5,7 @@ import type { DomainPropertyType } from '../DataFormat.js';
5
5
  import type { OnDeleteRule } from '../index.js';
6
6
  import { SemanticType } from '../Semantics.js';
7
7
  import type { AssociationTarget, PropertySchema } from '../types.js';
8
- import type { AiMessageSchema, AiModelMessage } from '../../models/AiMessage.js';
8
+ import type { AiModelMessageSchema, AiModelMessage, AiUserMessageSchema } from '../../models/AiMessage.js';
9
9
  /**
10
10
  * A copy of the `Type` enum from the `@google/genai` package.
11
11
  * It's here so we don't need to import the nodejs only package.
@@ -196,10 +196,10 @@ export interface AiDomainDeltaResponse {
196
196
  */
197
197
  export type AiStreamEvent = {
198
198
  event: 'user-message';
199
- data: AiMessageSchema;
199
+ data: AiUserMessageSchema;
200
200
  } | {
201
201
  event: 'agent-message';
202
- data: AiMessageSchema;
202
+ data: AiModelMessageSchema;
203
203
  } | {
204
204
  event: 'thought-chunk';
205
205
  data: string;
@@ -208,7 +208,7 @@ export type AiStreamEvent = {
208
208
  data: string;
209
209
  } | {
210
210
  event: 'done';
211
- data: AiMessageSchema;
211
+ data: AiModelMessageSchema;
212
212
  } | {
213
213
  event: 'error';
214
214
  data: Exception;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/modeling/ai/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEhF;;;GAGG;AACH,oBAAY,IAAI;IACd;;OAEG;IACH,gBAAgB,qBAAqB;IACrC;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,IAAI,SAAS;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,iBAAiB,EAAE,CAAA;IAC3B,QAAQ,EAAE,oBAAoB,EAAE,CAAA;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,W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AA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACzB,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAE9B,cAAc,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACnC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC,kBAAkB,CAAC,EAAE,YAAY,EAAE,CAAA;CACpC;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/modeling/ai/types.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,CAAN,IAAY,IAiCX;AAjCD,WAAY,IAAI;IACd;;OAEG;IACH,6CAAqC,CAAA;IACrC;;OAEG;IACH,yBAAiB,CAAA;IACjB;;OAEG;IACH,yBAAiB,CAAA;IACjB;;OAEG;IACH,2BAAmB,CAAA;IACnB;;OAEG;IACH,2BAAmB,CAAA;IACnB;;OAEG;IACH,uBAAe,CAAA;IACf;;OAEG;IACH,yBAAiB,CAAA;IACjB;;OAEG;IACH,qBAAa,CAAA;AACf,CAAC,EAjCW,IAAI,KAAJ,IAAI,QAiCf","sourcesContent":["import type { IApiAssociationShape } from '../../amf/definitions/Shapes.js'\nimport type { Exception } from '../../exceptions/exception.js'\nimport type { AiSessionSchema } from '../../models/AiSession.js'\nimport type { DomainPropertyType } from '../DataFormat.js'\nimport type { OnDeleteRule } from '../index.js'\nimport { SemanticType } from '../Semantics.js'\nimport type { AssociationTarget, PropertySchema } from '../types.js'\nimport type { AiMessageSchema, AiModelMessage } from '../../models/AiMessage.js'\n\n/**\n * A copy of the `Type` enum from the `@google/genai` package.\n * It's here so we don't need to import the nodejs only package.\n */\nexport enum Type {\n /**\n * Not specified, should not be used.\n */\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n /**\n * OpenAPI string type\n */\n STRING = 'STRING',\n /**\n * OpenAPI number type\n */\n NUMBER = 'NUMBER',\n /**\n * OpenAPI integer type\n */\n INTEGER = 'INTEGER',\n /**\n * OpenAPI boolean type\n */\n BOOLEAN = 'BOOLEAN',\n /**\n * OpenAPI array type\n */\n ARRAY = 'ARRAY',\n /**\n * OpenAPI object type\n */\n OBJECT = 'OBJECT',\n /**\n * Null type\n */\n NULL = 'NULL',\n}\n\n/**\n * A lightweight representation of the `DataDomain` used specifically for serializing\n * the current domain state and sending it as context to the AI endpoint.\n * It omits complex internal graph structures, including only essential keys, names,\n * descriptions, and the hierarchical structure of models and entities.\n */\nexport interface AiDataDomainSchema {\n key: string\n name: string\n models: AiDataModelSchema[]\n entities: AiDomainEntitySchema[]\n}\n\n/**\n * A stripped-down representation of a `DomainModel` sent to the AI as part of the\n * domain context. It provides the AI with the existing model hierarchy and descriptions.\n */\nexport interface AiDataModelSchema {\n key: string\n name?: string\n description?: string\n}\n\n/**\n * Represents a semantic annotation applied to an entity, property, or association\n * within the AI's understanding or response. It defines the \"meaning\" of a field\n * (e.g., \"Email\", \"Password\", \"Address\").\n */\nexport interface AiDomainSemantic {\n id: SemanticType\n config?: Record<string, unknown>\n}\n\n/**\n * Represents a full or partial entity schema as generated by the AI in its response delta.\n * It defines a new entity or updates to an existing one, including its properties,\n * associations, semantics, and tags. This is also used by the `get_entity_details` tool\n * to send detailed serialized entity information back to the AI.\n */\nexport interface AiDomainEntityResponseSchema {\n key: string\n modelKey: string\n name?: string\n displayName?: string\n description?: string\n tags?: string[]\n semantics?: AiDomainSemantic[]\n properties?: AiDomainProperty[]\n associations?: AiDomainAssociation[]\n}\n\n/**\n * A minimal representation of an entity used purely for context-setting when\n * sending the current domain structure to the AI. It excludes deeply nested\n * properties and associations to save token space.\n */\nexport interface AiDomainEntitySchema {\n key: string\n modelKey: string\n name?: string\n description?: string\n}\n\n/**\n * Represents a property definition generated by the AI. It maps the complex internal\n * domain property structure into a simpler, flat structure that the AI generates,\n * including data types, constraints, schema metadata, and semantics.\n */\nexport interface AiDomainProperty {\n key?: string\n name?: string\n displayName?: string\n description?: string\n type: DomainPropertyType\n constraints?: {\n required?: boolean\n unique?: boolean\n index?: boolean\n primary?: boolean\n multiple?: boolean\n readOnly?: boolean\n writeOnly?: boolean\n }\n deprecated?: boolean\n schema?: PropertySchema\n semantics?: AiDomainSemantic[]\n tags?: string[] | null\n}\n\n/**\n * Represents an association definition generated by the AI, linking an entity\n * to one or more target entities. It includes relationship rules (like onDelete)\n * and semantic annotations.\n */\nexport interface AiDomainAssociation {\n key: string\n name?: string\n displayName?: string\n description?: string\n targets: AssociationTarget[]\n required?: boolean\n multiple?: boolean\n onDelete?: OnDeleteRule\n semantics?: AiDomainSemantic[]\n schema?: IApiAssociationShape\n}\n\n/**\n * The core structure representing a set of modifications (a delta) proposed by the AI.\n * It contains arrays of models and entities to add, delete, or modify. The application\n * processes this delta to transition the data domain to the new requested state.\n */\nexport interface AiDomainDelta {\n /**\n * Models to add to the domain.\n */\n addedModels?: AiDataModelSchema[]\n /**\n * Keys of models to delete from the domain.\n */\n deletedModelKeys?: string[]\n /**\n * Models to modify in the domain.\n */\n modifiedModels?: AiDataModelSchema[]\n /**\n * Entities to add to the domain.\n */\n addedEntities?: AiDomainEntityResponseSchema[]\n /**\n * Keys of entities to delete from the domain.\n */\n deletedEntityKeys?: string[]\n /**\n * Entities to modify in the domain.\n */\n modifiedEntities?: AiDomainEntityDelta[]\n}\n\n/**\n * The expected JSON schema structure returned by the AI endpoint when performing\n * data domain manipulation. It includes the AI's step-by-step reasoning and the\n * actionable delta to be applied.\n */\nexport interface AiDomainDeltaResponse {\n /**\n * The LLM reasoning.\n */\n reasoning: string\n /**\n * Domain changes delta\n */\n delta?: AiDomainDelta\n}\n\n/**\n * Union type for progressive SSE stream chunks\n * received from the AI generation endpoint.\n */\nexport type AiStreamEvent =\n | { event: 'user-message'; data: AiMessageSchema }\n | { event: 'agent-message'; data: AiMessageSchema }\n | { event: 'thought-chunk'; data: string }\n | { event: 'text-chunk'; data: string }\n | { event: 'done'; data: AiMessageSchema }\n | { event: 'error'; data: Exception }\n | { event: 'session-updated'; data: AiSessionSchema }\n\n/**\n * Represents a targeted modification to an existing entity generated by the AI.\n * Instead of providing the full entity state, the AI provides explicit arrays\n * of properties, associations, and semantics to add, modify, or delete, enabling\n * precise, non-destructive updates.\n */\nexport interface AiDomainEntityDelta {\n key: string\n modelKey?: string // Provide to move the entity to a different model\n name?: string\n displayName?: string\n description?: string\n tags?: string[] | null\n // Entity semantics delta\n addedSemantics?: AiDomainSemantic[]\n modifiedSemantics?: AiDomainSemantic[]\n deletedSemanticIds?: SemanticType[]\n // Explicit deltas so the LLM doesn't have to list untouched properties\n addedProperties?: AiDomainProperty[]\n modifiedProperties?: AiDomainPropertyDelta[]\n deletedPropertyKeys?: string[]\n addedAssociations?: AiDomainAssociation[]\n modifiedAssociations?: AiDomainAssociationDelta[]\n deletedAssociationKeys?: string[]\n}\n\nexport type NullablePropertySchema = {\n [K in keyof PropertySchema]?: PropertySchema[K] | null\n}\n\n/**\n * Represents a targeted modification to an existing property generated by the AI.\n * It captures changes to superficial properties (name, description), type changes,\n * constraint updates, and semantic alterations.\n */\nexport interface AiDomainPropertyDelta {\n key: string\n name?: string\n displayName?: string\n description?: string\n type?: DomainPropertyType\n constraints?: {\n required?: boolean | null\n unique?: boolean | null\n index?: boolean | null\n primary?: boolean | null\n multiple?: boolean | null\n readOnly?: boolean | null\n writeOnly?: boolean | null\n } | null\n deprecated?: boolean | null\n // Property semantics delta\n addedSemantics?: AiDomainSemantic[]\n modifiedSemantics?: AiDomainSemantic[]\n deletedSemanticIds?: SemanticType[]\n schema?: NullablePropertySchema\n}\n\n/**\n * Represents a targeted modification to an existing association generated by the AI.\n * It captures updates to relationship cardinality, target entities, deletion rules,\n * and applied semantics.\n */\nexport interface AiDomainAssociationDelta {\n key: string\n name?: string\n displayName?: string\n description?: string\n targets?: AssociationTarget[]\n required?: boolean | null\n multiple?: boolean | null\n onDelete?: OnDeleteRule | null\n // Association semantics delta\n addedSemantics?: AiDomainSemantic[]\n modifiedSemantics?: AiDomainSemantic[]\n deletedSemanticIds?: SemanticType[]\n}\n\n/**\n * An enriched, in-memory representation of a model's message that includes the globally\n * parsed `AiDomainDelta` object.\n * This is not stored directly in the datastore as-is; instead, the raw JSON text is stored,\n * and this structure is assembled at runtime when the chat history is loaded into the UI.\n */\nexport interface AiModelMessageWithDelta extends AiModelMessage {\n /**\n * The delta of the message, if any.\n */\n delta?: AiDomainDelta\n /**\n * The reasoning of the delta.\n * Format in markdown.\n */\n reasoning?: string\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/modeling/ai/types.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,CAAN,IAAY,IAiCX;AAjCD,WAAY,IAAI;IACd;;OAEG;IACH,6CAAqC,CAAA;IACrC;;OAEG;IACH,yBAAiB,CAAA;IACjB;;OAEG;IACH,yBAAiB,CAAA;IACjB;;OAEG;IACH,2BAAmB,CAAA;IACnB;;OAEG;IACH,2BAAmB,CAAA;IACnB;;OAEG;IACH,uBAAe,CAAA;IACf;;OAEG;IACH,yBAAiB,CAAA;IACjB;;OAEG;IACH,qBAAa,CAAA;AACf,CAAC,EAjCW,IAAI,KAAJ,IAAI,QAiCf","sourcesContent":["import type { IApiAssociationShape } from '../../amf/definitions/Shapes.js'\nimport type { Exception } from '../../exceptions/exception.js'\nimport type { AiSessionSchema } from '../../models/AiSession.js'\nimport type { DomainPropertyType } from '../DataFormat.js'\nimport type { OnDeleteRule } from '../index.js'\nimport { SemanticType } from '../Semantics.js'\nimport type { AssociationTarget, PropertySchema } from '../types.js'\nimport type { AiModelMessageSchema, AiModelMessage, AiUserMessageSchema } from '../../models/AiMessage.js'\n\n/**\n * A copy of the `Type` enum from the `@google/genai` package.\n * It's here so we don't need to import the nodejs only package.\n */\nexport enum Type {\n /**\n * Not specified, should not be used.\n */\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n /**\n * OpenAPI string type\n */\n STRING = 'STRING',\n /**\n * OpenAPI number type\n */\n NUMBER = 'NUMBER',\n /**\n * OpenAPI integer type\n */\n INTEGER = 'INTEGER',\n /**\n * OpenAPI boolean type\n */\n BOOLEAN = 'BOOLEAN',\n /**\n * OpenAPI array type\n */\n ARRAY = 'ARRAY',\n /**\n * OpenAPI object type\n */\n OBJECT = 'OBJECT',\n /**\n * Null type\n */\n NULL = 'NULL',\n}\n\n/**\n * A lightweight representation of the `DataDomain` used specifically for serializing\n * the current domain state and sending it as context to the AI endpoint.\n * It omits complex internal graph structures, including only essential keys, names,\n * descriptions, and the hierarchical structure of models and entities.\n */\nexport interface AiDataDomainSchema {\n key: string\n name: string\n models: AiDataModelSchema[]\n entities: AiDomainEntitySchema[]\n}\n\n/**\n * A stripped-down representation of a `DomainModel` sent to the AI as part of the\n * domain context. It provides the AI with the existing model hierarchy and descriptions.\n */\nexport interface AiDataModelSchema {\n key: string\n name?: string\n description?: string\n}\n\n/**\n * Represents a semantic annotation applied to an entity, property, or association\n * within the AI's understanding or response. It defines the \"meaning\" of a field\n * (e.g., \"Email\", \"Password\", \"Address\").\n */\nexport interface AiDomainSemantic {\n id: SemanticType\n config?: Record<string, unknown>\n}\n\n/**\n * Represents a full or partial entity schema as generated by the AI in its response delta.\n * It defines a new entity or updates to an existing one, including its properties,\n * associations, semantics, and tags. This is also used by the `get_entity_details` tool\n * to send detailed serialized entity information back to the AI.\n */\nexport interface AiDomainEntityResponseSchema {\n key: string\n modelKey: string\n name?: string\n displayName?: string\n description?: string\n tags?: string[]\n semantics?: AiDomainSemantic[]\n properties?: AiDomainProperty[]\n associations?: AiDomainAssociation[]\n}\n\n/**\n * A minimal representation of an entity used purely for context-setting when\n * sending the current domain structure to the AI. It excludes deeply nested\n * properties and associations to save token space.\n */\nexport interface AiDomainEntitySchema {\n key: string\n modelKey: string\n name?: string\n description?: string\n}\n\n/**\n * Represents a property definition generated by the AI. It maps the complex internal\n * domain property structure into a simpler, flat structure that the AI generates,\n * including data types, constraints, schema metadata, and semantics.\n */\nexport interface AiDomainProperty {\n key?: string\n name?: string\n displayName?: string\n description?: string\n type: DomainPropertyType\n constraints?: {\n required?: boolean\n unique?: boolean\n index?: boolean\n primary?: boolean\n multiple?: boolean\n readOnly?: boolean\n writeOnly?: boolean\n }\n deprecated?: boolean\n schema?: PropertySchema\n semantics?: AiDomainSemantic[]\n tags?: string[] | null\n}\n\n/**\n * Represents an association definition generated by the AI, linking an entity\n * to one or more target entities. It includes relationship rules (like onDelete)\n * and semantic annotations.\n */\nexport interface AiDomainAssociation {\n key: string\n name?: string\n displayName?: string\n description?: string\n targets: AssociationTarget[]\n required?: boolean\n multiple?: boolean\n onDelete?: OnDeleteRule\n semantics?: AiDomainSemantic[]\n schema?: IApiAssociationShape\n}\n\n/**\n * The core structure representing a set of modifications (a delta) proposed by the AI.\n * It contains arrays of models and entities to add, delete, or modify. The application\n * processes this delta to transition the data domain to the new requested state.\n */\nexport interface AiDomainDelta {\n /**\n * Models to add to the domain.\n */\n addedModels?: AiDataModelSchema[]\n /**\n * Keys of models to delete from the domain.\n */\n deletedModelKeys?: string[]\n /**\n * Models to modify in the domain.\n */\n modifiedModels?: AiDataModelSchema[]\n /**\n * Entities to add to the domain.\n */\n addedEntities?: AiDomainEntityResponseSchema[]\n /**\n * Keys of entities to delete from the domain.\n */\n deletedEntityKeys?: string[]\n /**\n * Entities to modify in the domain.\n */\n modifiedEntities?: AiDomainEntityDelta[]\n}\n\n/**\n * The expected JSON schema structure returned by the AI endpoint when performing\n * data domain manipulation. It includes the AI's step-by-step reasoning and the\n * actionable delta to be applied.\n */\nexport interface AiDomainDeltaResponse {\n /**\n * The LLM reasoning.\n */\n reasoning: string\n /**\n * Domain changes delta\n */\n delta?: AiDomainDelta\n}\n\n/**\n * Union type for progressive SSE stream chunks\n * received from the AI generation endpoint.\n */\nexport type AiStreamEvent =\n | { event: 'user-message'; data: AiUserMessageSchema }\n | { event: 'agent-message'; data: AiModelMessageSchema }\n | { event: 'thought-chunk'; data: string }\n | { event: 'text-chunk'; data: string }\n | { event: 'done'; data: AiModelMessageSchema }\n | { event: 'error'; data: Exception }\n | { event: 'session-updated'; data: AiSessionSchema }\n\n/**\n * Represents a targeted modification to an existing entity generated by the AI.\n * Instead of providing the full entity state, the AI provides explicit arrays\n * of properties, associations, and semantics to add, modify, or delete, enabling\n * precise, non-destructive updates.\n */\nexport interface AiDomainEntityDelta {\n key: string\n modelKey?: string // Provide to move the entity to a different model\n name?: string\n displayName?: string\n description?: string\n tags?: string[] | null\n // Entity semantics delta\n addedSemantics?: AiDomainSemantic[]\n modifiedSemantics?: AiDomainSemantic[]\n deletedSemanticIds?: SemanticType[]\n // Explicit deltas so the LLM doesn't have to list untouched properties\n addedProperties?: AiDomainProperty[]\n modifiedProperties?: AiDomainPropertyDelta[]\n deletedPropertyKeys?: string[]\n addedAssociations?: AiDomainAssociation[]\n modifiedAssociations?: AiDomainAssociationDelta[]\n deletedAssociationKeys?: string[]\n}\n\nexport type NullablePropertySchema = {\n [K in keyof PropertySchema]?: PropertySchema[K] | null\n}\n\n/**\n * Represents a targeted modification to an existing property generated by the AI.\n * It captures changes to superficial properties (name, description), type changes,\n * constraint updates, and semantic alterations.\n */\nexport interface AiDomainPropertyDelta {\n key: string\n name?: string\n displayName?: string\n description?: string\n type?: DomainPropertyType\n constraints?: {\n required?: boolean | null\n unique?: boolean | null\n index?: boolean | null\n primary?: boolean | null\n multiple?: boolean | null\n readOnly?: boolean | null\n writeOnly?: boolean | null\n } | null\n deprecated?: boolean | null\n // Property semantics delta\n addedSemantics?: AiDomainSemantic[]\n modifiedSemantics?: AiDomainSemantic[]\n deletedSemanticIds?: SemanticType[]\n schema?: NullablePropertySchema\n}\n\n/**\n * Represents a targeted modification to an existing association generated by the AI.\n * It captures updates to relationship cardinality, target entities, deletion rules,\n * and applied semantics.\n */\nexport interface AiDomainAssociationDelta {\n key: string\n name?: string\n displayName?: string\n description?: string\n targets?: AssociationTarget[]\n required?: boolean | null\n multiple?: boolean | null\n onDelete?: OnDeleteRule | null\n // Association semantics delta\n addedSemantics?: AiDomainSemantic[]\n modifiedSemantics?: AiDomainSemantic[]\n deletedSemanticIds?: SemanticType[]\n}\n\n/**\n * An enriched, in-memory representation of a model's message that includes the globally\n * parsed `AiDomainDelta` object.\n * This is not stored directly in the datastore as-is; instead, the raw JSON text is stored,\n * and this structure is assembled at runtime when the chat history is loaded into the UI.\n */\nexport interface AiModelMessageWithDelta extends AiModelMessage {\n /**\n * The delta of the message, if any.\n */\n delta?: AiDomainDelta\n /**\n * The reasoning of the delta.\n * Format in markdown.\n */\n reasoning?: string\n}\n"]}
@@ -9,4 +9,5 @@ export { DomainModel, type DomainModelSchema, type ModelOrderedItem } from './Do
9
9
  export { DomainNamespace, type DomainNamespaceSchema, type NamespaceOrderedItem } from './DomainNamespace.js';
10
10
  export { DomainProperty, type DomainPropertySchema } from './DomainProperty.js';
11
11
  export { ExposedEntity } from './ExposedEntity.js';
12
+ export * as ApiModelValidation from './validation/api_model_rules.js';
12
13
  //# sourceMappingURL=index.d.ts.map