@equinor/fusion-framework-module-bookmark 2.2.0 → 3.0.0
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/CHANGELOG.md +84 -0
- package/dist/esm/BookmarkConfigurator.js +6 -3
- package/dist/esm/BookmarkConfigurator.js.map +1 -1
- package/dist/esm/BookmarkProvider.js +287 -219
- package/dist/esm/BookmarkProvider.js.map +1 -1
- package/dist/esm/bookmark-config.schema.js +5 -4
- package/dist/esm/bookmark-config.schema.js.map +1 -1
- package/dist/esm/bookmark.schemas.js +4 -1
- package/dist/esm/bookmark.schemas.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/BookmarkProvider.actions.d.ts +7 -175
- package/dist/types/BookmarkProvider.d.ts +47 -46
- package/dist/types/BookmarkProvider.reducer.d.ts +7 -90
- package/dist/types/bookmark-config.schema.d.ts +13 -104
- package/dist/types/bookmark.schemas.d.ts +20 -376
- package/dist/types/types.d.ts +96 -18
- package/dist/types/version.d.ts +1 -1
- package/package.json +12 -12
- package/src/BookmarkConfigurator.ts +10 -5
- package/src/BookmarkProvider.ts +377 -307
- package/src/bookmark-config.schema.ts +7 -6
- package/src/bookmark.schemas.ts +6 -2
- package/src/types.ts +92 -28
- package/src/version.ts +1 -1
|
@@ -1,44 +1,20 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import type { BookmarkData } from './types';
|
|
2
|
+
import type { Bookmark, BookmarkData } from './types';
|
|
3
3
|
export declare const bookmarkUserSchema: z.ZodObject<{
|
|
4
4
|
id: z.ZodString;
|
|
5
5
|
name: z.ZodString;
|
|
6
6
|
mail: z.ZodOptional<z.ZodString>;
|
|
7
|
-
},
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
mail?: string | undefined;
|
|
11
|
-
}, {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
mail?: string | undefined;
|
|
15
|
-
}>;
|
|
7
|
+
}, z.core.$strip>;
|
|
16
8
|
export declare const bookmarkSourceSystemSchema: z.ZodObject<{
|
|
17
9
|
identifier: z.ZodString;
|
|
18
10
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
11
|
subSystem: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
-
},
|
|
21
|
-
identifier: string;
|
|
22
|
-
name?: string | null | undefined;
|
|
23
|
-
subSystem?: string | null | undefined;
|
|
24
|
-
}, {
|
|
25
|
-
identifier: string;
|
|
26
|
-
name?: string | null | undefined;
|
|
27
|
-
subSystem?: string | null | undefined;
|
|
28
|
-
}>;
|
|
12
|
+
}, z.core.$strip>;
|
|
29
13
|
export declare const bookmarkContextSchema: z.ZodObject<{
|
|
30
14
|
id: z.ZodString;
|
|
31
15
|
name: z.ZodOptional<z.ZodString>;
|
|
32
16
|
type: z.ZodOptional<z.ZodString>;
|
|
33
|
-
},
|
|
34
|
-
id: string;
|
|
35
|
-
name?: string | undefined;
|
|
36
|
-
type?: string | undefined;
|
|
37
|
-
}, {
|
|
38
|
-
id: string;
|
|
39
|
-
name?: string | undefined;
|
|
40
|
-
type?: string | undefined;
|
|
41
|
-
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
42
18
|
export declare const bookmarkSchema: z.ZodObject<{
|
|
43
19
|
id: z.ZodString;
|
|
44
20
|
name: z.ZodString;
|
|
@@ -50,112 +26,24 @@ export declare const bookmarkSchema: z.ZodObject<{
|
|
|
50
26
|
id: z.ZodString;
|
|
51
27
|
name: z.ZodString;
|
|
52
28
|
mail: z.ZodOptional<z.ZodString>;
|
|
53
|
-
},
|
|
54
|
-
id: string;
|
|
55
|
-
name: string;
|
|
56
|
-
mail?: string | undefined;
|
|
57
|
-
}, {
|
|
58
|
-
id: string;
|
|
59
|
-
name: string;
|
|
60
|
-
mail?: string | undefined;
|
|
61
|
-
}>;
|
|
29
|
+
}, z.core.$strip>;
|
|
62
30
|
updated: z.ZodOptional<z.ZodDate>;
|
|
63
31
|
updatedBy: z.ZodOptional<z.ZodObject<{
|
|
64
32
|
id: z.ZodString;
|
|
65
33
|
name: z.ZodString;
|
|
66
34
|
mail: z.ZodOptional<z.ZodString>;
|
|
67
|
-
},
|
|
68
|
-
id: string;
|
|
69
|
-
name: string;
|
|
70
|
-
mail?: string | undefined;
|
|
71
|
-
}, {
|
|
72
|
-
id: string;
|
|
73
|
-
name: string;
|
|
74
|
-
mail?: string | undefined;
|
|
75
|
-
}>>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
76
36
|
context: z.ZodOptional<z.ZodObject<{
|
|
77
37
|
id: z.ZodString;
|
|
78
38
|
name: z.ZodOptional<z.ZodString>;
|
|
79
39
|
type: z.ZodOptional<z.ZodString>;
|
|
80
|
-
},
|
|
81
|
-
id: string;
|
|
82
|
-
name?: string | undefined;
|
|
83
|
-
type?: string | undefined;
|
|
84
|
-
}, {
|
|
85
|
-
id: string;
|
|
86
|
-
name?: string | undefined;
|
|
87
|
-
type?: string | undefined;
|
|
88
|
-
}>>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
89
41
|
sourceSystem: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
90
42
|
identifier: z.ZodString;
|
|
91
43
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
44
|
subSystem: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
name?: string | null | undefined;
|
|
96
|
-
subSystem?: string | null | undefined;
|
|
97
|
-
}, {
|
|
98
|
-
identifier: string;
|
|
99
|
-
name?: string | null | undefined;
|
|
100
|
-
subSystem?: string | null | undefined;
|
|
101
|
-
}>>>;
|
|
102
|
-
}, "strip", z.ZodTypeAny, {
|
|
103
|
-
id: string;
|
|
104
|
-
name: string;
|
|
105
|
-
appKey: string;
|
|
106
|
-
created: Date;
|
|
107
|
-
createdBy: {
|
|
108
|
-
id: string;
|
|
109
|
-
name: string;
|
|
110
|
-
mail?: string | undefined;
|
|
111
|
-
};
|
|
112
|
-
description?: string | undefined;
|
|
113
|
-
isShared?: boolean | undefined;
|
|
114
|
-
updated?: Date | undefined;
|
|
115
|
-
updatedBy?: {
|
|
116
|
-
id: string;
|
|
117
|
-
name: string;
|
|
118
|
-
mail?: string | undefined;
|
|
119
|
-
} | undefined;
|
|
120
|
-
context?: {
|
|
121
|
-
id: string;
|
|
122
|
-
name?: string | undefined;
|
|
123
|
-
type?: string | undefined;
|
|
124
|
-
} | undefined;
|
|
125
|
-
sourceSystem?: {
|
|
126
|
-
identifier: string;
|
|
127
|
-
name?: string | null | undefined;
|
|
128
|
-
subSystem?: string | null | undefined;
|
|
129
|
-
} | null | undefined;
|
|
130
|
-
}, {
|
|
131
|
-
id: string;
|
|
132
|
-
name: string;
|
|
133
|
-
appKey: string;
|
|
134
|
-
created: Date;
|
|
135
|
-
createdBy: {
|
|
136
|
-
id: string;
|
|
137
|
-
name: string;
|
|
138
|
-
mail?: string | undefined;
|
|
139
|
-
};
|
|
140
|
-
description?: string | undefined;
|
|
141
|
-
isShared?: boolean | undefined;
|
|
142
|
-
updated?: Date | undefined;
|
|
143
|
-
updatedBy?: {
|
|
144
|
-
id: string;
|
|
145
|
-
name: string;
|
|
146
|
-
mail?: string | undefined;
|
|
147
|
-
} | undefined;
|
|
148
|
-
context?: {
|
|
149
|
-
id: string;
|
|
150
|
-
name?: string | undefined;
|
|
151
|
-
type?: string | undefined;
|
|
152
|
-
} | undefined;
|
|
153
|
-
sourceSystem?: {
|
|
154
|
-
identifier: string;
|
|
155
|
-
name?: string | null | undefined;
|
|
156
|
-
subSystem?: string | null | undefined;
|
|
157
|
-
} | null | undefined;
|
|
158
|
-
}>;
|
|
45
|
+
}, z.core.$strip>>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
159
47
|
export declare const bookmarksSchema: z.ZodArray<z.ZodObject<{
|
|
160
48
|
id: z.ZodString;
|
|
161
49
|
name: z.ZodString;
|
|
@@ -167,112 +55,24 @@ export declare const bookmarksSchema: z.ZodArray<z.ZodObject<{
|
|
|
167
55
|
id: z.ZodString;
|
|
168
56
|
name: z.ZodString;
|
|
169
57
|
mail: z.ZodOptional<z.ZodString>;
|
|
170
|
-
},
|
|
171
|
-
id: string;
|
|
172
|
-
name: string;
|
|
173
|
-
mail?: string | undefined;
|
|
174
|
-
}, {
|
|
175
|
-
id: string;
|
|
176
|
-
name: string;
|
|
177
|
-
mail?: string | undefined;
|
|
178
|
-
}>;
|
|
58
|
+
}, z.core.$strip>;
|
|
179
59
|
updated: z.ZodOptional<z.ZodDate>;
|
|
180
60
|
updatedBy: z.ZodOptional<z.ZodObject<{
|
|
181
61
|
id: z.ZodString;
|
|
182
62
|
name: z.ZodString;
|
|
183
63
|
mail: z.ZodOptional<z.ZodString>;
|
|
184
|
-
},
|
|
185
|
-
id: string;
|
|
186
|
-
name: string;
|
|
187
|
-
mail?: string | undefined;
|
|
188
|
-
}, {
|
|
189
|
-
id: string;
|
|
190
|
-
name: string;
|
|
191
|
-
mail?: string | undefined;
|
|
192
|
-
}>>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
193
65
|
context: z.ZodOptional<z.ZodObject<{
|
|
194
66
|
id: z.ZodString;
|
|
195
67
|
name: z.ZodOptional<z.ZodString>;
|
|
196
68
|
type: z.ZodOptional<z.ZodString>;
|
|
197
|
-
},
|
|
198
|
-
id: string;
|
|
199
|
-
name?: string | undefined;
|
|
200
|
-
type?: string | undefined;
|
|
201
|
-
}, {
|
|
202
|
-
id: string;
|
|
203
|
-
name?: string | undefined;
|
|
204
|
-
type?: string | undefined;
|
|
205
|
-
}>>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
206
70
|
sourceSystem: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
207
71
|
identifier: z.ZodString;
|
|
208
72
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
209
73
|
subSystem: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
name?: string | null | undefined;
|
|
213
|
-
subSystem?: string | null | undefined;
|
|
214
|
-
}, {
|
|
215
|
-
identifier: string;
|
|
216
|
-
name?: string | null | undefined;
|
|
217
|
-
subSystem?: string | null | undefined;
|
|
218
|
-
}>>>;
|
|
219
|
-
}, "strip", z.ZodTypeAny, {
|
|
220
|
-
id: string;
|
|
221
|
-
name: string;
|
|
222
|
-
appKey: string;
|
|
223
|
-
created: Date;
|
|
224
|
-
createdBy: {
|
|
225
|
-
id: string;
|
|
226
|
-
name: string;
|
|
227
|
-
mail?: string | undefined;
|
|
228
|
-
};
|
|
229
|
-
description?: string | undefined;
|
|
230
|
-
isShared?: boolean | undefined;
|
|
231
|
-
updated?: Date | undefined;
|
|
232
|
-
updatedBy?: {
|
|
233
|
-
id: string;
|
|
234
|
-
name: string;
|
|
235
|
-
mail?: string | undefined;
|
|
236
|
-
} | undefined;
|
|
237
|
-
context?: {
|
|
238
|
-
id: string;
|
|
239
|
-
name?: string | undefined;
|
|
240
|
-
type?: string | undefined;
|
|
241
|
-
} | undefined;
|
|
242
|
-
sourceSystem?: {
|
|
243
|
-
identifier: string;
|
|
244
|
-
name?: string | null | undefined;
|
|
245
|
-
subSystem?: string | null | undefined;
|
|
246
|
-
} | null | undefined;
|
|
247
|
-
}, {
|
|
248
|
-
id: string;
|
|
249
|
-
name: string;
|
|
250
|
-
appKey: string;
|
|
251
|
-
created: Date;
|
|
252
|
-
createdBy: {
|
|
253
|
-
id: string;
|
|
254
|
-
name: string;
|
|
255
|
-
mail?: string | undefined;
|
|
256
|
-
};
|
|
257
|
-
description?: string | undefined;
|
|
258
|
-
isShared?: boolean | undefined;
|
|
259
|
-
updated?: Date | undefined;
|
|
260
|
-
updatedBy?: {
|
|
261
|
-
id: string;
|
|
262
|
-
name: string;
|
|
263
|
-
mail?: string | undefined;
|
|
264
|
-
} | undefined;
|
|
265
|
-
context?: {
|
|
266
|
-
id: string;
|
|
267
|
-
name?: string | undefined;
|
|
268
|
-
type?: string | undefined;
|
|
269
|
-
} | undefined;
|
|
270
|
-
sourceSystem?: {
|
|
271
|
-
identifier: string;
|
|
272
|
-
name?: string | null | undefined;
|
|
273
|
-
subSystem?: string | null | undefined;
|
|
274
|
-
} | null | undefined;
|
|
275
|
-
}>, "many">;
|
|
74
|
+
}, z.core.$strip>>>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
276
76
|
export declare const bookmarkWithDataSchema: <T extends BookmarkData = BookmarkData, S extends z.ZodSchema<T> = z.ZodSchema<T>>(schema?: S) => z.ZodObject<{
|
|
277
77
|
id: z.ZodString;
|
|
278
78
|
name: z.ZodString;
|
|
@@ -284,179 +84,23 @@ export declare const bookmarkWithDataSchema: <T extends BookmarkData = BookmarkD
|
|
|
284
84
|
id: z.ZodString;
|
|
285
85
|
name: z.ZodString;
|
|
286
86
|
mail: z.ZodOptional<z.ZodString>;
|
|
287
|
-
},
|
|
288
|
-
id: string;
|
|
289
|
-
name: string;
|
|
290
|
-
mail?: string | undefined;
|
|
291
|
-
}, {
|
|
292
|
-
id: string;
|
|
293
|
-
name: string;
|
|
294
|
-
mail?: string | undefined;
|
|
295
|
-
}>;
|
|
87
|
+
}, z.core.$strip>;
|
|
296
88
|
updated: z.ZodOptional<z.ZodDate>;
|
|
297
89
|
updatedBy: z.ZodOptional<z.ZodObject<{
|
|
298
90
|
id: z.ZodString;
|
|
299
91
|
name: z.ZodString;
|
|
300
92
|
mail: z.ZodOptional<z.ZodString>;
|
|
301
|
-
},
|
|
302
|
-
id: string;
|
|
303
|
-
name: string;
|
|
304
|
-
mail?: string | undefined;
|
|
305
|
-
}, {
|
|
306
|
-
id: string;
|
|
307
|
-
name: string;
|
|
308
|
-
mail?: string | undefined;
|
|
309
|
-
}>>;
|
|
93
|
+
}, z.core.$strip>>;
|
|
310
94
|
context: z.ZodOptional<z.ZodObject<{
|
|
311
95
|
id: z.ZodString;
|
|
312
96
|
name: z.ZodOptional<z.ZodString>;
|
|
313
97
|
type: z.ZodOptional<z.ZodString>;
|
|
314
|
-
},
|
|
315
|
-
id: string;
|
|
316
|
-
name?: string | undefined;
|
|
317
|
-
type?: string | undefined;
|
|
318
|
-
}, {
|
|
319
|
-
id: string;
|
|
320
|
-
name?: string | undefined;
|
|
321
|
-
type?: string | undefined;
|
|
322
|
-
}>>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
323
99
|
sourceSystem: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
324
100
|
identifier: z.ZodString;
|
|
325
101
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
102
|
subSystem: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
327
|
-
},
|
|
328
|
-
identifier: string;
|
|
329
|
-
name?: string | null | undefined;
|
|
330
|
-
subSystem?: string | null | undefined;
|
|
331
|
-
}, {
|
|
332
|
-
identifier: string;
|
|
333
|
-
name?: string | null | undefined;
|
|
334
|
-
subSystem?: string | null | undefined;
|
|
335
|
-
}>>>;
|
|
336
|
-
} & {
|
|
103
|
+
}, z.core.$strip>>>;
|
|
337
104
|
payload: S;
|
|
338
|
-
},
|
|
339
|
-
|
|
340
|
-
name: z.ZodString;
|
|
341
|
-
appKey: z.ZodString;
|
|
342
|
-
description: z.ZodOptional<z.ZodString>;
|
|
343
|
-
isShared: z.ZodOptional<z.ZodBoolean>;
|
|
344
|
-
created: z.ZodDate;
|
|
345
|
-
createdBy: z.ZodObject<{
|
|
346
|
-
id: z.ZodString;
|
|
347
|
-
name: z.ZodString;
|
|
348
|
-
mail: z.ZodOptional<z.ZodString>;
|
|
349
|
-
}, "strip", z.ZodTypeAny, {
|
|
350
|
-
id: string;
|
|
351
|
-
name: string;
|
|
352
|
-
mail?: string | undefined;
|
|
353
|
-
}, {
|
|
354
|
-
id: string;
|
|
355
|
-
name: string;
|
|
356
|
-
mail?: string | undefined;
|
|
357
|
-
}>;
|
|
358
|
-
updated: z.ZodOptional<z.ZodDate>;
|
|
359
|
-
updatedBy: z.ZodOptional<z.ZodObject<{
|
|
360
|
-
id: z.ZodString;
|
|
361
|
-
name: z.ZodString;
|
|
362
|
-
mail: z.ZodOptional<z.ZodString>;
|
|
363
|
-
}, "strip", z.ZodTypeAny, {
|
|
364
|
-
id: string;
|
|
365
|
-
name: string;
|
|
366
|
-
mail?: string | undefined;
|
|
367
|
-
}, {
|
|
368
|
-
id: string;
|
|
369
|
-
name: string;
|
|
370
|
-
mail?: string | undefined;
|
|
371
|
-
}>>;
|
|
372
|
-
context: z.ZodOptional<z.ZodObject<{
|
|
373
|
-
id: z.ZodString;
|
|
374
|
-
name: z.ZodOptional<z.ZodString>;
|
|
375
|
-
type: z.ZodOptional<z.ZodString>;
|
|
376
|
-
}, "strip", z.ZodTypeAny, {
|
|
377
|
-
id: string;
|
|
378
|
-
name?: string | undefined;
|
|
379
|
-
type?: string | undefined;
|
|
380
|
-
}, {
|
|
381
|
-
id: string;
|
|
382
|
-
name?: string | undefined;
|
|
383
|
-
type?: string | undefined;
|
|
384
|
-
}>>;
|
|
385
|
-
sourceSystem: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
386
|
-
identifier: z.ZodString;
|
|
387
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
388
|
-
subSystem: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
389
|
-
}, "strip", z.ZodTypeAny, {
|
|
390
|
-
identifier: string;
|
|
391
|
-
name?: string | null | undefined;
|
|
392
|
-
subSystem?: string | null | undefined;
|
|
393
|
-
}, {
|
|
394
|
-
identifier: string;
|
|
395
|
-
name?: string | null | undefined;
|
|
396
|
-
subSystem?: string | null | undefined;
|
|
397
|
-
}>>>;
|
|
398
|
-
} & {
|
|
399
|
-
payload: S;
|
|
400
|
-
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
401
|
-
id: z.ZodString;
|
|
402
|
-
name: z.ZodString;
|
|
403
|
-
appKey: z.ZodString;
|
|
404
|
-
description: z.ZodOptional<z.ZodString>;
|
|
405
|
-
isShared: z.ZodOptional<z.ZodBoolean>;
|
|
406
|
-
created: z.ZodDate;
|
|
407
|
-
createdBy: z.ZodObject<{
|
|
408
|
-
id: z.ZodString;
|
|
409
|
-
name: z.ZodString;
|
|
410
|
-
mail: z.ZodOptional<z.ZodString>;
|
|
411
|
-
}, "strip", z.ZodTypeAny, {
|
|
412
|
-
id: string;
|
|
413
|
-
name: string;
|
|
414
|
-
mail?: string | undefined;
|
|
415
|
-
}, {
|
|
416
|
-
id: string;
|
|
417
|
-
name: string;
|
|
418
|
-
mail?: string | undefined;
|
|
419
|
-
}>;
|
|
420
|
-
updated: z.ZodOptional<z.ZodDate>;
|
|
421
|
-
updatedBy: z.ZodOptional<z.ZodObject<{
|
|
422
|
-
id: z.ZodString;
|
|
423
|
-
name: z.ZodString;
|
|
424
|
-
mail: z.ZodOptional<z.ZodString>;
|
|
425
|
-
}, "strip", z.ZodTypeAny, {
|
|
426
|
-
id: string;
|
|
427
|
-
name: string;
|
|
428
|
-
mail?: string | undefined;
|
|
429
|
-
}, {
|
|
430
|
-
id: string;
|
|
431
|
-
name: string;
|
|
432
|
-
mail?: string | undefined;
|
|
433
|
-
}>>;
|
|
434
|
-
context: z.ZodOptional<z.ZodObject<{
|
|
435
|
-
id: z.ZodString;
|
|
436
|
-
name: z.ZodOptional<z.ZodString>;
|
|
437
|
-
type: z.ZodOptional<z.ZodString>;
|
|
438
|
-
}, "strip", z.ZodTypeAny, {
|
|
439
|
-
id: string;
|
|
440
|
-
name?: string | undefined;
|
|
441
|
-
type?: string | undefined;
|
|
442
|
-
}, {
|
|
443
|
-
id: string;
|
|
444
|
-
name?: string | undefined;
|
|
445
|
-
type?: string | undefined;
|
|
446
|
-
}>>;
|
|
447
|
-
sourceSystem: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
448
|
-
identifier: z.ZodString;
|
|
449
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
450
|
-
subSystem: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
451
|
-
}, "strip", z.ZodTypeAny, {
|
|
452
|
-
identifier: string;
|
|
453
|
-
name?: string | null | undefined;
|
|
454
|
-
subSystem?: string | null | undefined;
|
|
455
|
-
}, {
|
|
456
|
-
identifier: string;
|
|
457
|
-
name?: string | null | undefined;
|
|
458
|
-
subSystem?: string | null | undefined;
|
|
459
|
-
}>>>;
|
|
460
|
-
} & {
|
|
461
|
-
payload: S;
|
|
462
|
-
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export declare const parseBookmark: <T extends BookmarkData>(value: unknown) => Bookmark<T>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,39 +1,117 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { ILogger, LogLevel } from '@equinor/fusion-log';
|
|
2
|
+
import type { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
|
|
3
|
+
import type { IBookmarkProvider } from './BookmarkProvider.interface';
|
|
4
|
+
import type { IBookmarkClient } from './BookmarkClient.interface';
|
|
4
5
|
/**
|
|
5
6
|
* Represents the source system for a bookmark.
|
|
6
7
|
*/
|
|
7
|
-
export
|
|
8
|
+
export interface SourceSystem {
|
|
9
|
+
/** Unique identifier for the source system */
|
|
10
|
+
identifier: string;
|
|
11
|
+
/** Human-readable name of the source system */
|
|
12
|
+
name?: string | null;
|
|
13
|
+
/** Sub-system identifier */
|
|
14
|
+
subSystem?: string | null;
|
|
15
|
+
}
|
|
8
16
|
/**
|
|
9
17
|
* Represents the data associated with a bookmark.
|
|
10
18
|
* This is a generic type that can hold any arbitrary data as a key-value map.
|
|
11
19
|
*/
|
|
12
|
-
export type BookmarkData = Record<string,
|
|
20
|
+
export type BookmarkData = Record<string, unknown> | string;
|
|
13
21
|
/**
|
|
14
|
-
* Represents a
|
|
22
|
+
* Represents a user associated with a bookmark.
|
|
23
|
+
*/
|
|
24
|
+
export interface BookmarkUser {
|
|
25
|
+
/** Unique identifier for the user */
|
|
26
|
+
id: string;
|
|
27
|
+
/** Display name of the user */
|
|
28
|
+
name: string;
|
|
29
|
+
/** Email address of the user */
|
|
30
|
+
mail?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Represents the context associated with a bookmark.
|
|
15
34
|
*/
|
|
16
|
-
export
|
|
35
|
+
export interface BookmarkContext {
|
|
36
|
+
/** Unique identifier for the context */
|
|
37
|
+
id: string;
|
|
38
|
+
/** Human-readable name of the context */
|
|
39
|
+
name?: string;
|
|
40
|
+
/** Type of the context */
|
|
41
|
+
type?: string;
|
|
42
|
+
}
|
|
17
43
|
/**
|
|
18
44
|
* Represents a bookmark without any associated data.
|
|
19
45
|
*/
|
|
20
|
-
export
|
|
46
|
+
export interface BookmarkWithoutData {
|
|
47
|
+
/** Unique identifier for the bookmark */
|
|
48
|
+
id: string;
|
|
49
|
+
/** Name of the bookmark */
|
|
50
|
+
name: string;
|
|
51
|
+
/** Application key this bookmark belongs to */
|
|
52
|
+
appKey: string;
|
|
53
|
+
/** Optional description of the bookmark */
|
|
54
|
+
description?: string;
|
|
55
|
+
/** Whether the bookmark is shared */
|
|
56
|
+
isShared?: boolean;
|
|
57
|
+
/** When the bookmark was created */
|
|
58
|
+
created: Date;
|
|
59
|
+
/** User who created the bookmark */
|
|
60
|
+
createdBy: BookmarkUser;
|
|
61
|
+
/** When the bookmark was last updated */
|
|
62
|
+
updated?: Date;
|
|
63
|
+
/** User who last updated the bookmark */
|
|
64
|
+
updatedBy?: BookmarkUser;
|
|
65
|
+
/** Context associated with the bookmark */
|
|
66
|
+
context?: BookmarkContext;
|
|
67
|
+
/** Source system information */
|
|
68
|
+
sourceSystem?: SourceSystem | null;
|
|
69
|
+
}
|
|
21
70
|
/**
|
|
22
71
|
* Represents a bookmark with associated data.
|
|
23
72
|
* @template T - The type of the bookmark data.
|
|
24
73
|
*/
|
|
25
|
-
export
|
|
74
|
+
export interface Bookmark<T extends BookmarkData = any> extends BookmarkWithoutData {
|
|
75
|
+
/** Optional payload data associated with the bookmark */
|
|
26
76
|
payload?: T;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Represents the configuration options for a bookmark module.
|
|
30
|
-
*/
|
|
31
|
-
export type BookmarkModuleConfig = z.infer<typeof bookmarkConfigSchema>;
|
|
77
|
+
}
|
|
32
78
|
/**
|
|
33
|
-
* Represents a
|
|
79
|
+
* Represents a collection of bookmarks.
|
|
34
80
|
*/
|
|
35
|
-
export type
|
|
81
|
+
export type Bookmarks = BookmarkWithoutData[];
|
|
36
82
|
/**
|
|
37
|
-
* Represents the
|
|
83
|
+
* Represents the configuration options for a bookmark module.
|
|
38
84
|
*/
|
|
39
|
-
export
|
|
85
|
+
export interface BookmarkModuleConfig {
|
|
86
|
+
/** Optional logger instance */
|
|
87
|
+
log?: ILogger;
|
|
88
|
+
/** Optional log level */
|
|
89
|
+
logLevel?: LogLevel;
|
|
90
|
+
/** Optional event provider for handling events */
|
|
91
|
+
eventProvider?: IEventModuleProvider;
|
|
92
|
+
/** The source system for the bookmarks */
|
|
93
|
+
sourceSystem?: SourceSystem;
|
|
94
|
+
/** Parent Bookmark provider */
|
|
95
|
+
parent?: IBookmarkProvider | null;
|
|
96
|
+
/** API client for interacting with bookmarks */
|
|
97
|
+
client: IBookmarkClient;
|
|
98
|
+
/** Functions for resolving context and application */
|
|
99
|
+
resolve: {
|
|
100
|
+
/** Function to resolve the current context */
|
|
101
|
+
context: () => Promise<{
|
|
102
|
+
id: string;
|
|
103
|
+
} | undefined>;
|
|
104
|
+
/** Function to resolve the current application */
|
|
105
|
+
application: () => Promise<{
|
|
106
|
+
appKey: string;
|
|
107
|
+
name?: string;
|
|
108
|
+
} | undefined>;
|
|
109
|
+
};
|
|
110
|
+
/** Flags for enabling resolving when fetching bookmarks */
|
|
111
|
+
filters?: {
|
|
112
|
+
/** Whether to filter by context */
|
|
113
|
+
context?: boolean;
|
|
114
|
+
/** Whether to filter by application */
|
|
115
|
+
application?: boolean;
|
|
116
|
+
};
|
|
117
|
+
}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "
|
|
1
|
+
export declare const version = "3.0.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-module-bookmark",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -38,23 +38,23 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"fast-deep-equal": "^3.1.3",
|
|
41
|
-
"immer": "^
|
|
41
|
+
"immer": "^10.1.3",
|
|
42
42
|
"rxjs": "^7.8.1",
|
|
43
|
-
"uuid": "^
|
|
44
|
-
"@equinor/fusion-framework-module": "^5.0.
|
|
45
|
-
"@equinor/fusion-
|
|
46
|
-
"@equinor/fusion-query": "^5.2.
|
|
47
|
-
"@equinor/fusion-
|
|
43
|
+
"uuid": "^13.0.0",
|
|
44
|
+
"@equinor/fusion-framework-module": "^5.0.1",
|
|
45
|
+
"@equinor/fusion-log": "^1.1.7",
|
|
46
|
+
"@equinor/fusion-query": "^5.2.13",
|
|
47
|
+
"@equinor/fusion-observable": "^8.5.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@types/uuid": "^
|
|
50
|
+
"@types/uuid": "^11.0.0",
|
|
51
51
|
"typescript": "^5.8.2",
|
|
52
|
-
"zod": "^
|
|
53
|
-
"@equinor/fusion-framework-module-app": "^
|
|
52
|
+
"zod": "^4.1.8",
|
|
53
|
+
"@equinor/fusion-framework-module-app": "^7.0.0",
|
|
54
54
|
"@equinor/fusion-framework-module-context": "^7.0.0",
|
|
55
55
|
"@equinor/fusion-framework-module-event": "^4.3.7",
|
|
56
|
-
"@equinor/fusion-framework-module-
|
|
57
|
-
"@equinor/fusion-framework-module-
|
|
56
|
+
"@equinor/fusion-framework-module-services": "^7.1.0",
|
|
57
|
+
"@equinor/fusion-framework-module-http": "^7.0.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsc -b"
|