@kosdev-code/kos-ui-sdk 2.1.32 → 2.1.34
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.
- package/core/core/decorators/index.d.ts +1 -0
- package/core/core/decorators/index.d.ts.map +1 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +12 -2
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts +58 -0
- package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -0
- package/core/core/decorators/kos-service-request.d.ts +54 -8
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-view-model.d.ts +162 -0
- package/core/core/decorators/kos-view-model.d.ts.map +1 -0
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/propKeys.d.ts +3 -0
- package/core/core/decorators/propKeys.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts +13 -3
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +1 -0
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/model/kos-service-request-manager.d.ts.map +1 -1
- package/core/core/transport/base-message-transport.d.ts +22 -2
- package/core/core/transport/base-message-transport.d.ts.map +1 -1
- package/core/core/transport/webSocketTransport.d.ts +1 -6
- package/core/core/transport/webSocketTransport.d.ts.map +1 -1
- package/core/util/ancestor-path-visitor.d.ts +58 -0
- package/core/util/ancestor-path-visitor.d.ts.map +1 -0
- package/core/util/container-utils.d.ts +167 -21
- package/core/util/container-utils.d.ts.map +1 -1
- package/core/util/index.d.ts +1 -0
- package/core/util/index.d.ts.map +1 -1
- package/core/util/kos-config-init.d.ts +1 -0
- package/core/util/kos-config-init.d.ts.map +1 -1
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/core/util/kos-service-request.d.ts +1 -1
- package/core/util/kos-service-request.d.ts.map +1 -1
- package/core/util/observable-proxy-map.d.ts.map +1 -1
- package/core/util/service-factory.d.ts +14 -11
- package/core/util/service-factory.d.ts.map +1 -1
- package/index.cjs +75 -75
- package/index.cjs.map +1 -1
- package/index.js +5578 -5087
- package/index.js.map +1 -1
- package/models/models/future/future-aware.d.ts.map +1 -1
- package/models/models/future/future-types.d.ts +4 -4
- package/models/models/future/future-types.d.ts.map +1 -1
- package/models/models/kos-expression-evaluator/index.d.ts +1 -1
- package/models/models/kos-expression-evaluator/index.d.ts.map +1 -1
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
- package/models/models/region-info/utils/unit-system-utils.d.ts.map +1 -1
- package/models/models/translation/translation-model.d.ts.map +1 -1
- package/models/models/trouble/index.d.ts +2 -1
- package/models/models/trouble/index.d.ts.map +1 -1
- package/models/models/trouble/services/trouble-services.d.ts +3 -2
- package/models/models/trouble/services/trouble-services.d.ts.map +1 -1
- package/models/utils/client.d.ts +8 -8
- package/models/utils/extension-manager.d.ts +49 -13
- package/models/utils/extension-manager.d.ts.map +1 -1
- package/models/utils/service.d.ts +8 -8
- package/models/utils/services/kos/1.6.5/service.d.ts +8 -8
- package/models/utils/services/kos/1.8.1/service.d.ts +8 -8
- package/models/utils/services/kos/daily/service.d.ts +8 -8
- package/models/utils/services/vfs/1.6.5/service.d.ts +8 -8
- package/models/utils/services/vfs/1.8.1/service.d.ts +8 -8
- package/models/utils/services/vfs/daily/service.d.ts +8 -8
- package/package.json +2 -2
- package/ui/hooks/index.d.ts +1 -0
- package/ui/hooks/index.d.ts.map +1 -1
- package/ui/hooks/view-model/index.d.ts +2 -0
- package/ui/hooks/view-model/index.d.ts.map +1 -0
- package/ui/hooks/view-model/use-view-model.d.ts +80 -0
- package/ui/hooks/view-model/use-view-model.d.ts.map +1 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { KosModelVisitor } from './kos-model-visitor';
|
|
2
|
+
import { IKosDataModel, IKosModel } from '../core/kosModel';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generic visitor that finds the ancestor path to a target item.
|
|
6
|
+
* Works with any KOS model hierarchy that implements the visitor pattern.
|
|
7
|
+
*
|
|
8
|
+
* Uses depth-first traversal, tracking the path as it goes.
|
|
9
|
+
* When the target is found, the accumulated path IS the ancestor list.
|
|
10
|
+
*
|
|
11
|
+
* Backtracking logic is entirely self-contained - no model changes needed.
|
|
12
|
+
* Works well for Studio's typical model sizes (dozens to ~100 items).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const visitor = new AncestorPathVisitor('target-item-id');
|
|
17
|
+
* visitor.start(rootContainerModel);
|
|
18
|
+
* const ancestors = visitor.getAncestorPath(); // ['root', 'parent', 'grandparent']
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @category Core
|
|
22
|
+
*/
|
|
23
|
+
export declare class AncestorPathVisitor extends KosModelVisitor {
|
|
24
|
+
private targetId;
|
|
25
|
+
private currentPath;
|
|
26
|
+
private foundPath;
|
|
27
|
+
constructor(targetId: string);
|
|
28
|
+
/**
|
|
29
|
+
* Override visit() to wrap the entire visit lifecycle with path tracking.
|
|
30
|
+
*
|
|
31
|
+
* Flow:
|
|
32
|
+
* 1. Check cycle detection (skip if already visited)
|
|
33
|
+
* 2. Push model to path
|
|
34
|
+
* 3. Call visitModel() to check if this is target
|
|
35
|
+
* 4. If not target, visit children
|
|
36
|
+
* 5. Pop from path if target not found in this subtree (backtrack)
|
|
37
|
+
*
|
|
38
|
+
* Note: We inline the base class logic rather than calling super.visit()
|
|
39
|
+
* because we need to control exactly when push/pop happens relative to
|
|
40
|
+
* the cycle detection and child traversal.
|
|
41
|
+
*/
|
|
42
|
+
visit(model: IKosModel): void;
|
|
43
|
+
/**
|
|
44
|
+
* Called for each model during traversal.
|
|
45
|
+
* Returns true to stop traversal when target is found.
|
|
46
|
+
*/
|
|
47
|
+
visitModel<T extends IKosDataModel>(model: T): boolean | void;
|
|
48
|
+
/**
|
|
49
|
+
* Get the ancestor path (IDs from root to parent, not including target).
|
|
50
|
+
* Returns empty array if target not found or target is at root level.
|
|
51
|
+
*/
|
|
52
|
+
getAncestorPath(): string[];
|
|
53
|
+
/**
|
|
54
|
+
* Check if target was found during traversal.
|
|
55
|
+
*/
|
|
56
|
+
wasFound(): boolean;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=ancestor-path-visitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ancestor-path-visitor.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/ancestor-path-visitor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,SAAS,CAAyB;gBAE9B,QAAQ,EAAE,MAAM;IAK5B;;;;;;;;;;;;;OAaG;IACM,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAgCtC;;;OAGG;IACH,UAAU,CAAC,CAAC,SAAS,aAAa,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,GAAG,IAAI;IAY7D;;;OAGG;IACH,eAAe,IAAI,MAAM,EAAE;IAI3B;;OAEG;IACH,QAAQ,IAAI,OAAO;CAGpB"}
|
|
@@ -5,53 +5,197 @@ interface Identifiable {
|
|
|
5
5
|
id: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Function that transforms an entity
|
|
9
|
-
*
|
|
8
|
+
* Function that transforms an entity's ID before container synchronization.
|
|
9
|
+
*
|
|
10
|
+
* The IdMapper pattern enables two critical capabilities:
|
|
11
|
+
*
|
|
12
|
+
* 1. **Compound Model IDs**: Transform simple backend IDs into compound IDs that include
|
|
13
|
+
* parent context (e.g., `"123"` → `"release-version-abc-123"`). This ensures unique
|
|
14
|
+
* model IDs even when backend IDs are only unique within their parent scope.
|
|
15
|
+
*
|
|
16
|
+
* 2. **Backend ID Preservation**: Add a `rawId` property to preserve the original backend ID
|
|
17
|
+
* for server communication while using compound IDs for model identity.
|
|
18
|
+
*
|
|
19
|
+
* @template D - Input entity type (data from backend)
|
|
20
|
+
* @template M - Mapped entity type (data after transformation, defaults to D if no transformation)
|
|
21
|
+
*
|
|
22
|
+
* @example Simple ID prefix transformation
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const idMapper: IdMapper<User, User & { rawId: string }> = (user) => ({
|
|
25
|
+
* ...user,
|
|
26
|
+
* rawId: user.id,
|
|
27
|
+
* id: `user-${user.id}`
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example Compound ID with parent context
|
|
32
|
+
* ```typescript
|
|
33
|
+
* type WithRawId<T> = T & { rawId: string };
|
|
34
|
+
*
|
|
35
|
+
* const idMapper: IdMapper<VersionResponse, WithRawId<VersionResponse>> = (version) => ({
|
|
36
|
+
* ...version,
|
|
37
|
+
* rawId: version.id,
|
|
38
|
+
* id: `release-version-${templateId}-${version.id}`
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @example Multi-level compound ID
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const idMapper: IdMapper<CandidateResponse, WithRawId<CandidateResponse>> = (candidate) => ({
|
|
45
|
+
* ...candidate,
|
|
46
|
+
* rawId: candidate.id,
|
|
47
|
+
* id: `release-candidate-${templateId}-${versionId}-${candidate.id}`
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
10
50
|
*/
|
|
11
|
-
export type IdMapper =
|
|
51
|
+
export type IdMapper<D extends Identifiable = Identifiable, M extends Identifiable = D> = (entity: D) => M;
|
|
12
52
|
type Container = IKosContainerModel<any, any> | IKosModelContainer<any>;
|
|
13
53
|
/**
|
|
14
54
|
* Parameters for resolving container deltas.
|
|
15
55
|
* @template T - The container type
|
|
16
|
-
* @template D - The entity type with an id property
|
|
56
|
+
* @template D - The input entity type with an id property
|
|
57
|
+
* @template M - The mapped entity type (after idMapper transformation)
|
|
17
58
|
*/
|
|
18
|
-
interface ResolveParams<T extends Container, D> {
|
|
59
|
+
interface ResolveParams<T extends Container, D extends Identifiable, M extends Identifiable = D> {
|
|
19
60
|
/** The container to synchronize */
|
|
20
61
|
container: T;
|
|
21
62
|
/** Callback to create a new item when an entity is added */
|
|
22
|
-
onAddItem: (entity:
|
|
63
|
+
onAddItem: (entity: M) => any;
|
|
23
64
|
/** Optional callback when an item is removed, receives the id to remove */
|
|
24
65
|
onRemoveItem?: (id: string) => any;
|
|
25
66
|
/** Optional callback when an existing item needs updating */
|
|
26
|
-
onUpdateItem?: (entity:
|
|
67
|
+
onUpdateItem?: (entity: M, existingModel: any) => any;
|
|
27
68
|
/** Optional mapper to transform entity ids before processing */
|
|
28
|
-
idMapper?: IdMapper
|
|
69
|
+
idMapper?: IdMapper<D, M>;
|
|
29
70
|
}
|
|
30
71
|
/**
|
|
31
72
|
* Creates a function that synchronizes a container with a new list of entities.
|
|
32
|
-
*
|
|
73
|
+
*
|
|
74
|
+
* This is the primary utility for delta-based container synchronization. It compares incoming
|
|
75
|
+
* data against the current container state and performs minimal operations (add/update/remove)
|
|
76
|
+
* to achieve synchronization.
|
|
77
|
+
*
|
|
78
|
+
* Key features:
|
|
79
|
+
* - **Delta resolution**: Only processes actual changes (add/update/remove)
|
|
80
|
+
* - **ID transformation**: Optional `idMapper` transforms backend IDs to model IDs
|
|
81
|
+
* - **Update-in-place**: `onUpdateItem` can update existing models without recreating
|
|
82
|
+
* - **Type safety**: Generic type parameters ensure type consistency through transformation
|
|
83
|
+
*
|
|
84
|
+
* Workflow:
|
|
85
|
+
* 1. Apply `idMapper` to transform entity IDs (if provided)
|
|
86
|
+
* 2. Calculate deltas: which IDs are missing from new data (removals)
|
|
87
|
+
* 3. Invoke `onRemoveItem` for each ID to remove
|
|
88
|
+
* 4. For each entity in new data:
|
|
89
|
+
* - If model exists: invoke `onUpdateItem` (if provided) or `onAddItem`
|
|
90
|
+
* - If model doesn't exist: invoke `onAddItem`
|
|
91
|
+
* 5. Add all new models to container in batch
|
|
33
92
|
*
|
|
34
93
|
* @template T - Container type implementing IKosModelContainer
|
|
35
|
-
* @template D -
|
|
94
|
+
* @template D - Input entity type (data from backend)
|
|
95
|
+
* @template M - Mapped entity type (after idMapper transformation, defaults to D)
|
|
96
|
+
*
|
|
36
97
|
* @param params - Configuration for resolving deltas
|
|
98
|
+
* @param params.container - The container to synchronize
|
|
99
|
+
* @param params.onAddItem - Callback to create a new model from entity data
|
|
100
|
+
* @param params.onUpdateItem - Optional callback to update existing model (return null to skip adding)
|
|
101
|
+
* @param params.onRemoveItem - Optional callback invoked with each ID to remove (default: identity function)
|
|
102
|
+
* @param params.idMapper - Optional function to transform entity IDs before processing
|
|
103
|
+
*
|
|
37
104
|
* @returns A function that accepts entities and synchronizes the container
|
|
38
105
|
*
|
|
39
|
-
* @example
|
|
106
|
+
* @example Basic synchronization without ID transformation
|
|
107
|
+
* ```typescript
|
|
40
108
|
* const syncUsers = resolveContainerDeltas({
|
|
41
109
|
* container: userContainer,
|
|
42
110
|
* onAddItem: (user) => User.instance(user.id).options(user).build(),
|
|
43
|
-
* onUpdateItem: (user, existing) =>
|
|
111
|
+
* onUpdateItem: (user, existing) => {
|
|
112
|
+
* existing.updateModel(user);
|
|
113
|
+
* return null; // Don't add, just updated in place
|
|
114
|
+
* },
|
|
44
115
|
* onRemoveItem: (id) => id
|
|
45
116
|
* });
|
|
46
117
|
* syncUsers(newUserList);
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* @example ID transformation with compound IDs and rawId preservation
|
|
121
|
+
* ```typescript
|
|
122
|
+
* type WithRawId<T> = T & { rawId: string };
|
|
123
|
+
*
|
|
124
|
+
* const syncVersions = resolveContainerDeltas<
|
|
125
|
+
* typeof template.versions,
|
|
126
|
+
* VersionResponse,
|
|
127
|
+
* WithRawId<VersionResponse>
|
|
128
|
+
* >({
|
|
129
|
+
* container: template.versions,
|
|
130
|
+
* idMapper: (versionData) => ({
|
|
131
|
+
* ...versionData,
|
|
132
|
+
* rawId: versionData.id, // Preserve backend ID
|
|
133
|
+
* id: ReleaseIdFactory.version(templateId, versionData.id) // Compound model ID
|
|
134
|
+
* }),
|
|
135
|
+
* onAddItem: (data) => {
|
|
136
|
+
* const model = ReleaseVersion.instance(data.id)
|
|
137
|
+
* .options({
|
|
138
|
+
* rawId: data.rawId, // Store backend ID for server communication
|
|
139
|
+
* version: data.version,
|
|
140
|
+
* // ... other options
|
|
141
|
+
* })
|
|
142
|
+
* .build();
|
|
143
|
+
* // Recursively sync nested containers
|
|
144
|
+
* syncCandidates(model, data.candidates || []);
|
|
145
|
+
* return model;
|
|
146
|
+
* },
|
|
147
|
+
* onUpdateItem: (data, existingVersion) => {
|
|
148
|
+
* existingVersion.updateModel({
|
|
149
|
+
* rawId: data.rawId || existingVersion.rawId,
|
|
150
|
+
* version: data.version,
|
|
151
|
+
* // ... other updates
|
|
152
|
+
* });
|
|
153
|
+
* // Recursively sync nested containers
|
|
154
|
+
* syncCandidates(existingVersion, data.candidates || []);
|
|
155
|
+
* return null; // Don't add, just updated in place
|
|
156
|
+
* },
|
|
157
|
+
* onRemoveItem: (id) => id
|
|
158
|
+
* })(versionsData);
|
|
159
|
+
* ```
|
|
160
|
+
*
|
|
161
|
+
* @example Nested container synchronization
|
|
162
|
+
* ```typescript
|
|
163
|
+
* // Parent level
|
|
164
|
+
* syncTemplates(containerModel, templatesData);
|
|
165
|
+
*
|
|
166
|
+
* // Within onAddItem and onUpdateItem, sync children
|
|
167
|
+
* function syncTemplates(container, templates) {
|
|
168
|
+
* resolveContainerDeltas({
|
|
169
|
+
* container: container.container,
|
|
170
|
+
* idMapper: (template) => ({
|
|
171
|
+
* ...template,
|
|
172
|
+
* rawId: template.id,
|
|
173
|
+
* id: ReleaseIdFactory.template(template.id)
|
|
174
|
+
* }),
|
|
175
|
+
* onAddItem: (template) => {
|
|
176
|
+
* const model = createTemplateModel(template);
|
|
177
|
+
* syncQueues(model, template.queues); // Nested sync
|
|
178
|
+
* syncVersions(model, template.versions); // Nested sync
|
|
179
|
+
* return model;
|
|
180
|
+
* },
|
|
181
|
+
* onUpdateItem: (template, existing) => {
|
|
182
|
+
* existing.updateModel(template);
|
|
183
|
+
* syncQueues(existing, template.queues); // Nested sync
|
|
184
|
+
* syncVersions(existing, template.versions); // Nested sync
|
|
185
|
+
* return null;
|
|
186
|
+
* }
|
|
187
|
+
* })(templates);
|
|
188
|
+
* }
|
|
189
|
+
* ```
|
|
47
190
|
*/
|
|
48
|
-
export declare const resolveContainerDeltas: <T extends IKosModelContainer<any>, D extends Identifiable>({ container, onAddItem, onUpdateItem, onRemoveItem, idMapper, }: ResolveParams<T, D>) => (entities: D[]) => void;
|
|
191
|
+
export declare const resolveContainerDeltas: <T extends IKosModelContainer<any>, D extends Identifiable, M extends Identifiable = D>({ container, onAddItem, onUpdateItem, onRemoveItem, idMapper, }: ResolveParams<T, D, M>) => (entities: D[]) => void;
|
|
49
192
|
/**
|
|
50
193
|
* Creates a function that synchronizes a container model's list with new entities.
|
|
51
194
|
* Simpler alternative to resolveContainerDeltas that directly invokes callbacks for each addition and removal.
|
|
52
195
|
*
|
|
53
196
|
* @template T - Container model type implementing IKosContainerModel
|
|
54
|
-
* @template D -
|
|
197
|
+
* @template D - Input entity type with an id property
|
|
198
|
+
* @template M - Mapped entity type (after idMapper transformation)
|
|
55
199
|
* @param params - Configuration for resolving deltas
|
|
56
200
|
* @returns A function that accepts entities and synchronizes by invoking callbacks
|
|
57
201
|
*
|
|
@@ -63,28 +207,30 @@ export declare const resolveContainerDeltas: <T extends IKosModelContainer<any>,
|
|
|
63
207
|
* });
|
|
64
208
|
* syncLayers(newLayerList);
|
|
65
209
|
*/
|
|
66
|
-
export declare const resolveListDeltas: <T extends IKosContainerModel<any, any>, D extends Identifiable>({ container, onAddItem, onRemoveItem, idMapper, }: ResolveParams<T, D>) => (entities: D[]) => void;
|
|
210
|
+
export declare const resolveListDeltas: <T extends IKosContainerModel<any, any>, D extends Identifiable, M extends Identifiable = D>({ container, onAddItem, onRemoveItem, idMapper, }: ResolveParams<T, D, M>) => (entities: D[]) => void;
|
|
67
211
|
/**
|
|
68
212
|
* Parameters for resolving deltas on plain item arrays (not container models).
|
|
69
213
|
* @template T - Current item type with an id property
|
|
70
|
-
* @template D -
|
|
214
|
+
* @template D - Input entity type with an id property
|
|
215
|
+
* @template M - Mapped entity type (after idMapper transformation)
|
|
71
216
|
*/
|
|
72
|
-
interface ResolveItemsParams<T extends Identifiable, D> {
|
|
217
|
+
interface ResolveItemsParams<T extends Identifiable, D extends Identifiable, M extends Identifiable = D> {
|
|
73
218
|
/** The current array of items to synchronize */
|
|
74
219
|
items: T[];
|
|
75
220
|
/** Callback invoked for each entity to add */
|
|
76
|
-
onAddItem: (entity:
|
|
221
|
+
onAddItem: (entity: M) => void;
|
|
77
222
|
/** Callback invoked for each id to remove */
|
|
78
223
|
onRemoveItem: (id: string) => void;
|
|
79
224
|
/** Optional mapper to transform entity ids before processing */
|
|
80
|
-
idMapper?: IdMapper
|
|
225
|
+
idMapper?: IdMapper<D, M>;
|
|
81
226
|
}
|
|
82
227
|
/**
|
|
83
228
|
* Creates a function that synchronizes a plain array of items with new entities.
|
|
84
229
|
* Does not require a container model - works with any array of identifiable items.
|
|
85
230
|
*
|
|
86
231
|
* @template T - Current item type with an id property
|
|
87
|
-
* @template D -
|
|
232
|
+
* @template D - Input entity type with an id property
|
|
233
|
+
* @template M - Mapped entity type (after idMapper transformation)
|
|
88
234
|
* @param params - Configuration including the items array and callbacks
|
|
89
235
|
* @returns A function that accepts entities and synchronizes the array
|
|
90
236
|
*
|
|
@@ -100,7 +246,7 @@ interface ResolveItemsParams<T extends Identifiable, D> {
|
|
|
100
246
|
* });
|
|
101
247
|
* syncItems(newItems);
|
|
102
248
|
*/
|
|
103
|
-
export declare const resolveItemListDeltas: <T extends Identifiable, D extends Identifiable>({ items, onAddItem, onRemoveItem, idMapper, }: ResolveItemsParams<T, D>) => (entities: D[]) => void;
|
|
249
|
+
export declare const resolveItemListDeltas: <T extends Identifiable, D extends Identifiable, M extends Identifiable = D>({ items, onAddItem, onRemoveItem, idMapper, }: ResolveItemsParams<T, D, M>) => (entities: D[]) => void;
|
|
104
250
|
/**
|
|
105
251
|
* Removes a prefix from an id string if present.
|
|
106
252
|
* Useful for normalizing ids that may have parent or namespace prefixes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/container-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ;AAqBD
|
|
1
|
+
{"version":3,"file":"container-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/container-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,MAAM,QAAQ,CAClB,CAAC,SAAS,YAAY,GAAG,YAAY,EACrC,CAAC,S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ChD,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,8CAA8C;IAC9C,SAAS,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAC/B,6CAA6C;IAC7C,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,qBAAqB,8HAM7B,mBAAmB,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,gBACnB,CAAC,EAAE,SAKb,CAAC;AAEJ;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,OAAQ,MAAM,4BAMnC,CAAC"}
|
package/core/util/index.d.ts
CHANGED
package/core/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAA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AAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
@@ -3,6 +3,7 @@ interface KosConfig {
|
|
|
3
3
|
profiles: string[];
|
|
4
4
|
[key: string]: boolean | string[] | string | number | undefined;
|
|
5
5
|
}
|
|
6
|
+
export declare const PROFILE_ENABLE_RELEASES = "studio.enable.releases";
|
|
6
7
|
export declare const PROFILE_TOOLS_PREVIEW = "studio.tools.preview";
|
|
7
8
|
export declare const PROFILE_RELAX_STORE_VALIDATION = "studio.relax.store.validation";
|
|
8
9
|
export declare const PROFILE_LOG_DEBUG = "studio.log.debug";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-config-init.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/kos-config-init.ts"],"names":[],"mappings":"AAAA,UAAU,SAAS;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACjE;AAED,eAAO,MAAM,qBAAqB,yBAAyB,CAAC;AAC5D,eAAO,MAAM,8BAA8B,kCAAkC,CAAC;AAC9E,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AACpD,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAUlD,eAAO,MAAM,eAAe,EAAE,SAAqB,CAAC;AAEpD,eAAO,MAAM,kBAAkB,gBAAuC,CAAC;AAEvE,eAAO,MAAM,aAAa,YAAa,MAAM,YACL,CAAC;AAEzC,eAAO,MAAM,mBAAmB,eAAyC,CAAC"}
|
|
1
|
+
{"version":3,"file":"kos-config-init.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/kos-config-init.ts"],"names":[],"mappings":"AAAA,UAAU,SAAS;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACjE;AAED,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,qBAAqB,yBAAyB,CAAC;AAC5D,eAAO,MAAM,8BAA8B,kCAAkC,CAAC;AAC9E,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AACpD,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAUlD,eAAO,MAAM,eAAe,EAAE,SAAqB,CAAC;AAEpD,eAAO,MAAM,kBAAkB,gBAAuC,CAAC;AAEvE,eAAO,MAAM,aAAa,YAAa,MAAM,YACL,CAAC;AAEzC,eAAO,MAAM,mBAAmB,eAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-fetch.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/kos-fetch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAmBrE;;;;GAIG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"kos-fetch.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/kos-fetch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAmBrE;;;;GAIG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;CAChB;AAkTD;;GAEG;AACH,QAAA,IAAI,QAAQ,QAAS,CAAC;AACtB,QAAA,IAAI,QAAQ,QAtNL,MAAM,YACD,eAAe,KACxB,QAAQ,QAAQ,CAoNM,CAAC;AAS1B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -59,7 +59,7 @@ export type ClientBody<Paths extends Record<string, any>, K extends keyof Paths,
|
|
|
59
59
|
} ? B[keyof B] : never;
|
|
60
60
|
export type ServiceResponse<T> = [string, null] | [null, T];
|
|
61
61
|
export type DeepRequired<T> = {
|
|
62
|
-
[K in keyof T]-?: T[K] extends object ? DeepRequired<T[K]> : T[K];
|
|
62
|
+
[K in keyof T]-?: T[K] extends object ? DeepRequired<T[K]> : T[K] extends Array<infer U> ? Array<DeepRequired<U>> : T[K];
|
|
63
63
|
};
|
|
64
64
|
export type ElementType<T> = T extends (infer U)[] ? U : never;
|
|
65
65
|
type RequestOptions = Omit<KosFetchOptions, "method" | "body">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-service-request.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/kos-service-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;CAI1B,CAAC;AAIF,KAAK,YAAY,CAAC,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,CAAC;CAC7D,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,OAAO,CACvC,YAAY,CAAC,CAAC,CAAC,EACf,YAAY,GAAG,aAAa,CAC7B,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAC5B,MAAM,IAAI,KAAK,GAAG,KAAK,GAAG,MAAM,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GAAG,CAAC,GAAG,KAAK,CAAC;AAE5D,MAAM,MAAM,UAAU,CACpB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,CAAC,SAAS,MAAM,KAAK,EACrB,CAAC,SAAS,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,IAC3C,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;IAAE,WAAW,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC,CAAA;KAAE,CAAA;CAAE,GACzD,CAAC,CAAC,MAAM,CAAC,CAAC,GACV,KAAK,CAAC;AAEV,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAE5D,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;KAC3B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"kos-service-request.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/kos-service-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;CAI1B,CAAC;AAIF,KAAK,YAAY,CAAC,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,CAAC;CAC7D,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,OAAO,CACvC,YAAY,CAAC,CAAC,CAAC,EACf,YAAY,GAAG,aAAa,CAC7B,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAC5B,MAAM,IAA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|
|
1
|
-
{"version":3,"file":"observable-proxy-map.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/observable-proxy-map.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,eAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"observable-proxy-map.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/observable-proxy-map.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAyI7D,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG;IACpD,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACrC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IAClB,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IACrB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,cAAc,gDACX,CAAC,KACd,QAAQ,CAAC,CAGX,CAAC"}
|
|
@@ -20,7 +20,7 @@ interface DeleteModelParams extends CommonParams {
|
|
|
20
20
|
/**
|
|
21
21
|
* Represents common parameters shared across different service operations.
|
|
22
22
|
*/
|
|
23
|
-
type CommonParams = Partial<Orderable> & Partial<StudioRequest> & Partial<FosRequest> & Partial<RoutableRequest> & Partial<TimeoutAware>;
|
|
23
|
+
type CommonParams = Partial<Orderable> & Partial<StudioRequest> & Partial<FosRequest> & Partial<RoutableRequest> & Partial<TimeoutAware> & Partial<AbortableRequest>;
|
|
24
24
|
/**
|
|
25
25
|
* Represents parameters for fetching a list of entities.
|
|
26
26
|
*/
|
|
@@ -40,6 +40,9 @@ interface Orderable {
|
|
|
40
40
|
interface TimeoutAware {
|
|
41
41
|
timeout: number;
|
|
42
42
|
}
|
|
43
|
+
interface AbortableRequest {
|
|
44
|
+
signal: AbortSignal;
|
|
45
|
+
}
|
|
43
46
|
interface FosRequest {
|
|
44
47
|
fos: boolean;
|
|
45
48
|
bridge: boolean;
|
|
@@ -50,12 +53,12 @@ interface StudioRequest {
|
|
|
50
53
|
interface RoutableRequest {
|
|
51
54
|
destinationAddress: string;
|
|
52
55
|
}
|
|
53
|
-
interface AddModelParams<Request> extends Partial<Orderable>, Partial<StudioRequest>, Partial<FosRequest>, Partial<RoutableRequest>, Partial<TimeoutAware> {
|
|
56
|
+
interface AddModelParams<Request> extends Partial<Orderable>, Partial<StudioRequest>, Partial<FosRequest>, Partial<RoutableRequest>, Partial<TimeoutAware>, Partial<AbortableRequest> {
|
|
54
57
|
model: Request;
|
|
55
58
|
urlOverride?: string;
|
|
56
59
|
tracker?: string;
|
|
57
60
|
}
|
|
58
|
-
interface ModifyModelParams<Request> extends Partial<Orderable>, Partial<StudioRequest>, Partial<FosRequest>, Partial<RoutableRequest>, Partial<TimeoutAware> {
|
|
61
|
+
interface ModifyModelParams<Request> extends Partial<Orderable>, Partial<StudioRequest>, Partial<FosRequest>, Partial<RoutableRequest>, Partial<TimeoutAware>, Partial<AbortableRequest> {
|
|
59
62
|
model?: Request;
|
|
60
63
|
id: string;
|
|
61
64
|
urlOverride?: string;
|
|
@@ -121,56 +124,56 @@ export declare const ServiceFactory: {
|
|
|
121
124
|
* @param params - The parameters for the request, including common options.
|
|
122
125
|
* @returns The list of entities.
|
|
123
126
|
*/
|
|
124
|
-
getAll: <Response>({ urlOverride, ordered, studio, fos, bridge, timeout, destinationAddress: destinationAddressOverride, }: GetAllParams) => Promise<KosServiceResponse<Response[]> | undefined>;
|
|
127
|
+
getAll: <Response>({ urlOverride, ordered, studio, fos, bridge, timeout, signal, destinationAddress: destinationAddressOverride, }: GetAllParams) => Promise<KosServiceResponse<Response[]> | undefined>;
|
|
125
128
|
/**
|
|
126
129
|
* Retrieves details of a specific entity by its ID.
|
|
127
130
|
*
|
|
128
131
|
* @param params - The parameters for the request, including common options and the entity ID.
|
|
129
132
|
* @returns Details of the requested entity.
|
|
130
133
|
*/
|
|
131
|
-
getModelById: <Response_1>({ urlOverride, id, ordered, studio, fos, bridge, timeout, destinationAddress: destinationAddressOverride, }: GetModelByIdParams) => Promise<KosServiceResponse<Response_1> | undefined>;
|
|
134
|
+
getModelById: <Response_1>({ urlOverride, id, ordered, studio, fos, bridge, timeout, signal, destinationAddress: destinationAddressOverride, }: GetModelByIdParams) => Promise<KosServiceResponse<Response_1> | undefined>;
|
|
132
135
|
/**
|
|
133
136
|
* Retrieves details of a single entity.
|
|
134
137
|
*
|
|
135
138
|
* @param params - The parameters for the request, including common options.
|
|
136
139
|
* @returns Details of the requested entity.
|
|
137
140
|
*/
|
|
138
|
-
getOne: <Response_2>({ urlOverride, ordered, studio, fos, bridge, tracker, timeout, destinationAddress: destinationAddressOverride, }: GetAllParams) => Promise<KosServiceResponse<Response_2> | undefined>;
|
|
141
|
+
getOne: <Response_2>({ urlOverride, ordered, studio, fos, bridge, tracker, timeout, signal, destinationAddress: destinationAddressOverride, }: GetAllParams) => Promise<KosServiceResponse<Response_2> | undefined>;
|
|
139
142
|
/**
|
|
140
143
|
* Adds a new entity to the server.
|
|
141
144
|
*
|
|
142
145
|
* @param params - The parameters for the request, including common options and the new entity model.
|
|
143
146
|
* @returns An empty response with status 200.
|
|
144
147
|
*/
|
|
145
|
-
addModel: <Request>({ model, urlOverride, ordered, tracker, studio, fos, bridge, timeout, destinationAddress: destinationAddressOverride, }: AddModelParams<Request>) => Promise<KosServiceResponse<any> | undefined>;
|
|
148
|
+
addModel: <Request>({ model, urlOverride, ordered, tracker, studio, fos, bridge, timeout, signal, destinationAddress: destinationAddressOverride, }: AddModelParams<Request>) => Promise<KosServiceResponse<any> | undefined>;
|
|
146
149
|
/**
|
|
147
150
|
* Deletes an entity from the server based on its ID.
|
|
148
151
|
*
|
|
149
152
|
* @param params - The parameters for the request, including common options and the entity ID.
|
|
150
153
|
* @returns An empty response with status 200.
|
|
151
154
|
*/
|
|
152
|
-
deleteModel: <ResponseType = unknown>({ id, tracker, urlOverride, ordered, studio, fos, bridge, destinationAddress: destinationAddressOverride, }: DeleteModelParams) => Promise<KosServiceResponse<ResponseType> | undefined>;
|
|
155
|
+
deleteModel: <ResponseType = unknown>({ id, tracker, urlOverride, ordered, studio, fos, bridge, timeout, signal, destinationAddress: destinationAddressOverride, }: DeleteModelParams) => Promise<KosServiceResponse<ResponseType> | undefined>;
|
|
153
156
|
/**
|
|
154
157
|
* Modifies an existing entity on the server.
|
|
155
158
|
*
|
|
156
159
|
* @param params - The parameters for the request, including common options and the entity model.
|
|
157
160
|
* @returns An empty response with status 200.
|
|
158
161
|
*/
|
|
159
|
-
modifyModel: <Request_1>({ model, id, urlOverride, ordered, studio, fos, bridge, timeout, destinationAddress: destinationAddressOverride, }: ModifyModelParams<Request_1>) => Promise<KosServiceResponse<any> | undefined>;
|
|
162
|
+
modifyModel: <Request_1>({ model, id, urlOverride, ordered, studio, fos, bridge, timeout, signal, destinationAddress: destinationAddressOverride, }: ModifyModelParams<Request_1>) => Promise<KosServiceResponse<any> | undefined>;
|
|
160
163
|
/**
|
|
161
164
|
* Modifies an existing entity on the server using the HTTP PUT method.
|
|
162
165
|
*
|
|
163
166
|
* @param params - The parameters for the request, including common options and the entity model.
|
|
164
167
|
* @returns An empty response with status 200.
|
|
165
168
|
*/
|
|
166
|
-
putModel: <Request_1>({ model, id, urlOverride, ordered, studio, fos, bridge, timeout, destinationAddress: destinationAddressOverride, }: ModifyModelParams<Request_1>) => Promise<KosServiceResponse<any> | undefined>;
|
|
169
|
+
putModel: <Request_1>({ model, id, urlOverride, ordered, studio, fos, bridge, timeout, signal, destinationAddress: destinationAddressOverride, }: ModifyModelParams<Request_1>) => Promise<KosServiceResponse<any> | undefined>;
|
|
167
170
|
/**
|
|
168
171
|
* Adds a new entity to the server using the HTTP POST method.
|
|
169
172
|
*
|
|
170
173
|
* @param params - The parameters for the request, including common options and the new entity model.
|
|
171
174
|
* @returns An empty response with status 200.
|
|
172
175
|
*/
|
|
173
|
-
postModel: <Request>({ model, urlOverride, ordered, tracker, studio, fos, bridge, timeout, destinationAddress: destinationAddressOverride, }: AddModelParams<Request>) => Promise<KosServiceResponse<any> | undefined>;
|
|
176
|
+
postModel: <Request>({ model, urlOverride, ordered, tracker, studio, fos, bridge, timeout, signal, destinationAddress: destinationAddressOverride, }: AddModelParams<Request>) => Promise<KosServiceResponse<any> | undefined>;
|
|
174
177
|
};
|
|
175
178
|
};
|
|
176
179
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-factory.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/service-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;
|
|
1
|
+
{"version":3,"file":"service-factory.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/service-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAOH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,cAAe,MAAM;;;CAIlD,CAAC;AAWF;;GAEG;AACH,UAAU,iBAAkB,SAAQ,YAAY;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAyED;;GAEG;AACH,KAAK,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,GACpC,OAAO,CAAC,aAAa,CAAC,GACtB,OAAO,CAAC,UAAU,CAAC,GACnB,OAAO,CAAC,eAAe,CAAC,GACxB,OAAO,CAAC,YAA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