@kosdev-code/kos-freestyle-sdk 0.1.0-next.943 → 0.1.0-next.948

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 (51) hide show
  1. package/{extension-utils-D5XZ8LIl.cjs → extension-utils-D847XVCc.cjs} +2 -2
  2. package/{extension-utils-D5XZ8LIl.cjs.map → extension-utils-D847XVCc.cjs.map} +1 -1
  3. package/{extension-utils-BGWhQNVU.js → extension-utils-H-ll8ljh.js} +2 -2
  4. package/{extension-utils-BGWhQNVU.js.map → extension-utils-H-ll8ljh.js.map} +1 -1
  5. package/index.cjs +3 -3
  6. package/index.js +3 -3
  7. package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts +12 -77
  8. package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts.map +1 -1
  9. package/models/models/carb-agitator/carb-agitator-model.d.ts +1 -20
  10. package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -1
  11. package/models/models/carb-agitator/services/carb-tank-services.d.ts +1 -14
  12. package/models/models/carb-agitator/services/carb-tank-services.d.ts.map +1 -1
  13. package/models/models/cartridge-agitator/cartridge-agitator-container-registration.d.ts +10 -74
  14. package/models/models/cartridge-agitator/cartridge-agitator-container-registration.d.ts.map +1 -1
  15. package/models/models/cartridge-agitator/cartridge-agitator-registration.d.ts +10 -76
  16. package/models/models/cartridge-agitator/cartridge-agitator-registration.d.ts.map +1 -1
  17. package/models/models/fcm-pump/fcm-pump-registration.d.ts +10 -74
  18. package/models/models/fcm-pump/fcm-pump-registration.d.ts.map +1 -1
  19. package/models/models/freestyle-assembly/freestyle-assembly-registration.d.ts +10 -76
  20. package/models/models/freestyle-assembly/freestyle-assembly-registration.d.ts.map +1 -1
  21. package/models/models/freestyle-holder/freestyle-holder-registration.d.ts +10 -74
  22. package/models/models/freestyle-holder/freestyle-holder-registration.d.ts.map +1 -1
  23. package/models/models/freestyle-nozzle/freestyle-nozzle-registration.d.ts +10 -74
  24. package/models/models/freestyle-nozzle/freestyle-nozzle-registration.d.ts.map +1 -1
  25. package/models/models/freestyle-pump/freestyle-pump-registration.d.ts +10 -74
  26. package/models/models/freestyle-pump/freestyle-pump-registration.d.ts.map +1 -1
  27. package/models/models/remote-tray/remote-tray-container-registration.d.ts +10 -74
  28. package/models/models/remote-tray/remote-tray-container-registration.d.ts.map +1 -1
  29. package/models/models/remote-tray/remote-tray-model.d.ts +8 -89
  30. package/models/models/remote-tray/remote-tray-model.d.ts.map +1 -1
  31. package/models/models/remote-tray/remote-tray-registration.d.ts +10 -77
  32. package/models/models/remote-tray/remote-tray-registration.d.ts.map +1 -1
  33. package/models/models/spm-pump/spm-pump-registration.d.ts +10 -74
  34. package/models/models/spm-pump/spm-pump-registration.d.ts.map +1 -1
  35. package/models/utils/extensions/assembly/types.d.ts +4 -87
  36. package/models/utils/extensions/assembly/types.d.ts.map +1 -1
  37. package/models.cjs +2 -2
  38. package/models.js +2 -2
  39. package/package.json +4 -4
  40. package/{service-BCeBcq6r.js → service-BDbUdYS7.js} +9 -27
  41. package/service-BDbUdYS7.js.map +1 -0
  42. package/{service-DP30iIee.cjs → service-C8lk9GgD.cjs} +9 -27
  43. package/service-C8lk9GgD.cjs.map +1 -0
  44. package/ui.cjs +1 -1
  45. package/ui.js +1 -1
  46. package/{use-nutrition-info-BCn3S1KP.js → use-nutrition-info-CFICkr6p.js} +2 -2
  47. package/{use-nutrition-info-BCn3S1KP.js.map → use-nutrition-info-CFICkr6p.js.map} +1 -1
  48. package/{use-nutrition-info-jT0h49sO.cjs → use-nutrition-info-Cy9rRWLz.cjs} +2 -2
  49. package/{use-nutrition-info-jT0h49sO.cjs.map → use-nutrition-info-Cy9rRWLz.cjs.map} +1 -1
  50. package/service-BCeBcq6r.js.map +0 -1
  51. package/service-DP30iIee.cjs.map +0 -1
@@ -2,85 +2,21 @@ import { SingletonKosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
2
2
  import { CartridgeAgitatorContainerModel } from './cartridge-agitator-container-model';
3
3
  import { CartridgeAgitatorContainerOptions } from './types';
4
4
  /**
5
- * # CartridgeAgitatorContainer
5
+ * Registration bean for {@link CartridgeAgitatorContainerModel}.
6
6
  *
7
- * The registration bean includes convenience methods for creating and working with CartridgeAgitatorContainerModel instances.
7
+ * - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
8
+ * - `factory`: `CartridgeAgitatorContainer.factory(options)` returns the single instance, creating it on the first call.
9
+ * - `guard`: type guard that narrows an `IKosDataModel` to `CartridgeAgitatorContainerModel`.
10
+ * - `instance()`: reads the model, or builds it from options.
11
+ * - `register()`: registers the model, and any related models, with the model registry.
8
12
  *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * 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
12
- * used when declaring dependencies on models.
13
+ * CartridgeAgitatorContainer is a singleton. `KosModelRegistry.freestyle.models()` registers it.
13
14
  *
14
15
  * @example
15
16
  * ```typescript
16
- *
17
- * @kosDependency({modelType: CartridgeAgitatorContainer.type, id: "cartridgeAgitatorContainerId"})
18
- * private cartridgeAgitatorContainerModel: CartridgeAgitatorContainerModel;
17
+ * @kosDependency({ modelType: CartridgeAgitatorContainer.type })
18
+ * private cartridgeAgitatorContainer!: CartridgeAgitatorContainerModel;
19
19
  * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new CartridgeAgitatorContainerModel instances.
25
- *
26
-
27
- * As this is a singleton model, the factory function accepts the model options as its argument.
28
- *
29
- * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
31
- *
32
- * @example
33
- * ```typescript
34
- * const model = CartridgeAgitatorContainer.factory({
35
- * // Add option data
36
- * });
37
- * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [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.
44
- *
45
- * @example
46
- * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (CartridgeAgitatorContainer.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to CartridgeAgitatorContainerModel
52
- * // and the compiler will know that the model has the CartridgeAgitatorContainerModel interface
53
- * model.updateAvailability(false);
54
- * }
55
- * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
61
- *
62
- *
63
- * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
- * ```typescript
69
- * import { CartridgeAgitatorContainer } from "@kosdev-code/kos-dispense-sdk";
70
- * ...
71
- * import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
72
- * export const kosModels: IKosRegistry["models"] = {
73
- * ...CartridgeAgitatorContainer.registration,
74
- * };
75
- * ```
76
- *
77
- * ## registration.singleton
78
-
79
- * The cartridgeAgitatorContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
80
- * If the model does not yet exist, it will be created passing in the provided options to initialize it.
81
- *
82
- * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
83
-
84
- * */
20
+ */
85
21
  export declare const CartridgeAgitatorContainer: SingletonKosModelRegistrationFactory<CartridgeAgitatorContainerModel, CartridgeAgitatorContainerOptions>;
86
22
  //# sourceMappingURL=cartridge-agitator-container-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cartridge-agitator-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/cartridge-agitator/cartridge-agitator-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAM5F,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,0BAA0B,0GAOnC,CAAC"}
1
+ {"version":3,"file":"cartridge-agitator-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/cartridge-agitator/cartridge-agitator-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAM5F,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAEjE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,0BAA0B,0GAOnC,CAAC"}
@@ -2,87 +2,21 @@ import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
2
2
  import { CartridgeAgitatorModel } from './cartridge-agitator-model';
3
3
  import { CartridgeAgitatorOptions } from './types';
4
4
  /**
5
- * # CartridgeAgitator
5
+ * Registration bean for {@link CartridgeAgitatorModel}.
6
6
  *
7
- * The registration bean includes convenience methods for creating and working with CartridgeAgitatorModel instances.
7
+ * - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
8
+ * - `factory`: curried factory, `CartridgeAgitator.factory(id)(options)`. Returns the existing model when the id is already in use and ignores the options.
9
+ * - `guard`: type guard that narrows an `IKosDataModel` to `CartridgeAgitatorModel`.
10
+ * - `instance(id)`: reads the model, or builds it from options.
11
+ * - `register()`: registers the model, and any related models, with the model registry.
8
12
  *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * 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
12
- * used when declaring dependencies on models.
13
+ * CartridgeAgitator is not a singleton: each id has its own instance. `KosModelRegistry.freestyle.models()` registers it.
13
14
  *
14
15
  * @example
15
16
  * ```typescript
16
- *
17
- * import type { CartridgeAgitatorModel } from "./cartridge-agitator-model";
18
- *
19
- * @kosDependency({modelType: CartridgeAgitator.type, id: "cartridgeAgitatorId"})
20
- * private cartridgeAgitatorModel: CartridgeAgitatorModel;
21
- * ```
22
- *
23
- *
24
- * ## factory
25
- *
26
- * The factory method creates a factory function that can be used to create new CartridgeAgitatorModel instances.
27
- *
28
-
29
- * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
30
- *
31
- * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
32
- * in this case and the existing model will be returned in its current state.
33
- *
34
- * @example
35
- * ```typescript
36
- * const model = CartridgeAgitator.factory("cartridgeAgitatorId")({
37
- * // Add option data
38
- * });
17
+ * @kosDependency({ modelType: CartridgeAgitator.type, id: "cartridgeAgitatorId" })
18
+ * private cartridgeAgitator!: CartridgeAgitatorModel;
39
19
  * ```
40
-
41
-
42
- *
43
- * ## predicate
44
- *
45
- * [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.
46
- *
47
- * @example
48
- * ```typescript
49
- *
50
- * const model: IKosDataModel = ...; // some model
51
- *
52
- * if (CartridgeAgitator.predicate(model)) {
53
- * // if the function evaluates to true, the model is narrowed down to CartridgeAgitatorModel
54
- * // and the compiler will know that the model has the CartridgeAgitatorModel interface
55
- * model.updateAvailability(false);
56
- * }
57
- * ```
58
- *
59
- * ## registration
60
- *
61
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
62
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
63
- *
64
- *
65
- * @example
66
- *
67
- * In an application registration file you can declare the model registration as follows:
68
- *
69
- * **registration.ts**
70
- * ```typescript
71
- * import { CartridgeAgitator } from "@kos-ui/project-models";
72
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
73
- *
74
- * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
75
- *
76
- * KosModelRegistry.dispense
77
- * .models()
78
- * .model(CartridgeAgitator);
79
- * ```
80
- *
81
- * ## registration.singleton
82
-
83
- * 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.
84
- * If the factory function is called with an ID that already exists, the existing model will be returned.
85
-
86
- * */
20
+ */
87
21
  export declare const CartridgeAgitator: KosModelRegistrationFactory<CartridgeAgitatorModel, CartridgeAgitatorOptions>;
88
22
  //# sourceMappingURL=cartridge-agitator-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cartridge-agitator-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/cartridge-agitator/cartridge-agitator-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACL,sBAAsB,EAGvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkFK;AACL,eAAO,MAAM,iBAAiB,+EAM5B,CAAC"}
1
+ {"version":3,"file":"cartridge-agitator-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/cartridge-agitator/cartridge-agitator-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACL,sBAAsB,EAGvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,+EAM5B,CAAC"}
@@ -2,85 +2,21 @@ import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
2
2
  import { FcmPumpOptions } from './types';
3
3
  import { FcmPumpModel } from './fcm-pump-model';
4
4
  /**
5
- * # FcmPump
5
+ * Registration bean for {@link FcmPumpModel}.
6
6
  *
7
- * The registration bean includes convenience methods for creating and working with FcmPumpModel instances.
7
+ * - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
8
+ * - `factory`: curried factory, `FcmPump.factory(id)(options)`. Returns the existing model when the id is already in use and ignores the options.
9
+ * - `guard`: type guard that narrows an `IKosDataModel` to `FcmPumpModel`.
10
+ * - `instance(id)`: reads the model, or builds it from options.
11
+ * - `register()`: registers the model, and any related models, with the model registry.
8
12
  *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * 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
12
- * used when declaring dependencies on models.
13
+ * FcmPump is not a singleton: each id has its own instance. `KosModelRegistry.freestyle.models()` registers it.
13
14
  *
14
15
  * @example
15
16
  * ```typescript
16
- *
17
- * @kosDependency({modelType: FcmPump.type, id: "fcmPumpId"})
18
- * private fcmPumpModel: FcmPumpModel;
19
- * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new FcmPumpModel instances.
25
- *
26
-
27
- * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
28
- *
29
- * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
31
- *
32
- * @example
33
- * ```typescript
34
- * const model = FcmPump.factory("fcmPumpId")({
35
- * // Add option data
36
- * });
37
- * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [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 FcmPumpModel.
44
- *
45
- * @example
46
- * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (FcmPump.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to FcmPumpModel
52
- * // and the compiler will know that the model has the FcmPumpModel interface
53
- * model.updateAvailability(false);
54
- * }
17
+ * @kosDependency({ modelType: FcmPump.type, id: "fcmPumpId" })
18
+ * private fcmPump!: FcmPumpModel;
55
19
  * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
61
- *
62
- *
63
- * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
- * ```typescript
69
- * import { FcmPump } from "@kos-ui/project-models";
70
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
71
- *
72
- * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
73
- *
74
- * KosModelRegistry.dispense
75
- * .models()
76
- * .model(FcmPump);
77
- * ```
78
- *
79
- * ## registration.singleton
80
-
81
- * The fcmPump 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.
82
- * If the factory function is called with an ID that already exists, the existing model will be returned.
83
-
84
- * */
20
+ */
85
21
  export declare const FcmPump: KosModelRegistrationFactory<FcmPumpModel, FcmPumpOptions>;
86
22
  //# sourceMappingURL=fcm-pump-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fcm-pump-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/fcm-pump/fcm-pump-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,OAAO,2DAMlB,CAAC"}
1
+ {"version":3,"file":"fcm-pump-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/fcm-pump/fcm-pump-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO,2DAMlB,CAAC"}
@@ -2,87 +2,21 @@ import { SingletonKosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
2
2
  import { FreestyleAssemblyModel } from './freestyle-assembly-model';
3
3
  import { FreestyleAssemblyOptions } from './types';
4
4
  /**
5
- * # FreestyleAssembly
5
+ * Registration bean for {@link FreestyleAssemblyModel}.
6
6
  *
7
- * The registration bean includes convenience methods for creating and working with FreestyleAssemblyModel instances.
7
+ * - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
8
+ * - `factory`: `FreestyleAssembly.factory(options)` returns the single instance, creating it on the first call.
9
+ * - `guard`: type guard that narrows an `IKosDataModel` to `FreestyleAssemblyModel`.
10
+ * - `instance()`: reads the model, or builds it from options.
11
+ * - `register()`: registers the model, and any related models, with the model registry.
8
12
  *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * 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
12
- * used when declaring dependencies on models.
13
+ * FreestyleAssembly is a singleton. `KosModelRegistry.freestyle.models()` registers it.
13
14
  *
14
15
  * @example
15
16
  * ```typescript
16
- *
17
- * @kosDependency({modelType: FreestyleAssembly.type, id: "freestyleAssemblyId"})
18
- * private freestyleAssemblyModel: FreestyleAssemblyModel;
19
- * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new FreestyleAssemblyModel instances.
25
- *
26
-
27
- * As this is a singleton model, the factory function accepts the model options as its argument.
28
- *
29
- * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
31
- *
32
- * @example
33
- * ```typescript
34
- * const model = FreestyleAssembly.factory({
35
- * // Add option data
36
- * });
17
+ * @kosDependency({ modelType: FreestyleAssembly.type })
18
+ * private freestyleAssembly!: FreestyleAssemblyModel;
37
19
  * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [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.
44
- *
45
- * @example
46
- * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (FreestyleAssembly.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to FreestyleAssemblyModel
52
- * // and the compiler will know that the model has the FreestyleAssemblyModel interface
53
- * model.updateAvailability(false);
54
- * }
55
- * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
61
- *
62
- *
63
- * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
- * ```typescript
69
- * import { FreestyleAssembly } from "@kos-ui/project-models";
70
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
71
- *
72
- * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
73
- *
74
- * KosModelRegistry.dispense
75
- * .models()
76
- * .model(FreestyleAssembly);
77
- * ```
78
- *
79
- * ## registration.singleton
80
-
81
- * The freestyleAssembly model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
82
- * If the model does not yet exist, it will be created passing in the provided options to initialize it.
83
- *
84
- * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
85
-
86
- * */
20
+ */
87
21
  export declare const FreestyleAssembly: SingletonKosModelRegistrationFactory<FreestyleAssemblyModel, FreestyleAssemblyOptions>;
88
22
  //# sourceMappingURL=freestyle-assembly-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"freestyle-assembly-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-assembly/freestyle-assembly-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAKzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkFK;AACL,eAAO,MAAM,iBAAiB,wFAM5B,CAAC"}
1
+ {"version":3,"file":"freestyle-assembly-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-assembly/freestyle-assembly-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAKzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,wFAM5B,CAAC"}
@@ -2,85 +2,21 @@ import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
2
2
  import { FreestyleHolderModel } from './freestyle-holder-model';
3
3
  import { FreestyleHolderOptions } from './types';
4
4
  /**
5
- * # FreestyleHolder
5
+ * Registration bean for {@link FreestyleHolderModel}.
6
6
  *
7
- * The registration bean includes convenience methods for creating and working with FreestyleHolderModel instances.
7
+ * - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
8
+ * - `factory`: curried factory, `FreestyleHolder.factory(id)(options)`. Returns the existing model when the id is already in use and ignores the options.
9
+ * - `guard`: type guard that narrows an `IKosDataModel` to `FreestyleHolderModel`.
10
+ * - `instance(id)`: reads the model, or builds it from options.
11
+ * - `register()`: registers the model, and any related models, with the model registry.
8
12
  *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * 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
12
- * used when declaring dependencies on models.
13
+ * FreestyleHolder is not a singleton: each id has its own instance. `KosModelRegistry.freestyle.models()` registers it.
13
14
  *
14
15
  * @example
15
16
  * ```typescript
16
- *
17
- * @kosDependency({modelType: FreestyleHolder.type, id: "freestyleHolderId"})
18
- * private freestyleHolderModel: FreestyleHolderModel;
19
- * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new FreestyleHolderModel instances.
25
- *
26
-
27
- * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
28
- *
29
- * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
31
- *
32
- * @example
33
- * ```typescript
34
- * const model = FreestyleHolder.factory("freestyleHolderId")({
35
- * // Add option data
36
- * });
37
- * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [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.
44
- *
45
- * @example
46
- * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (FreestyleHolder.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to FreestyleHolderModel
52
- * // and the compiler will know that the model has the FreestyleHolderModel interface
53
- * model.updateAvailability(false);
54
- * }
17
+ * @kosDependency({ modelType: FreestyleHolder.type, id: "freestyleHolderId" })
18
+ * private freestyleHolder!: FreestyleHolderModel;
55
19
  * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
61
- *
62
- *
63
- * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
- * ```typescript
69
- * import { FreestyleHolder } from "@kos-ui/project-models";
70
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
71
- *
72
- * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
73
- *
74
- * KosModelRegistry.dispense
75
- * .models()
76
- * .model(FreestyleHolder);
77
- * ```
78
- *
79
- * ## registration.singleton
80
-
81
- * 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.
82
- * If the factory function is called with an ID that already exists, the existing model will be returned.
83
-
84
- * */
20
+ */
85
21
  export declare const FreestyleHolder: KosModelRegistrationFactory<FreestyleHolderModel, FreestyleHolderOptions>;
86
22
  //# sourceMappingURL=freestyle-holder-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"freestyle-holder-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-holder/freestyle-holder-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,eAAe,2EAM1B,CAAC"}
1
+ {"version":3,"file":"freestyle-holder-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-holder/freestyle-holder-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,2EAM1B,CAAC"}
@@ -2,85 +2,21 @@ import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
2
2
  import { FreestyleNozzleModel } from './freestyle-nozzle-model';
3
3
  import { FreestyleNozzleOptions } from './types';
4
4
  /**
5
- * # FreestyleNozzle
5
+ * Registration bean for {@link FreestyleNozzleModel}.
6
6
  *
7
- * The registration bean includes convenience methods for creating and working with FreestyleNozzleModel instances.
7
+ * - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
8
+ * - `factory`: curried factory, `FreestyleNozzle.factory(id)(options)`. Returns the existing model when the id is already in use and ignores the options.
9
+ * - `guard`: type guard that narrows an `IKosDataModel` to `FreestyleNozzleModel`.
10
+ * - `instance(id)`: reads the model, or builds it from options.
11
+ * - `register()`: registers the model, and any related models, with the model registry.
8
12
  *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * 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
12
- * used when declaring dependencies on models.
13
+ * FreestyleNozzle is not a singleton: each id has its own instance. `KosModelRegistry.freestyle.models()` registers it.
13
14
  *
14
15
  * @example
15
16
  * ```typescript
16
- *
17
- * @kosDependency({modelType: FreestyleNozzle.type, id: "freestyleNozzleId"})
18
- * private freestyleNozzleModel: FreestyleNozzleModel;
19
- * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new FreestyleNozzleModel instances.
25
- *
26
-
27
- * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
28
- *
29
- * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
31
- *
32
- * @example
33
- * ```typescript
34
- * const model = FreestyleNozzle.factory("freestyleNozzleId")({
35
- * // Add option data
36
- * });
37
- * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [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.
44
- *
45
- * @example
46
- * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (FreestyleNozzle.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to FreestyleNozzleModel
52
- * // and the compiler will know that the model has the FreestyleNozzleModel interface
53
- * model.updateAvailability(false);
54
- * }
17
+ * @kosDependency({ modelType: FreestyleNozzle.type, id: "freestyleNozzleId" })
18
+ * private freestyleNozzle!: FreestyleNozzleModel;
55
19
  * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
61
- *
62
- *
63
- * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
- * ```typescript
69
- * import { FreestyleNozzle } from "@kos-ui/project-models";
70
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
71
- *
72
- * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
73
- *
74
- * KosModelRegistry.dispense
75
- * .models()
76
- * .model(FreestyleNozzle);
77
- * ```
78
- *
79
- * ## registration.singleton
80
-
81
- * 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.
82
- * If the factory function is called with an ID that already exists, the existing model will be returned.
83
-
84
- * */
20
+ */
85
21
  export declare const FreestyleNozzle: KosModelRegistrationFactory<FreestyleNozzleModel, FreestyleNozzleOptions>;
86
22
  //# sourceMappingURL=freestyle-nozzle-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"freestyle-nozzle-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-nozzle/freestyle-nozzle-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,eAAe,2EAM1B,CAAC"}
1
+ {"version":3,"file":"freestyle-nozzle-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-nozzle/freestyle-nozzle-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,2EAM1B,CAAC"}