@kosdev-code/kos-freestyle-sdk 2.1.17 → 2.1.19

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 (80) hide show
  1. package/extension-utils-BUUtrM-T.cjs +2 -0
  2. package/{extension-utils-BVDLwtKr.cjs.map → extension-utils-BUUtrM-T.cjs.map} +1 -1
  3. package/extension-utils-sj0P_x9E.js +220 -0
  4. package/{extension-utils-BE0Y1Zlv.js.map → extension-utils-sj0P_x9E.js.map} +1 -1
  5. package/freestyle-registration-manager-DSugLmqT.js +1739 -0
  6. package/freestyle-registration-manager-DSugLmqT.js.map +1 -0
  7. package/freestyle-registration-manager-rmrOsUZq.cjs +2 -0
  8. package/freestyle-registration-manager-rmrOsUZq.cjs.map +1 -0
  9. package/index.cjs +1 -1
  10. package/index.js +34 -27
  11. package/models/models/carb-agitator/carb-agitator-model.d.ts +38 -6
  12. package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -1
  13. package/models/models/carb-agitator/index.d.ts +1 -1
  14. package/models/models/carb-agitator/index.d.ts.map +1 -1
  15. package/models/models/carb-agitator/services/carb-tank-services.d.ts +4 -0
  16. package/models/models/carb-agitator/services/carb-tank-services.d.ts.map +1 -0
  17. package/models/models/carb-agitator/types/index.d.ts +1 -8
  18. package/models/models/cgp-pump/cgp-pump-model.d.ts +24 -0
  19. package/models/models/cgp-pump/cgp-pump-model.d.ts.map +1 -0
  20. package/models/models/cgp-pump/index.d.ts +4 -0
  21. package/models/models/cgp-pump/index.d.ts.map +1 -0
  22. package/models/models/cgp-pump/types/index.d.ts +5 -0
  23. package/models/models/fcm-pump/fcm-pump-model.d.ts +28 -0
  24. package/models/models/fcm-pump/fcm-pump-model.d.ts.map +1 -0
  25. package/models/models/{carb-agitator/carb-agitator-registration.d.ts → fcm-pump/fcm-pump-registration.d.ts} +23 -20
  26. package/models/models/fcm-pump/fcm-pump-registration.d.ts.map +1 -0
  27. package/models/models/fcm-pump/index.d.ts +5 -0
  28. package/models/models/fcm-pump/index.d.ts.map +1 -0
  29. package/models/models/fcm-pump/services/fcm-pump-services.d.ts +17 -0
  30. package/models/models/fcm-pump/services/fcm-pump-services.d.ts.map +1 -0
  31. package/models/models/fcm-pump/services/index.d.ts +2 -0
  32. package/models/models/fcm-pump/services/index.d.ts.map +1 -0
  33. package/models/models/fcm-pump/types/index.d.ts +5 -0
  34. package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts +4 -2
  35. package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts.map +1 -1
  36. package/models/models/index.d.ts +4 -0
  37. package/models/models/index.d.ts.map +1 -1
  38. package/models/models/lfcv-pump/index.d.ts +5 -0
  39. package/models/models/lfcv-pump/index.d.ts.map +1 -0
  40. package/models/models/lfcv-pump/lfcv-pump-model.d.ts +20 -0
  41. package/models/models/lfcv-pump/lfcv-pump-model.d.ts.map +1 -0
  42. package/models/models/lfcv-pump/lfcv-pump-registration.d.ts +87 -0
  43. package/models/models/lfcv-pump/lfcv-pump-registration.d.ts.map +1 -0
  44. package/models/models/lfcv-pump/services/index.d.ts +2 -0
  45. package/models/models/lfcv-pump/services/index.d.ts.map +1 -0
  46. package/models/models/lfcv-pump/services/lfcv-pump-services.d.ts +10 -0
  47. package/models/models/lfcv-pump/services/lfcv-pump-services.d.ts.map +1 -0
  48. package/models/models/lfcv-pump/types/index.d.ts +5 -0
  49. package/models/models/spm-pump/index.d.ts +5 -0
  50. package/models/models/spm-pump/index.d.ts.map +1 -0
  51. package/models/models/spm-pump/services/index.d.ts +2 -0
  52. package/models/models/spm-pump/services/index.d.ts.map +1 -0
  53. package/models/models/spm-pump/services/spm-pump-services.d.ts +7 -0
  54. package/models/models/spm-pump/services/spm-pump-services.d.ts.map +1 -0
  55. package/models/models/spm-pump/spm-pump-model.d.ts +26 -0
  56. package/models/models/spm-pump/spm-pump-model.d.ts.map +1 -0
  57. package/models/models/spm-pump/spm-pump-registration.d.ts +87 -0
  58. package/models/models/spm-pump/spm-pump-registration.d.ts.map +1 -0
  59. package/models/models/spm-pump/types/index.d.ts +5 -0
  60. package/models/models/types/assembly.d.ts +7 -3
  61. package/models/models/types/assembly.d.ts.map +1 -1
  62. package/models/utils/extensions/assembly/assembly-data-mapper.d.ts +1 -5
  63. package/models/utils/extensions/assembly/assembly-data-mapper.d.ts.map +1 -1
  64. package/models/utils/freestyle-registration-manager.d.ts.map +1 -1
  65. package/models.cjs +1 -1
  66. package/models.js +27 -20
  67. package/package.json +2 -2
  68. package/ui.cjs +1 -1
  69. package/ui.js +2 -2
  70. package/{use-nutrition-info-DjIGT-mE.cjs → use-nutrition-info-DSdA_SRp.cjs} +2 -2
  71. package/{use-nutrition-info-DjIGT-mE.cjs.map → use-nutrition-info-DSdA_SRp.cjs.map} +1 -1
  72. package/{use-nutrition-info-CjXNGbCN.js → use-nutrition-info-DtcZs7dL.js} +5 -5
  73. package/{use-nutrition-info-CjXNGbCN.js.map → use-nutrition-info-DtcZs7dL.js.map} +1 -1
  74. package/extension-utils-BE0Y1Zlv.js +0 -201
  75. package/extension-utils-BVDLwtKr.cjs +0 -2
  76. package/freestyle-registration-manager-CDbljuRk.cjs +0 -2
  77. package/freestyle-registration-manager-CDbljuRk.cjs.map +0 -1
  78. package/freestyle-registration-manager-z0aYdMcC.js +0 -1069
  79. package/freestyle-registration-manager-z0aYdMcC.js.map +0 -1
  80. package/models/models/carb-agitator/carb-agitator-registration.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"freestyle-registration-manager-z0aYdMcC.js","sources":["../../../../packages/sdk/kos-freestyle-sdk/src/models/models/carb-agitator/carb-agitator-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/carb-agitator/carb-agitator-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/cartridge-agitator/cartridge-agitator-container-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/cartridge-agitator/services/cartridge-agitator-services.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/cartridge-agitator/cartridge-agitator-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/cartridge-agitator/cartridge-agitator-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/cartridge-agitator/cartridge-agitator-container-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-assembly/freestyle-assembly-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-assembly/freestyle-assembly-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/remote-tray/remote-tray-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/remote-tray/remote-tray-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/remote-tray/remote-tray-container-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/remote-tray/remote-tray-container-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-holder/freestyle-holder-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-holder/freestyle-holder-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-nozzle/services/freestyle-nozzle-services.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-nozzle/freestyle-nozzle-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-nozzle/freestyle-nozzle-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-pump/services/freestyle-pump-services.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-pump/freestyle-pump-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-pump/freestyle-pump-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/ice-agitator/services/ice-agitator-services.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/ice-agitator/ice-agitator-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/ice-agitator/ice-agitator-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/agitation-required-trouble/agitation-required-trouble-model.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/models/agitation-required-trouble/agitation-required-trouble-registration.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/assembly/assembly-data-mapper.ts","../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/freestyle-registration-manager.ts"],"sourcesContent":["import type {\n IKosDataModel,\n KosContextLogger,\n KosCreationContext,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { kosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport type { CarbAgitatorModel, CarbAgitatorOptions } from \"./types\";\n\nexport const MODEL_TYPE = \"carb-agitator-model\";\n\n@kosModel(MODEL_TYPE)\nexport class CarbAgitatorModelImpl implements CarbAgitatorModel, IKosDataModel {\n id: string;\n name: string;\n path: string;\n\n private logger: KosContextLogger;\n constructor(\n modelId: string,\n options: CarbAgitatorOptions,\n context: KosCreationContext\n ) {\n this.id = modelId;\n this.name = options.name;\n this.path = options.path;\n this.logger = context.logger;\n if (options) {\n // Assign options properties here.\n }\n }\n\n // -------------------LIFECYCLE----------------------------\n\n async init(): Promise<void> {\n this.logger.debug(`initializing carb-agitator ${this.id}`);\n }\n\n async load(): Promise<void> {\n this.logger.debug(`loading carb-agitator ${this.id}`);\n }\n}\n","import { KosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport { CarbAgitatorModelImpl, MODEL_TYPE } from \"./carb-agitator-model\";\nimport type { CarbAgitatorModel, CarbAgitatorOptions } from \"./types\";\n\n/**\n * # CarbAgitator\n *\n * The registration bean includes convenience methods for creating and working with CarbAgitatorModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: CarbAgitator.type, id: \"carbAgitatorId\"})\n * private carbAgitatorModel: CarbAgitatorModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new CarbAgitatorModel instances.\n *\n \n * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.\n *\n * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = CarbAgitator.factory(\"carbAgitatorId\")({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a CarbAgitatorModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (CarbAgitator.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to CarbAgitatorModel\n * // and the compiler will know that the model has the CarbAgitatorModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { CarbAgitator } from \"@kos-ui/kos-dispenser-model\";\n * ...\n * import { ExtensionManager, IKosRegistry } from \"@kosdev-code/kos-ui-sdk\";\n * export const kosModels: IKosRegistry[\"models\"] = {\n * ...CarbAgitator.registration,\n * };\n * ```\n *\n * ## registration.singleton\n \n * The carbAgitator model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.\n * If the factory function is called with an ID that already exists, the existing model will be returned.\n \n * */\n\nexport const CarbAgitator = new KosModelRegistrationFactory<\n CarbAgitatorModel,\n CarbAgitatorOptions\n>({\n class: CarbAgitatorModelImpl,\n type: MODEL_TYPE,\n});\n","import type {\n IKosDataModel,\n IKosIdentifiable,\n IKosModelContainer,\n IKosModelHolder,\n KosContextLogger,\n KosCreationContext,\n PublicModelInterface,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { kosChild, kosModel, KosModelContainer } from \"@kosdev-code/kos-ui-sdk\";\nimport type { CartridgeAgitatorModel } from \"./cartridge-agitator-model\";\nimport type { CartridgeAgitatorContainerOptions } from \"./types\";\n\nexport const MODEL_TYPE = \"cartridge-agitator-container-model\";\n\nexport type CartridgeAgitatorContainerModel =\n PublicModelInterface<CartridgeAgitatorContainerModelImpl>;\n\n@kosModel(MODEL_TYPE)\nexport class CartridgeAgitatorContainerModelImpl\n implements\n IKosIdentifiable,\n IKosModelHolder<CartridgeAgitatorModel>,\n IKosDataModel\n{\n id: string;\n private logger: KosContextLogger;\n @kosChild private _models: IKosModelContainer<CartridgeAgitatorModel>;\n constructor(\n modelId: string,\n options: CartridgeAgitatorContainerOptions,\n context: KosCreationContext\n ) {\n this.id = modelId;\n this.logger = context.logger;\n this._models = new KosModelContainer<CartridgeAgitatorModel>({\n parentId: modelId,\n });\n if (options) {\n // Assign options properties here.\n }\n }\n\n getModel(id: string) {\n return this._models.getModel(id);\n }\n get models() {\n return this._models;\n }\n get data() {\n return this._models.data;\n }\n\n addModel(model: CartridgeAgitatorModel) {\n this._models.addModel(model);\n }\n\n removeModel(id: string) {\n this._models.removeModel(id);\n }\n // -------------------LIFECYCLE----------------------------\n\n async init(): Promise<void> {\n this.logger.debug(\n `initializing cartridge-agitator-container container ${this.id}`\n );\n }\n\n async load(): Promise<void> {\n this.logger.debug(\n `loading cartridge-agitator-container container ${this.id}`\n );\n }\n}\n","import type {\n FutureResponse,\n KosServiceResponse,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { resolveServiceUrl, ServiceFactory } from \"@kosdev-code/kos-ui-sdk\";\n\nconst { URL } = resolveServiceUrl(\"CARTRIDGE_AGITATOR_SERVICE\");\nconst { postModel } = ServiceFactory.build({\n basePath: `${URL}/api/ext/freestyle/freestyle/ice`,\n});\n/**\n * @category Service\n * Retrieves the initial screen data.\n */\nexport const agitate = async (path: string, tracker: string) => {\n const response: KosServiceResponse<FutureResponse> | undefined =\n await postModel({\n model: {},\n tracker,\n urlOverride: `${URL}/api/handle/${path}/test`,\n });\n\n if (!response?.data) {\n throw new Error(\"No response from server\");\n }\n return response.data;\n};\n","/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */\nimport type {\n ExternalFutureInterface,\n IKosDataModel,\n IKosIdentifiable,\n KosFutureAwareFull,\n KosLoggerAware,\n KosStateProp,\n PublicModelInterface,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n createPropKey,\n EventBus,\n kosFuture,\n kosFutureAware,\n kosLoggerAware,\n kosModel,\n kosModelEffect,\n kosStateProp,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { agitate } from \"./services/cartridge-agitator-services\";\nimport type { CartridgeAgitatorOptions } from \"./types\";\n\nexport const MODEL_TYPE = \"cartridge-agitator-model\";\n\nexport type CartridgeAgitatorModel =\n PublicModelInterface<CartridgeAgitatorModelImpl> & ExternalFutureInterface;\n\nexport class CartridgeAgitatorEvents {\n static TOPIC_AGITATION_STARTED = \"/kos/events/ddk/agitation-started\";\n static TOPIC_AGITATION_ENDED = \"/kos/events/ddk/agitation-ended\";\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface CartridgeAgitatorModelImpl\n extends KosFutureAwareFull,\n KosLoggerAware {}\nconst PROP_PATH = createPropKey<CartridgeAgitatorModel>(\"statePath\");\n\n@kosModel(MODEL_TYPE)\n@kosFutureAware()\n@kosLoggerAware()\nexport class CartridgeAgitatorModelImpl\n implements IKosDataModel, IKosIdentifiable\n{\n id: string;\n @kosStateProp({ path: PROP_PATH, attribute: \"agitating\" })\n private agitating!: KosStateProp<boolean>;\n path: string;\n statePath: string;\n name: string;\n constructor(modelId: string, options: CartridgeAgitatorOptions) {\n this.id = modelId;\n\n this.path = options.path;\n this.name = options.name;\n this.statePath = options.statePath;\n }\n\n get isAgitating(): boolean {\n return !!this.agitating.value;\n }\n\n @kosFuture()\n async testAgitate(tracker?: string) {\n // should be handed in by the `kosFuture` decorator\n if (!tracker) {\n throw new Error(\"No tracker provided\");\n }\n\n this.logger.info(`agitating cartridge-agitator ${this.id}`);\n\n return agitate(this.path, tracker);\n }\n\n @kosModelEffect({\n dependencies: (model) => [model.isAgitating],\n })\n handleAgitation() {\n if (this.isAgitating) {\n this.logger.info(`agitating cartridge-agitator ${this.id}`);\n EventBus.publish(CartridgeAgitatorEvents.TOPIC_AGITATION_STARTED, {\n path: this.path,\n futureId: this.future?.futureId,\n });\n } else {\n EventBus.publish(CartridgeAgitatorEvents.TOPIC_AGITATION_ENDED, {\n path: this.path,\n });\n }\n }\n}\n","import { KosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n CartridgeAgitatorModel,\n CartridgeAgitatorModelImpl,\n MODEL_TYPE,\n} from \"./cartridge-agitator-model\";\nimport type { CartridgeAgitatorOptions } from \"./types\";\n\n/**\n * # CartridgeAgitator\n *\n * The registration bean includes convenience methods for creating and working with CartridgeAgitatorModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * import type { CartridgeAgitatorModel } from \"./cartridge-agitator-model\";\n * \n * @kosDependency({modelType: CartridgeAgitator.type, id: \"cartridgeAgitatorId\"})\n * private cartridgeAgitatorModel: CartridgeAgitatorModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new CartridgeAgitatorModel instances.\n *\n \n * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.\n *\n * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = CartridgeAgitator.factory(\"cartridgeAgitatorId\")({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a CartridgeAgitatorModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (CartridgeAgitator.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to CartridgeAgitatorModel\n * // and the compiler will know that the model has the CartridgeAgitatorModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { CartridgeAgitator } from \"@kos-ui/project-models\";\n * import { KosModelRegistry } from \"@kosdev-code/kos-dispense-sdk\";\n *\n * import { initKosProvider } from \"@kosdev-code/kos-ui-sdk\";\n *\n * KosModelRegistry.dispense\n * .models()\n * .model(CartridgeAgitator);\n * ```\n *\n * ## registration.singleton\n \n * The cartridgeAgitator model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.\n * If the factory function is called with an ID that already exists, the existing model will be returned.\n \n * */\nexport const CartridgeAgitator = new KosModelRegistrationFactory<\n CartridgeAgitatorModel,\n CartridgeAgitatorOptions\n>({\n class: CartridgeAgitatorModelImpl as any,\n type: MODEL_TYPE,\n});\n","import { SingletonKosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport type { CartridgeAgitatorContainerModel } from \"./cartridge-agitator-container-model\";\nimport {\n CartridgeAgitatorContainerModelImpl,\n MODEL_TYPE,\n} from \"./cartridge-agitator-container-model\";\nimport { CartridgeAgitator } from \"./cartridge-agitator-registration\";\nimport type { CartridgeAgitatorContainerOptions } from \"./types\";\n\n/**\n * # CartridgeAgitatorContainer\n *\n * The registration bean includes convenience methods for creating and working with CartridgeAgitatorContainerModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: CartridgeAgitatorContainer.type, id: \"cartridgeAgitatorContainerId\"})\n * private cartridgeAgitatorContainerModel: CartridgeAgitatorContainerModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new CartridgeAgitatorContainerModel instances.\n *\n \n * As this is a singleton model, the factory function accepts the model options as its argument.\n *\n * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = CartridgeAgitatorContainer.factory({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a CartridgeAgitatorContainerModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (CartridgeAgitatorContainer.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to CartridgeAgitatorContainerModel\n * // and the compiler will know that the model has the CartridgeAgitatorContainerModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { CartridgeAgitatorContainer } from \"@kosdev-code/kos-dispense-sdk\";\n * ...\n * import { ExtensionManager, IKosRegistry } from \"@kosdev-code/kos-ui-sdk\";\n * export const kosModels: IKosRegistry[\"models\"] = {\n * ...CartridgeAgitatorContainer.registration,\n * };\n * ```\n *\n * ## registration.singleton\n \n * The cartridgeAgitatorContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.\n * If the model does not yet exist, it will be created passing in the provided options to initialize it.\n *\n * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.\n \n * */\nexport const CartridgeAgitatorContainer =\n new SingletonKosModelRegistrationFactory<\n CartridgeAgitatorContainerModel,\n CartridgeAgitatorContainerOptions\n >({\n class: CartridgeAgitatorContainerModelImpl,\n type: MODEL_TYPE,\n });\n\nCartridgeAgitatorContainer.addRelatedModel(CartridgeAgitator);\n","import type {\n IKosDataModel,\n IKosIdentifiable,\n KosContextLogger,\n KosCreationContext,\n PublicModelInterface,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n kosChild,\n KosFeatureFlags,\n kosModel,\n kosParentAware,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport type { FreestyleAssemblyOptions } from \"./types\";\n\nimport {\n type AssemblyModel,\n type AssemblyOptions,\n type BoardModel,\n type HolderModel,\n type PumpModel,\n} from \"@kosdev-code/kos-dispense-sdk\";\nimport type { CarbAgitatorModel } from \"../carb-agitator\";\nimport {\n type CartridgeAgitatorContainerModel,\n type CartridgeAgitatorModel,\n} from \"../cartridge-agitator\";\nimport type { IceAgitatorModel } from \"../ice-agitator\";\nimport { type RemoteTrayContainerModel } from \"../remote-tray\";\nimport type {\n FreestyleHolderModelExt,\n FreestyleModelAssemblyExt,\n} from \"../types/assembly\";\n\nexport const MODEL_TYPE = \"freestyle-assembly-model\";\n\nexport const FEATURE_SUPPORTS_ICE = \"iceAgitator\";\nexport const FEATURE_SUPPORTS_CARB = \"carbAgitator\";\nexport const FEATURE_SUPPORTS_REMOTE_TRAYS = \"remoteTrays\";\n\nexport type FreestyleAssemblyModel =\n PublicModelInterface<FreestyleAssemblyModelImpl> &\n AssemblyModel<FreestyleModelAssemblyExt, FreestyleHolderModelExt>;\n\n@kosParentAware()\n@kosModel(MODEL_TYPE)\nexport class FreestyleAssemblyModelImpl\n implements\n IKosDataModel,\n IKosIdentifiable,\n AssemblyModel<FreestyleModelAssemblyExt, FreestyleHolderModelExt>\n{\n id: string;\n private logger: KosContextLogger;\n private assembly: AssemblyModel<\n FreestyleModelAssemblyExt,\n FreestyleHolderModelExt\n >;\n\n @kosChild\n private _remoteTrays!: RemoteTrayContainerModel;\n\n constructor(\n modelId: string,\n options: FreestyleAssemblyOptions,\n context: KosCreationContext\n ) {\n this.id = modelId;\n this.logger = context.logger;\n\n this.assembly = options.companionParent;\n\n if (options) {\n // Assign options properties here.\n }\n }\n get holderGroups(): string[] {\n return this.assembly.holderGroups;\n }\n get nozzlePaths(): string[] {\n return this.assembly.nozzlePaths;\n }\n get allHolders(): HolderModel<FreestyleHolderModelExt>[] {\n return this.assembly.allHolders;\n }\n getHoldersByGroup(group: string): HolderModel<FreestyleHolderModelExt>[] {\n return this.assembly.getHoldersByGroup(group);\n }\n getHoldersByNozzle(\n nozzlePath: string\n ): HolderModel<FreestyleHolderModelExt>[] {\n return this.assembly.getHoldersByNozzle(nozzlePath);\n }\n get pumpsByNozzle(): Record<string, PumpModel<any>[]> {\n return this.assembly.pumpsByNozzle;\n }\n get pumpPaths(): string[] {\n return this.assembly.pumpPaths;\n }\n\n get boards(): BoardModel<any>[] {\n return this.assembly.boards;\n }\n updateModel(options: AssemblyOptions): void {\n return this.assembly.updateModel(options);\n }\n get iceAgitator(): IceAgitatorModel {\n return this.assembly.iceAgitator;\n }\n get carbAgitator(): CarbAgitatorModel {\n return this.assembly.carbAgitator;\n }\n\n get cartridgeAgitators(): CartridgeAgitatorContainerModel {\n return this.assembly.cartridgeAgitators;\n }\n\n get defaultCartridgeAgitator(): CartridgeAgitatorModel {\n return this.assembly.cartridgeAgitators.data[0];\n }\n get cartridgeAgitatorModels(): CartridgeAgitatorModel[] {\n return this.assembly.cartridgeAgitators.data;\n }\n\n get hasCartridgeAgitators(): boolean {\n return this.assembly.cartridgeAgitators.data.length > 0;\n }\n\n get remoteTrays(): RemoteTrayContainerModel {\n return this.assembly.remoteTrays;\n }\n\n get hasRemoteTrays(): boolean {\n return this.assembly.remoteTrays\n ? this.assembly.remoteTrays.data.length > 0\n : false;\n }\n\n // -------------------LIFECYCLE----------------------------\n\n get supportsRemoteTrays(): boolean {\n return KosFeatureFlags.isFeatureEnabled(FEATURE_SUPPORTS_REMOTE_TRAYS);\n }\n get supportsIce() {\n return KosFeatureFlags.isFeatureEnabled(FEATURE_SUPPORTS_ICE);\n }\n\n get supportsCarb() {\n return KosFeatureFlags.isFeatureEnabled(FEATURE_SUPPORTS_CARB);\n }\n\n async init(): Promise<void> {\n this.logger.debug(`initializing freestyle-assembly ${this.id}`);\n }\n}\n","import { SingletonKosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport type { FreestyleAssemblyModel } from \"./freestyle-assembly-model\";\nimport {\n FreestyleAssemblyModelImpl,\n MODEL_TYPE,\n} from \"./freestyle-assembly-model\";\nimport type { FreestyleAssemblyOptions } from \"./types\";\n\n/**\n * # FreestyleAssembly\n *\n * The registration bean includes convenience methods for creating and working with FreestyleAssemblyModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: FreestyleAssembly.type, id: \"freestyleAssemblyId\"})\n * private freestyleAssemblyModel: FreestyleAssemblyModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new FreestyleAssemblyModel instances.\n *\n \n * As this is a singleton model, the factory function accepts the model options as its argument.\n *\n * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = FreestyleAssembly.factory({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a FreestyleAssemblyModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (FreestyleAssembly.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to FreestyleAssemblyModel\n * // and the compiler will know that the model has the FreestyleAssemblyModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { FreestyleAssembly } from \"@kos-ui/project-models\";\n * import { KosModelRegistry } from \"@kosdev-code/kos-dispense-sdk\";\n *\n * import { initKosProvider } from \"@kosdev-code/kos-ui-sdk\";\n *\n * KosModelRegistry.dispense\n * .models()\n * .model(FreestyleAssembly);\n * ```\n *\n * ## registration.singleton\n \n * The freestyleAssembly model is a singleton model. This means that each time the factory function is called , the same instance will be returned.\n * If the model does not yet exist, it will be created passing in the provided options to initialize it.\n *\n * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.\n \n * */\nexport const FreestyleAssembly = new SingletonKosModelRegistrationFactory<\n FreestyleAssemblyModel,\n FreestyleAssemblyOptions\n>({\n class: FreestyleAssemblyModelImpl,\n type: MODEL_TYPE,\n});\n","import type {\n IKosDataModel,\n IKosIdentifiable,\n KosConfigProperty,\n KosContextLogger,\n KosCreationContext,\n PublicModelInterface,\n TroubleAware,\n TroubleModel,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n createPropKey,\n getKosModelSync,\n kosConfigProperty,\n kosModel,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport type { ActiveAware } from \"../types/assembly\";\nimport type { RemoteTrayOptions } from \"./types\";\n\nexport const MODEL_TYPE = \"remote-tray-model\";\n\n/**\n * Model for managing remote tray configurations in the KOS Freestyle system.\n *\n * A remote tray represents a physical or virtual tray that can be enabled/disabled\n * remotely and is associated with a holder in the dispensing system. This model\n * manages the tray's configuration, activation state, and trouble propagation\n * from its associated holder.\n *\n * ## Key Features\n * - Remote enable/disable capability through configuration properties\n * - Automatic trouble propagation from associated holder\n * - Active state management based on configuration\n * - Integration with the KOS dispensing system through holder references\n *\n * ## Properties\n * - `id` - Unique identifier for the remote tray\n * - `name` - Display name of the tray\n * - `holderPath` - Path reference to the associated holder model\n * - `configPath` - Configuration path for tray settings\n * - `remoteTrayEnabled` - Configuration property controlling tray activation\n * - `active` - Computed property indicating if the tray is currently active\n * - `holder` - Reference to the associated holder model\n * - `troubles` - Propagated troubles from the associated holder\n *\n * ## Methods\n * - `updateModel(options)` - Updates the model with new configuration options\n * - `init()` - Initializes the remote tray model\n * - `load()` - Loads the remote tray configuration and data\n *\n * @example\n * ```typescript\n * // Create a new remote tray instance\n * const remoteTray = RemoteTray.instance('tray-1')\n * .options({\n * name: 'Remote Tray 1',\n * holderPath: '/holders/holder-1',\n * configPath: '/config/trays/tray-1'\n * })\n * .build();\n *\n * // Check if tray is active\n * if (remoteTray.active) {\n * console.log(`${remoteTray.name} is enabled`);\n * }\n *\n * // Access associated holder\n * const holder = remoteTray.holder;\n * console.log(`Holder status: ${holder?.status}`);\n * ```\n *\n * @example\n * ```typescript\n * // Monitor trouble states\n * const TrayStatus = ({ tray }: { tray: RemoteTrayModel }) => {\n * const troubles = tray.troubles;\n * const isEnabled = tray.remoteTrayEnabled.value;\n *\n * return (\n * <div>\n * <h3>{tray.name}</h3>\n * <p>Status: {isEnabled ? 'Enabled' : 'Disabled'}</p>\n * {troubles.length > 0 && (\n * <Alert severity=\"warning\">\n * {troubles.length} issue(s) detected\n * </Alert>\n * )}\n * </div>\n * );\n * };\n * ```\n *\n * @example\n * ```typescript\n * // Programmatically enable/disable tray\n * async function toggleRemoteTray(tray: RemoteTrayModel) {\n * const currentState = tray.remoteTrayEnabled.value;\n * await tray.remoteTrayEnabled.setValue(!currentState);\n *\n * console.log(`Tray ${tray.name} is now ${!currentState ? 'enabled' : 'disabled'}`);\n * }\n * ```\n *\n * @category KOS Model\n * @subcategory Freestyle Models\n *\n * @see {@link HolderModel} - The associated holder model\n * @see {@link ActiveAware} - Interface for active state management\n * @see {@link TroubleAware} - Interface for trouble tracking\n */\nexport type RemoteTrayModel = PublicModelInterface<RemoteTrayModelImpl>;\n\nconst PROP_HOLDER_PATH = createPropKey<RemoteTrayModel>(\"holderPath\");\nconst PROP_CONFIG_PATH = createPropKey<RemoteTrayModel>(\"configPath\");\n\n/**\n * Implementation class for RemoteTrayModel.\n *\n * @internal\n * @category KOS Model\n * @subcategory Freestyle Models\n */\n@kosModel(MODEL_TYPE)\nexport class RemoteTrayModelImpl\n implements IKosDataModel, IKosIdentifiable, ActiveAware, TroubleAware\n{\n /** Unique identifier for the remote tray instance */\n id: string;\n private logger: KosContextLogger;\n\n /** Path reference to the associated holder model */\n holderPath: string;\n /** Configuration path for tray-specific settings */\n configPath: string;\n /** Display name of the remote tray */\n name: string;\n /** Configuration property that controls whether the tray is enabled remotely */\n @kosConfigProperty({\n path: PROP_CONFIG_PATH,\n attribute: \"enabled\",\n })\n remoteTrayEnabled!: KosConfigProperty<boolean>;\n\n constructor(\n modelId: string,\n options: RemoteTrayOptions,\n context: KosCreationContext\n ) {\n this.id = modelId;\n this.logger = context.logger;\n\n this.holderPath = options.holderPath;\n this.configPath = options.configPath;\n this.name = options.name;\n }\n\n /**\n * Gets the troubles from the associated holder model.\n * Propagates trouble states from the holder to this remote tray.\n *\n * @returns Array of trouble models from the holder, or empty array if no holder\n */\n get troubles(): TroubleModel<any>[] {\n return this.holder?.troubles ?? [];\n }\n\n /**\n * Gets the highest priority trouble status.\n * Currently returns empty string as troubles are managed by the holder.\n *\n * @returns Empty string (trouble status handled by holder)\n */\n get troubleStatus() {\n return \"\";\n }\n\n /**\n * Gets troubles grouped by type from the associated holder.\n *\n * @returns Record of troubles grouped by type from the holder, or empty object if no holder\n */\n get troublesByType() {\n return this.holder?.troublesByType ?? {};\n }\n\n /**\n * Updates the model with new configuration options.\n * Can be used to modify the holder path, config path, or name after initialization.\n *\n * @param _options - New configuration options for the remote tray\n */\n updateModel(_options: RemoteTrayOptions): void {\n // Update model properties here.\n }\n\n /**\n * Gets the associated holder model for this remote tray.\n * Uses synchronous model lookup to retrieve the holder by path.\n *\n * @returns The HolderModel instance referenced by holderPath, or undefined if not found\n */\n get holder() {\n return getKosModelSync<HolderModel>(this.holderPath).model;\n }\n\n /**\n * Determines if the remote tray is currently active.\n * Active state is based on the remoteTrayEnabled configuration property.\n *\n * @returns true if the tray is enabled, false otherwise\n */\n get active(): boolean {\n return !!this.remoteTrayEnabled.value;\n }\n\n // -------------------LIFECYCLE----------------------------\n\n /**\n * Initializes the remote tray model.\n * Called during the model lifecycle initialization phase.\n * Sets up initial state and prepares the model for use.\n *\n * @returns Promise that resolves when initialization is complete\n */\n async init(): Promise<void> {\n this.logger.debug(`initializing remote-tray ${this.id}`);\n }\n\n /**\n * Loads the remote tray configuration and associated data.\n * Called during the model lifecycle load phase.\n * Typically loads configuration settings and establishes holder references.\n *\n * @returns Promise that resolves when loading is complete\n */\n async load(): Promise<void> {\n this.logger.debug(`loading remote-tray ${this.id}`);\n }\n}\n","import { KosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport type { RemoteTrayOptions } from \"./types\";\nimport {\n RemoteTrayModelImpl,\n MODEL_TYPE,\n RemoteTrayModel,\n} from \"./remote-tray-model\";\n\n/**\n * # RemoteTray\n *\n * The registration bean includes convenience methods for creating and working with RemoteTrayModel instances.\n\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: RemoteTray.type, id: \"remoteTrayId\"})\n * private remoteTrayModel: RemoteTrayModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new RemoteTrayModel instances.\n *\n \n * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.\n *\n * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = RemoteTray.factory(\"remoteTrayId\")({\n * // Add option data\n * });\n\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a RemoteTrayModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (RemoteTray.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to RemoteTrayModel\n * // and the compiler will know that the model has the RemoteTrayModel interface\n * model.updateAvailability(false);\n\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { RemoteTray } from \"@kos-ui/project-models\";\n * import { KosModelRegistry } from \"@kosdev-code/kos-dispense-sdk\";\n *\n * import { initKosProvider } from \"@kosdev-code/kos-ui-sdk\";\n *\n * KosModelRegistry.dispense\n * .models()\n * .model(RemoteTray);\n * ```\n *\n * ## registration.singleton\n \n * The remoteTray model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.\n * If the factory function is called with an ID that already exists, the existing model will be returned.\n \n * */\nexport const RemoteTray = new KosModelRegistrationFactory<\n RemoteTrayModel,\n RemoteTrayOptions\n>({\n class: RemoteTrayModelImpl,\n type: MODEL_TYPE,\n});\n","/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */\nimport type {\n IKosDataModel,\n IKosIdentifiable,\n KosContainerAware,\n PublicModelInterface,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n kosContainerAware,\n kosLoggerAware,\n kosModel,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport type { RemoteTrayModel } from \"./remote-tray-model\";\n\nexport const MODEL_TYPE = \"remote-tray-container-model\";\n\nexport type RemoteTrayContainerModel =\n PublicModelInterface<RemoteTrayContainerModelImpl>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface RemoteTrayContainerModelImpl\n extends KosContainerAware<RemoteTrayModel> {}\n@kosModel(MODEL_TYPE)\n@kosLoggerAware()\n@kosContainerAware()\nexport class RemoteTrayContainerModelImpl\n implements IKosIdentifiable, IKosDataModel\n{\n id: string;\n\n constructor(modelId: string) {\n this.id = modelId;\n }\n}\n","import { SingletonKosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport type { RemoteTrayContainerOptions } from \"./types\";\nimport { RemoteTray } from \"./remote-tray-registration\";\nimport {\n RemoteTrayContainerModelImpl,\n MODEL_TYPE,\n} from \"./remote-tray-container-model\";\nimport type { RemoteTrayContainerModel } from \"./remote-tray-container-model\";\n\n/**\n * # RemoteTrayContainer\n *\n * The registration bean includes convenience methods for creating and working with RemoteTrayContainerModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: RemoteTrayContainer.type, id: \"remoteTrayContainerId\"})\n * private remoteTrayContainerModel: RemoteTrayContainerModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new RemoteTrayContainerModel instances.\n *\n \n * As this is a singleton model, the factory function accepts the model options as its argument.\n *\n * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = RemoteTrayContainer.factory({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a RemoteTrayContainerModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (RemoteTrayContainer.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to RemoteTrayContainerModel\n * // and the compiler will know that the model has the RemoteTrayContainerModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { RemoteTrayContainer } from \"@kosdev-code/kos-freestyle-sdk\";\n * ...\n * import { ExtensionManager, IKosRegistry } from \"@kosdev-code/kos-ui-sdk\";\n * export const kosModels: IKosRegistry[\"models\"] = {\n * ...RemoteTrayContainer.registration,\n * };\n * ```\n *\n * ## registration.singleton\n \n * The remoteTrayContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.\n * If the model does not yet exist, it will be created passing in the provided options to initialize it.\n *\n * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.\n \n * */\nexport const RemoteTrayContainer = new SingletonKosModelRegistrationFactory<\n RemoteTrayContainerModel,\n RemoteTrayContainerOptions\n>({\n class: RemoteTrayContainerModelImpl,\n type: MODEL_TYPE,\n});\n\nRemoteTrayContainer.addRelatedModel(RemoteTray);\n","import type {\n FutureContainer,\n FutureDelegate,\n FutureResponse,\n IFutureModel,\n IKosDataModel,\n IKosIdentifiable,\n KosContext,\n KosContextLogger,\n KosCreationContext,\n PublicModelInterface,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n FutureManager,\n getKosModelSync,\n KosContextManager,\n KosLog,\n kosModel,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport type { FreestyleHolderOptions } from \"./types\";\n\nimport type { HolderModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport type { FreestyleHolderExt } from \"../../utils/extensions/assembly/types\";\nimport type { CartridgeAgitatorModel } from \"../cartridge-agitator\";\nimport {\n FreestyleAssembly,\n type FreestyleAssemblyModel,\n} from \"../freestyle-assembly\";\nimport { RemoteTray, type RemoteTrayModel } from \"../remote-tray\";\n\nexport const MODEL_TYPE = \"freestyle-holder-model\";\ntype MethodsReturningType<T, ReturnType> = {\n [K in keyof T]: T[K] extends (...args: any[]) => ReturnType ? K : never;\n}[keyof T];\n\ntype FutureDelegateType = MethodsReturningType<\n CartridgeAgitatorModel,\n Promise<FutureResponse>\n>;\n\nfunction resolveFreestyleAssembly(\n id: string\n): FreestyleAssemblyModel | undefined {\n const context = KosContextManager.getContext(id);\n const freestyleAssembly: FreestyleAssemblyModel = context?.get(\n FreestyleAssembly.type\n );\n if (!freestyleAssembly) {\n KosLog.error(\"Freestyle assembly not found\");\n return undefined;\n }\n return freestyleAssembly;\n}\nasync function futureDelegate(\n model?: FutureContainer,\n method?: FutureDelegateType\n): Promise<IFutureModel | undefined> {\n if (!model || !method) {\n return undefined;\n }\n const response = (await model[method]()) as FutureResponse;\n if (response?.tracker) {\n return FutureManager.getFuture(response.tracker);\n }\n return undefined;\n}\nexport const freestyleHolderFactory = (holder: HolderModel) => {\n if (holder.data.agitated) {\n return MODEL_TYPE;\n }\n return undefined;\n};\nexport type FreestyleHolderModel =\n PublicModelInterface<FreestyleHolderModelImpl>;\n\n@kosModel(MODEL_TYPE)\nexport class FreestyleHolderModelImpl\n implements IKosDataModel, IKosIdentifiable, FutureDelegate\n{\n id: string;\n private logger: KosContextLogger;\n private holder: HolderModel<FreestyleHolderExt>;\n private context: KosContext;\n\n future?: IFutureModel;\n constructor(\n modelId: string,\n options: FreestyleHolderOptions,\n context: KosCreationContext\n ) {\n this.id = modelId;\n this.logger = context.logger;\n this.context = context.kosContext;\n this.holder = options.companionParent;\n }\n\n get agitated() {\n return this.holder.data.agitated;\n }\n async agitate() {\n if (!this.holder.data.agitated) {\n return undefined;\n }\n this.future = undefined;\n const freestyleAssembly = resolveFreestyleAssembly(this.id);\n\n if (!freestyleAssembly) {\n return undefined;\n }\n const agitator = freestyleAssembly.defaultCartridgeAgitator;\n if (!agitator) {\n this.logger.error(\"Agitator not found\");\n return undefined;\n }\n this.future = await futureDelegate(\n freestyleAssembly.defaultCartridgeAgitator,\n \"testAgitate\"\n );\n\n return this.future;\n }\n\n get isRemote(): boolean {\n const remoteTrayId = `${RemoteTray.type}-${this.holder.path}`;\n const remoteTray = getKosModelSync<RemoteTrayModel>(remoteTrayId);\n if (!remoteTray?.model) {\n return false;\n }\n return !!remoteTray.model.remoteTrayEnabled.value;\n }\n\n // -------------------LIFECYCLE----------------------------\n\n async init(): Promise<void> {\n this.logger.debug(`initializing freestyle-holder ${this.id}`);\n }\n\n async load(): Promise<void> {\n this.logger.debug(`loading freestyle-holder ${this.id}`);\n }\n}\n","import { KosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport type { FreestyleHolderModel } from \"./freestyle-holder-model\";\nimport { FreestyleHolderModelImpl, MODEL_TYPE } from \"./freestyle-holder-model\";\nimport type { FreestyleHolderOptions } from \"./types\";\n\n/**\n * # FreestyleHolder\n *\n * The registration bean includes convenience methods for creating and working with FreestyleHolderModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: FreestyleHolder.type, id: \"freestyleHolderId\"})\n * private freestyleHolderModel: FreestyleHolderModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new FreestyleHolderModel instances.\n *\n \n * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.\n *\n * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = FreestyleHolder.factory(\"freestyleHolderId\")({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a FreestyleHolderModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (FreestyleHolder.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to FreestyleHolderModel\n * // and the compiler will know that the model has the FreestyleHolderModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { FreestyleHolder } from \"@kos-ui/project-models\";\n * import { KosModelRegistry } from \"@kosdev-code/kos-dispense-sdk\";\n *\n * import { initKosProvider } from \"@kosdev-code/kos-ui-sdk\";\n *\n * KosModelRegistry.dispense\n * .models()\n * .model(FreestyleHolder);\n * ```\n *\n * ## registration.singleton\n \n * The freestyleHolder model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.\n * If the factory function is called with an ID that already exists, the existing model will be returned.\n \n * */\nexport const FreestyleHolder = new KosModelRegistrationFactory<\n FreestyleHolderModel,\n FreestyleHolderOptions\n>({\n class: FreestyleHolderModelImpl,\n type: MODEL_TYPE,\n});\n","import {\n KosLog,\n ServiceFactory,\n resolveServiceUrl,\n} from \"@kosdev-code/kos-ui-sdk\";\nconst { URL } = resolveServiceUrl(\"FREESTYLE-NOZZLE_SERVICE\");\nconst { getOne } = ServiceFactory.build({\n basePath: `${URL}/api/freestyle-nozzle`,\n});\n\nconst log = KosLog.createLogger({\n name: \"freestyle-nozzle-service\",\n group: \"Services\",\n});\n\ninterface NutritionValue {\n displayValue: string;\n units: string;\n type: string;\n}\ninterface NutritionVolume {\n volume: number;\n values: NutritionValue[];\n}\nexport interface FreestyleNutritionInfoResponse {\n labels?: {\n allergens: string;\n legalDescriptor: string;\n ingredients: string;\n ingredientsHeading: string;\n };\n volumes: NutritionVolume[];\n error?: string;\n}\n\nexport class NutritionInfoError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"NutritionInfoError\";\n }\n}\n\nexport class InvalidRequestError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"InvalidRequestError\";\n }\n}\n/**\n * @category Service\n * Retrieves the initial freestyle-nozzle data.\n */\nexport const getFreestyleNutritionInfo = async (\n nozzleUrlPrefix: string,\n beverageId: string,\n volumes: number[],\n baseUrl = \"http://localhost:8081\"\n) => {\n log.debug(\"sending GET for freestyle-nozzle\");\n\n if (!beverageId) {\n log.error(\"Invalid freestyle-nozzle request: beverageId is required\");\n throw new InvalidRequestError(\"No beverageId provided\");\n }\n\n if (!volumes || volumes.length === 0) {\n log.error(\"Invalid freestyle-nozzle request: volumes are required\");\n throw new InvalidRequestError(\"No volumes provided\");\n }\n const response = await getOne<FreestyleNutritionInfoResponse>({\n urlOverride: `${baseUrl}${nozzleUrlPrefix}/pipeline/beverage/engine/nutrition/${beverageId}?volumes=${volumes.join(\n \",\"\n )}`,\n });\n\n if (!response?.data) {\n log.error(\"Failed to retrieve freestyle-nozzle data\");\n throw new Error(\"Failed to retrieve freestyle-nozzle data\");\n }\n\n if (response.data.error) {\n throw new NutritionInfoError(response.data.error);\n }\n\n return response.data;\n};\n","import type { NozzleModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport type {\n IKosDataModel,\n IKosIdentifiable,\n KosContextLogger,\n KosCreationContext,\n PublicModelInterface,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n kosAction,\n kosModel,\n kosModelEffect,\n kosParentAware,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nimport {\n getFreestyleNutritionInfo,\n type FreestyleNutritionInfoResponse,\n} from \"./services\";\nimport type { FreestyleNozzleOptions } from \"./types\";\n\nexport const MODEL_TYPE = \"freestyle-nozzle-model\";\n\nexport type FreestyleNozzleModel =\n PublicModelInterface<FreestyleNozzleModelImpl>;\n\n@kosParentAware()\n@kosModel(MODEL_TYPE)\nexport class FreestyleNozzleModelImpl\n implements IKosDataModel, IKosIdentifiable\n{\n id: string;\n private logger: KosContextLogger;\n private nozzleModel: NozzleModel;\n private _cupSizes: number[];\n private _nutritionInfo?: FreestyleNutritionInfoResponse;\n constructor(\n modelId: string,\n options: FreestyleNozzleOptions,\n context: KosCreationContext\n ) {\n this.id = modelId;\n this.logger = context.logger;\n this.nozzleModel = options.companionParent;\n this._cupSizes = [100];\n }\n\n set cupSizes(cupSizes: number[]) {\n this._cupSizes = cupSizes;\n }\n get nutritionInfo() {\n return this._nutritionInfo;\n }\n\n get selectedPourable() {\n return this.nozzleModel.selectedPourable;\n }\n\n @kosModelEffect({\n dependencies: (model: FreestyleNozzleModel) => [\n model.selectedPourable.beverage,\n ],\n })\n async handleBeverageSelection() {\n if (this.nozzleModel.selectedPourable.beverage && this._cupSizes.length) {\n this.logger.debug(\n `selected beverage: ${\n this.nozzleModel.selectedPourable.beverage.rawId\n }. Volume: ${this._cupSizes.join(\", \")}`\n );\n const beverageId = this.nozzleModel.selectedPourable.beverage.rawId;\n const prefix = this.nozzleModel.urlPrefix;\n try {\n const response = await getFreestyleNutritionInfo(\n prefix,\n beverageId,\n this._cupSizes\n );\n kosAction(() => {\n this._nutritionInfo = response;\n });\n } catch (error) {\n this.logger.error(`Error fetching nutrition info: ${error}`);\n }\n }\n }\n\n // -------------------LIFECYCLE----------------------------\n\n async init(): Promise<void> {\n this.logger.debug(`initializing freestyle-nozzle ${this.id}`);\n }\n\n unload(): void {\n this.logger.debug(`unloading freestyle-nozzle ${this.id}`);\n }\n async load(): Promise<void> {\n this.logger.debug(`loading freestyle-nozzle ${this.id}`);\n }\n}\n","import { KosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport type { FreestyleNozzleModel } from \"./freestyle-nozzle-model\";\nimport { FreestyleNozzleModelImpl, MODEL_TYPE } from \"./freestyle-nozzle-model\";\nimport type { FreestyleNozzleOptions } from \"./types\";\n\n/**\n * # FreestyleNozzle\n *\n * The registration bean includes convenience methods for creating and working with FreestyleNozzleModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: FreestyleNozzle.type, id: \"freestyleNozzleId\"})\n * private freestyleNozzleModel: FreestyleNozzleModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new FreestyleNozzleModel instances.\n *\n \n * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.\n *\n * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = FreestyleNozzle.factory(\"freestyleNozzleId\")({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a FreestyleNozzleModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (FreestyleNozzle.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to FreestyleNozzleModel\n * // and the compiler will know that the model has the FreestyleNozzleModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { FreestyleNozzle } from \"@kos-ui/project-models\";\n * import { KosModelRegistry } from \"@kosdev-code/kos-dispense-sdk\";\n *\n * import { initKosProvider } from \"@kosdev-code/kos-ui-sdk\";\n *\n * KosModelRegistry.dispense\n * .models()\n * .model(FreestyleNozzle);\n * ```\n *\n * ## registration.singleton\n \n * The freestyleNozzle model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.\n * If the factory function is called with an ID that already exists, the existing model will be returned.\n \n * */\nexport const FreestyleNozzle = new KosModelRegistrationFactory<\n FreestyleNozzleModel,\n FreestyleNozzleOptions\n>({\n class: FreestyleNozzleModelImpl,\n type: MODEL_TYPE,\n});\n","import {\n FetchError,\n KosLog,\n ServiceFactory,\n resolveServiceUrl,\n} from \"@kosdev-code/kos-ui-sdk\";\nconst { URL } = resolveServiceUrl(\"PUMP_SERVICE\");\nconst { postModel } = ServiceFactory.build({\n basePath: `${URL}/api/ext/freestyle/microCalibration`,\n});\n\nconst log = KosLog.createLogger({\n name: \"freestyle-pump-service\",\n group: \"Services\",\n});\nexport type ReplacePumpErrorType = \"unknownError\" | undefined;\nexport type ReplacePumpData = {\n error?: ReplacePumpErrorType;\n};\nexport type ReplacePumpResponse = [\n ReplacePumpErrorType | undefined,\n ReplacePumpData\n];\nexport const replacePump = async (\n pumpId: string,\n code: string\n): Promise<ReplacePumpResponse> => {\n log.debug(\n `replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${pumpId}/code/${code}`\n );\n\n try {\n const response = await postModel({\n model: {},\n urlOverride: `${URL}/api/ext/freestyle/microCalibration/cal/${pumpId}/code/${code}`,\n });\n\n log.debug(\"replacePump - response:\", response);\n\n if (\n (response?.status === 200 || response?.status === 499) &&\n response.data?.error\n ) {\n return [response.data.error || \"unknownError\", response.data];\n }\n\n return [undefined, response?.data];\n } catch (error) {\n log.error(\n `replacePump - sending POST request to /api/cal/${pumpId}/code/${code}`,\n error\n );\n\n if (error instanceof FetchError) {\n const errorCode =\n error.payload?.data?.error || error.payload?.error || \"unknownError\";\n\n return [errorCode, error.payload?.data || { error: errorCode }];\n }\n }\n\n return [\"unknownError\", { error: \"unknownError\" }];\n};\n","import type {\n IKosDataModel,\n IKosIdentifiable,\n KosContextLogger,\n KosCreationContext,\n PublicModelInterface,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { kosModel } from \"@kosdev-code/kos-ui-sdk\";\nimport type { FreestylePumpOptions } from \"./types\";\n\nimport type { PumpModel } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n replacePump,\n type ReplacePumpData,\n type ReplacePumpErrorType,\n} from \"./services\";\n\nexport const MODEL_TYPE = \"freestyle-pump-model\";\n\nexport type FreestylePumpModel = PublicModelInterface<FreestylePumpModelImpl>;\n\n@kosModel(MODEL_TYPE)\nexport class FreestylePumpModelImpl implements IKosDataModel, IKosIdentifiable {\n id: string;\n private logger: KosContextLogger;\n private pump: PumpModel;\n constructor(\n modelId: string,\n options: FreestylePumpOptions,\n context: KosCreationContext\n ) {\n this.id = modelId;\n this.logger = context.logger;\n this.pump = options.companionParent;\n }\n\n // -------------------LIFECYCLE----------------------------\n\n async replacePump(\n code: string\n ): Promise<[ReplacePumpErrorType, ReplacePumpData]> {\n const [error, data] = await replacePump(this.pump.path, code);\n if (error) {\n this.logger.error(`Failed to replace the pump, ${this.pump.id}`, error);\n }\n\n return [error, data];\n }\n}\n","import { KosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport type { FreestylePumpModel } from \"./freestyle-pump-model\";\nimport { FreestylePumpModelImpl, MODEL_TYPE } from \"./freestyle-pump-model\";\nimport type { FreestylePumpOptions } from \"./types\";\n\n/**\n * # FreestylePump\n *\n * The registration bean includes convenience methods for creating and working with FreestylePumpModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: FreestylePump.type, id: \"freestylePumpId\"})\n * private freestylePumpModel: FreestylePumpModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new FreestylePumpModel instances.\n *\n \n * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.\n *\n * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = FreestylePump.factory(\"freestylePumpId\")({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a FreestylePumpModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (FreestylePump.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to FreestylePumpModel\n * // and the compiler will know that the model has the FreestylePumpModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { FreestylePump } from \"@kos-ui/project-models\";\n * import { KosModelRegistry } from \"@kosdev-code/kos-dispense-sdk\";\n *\n * import { initKosProvider } from \"@kosdev-code/kos-ui-sdk\";\n *\n * KosModelRegistry.dispense\n * .models()\n * .model(FreestylePump);\n * ```\n *\n * ## registration.singleton\n \n * The freestylePump model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.\n * If the factory function is called with an ID that already exists, the existing model will be returned.\n \n * */\nexport const FreestylePump = new KosModelRegistrationFactory<\n FreestylePumpModel,\n FreestylePumpOptions\n>({\n class: FreestylePumpModelImpl,\n type: MODEL_TYPE,\n});\n","import {\n KosLog,\n ServiceFactory,\n resolveServiceUrl,\n type FutureResponse,\n type KosServiceResponse,\n} from \"@kosdev-code/kos-ui-sdk\";\nconst { URL } = resolveServiceUrl(\"ICE_AGITATOR_SERVICE\");\nconst { getAll, postModel } = ServiceFactory.build({\n basePath: `${URL}/api/ext/freestyle/ice`,\n});\n\nconst log = KosLog.createLogger({\n name: \"ice-agitator-service\",\n group: \"Services\",\n});\n\n/**\n * @category Service\n * Retrieves the initial dispenser data.\n */\nexport const getIceTypes = async (path: string) => {\n log.debug(\"sending GET for ice types\");\n const response = await getAll<string>({\n urlOverride: `${URL}/api/handle/${path}/types`,\n });\n return response;\n};\n\nexport const updateIceType = async (agitator: string, type: string) => {\n log.debug(\"sending POST for ice types\");\n const response = await postModel({\n urlOverride: `${URL}/api/handle/${agitator}/type/${type}`,\n model: {},\n });\n return response;\n};\n\nexport const resetIceSetting = async (path: string) => {\n const response = await getAll({\n urlOverride: `${URL}/api/kos/config/details/${path}/4`,\n });\n return response;\n};\n\nexport const pour = async (path: string, tracker: string) => {\n const response: KosServiceResponse<FutureResponse> | undefined =\n await postModel({\n model: {},\n tracker,\n urlOverride: `${URL}/api/handle/${path}/pour`,\n });\n\n if (!response?.data) {\n throw new Error(\"No response from server\");\n }\n return response?.data as FutureResponse;\n};\n\nexport const agitate = async (path: string, tracker: string) => {\n const response: KosServiceResponse<FutureResponse> | undefined =\n await postModel({\n model: {},\n tracker,\n urlOverride: `${URL}/api/handle/${path}/test/agitation`,\n });\n\n if (!response?.data) {\n throw new Error(\"No response from server\");\n }\n return response?.data as FutureResponse;\n};\n\nexport const testGate = async (path: string, tracker: string) => {\n const response: KosServiceResponse<FutureResponse> | undefined =\n await postModel({\n model: {},\n tracker,\n urlOverride: `${URL}/api/handle/${path}/test/gate`,\n });\n\n if (!response?.data) {\n throw new Error(\"No response from server\");\n }\n return response?.data as FutureResponse;\n};\n","/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */\nimport type {\n IKosDataModel,\n KosConfigProperty,\n KosContextLogger,\n KosCreationContext,\n KosMultipleFutureAwareFull,\n KosStateProp,\n PublicModelInterface,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n createPropKey,\n EventBus,\n KOS_MODEL_ID,\n kosAction,\n kosConfigProperty,\n kosFuture,\n kosModel,\n kosModelEffect,\n kosMultipleFutureAware,\n kosStateProp,\n} from \"@kosdev-code/kos-ui-sdk\";\n\nimport { PourState } from \"@kosdev-code/kos-dispense-sdk\";\nimport {\n agitate,\n getIceTypes,\n pour,\n resetIceSetting,\n testGate,\n updateIceType,\n} from \"./services/ice-agitator-services\";\nimport type { IceAgitatorOptions } from \"./types\";\n\nexport type IceAgitatorModel = PublicModelInterface<IceAgitatorModelImpl>;\n\nexport class IceAgitatorEvents {\n static TOPIC_AGITATION_STARTED = \"/kos/events/ddk/ice-agitation-started\";\n static TOPIC_AGITATION_ENDED = \"/kos/events/ddk/ice-agitation-ended\";\n}\n\nexport const MODEL_TYPE = \"ice-agitator-model\";\nconst PROP_PATH = createPropKey<IceAgitatorModel>(\"statePath\");\n\n// Define the type for the model implementation with named futures\ntype IceAgitatorModelType = KosMultipleFutureAwareFull<\n \"pour\" | \"agitate\" | \"gate\"\n>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IceAgitatorModelImpl extends IceAgitatorModelType {}\n\n@kosModel(MODEL_TYPE)\n@kosMultipleFutureAware()\nexport class IceAgitatorModelImpl implements IKosDataModel {\n id: string;\n name: string;\n path: string;\n // futureHandler, future, pourFuture, agitateFuture, gateFuture,\n // and all status/progress properties are added by @kosMultipleFutureAware decorator\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"settings.volWithoutIceMl\",\n })\n volWithoutIceMl!: KosConfigProperty<number>;\n\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"settings.durationSec\",\n converter: {\n to: \"second\",\n },\n })\n durationSec!: KosConfigProperty<number>;\n\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"enableIceChuteClear\",\n })\n enableIceChuteClear!: KosConfigProperty<boolean>;\n\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"iceChuteClearDurationMs\",\n })\n iceChuteClearDurationMs!: KosConfigProperty<number>;\n\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"iceChuteClearIntervalSec\",\n })\n iceChuteClearIntervalSec!: KosConfigProperty<number>;\n\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"iceChuteClearRetryIntervalSec\",\n })\n iceChuteClearRetryIntervalSec!: KosConfigProperty<number>;\n\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"maxDispenseSec\",\n })\n maxDispenseSec!: KosConfigProperty<number>;\n\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"type\",\n })\n type!: KosConfigProperty<string>;\n\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"settings.dilutionOffset\",\n })\n dilutionOffset!: KosConfigProperty<number>;\n\n @kosConfigProperty({\n path: KOS_MODEL_ID,\n attribute: \"settings.inactivitySec\",\n converter: {\n to: \"minute\",\n },\n })\n inactivitySec!: KosConfigProperty<number>;\n @kosStateProp({ path: PROP_PATH, attribute: \"agitating\" })\n private agitating!: KosStateProp<boolean>;\n\n @kosStateProp({ path: PROP_PATH, attribute: \"iceChuteOpen\" })\n private iceChuteOpen!: KosStateProp<boolean>;\n\n statePath: string;\n private _allIceTypes: string[];\n private logger: KosContextLogger;\n currentState: PourState = PourState.IDLE;\n constructor(\n modelId: string,\n options: IceAgitatorOptions,\n context: KosCreationContext\n ) {\n this.id = modelId;\n this.name = options.name;\n this.path = options.path;\n this.statePath = options.statePath;\n this._allIceTypes = [];\n this.logger = context.logger;\n // MultipleFutureHandler setup is now handled by @kosMultipleFutureAware decorator\n }\n\n get iceTypes(): string[] {\n return this._allIceTypes;\n }\n\n get isAgitating(): boolean {\n return !!this.agitating.value;\n }\n\n get isIceChuteOpen(): boolean {\n return !!this.iceChuteOpen.value;\n }\n\n // future, pourFuture, agitateFuture, gateFuture getters are now provided by @kosMultipleFutureAware decorator\n\n /**\n * A derived value that indicates if the nozzle is currently pouring a beverage.\n * @readonly\n */\n get isPouring() {\n return (\n !!(this.pourFuture && !this.pourFuture?.endState) ||\n this.currentState === PourState.POUR_STARTING ||\n this.currentState === PourState.POURING ||\n this.currentState === PourState.POUR_CANCELING\n );\n }\n\n /**\n * A derived value that indicates if it is possible to dispense ice.\n *\n * The value is observable and will change as the current dispense state changes\n * @readonly\n * */\n get canPour() {\n return this.currentState === PourState.IDLE;\n }\n private updateIfCurrent(currentState: PourState, nextState: PourState) {\n if (this.currentState === currentState) {\n kosAction(() => {\n this.currentState = nextState;\n });\n }\n }\n @kosFuture({ alias: \"pour\" })\n public async pourIce(tracker?: string) {\n try {\n if (this.currentState === PourState.IDLE) {\n this.updateIfCurrent(PourState.IDLE, PourState.POUR_STARTING);\n if (!tracker) {\n throw new Error(\"No tracker provided\");\n }\n\n const result = await pour(this.path, tracker);\n this.updateIfCurrent(PourState.POUR_STARTING, PourState.POURING);\n\n if (result?.endState) {\n this.updateIfCurrent(PourState.POURING, PourState.IDLE);\n }\n return result as unknown as Promise<void>;\n } else {\n throw new Error(`Cannot pour in state ${this.currentState}`);\n }\n } catch (e) {\n this.logger.error(e);\n this.currentState = PourState.IDLE;\n throw e;\n }\n }\n\n /**\n * An action that will cancel the ice dispense if it is currently in progress.\n * */\n public async cancelIceDispense() {\n if (\n this.currentState === PourState.POURING ||\n this.currentState === PourState.POUR_STARTING\n ) {\n this.currentState = PourState.POUR_CANCELING;\n\n await this.pourFuture?.cancelFuture();\n kosAction(() => {\n this.currentState = PourState.IDLE;\n });\n } else {\n this.logger.warn(\n `Cannot cancel ice dispense in state ${this.currentState}`\n );\n }\n }\n @kosFuture({ alias: \"agitate\" })\n async testAgitate(tracker?: string) {\n // should be handed in by the `kosFuture` decorator\n if (!tracker) {\n throw new Error(\"No tracker provided\");\n }\n\n this.logger.info(`agitating ice-agitator ${this.id}`);\n\n return agitate(this.path, tracker);\n }\n\n @kosFuture({\n alias: \"gate\",\n })\n async testGate(tracker?: string) {\n // should be handed in by the `kosFuture` decorator\n if (!tracker) {\n throw new Error(\"No tracker provided\");\n }\n\n this.logger.info(`testing ice gate: ${this.id}`);\n\n return testGate(this.path, tracker);\n }\n @kosModelEffect({\n dependencies: (model) => [model.isAgitating],\n })\n handleAgitationChange() {\n if (this.isAgitating) {\n this.logger.info(`agitating ice-agitator ${this.id}`);\n EventBus.publish(IceAgitatorEvents.TOPIC_AGITATION_STARTED, {\n path: this.path,\n futureId: this.futureHandler.future?.futureId,\n });\n } else {\n EventBus.publish(IceAgitatorEvents.TOPIC_AGITATION_ENDED, {\n path: this.path,\n });\n }\n }\n async updateIceType(type: string) {\n await updateIceType(this.path, type);\n }\n\n resetDefaultValues = async () => {\n const defaults = await resetIceSetting(this.path);\n return defaults;\n };\n\n async init(): Promise<void> {\n this.logger.debug(`initializing ice-agitator ${this.id}`);\n }\n\n async load(): Promise<void> {\n this.logger.debug(`loading ice-agitator ${this.id}`);\n const iceTypes = await getIceTypes(this.path);\n if (iceTypes?.status === 200) {\n kosAction(() => {\n this._allIceTypes = iceTypes.data || [];\n });\n }\n }\n}\n","import { KosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n IceAgitatorModelImpl,\n MODEL_TYPE,\n type IceAgitatorModel,\n} from \"./ice-agitator-model\";\nimport type { IceAgitatorOptions } from \"./types\";\n\n/**\n * # IceAgitator\n *\n * The registration bean includes convenience methods for creating and working with IceAgitatorModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: IceAgitator.type, id: \"iceAgitatorId\"})\n * private iceAgitatorModel: IceAgitatorModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new IceAgitatorModel instances.\n *\n \n * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.\n *\n * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = IceAgitator.factory(\"iceAgitatorId\")({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a IceAgitatorModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (IceAgitator.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to IceAgitatorModel\n * // and the compiler will know that the model has the IceAgitatorModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { IceAgitator } from \"@kos-ui/kos-dispenser-model\";\n * ...\n * import { ExtensionManager, IKosRegistry } from \"@kosdev-code/kos-ui-sdk\";\n * export const kosModels: IKosRegistry[\"models\"] = {\n * ...IceAgitator.registration,\n * };\n * ```\n *\n * ## registration.singleton\n \n * The iceAgitator model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.\n * If the factory function is called with an ID that already exists, the existing model will be returned.\n \n * */\n\nexport const IceAgitator = new KosModelRegistrationFactory<\n IceAgitatorModel,\n IceAgitatorOptions\n>({\n class: IceAgitatorModelImpl,\n type: MODEL_TYPE,\n});\n","import {\n Assembly,\n HolderModel,\n type HolderTroubleData,\n} from \"@kosdev-code/kos-dispense-sdk\";\nimport type {\n DeferAware,\n FutureResponse,\n IKosDataModel,\n IKosIdentifiable,\n KosConfigProperty,\n KosContextLogger,\n KosCreationContext,\n PublicModelInterface,\n ResolveAware,\n TroubleModel,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport {\n DependencyLifecycle,\n getKosModelSync,\n kosConfigProperty,\n kosModel,\n kosTopicHandler,\n modelTypeEventTopicFactory,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport type { AgitationRequiredTroubleOptions } from \"./types\";\n\nexport const MODEL_TYPE = \"agitation-required-trouble-model\";\n\nexport type AgitationRequiredTroubleModel =\n PublicModelInterface<AgitationRequiredTroubleModelImpl>;\n\nexport const agitationModelFactory = (troubleModel: TroubleModel) => {\n if (troubleModel.data.agitationRequired) {\n return MODEL_TYPE;\n }\n return undefined;\n};\n\nexport const AGITATION_REQUIRED_TROUBLE = \"InsufficientAgitationTrouble\";\n@kosModel(MODEL_TYPE)\nexport class AgitationRequiredTroubleModelImpl\n implements IKosDataModel, IKosIdentifiable, ResolveAware, DeferAware\n{\n id: string;\n private logger: KosContextLogger;\n private trouble: TroubleModel<HolderTroubleData>;\n private _deferred: boolean;\n private _holdersLoaded = false;\n\n @kosConfigProperty({\n path: \"app:kosdev.ddk:app\",\n attribute: \"ncui.agitateBeforePour\",\n })\n agitateBeforePour!: KosConfigProperty<boolean>;\n\n constructor(\n modelId: string,\n options: AgitationRequiredTroubleOptions,\n context: KosCreationContext\n ) {\n this.id = modelId;\n this.logger = context.logger;\n this._deferred = false;\n this.trouble = options.companionParent;\n }\n\n async resolve(): Promise<FutureResponse | undefined> {\n // Resolve the trouble here.\n return this.trouble.resolve();\n }\n\n get holder() {\n const holderPath = this.trouble.data.holderPaths[0];\n const holderModel = getKosModelSync<HolderModel>(holderPath);\n\n if (!this._holdersLoaded && !holderModel.model) {\n return undefined;\n }\n\n return holderModel?.model;\n }\n\n @kosTopicHandler({\n topic: modelTypeEventTopicFactory(Assembly.type),\n lifecycle: DependencyLifecycle.INIT,\n })\n updateHolder() {\n if (!this._holdersLoaded) {\n const holderPath = this.trouble.data.holderPaths[0];\n const holderModel = getKosModelSync<HolderModel>(holderPath);\n if (holderModel.model) {\n this._holdersLoaded = true;\n }\n }\n }\n\n get shouldDefer() {\n if (!this.holder) {\n return true;\n }\n const troubleList =\n this.holder?.troublesByType[AGITATION_REQUIRED_TROUBLE] || [];\n const hasInsufficientAgitationTrouble = troubleList.length > 0;\n const waitForAgitation = !!this.agitateBeforePour?.value;\n return waitForAgitation && hasInsufficientAgitationTrouble;\n }\n\n get deferred() {\n return this._deferred;\n }\n defer() {\n this._deferred = true;\n }\n\n clearDefer() {\n this._deferred = false;\n }\n}\n","import { KosModelRegistrationFactory } from \"@kosdev-code/kos-ui-sdk\";\nimport type { AgitationRequiredTroubleModel } from \"./agitation-required-trouble-model\";\nimport {\n AgitationRequiredTroubleModelImpl,\n MODEL_TYPE,\n} from \"./agitation-required-trouble-model\";\nimport type { AgitationRequiredTroubleOptions } from \"./types\";\n\n/**\n * # AgitationRequiredTrouble\n *\n * The registration bean includes convenience methods for creating and working with AgitationRequiredTroubleModel instances.\n *\n * ## type\n * The type property is a string that identifies the model type.\n * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently\n * used when declaring dependencies on models.\n *\n * @example\n * ```typescript\n *\n * @kosDependency({modelType: AgitationRequiredTrouble.type, id: \"agitationRequiredTroubleId\"})\n * private agitationRequiredTroubleModel: AgitationRequiredTroubleModel;\n * ```\n *\n *\n * ## factory\n *\n * The factory method creates a factory function that can be used to create new AgitationRequiredTroubleModel instances.\n *\n \n * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.\n *\n * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored\n * in this case and the existing model will be returned in its current state.\n *\n * @example\n * ```typescript\n * const model = AgitationRequiredTrouble.factory(\"agitationRequiredTroubleId\")({\n * // Add option data\n * });\n * ```\n \n\n *\n * ## predicate\n *\n * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a AgitationRequiredTroubleModel.\n *\n * @example\n * ```typescript\n *\n * const model: IKosDataModel = ...; // some model\n *\n * if (AgitationRequiredTrouble.predicate(model)) {\n * // if the function evaluates to true, the model is narrowed down to AgitationRequiredTroubleModel\n * // and the compiler will know that the model has the AgitationRequiredTroubleModel interface\n * model.updateAvailability(false);\n * }\n * ```\n *\n * ## registration\n *\n * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object\n * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.\n *\n *\n * @example\n *\n * In an application registration file you can declare the model registration as follows:\n *\n * **registration.ts**\n * ```typescript\n * import { AgitationRequiredTrouble } from \"@kos-ui/project-models\";\n * import { KosModelRegistry } from \"@kosdev-code/kos-dispense-sdk\";\n *\n * import { initKosProvider } from \"@kosdev-code/kos-ui-sdk\";\n *\n * KosModelRegistry.dispense\n * .models()\n * .model(AgitationRequiredTrouble);\n * ```\n *\n * ## registration.singleton\n \n * The agitationRequiredTrouble model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.\n * If the factory function is called with an ID that already exists, the existing model will be returned.\n \n * */\nexport const AgitationRequiredTrouble = new KosModelRegistrationFactory<\n AgitationRequiredTroubleModel,\n AgitationRequiredTroubleOptions\n>({\n class: AgitationRequiredTroubleModelImpl,\n type: MODEL_TYPE,\n});\n","import { KosLog, type DataMapper } from \"@kosdev-code/kos-ui-sdk\";\nimport {\n CarbAgitator,\n type CarbAgitatorModel,\n} from \"../../../models/carb-agitator\";\nimport {\n IceAgitator,\n type IceAgitatorModel,\n} from \"../../../models/ice-agitator\";\n\nimport {\n CartridgeAgitator,\n CartridgeAgitatorContainer,\n} from \"../../../models/cartridge-agitator\";\nimport { RemoteTray, RemoteTrayContainer } from \"../../../models/remote-tray\";\nimport type { FreestyleModelAssemblyExt } from \"../../../models/types/assembly\";\nimport type { FreestyleAssemblyResponse } from \"./types\";\n\ntype AgitatorModel = CarbAgitatorModel | IceAgitatorModel;\nexport type AgitatorTypes = \"iceAgitator\" | \"carbAgitator\";\nexport const AGITATOR_KEYS: AgitatorTypes[] = [\"iceAgitator\", \"carbAgitator\"];\nexport const AGITATOR_FACTORY_MAP = {\n iceAgitator: IceAgitator.factory,\n carbAgitator: CarbAgitator.factory,\n};\nexport const AGITATOR_NAME_MAP = {\n iceAgitator: \"Ice Agitator\",\n carbAgitator: \"Carb Agitator\",\n cartridgeAgitator: \"Cartridge Agitator\",\n};\n\nconst logger = KosLog.createLogger({ name: \"freestyle-assembly-data-mapper\" });\n\nexport const freestyleAssemblyDataMapper: DataMapper<\n FreestyleAssemblyResponse,\n FreestyleModelAssemblyExt\n> = async (data) => {\n const cartridgeAgitators = CartridgeAgitatorContainer.instance()\n .options({})\n .build();\n const remoteTrays = RemoteTrayContainer.instance().options({}).build();\n const response = data.assemblies.reduce((acc, assembly) => {\n AGITATOR_KEYS.forEach((key) => {\n const agitator = assembly[key];\n if (agitator) {\n const factory = AGITATOR_FACTORY_MAP[key](agitator.path);\n acc[key] = factory({\n name: agitator.name,\n path: agitator.path,\n statePath: agitator.state?.path || \"\",\n });\n }\n });\n\n assembly.cartridgeAgitators?.forEach((cartridgeAgitatorData) => {\n const cartridgeAgitator = CartridgeAgitator.instance(\n cartridgeAgitatorData.path\n )\n .options({\n name: cartridgeAgitatorData.name,\n path: cartridgeAgitatorData.path,\n statePath: cartridgeAgitatorData.state?.path || \"\",\n })\n .build();\n cartridgeAgitators.addModel(cartridgeAgitator);\n });\n\n if (assembly.remoteTrays) {\n assembly.remoteTrays.forEach((tray) => {\n logger.info(`Found remote tray ${tray.name} with path ${tray.path}`);\n\n const trayId = `${RemoteTray.type}-${tray.holderPath}`;\n const trayModel = RemoteTray.instance(trayId)\n .options({\n holderPath: tray.holderPath,\n configPath: tray.path,\n name: tray.name,\n })\n .build();\n\n remoteTrays.addModel(trayModel);\n });\n }\n\n return acc;\n }, {} as { [key in AgitatorTypes]?: AgitatorModel });\n\n const supportsIce = !!response.iceAgitator;\n const supportsCarb = !!response.carbAgitator;\n\n return {\n ...response,\n cartridgeAgitators,\n remoteTrays,\n supportsCarb,\n supportsIce,\n } as FreestyleModelAssemblyExt;\n};\n","import {\n Assembly,\n KosModelRegistry as DispenseModelRegistration,\n Holder,\n Nozzle,\n Pump,\n PumpContainer,\n PumpContainerModel,\n PumpIndex,\n registerDispenseModels,\n type IngredientModel,\n type PumpModel,\n} from \"@kosdev-code/kos-dispense-sdk\";\n\nimport {\n EXTENSION_TROUBLE_DATA_MAPPER,\n ExtensionManager,\n getKosModelSync,\n registerCoreModels,\n RegistrationManager,\n Trouble,\n type RegistrationResult,\n type TroubleModel,\n} from \"@kosdev-code/kos-ui-sdk\";\nimport { agitationModelFactory } from \"../models/agitation-required-trouble/agitation-required-trouble-model\";\nimport { AgitationRequiredTrouble } from \"../models/agitation-required-trouble/agitation-required-trouble-registration\";\nimport { CarbAgitator } from \"../models/carb-agitator\";\nimport { CartridgeAgitatorContainer } from \"../models/cartridge-agitator\";\nimport { FreestyleAssembly } from \"../models/freestyle-assembly\";\nimport { FreestyleHolder } from \"../models/freestyle-holder\";\nimport { FreestyleNozzle } from \"../models/freestyle-nozzle\";\nimport { FreestylePump } from \"../models/freestyle-pump\";\nimport { IceAgitator } from \"../models/ice-agitator\";\nimport { RemoteTray, RemoteTrayContainer } from \"../models/remote-tray\";\n\nexport const registerFreestyleModels =\n <R>(root: R) =>\n () => {\n registerCoreModels(root)();\n registerDispenseModels(root)();\n FreestyleNozzle.register();\n FreestyleAssembly.register();\n IceAgitator.register();\n CarbAgitator.register();\n CartridgeAgitatorContainer.register();\n FreestylePump.register();\n FreestyleHolder.register();\n RemoteTray.register();\n RemoteTrayContainer.register();\n RegistrationManager.companion.register(root)(\n Nozzle.type,\n FreestyleNozzle.type\n );\n\n RegistrationManager.companion.register(root)(\n Assembly.type,\n FreestyleAssembly.type\n );\n\n AgitationRequiredTrouble.register();\n RegistrationManager.companion.register(root)(\n Trouble.type,\n agitationModelFactory\n );\n\n RegistrationManager.companion.register(root)(Pump.type, FreestylePump.type);\n RegistrationManager.companion.register(root)(\n Holder.type,\n FreestyleHolder.type\n );\n\n ExtensionManager[EXTENSION_TROUBLE_DATA_MAPPER].register(\n \"EnjoyByTrouble\",\n async (trouble: TroubleModel) => {\n // If the trouble has an enjoy by date, we can calculate the days since\n if (trouble.data.enjoyByDate) {\n const enjoyByDate = new Date(trouble.data.enjoyByDate);\n const now = new Date();\n const daysSinceEnjoyBy = Math.floor(\n (now.getTime() - enjoyByDate.getTime()) / (1000 * 60 * 60 * 24)\n );\n return {\n enjoyByDays: daysSinceEnjoyBy || \"\",\n };\n }\n\n return {};\n }\n );\n\n ExtensionManager[EXTENSION_TROUBLE_DATA_MAPPER].register(\n \"SuperPumpRequiredTrouble\", // This is the trouble type\n async (_trouble: TroubleModel) => {\n const { model: pumpContainer } = getKosModelSync<PumpContainerModel>(\n PumpContainer.type\n );\n\n if (pumpContainer) {\n const superPumpModels = pumpContainer.models.getIndexByKey(\n PumpIndex.byType,\n \"microSuper\"\n );\n const superPumps = superPumpModels\n .map((model) => model.name)\n .join(\", \");\n return {\n superPumps,\n };\n }\n return {};\n }\n );\n ExtensionManager[EXTENSION_TROUBLE_DATA_MAPPER].register(\n \"MicroPumpAirDetectTrouble\",\n async (trouble: TroubleModel) => {\n // If the trouble is related to a container, we don't need to map the data\n if (trouble.ifaces.includes(\"container\")) {\n return {};\n }\n if (trouble.data.pumpPath) {\n const { model: pumpModel } = getKosModelSync<PumpModel>(\n trouble.data.pumpPath\n );\n\n if (pumpModel) {\n const ingredientModel = pumpModel.ingredientId\n ? getKosModelSync<IngredientModel>(pumpModel.ingredientId).model\n : undefined;\n return {\n ingredientId: pumpModel.ingredientId,\n ingredientName: ingredientModel?.name || \"\",\n };\n }\n }\n return {};\n }\n );\n return {\n preload: RegistrationManager.model.preloadModel(root),\n model: RegistrationManager.model.register(root),\n companion: RegistrationManager.companion.register(root),\n legacy: RegistrationManager.model.registerLegacyModel(root),\n };\n };\n\ntype ModelRegistry<R> = typeof DispenseModelRegistration & {\n freestyle: { models: () => RegistrationResult<R> };\n preload: ReturnType<typeof RegistrationManager.model.preloadModel>;\n model: ReturnType<typeof RegistrationManager.model.register>;\n companion: ReturnType<typeof RegistrationManager.companion.register>;\n};\n\nconst _KosModelRegistry = {\n ...DispenseModelRegistration,\n};\n\n(_KosModelRegistry as any).freestyle = {\n models: registerFreestyleModels(_KosModelRegistry),\n};\n(_KosModelRegistry as any).preload =\n RegistrationManager.model.preloadModel(_KosModelRegistry);\n(_KosModelRegistry as any).model =\n RegistrationManager.model.register(_KosModelRegistry);\n(_KosModelRegistry as any).companion =\n RegistrationManager.companion.register(_KosModelRegistry);\n(_KosModelRegistry as any).legacy =\n RegistrationManager.model.registerLegacyModel(_KosModelRegistry);\n\ntype KosModelRegistryType = ModelRegistry<typeof _KosModelRegistry>;\n\nconst KosModelRegistry: KosModelRegistryType = _KosModelRegistry as any;\n\nexport { KosModelRegistry };\n"],"names":["MODEL_TYPE","CarbAgitatorModelImpl","modelId","options","context","__publicField","__decorateClass","kosModel","CarbAgitator","KosModelRegistrationFactory","CartridgeAgitatorContainerModelImpl","KosModelContainer","id","model","kosChild","URL","resolveServiceUrl","postModel","ServiceFactory","agitate","path","tracker","response","CartridgeAgitatorEvents","PROP_PATH","createPropKey","CartridgeAgitatorModelImpl","EventBus","_a","kosStateProp","kosFuture","kosModelEffect","kosFutureAware","kosLoggerAware","CartridgeAgitator","CartridgeAgitatorContainer","SingletonKosModelRegistrationFactory","FEATURE_SUPPORTS_ICE","FEATURE_SUPPORTS_CARB","FEATURE_SUPPORTS_REMOTE_TRAYS","FreestyleAssemblyModelImpl","group","nozzlePath","KosFeatureFlags","kosParentAware","FreestyleAssembly","PROP_CONFIG_PATH","RemoteTrayModelImpl","_options","getKosModelSync","kosConfigProperty","RemoteTray","RemoteTrayContainerModelImpl","kosContainerAware","RemoteTrayContainer","resolveFreestyleAssembly","KosContextManager","freestyleAssembly","KosLog","futureDelegate","method","FutureManager","FreestyleHolderModelImpl","remoteTrayId","remoteTray","FreestyleHolder","getOne","log","NutritionInfoError","message","InvalidRequestError","getFreestyleNutritionInfo","nozzleUrlPrefix","beverageId","volumes","baseUrl","FreestyleNozzleModelImpl","cupSizes","prefix","kosAction","error","FreestyleNozzle","replacePump","pumpId","code","FetchError","errorCode","_c","_b","_d","_e","FreestylePumpModelImpl","data","FreestylePump","getAll","getIceTypes","updateIceType","agitator","type","resetIceSetting","pour","testGate","IceAgitatorEvents","IceAgitatorModelImpl","PourState","currentState","nextState","result","e","iceTypes","KOS_MODEL_ID","kosMultipleFutureAware","IceAgitator","agitationModelFactory","troubleModel","AGITATION_REQUIRED_TROUBLE","AgitationRequiredTroubleModelImpl","holderPath","holderModel","hasInsufficientAgitationTrouble","kosTopicHandler","modelTypeEventTopicFactory","Assembly","DependencyLifecycle","AgitationRequiredTrouble","AGITATOR_KEYS","AGITATOR_FACTORY_MAP","logger","freestyleAssemblyDataMapper","cartridgeAgitators","remoteTrays","acc","assembly","key","factory","cartridgeAgitatorData","cartridgeAgitator","tray","trayId","trayModel","supportsIce","supportsCarb","registerFreestyleModels","root","registerCoreModels","registerDispenseModels","RegistrationManager","Nozzle","Trouble","Pump","Holder","ExtensionManager","EXTENSION_TROUBLE_DATA_MAPPER","trouble","enjoyByDate","_trouble","pumpContainer","PumpContainer","PumpIndex","pumpModel","ingredientModel","_KosModelRegistry","DispenseModelRegistration","KosModelRegistry"],"mappings":";;;;;;;;;;AAQO,MAAMA,KAAa;AAGnB,IAAMC,IAAN,MAAwE;AAAA,EAM7E,YACEC,GACAC,GACAC,GACA;AATF,IAAAC,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAEQ,IAAAA,EAAA;AAMN,SAAK,KAAKH,GACV,KAAK,OAAOC,EAAQ,MACpB,KAAK,OAAOA,EAAQ,MACpB,KAAK,SAASC,EAAQ;AAAA,EAIxB;AAAA;AAAA,EAIA,MAAM,OAAsB;AAC1B,SAAK,OAAO,MAAM,8BAA8B,KAAK,EAAE,EAAE;AAAA,EAC3D;AAAA,EAEA,MAAM,OAAsB;AAC1B,SAAK,OAAO,MAAM,yBAAyB,KAAK,EAAE,EAAE;AAAA,EACtD;AACF;AA7BaH,IAANK,GAAA;AAAA,EADNC,EAASP,EAAU;AAAA,GACPC,CAAA;ACyEN,MAAMO,KAAe,IAAIC,EAG9B;AAAA,EACA,OAAOR;AAAA,EACP,MAAMD;AACR,CAAC;;;;;;AC7EM,MAAMA,KAAa;AAMnB,IAAMU,IAAN,MAKP;AAAA,EAIE,YACER,GACAC,GACAC,GACA;AAPF,IAAAC,EAAA;AACQ,IAAAA,EAAA;AACU,IAAAA,EAAA;AAMhB,SAAK,KAAKH,GACV,KAAK,SAASE,EAAQ,QACtB,KAAK,UAAU,IAAIO,GAA0C;AAAA,MAC3D,UAAUT;AAAA,IAAA,CACX;AAAA,EAIH;AAAA,EAEA,SAASU,GAAY;AACnB,WAAO,KAAK,QAAQ,SAASA,CAAE;AAAA,EACjC;AAAA,EACA,IAAI,SAAS;AACX,WAAO,KAAK;AAAA,EACd;AAAA,EACA,IAAI,OAAO;AACT,WAAO,KAAK,QAAQ;AAAA,EACtB;AAAA,EAEA,SAASC,GAA+B;AACtC,SAA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AAU;AACzB,YAAM,EAAE,OAAOM,EAAA,IAAc9G;AAAA,QAC3BwG,EAAQ,KAAK;AAAA,MAAA;AAGf,UAAIM,GAAW;AACb,cAAMC,IAAkBD,EAAU,eAC9B9G,EAAiC8G,EAAU,YAAY,EAAE,QACzD;AACJ,eAAO;AAAA,UACL,cAAcA,EAAU;AAAA,UACxB,iBAAgBC,KAAA,gBAAAA,EAAiB,SAAQ;AAAA,QAAA;AAAA,MAE7C;AAAA,IACF;AACA,WAAO,CAAA;AAAA,EACT;AAAA,GAEK;AAAA,EACL,SAASd,EAAoB,MAAM,aAAaH,CAAI;AAAA,EACpD,OAAOG,EAAoB,MAAM,SAASH,CAAI;AAAA,EAC9C,WAAWG,EAAoB,UAAU,SAASH,CAAI;AAAA,EACtD,QAAQG,EAAoB,MAAM,oBAAoBH,CAAI;AAAA,IAW1DkB,IAAoB;AAAA,EACxB,GAAGC;AACL;AAECD,EAA0B,YAAY;AAAA,EACrC,QAAQnB,GAAwBmB,CAAiB;AACnD;AACCA,EAA0B,UACzBf,EAAoB,MAAM,aAAae,CAAiB;AACzDA,EAA0B,QACzBf,EAAoB,MAAM,SAASe,CAAiB;AACrDA,EAA0B,YACzBf,EAAoB,UAAU,SAASe,CAAiB;AACzDA,EAA0B,SACzBf,EAAoB,MAAM,oBAAoBe,CAAiB;AAIjE,MAAME,KAAyCF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"carb-agitator-registration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/carb-agitator/carb-agitator-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8EK;AAEL,eAAO,MAAM,YAAY,qEAMvB,CAAC"}