@equinor/fusion-framework-module-services 5.1.1-msal-0b0dadf270ee512f019a325c2f1586f91f9150a4 → 5.1.2

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 (254) hide show
  1. package/CHANGELOG.md +114 -98
  2. package/dist/esm/bookmarks/api-version.js.map +1 -1
  3. package/dist/esm/bookmarks/client.js.map +1 -1
  4. package/dist/esm/bookmarks/endpoints/bookmark-apply.get.js.map +1 -1
  5. package/dist/esm/bookmarks/endpoints/bookmark.delete.js.map +1 -1
  6. package/dist/esm/bookmarks/endpoints/bookmark.get.js.map +1 -1
  7. package/dist/esm/bookmarks/endpoints/bookmark.patch.js.map +1 -1
  8. package/dist/esm/bookmarks/endpoints/bookmark.post.js.map +1 -1
  9. package/dist/esm/bookmarks/endpoints/user-bookmark-favourite.delete.js.map +1 -1
  10. package/dist/esm/bookmarks/endpoints/user-bookmark-favourite.head.js.map +1 -1
  11. package/dist/esm/bookmarks/endpoints/user-bookmark-favourite.post.js.map +1 -1
  12. package/dist/esm/bookmarks/endpoints/user-bookmarks.get.js.map +1 -1
  13. package/dist/esm/bookmarks/schemas.js +1 -3
  14. package/dist/esm/bookmarks/schemas.js.map +1 -1
  15. package/dist/esm/bookmarks/selectors.js.map +1 -1
  16. package/dist/esm/context/client.js +2 -2
  17. package/dist/esm/context/client.js.map +1 -1
  18. package/dist/esm/context/get/client.js.map +1 -1
  19. package/dist/esm/context/get/generate-endpoint.js +0 -1
  20. package/dist/esm/context/get/generate-endpoint.js.map +1 -1
  21. package/dist/esm/context/get/generate-parameters.js.map +1 -1
  22. package/dist/esm/context/get/types.js.map +1 -1
  23. package/dist/esm/context/index.js.map +1 -1
  24. package/dist/esm/context/query/client.js.map +1 -1
  25. package/dist/esm/context/query/generate-endpoint.js +58 -13
  26. package/dist/esm/context/query/generate-endpoint.js.map +1 -1
  27. package/dist/esm/context/query/generate-parameters.js.map +1 -1
  28. package/dist/esm/context/query/types.js.map +1 -1
  29. package/dist/esm/context/related/client.js.map +1 -1
  30. package/dist/esm/context/related/generate-endpoint.js +56 -13
  31. package/dist/esm/context/related/generate-endpoint.js.map +1 -1
  32. package/dist/esm/context/related/generate-parameters.js.map +1 -1
  33. package/dist/esm/context/related/types.js.map +1 -1
  34. package/dist/esm/context/static.js.map +1 -1
  35. package/dist/esm/errors.js.map +1 -1
  36. package/dist/esm/module.js.map +1 -1
  37. package/dist/esm/notification/client.js.map +1 -1
  38. package/dist/esm/notification/notification/delete/client.js.map +1 -1
  39. package/dist/esm/notification/notification/delete/generate-endpoint.js +0 -1
  40. package/dist/esm/notification/notification/delete/generate-endpoint.js.map +1 -1
  41. package/dist/esm/notification/notification/delete/generate-parameters.js.map +1 -1
  42. package/dist/esm/notification/notification/get/client.js.map +1 -1
  43. package/dist/esm/notification/notification/get/generate-endpoint.js +0 -1
  44. package/dist/esm/notification/notification/get/generate-endpoint.js.map +1 -1
  45. package/dist/esm/notification/notification/get/generate-parameters.js.map +1 -1
  46. package/dist/esm/notification/notification/getAll/client.js.map +1 -1
  47. package/dist/esm/notification/notification/getAll/generate-endpoint.js +0 -1
  48. package/dist/esm/notification/notification/getAll/generate-endpoint.js.map +1 -1
  49. package/dist/esm/notification/notification/getAll/generate-parameters.js.map +1 -1
  50. package/dist/esm/notification/notification/patch/client.js.map +1 -1
  51. package/dist/esm/notification/notification/patch/generate-endpoint.js +0 -1
  52. package/dist/esm/notification/notification/patch/generate-endpoint.js.map +1 -1
  53. package/dist/esm/notification/notification/patch/generate-parameters.js.map +1 -1
  54. package/dist/esm/notification/notification/post/client.js.map +1 -1
  55. package/dist/esm/notification/notification/post/generate-endpoint.js +0 -1
  56. package/dist/esm/notification/notification/post/generate-endpoint.js.map +1 -1
  57. package/dist/esm/notification/notification/post/generate-parameters.js.map +1 -1
  58. package/dist/esm/notification/settings/get/client.js.map +1 -1
  59. package/dist/esm/notification/settings/get/generate-endpoint.js +0 -1
  60. package/dist/esm/notification/settings/get/generate-endpoint.js.map +1 -1
  61. package/dist/esm/notification/settings/get/generate-parameters.js.map +1 -1
  62. package/dist/esm/notification/settings/put/client.js.map +1 -1
  63. package/dist/esm/notification/settings/put/generate-endpoint.js +0 -1
  64. package/dist/esm/notification/settings/put/generate-endpoint.js.map +1 -1
  65. package/dist/esm/notification/settings/put/generate-parameters.js.map +1 -1
  66. package/dist/esm/notification/static.js.map +1 -1
  67. package/dist/esm/people/client.js.map +1 -1
  68. package/dist/esm/people/person-details/client.js.map +1 -1
  69. package/dist/esm/people/person-details/generate-endpoint.js.map +1 -1
  70. package/dist/esm/people/person-details/generate-parameters.js.map +1 -1
  71. package/dist/esm/people/person-photo/client.js.map +1 -1
  72. package/dist/esm/people/person-photo/generate-endpoint.js.map +1 -1
  73. package/dist/esm/people/person-photo/generate-parameters.js.map +1 -1
  74. package/dist/esm/people/query/client.js.map +1 -1
  75. package/dist/esm/people/query/generate-endpoint.js.map +1 -1
  76. package/dist/esm/people/query/generate-parameters.js.map +1 -1
  77. package/dist/esm/people/static.js.map +1 -1
  78. package/dist/esm/people/utils.js.map +1 -1
  79. package/dist/esm/provider.js.map +1 -1
  80. package/dist/esm/utils.js.map +1 -1
  81. package/dist/esm/version.js +1 -1
  82. package/dist/tsconfig.tsbuildinfo +1 -1
  83. package/dist/types/bookmarks/api-version.d.ts +2 -2
  84. package/dist/types/bookmarks/client.d.ts +8 -8
  85. package/dist/types/bookmarks/endpoints/bookmark-apply.get.d.ts +1 -1
  86. package/dist/types/bookmarks/endpoints/bookmark.delete.d.ts +1 -1
  87. package/dist/types/bookmarks/endpoints/bookmark.get.d.ts +1 -1
  88. package/dist/types/bookmarks/endpoints/bookmark.patch.d.ts +1 -1
  89. package/dist/types/bookmarks/endpoints/bookmark.post.d.ts +1 -1
  90. package/dist/types/bookmarks/endpoints/user-bookmark-favourite.delete.d.ts +1 -1
  91. package/dist/types/bookmarks/endpoints/user-bookmark-favourite.head.d.ts +1 -1
  92. package/dist/types/bookmarks/endpoints/user-bookmark-favourite.post.d.ts +1 -1
  93. package/dist/types/bookmarks/endpoints/user-bookmarks.get.d.ts +1 -1
  94. package/dist/types/bookmarks/selectors.d.ts +1 -1
  95. package/dist/types/bookmarks/types.d.ts +1 -1
  96. package/dist/types/configurator.d.ts +1 -1
  97. package/dist/types/context/client.d.ts +4 -4
  98. package/dist/types/context/get/client.d.ts +3 -2
  99. package/dist/types/context/get/generate-endpoint.d.ts +2 -1
  100. package/dist/types/context/get/generate-parameters.d.ts +2 -1
  101. package/dist/types/context/get/types.d.ts +2 -2
  102. package/dist/types/context/index.d.ts +1 -0
  103. package/dist/types/context/query/client.d.ts +3 -2
  104. package/dist/types/context/query/generate-endpoint.d.ts +11 -1
  105. package/dist/types/context/query/generate-parameters.d.ts +3 -2
  106. package/dist/types/context/query/types.d.ts +2 -2
  107. package/dist/types/context/related/client.d.ts +3 -2
  108. package/dist/types/context/related/generate-endpoint.d.ts +11 -1
  109. package/dist/types/context/related/generate-parameters.d.ts +3 -2
  110. package/dist/types/context/related/types.d.ts +2 -2
  111. package/dist/types/context/static.d.ts +2 -2
  112. package/dist/types/module.d.ts +2 -2
  113. package/dist/types/notification/client.d.ts +9 -9
  114. package/dist/types/notification/notification/delete/client.d.ts +4 -3
  115. package/dist/types/notification/notification/delete/generate-endpoint.d.ts +2 -1
  116. package/dist/types/notification/notification/delete/generate-parameters.d.ts +4 -3
  117. package/dist/types/notification/notification/delete/types.d.ts +3 -3
  118. package/dist/types/notification/notification/get/client.d.ts +4 -3
  119. package/dist/types/notification/notification/get/generate-endpoint.d.ts +2 -1
  120. package/dist/types/notification/notification/get/generate-parameters.d.ts +4 -3
  121. package/dist/types/notification/notification/get/types.d.ts +3 -3
  122. package/dist/types/notification/notification/getAll/client.d.ts +4 -3
  123. package/dist/types/notification/notification/getAll/generate-endpoint.d.ts +2 -1
  124. package/dist/types/notification/notification/getAll/generate-parameters.d.ts +4 -3
  125. package/dist/types/notification/notification/getAll/types.d.ts +3 -3
  126. package/dist/types/notification/notification/patch/client.d.ts +4 -3
  127. package/dist/types/notification/notification/patch/generate-endpoint.d.ts +2 -1
  128. package/dist/types/notification/notification/patch/generate-parameters.d.ts +4 -3
  129. package/dist/types/notification/notification/patch/types.d.ts +3 -3
  130. package/dist/types/notification/notification/post/client.d.ts +4 -3
  131. package/dist/types/notification/notification/post/generate-endpoint.d.ts +2 -1
  132. package/dist/types/notification/notification/post/generate-parameters.d.ts +4 -3
  133. package/dist/types/notification/notification/post/types.d.ts +3 -3
  134. package/dist/types/notification/settings/get/client.d.ts +4 -3
  135. package/dist/types/notification/settings/get/generate-endpoint.d.ts +2 -1
  136. package/dist/types/notification/settings/get/generate-parameters.d.ts +4 -3
  137. package/dist/types/notification/settings/get/types.d.ts +3 -3
  138. package/dist/types/notification/settings/put/client.d.ts +4 -3
  139. package/dist/types/notification/settings/put/generate-endpoint.d.ts +2 -1
  140. package/dist/types/notification/settings/put/generate-parameters.d.ts +4 -3
  141. package/dist/types/notification/settings/put/types.d.ts +3 -3
  142. package/dist/types/notification/static.d.ts +2 -2
  143. package/dist/types/people/api-models.d.ts +2 -2
  144. package/dist/types/people/api-models.v2.d.ts +1 -1
  145. package/dist/types/people/api-models.v4.d.ts +1 -1
  146. package/dist/types/people/client.d.ts +4 -4
  147. package/dist/types/people/person-details/client.d.ts +2 -2
  148. package/dist/types/people/person-details/generate-parameters.d.ts +1 -1
  149. package/dist/types/people/person-details/types.d.ts +1 -1
  150. package/dist/types/people/person-photo/client.d.ts +2 -2
  151. package/dist/types/people/person-photo/generate-parameters.d.ts +1 -1
  152. package/dist/types/people/person-photo/types.d.ts +2 -2
  153. package/dist/types/people/query/client.d.ts +2 -2
  154. package/dist/types/people/query/generate-parameters.d.ts +1 -1
  155. package/dist/types/people/query/types.d.ts +2 -2
  156. package/dist/types/people/static.d.ts +2 -2
  157. package/dist/types/people/utils.d.ts +1 -1
  158. package/dist/types/provider.d.ts +3 -3
  159. package/dist/types/types.d.ts +1 -1
  160. package/dist/types/utils.d.ts +1 -1
  161. package/dist/types/version.d.ts +1 -1
  162. package/package.json +11 -7
  163. package/src/bookmarks/api-version.ts +2 -2
  164. package/src/bookmarks/client.ts +228 -231
  165. package/src/bookmarks/endpoints/bookmark-apply.get.ts +58 -58
  166. package/src/bookmarks/endpoints/bookmark.delete.ts +57 -57
  167. package/src/bookmarks/endpoints/bookmark.get.ts +62 -62
  168. package/src/bookmarks/endpoints/bookmark.patch.ts +78 -78
  169. package/src/bookmarks/endpoints/bookmark.post.ts +68 -68
  170. package/src/bookmarks/endpoints/user-bookmark-favourite.delete.ts +57 -57
  171. package/src/bookmarks/endpoints/user-bookmark-favourite.head.ts +57 -57
  172. package/src/bookmarks/endpoints/user-bookmark-favourite.post.ts +58 -58
  173. package/src/bookmarks/endpoints/user-bookmarks.get.ts +98 -98
  174. package/src/bookmarks/schemas.ts +54 -56
  175. package/src/bookmarks/selectors.ts +24 -24
  176. package/src/bookmarks/types.ts +6 -6
  177. package/src/configurator.ts +3 -3
  178. package/src/context/api-models.ts +19 -19
  179. package/src/context/client.ts +68 -58
  180. package/src/context/get/client.ts +18 -18
  181. package/src/context/get/generate-endpoint.ts +13 -14
  182. package/src/context/get/generate-parameters.ts +9 -9
  183. package/src/context/get/types.ts +20 -20
  184. package/src/context/index.ts +2 -0
  185. package/src/context/query/client.ts +22 -22
  186. package/src/context/query/generate-endpoint.ts +97 -49
  187. package/src/context/query/generate-parameters.ts +10 -10
  188. package/src/context/query/types.ts +25 -25
  189. package/src/context/related/client.ts +22 -22
  190. package/src/context/related/generate-endpoint.ts +92 -45
  191. package/src/context/related/generate-parameters.ts +10 -10
  192. package/src/context/related/types.ts +27 -27
  193. package/src/context/static.ts +3 -3
  194. package/src/errors.ts +6 -6
  195. package/src/module.ts +50 -52
  196. package/src/notification/api-models.ts +36 -36
  197. package/src/notification/client.ts +131 -151
  198. package/src/notification/notification/delete/client.ts +22 -22
  199. package/src/notification/notification/delete/generate-endpoint.ts +13 -14
  200. package/src/notification/notification/delete/generate-parameters.ts +18 -18
  201. package/src/notification/notification/delete/types.ts +21 -21
  202. package/src/notification/notification/get/client.ts +19 -19
  203. package/src/notification/notification/get/generate-endpoint.ts +13 -14
  204. package/src/notification/notification/get/generate-parameters.ts +11 -11
  205. package/src/notification/notification/get/types.ts +21 -21
  206. package/src/notification/notification/getAll/client.ts +22 -22
  207. package/src/notification/notification/getAll/generate-endpoint.ts +13 -14
  208. package/src/notification/notification/getAll/generate-parameters.ts +11 -11
  209. package/src/notification/notification/getAll/types.ts +21 -21
  210. package/src/notification/notification/patch/client.ts +22 -22
  211. package/src/notification/notification/patch/generate-endpoint.ts +13 -14
  212. package/src/notification/notification/patch/generate-parameters.ts +18 -18
  213. package/src/notification/notification/patch/types.ts +22 -22
  214. package/src/notification/notification/post/client.ts +22 -22
  215. package/src/notification/notification/post/generate-endpoint.ts +13 -14
  216. package/src/notification/notification/post/generate-parameters.ts +18 -18
  217. package/src/notification/notification/post/types.ts +31 -31
  218. package/src/notification/settings/get/client.ts +22 -22
  219. package/src/notification/settings/get/generate-endpoint.ts +13 -14
  220. package/src/notification/settings/get/generate-parameters.ts +11 -11
  221. package/src/notification/settings/get/types.ts +21 -21
  222. package/src/notification/settings/put/client.ts +22 -22
  223. package/src/notification/settings/put/generate-endpoint.ts +13 -14
  224. package/src/notification/settings/put/generate-parameters.ts +20 -20
  225. package/src/notification/settings/put/types.ts +20 -20
  226. package/src/notification/static.ts +3 -3
  227. package/src/people/api-models.ts +30 -30
  228. package/src/people/api-models.v2.ts +27 -27
  229. package/src/people/api-models.v4.ts +79 -79
  230. package/src/people/client.ts +73 -77
  231. package/src/people/person-details/client.ts +21 -18
  232. package/src/people/person-details/generate-endpoint.ts +16 -16
  233. package/src/people/person-details/generate-parameters.ts +8 -8
  234. package/src/people/person-details/types.ts +13 -13
  235. package/src/people/person-photo/client.ts +19 -22
  236. package/src/people/person-photo/generate-endpoint.ts +13 -13
  237. package/src/people/person-photo/generate-parameters.ts +8 -8
  238. package/src/people/person-photo/types.ts +8 -8
  239. package/src/people/query/client.ts +20 -18
  240. package/src/people/query/generate-endpoint.ts +14 -14
  241. package/src/people/query/generate-parameters.ts +8 -8
  242. package/src/people/query/types.ts +10 -10
  243. package/src/people/static.ts +2 -2
  244. package/src/people/utils.ts +20 -20
  245. package/src/provider.ts +85 -85
  246. package/src/types.ts +34 -34
  247. package/src/utils.ts +22 -26
  248. package/src/version.ts +1 -1
  249. package/tests/context.test.ts +109 -0
  250. package/tests/mocks/get-context-item.ts +60 -0
  251. package/tests/mocks/index.ts +1 -0
  252. package/tests/setup.ts +73 -0
  253. package/tsconfig.json +4 -3
  254. package/vitest.config.ts +11 -0
@@ -1,4 +1,4 @@
1
1
  export declare enum ApiVersion {
2
- 'v1' = "1.0",
3
- 'v2' = "2.0"
2
+ v1 = "1.0",
3
+ v2 = "2.0"
4
4
  }
@@ -1,14 +1,14 @@
1
1
  import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
2
  import type { ClientMethod } from '../types';
3
- import { GetBookmarksArgs, GetBookmarksResponse, GetBookmarksResult, GetBookmarksVersion } from './endpoints/user-bookmarks.get';
4
- import { GetBookmarkArg, GetBookmarkResponse, GetBookmarkResult, GetBookmarkVersion } from './endpoints/bookmark.get';
5
- import { CreateBookmarkArg, CreateBookmarkResponse, CreateBookmarkVersion, CreateBookmarksResult } from './endpoints/bookmark.post';
3
+ import { type GetBookmarksArgs, type GetBookmarksResponse, type GetBookmarksResult, type GetBookmarksVersion } from './endpoints/user-bookmarks.get';
4
+ import { type GetBookmarkArg, type GetBookmarkResponse, type GetBookmarkResult, type GetBookmarkVersion } from './endpoints/bookmark.get';
5
+ import { type CreateBookmarkArg, type CreateBookmarkResponse, type CreateBookmarkVersion, type CreateBookmarksResult } from './endpoints/bookmark.post';
6
6
  import { type PatchBookmarkArg, type PatchBookmarkResponse, type PatchBookmarkVersion, type PatchBookmarksResult } from './endpoints/bookmark.patch';
7
- import { BookmarkApplyArgs, BookmarkApplyResponse, BookmarkApplyResult, BookmarkApplyVersion } from './endpoints/bookmark-apply.get';
8
- import { AddBookmarkFavouriteArgs, AddBookmarkFavouriteResponse, AddBookmarkFavouriteResult, AddBookmarkFavouriteVersion } from './endpoints/user-bookmark-favourite.post';
9
- import { DeleteBookmarkArg, DeleteBookmarkResponse, DeleteBookmarkVersion } from './endpoints/bookmark.delete';
10
- import { IsFavoriteBookmarkArgs, IsFavoriteBookmarkResponse, IsFavoriteBookmarkResult, IsFavoriteBookmarkVersion } from './endpoints/user-bookmark-favourite.head';
11
- import { RemoveBookmarkFavouriteArgs, RemoveBookmarkFavouriteResponse, RemoveBookmarkFavouriteResult, RemoveBookmarkFavouriteVersion } from './endpoints/user-bookmark-favourite.delete';
7
+ import { type BookmarkApplyArgs, type BookmarkApplyResponse, type BookmarkApplyResult, type BookmarkApplyVersion } from './endpoints/bookmark-apply.get';
8
+ import { type AddBookmarkFavouriteArgs, type AddBookmarkFavouriteResponse, type AddBookmarkFavouriteResult, type AddBookmarkFavouriteVersion } from './endpoints/user-bookmark-favourite.post';
9
+ import { type DeleteBookmarkArg, type DeleteBookmarkResponse, type DeleteBookmarkVersion } from './endpoints/bookmark.delete';
10
+ import { type IsFavoriteBookmarkArgs, type IsFavoriteBookmarkResponse, type IsFavoriteBookmarkResult, type IsFavoriteBookmarkVersion } from './endpoints/user-bookmark-favourite.head';
11
+ import { type RemoveBookmarkFavouriteArgs, type RemoveBookmarkFavouriteResponse, type RemoveBookmarkFavouriteResult, type RemoveBookmarkFavouriteVersion } from './endpoints/user-bookmark-favourite.delete';
12
12
  /**
13
13
  * Provides a client interface for interacting with the bookmarks API.
14
14
  * This class abstracts the details of making API requests and handling responses.
@@ -37,4 +37,4 @@ type MethodArg<TVersion extends AllowedVersions> = z.input<(typeof ArgSchema)[Ex
37
37
  type MethodResult<TVersion extends AllowedVersions, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = ApiResponse<TVersion>> = ClientMethod<TResult>[TMethod];
38
38
  /** executes the api call */
39
39
  declare const executeApiCall: <TVersion extends AllowedVersions, TMethod extends keyof ClientMethod>(version: TVersion, client: IHttpClient, method?: TMethod) => <TResponse = ApiResponse<ExtractApiVersion<TVersion>>, TResult = MethodResult<ExtractApiVersion<TVersion>, TMethod, TResponse>>(input: MethodArg<ExtractApiVersion<TVersion>>, init?: ClientRequestInit<IHttpClient, TResponse>) => TResult;
40
- export { AllowedVersions as BookmarkApplyVersion, MethodArg as BookmarkApplyArgs, ApiResponse as BookmarkApplyResponse, MethodResult as BookmarkApplyResult, executeApiCall as getBookmarkApply, };
40
+ export { type AllowedVersions as BookmarkApplyVersion, type MethodArg as BookmarkApplyArgs, type ApiResponse as BookmarkApplyResponse, type MethodResult as BookmarkApplyResult, executeApiCall as getBookmarkApply, };
@@ -28,4 +28,4 @@ type MethodArg<TVersion extends AllowedVersions> = z.input<(typeof ArgSchema)[Ex
28
28
  type MethodResult<TVersion extends AllowedVersions, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = ApiResponse<TVersion>> = ClientMethod<TResult>[TMethod];
29
29
  /** executes the api call */
30
30
  declare const executeApiCall: <TVersion extends AllowedVersions, TMethod extends keyof ClientMethod>(version: TVersion, client: IHttpClient, method?: TMethod) => <TResponse = ApiResponse<ExtractApiVersion<TVersion>>, TResult = MethodResult<ExtractApiVersion<TVersion>, TMethod, TResponse>>(input: MethodArg<ExtractApiVersion<TVersion>>, init?: ClientRequestInit<IHttpClient, TResponse>) => TResult;
31
- export { AllowedVersions as DeleteBookmarkVersion, MethodArg as DeleteBookmarkArg, ApiResponse as DeleteBookmarkResponse, MethodResult as DeleteBookmarksResult, executeApiCall as deleteBookmark, };
31
+ export { type AllowedVersions as DeleteBookmarkVersion, type MethodArg as DeleteBookmarkArg, type ApiResponse as DeleteBookmarkResponse, type MethodResult as DeleteBookmarksResult, executeApiCall as deleteBookmark, };
@@ -348,4 +348,4 @@ type MethodArg<TVersion extends AllowedVersions> = z.input<(typeof ArgSchema)[Ex
348
348
  type MethodResult<TVersion extends AllowedVersions, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = ApiResponse<TVersion>> = ClientMethod<TResult>[TMethod];
349
349
  /** executes the api call */
350
350
  declare const executeApiCall: <TVersion extends AllowedVersions, TMethod extends keyof ClientMethod>(version: TVersion, client: IHttpClient, method?: TMethod) => <TResponse = ApiResponse<ExtractApiVersion<TVersion>>, TResult = MethodResult<ExtractApiVersion<TVersion>, TMethod, TResponse>>(input: MethodArg<ExtractApiVersion<TVersion>>, init?: ClientRequestInit<IHttpClient, TResponse>) => TResult;
351
- export { AllowedVersions as GetBookmarkVersion, MethodArg as GetBookmarkArg, ApiResponse as GetBookmarkResponse, MethodResult as GetBookmarkResult, executeApiCall as getBookmark, };
351
+ export { type AllowedVersions as GetBookmarkVersion, type MethodArg as GetBookmarkArg, type ApiResponse as GetBookmarkResponse, type MethodResult as GetBookmarkResult, executeApiCall as getBookmark, };
@@ -251,4 +251,4 @@ type MethodArg<TVersion extends AllowedVersions> = z.input<(typeof ArgSchema)[Ex
251
251
  type MethodResult<TVersion extends AllowedVersions, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = ApiResponse<TVersion>> = ClientMethod<TResult>[TMethod];
252
252
  /** executes the api call */
253
253
  declare const executeApiCall: <TVersion extends AllowedVersions, TMethod extends keyof ClientMethod>(version: TVersion, client: IHttpClient, method?: TMethod) => <TResponse = ApiResponse<ExtractApiVersion<TVersion>>, TResult = MethodResult<ExtractApiVersion<TVersion>, TMethod, TResponse>>(input: MethodArg<ExtractApiVersion<TVersion>>, init?: ClientRequestInit<IHttpClient, TResponse>) => TResult;
254
- export { AllowedVersions as PatchBookmarkVersion, MethodArg as PatchBookmarkArg, ApiResponse as PatchBookmarkResponse, MethodResult as PatchBookmarksResult, executeApiCall as patchBookmark, };
254
+ export { type AllowedVersions as PatchBookmarkVersion, type MethodArg as PatchBookmarkArg, type ApiResponse as PatchBookmarkResponse, type MethodResult as PatchBookmarksResult, executeApiCall as patchBookmark, };
@@ -228,4 +228,4 @@ type MethodArg<TVersion extends AllowedVersions> = z.input<(typeof ArgSchema)[Ex
228
228
  type MethodResult<TVersion extends AllowedVersions, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = ApiResponse<TVersion>> = ClientMethod<TResult>[TMethod];
229
229
  /** executes the api call */
230
230
  declare const executeApiCall: <TVersion extends AllowedVersions, TMethod extends keyof ClientMethod>(version: TVersion, client: IHttpClient, method?: TMethod) => <TResponse = ApiResponse<ExtractApiVersion<TVersion>>, TResult = MethodResult<ExtractApiVersion<TVersion>, TMethod, TResponse>>(input: MethodArg<ExtractApiVersion<TVersion>>, init?: ClientRequestInit<IHttpClient, TResponse>) => TResult;
231
- export { AllowedVersions as CreateBookmarkVersion, MethodArg as CreateBookmarkArg, ApiResponse as CreateBookmarkResponse, MethodResult as CreateBookmarksResult, executeApiCall as createBookmark, };
231
+ export { type AllowedVersions as CreateBookmarkVersion, type MethodArg as CreateBookmarkArg, type ApiResponse as CreateBookmarkResponse, type MethodResult as CreateBookmarksResult, executeApiCall as createBookmark, };
@@ -28,4 +28,4 @@ type MethodArg<TVersion extends AllowedVersions> = z.input<(typeof ArgSchema)[Ex
28
28
  type MethodResult<TVersion extends AllowedVersions, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = ApiResponse<TVersion>> = ClientMethod<TResult>[TMethod];
29
29
  /** executes the api call */
30
30
  declare const executeApiCall: <TVersion extends AllowedVersions, TMethod extends keyof ClientMethod>(version: TVersion, client: IHttpClient, method?: TMethod) => <TResponse = ApiResponse<ExtractApiVersion<TVersion>>, TResult = MethodResult<ExtractApiVersion<TVersion>, TMethod, TResponse>>(input: MethodArg<ExtractApiVersion<TVersion>>, init?: ClientRequestInit<IHttpClient, TResponse>) => TResult;
31
- export { AllowedVersions as RemoveBookmarkFavouriteVersion, MethodArg as RemoveBookmarkFavouriteArgs, ApiResponse as RemoveBookmarkFavouriteResponse, MethodResult as RemoveBookmarkFavouriteResult, executeApiCall as removeFavoriteBookmark, };
31
+ export { type AllowedVersions as RemoveBookmarkFavouriteVersion, type MethodArg as RemoveBookmarkFavouriteArgs, type ApiResponse as RemoveBookmarkFavouriteResponse, type MethodResult as RemoveBookmarkFavouriteResult, executeApiCall as removeFavoriteBookmark, };
@@ -28,4 +28,4 @@ type MethodArg<TVersion extends AllowedVersions> = z.input<(typeof ArgSchema)[Ex
28
28
  type MethodResult<TVersion extends AllowedVersions, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = ApiResponse<TVersion>> = ClientMethod<TResult>[TMethod];
29
29
  /** executes the api call */
30
30
  declare const executeApiCall: <TVersion extends AllowedVersions, TMethod extends keyof ClientMethod>(version: TVersion, client: IHttpClient, method?: TMethod) => <TResponse = ApiResponse<ExtractApiVersion<TVersion>>, TResult = MethodResult<ExtractApiVersion<TVersion>, TMethod, TResponse>>(input: MethodArg<ExtractApiVersion<TVersion>>, init?: ClientRequestInit<IHttpClient, TResponse>) => TResult;
31
- export { AllowedVersions as IsFavoriteBookmarkVersion, MethodArg as IsFavoriteBookmarkArgs, ApiResponse as IsFavoriteBookmarkResponse, MethodResult as IsFavoriteBookmarkResult, executeApiCall as isFavoriteBookmark, };
31
+ export { type AllowedVersions as IsFavoriteBookmarkVersion, type MethodArg as IsFavoriteBookmarkArgs, type ApiResponse as IsFavoriteBookmarkResponse, type MethodResult as IsFavoriteBookmarkResult, executeApiCall as isFavoriteBookmark, };
@@ -28,4 +28,4 @@ type MethodArg<TVersion extends AllowedVersions> = z.input<(typeof ArgSchema)[Ex
28
28
  type MethodResult<TVersion extends AllowedVersions, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = ApiResponse<TVersion>> = ClientMethod<TResult>[TMethod];
29
29
  /** executes the api call */
30
30
  declare const executeApiCall: <TVersion extends AllowedVersions, TMethod extends keyof ClientMethod>(version: TVersion, client: IHttpClient, method?: TMethod) => <TResponse = ApiResponse<ExtractApiVersion<TVersion>>, TResult = MethodResult<ExtractApiVersion<TVersion>, TMethod, TResponse>>(input: MethodArg<ExtractApiVersion<TVersion>>, init?: ClientRequestInit<IHttpClient, TResponse>) => TResult;
31
- export { AllowedVersions as AddBookmarkFavouriteVersion, MethodArg as AddBookmarkFavouriteArgs, ApiResponse as AddBookmarkFavouriteResponse, MethodResult as AddBookmarkFavouriteResult, executeApiCall as addBookmarkAsFavourite, };
31
+ export { type AllowedVersions as AddBookmarkFavouriteVersion, type MethodArg as AddBookmarkFavouriteArgs, type ApiResponse as AddBookmarkFavouriteResponse, type MethodResult as AddBookmarkFavouriteResult, executeApiCall as addBookmarkAsFavourite, };
@@ -449,4 +449,4 @@ type MethodArg<TVersion extends AllowedVersions> = z.input<(typeof ArgSchema)[Ex
449
449
  type MethodResult<TVersion extends AllowedVersions, TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TResult = ApiResponse<TVersion>> = ClientMethod<TResult>[TMethod];
450
450
  /** executes the api call */
451
451
  declare const executeApiCall: <TVersion extends AllowedVersions, TMethod extends keyof ClientMethod>(version: TVersion, client: IHttpClient, method?: TMethod) => <TResponse = ApiResponse<ExtractApiVersion<TVersion>>, TResult = MethodResult<ExtractApiVersion<TVersion>, TMethod, TResponse>>(input: MethodArg<ExtractApiVersion<TVersion>>, init?: ClientRequestInit<IHttpClient, TResponse>) => TResult;
452
- export { AllowedVersions as GetBookmarksVersion, MethodArg as GetBookmarksArgs, ApiResponse as GetBookmarksResponse, MethodResult as GetBookmarksResult, executeApiCall as getBookmarks, };
452
+ export { type AllowedVersions as GetBookmarksVersion, type MethodArg as GetBookmarksArgs, type ApiResponse as GetBookmarksResponse, type MethodResult as GetBookmarksResult, executeApiCall as getBookmarks, };
@@ -1,4 +1,4 @@
1
- import { type ResponseSelector } from '@equinor/fusion-framework-module-http/selectors';
1
+ import type { ResponseSelector } from '@equinor/fusion-framework-module-http/selectors';
2
2
  /**
3
3
  * A response selector that checks the status of an HTTP response and throws an error if the response is not successful.
4
4
  *
@@ -1,5 +1,5 @@
1
1
  import type { FilterAllowedApiVersions as FilterAllowApiVersionsBase, ExtractApiVersion as ExtractApiVersionBase } from '../types';
2
- import { ApiVersion } from './api-version';
2
+ import type { ApiVersion } from './api-version';
3
3
  export { ClientMethodType, ClientMethod, ApiClientArguments } from '../types';
4
4
  export type FilterAllowedApiVersions<TAllowed extends string = keyof typeof ApiVersion> = FilterAllowApiVersionsBase<typeof ApiVersion, TAllowed>;
5
5
  export type ExtractApiVersion<TVersion extends string, TAllowed extends string = FilterAllowedApiVersions> = ExtractApiVersionBase<typeof ApiVersion, TVersion, TAllowed>;
@@ -1,4 +1,4 @@
1
- import { ApiClientFactory } from './types';
1
+ import type { ApiClientFactory } from './types';
2
2
  export interface IApiConfigurator {
3
3
  /** Method for creating IHttpClients */
4
4
  createClient?: ApiClientFactory;
@@ -1,9 +1,9 @@
1
- import { IHttpClient } from '@equinor/fusion-framework-module-http';
1
+ import type { IHttpClient } from '@equinor/fusion-framework-module-http';
2
2
  import type { ClientMethod } from './types';
3
3
  import { ApiVersion } from './static';
4
- import { GetContextFn, GetContextResponse, GetContextResult } from './get';
5
- import { QueryContextFn, QueryContextResponse, QueryContextResult } from './query';
6
- import { RelatedContextFn, RelatedContextResponse, RelatedContextResult } from './related';
4
+ import { type GetContextFn, type GetContextResponse, type GetContextResult } from './get';
5
+ import { type QueryContextFn, type QueryContextResponse, type QueryContextResult } from './query';
6
+ import { type RelatedContextFn, type RelatedContextResponse, type RelatedContextResult } from './related';
7
7
  export declare class ContextApiClient<TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TClient extends IHttpClient = IHttpClient> {
8
8
  protected _client: TClient;
9
9
  protected _method: TMethod;
@@ -1,4 +1,5 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ApiVersion } from '..';
2
3
  import type { ClientMethod, GetContextArgs, GetContextResponse, GetContextResult } from './types';
3
4
  /**
4
5
  * Method for fetching context item from context service
@@ -6,5 +7,5 @@ import type { ClientMethod, GetContextArgs, GetContextResponse, GetContextResult
6
7
  * @param version - version of API to call
7
8
  * @param method - client method to call
8
9
  */
9
- export declare const getContext: <TVersion extends string = "v1" | "v2", TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(client: TClient, version: TVersion, method?: TMethod) => <T = GetContextResponse<TVersion>>(args: GetContextArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => GetContextResult<TVersion, TMethod, T>;
10
+ export declare const getContext: <TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient>(client: TClient, version: TVersion, method?: TMethod) => <T = GetContextResponse<TVersion>>(args: GetContextArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => GetContextResult<TVersion, TMethod, T>;
10
11
  export default getContext;
@@ -1,5 +1,6 @@
1
+ import { ApiVersion } from '..';
1
2
  import type { GetContextArgs } from './types';
2
3
  /**
3
4
  * Method for generating endpoint for getting context by id
4
5
  */
5
- export declare const generateEndpoint: <TVersion extends string = "v1" | "v2">(version: TVersion, args: GetContextArgs<TVersion>) => string;
6
+ export declare const generateEndpoint: <TVersion extends string = keyof typeof ApiVersion>(version: TVersion, args: GetContextArgs<TVersion>) => string;
@@ -1,5 +1,6 @@
1
1
  import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ApiVersion } from '..';
2
3
  import type { ApiClientArguments, GetContextArgs } from './types';
3
4
  /** function for creating http client arguments */
4
- export declare const generateParameters: <TResult, TVersion extends string = "v1" | "v2", TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(version: TVersion, args: GetContextArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
5
+ export declare const generateParameters: <TResult, TVersion extends string = keyof typeof ApiVersion, TClient extends IHttpClient = IHttpClient>(version: TVersion, args: GetContextArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
5
6
  export default generateParameters;
@@ -1,5 +1,5 @@
1
- import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
- import { ApiVersion, ApiContextEntity, ClientMethod } from '..';
1
+ import type { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import { ApiVersion, type ApiContextEntity, type ClientMethod } from '..';
3
3
  export { ApiClientArguments, ClientMethod } from '..';
4
4
  type GetContextArgs_v1 = {
5
5
  id: string;
@@ -1,4 +1,5 @@
1
1
  export { ContextApiClient, default } from './client';
2
2
  export { ApiVersion } from './static';
3
+ export { ApiContextEntity } from './api-models';
3
4
  export * from './api-models';
4
5
  export * from './types';
@@ -1,7 +1,8 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ApiVersion } from '..';
2
3
  import type { QueryContextArgs, QueryContextResponse, QueryContextResult, ClientMethod } from './types';
3
4
  /**
4
5
  * Function for querying the context service
5
6
  */
6
- export declare const queryContext: <TVersion extends string = "v1" | "v2", TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(client: TClient, version: TVersion, method?: TMethod) => <T = QueryContextResponse<TVersion>>(args: QueryContextArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => QueryContextResult<TVersion, TMethod, T>;
7
+ export declare const queryContext: <TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient>(client: TClient, version: TVersion, method?: TMethod) => <T = QueryContextResponse<TVersion>>(args: QueryContextArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => QueryContextResult<TVersion, TMethod, T>;
7
8
  export default queryContext;
@@ -1,3 +1,13 @@
1
+ import { ApiVersion } from '..';
1
2
  import type { QueryContextArgs } from './types';
2
- export declare const generateEndpoint: <TVersion extends string = "v1" | "v2">(version: TVersion, args: QueryContextArgs<TVersion>) => string;
3
+ /**
4
+ * Generates an endpoint URL based on the provided API version and query context arguments.
5
+ *
6
+ * @template TVersion - The type of the API version, defaults to the keys of `ApiVersion`.
7
+ * @param version - The API version to use for generating the endpoint.
8
+ * @param args - The query context arguments specific to the provided API version.
9
+ * @returns The generated endpoint URL as a string.
10
+ * @throws {UnsupportedApiVersion} If the provided API version is not supported.
11
+ */
12
+ export declare const generateEndpoint: <TVersion extends string = keyof typeof ApiVersion>(version: TVersion, args: QueryContextArgs<TVersion>) => string;
3
13
  export default generateEndpoint;
@@ -1,5 +1,6 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ApiVersion } from '..';
2
3
  import type { QueryContextArgs, ApiClientArguments } from './types';
3
4
  /** Function for generating parameter for querying context service */
4
- export declare const generateParameters: <TResult, TVersion extends string = "v1" | "v2", TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(version: TVersion, args: QueryContextArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
5
+ export declare const generateParameters: <TResult, TVersion extends string = keyof typeof ApiVersion, TClient extends IHttpClient = IHttpClient>(version: TVersion, args: QueryContextArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
5
6
  export default generateParameters;
@@ -1,5 +1,5 @@
1
- import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
- import { ApiVersion, ApiContextEntity, ClientMethod } from '..';
1
+ import type { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import { ApiVersion, type ApiContextEntity, type ClientMethod } from '..';
3
3
  export { ApiClientArguments, ClientMethod } from '..';
4
4
  export type QueryContextOdataFilter = {
5
5
  type?: string[];
@@ -1,7 +1,8 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ApiVersion } from '..';
2
3
  import type { RelatedContextArgs, RelatedContextResponse, RelatedContextResult, ClientMethod } from './types';
3
4
  /**
4
5
  * Function for querying the context service
5
6
  */
6
- export declare const relatedContexts: <TVersion extends string = "v1" | "v2", TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(client: TClient, version: TVersion, method?: TMethod) => <T = RelatedContextResponse<TVersion>>(args: RelatedContextArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => RelatedContextResult<TVersion, TMethod, T>;
7
+ export declare const relatedContexts: <TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient>(client: TClient, version: TVersion, method?: TMethod) => <T = RelatedContextResponse<TVersion>>(args: RelatedContextArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => RelatedContextResult<TVersion, TMethod, T>;
7
8
  export default relatedContexts;
@@ -1,3 +1,13 @@
1
+ import { ApiVersion } from '..';
1
2
  import type { RelatedContextArgs } from './types';
2
- export declare const generateEndpoint: <TVersion extends string = "v1" | "v2">(version: TVersion, args: RelatedContextArgs<TVersion>) => string;
3
+ /**
4
+ * Generates an endpoint URL based on the provided API version and arguments.
5
+ *
6
+ * @template TVersion - The type of the API version, defaults to the keys of `ApiVersion`.
7
+ * @param version - The API version to use for generating the endpoint.
8
+ * @param args - The arguments required to generate the endpoint, including `id` and `query`.
9
+ * @returns The generated endpoint URL as a string.
10
+ * @throws {UnsupportedApiVersion} If the provided API version is not supported.
11
+ */
12
+ export declare const generateEndpoint: <TVersion extends string = keyof typeof ApiVersion>(version: TVersion, args: RelatedContextArgs<TVersion>) => string;
3
13
  export default generateEndpoint;
@@ -1,5 +1,6 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ApiVersion } from '..';
2
3
  import type { RelatedContextArgs, ApiClientArguments } from './types';
3
4
  /** Function for generating parameter for querying context service */
4
- export declare const generateParameters: <TResult, TVersion extends string = "v1" | "v2", TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(version: TVersion, args: RelatedContextArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
5
+ export declare const generateParameters: <TResult, TVersion extends string = keyof typeof ApiVersion, TClient extends IHttpClient = IHttpClient>(version: TVersion, args: RelatedContextArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
5
6
  export default generateParameters;
@@ -1,5 +1,5 @@
1
- import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
- import { ApiVersion, ApiContextEntity, ClientMethod } from '..';
1
+ import type { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import { ApiVersion, type ApiContextEntity, type ClientMethod } from '..';
3
3
  export { ApiClientArguments, ClientMethod } from '..';
4
4
  export type ApiRelatedContextEntity<T extends ApiVersion> = ApiContextEntity<T> & {
5
5
  relationSource: string;
@@ -1,6 +1,6 @@
1
1
  /** index of api versions of context service */
2
2
  export declare enum ApiVersion {
3
- 'v1' = "1.0",
3
+ v1 = "1.0",
4
4
  /** not in use atm */
5
- 'v2' = "2.0"
5
+ v2 = "2.0"
6
6
  }
@@ -1,8 +1,8 @@
1
1
  import type { IModuleConfigurator, IModulesConfigurator, Module } from '@equinor/fusion-framework-module';
2
2
  import type { HttpModule } from '@equinor/fusion-framework-module-http';
3
3
  import type { ServiceDiscoveryModule } from '@equinor/fusion-framework-module-service-discovery';
4
- import { IApiConfigurator } from './configurator';
5
- import { IApiProvider } from './provider';
4
+ import { type IApiConfigurator } from './configurator';
5
+ import { type IApiProvider } from './provider';
6
6
  export type ServicesModuleKey = 'services';
7
7
  export declare const moduleKey: ServicesModuleKey;
8
8
  export type ServicesModule = Module<ServicesModuleKey, IApiProvider, IApiConfigurator, [
@@ -1,13 +1,13 @@
1
- import { IHttpClient } from '@equinor/fusion-framework-module-http';
2
- import { ClientMethod } from '../types';
3
- import { GetNotificationFn, GetNotificationResult } from './notification/get';
1
+ import type { IHttpClient } from '@equinor/fusion-framework-module-http';
2
+ import type { ClientMethod } from '../types';
3
+ import type { GetNotificationFn, GetNotificationResult } from './notification/get';
4
4
  import { ApiVersion } from './static';
5
- import { PatchNotificationFn, PatchNotificationResult } from './notification/patch';
6
- import { GetNotificationsFn, GetNotificationsResult } from './notification/getAll';
7
- import { PostNotificationResult, PostNotificationFn } from './notification/post';
8
- import { DeleteNotificationFn, DeleteNotificationResult } from './notification/delete';
9
- import { PutUserNotificationSettingsFn, PutUserNotificationSettingsResult } from './settings/put';
10
- import { GetUserNotificationSettingsFn, GetUserNotificationsSettingsResult } from './settings/get';
5
+ import type { PatchNotificationFn, PatchNotificationResult } from './notification/patch';
6
+ import type { GetNotificationsFn, GetNotificationsResult } from './notification/getAll';
7
+ import type { PostNotificationResult, PostNotificationFn } from './notification/post';
8
+ import type { DeleteNotificationFn, DeleteNotificationResult } from './notification/delete';
9
+ import { type PutUserNotificationSettingsFn, type PutUserNotificationSettingsResult } from './settings/put';
10
+ import { type GetUserNotificationSettingsFn, type GetUserNotificationsSettingsResult } from './settings/get';
11
11
  export declare class NotificationApiClient<TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>, TClient extends IHttpClient = IHttpClient> {
12
12
  protected _client: TClient;
13
13
  protected _method: TMethod;
@@ -1,5 +1,6 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiVersion } from '../../static';
3
4
  import type { DeleteNotificationArgs, DeleteNotificationResponse, DeleteNotificationResult } from './types';
4
5
  /**
5
6
  * Method for deleting notification item from notifications service
@@ -7,5 +8,5 @@ import type { DeleteNotificationArgs, DeleteNotificationResponse, DeleteNotifica
7
8
  * @param version - version of API to call
8
9
  * @param method - client method to call
9
10
  */
10
- export declare const deleteNotification: <TVersion extends string = "v1" | "v2", TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(client: TClient, version: TVersion, method?: TMethod) => <T = DeleteNotificationResponse<TVersion>>(args: DeleteNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => DeleteNotificationResult<TVersion, TMethod, T>;
11
+ export declare const deleteNotification: <TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient>(client: TClient, version: TVersion, method?: TMethod) => <T = DeleteNotificationResponse<TVersion>>(args: DeleteNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => DeleteNotificationResult<TVersion, TMethod, T>;
11
12
  export default deleteNotification;
@@ -1,5 +1,6 @@
1
+ import { ApiVersion } from '../..';
1
2
  import type { DeleteNotificationArgs } from './types';
2
3
  /**
3
4
  * Method for generating endpoint for getting notification by id
4
5
  */
5
- export declare const generateEndpoint: <TVersion extends string = "v1" | "v2">(version: TVersion, args: DeleteNotificationArgs<TVersion>) => string;
6
+ export declare const generateEndpoint: <TVersion extends string = keyof typeof ApiVersion>(version: TVersion, args: DeleteNotificationArgs<TVersion>) => string;
@@ -1,6 +1,7 @@
1
1
  import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
- import { ApiClientArguments } from '../../types';
3
- import { DeleteNotificationArgs } from './types';
2
+ import type { ApiVersion } from '../../static';
3
+ import type { ApiClientArguments } from '../../types';
4
+ import type { DeleteNotificationArgs } from './types';
4
5
  /** function for creating http client arguments */
5
- export declare const generateParameters: <TResult, TVersion extends string = "v1" | "v2", TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(version: TVersion, args: DeleteNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
6
+ export declare const generateParameters: <TResult, TVersion extends string = keyof typeof ApiVersion, TClient extends IHttpClient = IHttpClient>(version: TVersion, args: DeleteNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
6
7
  export default generateParameters;
@@ -1,6 +1,6 @@
1
- import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
3
- import { ApiNotificationEntity } from '../../api-models';
1
+ import type { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiNotificationEntity } from '../../api-models';
4
4
  import { ApiVersion } from '../../static';
5
5
  type DeleteNotificationArgs_v1 = {
6
6
  id: string;
@@ -1,5 +1,6 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiVersion } from '../../static';
3
4
  import type { GetNotificationArgs, GetNotificationResult, GetNotificationResponse } from './types';
4
5
  /**
5
6
  * Method for fetching a notification item from notifications service
@@ -7,5 +8,5 @@ import type { GetNotificationArgs, GetNotificationResult, GetNotificationRespons
7
8
  * @param version - version of API to call
8
9
  * @param method - client method to call
9
10
  */
10
- export declare const getNotificationById: <TVersion extends string = "v1" | "v2", TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(client: TClient, version: TVersion, method?: TMethod) => <T = GetNotificationResponse<TVersion>>(args: GetNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => GetNotificationResult<TVersion, TMethod, T>;
11
+ export declare const getNotificationById: <TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient>(client: TClient, version: TVersion, method?: TMethod) => <T = GetNotificationResponse<TVersion>>(args: GetNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => GetNotificationResult<TVersion, TMethod, T>;
11
12
  export default getNotificationById;
@@ -1,5 +1,6 @@
1
+ import { ApiVersion } from '../..';
1
2
  import type { GetNotificationArgs } from './types';
2
3
  /**
3
4
  * Method for generating endpoint for getting notification by id
4
5
  */
5
- export declare const generateEndpoint: <TVersion extends string = "v1" | "v2">(version: TVersion, args: GetNotificationArgs<TVersion>) => string;
6
+ export declare const generateEndpoint: <TVersion extends string = keyof typeof ApiVersion>(version: TVersion, args: GetNotificationArgs<TVersion>) => string;
@@ -1,6 +1,7 @@
1
1
  import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
- import { ApiClientArguments } from '../../types';
3
- import { GetNotificationArgs } from './types';
2
+ import type { ApiVersion } from '../../static';
3
+ import type { ApiClientArguments } from '../../types';
4
+ import type { GetNotificationArgs } from './types';
4
5
  /** function for creating http client arguments */
5
- export declare const generateParameters: <TResult, TVersion extends string = "v1" | "v2", TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(version: TVersion, args: GetNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
6
+ export declare const generateParameters: <TResult, TVersion extends string = keyof typeof ApiVersion, TClient extends IHttpClient = IHttpClient>(version: TVersion, args: GetNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
6
7
  export default generateParameters;
@@ -1,6 +1,6 @@
1
- import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
3
- import { ApiNotificationEntity } from '../../api-models';
1
+ import type { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiNotificationEntity } from '../../api-models';
4
4
  import { ApiVersion } from '../../static';
5
5
  type GetNotificationArgs_v1 = {
6
6
  id: string;
@@ -1,5 +1,6 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiVersion } from '../../static';
3
4
  import type { GetNotificationsArgs, GetNotificationsResult, GetNotificationsResponse } from './types';
4
5
  /**
5
6
  * Method for fetching all notifications item from notification service
@@ -7,5 +8,5 @@ import type { GetNotificationsArgs, GetNotificationsResult, GetNotificationsResp
7
8
  * @param version - version of API to call
8
9
  * @param method - client method to call
9
10
  */
10
- export declare const getNotifications: <TVersion extends string = "v1" | "v2", TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(client: TClient, version: TVersion, method?: TMethod) => <T = GetNotificationsResponse<TVersion>>(args: GetNotificationsArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => GetNotificationsResult<TVersion, TMethod, T>;
11
+ export declare const getNotifications: <TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient>(client: TClient, version: TVersion, method?: TMethod) => <T = GetNotificationsResponse<TVersion>>(args: GetNotificationsArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => GetNotificationsResult<TVersion, TMethod, T>;
11
12
  export default getNotifications;
@@ -1,5 +1,6 @@
1
+ import { ApiVersion } from '../..';
1
2
  import type { GetNotificationsArgs } from './types';
2
3
  /**
3
4
  * Method for generating endpoint for getting all notifications
4
5
  */
5
- export declare const generateEndpoint: <TVersion extends string = "v1" | "v2">(version: TVersion, args: GetNotificationsArgs<TVersion>) => string;
6
+ export declare const generateEndpoint: <TVersion extends string = keyof typeof ApiVersion>(version: TVersion, args: GetNotificationsArgs<TVersion>) => string;
@@ -1,6 +1,7 @@
1
1
  import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
- import { ApiClientArguments } from '../../types';
3
- import { GetNotificationsArgs } from './types';
2
+ import type { ApiVersion } from '../../static';
3
+ import type { ApiClientArguments } from '../../types';
4
+ import type { GetNotificationsArgs } from './types';
4
5
  /** function for creating http client arguments */
5
- export declare const generateParameters: <TResult, TVersion extends string = "v1" | "v2", TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(version: TVersion, args: GetNotificationsArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
6
+ export declare const generateParameters: <TResult, TVersion extends string = keyof typeof ApiVersion, TClient extends IHttpClient = IHttpClient>(version: TVersion, args: GetNotificationsArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
6
7
  export default generateParameters;
@@ -1,6 +1,6 @@
1
- import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
3
- import { ApiNotificationEntity } from '../../api-models';
1
+ import type { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiNotificationEntity } from '../../api-models';
4
4
  import { ApiVersion } from '../../static';
5
5
  type GetNotificationsArgs_v1 = {
6
6
  userId: string;
@@ -1,5 +1,6 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiVersion } from '../../static';
3
4
  import type { PatchNotificationArgs, PatchNotificationResponse, PatchNotificationResult } from './types';
4
5
  /**
5
6
  * Method for updating a notification item
@@ -7,5 +8,5 @@ import type { PatchNotificationArgs, PatchNotificationResponse, PatchNotificatio
7
8
  * @param version - version of API to call
8
9
  * @param method - client method to call
9
10
  */
10
- export declare const updateSeenByUser: <TVersion extends string = "v1" | "v2", TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(client: TClient, version: TVersion, method?: TMethod) => <T = PatchNotificationResponse<TVersion>>(args: PatchNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => PatchNotificationResult<TVersion, TMethod, T>;
11
+ export declare const updateSeenByUser: <TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient>(client: TClient, version: TVersion, method?: TMethod) => <T = PatchNotificationResponse<TVersion>>(args: PatchNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => PatchNotificationResult<TVersion, TMethod, T>;
11
12
  export default updateSeenByUser;
@@ -1,5 +1,6 @@
1
+ import { ApiVersion } from '../..';
1
2
  import type { PatchNotificationArgs } from './types';
2
3
  /**
3
4
  * Method for generating endpoint for getting notification by id
4
5
  */
5
- export declare const generateEndpoint: <TVersion extends string = "v1" | "v2">(version: TVersion, args: PatchNotificationArgs<TVersion>) => string;
6
+ export declare const generateEndpoint: <TVersion extends string = keyof typeof ApiVersion>(version: TVersion, args: PatchNotificationArgs<TVersion>) => string;
@@ -1,6 +1,7 @@
1
1
  import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
- import { ApiClientArguments } from '../../types';
3
- import { PatchNotificationArgs } from './types';
2
+ import type { ApiVersion } from '../../static';
3
+ import type { ApiClientArguments } from '../../types';
4
+ import type { PatchNotificationArgs } from './types';
4
5
  /** function for creating http client arguments */
5
- export declare const generateParameters: <TResult, TVersion extends string = "v1" | "v2", TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(version: TVersion, args: PatchNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
6
+ export declare const generateParameters: <TResult, TVersion extends string = keyof typeof ApiVersion, TClient extends IHttpClient = IHttpClient>(version: TVersion, args: PatchNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, TResult>) => ApiClientArguments<TClient, TResult>;
6
7
  export default generateParameters;
@@ -1,6 +1,6 @@
1
- import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
3
- import { ApiNotificationEntity } from '../../api-models';
1
+ import type { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiNotificationEntity } from '../../api-models';
4
4
  import { ApiVersion } from '../../static';
5
5
  type PatchNotificationArgs_v1 = {
6
6
  id: string;
@@ -1,5 +1,6 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiVersion } from '../../static';
3
4
  import type { PostNotificationArgs, PostNotificationResult, PostNotificationResponse } from './types';
4
5
  /**
5
6
  * Method for creating a notification item
@@ -7,5 +8,5 @@ import type { PostNotificationArgs, PostNotificationResult, PostNotificationResp
7
8
  * @param version - version of API to call
8
9
  * @param method - client method to call
9
10
  */
10
- export declare const createNotification: <TVersion extends string = "v1" | "v2", TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient<import("@equinor/fusion-framework-module-http/client").FetchRequest, Response>>(client: TClient, version: TVersion, method?: TMethod) => <T = PostNotificationResponse<TVersion>>(args: PostNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => PostNotificationResult<TVersion, TMethod, T>;
11
+ export declare const createNotification: <TVersion extends string = keyof typeof ApiVersion, TMethod extends keyof ClientMethod = keyof ClientMethod, TClient extends IHttpClient = IHttpClient>(client: TClient, version: TVersion, method?: TMethod) => <T = PostNotificationResponse<TVersion>>(args: PostNotificationArgs<TVersion>, init?: ClientRequestInit<TClient, T>) => PostNotificationResult<TVersion, TMethod, T>;
11
12
  export default createNotification;