@equinor/roma-framework 0.0.10 → 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 (84) hide show
  1. package/dev-portal/package.json +1 -1
  2. package/dev-portal/roma-framework.umd.js +30537 -18174
  3. package/index.d.ts +1 -1
  4. package/lib/api/roma/api/app-controller/app-controller.d.ts +14 -20
  5. package/lib/api/roma/api/category-controller/category-controller.d.ts +14 -20
  6. package/lib/api/roma/api/environment-controller/environment-controller.d.ts +6 -12
  7. package/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +21 -27
  8. package/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +6 -12
  9. package/lib/api/roma/api/service-controller/service-controller.d.ts +14 -20
  10. package/lib/api/roma/api/setting-controller/setting-controller.d.ts +30 -36
  11. package/lib/api/roma/model/appDto.d.ts +3 -9
  12. package/lib/api/roma/model/environmentDto.d.ts +2 -8
  13. package/lib/api/roma/model/romaConfigurationDto.d.ts +2 -8
  14. package/lib/api/roma/model/romaConfigurationDtoValue.d.ts +1 -3
  15. package/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +1 -3
  16. package/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +1 -3
  17. package/lib/api/roma/model/settingDto.d.ts +2 -8
  18. package/lib/api/roma/model/settingDtoValue.d.ts +1 -3
  19. package/lib/app-provider.d.ts +3 -2
  20. package/lib/dev-portal/AppLoader.d.ts +4 -1
  21. package/lib/dev-portal/EquinorLoader.d.ts +2 -1
  22. package/lib/dev-portal/ErrorViewer.d.ts +9 -0
  23. package/lib/dev-portal/HttpErrorViewer.d.ts +1 -0
  24. package/lib/eds-event-provider.d.ts +1 -0
  25. package/lib/make-component.d.ts +2 -1
  26. package/lib/query/persister.d.ts +7 -0
  27. package/lib/style-provider.d.ts +1 -0
  28. package/package.json +1 -1
  29. package/roma-framework.mjs +96 -106
  30. package/dev-portal/index.d.ts +0 -12
  31. package/dev-portal/lib/api/fetcher.d.ts +0 -21
  32. package/dev-portal/lib/api/roma/api/app-controller/app-controller.d.ts +0 -100
  33. package/dev-portal/lib/api/roma/api/category-controller/category-controller.d.ts +0 -100
  34. package/dev-portal/lib/api/roma/api/environment-controller/environment-controller.d.ts +0 -33
  35. package/dev-portal/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +0 -168
  36. package/dev-portal/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +0 -27
  37. package/dev-portal/lib/api/roma/api/service-controller/service-controller.d.ts +0 -100
  38. package/dev-portal/lib/api/roma/api/setting-controller/setting-controller.d.ts +0 -267
  39. package/dev-portal/lib/api/roma/index.d.ts +0 -8
  40. package/dev-portal/lib/api/roma/model/appDto.d.ts +0 -26
  41. package/dev-portal/lib/api/roma/model/categoryDto.d.ts +0 -13
  42. package/dev-portal/lib/api/roma/model/environmentDto.d.ts +0 -16
  43. package/dev-portal/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +0 -11
  44. package/dev-portal/lib/api/roma/model/index.d.ts +0 -19
  45. package/dev-portal/lib/api/roma/model/romaConfigurationDto.d.ts +0 -14
  46. package/dev-portal/lib/api/roma/model/romaConfigurationDtoValue.d.ts +0 -10
  47. package/dev-portal/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +0 -10
  48. package/dev-portal/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +0 -10
  49. package/dev-portal/lib/api/roma/model/serviceDto.d.ts +0 -16
  50. package/dev-portal/lib/api/roma/model/settingDto.d.ts +0 -16
  51. package/dev-portal/lib/api/roma/model/settingDtoValue.d.ts +0 -10
  52. package/dev-portal/lib/api/roma/model/versionDto.d.ts +0 -12
  53. package/dev-portal/lib/api/roma/use-client.d.ts +0 -34
  54. package/dev-portal/lib/api/trade-recap/deal.d.ts +0 -160
  55. package/dev-portal/lib/api/trade-recap/download-recap.d.ts +0 -6
  56. package/dev-portal/lib/api/trade-recap/get-deals.d.ts +0 -15
  57. package/dev-portal/lib/api/trade-recap/get-recap.d.ts +0 -11
  58. package/dev-portal/lib/api/trade-recap/index.d.ts +0 -5
  59. package/dev-portal/lib/api/trade-recap/recap.d.ts +0 -22
  60. package/dev-portal/lib/api/util.d.ts +0 -1
  61. package/dev-portal/lib/app-provider.d.ts +0 -32
  62. package/dev-portal/lib/dev-portal/AppLoader.d.ts +0 -12
  63. package/dev-portal/lib/dev-portal/AppViewer.d.ts +0 -6
  64. package/dev-portal/lib/dev-portal/EquinorLoader.d.ts +0 -12
  65. package/dev-portal/lib/dev-portal/ErrorViewer.d.ts +0 -12
  66. package/dev-portal/lib/dev-portal/Header.d.ts +0 -2
  67. package/dev-portal/lib/dev-portal/HttpErrorViewer.d.ts +0 -13
  68. package/dev-portal/lib/dev-portal/Navigation.d.ts +0 -5
  69. package/dev-portal/lib/dev-portal/Root.d.ts +0 -5
  70. package/dev-portal/lib/dev-portal/config.d.ts +0 -3
  71. package/dev-portal/lib/dev-portal/index.d.ts +0 -13
  72. package/dev-portal/lib/eds-event-provider.d.ts +0 -6
  73. package/dev-portal/lib/hooks/use-get-api-roles.d.ts +0 -14
  74. package/dev-portal/lib/hooks/use-has-api-role.d.ts +0 -7
  75. package/dev-portal/lib/make-component.d.ts +0 -12
  76. package/dev-portal/lib/style-provider.d.ts +0 -7
  77. package/lib/api/fetcher.d.ts +0 -21
  78. package/lib/api/trade-recap/deal.d.ts +0 -160
  79. package/lib/api/trade-recap/download-recap.d.ts +0 -6
  80. package/lib/api/trade-recap/get-deals.d.ts +0 -15
  81. package/lib/api/trade-recap/get-recap.d.ts +0 -11
  82. package/lib/api/trade-recap/index.d.ts +0 -5
  83. package/lib/api/trade-recap/recap.d.ts +0 -22
  84. package/lib/api/util.d.ts +0 -1
@@ -1,19 +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 * from './appDto';
9
- export * from './categoryDto';
10
- export * from './environmentDto';
11
- export * from './getAllRomaConfigurationTypes200Item';
12
- export * from './romaConfigurationDto';
13
- export * from './romaConfigurationDtoValue';
14
- export * from './serverSentEventActivityLogDto';
15
- export * from './serverSentEventStandardEventDto';
16
- export * from './serviceDto';
17
- export * from './settingDto';
18
- export * from './settingDtoValue';
19
- export * from './versionDto';
@@ -1,14 +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 { RomaConfigurationDtoValue } from './romaConfigurationDtoValue';
9
- export interface RomaConfigurationDto {
10
- id?: string;
11
- name: string;
12
- type: string;
13
- value: RomaConfigurationDtoValue;
14
- }
@@ -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 RomaConfigurationDtoValue = {
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 interface ServerSentEventActivityLogDto {
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 interface ServerSentEventStandardEventDto {
9
- [key: string]: any;
10
- }
@@ -1,16 +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 ServiceDto {
9
- defaultScopes: string[];
10
- internal: boolean;
11
- key: string;
12
- name: string;
13
- serviceName?: string;
14
- type: string;
15
- uri: string;
16
- }
@@ -1,16 +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 { SettingDtoValue } from './settingDtoValue';
9
- export interface SettingDto {
10
- appShortName?: string;
11
- id?: string;
12
- isPublic?: boolean;
13
- setting?: string;
14
- userId?: string;
15
- value: SettingDtoValue;
16
- }
@@ -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,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?: BodyType<unknown>;
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,160 +0,0 @@
1
- type Nullable<T> = T | null | undefined;
2
- export type Response = {
3
- items: Item[];
4
- salesOfficeContext: string[];
5
- page: number;
6
- currentPage: number;
7
- previousPage: Nullable<number>;
8
- nextPage: Nullable<number>;
9
- totalCount: number;
10
- pageSize: number;
11
- maxDeepSearch: number;
12
- searchSuccessful: boolean;
13
- errorMessage: Nullable<string>;
14
- onRecapDataEnrichmentDisabledMessage: string;
15
- last: boolean;
16
- recapDataEnrichmentEnabled: boolean;
17
- };
18
- export type Item = {
19
- dealId: number;
20
- dealKey: DealKey;
21
- salePurchaseInd: string;
22
- typeOfTrade: string;
23
- customer: Customer;
24
- strategy: Strategy;
25
- generalTermsAndConditions?: string;
26
- tradeDate: string;
27
- buyer: string;
28
- buyerShortName?: string;
29
- seller: string;
30
- sellerShortName?: string;
31
- law?: string;
32
- arbitration: boolean;
33
- inspectionCost?: string;
34
- deliveryType: string;
35
- deliveryYear: number;
36
- deliveryMth: number;
37
- creditTerms?: string;
38
- location?: string;
39
- grade: string;
40
- quality: string;
41
- vesselName?: string;
42
- dealStatus: string;
43
- cargoNo?: string;
44
- sportNo?: string;
45
- lastModifiedDate: string;
46
- createdBy: string;
47
- spotTermIndicator: string;
48
- transportType?: string;
49
- lcNumberExt?: string;
50
- lcNumberInt: any;
51
- blDate: string;
52
- blDateIsActual: boolean;
53
- norDate?: string;
54
- norDateIsActual: boolean;
55
- codDate?: string;
56
- codDateIsActual: boolean;
57
- blVolume?: number;
58
- outturnVolume?: number;
59
- contractualVolume: number;
60
- volumeUnit: string;
61
- gainLossPercentage?: number;
62
- acceptUpdateFromSport: boolean;
63
- titlePoint: string;
64
- dischargePort?: string;
65
- paymentDueDate?: string;
66
- tolerance: string;
67
- demurrage?: string;
68
- laytime?: string;
69
- contractualDateType: string;
70
- contractualStartDate: string;
71
- contractualEndDate: string;
72
- volumeFrom: string;
73
- status?: Status;
74
- attentionRequired: boolean;
75
- cargoStatusRats?: string;
76
- bookoutSequence: any;
77
- titleTransferDate: string;
78
- broker?: Broker;
79
- responsibleOps?: string;
80
- mailSent: boolean;
81
- pricingStartDate?: string;
82
- pricingEndDate?: string;
83
- priceDifferential: string;
84
- typeOfPricing: string;
85
- priceText: string;
86
- priceIndicator: string;
87
- counterpartyReferenceNumber: any;
88
- counterpartyReferenceDate: any;
89
- reference1?: string;
90
- reference2?: string;
91
- termDsYear?: number;
92
- termDsNo?: number;
93
- officialLoadingRangeFrom?: string;
94
- officialLoadingRangeTo?: string;
95
- pricingPeriodDescription?: string;
96
- finalVolume: number;
97
- paymentTerm?: string;
98
- sportRemarks?: string;
99
- imosVesselCode?: string;
100
- imosVoyageNo?: string;
101
- imosVoyageStatus?: string;
102
- priceEscalated: boolean;
103
- loadingPort?: string;
104
- cargoStatusSport?: string;
105
- priceBasis: string;
106
- deliveryPeriod: string;
107
- };
108
- export type DealKey = {
109
- companyId: string;
110
- salesOffice: string;
111
- dsYear: number;
112
- dsNo: number;
113
- dealNo: number;
114
- lineItemNo: number;
115
- dealKeyShort: string;
116
- dealKeyFull: string;
117
- };
118
- export type Customer = {
119
- custNo: string;
120
- custName: string;
121
- custFullName: string;
122
- };
123
- export type Strategy = {
124
- id: number;
125
- year: number;
126
- no: number;
127
- description: string;
128
- reportingMonth: number;
129
- strategyKey: string;
130
- closed: boolean;
131
- class1: string;
132
- class2: string;
133
- class3: string;
134
- class4: string;
135
- dateClosed: any;
136
- dateOpened: string;
137
- };
138
- export type Status = {
139
- statusLines: StatusLine[];
140
- message: string;
141
- statusType: string;
142
- };
143
- export type StatusLine = {
144
- statusType: string;
145
- propertyName: string;
146
- propertyType: any;
147
- displayName: string;
148
- message: string;
149
- source1: any;
150
- value1: any;
151
- source2: any;
152
- value2: any;
153
- };
154
- export type Broker = {
155
- brokerNo: string;
156
- name: string;
157
- fullName: string;
158
- active: boolean;
159
- };
160
- export {};
@@ -1,6 +0,0 @@
1
- import { HttpResponseError } from '@equinor/fusion-framework-module-http';
2
- type Params = Partial<{
3
- dealId: number;
4
- }>;
5
- export declare const useDownloadRecap: (params: Params) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<Blob, HttpResponseError<Response>>;
6
- export {};
@@ -1,15 +0,0 @@
1
- import { Response } from './deal';
2
- import { HttpError } from '../fetcher';
3
- type Params = {
4
- dsYears: Array<number>;
5
- pageSize: number;
6
- bolDateFrom: string;
7
- bolDateTo: string;
8
- typeOfTrade: string;
9
- traders: Array<string>;
10
- sort: string;
11
- page: number;
12
- salesOffices: Array<string>;
13
- };
14
- export declare const useGetDeals: (params: Params) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<Response, HttpError>;
15
- export {};
@@ -1,11 +0,0 @@
1
- import { HttpResponseError } from '@equinor/fusion-framework-module-http';
2
- import { TradeRecap } from './recap';
3
- type Params = Partial<{
4
- companyId: string;
5
- so: string;
6
- dsYear: string;
7
- dsId: string;
8
- dsNo: string;
9
- }>;
10
- export declare const useGetRecap: (params: Params) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TradeRecap, HttpResponseError<Response>>;
11
- export {};
@@ -1,5 +0,0 @@
1
- export * from './get-deals';
2
- export * from './deal';
3
- export * from './get-recap';
4
- export * from './recap';
5
- export * from './download-recap';
@@ -1,22 +0,0 @@
1
- import { DealKey } from './deal';
2
- export interface TradeRecap {
3
- dealKey: DealKey;
4
- strategy: string;
5
- typeOfTrade: string;
6
- priceIndicator: string;
7
- dealDate: string;
8
- trader: string;
9
- brokerName: string;
10
- seller: string;
11
- buyer: string;
12
- generalTermsAndConditions: string;
13
- law: string;
14
- arbitration: boolean;
15
- inspectionCost: string;
16
- operational: Operational;
17
- salePurchaseIndicator: string;
18
- dealId: number;
19
- }
20
- export interface Operational {
21
- lastUpdate: string;
22
- }
@@ -1 +0,0 @@
1
- export declare const createUrlParamsFromObject: (obj: Record<string, unknown>) => URLSearchParams;
@@ -1,32 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { AppManifest } from '@equinor/fusion-framework-module-app';
3
- import type { QueryClientError } from '@equinor/fusion-query/client';
4
- type AppLoadError = QueryClientError & {
5
- cause: {
6
- data: unknown;
7
- name: string;
8
- response: Response;
9
- };
10
- };
11
- export declare const AppContext: import("react").Context<{
12
- isLoading: boolean;
13
- apps?: AppManifest[] | undefined;
14
- error?: AppLoadError | undefined;
15
- }>;
16
- type ErrorPageProps = {
17
- errorCode: number;
18
- explanation: string;
19
- solution: string;
20
- };
21
- export declare function AppLoadError({ errorCode, explanation, solution, }: ErrorPageProps): import("react/jsx-runtime").JSX.Element;
22
- export declare const AppProvider: ({ children }: {
23
- children: ReactNode;
24
- }) => import("react/jsx-runtime").JSX.Element;
25
- export declare const useApps: ({ includeHidden, }?: {
26
- includeHidden?: boolean | undefined;
27
- }) => {
28
- isLoading: boolean;
29
- apps: AppManifest[];
30
- error: AppLoadError | undefined;
31
- };
32
- export {};
@@ -1,12 +0,0 @@
1
- import { AppManifest } from '@equinor/fusion-framework-module-app';
2
- /**
3
- * Component that will render a Fusion application
4
- *
5
- * @param app the AppManifest for the application to render
6
- * @param kind whether the app is a widget or an application
7
- * @constructor
8
- */
9
- export declare function AppLoader({ app, kind, }: {
10
- app: AppManifest | null;
11
- kind?: 'app' | 'widget';
12
- }): 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,12 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Simple in-place loader for fusion apps
4
- *
5
- * @param children
6
- * @param text
7
- * @constructor
8
- */
9
- export declare const EquinorLoader: ({ children, text, }: React.PropsWithChildren<{
10
- readonly text: string;
11
- }>) => JSX.Element;
12
- export default EquinorLoader;
@@ -1,12 +0,0 @@
1
- /**
2
- * Simple error display component.
3
- * Does not create a pretty error, and should most likely be recreated for various error types (e.g. lack of access etc.)
4
- * Reasonable to assume this will be a part of e.g. @equinor/roma-components in the future.
5
- *
6
- * @param error
7
- * @constructor
8
- */
9
- export declare const ErrorViewer: ({ error }: {
10
- readonly error: Error;
11
- }) => import("react/jsx-runtime").JSX.Element;
12
- export default ErrorViewer;
@@ -1,2 +0,0 @@
1
- export declare const Header: () => import("react/jsx-runtime").JSX.Element;
2
- export default Header;
@@ -1,13 +0,0 @@
1
- import { HttpError } from '../api/fetcher';
2
- /**
3
- * Simple error display component.
4
- * Does not create a pretty error, and should most likely be recreated for various error types (e.g. lack of access etc.)
5
- * Reasonable to assume this will be a part of e.g. @equinor/roma-components in the future.
6
- *
7
- * @param error
8
- * @constructor
9
- */
10
- export declare const HttpErrorViewer: ({ error }: {
11
- readonly error: HttpError;
12
- }) => import("react/jsx-runtime").JSX.Element;
13
- export default HttpErrorViewer;
@@ -1,5 +0,0 @@
1
- type NavigationProps = {
2
- setOpen: (open: boolean) => void;
3
- };
4
- export declare const Navigation: ({ setOpen, }: NavigationProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * Container for navigation, header & app-outlet.
3
- * @constructor
4
- */
5
- export declare const Root: () => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { FrameworkConfigurator } from '@equinor/fusion-framework';
2
- export declare const configure: (config: FrameworkConfigurator) => Promise<void>;
3
- export default configure;
@@ -1,13 +0,0 @@
1
- /**
2
- * Dev portal rotues
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;
@@ -1,6 +0,0 @@
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;
@@ -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,12 +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 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<TRef extends Fusion = Fusion, TEnv = AppEnv> = FusionComponentRenderArgs<TRef, TEnv> & {
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 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>;
12
- export declare const withStyleIsolation: (children: ReactNode, args: RomaComponentRenderArgs) => React.LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -1,7 +0,0 @@
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 {};
@@ -1,21 +0,0 @@
1
- export type HttpErrorServerResponse = {
2
- timestamp: string;
3
- status: number;
4
- error: string;
5
- message: string;
6
- path: string;
7
- };
8
- export type HttpErrorResponse = {
9
- status: number;
10
- statusText: string;
11
- message: HttpErrorServerResponse;
12
- ok: boolean;
13
- headers: Headers;
14
- url: string;
15
- };
16
- export declare class HttpError extends Error {
17
- readonly message: string;
18
- readonly response: HttpErrorResponse;
19
- constructor(message: string, response: HttpErrorResponse);
20
- }
21
- export declare const handleJsonRequest: <T>(req: Response) => Promise<T>;