@kosdev-code/kos-ui-sdk 0.1.0-dev.5688 → 0.1.0-dev.5689

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 (33) hide show
  1. package/core/core/decorators/index.d.ts +1 -0
  2. package/core/core/decorators/index.d.ts.map +1 -1
  3. package/core/core/extension/extension-manager.d.ts +1 -0
  4. package/core/core/extension/extension-manager.d.ts.map +1 -1
  5. package/core/index.d.ts +1 -1
  6. package/core/index.d.ts.map +1 -1
  7. package/index.cjs +75 -75
  8. package/index.cjs.map +1 -1
  9. package/index.js +4307 -4865
  10. package/index.js.map +1 -1
  11. package/kos-models.json +1 -1
  12. package/models/decorators/future-service.d.ts.map +1 -1
  13. package/models/utils/index.d.ts +1 -0
  14. package/models/utils/index.d.ts.map +1 -1
  15. package/models/utils/service-accessor.d.ts +82 -0
  16. package/models/utils/service-accessor.d.ts.map +1 -0
  17. package/package.json +2 -2
  18. package/core/core/declarative/declarative-actions-wiring.d.ts +0 -14
  19. package/core/core/declarative/declarative-actions-wiring.d.ts.map +0 -1
  20. package/core/core/declarative/declarative-future-registry.d.ts +0 -26
  21. package/core/core/declarative/declarative-future-registry.d.ts.map +0 -1
  22. package/core/core/declarative/declarative-model-bindings.d.ts +0 -191
  23. package/core/core/declarative/declarative-model-bindings.d.ts.map +0 -1
  24. package/core/core/declarative/declarative-model-discovery.d.ts +0 -74
  25. package/core/core/declarative/declarative-model-discovery.d.ts.map +0 -1
  26. package/core/core/declarative/declarative-model-factory.d.ts +0 -58
  27. package/core/core/declarative/declarative-model-factory.d.ts.map +0 -1
  28. package/core/core/declarative/declarative-model-types.d.ts +0 -100
  29. package/core/core/declarative/declarative-model-types.d.ts.map +0 -1
  30. package/core/core/declarative/index.d.ts +0 -8
  31. package/core/core/declarative/index.d.ts.map +0 -1
  32. package/core/core/declarative/types.d.ts +0 -320
  33. package/core/core/declarative/types.d.ts.map +0 -1
package/kos-models.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-02-26T15:01:18.541Z",
2
+ "generatedAt": "2026-02-26T16:41:51.536Z",
3
3
  "packageName": "@kosdev-code/kos-ui-sdk",
4
4
  "models": {
5
5
  "browser-router-model": {
@@ -1 +1 @@
1
- {"version":3,"file":"future-service.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/decorators/future-service.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAClC;AASD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAC1C,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,WAAgB,GACtB,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAyKzF;AAMD,wBAAgB,SAAS,CAAC,KAAK,GAAE,WAAgB,YAE/B,GAAG,eAAe,MAAM,cAAc,kBAAkB,UAgBzE"}
1
+ {"version":3,"file":"future-service.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/decorators/future-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAClC;AASD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAC1C,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,WAAgB,GACtB,CACD,IAAI,EAAE,eAAe,EACrB,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KACpB,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAyKvC;AAYD,wBAAgB,SAAS,CAAC,KAAK,GAAE,WAAgB,YAE/B,GAAG,eAAe,MAAM,cAAc,kBAAkB,UAgBzE"}
@@ -7,6 +7,7 @@ export * from './model-event-utils';
7
7
  export * from './persistence-store';
8
8
  export * from './prop-utils';
9
9
  export * from './region-utils';
10
+ export * from './service-accessor';
10
11
  export * from './services-index';
11
12
  export * from './timer-manager';
12
13
  export * from './timezone-utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Public accessor for the KOS API service client.
3
+ *
4
+ * Encapsulates the dynamic import of the internal `service` module,
5
+ * preserving the lazy-load pattern while providing a stable import
6
+ * path for external consumers (e.g., kos-declarative-model).
7
+ */
8
+ export declare function getKosServiceApi(): Promise<{
9
+ get: <K extends "/api/kos/network/interfaces" | "/api/app/kosdev.ddk/auth/role" | "/api/system/lidar/scan/data" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/select" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/availability" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/availability/groups/{group}" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/graph/node/{id}" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/graph/beverages" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/graph/nodes" | "/api/kos/ui/plugins/context/{*name}" | "/api/kos/ui/plugins/contexts" | "/api/kos/localization/context/{*path}" | "/api/kos/localization/contexts" | "/api/kos/browser" | "/api/kos/browser/redirect" | "/api/app/kosdev.ddk/cui" | "/api/app/kosdev.ddk/cui/open" | "/api/kos/future/traces" | "/api/kos/future/traces/{traceId}/events" | "/api/kos/ota/paused" | "/api/kos/ota/artifacts" | "/api/app/kosdev.ddk/copyLogs/volumes/size" | "/api/app/kosdev.ddk/copyLogs/files/size" | "/api/ext/freestyle/can/read/float/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/read/int/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/stats/raw" | "/api/kos/state/paths" | "/api/kos/state/{path}" | "/api/kos/hardware/resolver/identityMappings" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/favorite-bevs" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/tag-info" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/rewarded-games" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/rewarded-bevs" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/tag-username" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/cup-id" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/points" | "/api/ext/dispense/metrics" | "/api/ext/dispense/metrics/names" | "/api/ext/dispense/metrics/{name}" | "/api/ext/dispense/metrics/{nozzle}/names" | "/api/ext/dispense/metrics/{nozzle}/{name}" | "/api/ext/freestyle/microCalibration/report/{board}" | "/api/ext/freestyle/microCalibration/history/{pump}" | "/api/ext/freestyle/microCalibration/cal/{pump}" | "/api/kos/config/schema" | "/api/kos/config/schema/{path}" | "/api/kos/config/{path}" | "/api/kos/config/details/{options}" | "/api/kos/config/details/{path}/{options}" | "/api/kos/config/value/merged/{scopedPath}/{attr}" | "/api/kos/config/value/{scopedPath}/{attr}" | "/api/kos/config/bean/defaults/{scopedPath}" | "/api/kos/config/bean/merged/{path}" | "/api/kos/config/bean/overrides/{scopedPath}" | "/api/ext/freestyle/brandset/nutrition/{bevId}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/kos/storage/devices" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline" | "/api/system/test/stop-animation" | "/api/system/test/start-animation-repeat" | "/api/system/test/get-tag" | "/api/system/test/start-animation-{duration}" | "/api/kos/update/available" | "/api/ext/dispense/ingredients" | "/api/ext/dispense/ingredients/sources" | "/api/kos/troubles" | "/api/kos/troubles/{troubleId}" | "/api/ext/freestyle/fuelGauges/{holder}" | "/api/kos/handles" | "/api/kos/handles/{path}" | "/api/kos/handles/{path}/{view}" | "/api/kos/handles/views" | "/api/kos/openapi/{*baseUrl}" | "/api/app/kosdev.ddk/door/door" | "/api/kos/manifest/node" | "/api/kos/manifest/device" | "/api/kos/manifest/info" | "/api/app/kosdev.ddk/network/reports" | "/api/app/kosdev.ddk/network/tests" | "/api/app/kosdev.ddk/network/tests/run/{id}" | "/api/app/kosdev.ddk/network/tests/run/group/{group}" | "/api/kos/apps" | "/api/kos/apps/started" | "/api/kos/time/timezone" | "/api/ext/freestyle/cartridges" | "/api/ext/freestyle/cartridges/{id}" | "/api/ext/dispense/soldOuts/troubles" | "/api/ext/dispense/soldOuts/db" | "/api/vfs" | "/api/app/kosdev.ddk/setup/steps" | "/api/app/kosdev.ddk/setup/steps/reset" | "/api/app/kondra.controlledPour/state" | "/api/kos/regions" | "/api/kos/regions/info" | "/api/ext/dispense/assignments" | "/api/kos/descriptor/{path}" | "/api/kos/descriptor/{path}/{dotted}" | "/api/kos/logs/rotateAll" | "/api/kos/logs/node/{nodeId}/streams" | "/api/kos/logs/node/{nodeId}/{stream}/blocks" | "/api/kos/logs/node/{nodeId}/{stream}/blocks/{blockId}" | "/api/kos/logs/rotate/{stream}" | "/api/kos/logs/overrides" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests" | "/api/kos/nodeMgr/blockedManifests" | "/api/ext/dispense/insertion/filters" | "/api/kos/logs/groups" | "/api/kos/logs/overrides/{nodeType}" | "/api/kos/logs/overrides/{nodeType}/{typePrefix}" | "/api/kos/studio/properties" | "/api/kos/criticalData/sources" | "/api/kos/criticalData/data" | "/api/kos/criticalData/data/{name}" | "/api/app/kosdev.ddk/ncui/plugins" | "/api/app/kosdev.ddk/ncui/open" | "/api/kos/device" | "/api/kos/device/assemblies" | "/api/kos/device/serialNumber" | "/api/app/dm.agent/device-mgmt/agent/config-value/{path}/{property}" | "/api/app/dm.agent/device-mgmt/agent/ping" | "/api/app/dm.agent/device-mgmt/agent/rotate-logs" | "/api/app/dm.agent/device-mgmt/agent/ota">(endpoint: K, params?: (import('./openapi').paths[K]["get"] extends {
10
+ parameters: infer P;
11
+ } ? P : never) | undefined, options?: {
12
+ ordered?: boolean | undefined;
13
+ tracker?: string | undefined;
14
+ timeout?: number | undefined;
15
+ destinationAddress?: string | undefined;
16
+ bridge?: boolean | undefined;
17
+ headers?: Record<string, string> | undefined;
18
+ fos?: boolean | undefined;
19
+ studio?: boolean | undefined;
20
+ signal?: AbortSignal | undefined;
21
+ stream?: boolean | undefined;
22
+ responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
23
+ } | undefined) => Promise<import('../..').ServiceResponse<import('../..').ClientResponse<import('./openapi').paths, K, "get">>>;
24
+ post: <K_1 extends "/api/kos/network/set-connection/{nodeId}" | "/api/kos/network/connect-node-to-wifi" | "/api/app/kosdev.ddk/auth/pincode/{pin}" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/select" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/stop" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/stop/{reason}" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/pour" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/fixed/{name}" | "/api/kos/browser/{nodeId}" | "/api/kos/browser/{nodeId}/{name}" | "/api/kos/browser/intent" | "/api/kos/browser/url" | "/api/kos/future/{futureId}/cancel" | "/api/kos/ota/resume/{name}" | "/api/kos/ota/cancel" | "/api/kos/ota/cancel/{name}" | "/api/kos/ota/pause/{name}" | "/api/app/kosdev.ddk/copyLogs/eraseAndCopy/{id}" | "/api/app/kosdev.ddk/copyLogs/{id}" | "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/write/byte/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/short/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/float/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/int/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/fcm/diagnostics/{pump}/pressureTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/opennessTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/flowTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/electricalTest" | "/api/kos/hardware/resolver/identityMappings/{boardPath}" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/sim/card/decline" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/sim/card/accept" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/sim/cup/place-down" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/sim/cup/pick-up" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/favorite-bevs" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/rewarded-games" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/tag/clear" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/rewarded-bevs" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/tag-username" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/cup-id" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/rfid/points" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/lidar/sim/leave" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/card/cancel" | "/api/app/com.kondra.summer.2025.controlledPourPlugin/card/start/{sizeId}" | "/api/ext/dispense/metrics/{name}" | "/api/ext/dispense/metrics/{nozzle}/{name}" | "/api/ext/freestyle/microCalibration/cal/{pump}/running/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/code/{code}" | "/api/ext/freestyle/microCalibration/cal/{pump}/baseline/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/both/{val}" | "/api/kos/config/{path}" | "/api/kos/config/bulk" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fcm/calibration/{pump}/calibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/preCalibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/verify/{calVolume}" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline/{value}" | "/api/ext/freestyle/fcm/calibration/{pump}/complete/{calVolume}/{verifyVolume}" | "/api/ext/freestyle/microCalibration/pour/{pump}/calibrate" | "/api/ext/freestyle/microCalibration/pour/{pump}/preCalibrate" | "/api/ext/freestyle/microCalibration/pour/{pump}/verify" | "/api/ext/freestyle/microCalibration/pour/{pump}/complete" | "/api/kos/update/install" | "/api/kos/troubles/resolve" | "/api/kos/troubles/resolve/{troubleId}" | "/api/ext/freestyle/fuelGauges/{holder}/{val}" | "/api/ext/dispense/pumpEvents/replaceLine/{holder}" | "/api/ext/dispense/pumpEvents/replacePump/{pump}" | "/api/app/kosdev.ddk/door/door/{state}" | "/api/kos/time/date" | "/api/kos/time/timezone" | "/api/kos/time/time" | "/api/ext/dispense/soldOuts/container/{pump}/{reason}" | "/api/ext/dispense/soldOuts/slice/{pump}/{reason}" | "/api/app/kosdev.ddk/setup/complete/{stepName}" | "/api/system/canvas" | "/api/system/canvas/nozzle" | "/api/ext/dispense/assignments" | "/api/kos/logs/node/{nodeId}/{stream}/subscribe" | "/api/kos/logs/node/{nodeId}/{stream}/unsubscribe" | "/api/kos/logs/overrides" | "/api/kos/nodeMgr/reboot" | "/api/kos/nodeMgr/node/{nodeId}/reboot" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests/{manifestId}" | "/api/kos/nodeMgr/blockedManifests/{manifestId}" | "/api/app/kosdev.ddk/lockout/unlock/{pin}" | "/api/kos/criticalData/data" | "/api/kos/criticalData/data/{name}" | "/api/app/kosdev.ddk/ncui/reboot" | "/api/kos/device/serialNumber/{serialNum}" | "/api/app/dm.agent/device-mgmt/agent/config-value/{path}/{property}">(endpoint: K_1, params?: (import('./openapi').paths[K_1]["post"] extends {
25
+ parameters: infer P_1;
26
+ } ? P_1 : never) | undefined, body?: (import('./openapi').paths[K_1]["post"] extends {
27
+ requestBody: {
28
+ content: infer B;
29
+ };
30
+ } ? B[keyof B] : never) | undefined, options?: {
31
+ ordered?: boolean | undefined;
32
+ tracker?: string | undefined;
33
+ timeout?: number | undefined;
34
+ destinationAddress?: string | undefined;
35
+ bridge?: boolean | undefined;
36
+ headers?: Record<string, string> | undefined;
37
+ fos?: boolean | undefined;
38
+ studio?: boolean | undefined;
39
+ signal?: AbortSignal | undefined;
40
+ stream?: boolean | undefined;
41
+ responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
42
+ } | undefined) => Promise<import('../..').ServiceResponse<import('../..').ClientResponse<import('./openapi').paths, K_1, "post">>>;
43
+ put: <K_2 extends never>(endpoint: K_2, params?: (import('./openapi').paths[K_2]["put"] extends {
44
+ parameters: infer P_2;
45
+ } ? P_2 : never) | undefined, body?: (import('./openapi').paths[K_2]["put"] extends {
46
+ requestBody: {
47
+ content: infer B_1;
48
+ };
49
+ } ? B_1[keyof B_1] : never) | undefined, options?: {
50
+ ordered?: boolean | undefined;
51
+ tracker?: string | undefined;
52
+ timeout?: number | undefined;
53
+ destinationAddress?: string | undefined;
54
+ bridge?: boolean | undefined;
55
+ headers?: Record<string, string> | undefined;
56
+ fos?: boolean | undefined;
57
+ studio?: boolean | undefined;
58
+ signal?: AbortSignal | undefined;
59
+ stream?: boolean | undefined;
60
+ responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
61
+ } | undefined) => Promise<import('../..').ServiceResponse<import('../..').ClientResponse<import('./openapi').paths, K_2, "put">>>;
62
+ delete: <K_3 extends "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/select" | "/api/app/kosdev.ddk/copyLogs/{id}" | "/api/kos/hardware/resolver/identityMappings/{boardPath}" | "/api/ext/dispense/metrics/{name}" | "/api/ext/dispense/metrics/{nozzle}/{name}" | "/api/ext/dispense/assignments/{holderPath}" | "/api/kos/logs/overrides" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests/{manifestId}" | "/api/kos/nodeMgr/blockedManifests/{manifestId}" | "/api/kos/criticalData/data/{name}">(endpoint: K_3, params?: (import('./openapi').paths[K_3]["delete"] extends {
63
+ parameters: infer P_3;
64
+ } ? P_3 : never) | undefined, body?: (import('./openapi').paths[K_3]["put"] extends {
65
+ requestBody: {
66
+ content: infer B_1;
67
+ };
68
+ } ? B_1[keyof B_1] : never) | undefined, options?: {
69
+ ordered?: boolean | undefined;
70
+ tracker?: string | undefined;
71
+ timeout?: number | undefined;
72
+ destinationAddress?: string | undefined;
73
+ bridge?: boolean | undefined;
74
+ headers?: Record<string, string> | undefined;
75
+ fos?: boolean | undefined;
76
+ studio?: boolean | undefined;
77
+ signal?: AbortSignal | undefined;
78
+ stream?: boolean | undefined;
79
+ responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
80
+ } | undefined) => Promise<import('../..').ServiceResponse<import('../..').ClientResponse<import('./openapi').paths, K_3, "delete">>>;
81
+ }>;
82
+ //# sourceMappingURL=service-accessor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-accessor.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/service-accessor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAsB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosdev-code/kos-ui-sdk",
3
- "version": "0.1.0-dev.5688",
3
+ "version": "0.1.0-dev.5689",
4
4
  "type": "module",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "kos": {
39
39
  "build": {
40
- "gitHash": "2f3adbdc1912e705fac9e6a44e4d4e9d8ccb0b56"
40
+ "gitHash": "8f80adb8c6f5d9acb449e194a680ad6ba6bc30fc"
41
41
  }
42
42
  }
43
43
  }
@@ -1,14 +0,0 @@
1
- import { DeclarativeModelConfig } from './types';
2
-
3
- /**
4
- * Wire all actions from the unified `actions` section.
5
- *
6
- * Routes each action to the appropriate framework mechanism:
7
- * - Service + lifecycle → ServiceRequestHandlers (auto-executed by ServiceRequestManager)
8
- * - Service, no lifecycle → prototype method with $request context (method-driven)
9
- * - Future → FutureService + FutureAliases Symbols
10
- * - FutureContainerSetup is auto-inferred from the count of future actions
11
- * - Plain actions → handled by buildDynamicClass via bindings.actions
12
- */
13
- export declare function wireActions(prototype: any, config: DeclarativeModelConfig): void;
14
- //# sourceMappingURL=declarative-actions-wiring.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"declarative-actions-wiring.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/declarative-actions-wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqBH,OAAO,KAAK,EAEV,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAqSjB;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,SAAS,EAAE,GAAG,EACd,MAAM,EAAE,sBAAsB,GAC7B,IAAI,CA2EN"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Registry for the future lifecycle wrapper function.
3
- *
4
- * Solves a circular dependency: the declarative layer (inside core/) needs
5
- * `wrapWithFutureLifecycle` from the models layer, but importing it directly
6
- * creates core → models → core. Instead, the models layer registers the
7
- * implementation here at load time, and the declarative layer reads it
8
- * at runtime when wiring future actions.
9
- */
10
- export type FutureLifecycleWrapperFn = (original: (...args: any[]) => Promise<any>, methodName: string, props: {
11
- alias?: string;
12
- namespace?: string;
13
- abortController?: boolean;
14
- trackerPolicy?: "id" | "context";
15
- }) => (...args: any[]) => Promise<any>;
16
- /**
17
- * Register the future lifecycle wrapper implementation.
18
- * Called by the models layer (`future-service.ts`) at module load time.
19
- */
20
- export declare function registerFutureLifecycleWrapper(fn: FutureLifecycleWrapperFn): void;
21
- /**
22
- * Retrieve the registered future lifecycle wrapper.
23
- * Called by `wireFutureAction` at runtime.
24
- */
25
- export declare function getFutureLifecycleWrapper(): FutureLifecycleWrapperFn | undefined;
26
- //# sourceMappingURL=declarative-future-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"declarative-future-registry.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/declarative-future-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,MAAM,wBAAwB,GAAG,CACrC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAC1C,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAClC,KACE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAItC;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,EAAE,EAAE,wBAAwB,GAC3B,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,wBAAwB,GAAG,SAAS,CAEhF"}
@@ -1,191 +0,0 @@
1
- import { BasePropsFor, RegisteredBinding } from './declarative-model-types';
2
-
3
- /**
4
- * An effect handler binding: either a plain function or an object
5
- * with a handler and optional dependency function.
6
- */
7
- export type EffectHandlerBinding<TModel = any> = ((model: TModel) => void) | {
8
- handler: (model: TModel) => void;
9
- /** Dependency function that returns an array of tracked values.
10
- * When provided, this takes priority over JSON string paths. */
11
- dependencies?: (model: TModel) => any[];
12
- };
13
- /**
14
- * Registration for a declarative model's imperative bindings.
15
- *
16
- * The `TModel` parameter enables typed `model` arguments when the type
17
- * system knows the model shape (via generated `.d.ts` augmentation).
18
- * Defaults to `any` for full backward compatibility.
19
- */
20
- export interface ModelBindingRegistration<TModel = any> {
21
- /**
22
- * Computed property getters. Each key becomes a `get` accessor
23
- * on the model instance. MobX will treat these as computed values.
24
- */
25
- computed?: Record<string, (model: TModel) => any>;
26
- /**
27
- * Topic handler implementations keyed by handler name.
28
- * Referenced from `topics[topic].handler` in the JSON config.
29
- */
30
- topicHandlers?: Record<string, (model: TModel, payload: any, raw?: any) => void>;
31
- /**
32
- * Custom condition functions for topic handlers, keyed by handler name.
33
- * When provided, the condition is called before the handler — if it
34
- * returns false, the message is discarded.
35
- *
36
- * Signature: `(data, model, payload) => boolean`
37
- */
38
- topicConditions?: Record<string, (data: any, model: TModel, payload: any) => boolean>;
39
- /**
40
- * Custom transform functions for topic handlers, keyed by handler name.
41
- * When provided, the transform is applied to the raw message body
42
- * before passing it to the handler.
43
- *
44
- * Signature: `(payload) => transformedPayload`
45
- */
46
- topicTransforms?: Record<string, (payload: any) => any>;
47
- /**
48
- * Service request response handlers keyed by handler name.
49
- * Referenced from `serviceRequests[name].handler` in the JSON config.
50
- * Called with error-first parameters: `(model, error, data)`.
51
- */
52
- serviceHandlers?: Record<string, (model: TModel, error: string | null, data: any) => void>;
53
- /**
54
- * Custom condition functions for service requests, keyed by handler name.
55
- * When provided, the condition is checked before executing the request —
56
- * if it returns false, the request is skipped.
57
- *
58
- * Signature: `(model) => boolean`
59
- */
60
- serviceConditions?: Record<string, (model: TModel) => boolean>;
61
- /**
62
- * Custom transform functions for service request responses, keyed by handler name.
63
- * Applied to the raw response before the handler receives it.
64
- *
65
- * Signature: `(response) => transformedResponse`
66
- */
67
- serviceTransforms?: Record<string, (response: any) => any>;
68
- /**
69
- * Lifecycle hook implementations.
70
- * Called during the corresponding KosModel lifecycle phase.
71
- */
72
- lifecycle?: {
73
- init?: (model: TModel, context?: any) => Promise<void>;
74
- load?: (model: TModel, context?: any) => Promise<void>;
75
- ready?: (model: TModel, context?: any) => Promise<void>;
76
- activate?: (model: TModel, context?: any) => Promise<void>;
77
- online?: (model: TModel, context?: any) => Promise<void>;
78
- offline?: (model: TModel, context?: any) => Promise<void>;
79
- unload?: (model: TModel, context?: any) => void;
80
- deactivate?: (model: TModel, context?: any) => Promise<void>;
81
- };
82
- /**
83
- * Effect handler implementations keyed by effect name.
84
- * Referenced from `effects[name].handler` in the JSON config.
85
- *
86
- * Each entry can be either:
87
- * - A plain function `(model) => void` — uses dependencies from JSON
88
- * - An object `{ handler, dependencies? }` — the `dependencies` function
89
- * takes priority over JSON string paths when both are provided.
90
- *
91
- * @example
92
- * ```typescript
93
- * effectHandlers: {
94
- * // Simple: handler only, dependencies come from JSON
95
- * onPourIdle: (model) => { model.count++; },
96
- *
97
- * // With dependency function (overrides JSON string paths)
98
- * onDeviceChange: {
99
- * handler: (model) => { model.syncStatus(); },
100
- * dependencies: (model) => [model.device?.isOnline, model.device?.status],
101
- * },
102
- * }
103
- * ```
104
- */
105
- effectHandlers?: Record<string, EffectHandlerBinding<TModel>>;
106
- /**
107
- * Custom actions to add to the model instance.
108
- * The first argument is always the model instance itself.
109
- */
110
- actions?: Record<string, (model: TModel, ...args: any[]) => any>;
111
- /**
112
- * Options expander functions for config properties, keyed by expander name.
113
- * Referenced from `configProperties[name].optionsExpander` in the JSON config.
114
- */
115
- configPropertyExpanders?: Record<string, (model: TModel) => any>;
116
- /**
117
- * Future-related bindings: service handlers and update callback.
118
- *
119
- * - `handlers` — Keyed by handler name, referenced from
120
- * `futureServices[name].handler` in the JSON config.
121
- * Each is an async function that calls a backend service and
122
- * returns a FutureResponse (or KosServiceResponse<FutureResponse>).
123
- * The first argument is the model instance.
124
- *
125
- * - `onFutureUpdate` — Optional callback invoked when a managed Future
126
- * updates (progress or endState). Called by the FutureHandler as
127
- * `model.onFutureUpdate(future, alias?)`.
128
- * The first argument is the model instance.
129
- */
130
- futureHandlers?: {
131
- handlers?: Record<string, (model: TModel, ...args: any[]) => Promise<any>>;
132
- onFutureUpdate?: (model: TModel, future: any, alias?: string) => void;
133
- };
134
- }
135
- /**
136
- * Singleton registry for declarative model bindings.
137
- *
138
- * Bindings must be registered before their corresponding `.model.json`
139
- * is processed by the declarative model factory.
140
- */
141
- declare class ModelBindingRegistry {
142
- private static _instance;
143
- private bindings;
144
- static getInstance(): ModelBindingRegistry;
145
- /**
146
- * Register bindings for a model type.
147
- *
148
- * Returns a branded type handle that carries the model type key and
149
- * binding shape for use with `DeclarativeModel<typeof registration>`.
150
- * The return value has no runtime content — it exists purely for type inference.
151
- *
152
- * @param modelTypeId - The model type identifier matching `model.modelTypeId` in JSON.
153
- * @param binding - The binding registration.
154
- * @returns A branded type handle for use with `DeclarativeModel`.
155
- */
156
- register<K extends string, B extends ModelBindingRegistration<BasePropsFor<K>>>(modelTypeId: K, binding: B): RegisteredBinding<K, B>;
157
- /**
158
- * Retrieve bindings for a model type.
159
- *
160
- * @param modelTypeId - The model type identifier.
161
- * @returns The binding registration, or undefined if none registered.
162
- */
163
- get(modelTypeId: string): ModelBindingRegistration | undefined;
164
- /**
165
- * Check if bindings exist for a model type.
166
- */
167
- has(modelTypeId: string): boolean;
168
- /**
169
- * Remove bindings for a model type. Primarily for testing.
170
- */
171
- remove(modelTypeId: string): boolean;
172
- /**
173
- * Clear all registered bindings. Primarily for testing.
174
- */
175
- clear(): void;
176
- }
177
- /**
178
- * Singleton instance of the model binding registry.
179
- *
180
- * Use this to register and retrieve bindings for declarative models:
181
- *
182
- * ```typescript
183
- * import { modelBindings, type DeclarativeModel } from "@kosdev-code/kos-ui-sdk";
184
- *
185
- * const reg = modelBindings.register("my-model", { ... });
186
- * export type MyModel = DeclarativeModel<typeof reg>;
187
- * ```
188
- */
189
- export declare const modelBindings: ModelBindingRegistry;
190
- export {};
191
- //# sourceMappingURL=declarative-model-bindings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"declarative-model-bindings.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/declarative-model-bindings.ts"],"names":[],"mappings":"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"}
@@ -1,74 +0,0 @@
1
- /**
2
- * Auto-discovery and registration for declarative models.
3
- *
4
- * Provides `discoverAndRegisterModels()` which accepts glob results
5
- * from either Vite (`import.meta.glob`) or Webpack (`require.context`)
6
- * and auto-detects the format using UMD-style shape detection.
7
- *
8
- * ## Library-level usage (recommended)
9
- *
10
- * Model library packages export a registration function:
11
- *
12
- * ```typescript
13
- * // kos-ddk-models/src/declarative-registration.ts
14
- * import { discoverAndRegisterModels } from "@kosdev-code/kos-ui-sdk";
15
- *
16
- * const models = import.meta.glob("./lib/**\/*.model.json", { eager: true, import: "default" });
17
- * const bindings = import.meta.glob("./lib/**\/*.bindings.ts", { eager: true });
18
- *
19
- * export function registerDeclarativeDDKModels() {
20
- * discoverAndRegisterModels({ models, bindings });
21
- * }
22
- * ```
23
- *
24
- * ## App-level usage
25
- *
26
- * ```typescript
27
- * // Vite app
28
- * discoverAndRegisterModels({
29
- * models: import.meta.glob("./models/**\/*.model.json", { eager: true, import: "default" }),
30
- * bindings: import.meta.glob("./models/**\/*.bindings.ts", { eager: true }),
31
- * });
32
- *
33
- * // Webpack app
34
- * discoverAndRegisterModels({
35
- * models: require.context("./models", true, /\.model\.json$/),
36
- * bindings: require.context("./models", true, /\.bindings\.ts$/),
37
- * });
38
- * ```
39
- */
40
- interface WebpackRequireContext {
41
- keys(): string[];
42
- (id: string): any;
43
- resolve(id: string): string;
44
- }
45
- type GlobRecord = Record<string, any>;
46
- /**
47
- * Configuration for `discoverAndRegisterModels()`.
48
- */
49
- export interface DiscoverModelsConfig {
50
- /**
51
- * Discovered model JSON files.
52
- * Accepts either Vite `import.meta.glob` result (plain object)
53
- * or Webpack `require.context` result (function with `.keys()`).
54
- */
55
- models: GlobRecord | WebpackRequireContext;
56
- /**
57
- * Discovered binding TypeScript files.
58
- * Accepts either Vite `import.meta.glob` result
59
- * or Webpack `require.context` result.
60
- */
61
- bindings?: GlobRecord | WebpackRequireContext;
62
- }
63
- /**
64
- * Discover and register declarative models from glob results.
65
- *
66
- * Auto-detects the bundler format (Vite or Webpack) and normalizes
67
- * the input. Bindings are executed first to ensure they are available
68
- * when model JSONs are processed.
69
- *
70
- * @param config - Glob results for models and bindings.
71
- */
72
- export declare function discoverAndRegisterModels(config: DiscoverModelsConfig): void;
73
- export {};
74
- //# sourceMappingURL=declarative-model-discovery.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"declarative-model-discovery.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/declarative-model-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAWH,UAAU,qBAAqB;IAC7B,IAAI,IAAI,MAAM,EAAE,CAAC;IACjB,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,CAAC;IAClB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAYD,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAqHtC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,MAAM,EAAE,UAAU,GAAG,qBAAqB,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,qBAAqB,CAAC;CAC/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAY5E"}
@@ -1,58 +0,0 @@
1
- import { DeclarativeLifecycle, DeclarativeModelConfig } from './types';
2
- import { KosModelRegistrationType } from '../registration/model-registration';
3
- import { IKosDataModel, KosCreationContext } from '../kosModel';
4
-
5
- export declare function toFrameworkLifecycle(lifecycle?: DeclarativeLifecycle): string;
6
- /** Return type of declarativeModel() - the proxied class with Registration. */
7
- export interface DeclarativeModelClass<T extends IKosDataModel = IKosDataModel, O extends object = Record<string, any>> {
8
- new (id: string, options: O, context: KosCreationContext): T;
9
- Registration: KosModelRegistrationType<T, O>;
10
- }
11
- /**
12
- * Registry of all declarative model classes created by `declarativeModel()`.
13
- *
14
- * Provides lookup by modelTypeId so that container bindings can resolve
15
- * child model Registrations without manually importing the child JSON.
16
- *
17
- * Lookups should be done lazily (at handler execution time, not at
18
- * registration time) to avoid ordering dependencies.
19
- *
20
- * @example
21
- * ```typescript
22
- * import { declarativeModelRegistry } from "@kosdev-code/kos-ui-sdk";
23
- *
24
- * // Inside a service handler (called at runtime, after all models are registered)
25
- * const ChildModel = declarativeModelRegistry.get("child-model-type");
26
- * const instance = ChildModel.Registration.instance(id).options(opts).build();
27
- * ```
28
- */
29
- export declare const declarativeModelRegistry: {
30
- /** Look up a declarative model class by its modelTypeId. */
31
- get(modelTypeId: string): DeclarativeModelClass | undefined;
32
- /** Check if a declarative model class exists for a given modelTypeId. */
33
- has(modelTypeId: string): boolean;
34
- /** Remove a model from the registry. Primarily for testing. */
35
- remove(modelTypeId: string): boolean;
36
- /** Clear all registered models. Primarily for testing. */
37
- clear(): void;
38
- };
39
- /**
40
- * Create a KOS model class from a declarative JSON configuration.
41
- *
42
- * The returned class has a `.Registration` property and is fully compatible
43
- * with the KOS model framework - it passes through the same `kosModel()`
44
- * decorator, constructor proxy, and MobX observability pipeline as
45
- * imperative models.
46
- *
47
- * @param config - Parsed JSON configuration from a `.model.json` file.
48
- * @returns A proxied model class with `.Registration`.
49
- *
50
- * @example
51
- * ```typescript
52
- * import config from "./beverage-model.model.json";
53
- * const BeverageModel = declarativeModel(config);
54
- * BeverageModel.Registration.register();
55
- * ```
56
- */
57
- export declare function declarativeModel<T extends IKosDataModel = IKosDataModel, O extends object = Record<string, any>>(config: DeclarativeModelConfig): DeclarativeModelClass<T, O>;
58
- //# sourceMappingURL=declarative-model-factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"declarative-model-factory.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/declarative-model-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAeH,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAGnF,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAmBjB,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAG7E;AAybD,+EAA+E;AAC/E,MAAM,WAAW,qBAAqB,CACpC,CAAC,SAAS,aAAa,GAAG,aAAa,EACvC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAEtC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,kBAAkB,GAAG,CAAC,CAAC;IAC7D,YAAY,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC9C;AAYD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB;IACnC,4DAA4D;qBAC3C,MAAM,GAAG,qBAAqB,GAAG,SAAS;IAI3D,yEAAyE;qBACxD,MAAM,GAAG,OAAO;IAIjC,+DAA+D;wBAC3C,MAAM,GAAG,OAAO;IAIpC,0DAA0D;aACjD,IAAI;CAGd,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAC9B,CAAC,SAAS,aAAa,GAAG,aAAa,EACvC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtC,MAAM,EAAE,sBAAsB,GAAG,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CA2C7D"}