@equinor/roma-framework 0.0.7-BETA.1 → 0.0.7-BETA.3

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.
@@ -5,6 +5,8 @@
5
5
  <title>Workbench</title>
6
6
  <base href='/'/>
7
7
  <script>
8
+ // To make wysiwyg editor work
9
+ window.global = window;
8
10
  // Hack to avoid duplicate registration of custom elements
9
11
  const _customElementsDefine = window.customElements.define;
10
12
  window.customElements.define = (name, cl, conf) => {
@@ -11,7 +11,7 @@ import type { BodyType, ErrorType } from '../../use-client';
11
11
  type AwaitedInput<T> = PromiseLike<T> | T;
12
12
  type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
13
13
  /**
14
- * @summary Get an application default Settings
14
+ * @summary Get a Setting by userId/settingKey
15
15
  */
16
16
  export declare const useGetSettingByUserAndSettingKeyHook: () => (userId: string, settingKey: string, signal?: AbortSignal) => Promise<SettingDto>;
17
17
  export declare const getGetSettingByUserAndSettingKeyQueryKey: (userId: string, settingKey: string) => readonly [`/api/settings/user/${string}/setting/${string}`];
@@ -23,7 +23,7 @@ export declare const useGetSettingByUserAndSettingKeyQueryOptions: <TData = Sett
23
23
  export type GetSettingByUserAndSettingKeyQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetSettingByUserAndSettingKeyHook>>>>;
24
24
  export type GetSettingByUserAndSettingKeyQueryError = ErrorType<void>;
25
25
  /**
26
- * @summary Get an application default Settings
26
+ * @summary Get a Setting by userId/settingKey
27
27
  */
28
28
  export declare const useGetSettingByUserAndSettingKey: <TData = SettingDto, TError = import("../../use-client").HttpError>(userId: string, settingKey: string, options?: {
29
29
  query?: Partial<UseQueryOptions<SettingDto, TError, TData, QueryKey>> | undefined;
@@ -31,7 +31,7 @@ export declare const useGetSettingByUserAndSettingKey: <TData = SettingDto, TErr
31
31
  queryKey: QueryKey;
32
32
  };
33
33
  /**
34
- * @summary Create or update an application default Settings
34
+ * @summary Create or update a Setting by userId/settingKey
35
35
  */
36
36
  export declare const useCreateOrUpdateSettingByUserAndSettingKeyHook: () => (userId: string, settingKey: string, settingDto: BodyType<SettingDto>) => Promise<SettingDto>;
37
37
  export declare const useCreateOrUpdateSettingByUserAndSettingKeyMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
@@ -49,7 +49,7 @@ export type CreateOrUpdateSettingByUserAndSettingKeyMutationResult = NonNullable
49
49
  export type CreateOrUpdateSettingByUserAndSettingKeyMutationBody = BodyType<SettingDto>;
50
50
  export type CreateOrUpdateSettingByUserAndSettingKeyMutationError = ErrorType<void>;
51
51
  /**
52
- * @summary Create or update an application default Settings
52
+ * @summary Create or update a Setting by userId/settingKey
53
53
  */
54
54
  export declare const useCreateOrUpdateSettingByUserAndSettingKey: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
55
55
  mutation?: UseMutationOptions<SettingDto, TError, {
@@ -63,7 +63,7 @@ export declare const useCreateOrUpdateSettingByUserAndSettingKey: <TError = impo
63
63
  data: BodyType<SettingDto>;
64
64
  }, TContext>;
65
65
  /**
66
- * @summary Delete an application default Settings
66
+ * @summary Delete a Setting by userId/settingKey
67
67
  */
68
68
  export declare const useDeleteSettingByUserAndSettingKeyHook: () => (userId: string, settingKey: string) => Promise<SettingDto>;
69
69
  export declare const useDeleteSettingByUserAndSettingKeyMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
@@ -78,7 +78,7 @@ export declare const useDeleteSettingByUserAndSettingKeyMutationOptions: <TError
78
78
  export type DeleteSettingByUserAndSettingKeyMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteSettingByUserAndSettingKeyHook>>>>;
79
79
  export type DeleteSettingByUserAndSettingKeyMutationError = ErrorType<void>;
80
80
  /**
81
- * @summary Delete an application default Settings
81
+ * @summary Delete a Setting by userId/settingKey
82
82
  */
83
83
  export declare const useDeleteSettingByUserAndSettingKey: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
84
84
  mutation?: UseMutationOptions<SettingDto, TError, {
@@ -89,6 +89,9 @@ export declare const useDeleteSettingByUserAndSettingKey: <TError = import("../.
89
89
  userId: string;
90
90
  settingKey: string;
91
91
  }, TContext>;
92
+ /**
93
+ * @summary Get Setting by appShortName/settingKey/userId
94
+ */
92
95
  export declare const useGetSettingByUserAndAppShortNameAndSetttingKeyHook: () => (userId: string, appShortName: string, settingKey: string, signal?: AbortSignal) => Promise<SettingDto>;
93
96
  export declare const getGetSettingByUserAndAppShortNameAndSetttingKeyQueryKey: (userId: string, appShortName: string, settingKey: string) => readonly [`/api/settings/user/${string}/application/${string}/setting/${string}`];
94
97
  export declare const useGetSettingByUserAndAppShortNameAndSetttingKeyQueryOptions: <TData = SettingDto, TError = import("../../use-client").HttpError>(userId: string, appShortName: string, settingKey: string, options?: {
@@ -98,13 +101,16 @@ export declare const useGetSettingByUserAndAppShortNameAndSetttingKeyQueryOption
98
101
  };
99
102
  export type GetSettingByUserAndAppShortNameAndSetttingKeyQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetSettingByUserAndAppShortNameAndSetttingKeyHook>>>>;
100
103
  export type GetSettingByUserAndAppShortNameAndSetttingKeyQueryError = ErrorType<void>;
104
+ /**
105
+ * @summary Get Setting by appShortName/settingKey/userId
106
+ */
101
107
  export declare const useGetSettingByUserAndAppShortNameAndSetttingKey: <TData = SettingDto, TError = import("../../use-client").HttpError>(userId: string, appShortName: string, settingKey: string, options?: {
102
108
  query?: Partial<UseQueryOptions<SettingDto, TError, TData, QueryKey>> | undefined;
103
109
  } | undefined) => UseQueryResult<TData, TError> & {
104
110
  queryKey: QueryKey;
105
111
  };
106
112
  /**
107
- * @summary Create or update a users ApplicationSettings for given app
113
+ * @summary Create or update a Setting by appShortName/settingKey/userId
108
114
  */
109
115
  export declare const useCreateOrUpdateSettingByUserAndAppShortNameAndSettingKeyHook: () => (userId: string, appShortName: string, settingKey: string, settingDto: BodyType<SettingDto>) => Promise<SettingDto>;
110
116
  export declare const useCreateOrUpdateSettingByUserAndAppShortNameAndSettingKeyMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
@@ -124,7 +130,7 @@ export type CreateOrUpdateSettingByUserAndAppShortNameAndSettingKeyMutationResul
124
130
  export type CreateOrUpdateSettingByUserAndAppShortNameAndSettingKeyMutationBody = BodyType<SettingDto>;
125
131
  export type CreateOrUpdateSettingByUserAndAppShortNameAndSettingKeyMutationError = ErrorType<void>;
126
132
  /**
127
- * @summary Create or update a users ApplicationSettings for given app
133
+ * @summary Create or update a Setting by appShortName/settingKey/userId
128
134
  */
129
135
  export declare const useCreateOrUpdateSettingByUserAndAppShortNameAndSettingKey: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
130
136
  mutation?: UseMutationOptions<SettingDto, TError, {
@@ -140,7 +146,7 @@ export declare const useCreateOrUpdateSettingByUserAndAppShortNameAndSettingKey:
140
146
  data: BodyType<SettingDto>;
141
147
  }, TContext>;
142
148
  /**
143
- * @summary Delete an ApplicationSetting for given app
149
+ * @summary Delete a Setting by appShortName/settingKey/userId
144
150
  */
145
151
  export declare const useDeleteSettingByUserAndAppShortNameAndSettingKeyHook: () => (userId: string, appShortName: string, settingKey: string) => Promise<SettingDto>;
146
152
  export declare const useDeleteSettingByUserAndAppShortNameAndSettingKeyMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
@@ -157,7 +163,7 @@ export declare const useDeleteSettingByUserAndAppShortNameAndSettingKeyMutationO
157
163
  export type DeleteSettingByUserAndAppShortNameAndSettingKeyMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteSettingByUserAndAppShortNameAndSettingKeyHook>>>>;
158
164
  export type DeleteSettingByUserAndAppShortNameAndSettingKeyMutationError = ErrorType<void>;
159
165
  /**
160
- * @summary Delete an ApplicationSetting for given app
166
+ * @summary Delete a Setting by appShortName/settingKey/userId
161
167
  */
162
168
  export declare const useDeleteSettingByUserAndAppShortNameAndSettingKey: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
163
169
  mutation?: UseMutationOptions<SettingDto, TError, {
@@ -171,7 +177,86 @@ export declare const useDeleteSettingByUserAndAppShortNameAndSettingKey: <TError
171
177
  settingKey: string;
172
178
  }, TContext>;
173
179
  /**
174
- * @summary Get Setting
180
+ * @summary Get Setting by appShortName/settingKey
181
+ */
182
+ export declare const useGetByAppShortNameAndSettingKeyHook: () => (appShortName: string, settingKey: string, signal?: AbortSignal) => Promise<SettingDto>;
183
+ export declare const getGetByAppShortNameAndSettingKeyQueryKey: (appShortName: string, settingKey: string) => readonly [`/api/settings/application/${string}/setting/${string}`];
184
+ export declare const useGetByAppShortNameAndSettingKeyQueryOptions: <TData = SettingDto, TError = import("../../use-client").HttpError>(appShortName: string, settingKey: string, options?: {
185
+ query?: Partial<UseQueryOptions<SettingDto, TError, TData, QueryKey>> | undefined;
186
+ } | undefined) => UseQueryOptions<SettingDto, TError, TData, QueryKey> & {
187
+ queryKey: QueryKey;
188
+ };
189
+ export type GetByAppShortNameAndSettingKeyQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetByAppShortNameAndSettingKeyHook>>>>;
190
+ export type GetByAppShortNameAndSettingKeyQueryError = ErrorType<void>;
191
+ /**
192
+ * @summary Get Setting by appShortName/settingKey
193
+ */
194
+ export declare const useGetByAppShortNameAndSettingKey: <TData = SettingDto, TError = import("../../use-client").HttpError>(appShortName: string, settingKey: string, options?: {
195
+ query?: Partial<UseQueryOptions<SettingDto, TError, TData, QueryKey>> | undefined;
196
+ } | undefined) => UseQueryResult<TData, TError> & {
197
+ queryKey: QueryKey;
198
+ };
199
+ /**
200
+ * @summary Create or update a Setting by appShortName/settingKey
201
+ */
202
+ export declare const useCreateOrUpdateAppShortNameAndSettingKeyHook: () => (appShortName: string, settingKey: string, settingDto: BodyType<SettingDto>) => Promise<SettingDto>;
203
+ export declare const useCreateOrUpdateAppShortNameAndSettingKeyMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
204
+ mutation?: UseMutationOptions<SettingDto, TError, {
205
+ appShortName: string;
206
+ settingKey: string;
207
+ data: BodyType<SettingDto>;
208
+ }, TContext> | undefined;
209
+ } | undefined) => UseMutationOptions<SettingDto, TError, {
210
+ appShortName: string;
211
+ settingKey: string;
212
+ data: BodyType<SettingDto>;
213
+ }, TContext>;
214
+ export type CreateOrUpdateAppShortNameAndSettingKeyMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateAppShortNameAndSettingKeyHook>>>>;
215
+ export type CreateOrUpdateAppShortNameAndSettingKeyMutationBody = BodyType<SettingDto>;
216
+ export type CreateOrUpdateAppShortNameAndSettingKeyMutationError = ErrorType<void>;
217
+ /**
218
+ * @summary Create or update a Setting by appShortName/settingKey
219
+ */
220
+ export declare const useCreateOrUpdateAppShortNameAndSettingKey: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
221
+ mutation?: UseMutationOptions<SettingDto, TError, {
222
+ appShortName: string;
223
+ settingKey: string;
224
+ data: BodyType<SettingDto>;
225
+ }, TContext> | undefined;
226
+ } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<SettingDto, TError, {
227
+ appShortName: string;
228
+ settingKey: string;
229
+ data: BodyType<SettingDto>;
230
+ }, TContext>;
231
+ /**
232
+ * @summary Delete a Setting by appShortName/settingKey
233
+ */
234
+ export declare const useDeleteAppShortNameAndSettingKeyHook: () => (appShortName: string, settingKey: string) => Promise<SettingDto>;
235
+ export declare const useDeleteAppShortNameAndSettingKeyMutationOptions: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
236
+ mutation?: UseMutationOptions<SettingDto, TError, {
237
+ appShortName: string;
238
+ settingKey: string;
239
+ }, TContext> | undefined;
240
+ } | undefined) => UseMutationOptions<SettingDto, TError, {
241
+ appShortName: string;
242
+ settingKey: string;
243
+ }, TContext>;
244
+ export type DeleteAppShortNameAndSettingKeyMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteAppShortNameAndSettingKeyHook>>>>;
245
+ export type DeleteAppShortNameAndSettingKeyMutationError = ErrorType<void>;
246
+ /**
247
+ * @summary Delete a Setting by appShortName/settingKey
248
+ */
249
+ export declare const useDeleteAppShortNameAndSettingKey: <TError = import("../../use-client").HttpError, TContext = unknown>(options?: {
250
+ mutation?: UseMutationOptions<SettingDto, TError, {
251
+ appShortName: string;
252
+ settingKey: string;
253
+ }, TContext> | undefined;
254
+ } | undefined) => import("@tanstack/react-query/build/legacy/types").UseMutationResult<SettingDto, TError, {
255
+ appShortName: string;
256
+ settingKey: string;
257
+ }, TContext>;
258
+ /**
259
+ * @summary Get list of Settings by appShortName/userId
175
260
  */
176
261
  export declare const useGetSettingByUserAndAppShortNameHook: () => (userId: string, appShortName: string, signal?: AbortSignal) => Promise<SettingDto[]>;
177
262
  export declare const getGetSettingByUserAndAppShortNameQueryKey: (userId: string, appShortName: string) => readonly [`/api/settings/user/${string}/application/${string}`];
@@ -183,11 +268,31 @@ export declare const useGetSettingByUserAndAppShortNameQueryOptions: <TData = Se
183
268
  export type GetSettingByUserAndAppShortNameQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetSettingByUserAndAppShortNameHook>>>>;
184
269
  export type GetSettingByUserAndAppShortNameQueryError = ErrorType<void>;
185
270
  /**
186
- * @summary Get Setting
271
+ * @summary Get list of Settings by appShortName/userId
187
272
  */
188
273
  export declare const useGetSettingByUserAndAppShortName: <TData = SettingDto[], TError = import("../../use-client").HttpError>(userId: string, appShortName: string, options?: {
189
274
  query?: Partial<UseQueryOptions<SettingDto[], TError, TData, QueryKey>> | undefined;
190
275
  } | undefined) => UseQueryResult<TData, TError> & {
191
276
  queryKey: QueryKey;
192
277
  };
278
+ /**
279
+ * @summary Get list of Settings by appShortName
280
+ */
281
+ export declare const useGetSettingsAppShortNameHook: () => (appShortName: string, signal?: AbortSignal) => Promise<SettingDto[]>;
282
+ export declare const getGetSettingsAppShortNameQueryKey: (appShortName: string) => readonly [`/api/settings/application/${string}`];
283
+ export declare const useGetSettingsAppShortNameQueryOptions: <TData = SettingDto[], TError = import("../../use-client").HttpError>(appShortName: string, options?: {
284
+ query?: Partial<UseQueryOptions<SettingDto[], TError, TData, QueryKey>> | undefined;
285
+ } | undefined) => UseQueryOptions<SettingDto[], TError, TData, QueryKey> & {
286
+ queryKey: QueryKey;
287
+ };
288
+ export type GetSettingsAppShortNameQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetSettingsAppShortNameHook>>>>;
289
+ export type GetSettingsAppShortNameQueryError = ErrorType<void>;
290
+ /**
291
+ * @summary Get list of Settings by appShortName
292
+ */
293
+ export declare const useGetSettingsAppShortName: <TData = SettingDto[], TError = import("../../use-client").HttpError>(appShortName: string, options?: {
294
+ query?: Partial<UseQueryOptions<SettingDto[], TError, TData, QueryKey>> | undefined;
295
+ } | undefined) => UseQueryResult<TData, TError> & {
296
+ queryKey: QueryKey;
297
+ };
193
298
  export {};
@@ -6,7 +6,5 @@
6
6
  * OpenAPI spec version: v1.0.0
7
7
  */
8
8
  export type SettingDtoValue = {
9
- [key: string]: {
10
- [key: string]: any;
11
- };
9
+ [key: string]: any;
12
10
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/roma-framework",
3
- "version": "0.0.7-BETA.1",
3
+ "version": "0.0.7-BETA.3",
4
4
  "repository": "https://github.com/equinor/tops-roma",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,