@equinor/roma-framework 0.0.12 → 1.0.0-BETA.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.
Files changed (39) hide show
  1. package/dev-portal/package.json +1 -1
  2. package/dev-portal/roma-framework.umd.js +8277 -7225
  3. package/package.json +1 -1
  4. package/roma-framework.mjs +135 -8
  5. package/index.d.ts +0 -12
  6. package/lib/api/roma/api/app-controller/app-controller.d.ts +0 -94
  7. package/lib/api/roma/api/category-controller/category-controller.d.ts +0 -94
  8. package/lib/api/roma/api/environment-controller/environment-controller.d.ts +0 -27
  9. package/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +0 -162
  10. package/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +0 -21
  11. package/lib/api/roma/api/service-controller/service-controller.d.ts +0 -94
  12. package/lib/api/roma/api/setting-controller/setting-controller.d.ts +0 -261
  13. package/lib/api/roma/index.d.ts +0 -8
  14. package/lib/api/roma/model/appDto.d.ts +0 -20
  15. package/lib/api/roma/model/categoryDto.d.ts +0 -13
  16. package/lib/api/roma/model/environmentDto.d.ts +0 -10
  17. package/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +0 -11
  18. package/lib/api/roma/model/index.d.ts +0 -19
  19. package/lib/api/roma/model/romaConfigurationDto.d.ts +0 -8
  20. package/lib/api/roma/model/romaConfigurationDtoValue.d.ts +0 -8
  21. package/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +0 -8
  22. package/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +0 -8
  23. package/lib/api/roma/model/serviceDto.d.ts +0 -16
  24. package/lib/api/roma/model/settingDto.d.ts +0 -10
  25. package/lib/api/roma/model/settingDtoValue.d.ts +0 -8
  26. package/lib/api/roma/model/versionDto.d.ts +0 -12
  27. package/lib/api/roma/use-client.d.ts +0 -34
  28. package/lib/app-provider.d.ts +0 -33
  29. package/lib/dev-portal/AppLoader.d.ts +0 -15
  30. package/lib/dev-portal/AppViewer.d.ts +0 -6
  31. package/lib/dev-portal/EquinorLoader.d.ts +0 -13
  32. package/lib/dev-portal/ErrorViewer.d.ts +0 -21
  33. package/lib/dev-portal/HttpErrorViewer.d.ts +0 -14
  34. package/lib/eds-event-provider.d.ts +0 -7
  35. package/lib/hooks/use-get-api-roles.d.ts +0 -14
  36. package/lib/hooks/use-has-api-role.d.ts +0 -7
  37. package/lib/make-component.d.ts +0 -13
  38. package/lib/query/persister.d.ts +0 -7
  39. package/lib/style-provider.d.ts +0 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/roma-framework",
3
- "version": "0.0.12",
3
+ "version": "1.0.0-BETA.0",
4
4
  "repository": "https://github.com/equinor/tops-roma",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -549,7 +549,6 @@ var EmptyError = createErrorClass(function(_super) {
549
549
  };
550
550
  });
551
551
  function lastValueFrom(source, config2) {
552
- var hasConfig = typeof config2 === "object";
553
552
  return new Promise(function(resolve, reject) {
554
553
  var _hasValue = false;
555
554
  var _value;
@@ -562,8 +561,6 @@ function lastValueFrom(source, config2) {
562
561
  complete: function() {
563
562
  if (_hasValue) {
564
563
  resolve(_value);
565
- } else if (hasConfig) {
566
- resolve(config2.defaultValue);
567
564
  } else {
568
565
  reject(new EmptyError());
569
566
  }
@@ -4806,8 +4803,8 @@ function shallowEqual(objA, objB) {
4806
4803
  }
4807
4804
  var IntlContext = typeof window !== "undefined" && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__ ? window.__REACT_INTL_CONTEXT__ || (window.__REACT_INTL_CONTEXT__ = React.createContext(null)) : React.createContext(null);
4808
4805
  IntlContext.Consumer;
4809
- var IntlProvider$2 = IntlContext.Provider;
4810
- var Provider = IntlProvider$2;
4806
+ var IntlProvider$1 = IntlContext.Provider;
4807
+ var Provider = IntlProvider$1;
4811
4808
  var Context = IntlContext;
4812
4809
  function useIntl() {
4813
4810
  var intl = React.useContext(Context);
@@ -4956,7 +4953,6 @@ var IntlProvider = (
4956
4953
  return IntlProvider2;
4957
4954
  }(React.PureComponent)
4958
4955
  );
4959
- const IntlProvider$1 = IntlProvider;
4960
4956
  createFormattedComponent("formatDate");
4961
4957
  createFormattedComponent("formatTime");
4962
4958
  createFormattedComponent("formatNumber");
@@ -4976,7 +4972,7 @@ const makeComponent = (Component, args, configure) => lazy(async () => {
4976
4972
  });
4977
4973
  const queryClient = args.query ?? new QueryClient();
4978
4974
  return {
4979
- default: () => /* @__PURE__ */ jsx(FrameworkProvider, { value: fusion, children: /* @__PURE__ */ jsx(IntlProvider$1, { locale: navigator.language, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(StyleProvider, { scope: `roma-${appKey}`, children: /* @__PURE__ */ jsx(EdsEventProvider, { event: modules.event, children: /* @__PURE__ */ jsx(ModuleProvider, { value: modules, children: Component }) }) }) }) }) })
4975
+ default: () => /* @__PURE__ */ jsx(FrameworkProvider, { value: fusion, children: /* @__PURE__ */ jsx(IntlProvider, { locale: navigator.language, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(StyleProvider, { scope: `roma-${appKey}`, children: /* @__PURE__ */ jsx(EdsEventProvider, { event: modules.event, children: /* @__PURE__ */ jsx(ModuleProvider, { value: modules, children: Component }) }) }) }) }) })
4980
4976
  };
4981
4977
  });
4982
4978
  const withStyleIsolation = (children, args) => lazy(async () => {
@@ -5628,6 +5624,32 @@ const useCreatePublicSettingByUserId = (options) => {
5628
5624
  const mutationOptions = useCreatePublicSettingByUserIdMutationOptions(options);
5629
5625
  return useMutation(mutationOptions);
5630
5626
  };
5627
+ const useUploadBundleHook = () => {
5628
+ const uploadBundle = useCustomClient();
5629
+ return (key, uploadBundleBody) => {
5630
+ const formData = new FormData();
5631
+ formData.append("bundleFile", uploadBundleBody.bundleFile);
5632
+ return uploadBundle({
5633
+ url: `/api/apps/key/${key}/bundle`,
5634
+ method: "put",
5635
+ headers: { "Content-Type": "multipart/form-data" },
5636
+ data: formData
5637
+ });
5638
+ };
5639
+ };
5640
+ const useUploadBundleMutationOptions = (options) => {
5641
+ const { mutation: mutationOptions } = options ?? {};
5642
+ const uploadBundle = useUploadBundleHook();
5643
+ const mutationFn = (props) => {
5644
+ const { key, data } = props ?? {};
5645
+ return uploadBundle(key, data);
5646
+ };
5647
+ return { mutationFn, ...mutationOptions };
5648
+ };
5649
+ const useUploadBundle = (options) => {
5650
+ const mutationOptions = useUploadBundleMutationOptions(options);
5651
+ return useMutation(mutationOptions);
5652
+ };
5631
5653
  const useGetAllAppsHook = () => {
5632
5654
  const getAllApps = useCustomClient();
5633
5655
  return (signal) => {
@@ -6164,6 +6186,102 @@ const useGetAllRomaConfigurationByType = (type, options) => {
6164
6186
  query.queryKey = queryOptions.queryKey;
6165
6187
  return query;
6166
6188
  };
6189
+ const useCreateFeedbackHook = () => {
6190
+ const createFeedback = useCustomClient();
6191
+ return (feedbackDto) => {
6192
+ return createFeedback({
6193
+ url: `/api/feedbacks`,
6194
+ method: "post",
6195
+ headers: { "Content-Type": "application/json" },
6196
+ data: feedbackDto
6197
+ });
6198
+ };
6199
+ };
6200
+ const useCreateFeedbackMutationOptions = (options) => {
6201
+ const { mutation: mutationOptions } = options ?? {};
6202
+ const createFeedback = useCreateFeedbackHook();
6203
+ const mutationFn = (props) => {
6204
+ const { data } = props ?? {};
6205
+ return createFeedback(data);
6206
+ };
6207
+ return { mutationFn, ...mutationOptions };
6208
+ };
6209
+ const useCreateFeedback = (options) => {
6210
+ const mutationOptions = useCreateFeedbackMutationOptions(options);
6211
+ return useMutation(mutationOptions);
6212
+ };
6213
+ const findGroupMembers = async (client, groupId, query) => {
6214
+ const headers = {
6215
+ ConsistencyLevel: "eventual"
6216
+ // Required to search by name
6217
+ };
6218
+ const params = new URLSearchParams();
6219
+ params.set("$count", "true");
6220
+ params.set("$orderby", "displayName");
6221
+ params.set("$select", "displayName,id");
6222
+ if (query) {
6223
+ params.set("$search", `"displayName:${query}"`);
6224
+ }
6225
+ const req = await client.fetch(
6226
+ `v1.0/groups/${groupId}/members/microsoft.graph.user?${params.toString()}`,
6227
+ { headers }
6228
+ );
6229
+ if (req.status === 504) {
6230
+ throw new Error(`Application took to long to respond`);
6231
+ }
6232
+ const res = await req.json();
6233
+ if (req.status >= 400) {
6234
+ throw new Error(res.error.message);
6235
+ } else {
6236
+ return res;
6237
+ }
6238
+ };
6239
+ const useFindGroupMembers = (groupId, query) => {
6240
+ const client = useHttpClient("graph");
6241
+ return useQuery({
6242
+ queryKey: ["graph", "group", "members", groupId],
6243
+ queryFn: () => findGroupMembers(client, groupId, query)
6244
+ });
6245
+ };
6246
+ const findUsersByMail = async (client, email, fields) => {
6247
+ const headers = {
6248
+ ConsistencyLevel: "eventual"
6249
+ // Required to search by name
6250
+ };
6251
+ const params = new URLSearchParams();
6252
+ params.set("$count", "true");
6253
+ params.set("$filter", `mail in ('${email.join("', '")}')`);
6254
+ params.set("$select", fields.join(","));
6255
+ const req = await client.fetch(`v1.0/users?${params.toString()}`, {
6256
+ headers
6257
+ });
6258
+ if (req.status === 504) {
6259
+ throw new Error(`Application took to long to respond`);
6260
+ }
6261
+ const res = await req.json();
6262
+ if (req.status >= 400) {
6263
+ throw new Error(res.error.message);
6264
+ } else {
6265
+ return res;
6266
+ }
6267
+ };
6268
+ const useFindUsersByMail = (email, fields = ["displayName", "mail", "givenName"]) => {
6269
+ if (typeof email === "string") {
6270
+ email = [email];
6271
+ }
6272
+ const client = useHttpClient("graph");
6273
+ return useQuery({
6274
+ queryKey: ["graph", "user", "mail", email],
6275
+ queryFn: () => findUsersByMail(client, email, fields)
6276
+ });
6277
+ };
6278
+ const useFindUsersByShortname = (shortnames, fields = ["displayName", "mail", "givenName"]) => {
6279
+ if (typeof shortnames === "string") {
6280
+ shortnames = [shortnames];
6281
+ }
6282
+ const emails = shortnames.map((name) => `${name}@equinor.com`);
6283
+ return useFindUsersByMail(emails, fields);
6284
+ };
6167
6285
  function promisifyRequest(request) {
6168
6286
  return new Promise((resolve, reject) => {
6169
6287
  request.oncomplete = request.onsuccess = () => resolve(request.result);
@@ -6265,7 +6383,7 @@ const useGetApiRoles = (api) => {
6265
6383
  }
6266
6384
  const token = parseJwt(jwt);
6267
6385
  if (roles.length === 0)
6268
- setRoles(token.roles);
6386
+ setRoles((token == null ? void 0 : token.roles) ?? []);
6269
6387
  });
6270
6388
  return roles;
6271
6389
  };
@@ -6308,6 +6426,9 @@ export {
6308
6426
  useAddRomaConfigurationHook,
6309
6427
  useAddRomaConfigurationMutationOptions,
6310
6428
  useApps,
6429
+ useCreateFeedback,
6430
+ useCreateFeedbackHook,
6431
+ useCreateFeedbackMutationOptions,
6311
6432
  useCreateOrUpdateApp,
6312
6433
  useCreateOrUpdateAppHook,
6313
6434
  useCreateOrUpdateAppMutationOptions,
@@ -6341,6 +6462,9 @@ export {
6341
6462
  useDeleteServiceByKey,
6342
6463
  useDeleteServiceByKeyHook,
6343
6464
  useDeleteServiceByKeyMutationOptions,
6465
+ useFindGroupMembers,
6466
+ useFindUsersByMail,
6467
+ useFindUsersByShortname,
6344
6468
  useGetAllApps,
6345
6469
  useGetAllAppsHook,
6346
6470
  useGetAllAppsQueryOptions,
@@ -6400,5 +6524,8 @@ export {
6400
6524
  useUpdateRomaConfiguration,
6401
6525
  useUpdateRomaConfigurationHook,
6402
6526
  useUpdateRomaConfigurationMutationOptions,
6527
+ useUploadBundle,
6528
+ useUploadBundleHook,
6529
+ useUploadBundleMutationOptions,
6403
6530
  withStyleIsolation
6404
6531
  };
package/index.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export * from './lib/make-component';
2
- export * from './lib/dev-portal/EquinorLoader';
3
- export * from './lib/dev-portal/ErrorViewer';
4
- export * from './lib/dev-portal/AppLoader';
5
- export * from './lib/dev-portal/AppViewer';
6
- export * from './lib/style-provider';
7
- export * from './lib/dev-portal/HttpErrorViewer';
8
- export * from './lib/api/roma';
9
- export * from './lib/app-provider';
10
- export * from './lib/query/persister';
11
- export * from './lib/hooks/use-get-api-roles';
12
- export * from './lib/hooks/use-has-api-role';
@@ -1,94 +0,0 @@
1
- import { QueryKey, UseMutationOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
- import { AppDto } from '../../model';
3
- import { BodyType, ErrorType } from '../../use-client';
4
-
5
- type AwaitedInput<T> = PromiseLike<T> | T;
6
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
7
- /**
8
- * @summary List apps
9
- */
10
- export declare const useGetAllAppsHook: () => (signal?: AbortSignal) => Promise<AppDto[]>;
11
- export declare const getGetAllAppsQueryKey: () => readonly ["/api/apps"];
12
- export declare const useGetAllAppsQueryOptions: <TData = AppDto[], TError = import('../../use-client').HttpError>(options?: {
13
- query?: Partial<UseQueryOptions<AppDto[], TError, TData, QueryKey>> | undefined;
14
- } | undefined) => UseQueryOptions<AppDto[], TError, TData, QueryKey> & {
15
- queryKey: QueryKey;
16
- };
17
- export type GetAllAppsQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAllAppsHook>>>>;
18
- export type GetAllAppsQueryError = ErrorType<void>;
19
- /**
20
- * @summary List apps
21
- */
22
- export declare const useGetAllApps: <TData = AppDto[], TError = import('../../use-client').HttpError>(options?: {
23
- query?: Partial<UseQueryOptions<AppDto[], TError, TData, QueryKey>> | undefined;
24
- } | undefined) => UseQueryResult<TData, TError> & {
25
- queryKey: QueryKey;
26
- };
27
- /**
28
- * @summary Create or update App
29
- */
30
- export declare const useCreateOrUpdateAppHook: () => (appDto: BodyType<AppDto>) => Promise<AppDto>;
31
- export declare const useCreateOrUpdateAppMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
32
- mutation?: UseMutationOptions<AppDto, TError, {
33
- data: BodyType<AppDto>;
34
- }, TContext> | undefined;
35
- } | undefined) => UseMutationOptions<AppDto, TError, {
36
- data: BodyType<AppDto>;
37
- }, TContext>;
38
- export type CreateOrUpdateAppMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateAppHook>>>>;
39
- export type CreateOrUpdateAppMutationBody = BodyType<AppDto>;
40
- export type CreateOrUpdateAppMutationError = ErrorType<void>;
41
- /**
42
- * @summary Create or update App
43
- */
44
- export declare const useCreateOrUpdateApp: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
45
- mutation?: UseMutationOptions<AppDto, TError, {
46
- data: BodyType<AppDto>;
47
- }, TContext> | undefined;
48
- } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<AppDto, TError, {
49
- data: BodyType<AppDto>;
50
- }, TContext>;
51
- /**
52
- * @summary Get app by key
53
- */
54
- export declare const useGetAppByKeyHook: () => (key: string, signal?: AbortSignal) => Promise<AppDto>;
55
- export declare const getGetAppByKeyQueryKey: (key: string) => readonly [`/api/apps/key/${string}`];
56
- export declare const useGetAppByKeyQueryOptions: <TData = AppDto, TError = import('../../use-client').HttpError>(key: string, options?: {
57
- query?: Partial<UseQueryOptions<AppDto, TError, TData, QueryKey>> | undefined;
58
- } | undefined) => UseQueryOptions<AppDto, TError, TData, QueryKey> & {
59
- queryKey: QueryKey;
60
- };
61
- export type GetAppByKeyQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAppByKeyHook>>>>;
62
- export type GetAppByKeyQueryError = ErrorType<void>;
63
- /**
64
- * @summary Get app by key
65
- */
66
- export declare const useGetAppByKey: <TData = AppDto, TError = import('../../use-client').HttpError>(key: string, options?: {
67
- query?: Partial<UseQueryOptions<AppDto, TError, TData, QueryKey>> | undefined;
68
- } | undefined) => UseQueryResult<TData, TError> & {
69
- queryKey: QueryKey;
70
- };
71
- /**
72
- * @summary Delete app by key
73
- */
74
- export declare const useDeleteAppByKeyHook: () => (key: string) => Promise<void>;
75
- export declare const useDeleteAppByKeyMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
76
- mutation?: UseMutationOptions<void, TError, {
77
- key: string;
78
- }, TContext> | undefined;
79
- } | undefined) => UseMutationOptions<void, TError, {
80
- key: string;
81
- }, TContext>;
82
- export type DeleteAppByKeyMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteAppByKeyHook>>>>;
83
- export type DeleteAppByKeyMutationError = ErrorType<unknown>;
84
- /**
85
- * @summary Delete app by key
86
- */
87
- export declare const useDeleteAppByKey: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
88
- mutation?: UseMutationOptions<void, TError, {
89
- key: string;
90
- }, TContext> | undefined;
91
- } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<void, TError, {
92
- key: string;
93
- }, TContext>;
94
- export {};
@@ -1,94 +0,0 @@
1
- import { QueryKey, UseMutationOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
- import { CategoryDto } from '../../model';
3
- import { BodyType, ErrorType } from '../../use-client';
4
-
5
- type AwaitedInput<T> = PromiseLike<T> | T;
6
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
7
- /**
8
- * @summary List categories
9
- */
10
- export declare const useGetAllCategoriesHook: () => (signal?: AbortSignal) => Promise<CategoryDto[]>;
11
- export declare const getGetAllCategoriesQueryKey: () => readonly ["/api/apps/categories"];
12
- export declare const useGetAllCategoriesQueryOptions: <TData = CategoryDto[], TError = import('../../use-client').HttpError>(options?: {
13
- query?: Partial<UseQueryOptions<CategoryDto[], TError, TData, QueryKey>> | undefined;
14
- } | undefined) => UseQueryOptions<CategoryDto[], TError, TData, QueryKey> & {
15
- queryKey: QueryKey;
16
- };
17
- export type GetAllCategoriesQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAllCategoriesHook>>>>;
18
- export type GetAllCategoriesQueryError = ErrorType<void>;
19
- /**
20
- * @summary List categories
21
- */
22
- export declare const useGetAllCategories: <TData = CategoryDto[], TError = import('../../use-client').HttpError>(options?: {
23
- query?: Partial<UseQueryOptions<CategoryDto[], TError, TData, QueryKey>> | undefined;
24
- } | undefined) => UseQueryResult<TData, TError> & {
25
- queryKey: QueryKey;
26
- };
27
- /**
28
- * @summary Create or update category
29
- */
30
- export declare const useCreateOrUpdateCategoryHook: () => (categoryDto: BodyType<CategoryDto>) => Promise<CategoryDto>;
31
- export declare const useCreateOrUpdateCategoryMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
32
- mutation?: UseMutationOptions<CategoryDto, TError, {
33
- data: BodyType<CategoryDto>;
34
- }, TContext> | undefined;
35
- } | undefined) => UseMutationOptions<CategoryDto, TError, {
36
- data: BodyType<CategoryDto>;
37
- }, TContext>;
38
- export type CreateOrUpdateCategoryMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useCreateOrUpdateCategoryHook>>>>;
39
- export type CreateOrUpdateCategoryMutationBody = BodyType<CategoryDto>;
40
- export type CreateOrUpdateCategoryMutationError = ErrorType<void>;
41
- /**
42
- * @summary Create or update category
43
- */
44
- export declare const useCreateOrUpdateCategory: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
45
- mutation?: UseMutationOptions<CategoryDto, TError, {
46
- data: BodyType<CategoryDto>;
47
- }, TContext> | undefined;
48
- } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<CategoryDto, TError, {
49
- data: BodyType<CategoryDto>;
50
- }, TContext>;
51
- /**
52
- * @summary Get category by id
53
- */
54
- export declare const useGetCategoryByIdHook: () => (id: string, signal?: AbortSignal) => Promise<CategoryDto>;
55
- export declare const getGetCategoryByIdQueryKey: (id: string) => readonly [`/api/apps/categories/id/${string}`];
56
- export declare const useGetCategoryByIdQueryOptions: <TData = CategoryDto, TError = import('../../use-client').HttpError>(id: string, options?: {
57
- query?: Partial<UseQueryOptions<CategoryDto, TError, TData, QueryKey>> | undefined;
58
- } | undefined) => UseQueryOptions<CategoryDto, TError, TData, QueryKey> & {
59
- queryKey: QueryKey;
60
- };
61
- export type GetCategoryByIdQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetCategoryByIdHook>>>>;
62
- export type GetCategoryByIdQueryError = ErrorType<void>;
63
- /**
64
- * @summary Get category by id
65
- */
66
- export declare const useGetCategoryById: <TData = CategoryDto, TError = import('../../use-client').HttpError>(id: string, options?: {
67
- query?: Partial<UseQueryOptions<CategoryDto, TError, TData, QueryKey>> | undefined;
68
- } | undefined) => UseQueryResult<TData, TError> & {
69
- queryKey: QueryKey;
70
- };
71
- /**
72
- * @summary Delete category by id
73
- */
74
- export declare const useDeleteCategoryByIdHook: () => (id: string) => Promise<void>;
75
- export declare const useDeleteCategoryByIdMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
76
- mutation?: UseMutationOptions<void, TError, {
77
- id: string;
78
- }, TContext> | undefined;
79
- } | undefined) => UseMutationOptions<void, TError, {
80
- id: string;
81
- }, TContext>;
82
- export type DeleteCategoryByIdMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteCategoryByIdHook>>>>;
83
- export type DeleteCategoryByIdMutationError = ErrorType<unknown>;
84
- /**
85
- * @summary Delete category by id
86
- */
87
- export declare const useDeleteCategoryById: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
88
- mutation?: UseMutationOptions<void, TError, {
89
- id: string;
90
- }, TContext> | undefined;
91
- } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<void, TError, {
92
- id: string;
93
- }, TContext>;
94
- export {};
@@ -1,27 +0,0 @@
1
- import { QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
- import { EnvironmentDto } from '../../model';
3
- import { ErrorType } from '../../use-client';
4
-
5
- type AwaitedInput<T> = PromiseLike<T> | T;
6
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
7
- /**
8
- * @summary Get current environment
9
- */
10
- export declare const useGetCurrentEnvironmentHook: () => (signal?: AbortSignal) => Promise<EnvironmentDto>;
11
- export declare const getGetCurrentEnvironmentQueryKey: () => readonly ["/_discovery/environments/current"];
12
- export declare const useGetCurrentEnvironmentQueryOptions: <TData = EnvironmentDto, TError = import('../../use-client').HttpError>(options?: {
13
- query?: Partial<UseQueryOptions<EnvironmentDto, TError, TData, QueryKey>> | undefined;
14
- } | undefined) => UseQueryOptions<EnvironmentDto, TError, TData, QueryKey> & {
15
- queryKey: QueryKey;
16
- };
17
- export type GetCurrentEnvironmentQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetCurrentEnvironmentHook>>>>;
18
- export type GetCurrentEnvironmentQueryError = ErrorType<void>;
19
- /**
20
- * @summary Get current environment
21
- */
22
- export declare const useGetCurrentEnvironment: <TData = EnvironmentDto, TError = import('../../use-client').HttpError>(options?: {
23
- query?: Partial<UseQueryOptions<EnvironmentDto, TError, TData, QueryKey>> | undefined;
24
- } | undefined) => UseQueryResult<TData, TError> & {
25
- queryKey: QueryKey;
26
- };
27
- export {};
@@ -1,162 +0,0 @@
1
- import { QueryKey, UseMutationOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
- import { RomaConfigurationDto, SettingDto } from '../../model';
3
- import { BodyType, ErrorType } from '../../use-client';
4
-
5
- type AwaitedInput<T> = PromiseLike<T> | T;
6
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
7
- /**
8
- * @summary Get roma configuration by id
9
- */
10
- export declare const useGetRomaConfigurationByIdHook: () => (id: string, signal?: AbortSignal) => Promise<RomaConfigurationDto>;
11
- export declare const getGetRomaConfigurationByIdQueryKey: (id: string) => readonly [`/api/configurations/id/${string}`];
12
- export declare const useGetRomaConfigurationByIdQueryOptions: <TData = RomaConfigurationDto, TError = import('../../use-client').HttpError>(id: string, options?: {
13
- query?: Partial<UseQueryOptions<RomaConfigurationDto, TError, TData, QueryKey>> | undefined;
14
- } | undefined) => UseQueryOptions<RomaConfigurationDto, TError, TData, QueryKey> & {
15
- queryKey: QueryKey;
16
- };
17
- export type GetRomaConfigurationByIdQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetRomaConfigurationByIdHook>>>>;
18
- export type GetRomaConfigurationByIdQueryError = ErrorType<void>;
19
- /**
20
- * @summary Get roma configuration by id
21
- */
22
- export declare const useGetRomaConfigurationById: <TData = RomaConfigurationDto, TError = import('../../use-client').HttpError>(id: string, options?: {
23
- query?: Partial<UseQueryOptions<RomaConfigurationDto, TError, TData, QueryKey>> | undefined;
24
- } | undefined) => UseQueryResult<TData, TError> & {
25
- queryKey: QueryKey;
26
- };
27
- /**
28
- * @summary Update a roma configuration
29
- */
30
- export declare const useUpdateRomaConfigurationHook: () => (id: string, romaConfigurationDto: BodyType<RomaConfigurationDto>) => Promise<RomaConfigurationDto>;
31
- export declare const useUpdateRomaConfigurationMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
32
- mutation?: UseMutationOptions<RomaConfigurationDto, TError, {
33
- id: string;
34
- data: BodyType<RomaConfigurationDto>;
35
- }, TContext> | undefined;
36
- } | undefined) => UseMutationOptions<RomaConfigurationDto, TError, {
37
- id: string;
38
- data: BodyType<RomaConfigurationDto>;
39
- }, TContext>;
40
- export type UpdateRomaConfigurationMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useUpdateRomaConfigurationHook>>>>;
41
- export type UpdateRomaConfigurationMutationBody = BodyType<RomaConfigurationDto>;
42
- export type UpdateRomaConfigurationMutationError = ErrorType<void>;
43
- /**
44
- * @summary Update a roma configuration
45
- */
46
- export declare const useUpdateRomaConfiguration: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
47
- mutation?: UseMutationOptions<RomaConfigurationDto, TError, {
48
- id: string;
49
- data: BodyType<RomaConfigurationDto>;
50
- }, TContext> | undefined;
51
- } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<RomaConfigurationDto, TError, {
52
- id: string;
53
- data: BodyType<RomaConfigurationDto>;
54
- }, TContext>;
55
- /**
56
- * @summary Delete a roma configuration by id
57
- */
58
- export declare const useDeleteRomaConfigurationHook: () => (id: string) => Promise<SettingDto>;
59
- export declare const useDeleteRomaConfigurationMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
60
- mutation?: UseMutationOptions<SettingDto, TError, {
61
- id: string;
62
- }, TContext> | undefined;
63
- } | undefined) => UseMutationOptions<SettingDto, TError, {
64
- id: string;
65
- }, TContext>;
66
- export type DeleteRomaConfigurationMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useDeleteRomaConfigurationHook>>>>;
67
- export type DeleteRomaConfigurationMutationError = ErrorType<void>;
68
- /**
69
- * @summary Delete a roma configuration by id
70
- */
71
- export declare const useDeleteRomaConfiguration: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
72
- mutation?: UseMutationOptions<SettingDto, TError, {
73
- id: string;
74
- }, TContext> | undefined;
75
- } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<SettingDto, TError, {
76
- id: string;
77
- }, TContext>;
78
- /**
79
- * @summary Get all roma configurations
80
- */
81
- export declare const useGetAllRomaConfigurationHook: () => (signal?: AbortSignal) => Promise<RomaConfigurationDto[]>;
82
- export declare const getGetAllRomaConfigurationQueryKey: () => readonly ["/api/configurations"];
83
- export declare const useGetAllRomaConfigurationQueryOptions: <TData = RomaConfigurationDto[], TError = import('../../use-client').HttpError>(options?: {
84
- query?: Partial<UseQueryOptions<RomaConfigurationDto[], TError, TData, QueryKey>> | undefined;
85
- } | undefined) => UseQueryOptions<RomaConfigurationDto[], TError, TData, QueryKey> & {
86
- queryKey: QueryKey;
87
- };
88
- export type GetAllRomaConfigurationQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAllRomaConfigurationHook>>>>;
89
- export type GetAllRomaConfigurationQueryError = ErrorType<void>;
90
- /**
91
- * @summary Get all roma configurations
92
- */
93
- export declare const useGetAllRomaConfiguration: <TData = RomaConfigurationDto[], TError = import('../../use-client').HttpError>(options?: {
94
- query?: Partial<UseQueryOptions<RomaConfigurationDto[], TError, TData, QueryKey>> | undefined;
95
- } | undefined) => UseQueryResult<TData, TError> & {
96
- queryKey: QueryKey;
97
- };
98
- /**
99
- * @summary Create a new roma configuration
100
- */
101
- export declare const useAddRomaConfigurationHook: () => (romaConfigurationDto: BodyType<RomaConfigurationDto>) => Promise<RomaConfigurationDto>;
102
- export declare const useAddRomaConfigurationMutationOptions: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
103
- mutation?: UseMutationOptions<RomaConfigurationDto, TError, {
104
- data: BodyType<RomaConfigurationDto>;
105
- }, TContext> | undefined;
106
- } | undefined) => UseMutationOptions<RomaConfigurationDto, TError, {
107
- data: BodyType<RomaConfigurationDto>;
108
- }, TContext>;
109
- export type AddRomaConfigurationMutationResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useAddRomaConfigurationHook>>>>;
110
- export type AddRomaConfigurationMutationBody = BodyType<RomaConfigurationDto>;
111
- export type AddRomaConfigurationMutationError = ErrorType<void>;
112
- /**
113
- * @summary Create a new roma configuration
114
- */
115
- export declare const useAddRomaConfiguration: <TError = import('../../use-client').HttpError, TContext = unknown>(options?: {
116
- mutation?: UseMutationOptions<RomaConfigurationDto, TError, {
117
- data: BodyType<RomaConfigurationDto>;
118
- }, TContext> | undefined;
119
- } | undefined) => import('@tanstack/react-query/build/legacy/types').UseMutationResult<RomaConfigurationDto, TError, {
120
- data: BodyType<RomaConfigurationDto>;
121
- }, TContext>;
122
- /**
123
- * @summary Get valid roma configuration types
124
- */
125
- export declare const useGetAllRomaConfigurationTypesHook: () => (signal?: AbortSignal) => Promise<"servicebus"[]>;
126
- export declare const getGetAllRomaConfigurationTypesQueryKey: () => readonly ["/api/configurations/types"];
127
- export declare const useGetAllRomaConfigurationTypesQueryOptions: <TData = "servicebus"[], TError = import('../../use-client').HttpError>(options?: {
128
- query?: Partial<UseQueryOptions<"servicebus"[], TError, TData, QueryKey>> | undefined;
129
- } | undefined) => UseQueryOptions<"servicebus"[], TError, TData, QueryKey> & {
130
- queryKey: QueryKey;
131
- };
132
- export type GetAllRomaConfigurationTypesQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAllRomaConfigurationTypesHook>>>>;
133
- export type GetAllRomaConfigurationTypesQueryError = ErrorType<void>;
134
- /**
135
- * @summary Get valid roma configuration types
136
- */
137
- export declare const useGetAllRomaConfigurationTypes: <TData = "servicebus"[], TError = import('../../use-client').HttpError>(options?: {
138
- query?: Partial<UseQueryOptions<"servicebus"[], TError, TData, QueryKey>> | undefined;
139
- } | undefined) => UseQueryResult<TData, TError> & {
140
- queryKey: QueryKey;
141
- };
142
- /**
143
- * @summary Get all roma configurations for given type
144
- */
145
- export declare const useGetAllRomaConfigurationByTypeHook: () => (type: string, signal?: AbortSignal) => Promise<RomaConfigurationDto[]>;
146
- export declare const getGetAllRomaConfigurationByTypeQueryKey: (type: string) => readonly [`/api/configurations/types/type/${string}`];
147
- export declare const useGetAllRomaConfigurationByTypeQueryOptions: <TData = RomaConfigurationDto[], TError = import('../../use-client').HttpError>(type: string, options?: {
148
- query?: Partial<UseQueryOptions<RomaConfigurationDto[], TError, TData, QueryKey>> | undefined;
149
- } | undefined) => UseQueryOptions<RomaConfigurationDto[], TError, TData, QueryKey> & {
150
- queryKey: QueryKey;
151
- };
152
- export type GetAllRomaConfigurationByTypeQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useGetAllRomaConfigurationByTypeHook>>>>;
153
- export type GetAllRomaConfigurationByTypeQueryError = ErrorType<void>;
154
- /**
155
- * @summary Get all roma configurations for given type
156
- */
157
- export declare const useGetAllRomaConfigurationByType: <TData = RomaConfigurationDto[], TError = import('../../use-client').HttpError>(type: string, options?: {
158
- query?: Partial<UseQueryOptions<RomaConfigurationDto[], TError, TData, QueryKey>> | undefined;
159
- } | undefined) => UseQueryResult<TData, TError> & {
160
- queryKey: QueryKey;
161
- };
162
- export {};
@@ -1,21 +0,0 @@
1
- import { QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
- import { ServerSentEventStandardEventDto } from '../../model';
3
- import { ErrorType } from '../../use-client';
4
-
5
- type AwaitedInput<T> = PromiseLike<T> | T;
6
- type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
7
- export declare const useStreamEventsHook: () => (signal?: AbortSignal) => Promise<ServerSentEventStandardEventDto[]>;
8
- export declare const getStreamEventsQueryKey: () => readonly ["/eventstream/activitylog"];
9
- export declare const useStreamEventsQueryOptions: <TData = ServerSentEventStandardEventDto[], TError = import('../../use-client').HttpError>(options?: {
10
- query?: Partial<UseQueryOptions<ServerSentEventStandardEventDto[], TError, TData, QueryKey>> | undefined;
11
- } | undefined) => UseQueryOptions<ServerSentEventStandardEventDto[], TError, TData, QueryKey> & {
12
- queryKey: QueryKey;
13
- };
14
- export type StreamEventsQueryResult = NonNullable<Awaited<ReturnType<ReturnType<typeof useStreamEventsHook>>>>;
15
- export type StreamEventsQueryError = ErrorType<unknown>;
16
- export declare const useStreamEvents: <TData = ServerSentEventStandardEventDto[], TError = import('../../use-client').HttpError>(options?: {
17
- query?: Partial<UseQueryOptions<ServerSentEventStandardEventDto[], TError, TData, QueryKey>> | undefined;
18
- } | undefined) => UseQueryResult<TData, TError> & {
19
- queryKey: QueryKey;
20
- };
21
- export {};