@equinor/roma-framework 0.0.11 → 0.0.12

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 (61) hide show
  1. package/dev-portal/package.json +1 -1
  2. package/dev-portal/roma-framework.umd.js +29494 -12956
  3. package/lib/api/roma/api/app-controller/app-controller.d.ts +14 -20
  4. package/lib/api/roma/api/category-controller/category-controller.d.ts +14 -20
  5. package/lib/api/roma/api/environment-controller/environment-controller.d.ts +6 -12
  6. package/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +21 -27
  7. package/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +6 -12
  8. package/lib/api/roma/api/service-controller/service-controller.d.ts +14 -20
  9. package/lib/api/roma/api/setting-controller/setting-controller.d.ts +30 -36
  10. package/lib/api/roma/model/appDto.d.ts +3 -9
  11. package/lib/api/roma/model/environmentDto.d.ts +2 -8
  12. package/lib/api/roma/model/romaConfigurationDto.d.ts +2 -8
  13. package/lib/api/roma/model/settingDto.d.ts +2 -8
  14. package/lib/app-provider.d.ts +3 -2
  15. package/lib/dev-portal/AppLoader.d.ts +4 -1
  16. package/lib/dev-portal/EquinorLoader.d.ts +2 -1
  17. package/lib/dev-portal/ErrorViewer.d.ts +1 -0
  18. package/lib/dev-portal/HttpErrorViewer.d.ts +1 -0
  19. package/lib/eds-event-provider.d.ts +1 -0
  20. package/lib/make-component.d.ts +2 -1
  21. package/lib/query/persister.d.ts +1 -0
  22. package/lib/style-provider.d.ts +1 -0
  23. package/package.json +1 -1
  24. package/roma-framework.mjs +3 -4
  25. package/dev-portal/lib/api/roma/api/app-controller/app-controller.d.ts +0 -100
  26. package/dev-portal/lib/api/roma/api/category-controller/category-controller.d.ts +0 -100
  27. package/dev-portal/lib/api/roma/api/environment-controller/environment-controller.d.ts +0 -33
  28. package/dev-portal/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +0 -168
  29. package/dev-portal/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +0 -27
  30. package/dev-portal/lib/api/roma/api/service-controller/service-controller.d.ts +0 -100
  31. package/dev-portal/lib/api/roma/api/setting-controller/setting-controller.d.ts +0 -267
  32. package/dev-portal/lib/api/roma/index.d.ts +0 -8
  33. package/dev-portal/lib/api/roma/model/appDto.d.ts +0 -26
  34. package/dev-portal/lib/api/roma/model/categoryDto.d.ts +0 -13
  35. package/dev-portal/lib/api/roma/model/environmentDto.d.ts +0 -16
  36. package/dev-portal/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +0 -11
  37. package/dev-portal/lib/api/roma/model/index.d.ts +0 -19
  38. package/dev-portal/lib/api/roma/model/romaConfigurationDto.d.ts +0 -14
  39. package/dev-portal/lib/api/roma/model/romaConfigurationDtoValue.d.ts +0 -8
  40. package/dev-portal/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +0 -8
  41. package/dev-portal/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +0 -8
  42. package/dev-portal/lib/api/roma/model/serviceDto.d.ts +0 -16
  43. package/dev-portal/lib/api/roma/model/settingDto.d.ts +0 -16
  44. package/dev-portal/lib/api/roma/model/settingDtoValue.d.ts +0 -8
  45. package/dev-portal/lib/api/roma/model/versionDto.d.ts +0 -12
  46. package/dev-portal/lib/api/roma/use-client.d.ts +0 -34
  47. package/dev-portal/lib/app-provider.d.ts +0 -32
  48. package/dev-portal/lib/dev-portal/AppLoader.d.ts +0 -12
  49. package/dev-portal/lib/dev-portal/AppViewer.d.ts +0 -6
  50. package/dev-portal/lib/dev-portal/EquinorLoader.d.ts +0 -12
  51. package/dev-portal/lib/dev-portal/ErrorViewer.d.ts +0 -20
  52. package/dev-portal/lib/dev-portal/Header.d.ts +0 -2
  53. package/dev-portal/lib/dev-portal/Navigation.d.ts +0 -5
  54. package/dev-portal/lib/dev-portal/Root.d.ts +0 -5
  55. package/dev-portal/lib/dev-portal/config.d.ts +0 -3
  56. package/dev-portal/lib/dev-portal/index.d.ts +0 -13
  57. package/dev-portal/lib/eds-event-provider.d.ts +0 -6
  58. package/dev-portal/lib/make-component.d.ts +0 -12
  59. package/dev-portal/lib/query/persister.d.ts +0 -6
  60. package/dev-portal/lib/style-provider.d.ts +0 -7
  61. package/lib/api/fetcher.d.ts +0 -21
@@ -1,13 +1,7 @@
1
- /**
2
- * Generated by orval v6.20.0 🍺
3
- * Do not edit manually.
4
- * Tops Roma Rest API
5
- * Tops Roma Rest API
6
- * OpenAPI spec version: v1.0.0
7
- */
8
- import type { QueryKey, UseMutationOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
9
- import type { SettingDto } from '../../model';
10
- import type { BodyType, ErrorType } from '../../use-client';
1
+ import { QueryKey, UseMutationOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
+ import { SettingDto } from '../../model';
3
+ import { BodyType, ErrorType } from '../../use-client';
4
+
11
5
  type AwaitedInput<T> = PromiseLike<T> | T;
12
6
  type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
13
7
  /**
@@ -15,7 +9,7 @@ type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
15
9
  */
16
10
  export declare const useGetSettingByUserAndIdHook: () => (userId: string, id: string, signal?: AbortSignal) => Promise<SettingDto>;
17
11
  export declare const getGetSettingByUserAndIdQueryKey: (userId: string, id: string) => readonly [`/api/settings/user/${string}/id/${string}`];
18
- export declare const useGetSettingByUserAndIdQueryOptions: <TData = SettingDto, TError = import("../../use-client").HttpError>(userId: string, id: string, options?: {
12
+ export declare const useGetSettingByUserAndIdQueryOptions: <TData = SettingDto, TError = import('../../use-client').HttpError>(userId: string, id: string, options?: {
19
13
  query?: Partial<UseQueryOptions<SettingDto, TError, TData, QueryKey>> | undefined;
20
14
  } | undefined) => UseQueryOptions<SettingDto, TError, TData, QueryKey> & {
21
15
  queryKey: QueryKey;
@@ -25,7 +19,7 @@ export type GetSettingByUserAndIdQueryError = ErrorType<void>;
25
19
  /**
26
20
  * @summary Get a users private Setting by id
27
21
  */
28
- export declare const useGetSettingByUserAndId: <TData = SettingDto, TError = import("../../use-client").HttpError>(userId: string, id: string, options?: {
22
+ export declare const useGetSettingByUserAndId: <TData = SettingDto, TError = import('../../use-client').HttpError>(userId: string, id: string, options?: {
29
23
  query?: Partial<UseQueryOptions<SettingDto, TError, TData, QueryKey>> | undefined;
30
24
  } | undefined) => UseQueryResult<TData, TError> & {
31
25
  queryKey: QueryKey;
@@ -34,7 +28,7 @@ export declare const useGetSettingByUserAndId: <TData = SettingDto, TError = imp
34
28
  * @summary Update a private Setting by id
35
29
  */
36
30
  export declare const useUpdateByUserIdAndIdHook: () => (userId: string, id: string, settingDto: BodyType<SettingDto>) => Promise<SettingDto>;
37
- export declare const useUpdateByUserIdAndIdMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
31
+ export declare const useUpdateByUserIdAndIdMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
38
32
  mutation?: UseMutationOptions<SettingDto, TError, {
39
33
  userId: string;
40
34
  id: string;
@@ -51,13 +45,13 @@ export type UpdateByUserIdAndIdMutationError = ErrorType<void>;
51
45
  /**
52
46
  * @summary Update a private Setting by id
53
47
  */
54
- export declare const useUpdateByUserIdAndId: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
48
+ export declare const useUpdateByUserIdAndId: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
55
49
  mutation?: UseMutationOptions<SettingDto, TError, {
56
50
  userId: string;
57
51
  id: string;
58
52
  data: BodyType<SettingDto>;
59
53
  }, TContext> | undefined;
60
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<SettingDto, TError, {
54
+ } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<SettingDto, TError, {
61
55
  userId: string;
62
56
  id: string;
63
57
  data: BodyType<SettingDto>;
@@ -66,7 +60,7 @@ export declare const useUpdateByUserIdAndId: <TError = import("../../use-client"
66
60
  * @summary Delete a private Setting by id
67
61
  */
68
62
  export declare const useDeletePrivateSettingByIdHook: () => (userId: string, id: string) => Promise<SettingDto>;
69
- export declare const useDeletePrivateSettingByIdMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
63
+ export declare const useDeletePrivateSettingByIdMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
70
64
  mutation?: UseMutationOptions<SettingDto, TError, {
71
65
  userId: string;
72
66
  id: string;
@@ -80,12 +74,12 @@ export type DeletePrivateSettingByIdMutationError = ErrorType<void>;
80
74
  /**
81
75
  * @summary Delete a private Setting by id
82
76
  */
83
- export declare const useDeletePrivateSettingById: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
77
+ export declare const useDeletePrivateSettingById: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
84
78
  mutation?: UseMutationOptions<SettingDto, TError, {
85
79
  userId: string;
86
80
  id: string;
87
81
  }, TContext> | undefined;
88
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<SettingDto, TError, {
82
+ } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<SettingDto, TError, {
89
83
  userId: string;
90
84
  id: string;
91
85
  }, TContext>;
@@ -94,7 +88,7 @@ export declare const useDeletePrivateSettingById: <TError = import("../../use-cl
94
88
  */
95
89
  export declare const useGetPublicSettingByUserAndIdHook: () => (appShortName: string, id: string, signal?: AbortSignal) => Promise<SettingDto>;
96
90
  export declare const getGetPublicSettingByUserAndIdQueryKey: (appShortName: string, id: string) => readonly [`/api/settings/application/${string}/id/${string}`];
97
- export declare const useGetPublicSettingByUserAndIdQueryOptions: <TData = SettingDto, TError = import("../../use-client").HttpError>(appShortName: string, id: string, options?: {
91
+ export declare const useGetPublicSettingByUserAndIdQueryOptions: <TData = SettingDto, TError = import('../../use-client').HttpError>(appShortName: string, id: string, options?: {
98
92
  query?: Partial<UseQueryOptions<SettingDto, TError, TData, QueryKey>> | undefined;
99
93
  } | undefined) => UseQueryOptions<SettingDto, TError, TData, QueryKey> & {
100
94
  queryKey: QueryKey;
@@ -104,7 +98,7 @@ export type GetPublicSettingByUserAndIdQueryError = ErrorType<void>;
104
98
  /**
105
99
  * @summary Get a users public Setting by id
106
100
  */
107
- export declare const useGetPublicSettingByUserAndId: <TData = SettingDto, TError = import("../../use-client").HttpError>(appShortName: string, id: string, options?: {
101
+ export declare const useGetPublicSettingByUserAndId: <TData = SettingDto, TError = import('../../use-client').HttpError>(appShortName: string, id: string, options?: {
108
102
  query?: Partial<UseQueryOptions<SettingDto, TError, TData, QueryKey>> | undefined;
109
103
  } | undefined) => UseQueryResult<TData, TError> & {
110
104
  queryKey: QueryKey;
@@ -113,7 +107,7 @@ export declare const useGetPublicSettingByUserAndId: <TData = SettingDto, TError
113
107
  * @summary Update a public Setting for a given appShortName by id
114
108
  */
115
109
  export declare const useUpdatePublicSettingByAppShortNameAndIdHook: () => (appShortName: string, id: string, settingDto: BodyType<SettingDto>) => Promise<SettingDto>;
116
- export declare const useUpdatePublicSettingByAppShortNameAndIdMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
110
+ export declare const useUpdatePublicSettingByAppShortNameAndIdMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
117
111
  mutation?: UseMutationOptions<SettingDto, TError, {
118
112
  appShortName: string;
119
113
  id: string;
@@ -130,13 +124,13 @@ export type UpdatePublicSettingByAppShortNameAndIdMutationError = ErrorType<void
130
124
  /**
131
125
  * @summary Update a public Setting for a given appShortName by id
132
126
  */
133
- export declare const useUpdatePublicSettingByAppShortNameAndId: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
127
+ export declare const useUpdatePublicSettingByAppShortNameAndId: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
134
128
  mutation?: UseMutationOptions<SettingDto, TError, {
135
129
  appShortName: string;
136
130
  id: string;
137
131
  data: BodyType<SettingDto>;
138
132
  }, TContext> | undefined;
139
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<SettingDto, TError, {
133
+ } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<SettingDto, TError, {
140
134
  appShortName: string;
141
135
  id: string;
142
136
  data: BodyType<SettingDto>;
@@ -145,7 +139,7 @@ export declare const useUpdatePublicSettingByAppShortNameAndId: <TError = import
145
139
  * @summary Delete a public Setting for a appShortName by id
146
140
  */
147
141
  export declare const useDeletePublicSettingByIdHook: () => (appShortName: string, id: string) => Promise<SettingDto>;
148
- export declare const useDeletePublicSettingByIdMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
142
+ export declare const useDeletePublicSettingByIdMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
149
143
  mutation?: UseMutationOptions<SettingDto, TError, {
150
144
  appShortName: string;
151
145
  id: string;
@@ -159,12 +153,12 @@ export type DeletePublicSettingByIdMutationError = ErrorType<void>;
159
153
  /**
160
154
  * @summary Delete a public Setting for a appShortName by id
161
155
  */
162
- export declare const useDeletePublicSettingById: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
156
+ export declare const useDeletePublicSettingById: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
163
157
  mutation?: UseMutationOptions<SettingDto, TError, {
164
158
  appShortName: string;
165
159
  id: string;
166
160
  }, TContext> | undefined;
167
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<SettingDto, TError, {
161
+ } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<SettingDto, TError, {
168
162
  appShortName: string;
169
163
  id: string;
170
164
  }, TContext>;
@@ -173,7 +167,7 @@ export declare const useDeletePublicSettingById: <TError = import("../../use-cli
173
167
  */
174
168
  export declare const useGetSettingsByUserIdHook: () => (userId: string, signal?: AbortSignal) => Promise<SettingDto[]>;
175
169
  export declare const getGetSettingsByUserIdQueryKey: (userId: string) => readonly [`/api/settings/user/${string}`];
176
- export declare const useGetSettingsByUserIdQueryOptions: <TData = SettingDto[], TError = import("../../use-client").HttpError>(userId: string, options?: {
170
+ export declare const useGetSettingsByUserIdQueryOptions: <TData = SettingDto[], TError = import('../../use-client').HttpError>(userId: string, options?: {
177
171
  query?: Partial<UseQueryOptions<SettingDto[], TError, TData, QueryKey>> | undefined;
178
172
  } | undefined) => UseQueryOptions<SettingDto[], TError, TData, QueryKey> & {
179
173
  queryKey: QueryKey;
@@ -183,7 +177,7 @@ export type GetSettingsByUserIdQueryError = ErrorType<void>;
183
177
  /**
184
178
  * @summary Get all private Settings by userId
185
179
  */
186
- export declare const useGetSettingsByUserId: <TData = SettingDto[], TError = import("../../use-client").HttpError>(userId: string, options?: {
180
+ export declare const useGetSettingsByUserId: <TData = SettingDto[], TError = import('../../use-client').HttpError>(userId: string, options?: {
187
181
  query?: Partial<UseQueryOptions<SettingDto[], TError, TData, QueryKey>> | undefined;
188
182
  } | undefined) => UseQueryResult<TData, TError> & {
189
183
  queryKey: QueryKey;
@@ -192,7 +186,7 @@ export declare const useGetSettingsByUserId: <TData = SettingDto[], TError = imp
192
186
  * @summary Create a private Setting for a given user
193
187
  */
194
188
  export declare const useCreateSettingByUserIdHook: () => (userId: string, settingDto: BodyType<SettingDto>) => Promise<SettingDto>;
195
- export declare const useCreateSettingByUserIdMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
189
+ export declare const useCreateSettingByUserIdMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
196
190
  mutation?: UseMutationOptions<SettingDto, TError, {
197
191
  userId: string;
198
192
  data: BodyType<SettingDto>;
@@ -207,12 +201,12 @@ export type CreateSettingByUserIdMutationError = ErrorType<void>;
207
201
  /**
208
202
  * @summary Create a private Setting for a given user
209
203
  */
210
- export declare const useCreateSettingByUserId: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
204
+ export declare const useCreateSettingByUserId: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
211
205
  mutation?: UseMutationOptions<SettingDto, TError, {
212
206
  userId: string;
213
207
  data: BodyType<SettingDto>;
214
208
  }, TContext> | undefined;
215
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<SettingDto, TError, {
209
+ } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<SettingDto, TError, {
216
210
  userId: string;
217
211
  data: BodyType<SettingDto>;
218
212
  }, TContext>;
@@ -221,7 +215,7 @@ export declare const useCreateSettingByUserId: <TError = import("../../use-clien
221
215
  */
222
216
  export declare const useGetSettingsByAppShortNameHook: () => (appShortName: string, signal?: AbortSignal) => Promise<SettingDto[]>;
223
217
  export declare const getGetSettingsByAppShortNameQueryKey: (appShortName: string) => readonly [`/api/settings/application/${string}`];
224
- export declare const useGetSettingsByAppShortNameQueryOptions: <TData = SettingDto[], TError = import("../../use-client").HttpError>(appShortName: string, options?: {
218
+ export declare const useGetSettingsByAppShortNameQueryOptions: <TData = SettingDto[], TError = import('../../use-client').HttpError>(appShortName: string, options?: {
225
219
  query?: Partial<UseQueryOptions<SettingDto[], TError, TData, QueryKey>> | undefined;
226
220
  } | undefined) => UseQueryOptions<SettingDto[], TError, TData, QueryKey> & {
227
221
  queryKey: QueryKey;
@@ -231,7 +225,7 @@ export type GetSettingsByAppShortNameQueryError = ErrorType<void>;
231
225
  /**
232
226
  * @summary Get all public or mine Settings by appShortName
233
227
  */
234
- export declare const useGetSettingsByAppShortName: <TData = SettingDto[], TError = import("../../use-client").HttpError>(appShortName: string, options?: {
228
+ export declare const useGetSettingsByAppShortName: <TData = SettingDto[], TError = import('../../use-client').HttpError>(appShortName: string, options?: {
235
229
  query?: Partial<UseQueryOptions<SettingDto[], TError, TData, QueryKey>> | undefined;
236
230
  } | undefined) => UseQueryResult<TData, TError> & {
237
231
  queryKey: QueryKey;
@@ -240,7 +234,7 @@ export declare const useGetSettingsByAppShortName: <TData = SettingDto[], TError
240
234
  * @summary Create a public Setting for a given appShortName
241
235
  */
242
236
  export declare const useCreatePublicSettingByUserIdHook: () => (appShortName: string, settingDto: BodyType<SettingDto>) => Promise<SettingDto>;
243
- export declare const useCreatePublicSettingByUserIdMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
237
+ export declare const useCreatePublicSettingByUserIdMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
244
238
  mutation?: UseMutationOptions<SettingDto, TError, {
245
239
  appShortName: string;
246
240
  data: BodyType<SettingDto>;
@@ -255,12 +249,12 @@ export type CreatePublicSettingByUserIdMutationError = ErrorType<void>;
255
249
  /**
256
250
  * @summary Create a public Setting for a given appShortName
257
251
  */
258
- export declare const useCreatePublicSettingByUserId: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
252
+ export declare const useCreatePublicSettingByUserId: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
259
253
  mutation?: UseMutationOptions<SettingDto, TError, {
260
254
  appShortName: string;
261
255
  data: BodyType<SettingDto>;
262
256
  }, TContext> | undefined;
263
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<SettingDto, TError, {
257
+ } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<SettingDto, TError, {
264
258
  appShortName: string;
265
259
  data: BodyType<SettingDto>;
266
260
  }, TContext>;
@@ -1,12 +1,6 @@
1
- /**
2
- * Generated by orval v6.20.0 🍺
3
- * Do not edit manually.
4
- * Tops Roma Rest API
5
- * Tops Roma Rest API
6
- * OpenAPI spec version: v1.0.0
7
- */
8
- import type { CategoryDto } from './categoryDto';
9
- import type { VersionDto } from './versionDto';
1
+ import { CategoryDto } from './categoryDto';
2
+ import { VersionDto } from './versionDto';
3
+
10
4
  export interface AppDto {
11
5
  accentColor?: string;
12
6
  category?: CategoryDto;
@@ -1,11 +1,5 @@
1
- /**
2
- * Generated by orval v6.20.0 🍺
3
- * Do not edit manually.
4
- * Tops Roma Rest API
5
- * Tops Roma Rest API
6
- * OpenAPI spec version: v1.0.0
7
- */
8
- import type { ServiceDto } from './serviceDto';
1
+ import { ServiceDto } from './serviceDto';
2
+
9
3
  export interface EnvironmentDto {
10
4
  clientId?: string;
11
5
  environmentName?: string;
@@ -1,11 +1,5 @@
1
- /**
2
- * Generated by orval v6.20.0 🍺
3
- * Do not edit manually.
4
- * Tops Roma Rest API
5
- * Tops Roma Rest API
6
- * OpenAPI spec version: v1.0.0
7
- */
8
- import type { RomaConfigurationDtoValue } from './romaConfigurationDtoValue';
1
+ import { RomaConfigurationDtoValue } from './romaConfigurationDtoValue';
2
+
9
3
  export interface RomaConfigurationDto {
10
4
  id?: string;
11
5
  name: string;
@@ -1,11 +1,5 @@
1
- /**
2
- * Generated by orval v6.20.0 🍺
3
- * Do not edit manually.
4
- * Tops Roma Rest API
5
- * Tops Roma Rest API
6
- * OpenAPI spec version: v1.0.0
7
- */
8
- import type { SettingDtoValue } from './settingDtoValue';
1
+ import { SettingDtoValue } from './settingDtoValue';
2
+
9
3
  export interface SettingDto {
10
4
  appShortName?: string;
11
5
  id?: string;
@@ -1,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { AppManifest } from '@equinor/fusion-framework-module-app';
3
- import type { QueryClientError } from '@equinor/fusion-query/client';
3
+ import { QueryClientError } from '@equinor/fusion-query/client';
4
+
4
5
  type AppLoadError = QueryClientError & {
5
6
  cause: {
6
7
  data: unknown;
@@ -8,7 +9,7 @@ type AppLoadError = QueryClientError & {
8
9
  response: Response;
9
10
  };
10
11
  };
11
- export declare const AppContext: import("react").Context<{
12
+ export declare const AppContext: import('react').Context<{
12
13
  isLoading: boolean;
13
14
  apps?: AppManifest[] | undefined;
14
15
  error?: AppLoadError | undefined;
@@ -1,12 +1,15 @@
1
1
  import { AppManifest } from '@equinor/fusion-framework-module-app';
2
+
2
3
  /**
3
4
  * Component that will render a Fusion application
4
5
  *
5
6
  * @param app the AppManifest for the application to render
6
7
  * @param kind whether the app is a widget or an application
8
+ * @param props any props to pass to the loaded application
7
9
  * @constructor
8
10
  */
9
- export declare function AppLoader({ app, kind, }: {
11
+ export declare function AppLoader({ app, kind, props, }: {
10
12
  app: AppManifest | null;
11
13
  kind?: 'app' | 'widget';
14
+ props?: Record<string | number, any>;
12
15
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  /**
3
4
  * Simple in-place loader for fusion apps
4
5
  *
@@ -1,4 +1,5 @@
1
1
  import { ReactElement, CSSProperties } from 'react';
2
+
2
3
  /**
3
4
  * Simple error display component.
4
5
  * Does not create a pretty error, and should most likely be recreated for various error types (e.g. lack of access etc.)
@@ -1,4 +1,5 @@
1
1
  import { HttpError } from '../api/fetcher';
2
+
2
3
  /**
3
4
  * Simple error display component.
4
5
  * Does not create a pretty error, and should most likely be recreated for various error types (e.g. lack of access etc.)
@@ -1,5 +1,6 @@
1
1
  import { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
2
2
  import { ReactNode } from 'react';
3
+
3
4
  export declare const EdsEventProvider: ({ event, children }: {
4
5
  event: IEventModuleProvider;
5
6
  children: ReactNode;
@@ -1,9 +1,10 @@
1
1
  import { AnyModule } from '@equinor/fusion-framework-module';
2
2
  import { Fusion } from '@equinor/fusion-framework-react';
3
3
  import { AppEnv, AppModuleInitiator } from '@equinor/fusion-framework-app';
4
- import React, { ReactNode } from 'react';
4
+ import { default as React, ReactNode } from 'react';
5
5
  import { ComponentRenderArgs as FusionComponentRenderArgs } from '@equinor/fusion-framework-react-app';
6
6
  import { QueryClient } from '@tanstack/react-query';
7
+
7
8
  export type RomaComponentRenderArgs<TRef extends Fusion = Fusion, TEnv = AppEnv> = FusionComponentRenderArgs<TRef, TEnv> & {
8
9
  query?: QueryClient;
9
10
  };
@@ -1,4 +1,5 @@
1
1
  import { Persister } from '@tanstack/react-query-persist-client';
2
+
2
3
  /**
3
4
  * Creates an Indexed DB persister
4
5
  * @see https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+
2
3
  type Props = {
3
4
  scope: string;
4
5
  children: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/roma-framework",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "repository": "https://github.com/equinor/tops-roma",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -5054,7 +5054,8 @@ function getAppModule(app, framework) {
5054
5054
  }
5055
5055
  function AppLoader({
5056
5056
  app,
5057
- kind
5057
+ kind,
5058
+ props
5058
5059
  }) {
5059
5060
  const queryClient = useQueryClient();
5060
5061
  kind = kind ?? "widget";
@@ -5086,9 +5087,7 @@ function AppLoader({
5086
5087
  endpoints: {}
5087
5088
  },
5088
5089
  basename,
5089
- props: {
5090
- // Ways to reuse this? Could be particularly useful for widgets in a given context.
5091
- }
5090
+ props: props ?? {}
5092
5091
  }
5093
5092
  });
5094
5093
  if (kind === "app") {
@@ -1,100 +0,0 @@
1
- /**
2
- * Generated by orval v6.20.0 🍺
3
- * Do not edit manually.
4
- * Tops Roma Rest API
5
- * Tops Roma Rest API
6
- * OpenAPI spec version: v1.0.0
7
- */
8
- import type { QueryKey, UseMutationOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
9
- import type { AppDto } from '../../model';
10
- import type { BodyType, ErrorType } from '../../use-client';
11
- type AwaitedInput<T> = PromiseLike<T> | T;
12
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
13
- /**
14
- * @summary List apps
15
- */
16
- export declare const useGetAllAppsHook: () => (signal?: AbortSignal) => Promise<AppDto[]>;
17
- export declare const getGetAllAppsQueryKey: () => readonly ["/api/apps"];
18
- export declare const useGetAllAppsQueryOptions: <TData = AppDto[], TError = import("../../use-client").HttpError>(options?: {
19
- query?: Partial<UseQueryOptions<AppDto[], TError, TData, QueryKey>> | undefined;
20
- } | undefined) => UseQueryOptions<AppDto[], TError, TData, QueryKey> & {
21
- queryKey: QueryKey;
22
- };
23
- export type GetAllAppsQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>>;
24
- export type GetAllAppsQueryError = ErrorType<void>;
25
- /**
26
- * @summary List apps
27
- */
28
- export declare const useGetAllApps: <TData = AppDto[], TError = import("../../use-client").HttpError>(options?: {
29
- query?: Partial<UseQueryOptions<AppDto[], TError, TData, QueryKey>> | undefined;
30
- } | undefined) => UseQueryResult<TData, TError> & {
31
- queryKey: QueryKey;
32
- };
33
- /**
34
- * @summary Create or update App
35
- */
36
- export declare const useCreateOrUpdateAppHook: () => (appDto: BodyType<AppDto>) => Promise<AppDto>;
37
- export declare const useCreateOrUpdateAppMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
38
- mutation?: UseMutationOptions<AppDto, TError, {
39
- data: BodyType<AppDto>;
40
- }, TContext> | undefined;
41
- } | undefined) => UseMutationOptions<AppDto, TError, {
42
- data: BodyType<AppDto>;
43
- }, TContext>;
44
- export type CreateOrUpdateAppMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateAppHook>>>>;
45
- export type CreateOrUpdateAppMutationBody = BodyType<AppDto>;
46
- export type CreateOrUpdateAppMutationError = ErrorType<void>;
47
- /**
48
- * @summary Create or update App
49
- */
50
- export declare const useCreateOrUpdateApp: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
51
- mutation?: UseMutationOptions<AppDto, TError, {
52
- data: BodyType<AppDto>;
53
- }, TContext> | undefined;
54
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<AppDto, TError, {
55
- data: BodyType<AppDto>;
56
- }, TContext>;
57
- /**
58
- * @summary Get app by key
59
- */
60
- export declare const useGetAppByKeyHook: () => (key: string, signal?: AbortSignal) => Promise<AppDto>;
61
- export declare const getGetAppByKeyQueryKey: (key: string) => readonly [`/api/apps/key/${string}`];
62
- export declare const useGetAppByKeyQueryOptions: <TData = AppDto, TError = import("../../use-client").HttpError>(key: string, options?: {
63
- query?: Partial<UseQueryOptions<AppDto, TError, TData, QueryKey>> | undefined;
64
- } | undefined) => UseQueryOptions<AppDto, TError, TData, QueryKey> & {
65
- queryKey: QueryKey;
66
- };
67
- export type GetAppByKeyQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>>;
68
- export type GetAppByKeyQueryError = ErrorType<void>;
69
- /**
70
- * @summary Get app by key
71
- */
72
- export declare const useGetAppByKey: <TData = AppDto, TError = import("../../use-client").HttpError>(key: string, options?: {
73
- query?: Partial<UseQueryOptions<AppDto, TError, TData, QueryKey>> | undefined;
74
- } | undefined) => UseQueryResult<TData, TError> & {
75
- queryKey: QueryKey;
76
- };
77
- /**
78
- * @summary Delete app by key
79
- */
80
- export declare const useDeleteAppByKeyHook: () => (key: string) => Promise<void>;
81
- export declare const useDeleteAppByKeyMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
82
- mutation?: UseMutationOptions<void, TError, {
83
- key: string;
84
- }, TContext> | undefined;
85
- } | undefined) => UseMutationOptions<void, TError, {
86
- key: string;
87
- }, TContext>;
88
- export type DeleteAppByKeyMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteAppByKeyHook>>>>;
89
- export type DeleteAppByKeyMutationError = ErrorType<unknown>;
90
- /**
91
- * @summary Delete app by key
92
- */
93
- export declare const useDeleteAppByKey: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
94
- mutation?: UseMutationOptions<void, TError, {
95
- key: string;
96
- }, TContext> | undefined;
97
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<void, TError, {
98
- key: string;
99
- }, TContext>;
100
- export {};
@@ -1,100 +0,0 @@
1
- /**
2
- * Generated by orval v6.20.0 🍺
3
- * Do not edit manually.
4
- * Tops Roma Rest API
5
- * Tops Roma Rest API
6
- * OpenAPI spec version: v1.0.0
7
- */
8
- import type { QueryKey, UseMutationOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
9
- import type { CategoryDto } from '../../model';
10
- import type { BodyType, ErrorType } from '../../use-client';
11
- type AwaitedInput<T> = PromiseLike<T> | T;
12
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
13
- /**
14
- * @summary List categories
15
- */
16
- export declare const useGetAllCategoriesHook: () => (signal?: AbortSignal) => Promise<CategoryDto[]>;
17
- export declare const getGetAllCategoriesQueryKey: () => readonly ["/api/apps/categories"];
18
- export declare const useGetAllCategoriesQueryOptions: <TData = CategoryDto[], TError = import("../../use-client").HttpError>(options?: {
19
- query?: Partial<UseQueryOptions<CategoryDto[], TError, TData, QueryKey>> | undefined;
20
- } | undefined) => UseQueryOptions<CategoryDto[], TError, TData, QueryKey> & {
21
- queryKey: QueryKey;
22
- };
23
- export type GetAllCategoriesQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>>;
24
- export type GetAllCategoriesQueryError = ErrorType<void>;
25
- /**
26
- * @summary List categories
27
- */
28
- export declare const useGetAllCategories: <TData = CategoryDto[], TError = import("../../use-client").HttpError>(options?: {
29
- query?: Partial<UseQueryOptions<CategoryDto[], TError, TData, QueryKey>> | undefined;
30
- } | undefined) => UseQueryResult<TData, TError> & {
31
- queryKey: QueryKey;
32
- };
33
- /**
34
- * @summary Create or update category
35
- */
36
- export declare const useCreateOrUpdateCategoryHook: () => (categoryDto: BodyType<CategoryDto>) => Promise<CategoryDto>;
37
- export declare const useCreateOrUpdateCategoryMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
38
- mutation?: UseMutationOptions<CategoryDto, TError, {
39
- data: BodyType<CategoryDto>;
40
- }, TContext> | undefined;
41
- } | undefined) => UseMutationOptions<CategoryDto, TError, {
42
- data: BodyType<CategoryDto>;
43
- }, TContext>;
44
- export type CreateOrUpdateCategoryMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateCategoryHook>>>>;
45
- export type CreateOrUpdateCategoryMutationBody = BodyType<CategoryDto>;
46
- export type CreateOrUpdateCategoryMutationError = ErrorType<void>;
47
- /**
48
- * @summary Create or update category
49
- */
50
- export declare const useCreateOrUpdateCategory: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
51
- mutation?: UseMutationOptions<CategoryDto, TError, {
52
- data: BodyType<CategoryDto>;
53
- }, TContext> | undefined;
54
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<CategoryDto, TError, {
55
- data: BodyType<CategoryDto>;
56
- }, TContext>;
57
- /**
58
- * @summary Get category by id
59
- */
60
- export declare const useGetCategoryByIdHook: () => (id: string, signal?: AbortSignal) => Promise<CategoryDto>;
61
- export declare const getGetCategoryByIdQueryKey: (id: string) => readonly [`/api/apps/categories/id/${string}`];
62
- export declare const useGetCategoryByIdQueryOptions: <TData = CategoryDto, TError = import("../../use-client").HttpError>(id: string, options?: {
63
- query?: Partial<UseQueryOptions<CategoryDto, TError, TData, QueryKey>> | undefined;
64
- } | undefined) => UseQueryOptions<CategoryDto, TError, TData, QueryKey> & {
65
- queryKey: QueryKey;
66
- };
67
- export type GetCategoryByIdQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>>;
68
- export type GetCategoryByIdQueryError = ErrorType<void>;
69
- /**
70
- * @summary Get category by id
71
- */
72
- export declare const useGetCategoryById: <TData = CategoryDto, TError = import("../../use-client").HttpError>(id: string, options?: {
73
- query?: Partial<UseQueryOptions<CategoryDto, TError, TData, QueryKey>> | undefined;
74
- } | undefined) => UseQueryResult<TData, TError> & {
75
- queryKey: QueryKey;
76
- };
77
- /**
78
- * @summary Delete category by id
79
- */
80
- export declare const useDeleteCategoryByIdHook: () => (id: string) => Promise<void>;
81
- export declare const useDeleteCategoryByIdMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
82
- mutation?: UseMutationOptions<void, TError, {
83
- id: string;
84
- }, TContext> | undefined;
85
- } | undefined) => UseMutationOptions<void, TError, {
86
- id: string;
87
- }, TContext>;
88
- export type DeleteCategoryByIdMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteCategoryByIdHook>>>>;
89
- export type DeleteCategoryByIdMutationError = ErrorType<unknown>;
90
- /**
91
- * @summary Delete category by id
92
- */
93
- export declare const useDeleteCategoryById: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
94
- mutation?: UseMutationOptions<void, TError, {
95
- id: string;
96
- }, TContext> | undefined;
97
- } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<void, TError, {
98
- id: string;
99
- }, TContext>;
100
- export {};