@kosdev-code/kos-ui-sdk 2.1.16 → 2.1.18

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 (66) hide show
  1. package/core/core/companion-instantiator.d.ts +71 -0
  2. package/core/core/companion-instantiator.d.ts.map +1 -0
  3. package/core/core/decorators/fsm-injection-utils.d.ts +16 -0
  4. package/core/core/decorators/fsm-injection-utils.d.ts.map +1 -0
  5. package/core/core/decorators/index.d.ts +4 -0
  6. package/core/core/decorators/index.d.ts.map +1 -1
  7. package/core/core/decorators/kos-companion.d.ts +19 -0
  8. package/core/core/decorators/kos-companion.d.ts.map +1 -1
  9. package/core/core/decorators/kos-execution-context.d.ts +60 -0
  10. package/core/core/decorators/kos-execution-context.d.ts.map +1 -0
  11. package/core/core/decorators/kos-service-request.d.ts +381 -0
  12. package/core/core/decorators/kos-service-request.d.ts.map +1 -0
  13. package/core/core/decorators/kos-state-machine.d.ts +466 -0
  14. package/core/core/decorators/kos-state-machine.d.ts.map +1 -0
  15. package/core/core/decorators/kosModel.d.ts.map +1 -1
  16. package/core/core/decorators/kosTopicHandler.d.ts +33 -5
  17. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  18. package/core/core/decorators/propKeys.d.ts +4 -0
  19. package/core/core/decorators/propKeys.d.ts.map +1 -1
  20. package/core/core/kos-registration.d.ts.map +1 -1
  21. package/core/core/kos-singleton-registration.d.ts.map +1 -1
  22. package/core/core/kosCore.d.ts.map +1 -1
  23. package/core/core/kosModel.d.ts +14 -0
  24. package/core/core/kosModel.d.ts.map +1 -1
  25. package/core/core/kosModelManager.d.ts +11 -1
  26. package/core/core/kosModelManager.d.ts.map +1 -1
  27. package/core/core/model/kos-model-component-factory.d.ts +4 -0
  28. package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
  29. package/core/core/model/kos-offline-queue.d.ts +78 -1
  30. package/core/core/model/kos-offline-queue.d.ts.map +1 -1
  31. package/core/core/model/kos-service-request-manager.d.ts +102 -0
  32. package/core/core/model/kos-service-request-manager.d.ts.map +1 -0
  33. package/core/core/model/kos-subscription-manager.d.ts +18 -0
  34. package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
  35. package/core/core/model/model-introspection-utils.d.ts +1 -0
  36. package/core/core/model/model-introspection-utils.d.ts.map +1 -1
  37. package/core/core/model/service-response-store.d.ts +164 -0
  38. package/core/core/model/service-response-store.d.ts.map +1 -0
  39. package/core/core/model-instantiator.d.ts +19 -0
  40. package/core/core/model-instantiator.d.ts.map +1 -1
  41. package/core/core/types/registration.d.ts +7 -0
  42. package/core/core/types/registration.d.ts.map +1 -1
  43. package/core/types/index.d.ts +1 -0
  44. package/core/types/index.d.ts.map +1 -1
  45. package/core/types/service-response-store.d.ts +152 -0
  46. package/core/types/service-response-store.d.ts.map +1 -0
  47. package/core/util/index.d.ts +1 -0
  48. package/core/util/index.d.ts.map +1 -1
  49. package/core/util/kos-service-request.d.ts +8 -0
  50. package/core/util/kos-service-request.d.ts.map +1 -1
  51. package/core/util/service-response.d.ts +110 -0
  52. package/core/util/service-response.d.ts.map +1 -0
  53. package/index.cjs +79 -79
  54. package/index.cjs.map +1 -1
  55. package/index.js +8175 -6796
  56. package/index.js.map +1 -1
  57. package/models/decorators/future-service.d.ts +7 -0
  58. package/models/decorators/future-service.d.ts.map +1 -1
  59. package/models/models/storage-device/services/storage-device-services.d.ts +1 -0
  60. package/models/models/storage-device/services/storage-device-services.d.ts.map +1 -1
  61. package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
  62. package/models/models/translation/translation-model.d.ts.map +1 -1
  63. package/models/utils/client.d.ts +8 -8
  64. package/models/utils/service.d.ts +66 -10
  65. package/models/utils/service.d.ts.map +1 -1
  66. package/package.json +2 -2
@@ -0,0 +1,71 @@
1
+ import { IKosRegistry } from './types';
2
+ import { KosModelCacheHandler } from './model-cache';
3
+ import { IKosModel } from './kosModel';
4
+ import { DependencyLifecycle } from '../types';
5
+
6
+ /**
7
+ * Handles creation and lifecycle management of companion models.
8
+ * Companions are models that extend or enhance parent models and can be
9
+ * created at specific lifecycle phases based on decorator configuration.
10
+ */
11
+ export declare class KosCompanionInstantiator {
12
+ private registry;
13
+ private cache;
14
+ private createModel;
15
+ constructor(registry: IKosRegistry, cache: KosModelCacheHandler, createModel: (typeId: string, id: string, options: Record<string, any>) => any);
16
+ /**
17
+ * Creates companion models for a parent model, optionally filtered by lifecycle phase.
18
+ * Called automatically during instantiation for companions without lifecycle specified.
19
+ * Can be called from lifecycle hooks to create lifecycle-deferred companions.
20
+ *
21
+ * @param model The parent model
22
+ * @param options Options to pass to companion constructors
23
+ * @param lifecycle Optional lifecycle filter - only create companions matching this phase
24
+ */
25
+ createCompanionModels(model: IKosModel, options: Record<string, any>, lifecycle?: DependencyLifecycle): void;
26
+ /**
27
+ * Get companion definitions for a parent model type
28
+ */
29
+ private getCompanionDefinitions;
30
+ /**
31
+ * Resolve companion type from definition and extract lifecycle metadata
32
+ */
33
+ private resolveCompanionType;
34
+ /**
35
+ * Resolve factory companion by calling factory and extracting lifecycle
36
+ */
37
+ private resolveFactoryCompanion;
38
+ /**
39
+ * Resolve string companion using pre-extracted lifecycle from registration
40
+ */
41
+ private resolveStringCompanion;
42
+ /**
43
+ * Extract lifecycle metadata from companion model decorator
44
+ */
45
+ private extractLifecycleFromType;
46
+ /**
47
+ * Determine if companion should be created based on lifecycle filtering
48
+ */
49
+ private shouldCreateCompanion;
50
+ /**
51
+ * Instantiate and attach companion to parent model
52
+ */
53
+ private instantiateCompanion;
54
+ /**
55
+ * Generate unique companion ID
56
+ */
57
+ private generateCompanionId;
58
+ /**
59
+ * Check if companion already exists in cache
60
+ */
61
+ private companionAlreadyExists;
62
+ /**
63
+ * Create companion model instance with parent context
64
+ */
65
+ private createCompanionInstance;
66
+ /**
67
+ * Attach companion to parent model
68
+ */
69
+ private attachCompanionToParent;
70
+ }
71
+ //# sourceMappingURL=companion-instantiator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-instantiator.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/core/companion-instantiator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvE;;;;GAIG;AACH,qBAAa,wBAAwB;IAEjC,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,WAAW;gBAFX,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,oBAAoB,EAC3B,WAAW,EAAE,CACnB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACzB,GAAG;IAGV;;;;;;;;OAQG;IACH,qBAAqB,CACnB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,SAAS,CAAC,EAAE,mBAAmB;IAyBjC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAI/B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAqB/B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAU9B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAWhC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAa7B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAsC5B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAI3B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAc9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAe/B;;OAEG;IACH,OAAO,CAAC,uBAAuB;CAOhC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Main coordinator for injecting FSM support into a model instance.
3
+ * Delegates to Zone 3 functions for actual implementation.
4
+ *
5
+ * @param modelInstance The model instance to inject FSM support into
6
+ */
7
+ export declare function injectStateMachineSupport(modelInstance: any): void;
8
+ /**
9
+ * Initialize the state machine at a specific lifecycle phase.
10
+ * Called from KosModel lifecycle hooks.
11
+ *
12
+ * @param modelInstance The model instance
13
+ * @param lifecycle The current lifecycle phase
14
+ */
15
+ export declare function initializeStateMachine(modelInstance: any, lifecycle: string): void;
16
+ //# sourceMappingURL=fsm-injection-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fsm-injection-utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/fsm-injection-utils.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,GAAG,QAoB3D;AAmZD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,QA0B3E"}
@@ -1,7 +1,9 @@
1
+ export * from './fsm-injection-utils';
1
2
  export * from './kos-child';
2
3
  export * from './kos-companion';
3
4
  export * from './kos-container-aware';
4
5
  export * from './kos-context';
6
+ export * from './kos-execution-context';
5
7
  export * from './kos-future-aware';
6
8
  export * from './kos-multiple-future-aware';
7
9
  export * from './kos-http-decorators';
@@ -10,6 +12,8 @@ export * from './kos-logger-aware';
10
12
  export * from './kos-model-effect';
11
13
  export * from './kos-parent';
12
14
  export * from './kos-reference';
15
+ export * from './kos-service-request';
16
+ export * from './kos-state-machine';
13
17
  export * from './kos-trouble-aware';
14
18
  export * from './kosDependency';
15
19
  export * from './kosModel';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { IKosDataModel } from '../kosModel';
2
+ import { DependencyLifecycle } from '../../types';
2
3
 
3
4
  export interface KosCompanionOptions {
4
5
  /**
@@ -11,6 +12,20 @@ export interface KosCompanionOptions {
11
12
  excludeProperties?: string[];
12
13
  /** Custom parent property name. Default: 'companionParent' */
13
14
  parentProperty?: string;
15
+ /**
16
+ * Lifecycle phase at which this companion should be created.
17
+ * Defaults to INIT (created immediately during parent instantiation).
18
+ * Use LOAD to create after parent's load() completes, READY for after ready(), etc.
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * @kosCompanion({ lifecycle: DependencyLifecycle.LOAD })
23
+ * class CarbAgitatorModel implements IKosDataModel {
24
+ * // Created after assembly.load() completes
25
+ * }
26
+ * ```
27
+ */
28
+ lifecycle?: DependencyLifecycle;
14
29
  }
15
30
  /**
16
31
  * Base interface for all companion models.
@@ -119,6 +134,10 @@ export interface KosCompanionDecorator<TParent extends IKosDataModel = IKosDataM
119
134
  * // Decorator mode with exclusions
120
135
  * @kosCompanion({ mode: 'decorator', excludeProperties: ['internalState'] })
121
136
  * class MyCompanion { }
137
+ *
138
+ * // Lifecycle-deferred companion creation
139
+ * @kosCompanion({ lifecycle: DependencyLifecycle.LOAD })
140
+ * class DataDrivenCompanion { }
122
141
  * ```
123
142
  *
124
143
  * @category KOS Model Decorator
@@ -1 +1 @@
1
- {"version":3,"file":"kos-companion.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-companion.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC;IACnC,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAChC,OAAO,SAAS,aAAa,GAAG,aAAa;IAE7C;;;;;;OAMG;IACH,kBAAkB,IAAI,OAAO,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,uBAAuB,CACtC,OAAO,SAAS,aAAa,GAAG,aAAa,CAC7C,SAAQ,iBAAiB,CAAC,OAAO,CAAC;CAAG;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,qBAAqB,CACpC,OAAO,SAAS,aAAa,GAAG,aAAa,CAC7C,SAAQ,iBAAiB,CAAC,OAAO,CAAC;CAGnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,cAAc,CAmB1E"}
1
+ {"version":3,"file":"kos-companion.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-companion.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC;IACnC,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAChC,OAAO,SAAS,aAAa,GAAG,aAAa;IAE7C;;;;;;OAMG;IACH,kBAAkB,IAAI,OAAO,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,uBAAuB,CACtC,OAAO,SAAS,aAAa,GAAG,aAAa,CAC7C,SAAQ,iBAAiB,CAAC,OAAO,CAAC;CAAG;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,qBAAqB,CACpC,OAAO,SAAS,aAAa,GAAG,aAAa,CAC7C,SAAQ,iBAAiB,CAAC,OAAO,CAAC;CAGnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,cAAc,CAqB1E"}
@@ -0,0 +1,60 @@
1
+ import { ServiceRequestExecutor, HttpMethod } from './kos-service-request';
2
+
3
+ /**
4
+ * Symbol used to uniquely identify KosExecutionContext objects.
5
+ * Decorators use this to reliably detect if the last parameter is an execution context.
6
+ * @internal
7
+ */
8
+ export declare const KOS_EXECUTION_CONTEXT: unique symbol;
9
+ /**
10
+ * Execution context passed to decorated methods for accessing decorator-injected functionality.
11
+ *
12
+ * This context provides a type-safe way for decorators to inject runtime functionality
13
+ * into methods without polluting the class interface or relying on magic parameters.
14
+ *
15
+ * Currently used by @kosServiceRequest to inject the $request executor.
16
+ * Designed to be extensible for future decorators that need to inject runtime functionality.
17
+ *
18
+ * @example Using with @kosServiceRequest
19
+ * ```typescript
20
+ * @kosServiceRequest({
21
+ * path: PATH_VM_INSTALL,
22
+ * method: 'post'
23
+ * })
24
+ * async createRelease(
25
+ * path: string,
26
+ * keysetId?: string,
27
+ * ctx: KosExecutionContext<paths, typeof PATH_VM_INSTALL, 'post'>
28
+ * ): Promise<void> {
29
+ * const [error, response] = await ctx.$request({
30
+ * queryParams: { keySetId: keysetId },
31
+ * body: { path }
32
+ * });
33
+ * if (error) throw new Error(error);
34
+ * return response?.data;
35
+ * }
36
+ * ```
37
+ */
38
+ export interface KosExecutionContext<Paths extends Record<string, any> = Record<string, any>, Path extends keyof Paths = string, Method extends HttpMethod = "get"> {
39
+ /**
40
+ * Symbol marker to identify this as a KosExecutionContext
41
+ * @internal
42
+ */
43
+ [KOS_EXECUTION_CONTEXT]: true;
44
+ /**
45
+ * Service request executor (injected by @kosServiceRequest)
46
+ * Executes the service request defined in the decorator configuration.
47
+ */
48
+ $request?: ServiceRequestExecutor<Paths, Path, Method>;
49
+ /**
50
+ * Future tracker ID string (injected by @kosFuture when trackerPolicy is 'context')
51
+ * This is the tracker ID that can be used with future management utilities.
52
+ */
53
+ $tracker?: string;
54
+ }
55
+ /**
56
+ * Type guard to check if an object is a KosExecutionContext
57
+ * @internal
58
+ */
59
+ export declare function isKosExecutionContext(obj: any): obj is KosExecutionContext;
60
+ //# sourceMappingURL=kos-execution-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kos-execution-context.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,eAAgC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,mBAAmB,CAClC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACvD,IAAI,SAAS,MAAM,KAAK,GAAG,MAAM,EACjC,MAAM,SAAS,UAAU,GAAG,KAAK;IAEjC;;;OAGG;IACH,CAAC,qBAAqB,CAAC,EAAE,IAAI,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAEvD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,mBAAmB,CAE1E"}
@@ -0,0 +1,381 @@
1
+ import { KosExecutionContext } from './kos-execution-context';
2
+ import { KosModelRegistrationType } from '../registration/model-registration';
3
+ import { IKosDataModel } from '../kosModel';
4
+ import { ClientBody, ClientParams } from '../../util/kos-service-request';
5
+ import { ResponseCacheConfig } from '../../types/service-response-store';
6
+ import { DependencyLifecycle } from '../../types';
7
+
8
+ export type { KosExecutionContext };
9
+ /**
10
+ * Symbol for storing service request handlers metadata on model instances
11
+ * @internal
12
+ */
13
+ export declare const ServiceRequestHandlers: unique symbol;
14
+ /**
15
+ * HTTP methods supported by kosServiceRequest
16
+ */
17
+ export type HttpMethod = "get" | "GET" | "post" | "POST" | "put" | "PUT" | "delete" | "DELETE" | "patch" | "PATCH";
18
+ /**
19
+ * API path type - string representing an API endpoint
20
+ */
21
+ export type ApiPath = string;
22
+ /**
23
+ * Configuration for field mapping in data transformation
24
+ */
25
+ export interface FieldMapping {
26
+ /**
27
+ * Source field path (dot notation supported, e.g., 'data.user.name')
28
+ */
29
+ from: string;
30
+ /**
31
+ * Target field name in the model
32
+ */
33
+ to: string;
34
+ /**
35
+ * Optional transformation to apply
36
+ * Built-in: 'string', 'number', 'boolean', 'date', 'json'
37
+ * Custom: function name or transformer function
38
+ */
39
+ transform?: string | ((value: any) => any);
40
+ /**
41
+ * Whether this field is required
42
+ */
43
+ required?: boolean;
44
+ /**
45
+ * Default value if field is missing
46
+ */
47
+ default?: any;
48
+ }
49
+ /**
50
+ * Configuration for extension points during transformation
51
+ */
52
+ export interface ExtensionConfig {
53
+ /**
54
+ * Type of extension point
55
+ */
56
+ type: "loader" | "data-mapper" | "validator";
57
+ /**
58
+ * Extension identifier (e.g., ExtensionType.IngredientMapper)
59
+ */
60
+ extension: any;
61
+ /**
62
+ * When to execute the extension
63
+ */
64
+ phase?: "before" | "after" | "transform";
65
+ }
66
+ /**
67
+ * Error handling strategy for service requests
68
+ */
69
+ export interface ErrorHandlerConfig {
70
+ /**
71
+ * How to handle errors
72
+ * - 'throw': Re-throw error (default)
73
+ * - 'log': Log error and continue
74
+ * - 'ignore': Silently ignore errors
75
+ * - 'default': Return default value
76
+ */
77
+ strategy: "throw" | "log" | "ignore" | "default";
78
+ /**
79
+ * Default value to return when strategy is 'default'
80
+ */
81
+ defaultValue?: any;
82
+ /**
83
+ * Custom error handler function
84
+ */
85
+ onError?: (error: Error, model: IKosDataModel) => void;
86
+ }
87
+ /**
88
+ * Configuration parameters for @kosServiceRequest decorator
89
+ * Enables lifecycle-driven HTTP requests with declarative data transformation
90
+ *
91
+ * @typeparam Paths - The OpenAPI paths type (from your OpenAPI schema)
92
+ * @typeparam Path - The specific API path being requested
93
+ * @typeparam Method - The HTTP method type
94
+ * @typeparam Response - The raw response type from the API
95
+ * @typeparam TransformedResponse - The transformed response type after mappings
96
+ */
97
+ export interface IKosServiceRequestParams<Paths extends Record<string, any> = Record<string, any>, Path extends keyof Paths = string, Method extends HttpMethod = "get", Response = any, TransformedResponse = Response> {
98
+ /**
99
+ * API path to request
100
+ *
101
+ * @example
102
+ * path: '/api/kos/ingredients'
103
+ * path: `/api/devices/${PROP_DEVICE_ID}/status` // with PropKey
104
+ */
105
+ path: Path;
106
+ /**
107
+ * HTTP method
108
+ *
109
+ * @default 'get'
110
+ */
111
+ method?: Method;
112
+ /**
113
+ * When to execute this request during model lifecycle
114
+ *
115
+ * If omitted, the request executes when the decorated method is called (method-driven).
116
+ * If specified, the request executes automatically during the given lifecycle phase (lifecycle-driven).
117
+ *
118
+ * @example
119
+ * // Lifecycle-driven (auto-execute during LOAD phase)
120
+ * lifecycle: DependencyLifecycle.LOAD
121
+ *
122
+ * @example
123
+ * // Method-driven (execute when method is called)
124
+ * lifecycle: undefined // or omit entirely
125
+ */
126
+ lifecycle?: DependencyLifecycle;
127
+ /**
128
+ * Path parameters to expand in the URL
129
+ * Strongly typed from OpenAPI schema
130
+ * Can be static values or PropKey references
131
+ *
132
+ * @example
133
+ * // Static value
134
+ * pathParams: { deviceId: 'device-123' }
135
+ *
136
+ * @example
137
+ * // PropKey reference (use PROP_ prefix)
138
+ * pathParams: { deviceId: PROP_DEVICE_ID }
139
+ *
140
+ * @example
141
+ * // Dynamic from method arguments
142
+ * pathParams: (model, deviceId, status) => ({ deviceId })
143
+ */
144
+ pathParams?: (ClientParams<Paths, Path, Method> extends {
145
+ path?: infer P;
146
+ } ? P : never) | ((model: IKosDataModel, ...args: any[]) => ClientParams<Paths, Path, Method> extends {
147
+ path?: infer P;
148
+ } ? P : never);
149
+ /**
150
+ * Query parameters
151
+ * Strongly typed from OpenAPI schema
152
+ *
153
+ * @example
154
+ * // Static
155
+ * queryParams: { includeMetadata: true, format: 'json' }
156
+ *
157
+ * @example
158
+ * // Dynamic from method arguments
159
+ * queryParams: (model, deviceId, debug) => ({ debug })
160
+ */
161
+ queryParams?: (ClientParams<Paths, Path, Method> extends {
162
+ query?: infer Q;
163
+ } ? Q : never) | ((model: IKosDataModel, ...args: any[]) => ClientParams<Paths, Path, Method> extends {
164
+ query?: infer Q;
165
+ } ? Q : never);
166
+ /**
167
+ * Request body (for POST/PUT/PATCH)
168
+ * Strongly typed from OpenAPI schema
169
+ *
170
+ * @example
171
+ * // Static body
172
+ * body: { action: 'start' }
173
+ *
174
+ * @example
175
+ * // Dynamic from method arguments
176
+ * body: (model, vehicleType, speed) => ({ vehicleType, speed })
177
+ */
178
+ body?: ClientBody<Paths, Path, Method> | ((model: IKosDataModel, ...args: any[]) => ClientBody<Paths, Path, Method>);
179
+ /**
180
+ * JSON path to iterate over in response
181
+ * Creates models for each item in the array
182
+ *
183
+ * @example
184
+ * iterateOver: 'data.ingredients' // Iterates response.data.ingredients array
185
+ */
186
+ iterateOver?: string;
187
+ /**
188
+ * Model registration object for creating instances from array items
189
+ * Used with iterateOver to create child models using the builder pattern
190
+ *
191
+ * @example
192
+ * modelFactory: IngredientModel // The registration object itself
193
+ *
194
+ * deprecated The old curried function signature is deprecated:
195
+ * modelFactory?: (id: string) => (options: any) => IKosDataModel
196
+ */
197
+ modelFactory?: KosModelRegistrationType<IKosDataModel, Record<string, unknown>> | ((id: string) => (options: unknown) => IKosDataModel);
198
+ /**
199
+ * Function to extract the model ID from response data items
200
+ * Required when using modelFactory if items don't have an 'id' field
201
+ *
202
+ * @example
203
+ * idExtractor: (item) => item.ingredientId
204
+ * idExtractor: (item) => `${item.type}-${item.index}`
205
+ */
206
+ idExtractor?: (item: any) => string;
207
+ /**
208
+ * Field mappings for data transformation
209
+ * Same format as @kosTopicHandler mappings
210
+ *
211
+ * @example
212
+ * mappings: [
213
+ * { from: 'id', to: 'id' },
214
+ * { from: 'ingredientId', to: 'ingredientId' },
215
+ * { from: 'metadata.calories', to: 'calories', transform: 'number' }
216
+ * ]
217
+ */
218
+ mappings?: FieldMapping[];
219
+ /**
220
+ * Extension points to execute during transformation
221
+ *
222
+ * @example
223
+ * extensions: [
224
+ * { type: 'data-mapper', extension: ExtensionType.IngredientMapper }
225
+ * ]
226
+ */
227
+ extensions?: ExtensionConfig[];
228
+ /**
229
+ * Transformation function for response data
230
+ * Applied before mappings
231
+ *
232
+ * @example
233
+ * transform: (response) => response.data
234
+ */
235
+ transform?: (response: Response) => TransformedResponse;
236
+ /**
237
+ * Condition to determine if request should execute
238
+ *
239
+ * @example
240
+ * condition: (model) => model.isInitialized
241
+ */
242
+ condition?: (model: IKosDataModel) => boolean;
243
+ /**
244
+ * Error handling strategy
245
+ *
246
+ * @example
247
+ * errorHandler: {
248
+ * strategy: 'default',
249
+ * defaultValue: [],
250
+ * onError: (error, model) => model.logger.error('Failed to load', error)
251
+ * }
252
+ */
253
+ errorHandler?: ErrorHandlerConfig;
254
+ /**
255
+ * Response caching configuration
256
+ * Controls how long responses are stored and when they're cleaned up
257
+ *
258
+ * @default { retention: ResponseRetention.SINGLE }
259
+ *
260
+ * @example
261
+ * // No caching - clear immediately after handler
262
+ * cache: { retention: ResponseRetention.IMMEDIATE }
263
+ *
264
+ * @example
265
+ * // Cache for 5 minutes
266
+ * cache: { retention: ResponseRetention.TTL, ttl: 5 * 60 * 1000 }
267
+ *
268
+ * @example
269
+ * // Keep for model lifetime
270
+ * cache: { retention: ResponseRetention.PERMANENT }
271
+ */
272
+ cache?: ResponseCacheConfig;
273
+ }
274
+ /**
275
+ * Metadata stored for each service request handler
276
+ * @internal
277
+ */
278
+ export interface ServiceRequestMetadata<Paths extends Record<string, any> = Record<string, any>, Path extends keyof Paths = string, Method extends HttpMethod = "get", Response = any, TransformedResponse = Response> extends IKosServiceRequestParams<Paths, Path, Method, Response, TransformedResponse> {
279
+ /**
280
+ * The method name that handles the response
281
+ */
282
+ handlerMethod: string;
283
+ /**
284
+ * The original handler function
285
+ */
286
+ originalHandler: Function;
287
+ }
288
+ /**
289
+ * Runtime service request executor injected into method context
290
+ * Allows imperative execution of the service request defined by the decorator
291
+ */
292
+ export interface ServiceRequestExecutor<Paths extends Record<string, any> = Record<string, any>, Path extends keyof Paths = string, Method extends HttpMethod = "get"> {
293
+ (options?: {
294
+ pathParams?: ClientParams<Paths, Path, Method> extends {
295
+ path?: infer P;
296
+ } ? P : never;
297
+ queryParams?: ClientParams<Paths, Path, Method> extends {
298
+ query?: infer Q;
299
+ } ? Q : never;
300
+ body?: ClientBody<Paths, Path, Method>;
301
+ }): Promise<[string | null, any]>;
302
+ }
303
+ /**
304
+ * Type alias for the service request executor function signature.
305
+ * This executor is automatically passed as the last parameter to methods
306
+ * decorated with @kosServiceRequest (without lifecycle).
307
+ *
308
+ * @example
309
+ * ```typescript
310
+ * type CreateReleaseExecutor = ServiceRequestExecutor<paths, typeof PATH_VM_INSTALL, 'post'>;
311
+ * ```
312
+ */
313
+ export type ServiceRequestExecutorFn<Paths extends Record<string, any> = Record<string, any>, Path extends keyof Paths = string, Method extends HttpMethod = "get"> = ServiceRequestExecutor<Paths, Path, Method>;
314
+ /**
315
+ * Decorator for lifecycle-driven service requests within KOS models
316
+ *
317
+ * Eliminates service boilerplate by integrating HTTP requests directly into
318
+ * the model lifecycle. Responses are cached in ServiceResponseStore for access
319
+ * via utility functions, avoiding "magic last parameter" patterns.
320
+ *
321
+ * @param params - Configuration for the service request
322
+ * @returns Method decorator
323
+ *
324
+ * @example Basic GET request during LOAD
325
+ * ```typescript
326
+ * @kosServiceRequest({
327
+ * path: PATH_DEVICE_STATUS,
328
+ * method: 'get',
329
+ * lifecycle: DependencyLifecycle.LOAD,
330
+ * cache: { retention: ResponseRetention.SINGLE }
331
+ * })
332
+ * private onStatusLoaded(): void {
333
+ * const response = getServiceResponse(this, PATH_DEVICE_STATUS, 'get');
334
+ * this.status = response?.status;
335
+ * }
336
+ * ```
337
+ *
338
+ * @example Method-driven request with execution context
339
+ * ```typescript
340
+ * @kosServiceRequest({
341
+ * path: PATH_VM_INSTALL,
342
+ * method: 'post'
343
+ * })
344
+ * async createRelease(
345
+ * path: string,
346
+ * keysetId?: string,
347
+ * ctx: KosExecutionContext<paths, typeof PATH_VM_INSTALL, 'post'>
348
+ * ): Promise<void> {
349
+ * const [error, response] = await ctx.$request({
350
+ * queryParams: { keySetId: keysetId },
351
+ * body: { path }
352
+ * });
353
+ * if (error) throw new Error(error);
354
+ * return response?.data;
355
+ * }
356
+ * ```
357
+ *
358
+ * @example Container model with iteration
359
+ * ```typescript
360
+ * @kosServiceRequest({
361
+ * path: PATH_INGREDIENTS,
362
+ * method: 'get',
363
+ * lifecycle: DependencyLifecycle.LOAD,
364
+ * iterateOver: 'data.ingredients',
365
+ * modelFactory: Ingredient.factory,
366
+ * mappings: [
367
+ * { from: 'id', to: 'id' },
368
+ * { from: 'name', to: 'name' }
369
+ * ]
370
+ * })
371
+ * private onIngredientsLoaded(): void {
372
+ * const response = getServiceResponse(this, PATH_INGREDIENTS, 'get');
373
+ * // Mappings already applied to response data
374
+ * response?.forEach(i => this.ingredients.addModel(i));
375
+ * }
376
+ * ```
377
+ *
378
+ * @category KOS Model Decorator
379
+ */
380
+ export declare function kosServiceRequest<Paths extends Record<string, any> = Record<string, any>, Path extends keyof Paths = string, Method extends HttpMethod = "get", Response = any, TransformedResponse = Response>(params: IKosServiceRequestParams<Paths, Path, Method, Response, TransformedResponse>): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
381
+ //# sourceMappingURL=kos-service-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kos-service-request.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-service-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,yBAAyB,CAAC;AAIjC,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAcvE;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,KAAK,GACL,MAAM,GACN,MAAM,GACN,KAAK,GACL,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,OAAO,CAAC;AAEZ;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC,CAAC;IAE3C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAA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