@umbraco-cms/backoffice 1.0.0-next.de0ffca0 → 1.0.0-next.f2af51c4
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/backend-api.d.ts +594 -272
- package/context-api.d.ts +62 -2
- package/controller.d.ts +2 -1
- package/custom-elements.json +525 -57
- package/element.d.ts +1 -1
- package/entity-action.d.ts +19 -2
- package/extensions-api.d.ts +2 -1
- package/extensions-registry.d.ts +6 -3
- package/modal.d.ts +27 -318
- package/models.d.ts +8 -8
- package/observable-api.d.ts +62 -48
- package/package.json +1 -1
- package/picker-input.d.ts +24 -0
- package/repository.d.ts +65 -28
- package/router.d.ts +272 -22
- package/store.d.ts +48 -53
- package/utils.d.ts +3 -1
- package/vscode-html-custom-data.json +219 -53
- package/workspace.d.ts +4 -4
package/observable-api.d.ts
CHANGED
|
@@ -18,55 +18,55 @@ declare class UmbObserverController<T = unknown> extends UmbObserver<T> implemen
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @export
|
|
21
|
-
* @class
|
|
21
|
+
* @class UmbBasicState
|
|
22
22
|
* @extends {BehaviorSubject<T>}
|
|
23
23
|
* @description - A RxJS BehaviorSubject this Subject ensures the data is unique, not updating any Observes unless there is an actual change of the value.
|
|
24
24
|
*/
|
|
25
|
-
declare class
|
|
25
|
+
declare class UmbBasicState<T> extends BehaviorSubject<T> {
|
|
26
26
|
constructor(initialData: T);
|
|
27
27
|
next(newData: T): void;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* @export
|
|
32
|
-
* @class
|
|
32
|
+
* @class UmbBooleanState
|
|
33
33
|
* @extends {BehaviorSubject<T>}
|
|
34
34
|
* @description - A RxJS BehaviorSubject this Subject ensures the data is unique, not updating any Observes unless there is an actual change of the value.
|
|
35
35
|
*/
|
|
36
|
-
declare class
|
|
36
|
+
declare class UmbBooleanState<T> extends UmbBasicState<T | boolean> {
|
|
37
37
|
constructor(initialData: T | boolean);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* @export
|
|
42
|
-
* @class
|
|
42
|
+
* @class UmbNumberState
|
|
43
43
|
* @extends {BehaviorSubject<T>}
|
|
44
44
|
* @description - A RxJS BehaviorSubject this Subject ensures the data is unique, not updating any Observes unless there is an actual change of the value.
|
|
45
45
|
*/
|
|
46
|
-
declare class
|
|
46
|
+
declare class UmbNumberState<T> extends UmbBasicState<T | number> {
|
|
47
47
|
constructor(initialData: T | number);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* @export
|
|
52
|
-
* @class
|
|
53
|
-
* @extends {
|
|
52
|
+
* @class UmbStringState
|
|
53
|
+
* @extends {UmbBasicState<T>}
|
|
54
54
|
* @description - A RxJS BehaviorSubject this Subject ensures the data is unique, not updating any Observes unless there is an actual change of the value.
|
|
55
55
|
*/
|
|
56
|
-
declare class
|
|
56
|
+
declare class UmbStringState<T> extends UmbBasicState<T | string> {
|
|
57
57
|
constructor(initialData: T | string);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
interface
|
|
61
|
-
equal(otherClass:
|
|
60
|
+
interface UmbClassStateData {
|
|
61
|
+
equal(otherClass: UmbClassStateData): boolean;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* @export
|
|
65
|
-
* @class
|
|
65
|
+
* @class UmbClassState
|
|
66
66
|
* @extends {BehaviorSubject<T>}
|
|
67
67
|
* @description - A RxJS BehaviorSubject which can hold class instance which has a equal method to compare in coming instances for changes.
|
|
68
68
|
*/
|
|
69
|
-
declare class
|
|
69
|
+
declare class UmbClassState<T extends UmbClassStateData | undefined | null> extends BehaviorSubject<T> {
|
|
70
70
|
constructor(initialData: T);
|
|
71
71
|
next(newData: T): void;
|
|
72
72
|
}
|
|
@@ -77,12 +77,12 @@ type MemoizationFunction<R> = (previousResult: R, currentResult: R) => boolean;
|
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* @export
|
|
80
|
-
* @class
|
|
80
|
+
* @class UmbDeepState
|
|
81
81
|
* @extends {BehaviorSubject<T>}
|
|
82
82
|
* @description - A RxJS BehaviorSubject which deepFreezes the data to ensure its not manipulated from any implementations.
|
|
83
83
|
* Additionally the Subject ensures the data is unique, not updating any Observes unless there is an actual change of the content.
|
|
84
84
|
*/
|
|
85
|
-
declare class
|
|
85
|
+
declare class UmbDeepState<T> extends BehaviorSubject<T> {
|
|
86
86
|
constructor(initialData: T);
|
|
87
87
|
getObservablePart<ReturnType>(mappingFunction: MappingFunction<T, ReturnType>, memoizationFunction?: MemoizationFunction<ReturnType>): rxjs.Observable<ReturnType>;
|
|
88
88
|
next(newData: T): void;
|
|
@@ -90,48 +90,62 @@ declare class DeepState<T> extends BehaviorSubject<T> {
|
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* @export
|
|
93
|
-
* @class
|
|
94
|
-
* @extends {
|
|
93
|
+
* @class UmbArrayState
|
|
94
|
+
* @extends {UmbDeepState<T>}
|
|
95
95
|
* @description - A RxJS BehaviorSubject which deepFreezes the object-data to ensure its not manipulated from any implementations.
|
|
96
96
|
* Additionally the Subject ensures the data is unique, not updating any Observes unless there is an actual change of the content.
|
|
97
97
|
*
|
|
98
98
|
* The ArrayState provides methods to append data when the data is an Object.
|
|
99
99
|
*/
|
|
100
|
-
declare class
|
|
101
|
-
private
|
|
100
|
+
declare class UmbArrayState<T> extends UmbDeepState<T[]> {
|
|
101
|
+
#private;
|
|
102
102
|
constructor(initialData: T[], getUniqueMethod?: (entry: T) => unknown);
|
|
103
|
+
/**
|
|
104
|
+
* @method sortBy
|
|
105
|
+
* @param {(a: T, b: T) => number} sortMethod - A method to be used for sorting everytime data is set.
|
|
106
|
+
* @description - A sort method to this Subject.
|
|
107
|
+
* @example <caption>Example add sort method</caption>
|
|
108
|
+
* const data = [
|
|
109
|
+
* { key: 1, value: 'foo'},
|
|
110
|
+
* { key: 2, value: 'bar'}
|
|
111
|
+
* ];
|
|
112
|
+
* const myState = new UmbArrayState(data, (x) => x.key);
|
|
113
|
+
* myState.sortBy((a, b) => (a.sortOrder || 0) - (b.sortOrder || 0));
|
|
114
|
+
*/
|
|
115
|
+
sortBy(sortMethod?: (a: T, b: T) => number): this;
|
|
116
|
+
next(value: T[]): void;
|
|
103
117
|
/**
|
|
104
118
|
* @method remove
|
|
105
119
|
* @param {unknown[]} uniques - The unique values to remove.
|
|
106
|
-
* @return {
|
|
120
|
+
* @return {UmbArrayState<T>} Reference to it self.
|
|
107
121
|
* @description - Remove some new data of this Subject.
|
|
108
|
-
* @example <caption>Example remove entry with
|
|
122
|
+
* @example <caption>Example remove entry with id '1' and '2'</caption>
|
|
109
123
|
* const data = [
|
|
110
|
-
* {
|
|
111
|
-
* {
|
|
124
|
+
* { id: 1, value: 'foo'},
|
|
125
|
+
* { id: 2, value: 'bar'}
|
|
112
126
|
* ];
|
|
113
|
-
* const myState = new
|
|
127
|
+
* const myState = new UmbArrayState(data, (x) => x.id);
|
|
114
128
|
* myState.remove([1, 2]);
|
|
115
129
|
*/
|
|
116
130
|
remove(uniques: unknown[]): this;
|
|
117
131
|
/**
|
|
118
132
|
* @method removeOne
|
|
119
133
|
* @param {unknown} unique - The unique value to remove.
|
|
120
|
-
* @return {
|
|
134
|
+
* @return {UmbArrayState<T>} Reference to it self.
|
|
121
135
|
* @description - Remove some new data of this Subject.
|
|
122
|
-
* @example <caption>Example remove entry with
|
|
136
|
+
* @example <caption>Example remove entry with id '1'</caption>
|
|
123
137
|
* const data = [
|
|
124
|
-
* {
|
|
125
|
-
* {
|
|
138
|
+
* { id: 1, value: 'foo'},
|
|
139
|
+
* { id: 2, value: 'bar'}
|
|
126
140
|
* ];
|
|
127
|
-
* const myState = new
|
|
141
|
+
* const myState = new UmbArrayState(data, (x) => x.id);
|
|
128
142
|
* myState.removeOne(1);
|
|
129
143
|
*/
|
|
130
144
|
removeOne(unique: unknown): this;
|
|
131
145
|
/**
|
|
132
146
|
* @method filter
|
|
133
147
|
* @param {unknown} filterMethod - The unique value to remove.
|
|
134
|
-
* @return {
|
|
148
|
+
* @return {UmbArrayState<T>} Reference to it self.
|
|
135
149
|
* @description - Remove some new data of this Subject.
|
|
136
150
|
* @example <caption>Example remove entry with key '1'</caption>
|
|
137
151
|
* const data = [
|
|
@@ -139,7 +153,7 @@ declare class ArrayState<T> extends DeepState<T[]> {
|
|
|
139
153
|
* { key: 2, value: 'bar'},
|
|
140
154
|
* { key: 3, value: 'poo'}
|
|
141
155
|
* ];
|
|
142
|
-
* const myState = new
|
|
156
|
+
* const myState = new UmbArrayState(data, (x) => x.key);
|
|
143
157
|
* myState.filter((entry) => entry.key !== 1);
|
|
144
158
|
*
|
|
145
159
|
* Result:
|
|
@@ -153,28 +167,28 @@ declare class ArrayState<T> extends DeepState<T[]> {
|
|
|
153
167
|
/**
|
|
154
168
|
* @method appendOne
|
|
155
169
|
* @param {T} entry - new data to be added in this Subject.
|
|
156
|
-
* @return {
|
|
170
|
+
* @return {UmbArrayState<T>} Reference to it self.
|
|
157
171
|
* @description - Append some new data to this Subject.
|
|
158
172
|
* @example <caption>Example append some data.</caption>
|
|
159
173
|
* const data = [
|
|
160
174
|
* { key: 1, value: 'foo'},
|
|
161
175
|
* { key: 2, value: 'bar'}
|
|
162
176
|
* ];
|
|
163
|
-
* const myState = new
|
|
177
|
+
* const myState = new UmbArrayState(data);
|
|
164
178
|
* myState.append({ key: 1, value: 'replaced-foo'});
|
|
165
179
|
*/
|
|
166
180
|
appendOne(entry: T): this;
|
|
167
181
|
/**
|
|
168
182
|
* @method append
|
|
169
183
|
* @param {T[]} entries - A array of new data to be added in this Subject.
|
|
170
|
-
* @return {
|
|
184
|
+
* @return {UmbArrayState<T>} Reference to it self.
|
|
171
185
|
* @description - Append some new data to this Subject, if it compares to existing data it will replace it.
|
|
172
186
|
* @example <caption>Example append some data.</caption>
|
|
173
187
|
* const data = [
|
|
174
188
|
* { key: 1, value: 'foo'},
|
|
175
189
|
* { key: 2, value: 'bar'}
|
|
176
190
|
* ];
|
|
177
|
-
* const myState = new
|
|
191
|
+
* const myState = new UmbArrayState(data);
|
|
178
192
|
* myState.append([
|
|
179
193
|
* { key: 1, value: 'replaced-foo'},
|
|
180
194
|
* { key: 3, value: 'another-bla'}
|
|
@@ -185,14 +199,14 @@ declare class ArrayState<T> extends DeepState<T[]> {
|
|
|
185
199
|
* @method updateOne
|
|
186
200
|
* @param {unknown} unique - Unique value to find entry to update.
|
|
187
201
|
* @param {Partial<T>} entry - new data to be added in this Subject.
|
|
188
|
-
* @return {
|
|
202
|
+
* @return {UmbArrayState<T>} Reference to it self.
|
|
189
203
|
* @description - Update a item with some new data, requires the ArrayState to be constructed with a getUnique method.
|
|
190
204
|
* @example <caption>Example append some data.</caption>
|
|
191
205
|
* const data = [
|
|
192
206
|
* { key: 1, value: 'foo'},
|
|
193
207
|
* { key: 2, value: 'bar'}
|
|
194
208
|
* ];
|
|
195
|
-
* const myState = new
|
|
209
|
+
* const myState = new UmbArrayState(data, (x) => x.key);
|
|
196
210
|
* myState.updateOne(2, {value: 'updated-bar'});
|
|
197
211
|
*/
|
|
198
212
|
updateOne(unique: unknown, entry: Partial<T>): this;
|
|
@@ -200,22 +214,22 @@ declare class ArrayState<T> extends DeepState<T[]> {
|
|
|
200
214
|
|
|
201
215
|
/**
|
|
202
216
|
* @export
|
|
203
|
-
* @class
|
|
204
|
-
* @extends {
|
|
217
|
+
* @class UmbObjectState
|
|
218
|
+
* @extends {UmbDeepState<T>}
|
|
205
219
|
* @description - A RxJS BehaviorSubject which deepFreezes the object-data to ensure its not manipulated from any implementations.
|
|
206
220
|
* Additionally the Subject ensures the data is unique, not updating any Observes unless there is an actual change of the content.
|
|
207
221
|
*
|
|
208
|
-
* The
|
|
222
|
+
* The UmbObjectState provides methods to append data when the data is an Object.
|
|
209
223
|
*/
|
|
210
|
-
declare class
|
|
224
|
+
declare class UmbObjectState<T> extends UmbDeepState<T> {
|
|
211
225
|
/**
|
|
212
226
|
* @method update
|
|
213
227
|
* @param {Partial<T>} partialData - A object containing some of the data to update in this Subject.
|
|
214
228
|
* @description - Append some new data to this Object.
|
|
215
|
-
* @return {
|
|
229
|
+
* @return {UmbObjectState<T>} Reference to it self.
|
|
216
230
|
* @example <caption>Example append some data.</caption>
|
|
217
231
|
* const data = {key: 'myKey', value: 'myInitialValue'};
|
|
218
|
-
* const myState = new
|
|
232
|
+
* const myState = new UmbObjectState(data);
|
|
219
233
|
* myState.update({value: 'myNewValue'});
|
|
220
234
|
*/
|
|
221
235
|
update(partialData: Partial<T>): this;
|
|
@@ -240,9 +254,9 @@ declare function createObservablePart<R, T>(source$: Observable<T>, mappingFunct
|
|
|
240
254
|
* @param {(mappable: T) => R} mappingFunction - Method to return the part for this Observable to return.
|
|
241
255
|
* @param {(previousResult: R, currentResult: R) => boolean} [memoizationFunction] - Method to Compare if the data has changed. Should return true when data is different.
|
|
242
256
|
* @description - Creates a RxJS Observable from RxJS Subject.
|
|
243
|
-
* @example <caption>Example append new entry for a ArrayState or a part of
|
|
244
|
-
* const entry = {
|
|
245
|
-
* const newDataSet = appendToFrozenArray(mySubject.getValue(), entry, x => x.
|
|
257
|
+
* @example <caption>Example append new entry for a ArrayState or a part of UmbDeepState/UmbObjectState it which is an array. Where the key is unique and the item will be updated if matched with existing.</caption>
|
|
258
|
+
* const entry = {id: 'myKey', value: 'myValue'};
|
|
259
|
+
* const newDataSet = appendToFrozenArray(mySubject.getValue(), entry, x => x.id === id);
|
|
246
260
|
* mySubject.next(newDataSet);
|
|
247
261
|
*/
|
|
248
262
|
declare function appendToFrozenArray<T>(data: T[], entry: T, getUniqueMethod?: (entry: T) => unknown): T[];
|
|
@@ -254,11 +268,11 @@ declare function appendToFrozenArray<T>(data: T[], entry: T, getUniqueMethod?: (
|
|
|
254
268
|
* @param {(mappable: T) => R} mappingFunction - Method to return the part for this Observable to return.
|
|
255
269
|
* @param {(previousResult: R, currentResult: R) => boolean} [memoizationFunction] - Method to Compare if the data has changed. Should return true when data is different.
|
|
256
270
|
* @description - Creates a RxJS Observable from RxJS Subject.
|
|
257
|
-
* @example <caption>Example append new entry for a ArrayState or a part of
|
|
271
|
+
* @example <caption>Example append new entry for a ArrayState or a part of UmbDeepState/UmbObjectState it which is an array. Where the key is unique and the item will be updated if matched with existing.</caption>
|
|
258
272
|
* const partialEntry = {value: 'myValue'};
|
|
259
273
|
* const newDataSet = partialUpdateFrozenArray(mySubject.getValue(), partialEntry, x => x.key === 'myKey');
|
|
260
274
|
* mySubject.next(newDataSet);
|
|
261
275
|
*/
|
|
262
276
|
declare function partialUpdateFrozenArray<T>(data: T[], partialEntry: Partial<T>, findMethod: (entry: T) => boolean): T[];
|
|
263
277
|
|
|
264
|
-
export {
|
|
278
|
+
export { MappingFunction, UmbArrayState, UmbBasicState, UmbBooleanState, UmbClassState, UmbDeepState, UmbNumberState, UmbObjectState, UmbObserver, UmbObserverController, UmbStringState, appendToFrozenArray, createObservablePart, partialUpdateFrozenArray };
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import { UmbItemRepository } from './repository';
|
|
3
|
+
import { UmbControllerHostElement } from './controller';
|
|
4
|
+
import { UmbModalToken, UmbModalContext } from './modal';
|
|
5
|
+
import { ItemResponseModelBaseModel } from './backend-api';
|
|
6
|
+
|
|
7
|
+
declare class UmbPickerInputContext<ItemType extends ItemResponseModelBaseModel> {
|
|
8
|
+
#private;
|
|
9
|
+
host: UmbControllerHostElement;
|
|
10
|
+
modalAlias: string | UmbModalToken;
|
|
11
|
+
repository?: UmbItemRepository<ItemType>;
|
|
12
|
+
modalContext?: UmbModalContext;
|
|
13
|
+
selection: rxjs.Observable<string[]>;
|
|
14
|
+
selectedItems: rxjs.Observable<ItemType[]>;
|
|
15
|
+
max: number;
|
|
16
|
+
min: number;
|
|
17
|
+
constructor(host: UmbControllerHostElement, repositoryAlias: string, modalAlias: string | UmbModalToken, getUniqueMethod?: (entry: ItemType) => string | undefined);
|
|
18
|
+
getSelection(): string[];
|
|
19
|
+
setSelection(selection: string[]): void;
|
|
20
|
+
openPicker(pickerData?: any): void;
|
|
21
|
+
requestRemoveItem(unique: string): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { UmbPickerInputContext };
|
package/repository.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProblemDetailsModel } from './backend-api';
|
|
1
|
+
import { ProblemDetailsModel, FolderReponseModel, CreateFolderRequestModel, UpdateFolderReponseModel, FolderModelBaseModel, ItemResponseModelBaseModel } from './backend-api';
|
|
2
2
|
import { DataSourceResponse as DataSourceResponse$1 } from './repository';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
|
|
@@ -7,12 +7,20 @@ interface DataSourceResponse<T = undefined> {
|
|
|
7
7
|
error?: ProblemDetailsModel;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
interface UmbDataSource<
|
|
11
|
-
createScaffold(
|
|
12
|
-
get(
|
|
13
|
-
insert(data:
|
|
14
|
-
update(data:
|
|
15
|
-
delete(
|
|
10
|
+
interface UmbDataSource<CreateRequestType, UpdateRequestType, ResponseType> {
|
|
11
|
+
createScaffold(parentId: string | null): Promise<DataSourceResponse$1<CreateRequestType>>;
|
|
12
|
+
get(unique: string): Promise<DataSourceResponse$1<ResponseType>>;
|
|
13
|
+
insert(data: CreateRequestType): Promise<any>;
|
|
14
|
+
update(unique: string, data: UpdateRequestType): Promise<DataSourceResponse$1<ResponseType>>;
|
|
15
|
+
delete(unique: string): Promise<DataSourceResponse$1>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface UmbFolderDataSource {
|
|
19
|
+
createScaffold(parentId: string | null): Promise<DataSourceResponse<FolderReponseModel>>;
|
|
20
|
+
get(unique: string): Promise<DataSourceResponse<FolderReponseModel>>;
|
|
21
|
+
insert(data: CreateFolderRequestModel): Promise<DataSourceResponse<string>>;
|
|
22
|
+
update(unique: string, data: CreateFolderRequestModel): Promise<DataSourceResponse<UpdateFolderReponseModel>>;
|
|
23
|
+
delete(unique: string): Promise<DataSourceResponse>;
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
interface UmbTreeDataSource<PagedItemsType = any, ItemsType = any> {
|
|
@@ -21,24 +29,22 @@ interface UmbTreeDataSource<PagedItemsType = any, ItemsType = any> {
|
|
|
21
29
|
getItems(unique: Array<string>): Promise<DataSourceResponse$1<Array<ItemsType>>>;
|
|
22
30
|
}
|
|
23
31
|
|
|
24
|
-
interface
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
delete(
|
|
40
|
-
error?: ProblemDetailsModel;
|
|
41
|
-
}>;
|
|
32
|
+
interface UmbItemDataSource<ItemType> {
|
|
33
|
+
getItems(unique: Array<string>): Promise<DataSourceResponse$1<Array<ItemType>>>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface UmbRepositoryErrorResponse {
|
|
37
|
+
error?: ProblemDetailsModel;
|
|
38
|
+
}
|
|
39
|
+
interface UmbRepositoryResponse<T> extends UmbRepositoryErrorResponse {
|
|
40
|
+
data?: T;
|
|
41
|
+
}
|
|
42
|
+
interface UmbDetailRepository<CreateRequestType = any, UpdateRequestType = any, ResponseType = any> {
|
|
43
|
+
createScaffold(parentId: string | null): Promise<UmbRepositoryResponse<CreateRequestType>>;
|
|
44
|
+
requestById(id: string): Promise<UmbRepositoryResponse<ResponseType>>;
|
|
45
|
+
create(data: CreateRequestType): Promise<UmbRepositoryErrorResponse>;
|
|
46
|
+
save(id: string, data: UpdateRequestType): Promise<UmbRepositoryErrorResponse>;
|
|
47
|
+
delete(id: string): Promise<UmbRepositoryErrorResponse>;
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
interface UmbPagedData<T> {
|
|
@@ -56,14 +62,45 @@ interface UmbTreeRepository<ItemType = any, PagedItemType = UmbPagedData<ItemTyp
|
|
|
56
62
|
error: ProblemDetailsModel | undefined;
|
|
57
63
|
asObservable?: () => Observable<ItemType[]>;
|
|
58
64
|
}>;
|
|
59
|
-
|
|
65
|
+
requestItemsLegacy?: (uniques: string[]) => Promise<{
|
|
60
66
|
data: Array<ItemType> | undefined;
|
|
61
67
|
error: ProblemDetailsModel | undefined;
|
|
62
68
|
asObservable?: () => Observable<ItemType[]>;
|
|
63
69
|
}>;
|
|
64
70
|
rootTreeItems: () => Promise<Observable<ItemType[]>>;
|
|
65
71
|
treeItemsOf: (parentUnique: string | null) => Promise<Observable<ItemType[]>>;
|
|
66
|
-
|
|
72
|
+
itemsLegacy?: (uniques: string[]) => Promise<Observable<ItemType[]>>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface UmbFolderRepository {
|
|
76
|
+
createFolderScaffold(parentId: string | null): Promise<{
|
|
77
|
+
data?: FolderReponseModel;
|
|
78
|
+
error?: ProblemDetailsModel;
|
|
79
|
+
}>;
|
|
80
|
+
createFolder(folderRequest: CreateFolderRequestModel): Promise<{
|
|
81
|
+
data?: string;
|
|
82
|
+
error?: ProblemDetailsModel;
|
|
83
|
+
}>;
|
|
84
|
+
requestFolder(unique: string): Promise<{
|
|
85
|
+
data?: FolderReponseModel;
|
|
86
|
+
error?: ProblemDetailsModel;
|
|
87
|
+
}>;
|
|
88
|
+
updateFolder(unique: string, folder: FolderModelBaseModel): Promise<{
|
|
89
|
+
data?: UpdateFolderReponseModel;
|
|
90
|
+
error?: ProblemDetailsModel;
|
|
91
|
+
}>;
|
|
92
|
+
deleteFolder(id: string): Promise<{
|
|
93
|
+
error?: ProblemDetailsModel;
|
|
94
|
+
}>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface UmbItemRepository<ItemType extends ItemResponseModelBaseModel> {
|
|
98
|
+
requestItems: (uniques: string[]) => Promise<{
|
|
99
|
+
data?: Array<ItemType> | undefined;
|
|
100
|
+
error?: ProblemDetailsModel | undefined;
|
|
101
|
+
asObservable?: () => Observable<Array<ItemType>>;
|
|
102
|
+
}>;
|
|
103
|
+
items: (uniques: string[]) => Promise<Observable<Array<ItemType>>>;
|
|
67
104
|
}
|
|
68
105
|
|
|
69
|
-
export { DataSourceResponse, UmbDataSource, UmbDetailRepository, UmbPagedData, UmbTreeDataSource, UmbTreeRepository };
|
|
106
|
+
export { DataSourceResponse, UmbDataSource, UmbDetailRepository, UmbFolderDataSource, UmbFolderRepository, UmbItemDataSource, UmbItemRepository, UmbPagedData, UmbRepositoryErrorResponse, UmbRepositoryResponse, UmbTreeDataSource, UmbTreeRepository };
|