@equinor/roma-framework 0.1.0 → 1.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.
Files changed (58) hide show
  1. package/dev-portal/package.json +1 -1
  2. package/dev-portal/roma-framework.umd.js +8869 -7902
  3. package/package.json +1 -1
  4. package/roma-framework.mjs +3 -7
  5. package/index.d.ts +0 -13
  6. package/lib/api/ms-graph/api/group/find-group-members.d.ts +0 -3
  7. package/lib/api/ms-graph/api/user/find-user-by-shortname.d.ts +0 -1
  8. package/lib/api/ms-graph/api/user/find-users-by-mail.d.ts +0 -3
  9. package/lib/api/ms-graph/index.d.ts +0 -11
  10. package/lib/api/ms-graph/model/group-membership.d.ts +0 -8
  11. package/lib/api/ms-graph/model/user.d.ts +0 -18
  12. package/lib/api/roma/api/app-controller/app-controller.d.ts +0 -122
  13. package/lib/api/roma/api/category-controller/category-controller.d.ts +0 -94
  14. package/lib/api/roma/api/environment-controller/environment-controller.d.ts +0 -27
  15. package/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +0 -31
  16. package/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +0 -162
  17. package/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +0 -21
  18. package/lib/api/roma/api/service-controller/service-controller.d.ts +0 -94
  19. package/lib/api/roma/api/setting-controller/setting-controller.d.ts +0 -261
  20. package/lib/api/roma/index.d.ts +0 -9
  21. package/lib/api/roma/model/appDto.d.ts +0 -20
  22. package/lib/api/roma/model/categoryDto.d.ts +0 -13
  23. package/lib/api/roma/model/environmentDto.d.ts +0 -11
  24. package/lib/api/roma/model/feedbackDetailsDto.d.ts +0 -13
  25. package/lib/api/roma/model/feedbackDto.d.ts +0 -7
  26. package/lib/api/roma/model/feedbackFeedbackDto.d.ts +0 -13
  27. package/lib/api/roma/model/feedbackResponseDto.d.ts +0 -5
  28. package/lib/api/roma/model/feedbackResponseIssueDto.d.ts +0 -11
  29. package/lib/api/roma/model/feedbackSolutionDto.d.ts +0 -10
  30. package/lib/api/roma/model/getAllApps200.d.ts +0 -10
  31. package/lib/api/roma/model/getAllCategories200.d.ts +0 -10
  32. package/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +0 -11
  33. package/lib/api/roma/model/getAllServices200.d.ts +0 -10
  34. package/lib/api/roma/model/getSettingsByAppShortName200.d.ts +0 -10
  35. package/lib/api/roma/model/getSettingsByUserId200.d.ts +0 -10
  36. package/lib/api/roma/model/index.d.ts +0 -31
  37. package/lib/api/roma/model/romaConfigurationDto.d.ts +0 -8
  38. package/lib/api/roma/model/romaConfigurationDtoValue.d.ts +0 -10
  39. package/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +0 -8
  40. package/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +0 -10
  41. package/lib/api/roma/model/serviceDto.d.ts +0 -16
  42. package/lib/api/roma/model/settingDto.d.ts +0 -10
  43. package/lib/api/roma/model/settingDtoValue.d.ts +0 -10
  44. package/lib/api/roma/model/uploadBundleBody.d.ts +0 -10
  45. package/lib/api/roma/model/versionDto.d.ts +0 -12
  46. package/lib/api/roma/use-client.d.ts +0 -34
  47. package/lib/app-provider.d.ts +0 -33
  48. package/lib/dev-portal/AppLoader.d.ts +0 -15
  49. package/lib/dev-portal/AppViewer.d.ts +0 -6
  50. package/lib/dev-portal/EquinorLoader.d.ts +0 -13
  51. package/lib/dev-portal/ErrorViewer.d.ts +0 -21
  52. package/lib/dev-portal/HttpErrorViewer.d.ts +0 -14
  53. package/lib/eds-event-provider.d.ts +0 -7
  54. package/lib/hooks/use-get-api-roles.d.ts +0 -14
  55. package/lib/hooks/use-has-api-role.d.ts +0 -7
  56. package/lib/make-component.d.ts +0 -13
  57. package/lib/query/persister.d.ts +0 -7
  58. package/lib/style-provider.d.ts +0 -8
@@ -1,10 +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
- export type SettingDtoValue = {
9
- [key: string]: any;
10
- };
@@ -1,10 +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
- export type UploadBundleBody = {
9
- bundleFile: Blob;
10
- };
@@ -1,12 +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
- export interface VersionDto {
9
- major: number;
10
- minor: number;
11
- patch: number;
12
- }
@@ -1,34 +0,0 @@
1
- type CustomClient<T> = (data: {
2
- url: string;
3
- method: 'get' | 'post' | 'put' | 'delete' | 'patch';
4
- params?: Record<string, any>;
5
- headers?: Record<string, any>;
6
- data?: any;
7
- signal?: AbortSignal;
8
- }) => Promise<T>;
9
- export declare const useCustomClient: <T>() => CustomClient<T>;
10
- export default useCustomClient;
11
- export type HttpErrorServerResponse = {
12
- timestamp: string;
13
- status: number;
14
- error: string;
15
- message: string;
16
- path: string;
17
- };
18
- export type HttpErrorResponse = {
19
- status: number;
20
- statusText: string;
21
- message: unknown;
22
- ok: boolean;
23
- headers: Headers;
24
- url: string;
25
- };
26
- export declare class HttpError extends Error {
27
- readonly message: string;
28
- readonly response: HttpErrorResponse;
29
- constructor(message: string, response: HttpErrorResponse);
30
- }
31
- export type ErrorType<T> = HttpError;
32
- export type BodyType<BodyData> = BodyData & {
33
- headers?: any;
34
- };
@@ -1,33 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { AppManifest } from '@equinor/fusion-framework-module-app';
3
- import { QueryClientError } from '@equinor/fusion-query/client';
4
-
5
- type AppLoadError = QueryClientError & {
6
- cause: {
7
- data: unknown;
8
- name: string;
9
- response: Response;
10
- };
11
- };
12
- export declare const AppContext: import('react').Context<{
13
- isLoading: boolean;
14
- apps?: AppManifest[] | undefined;
15
- error?: AppLoadError | undefined;
16
- }>;
17
- type ErrorPageProps = {
18
- errorCode: number;
19
- explanation: string;
20
- solution: string;
21
- };
22
- export declare function AppLoadError({ errorCode, explanation, solution, }: ErrorPageProps): import("react/jsx-runtime").JSX.Element;
23
- export declare const AppProvider: ({ children }: {
24
- children: ReactNode;
25
- }) => import("react/jsx-runtime").JSX.Element;
26
- export declare const useApps: ({ includeHidden, }?: {
27
- includeHidden?: boolean | undefined;
28
- }) => {
29
- isLoading: boolean;
30
- apps: AppManifest[];
31
- error: AppLoadError | undefined;
32
- };
33
- export {};
@@ -1,15 +0,0 @@
1
- import { AppManifest } from '@equinor/fusion-framework-module-app';
2
-
3
- /**
4
- * Component that will render a Fusion application
5
- *
6
- * @param app the AppManifest for the application to render
7
- * @param kind whether the app is a widget or an application
8
- * @param props any props to pass to the loaded application
9
- * @constructor
10
- */
11
- export declare function AppLoader({ app, kind, props, }: {
12
- app: AppManifest | null;
13
- kind?: 'app' | 'widget';
14
- props?: Record<string | number, any>;
15
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- /**
2
- * Simple component that wraps around AppLoader, setting the active application based on appKey from the router.
3
- *
4
- * @constructor
5
- */
6
- export declare const AppViewer: () => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- /**
4
- * Simple in-place loader for fusion apps
5
- *
6
- * @param children
7
- * @param text
8
- * @constructor
9
- */
10
- export declare const EquinorLoader: ({ children, text, }: React.PropsWithChildren<{
11
- readonly text: string;
12
- }>) => JSX.Element;
13
- export default EquinorLoader;
@@ -1,21 +0,0 @@
1
- import { ReactElement, CSSProperties } from 'react';
2
-
3
- /**
4
- * Simple error display component.
5
- * Does not create a pretty error, and should most likely be recreated for various error types (e.g. lack of access etc.)
6
- * Reasonable to assume this will be a part of e.g. @equinor/roma-components in the future.
7
- *
8
- * @param error
9
- * @constructor
10
- */
11
- export declare const ErrorViewer: ({ error }: {
12
- readonly error: Error;
13
- }) => import("react/jsx-runtime").JSX.Element;
14
- type ErrorProps = {
15
- title?: string;
16
- message: string;
17
- style?: CSSProperties;
18
- actions?: ReactElement;
19
- };
20
- export declare const RomaErrorViewer: ({ style, title, message, actions, }: ErrorProps) => import("react/jsx-runtime").JSX.Element;
21
- export default ErrorViewer;
@@ -1,14 +0,0 @@
1
- import { HttpError } from '../api/fetcher';
2
-
3
- /**
4
- * Simple error display component.
5
- * Does not create a pretty error, and should most likely be recreated for various error types (e.g. lack of access etc.)
6
- * Reasonable to assume this will be a part of e.g. @equinor/roma-components in the future.
7
- *
8
- * @param error
9
- * @constructor
10
- */
11
- export declare const HttpErrorViewer: ({ error }: {
12
- readonly error: HttpError;
13
- }) => import("react/jsx-runtime").JSX.Element;
14
- export default HttpErrorViewer;
@@ -1,7 +0,0 @@
1
- import { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
2
- import { ReactNode } from 'react';
3
-
4
- export declare const EdsEventProvider: ({ event, children }: {
5
- event: IEventModuleProvider;
6
- children: ReactNode;
7
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- /**
2
- * Parses a JWT token and returns an object with the roles contained in the token.
3
- * @param token The JWT token to parse.
4
- * @returns An object with the roles contained in the token.
5
- */
6
- export declare function parseJwt(token: string): {
7
- roles: Array<string>;
8
- };
9
- /**
10
- * Retrieves the roles associated with a specified API from fusion's service discovery module.
11
- * @param api The name of the API to retrieve roles for.
12
- * @returns An array of roles associated with the specified API.
13
- */
14
- export declare const useGetApiRoles: (api: string) => string[];
@@ -1,7 +0,0 @@
1
- /**
2
- * Checks if the current user has a specified role associated with a specified API using the `useGetApiRoles` hook.
3
- * @param api The name of the API to check for the specified role.
4
- * @param role The name of the role to check for.
5
- * @returns True if the current user has the specified role associated with the specified API, false otherwise.
6
- */
7
- export declare const useHasApiRole: (api: string, role: string) => boolean;
@@ -1,13 +0,0 @@
1
- import { AnyModule } from '@equinor/fusion-framework-module';
2
- import { Fusion } from '@equinor/fusion-framework-react';
3
- import { AppEnv, AppModuleInitiator } from '@equinor/fusion-framework-app';
4
- import { default as React, ReactNode } from 'react';
5
- import { ComponentRenderArgs as FusionComponentRenderArgs } from '@equinor/fusion-framework-react-app';
6
- import { QueryClient } from '@tanstack/react-query';
7
-
8
- export type RomaComponentRenderArgs<TRef extends Fusion = Fusion, TEnv = AppEnv> = FusionComponentRenderArgs<TRef, TEnv> & {
9
- query?: QueryClient;
10
- };
11
- export type RomaAppModuleInitiator<TModules extends Array<AnyModule> | unknown = unknown, TRef extends Fusion = Fusion, TEnv = AppEnv> = AppModuleInitiator<TModules, TRef, TEnv>;
12
- export declare const makeComponent: <TModules extends AnyModule[], TRef extends Fusion<unknown> = Fusion<unknown>, TEnv extends AppEnv = AppEnv>(Component: React.ReactNode, args: RomaComponentRenderArgs<TRef, TEnv>, configure?: RomaAppModuleInitiator<TModules, TRef, TEnv> | undefined) => React.LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
13
- export declare const withStyleIsolation: (children: ReactNode, args: RomaComponentRenderArgs) => React.LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -1,7 +0,0 @@
1
- import { Persister } from '@tanstack/react-query-persist-client';
2
-
3
- /**
4
- * Creates an Indexed DB persister
5
- * @see https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
6
- */
7
- export declare function createIDBPersister(idbValidKey?: IDBValidKey): Persister;
@@ -1,8 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- type Props = {
4
- scope: string;
5
- children: ReactNode;
6
- };
7
- export declare const StyleProvider: ({ scope, children }: Props) => import("react/jsx-runtime").JSX.Element;
8
- export {};