@equinor/roma-framework 1.0.0 → 1.1.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 (160) hide show
  1. package/cypress.mjs +1132 -0
  2. package/dev-portal/index.d.ts +15 -0
  3. package/dev-portal/lib/api/fetcher.d.ts +21 -0
  4. package/dev-portal/lib/api/ms-graph/api/group/find-group-members.d.ts +2 -0
  5. package/dev-portal/lib/api/ms-graph/api/user/find-user-by-shortname.d.ts +1 -0
  6. package/dev-portal/lib/api/ms-graph/api/user/find-users-by-mail.d.ts +2 -0
  7. package/dev-portal/lib/api/ms-graph/index.d.ts +10 -0
  8. package/dev-portal/lib/api/ms-graph/model/azure-response.d.ts +7 -0
  9. package/dev-portal/lib/api/ms-graph/model/error.d.ts +11 -0
  10. package/dev-portal/lib/api/roma/api/app-controller/app-controller.d.ts +121 -0
  11. package/dev-portal/lib/api/roma/api/category-controller/category-controller.d.ts +93 -0
  12. package/dev-portal/lib/api/roma/api/environment-controller/environment-controller.d.ts +26 -0
  13. package/dev-portal/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +50 -0
  14. package/dev-portal/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +161 -0
  15. package/dev-portal/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +20 -0
  16. package/dev-portal/lib/api/roma/api/service-controller/service-controller.d.ts +93 -0
  17. package/dev-portal/lib/api/roma/api/setting-controller/setting-controller.d.ts +260 -0
  18. package/dev-portal/lib/api/roma/index.d.ts +9 -0
  19. package/dev-portal/lib/api/roma/model/appDto.d.ts +19 -0
  20. package/dev-portal/lib/api/roma/model/categoryDto.d.ts +13 -0
  21. package/dev-portal/lib/api/roma/model/environmentDto.d.ts +10 -0
  22. package/dev-portal/lib/api/roma/model/feedbackDetailsDto.d.ts +13 -0
  23. package/dev-portal/lib/api/roma/model/feedbackDto.d.ts +6 -0
  24. package/dev-portal/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +13 -0
  25. package/dev-portal/lib/api/roma/model/feedbackExpandedResponseDto.d.ts +4 -0
  26. package/dev-portal/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +6 -0
  27. package/dev-portal/lib/api/roma/model/feedbackFeedbackDto.d.ts +13 -0
  28. package/dev-portal/lib/api/roma/model/feedbackPage.d.ts +19 -0
  29. package/dev-portal/lib/api/roma/model/feedbackResponseDto.d.ts +4 -0
  30. package/dev-portal/lib/api/roma/model/feedbackResponseIssueDto.d.ts +11 -0
  31. package/dev-portal/lib/api/roma/model/feedbackSolutionDto.d.ts +10 -0
  32. package/dev-portal/lib/api/roma/model/getAllApps200.d.ts +10 -0
  33. package/dev-portal/lib/api/roma/model/getAllCategories200.d.ts +10 -0
  34. package/dev-portal/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +11 -0
  35. package/dev-portal/lib/api/roma/model/getAllServices200.d.ts +10 -0
  36. package/dev-portal/lib/api/roma/model/getSettingsByAppShortName200.d.ts +10 -0
  37. package/dev-portal/lib/api/roma/model/getSettingsByUserId200.d.ts +10 -0
  38. package/dev-portal/lib/api/roma/model/index.d.ts +38 -0
  39. package/dev-portal/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +17 -0
  40. package/dev-portal/lib/api/roma/model/pageableObject.d.ts +9 -0
  41. package/dev-portal/lib/api/roma/model/romaConfigurationDto.d.ts +7 -0
  42. package/dev-portal/lib/api/roma/model/romaConfigurationDtoValue.d.ts +10 -0
  43. package/dev-portal/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +8 -0
  44. package/dev-portal/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +10 -0
  45. package/dev-portal/lib/api/roma/model/serviceDto.d.ts +16 -0
  46. package/dev-portal/lib/api/roma/model/settingDto.d.ts +9 -0
  47. package/dev-portal/lib/api/roma/model/settingDtoValue.d.ts +10 -0
  48. package/dev-portal/lib/api/roma/model/sortObject.d.ts +12 -0
  49. package/dev-portal/lib/api/roma/model/uploadBundleBody.d.ts +10 -0
  50. package/dev-portal/lib/api/roma/model/versionDto.d.ts +12 -0
  51. package/dev-portal/lib/api/roma/use-client.d.ts +34 -0
  52. package/dev-portal/lib/api/util.d.ts +1 -0
  53. package/dev-portal/lib/app-provider.d.ts +32 -0
  54. package/dev-portal/lib/dev-portal/AppLoader.d.ts +14 -0
  55. package/dev-portal/lib/dev-portal/AppViewer.d.ts +6 -0
  56. package/dev-portal/lib/dev-portal/EquinorLoader.d.ts +12 -0
  57. package/dev-portal/lib/dev-portal/ErrorViewer.d.ts +20 -0
  58. package/dev-portal/lib/dev-portal/Header.d.ts +2 -0
  59. package/dev-portal/lib/dev-portal/HeaderMenu.d.ts +4 -0
  60. package/dev-portal/lib/dev-portal/HttpErrorViewer.d.ts +13 -0
  61. package/dev-portal/lib/dev-portal/Navigation.d.ts +5 -0
  62. package/dev-portal/lib/dev-portal/PortalStyles.d.ts +1111 -0
  63. package/dev-portal/lib/dev-portal/PortalTypes.d.ts +13 -0
  64. package/dev-portal/lib/dev-portal/Root.d.ts +5 -0
  65. package/dev-portal/lib/dev-portal/SideSheets.d.ts +6 -0
  66. package/dev-portal/lib/dev-portal/config.d.ts +3 -0
  67. package/dev-portal/lib/dev-portal/index.d.ts +13 -0
  68. package/dev-portal/lib/dev-portal/logo.d.ts +2 -0
  69. package/dev-portal/lib/eds-event-provider.d.ts +6 -0
  70. package/dev-portal/lib/error-handlers/fallback-http-errors.d.ts +1 -0
  71. package/dev-portal/lib/error-handlers/http-error-handler.d.ts +11 -0
  72. package/dev-portal/lib/hooks/use-get-api-roles.d.ts +11 -0
  73. package/dev-portal/lib/hooks/use-has-api-role.d.ts +7 -0
  74. package/dev-portal/lib/make-component.d.ts +12 -0
  75. package/dev-portal/lib/query/persister.d.ts +6 -0
  76. package/dev-portal/lib/style-provider.d.ts +7 -0
  77. package/dev-portal/lib/test-utils/modules.d.ts +109 -0
  78. package/dev-portal/lib/test-utils/roma-cypress-wrapper.d.ts +3 -0
  79. package/dev-portal/package.json +5 -1
  80. package/dev-portal/roma-framework.umd.js +2787 -3311
  81. package/index.d.ts +15 -0
  82. package/lib/api/fetcher.d.ts +21 -0
  83. package/lib/api/ms-graph/api/group/find-group-members.d.ts +2 -0
  84. package/lib/api/ms-graph/api/user/find-user-by-shortname.d.ts +1 -0
  85. package/lib/api/ms-graph/api/user/find-users-by-mail.d.ts +2 -0
  86. package/lib/api/ms-graph/index.d.ts +10 -0
  87. package/lib/api/ms-graph/model/azure-response.d.ts +7 -0
  88. package/lib/api/ms-graph/model/error.d.ts +11 -0
  89. package/lib/api/roma/api/app-controller/app-controller.d.ts +121 -0
  90. package/lib/api/roma/api/category-controller/category-controller.d.ts +93 -0
  91. package/lib/api/roma/api/environment-controller/environment-controller.d.ts +26 -0
  92. package/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +50 -0
  93. package/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +161 -0
  94. package/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +20 -0
  95. package/lib/api/roma/api/service-controller/service-controller.d.ts +93 -0
  96. package/lib/api/roma/api/setting-controller/setting-controller.d.ts +260 -0
  97. package/lib/api/roma/index.d.ts +9 -0
  98. package/lib/api/roma/model/appDto.d.ts +19 -0
  99. package/lib/api/roma/model/categoryDto.d.ts +13 -0
  100. package/lib/api/roma/model/environmentDto.d.ts +10 -0
  101. package/lib/api/roma/model/feedbackDetailsDto.d.ts +13 -0
  102. package/lib/api/roma/model/feedbackDto.d.ts +6 -0
  103. package/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +13 -0
  104. package/lib/api/roma/model/feedbackExpandedResponseDto.d.ts +4 -0
  105. package/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +6 -0
  106. package/lib/api/roma/model/feedbackFeedbackDto.d.ts +13 -0
  107. package/lib/api/roma/model/feedbackPage.d.ts +19 -0
  108. package/lib/api/roma/model/feedbackResponseDto.d.ts +4 -0
  109. package/lib/api/roma/model/feedbackResponseIssueDto.d.ts +11 -0
  110. package/lib/api/roma/model/feedbackSolutionDto.d.ts +10 -0
  111. package/lib/api/roma/model/getAllApps200.d.ts +10 -0
  112. package/lib/api/roma/model/getAllCategories200.d.ts +10 -0
  113. package/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +11 -0
  114. package/lib/api/roma/model/getAllServices200.d.ts +10 -0
  115. package/lib/api/roma/model/getSettingsByAppShortName200.d.ts +10 -0
  116. package/lib/api/roma/model/getSettingsByUserId200.d.ts +10 -0
  117. package/lib/api/roma/model/index.d.ts +38 -0
  118. package/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +17 -0
  119. package/lib/api/roma/model/pageableObject.d.ts +9 -0
  120. package/lib/api/roma/model/romaConfigurationDto.d.ts +7 -0
  121. package/lib/api/roma/model/romaConfigurationDtoValue.d.ts +10 -0
  122. package/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +8 -0
  123. package/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +10 -0
  124. package/lib/api/roma/model/serviceDto.d.ts +16 -0
  125. package/lib/api/roma/model/settingDto.d.ts +9 -0
  126. package/lib/api/roma/model/settingDtoValue.d.ts +10 -0
  127. package/lib/api/roma/model/sortObject.d.ts +12 -0
  128. package/lib/api/roma/model/uploadBundleBody.d.ts +10 -0
  129. package/lib/api/roma/model/versionDto.d.ts +12 -0
  130. package/lib/api/roma/use-client.d.ts +34 -0
  131. package/lib/api/util.d.ts +1 -0
  132. package/lib/app-provider.d.ts +32 -0
  133. package/lib/dev-portal/AppLoader.d.ts +14 -0
  134. package/lib/dev-portal/AppViewer.d.ts +6 -0
  135. package/lib/dev-portal/EquinorLoader.d.ts +12 -0
  136. package/lib/dev-portal/ErrorViewer.d.ts +20 -0
  137. package/lib/dev-portal/Header.d.ts +2 -0
  138. package/lib/dev-portal/HeaderMenu.d.ts +4 -0
  139. package/lib/dev-portal/HttpErrorViewer.d.ts +13 -0
  140. package/lib/dev-portal/Navigation.d.ts +5 -0
  141. package/lib/dev-portal/PortalStyles.d.ts +1111 -0
  142. package/lib/dev-portal/PortalTypes.d.ts +13 -0
  143. package/lib/dev-portal/Root.d.ts +5 -0
  144. package/lib/dev-portal/SideSheets.d.ts +6 -0
  145. package/lib/dev-portal/config.d.ts +3 -0
  146. package/lib/dev-portal/index.d.ts +13 -0
  147. package/lib/dev-portal/logo.d.ts +2 -0
  148. package/lib/eds-event-provider.d.ts +6 -0
  149. package/lib/error-handlers/fallback-http-errors.d.ts +1 -0
  150. package/lib/error-handlers/http-error-handler.d.ts +11 -0
  151. package/lib/hooks/use-get-api-roles.d.ts +11 -0
  152. package/lib/hooks/use-has-api-role.d.ts +7 -0
  153. package/lib/make-component.d.ts +12 -0
  154. package/lib/query/persister.d.ts +6 -0
  155. package/lib/style-provider.d.ts +7 -0
  156. package/lib/test-utils/modules.d.ts +109 -0
  157. package/lib/test-utils/roma-cypress-wrapper.d.ts +3 -0
  158. package/package.json +6 -2
  159. package/roma-framework.mjs +1225 -4925
  160. package/router-CrMzSazo.mjs +5741 -0
@@ -0,0 +1,13 @@
1
+ export type SideSheetType = {
2
+ sideSheetKey: string;
3
+ sideSheetOpenName: boolean;
4
+ sideSheetOpenFunction: React.Dispatch<React.SetStateAction<boolean>>;
5
+ };
6
+ export type HeaderMenus = {
7
+ a11yOpen: boolean;
8
+ setA11yOpen: React.Dispatch<React.SetStateAction<boolean>>;
9
+ userMenuOpen: boolean;
10
+ setUserMenuOpen: React.Dispatch<React.SetStateAction<boolean>>;
11
+ activityLogOpen: boolean;
12
+ setActivityLogOpen: React.Dispatch<React.SetStateAction<boolean>>;
13
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Container for navigation, header & app-outlet.
3
+ * @constructor
4
+ */
5
+ export declare const Root: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { AppManifest } from '@equinor/fusion-framework-module-app';
2
+ import { HeaderMenus } from './PortalTypes';
3
+ export declare const SideSheets: ({ apps, menuState, }: {
4
+ apps: Array<AppManifest>;
5
+ menuState: HeaderMenus;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { FrameworkConfigurator } from '@equinor/fusion-framework';
2
+ export declare const configure: (config: FrameworkConfigurator) => Promise<void>;
3
+ export default configure;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Dev portal routes
3
+ */
4
+ export declare const routes: {
5
+ path: string;
6
+ element: import("react/jsx-runtime").JSX.Element;
7
+ children: {
8
+ path: string;
9
+ element: import("react/jsx-runtime").JSX.Element;
10
+ }[];
11
+ }[];
12
+ export declare function App(): import("react/jsx-runtime").JSX.Element;
13
+ export default App;
@@ -0,0 +1,2 @@
1
+ import { IconData } from '@equinor/eds-icons';
2
+ export declare const logoIcon: IconData;
@@ -0,0 +1,6 @@
1
+ import { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
2
+ import { ReactNode } from 'react';
3
+ export declare const EdsEventProvider: ({ event, children }: {
4
+ event: IEventModuleProvider;
5
+ children: ReactNode;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const httpFallbackStatusMessages: Record<number, string>;
@@ -0,0 +1,11 @@
1
+ export type ErrorCause = {
2
+ message: string;
3
+ status: number;
4
+ statusText: string;
5
+ };
6
+ export declare class HttpError extends Error {
7
+ message: string;
8
+ cause: ErrorCause;
9
+ constructor(message: string, cause: ErrorCause);
10
+ }
11
+ export declare function handleError<TRes>(req: Response): Promise<TRes>;
@@ -0,0 +1,11 @@
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
+ export declare function useGetApiRoles(api: string, defaultEmptyArray: true): Array<string>;
10
+ export declare function useGetApiRoles(api: string, defaultEmptyArray: false): Array<string> | null;
11
+ export declare function useGetApiRoles(api: string): Array<string>;
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,12 @@
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
+ export type RomaComponentRenderArgs = FusionComponentRenderArgs & {
8
+ query?: QueryClient;
9
+ };
10
+ export type RomaAppModuleInitiator<TModules extends Array<AnyModule> | unknown = unknown, TRef extends Fusion = Fusion, TEnv = AppEnv> = AppModuleInitiator<TModules, TRef, TEnv>;
11
+ export declare const makeComponent: <TModules extends Array<AnyModule>, TRef extends Fusion = Fusion<unknown>, TEnv extends AppEnv = AppEnv>(Component: React.ReactNode, args: RomaComponentRenderArgs, configure?: RomaAppModuleInitiator<TModules, TRef, TEnv>) => React.LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
12
+ export declare const withStyleIsolation: (children: ReactNode, args: RomaComponentRenderArgs) => React.LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,6 @@
1
+ import { Persister } from '@tanstack/react-query-persist-client';
2
+ /**
3
+ * Creates an Indexed DB persister
4
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
5
+ */
6
+ export declare function createIDBPersister(idbValidKey?: IDBValidKey): Persister;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ type Props = {
3
+ scope: string;
4
+ children: ReactNode;
5
+ };
6
+ export declare const StyleProvider: ({ scope, children }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,109 @@
1
+ import { BehaviorSubject, Observable } from 'rxjs';
2
+ import { Path } from '@equinor/fusion-framework-module-navigation';
3
+ import { NavigationType } from 'react-router-dom';
4
+ import { Action } from '@remix-run/router/history';
5
+ import { AccountInfo } from '@equinor/fusion-framework-module-msal';
6
+ import { AuthClient, AuthRequest } from '@equinor/fusion-framework-module-msal/client';
7
+ import { Environment, Service } from '@equinor/fusion-framework-module-service-discovery';
8
+ import { ServerSentEvent, SseConnection } from '../../../../modules/sse/src/index.ts';
9
+ export declare class RomaMockedServiceDiscovery {
10
+ readonly environment: {
11
+ type: string;
12
+ clientId: string;
13
+ services: {};
14
+ };
15
+ configureClient: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
16
+ createClient: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
17
+ resolveService(key: string): Promise<Service>;
18
+ resolveServices(): Promise<Environment>;
19
+ }
20
+ export declare class RomaMockedAuthModule {
21
+ readonly defaultAccount: AccountInfo;
22
+ readonly defaultClient: AuthClient;
23
+ readonly defaultConfig: {
24
+ tenantId: string;
25
+ clientId: string;
26
+ redirectUri: string;
27
+ config: {};
28
+ };
29
+ acquireAccessToken(req: AuthRequest): Promise<string | undefined>;
30
+ acquireToken(req: AuthRequest): ReturnType<AuthClient['acquireToken']>;
31
+ createClient(name?: string): AuthClient;
32
+ getClient(name: string): AuthClient;
33
+ handleRedirect(): ReturnType<AuthClient['handleRedirectPromise']>;
34
+ login(): Promise<void>;
35
+ }
36
+ declare class Navigator {
37
+ basename: string;
38
+ origin: string;
39
+ value: {
40
+ action: Action;
41
+ location: null;
42
+ delta: null;
43
+ };
44
+ location: null;
45
+ action: NavigationType;
46
+ createHref: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
47
+ createURL: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
48
+ encodeLocation: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
49
+ push: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
50
+ replace: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
51
+ go: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
52
+ listen: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
53
+ }
54
+ export declare class RomaMockedNavigationModule {
55
+ dispose: Cypress.Agent<import('cypress/types/sinon').SinonStub<any[], any>>;
56
+ readonly navigator: Navigator;
57
+ readonly path: {
58
+ pathname: string;
59
+ search: string;
60
+ hash: string;
61
+ };
62
+ readonly state$: Observable<{
63
+ action: Action;
64
+ location: Path;
65
+ }>;
66
+ createHref: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
67
+ createRouter: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
68
+ createURL: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
69
+ push: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
70
+ replace: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
71
+ }
72
+ export declare class RomaMockedHttpClient {
73
+ hasClient(): boolean;
74
+ createClient(): {
75
+ fetch: (url: string, options?: RequestInit) => Promise<Response>;
76
+ fetch$(path: string, init: any): Observable<Response>;
77
+ fetchAsync(path: string, args: any): Promise<Response>;
78
+ blob(path: string, args: any): Promise<Blob>;
79
+ blob$(path: string, args: any): Observable<Blob>;
80
+ json(path: string, init: any): Promise<any>;
81
+ json$(path: string, init: any): Observable<any>;
82
+ jsonAsync<T>(path: string, args: any): Promise<T>;
83
+ uri: string;
84
+ };
85
+ createCustomClient(): {
86
+ fetch: (url: string, options?: RequestInit) => Promise<Response>;
87
+ fetch$(path: string, init: any): Observable<Response>;
88
+ fetchAsync(path: string, args: any): Promise<Response>;
89
+ blob(path: string, args: any): Promise<Blob>;
90
+ blob$(path: string, args: any): Observable<Blob>;
91
+ json(path: string, init: any): Promise<any>;
92
+ json$(path: string, init: any): Observable<any>;
93
+ jsonAsync<T>(path: string, args: any): Promise<T>;
94
+ uri: string;
95
+ };
96
+ }
97
+ declare class Connection implements SseConnection {
98
+ abort: AbortController;
99
+ messageList: BehaviorSubject<Array<ServerSentEvent>>;
100
+ private interval$;
101
+ messageList$: Observable<ServerSentEvent[]>;
102
+ setAllRead(): Promise<void>;
103
+ setReadState(eventId: string, read: boolean): Promise<void>;
104
+ }
105
+ export declare class RomaMockedSseModule {
106
+ connect(name: string): Connection;
107
+ private createConnection;
108
+ }
109
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ReactNode } from 'react';
2
+ import { MountOptions } from 'cypress/react18';
3
+ export declare const mount: (component: ReactNode, options?: MountOptions) => Cypress.Chainable<import('cypress/react18').MountReturn>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/roma-framework",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "repository": "https://github.com/equinor/tops-roma",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -11,6 +11,10 @@
11
11
  ".": {
12
12
  "import": "./roma-framework.mjs",
13
13
  "require": "./roma-framework.js"
14
+ },
15
+ "./cypress": {
16
+ "import": "./cypress/roma-framework.mjs",
17
+ "require": "./cypress/roma-framework.js"
14
18
  }
15
19
  }
16
20
  }