@equinor/fusion-framework-module-services 3.1.3 → 3.1.4

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 (169) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/dist/esm/bookmarks/client.js.map +1 -1
  4. package/dist/esm/context/client.js +1 -1
  5. package/dist/esm/context/client.js.map +1 -1
  6. package/dist/esm/context/get/generate-endpoint.js +2 -2
  7. package/dist/esm/context/get/generate-endpoint.js.map +1 -1
  8. package/dist/esm/context/get/index.js +1 -1
  9. package/dist/esm/context/get/index.js.map +1 -1
  10. package/dist/esm/context/get/types.js +1 -1
  11. package/dist/esm/context/get/types.js.map +1 -1
  12. package/dist/esm/context/query/generate-endpoint.js +2 -2
  13. package/dist/esm/context/query/generate-endpoint.js.map +1 -1
  14. package/dist/esm/context/query/index.js +1 -1
  15. package/dist/esm/context/query/index.js.map +1 -1
  16. package/dist/esm/context/query/types.js +1 -1
  17. package/dist/esm/context/query/types.js.map +1 -1
  18. package/dist/esm/context/related/generate-endpoint.js +2 -2
  19. package/dist/esm/context/related/generate-endpoint.js.map +1 -1
  20. package/dist/esm/context/related/index.js +1 -1
  21. package/dist/esm/context/related/index.js.map +1 -1
  22. package/dist/esm/context/related/types.js +1 -1
  23. package/dist/esm/context/related/types.js.map +1 -1
  24. package/dist/esm/errors.js.map +1 -1
  25. package/dist/esm/notification/client.js.map +1 -1
  26. package/dist/esm/notification/notification/delete/generate-endpoint.js +2 -2
  27. package/dist/esm/notification/notification/delete/generate-endpoint.js.map +1 -1
  28. package/dist/esm/notification/notification/delete/index.js +1 -1
  29. package/dist/esm/notification/notification/delete/index.js.map +1 -1
  30. package/dist/esm/notification/notification/get/generate-endpoint.js +2 -2
  31. package/dist/esm/notification/notification/get/generate-endpoint.js.map +1 -1
  32. package/dist/esm/notification/notification/get/index.js +1 -1
  33. package/dist/esm/notification/notification/get/index.js.map +1 -1
  34. package/dist/esm/notification/notification/getAll/generate-endpoint.js +2 -2
  35. package/dist/esm/notification/notification/getAll/generate-endpoint.js.map +1 -1
  36. package/dist/esm/notification/notification/getAll/index.js +1 -1
  37. package/dist/esm/notification/notification/getAll/index.js.map +1 -1
  38. package/dist/esm/notification/notification/patch/generate-endpoint.js +2 -2
  39. package/dist/esm/notification/notification/patch/generate-endpoint.js.map +1 -1
  40. package/dist/esm/notification/notification/patch/index.js +1 -1
  41. package/dist/esm/notification/notification/patch/index.js.map +1 -1
  42. package/dist/esm/notification/notification/post/generate-endpoint.js +2 -2
  43. package/dist/esm/notification/notification/post/generate-endpoint.js.map +1 -1
  44. package/dist/esm/notification/notification/post/index.js +1 -1
  45. package/dist/esm/notification/notification/post/index.js.map +1 -1
  46. package/dist/esm/notification/settings/get/generate-endpoint.js +2 -2
  47. package/dist/esm/notification/settings/get/generate-endpoint.js.map +1 -1
  48. package/dist/esm/notification/settings/get/index.js +1 -1
  49. package/dist/esm/notification/settings/get/index.js.map +1 -1
  50. package/dist/esm/notification/settings/put/generate-endpoint.js +2 -2
  51. package/dist/esm/notification/settings/put/generate-endpoint.js.map +1 -1
  52. package/dist/esm/notification/settings/put/index.js +1 -1
  53. package/dist/esm/notification/settings/put/index.js.map +1 -1
  54. package/dist/esm/version.js +2 -0
  55. package/dist/esm/version.js.map +1 -0
  56. package/dist/tsconfig.tsbuildinfo +1 -1
  57. package/dist/types/bookmarks/client.d.ts +1 -1
  58. package/dist/types/bookmarks/types.d.ts +1 -1
  59. package/dist/types/context/client.d.ts +2 -1
  60. package/dist/types/context/get/index.d.ts +1 -1
  61. package/dist/types/context/get/types.d.ts +2 -2
  62. package/dist/types/context/query/index.d.ts +1 -1
  63. package/dist/types/context/query/types.d.ts +2 -2
  64. package/dist/types/context/related/index.d.ts +1 -1
  65. package/dist/types/context/related/types.d.ts +2 -2
  66. package/dist/types/context/types.d.ts +1 -1
  67. package/dist/types/notification/notification/delete/index.d.ts +1 -1
  68. package/dist/types/notification/notification/get/index.d.ts +1 -1
  69. package/dist/types/notification/notification/getAll/index.d.ts +1 -1
  70. package/dist/types/notification/notification/patch/index.d.ts +1 -1
  71. package/dist/types/notification/notification/post/index.d.ts +1 -1
  72. package/dist/types/notification/settings/get/index.d.ts +1 -1
  73. package/dist/types/notification/settings/put/index.d.ts +1 -1
  74. package/dist/types/notification/types.d.ts +1 -1
  75. package/dist/types/version.d.ts +1 -0
  76. package/package.json +67 -68
  77. package/src/bookmarks/client.ts +7 -4
  78. package/src/bookmarks/delete/client.ts +4 -4
  79. package/src/bookmarks/delete/generate-endpoint.ts +1 -1
  80. package/src/bookmarks/delete/generate-parameters.ts +3 -3
  81. package/src/bookmarks/delete/types.ts +3 -3
  82. package/src/bookmarks/favorites/delete/client.ts +4 -4
  83. package/src/bookmarks/favorites/delete/generate-endpoint.ts +1 -1
  84. package/src/bookmarks/favorites/delete/generate-parameters.ts +3 -3
  85. package/src/bookmarks/favorites/delete/types.ts +3 -3
  86. package/src/bookmarks/favorites/head/client.ts +4 -4
  87. package/src/bookmarks/favorites/head/generate-endpoint.ts +1 -1
  88. package/src/bookmarks/favorites/head/generate-parameters.ts +3 -3
  89. package/src/bookmarks/favorites/head/types.ts +3 -3
  90. package/src/bookmarks/favorites/post/client.ts +4 -4
  91. package/src/bookmarks/favorites/post/generate-endpoint.ts +1 -1
  92. package/src/bookmarks/favorites/post/generate-parameters.ts +3 -3
  93. package/src/bookmarks/favorites/post/types.ts +3 -3
  94. package/src/bookmarks/get/client.ts +4 -4
  95. package/src/bookmarks/get/generate-endpoint.ts +1 -1
  96. package/src/bookmarks/get/generate-parameters.ts +2 -2
  97. package/src/bookmarks/get/types.ts +4 -4
  98. package/src/bookmarks/getAll/client.ts +4 -4
  99. package/src/bookmarks/getAll/generate-parameters.ts +2 -2
  100. package/src/bookmarks/getAll/types.ts +2 -2
  101. package/src/bookmarks/patch/client.ts +4 -4
  102. package/src/bookmarks/patch/generate-endpoint.ts +1 -1
  103. package/src/bookmarks/patch/generate-parameters.ts +3 -3
  104. package/src/bookmarks/patch/types.ts +5 -5
  105. package/src/bookmarks/post/client.ts +4 -4
  106. package/src/bookmarks/post/generate-endpoint.ts +1 -1
  107. package/src/bookmarks/post/generate-parameters.ts +3 -3
  108. package/src/bookmarks/post/types.ts +5 -5
  109. package/src/bookmarks/types.ts +1 -5
  110. package/src/context/client.ts +10 -6
  111. package/src/context/get/client.ts +5 -5
  112. package/src/context/get/generate-endpoint.ts +3 -3
  113. package/src/context/get/generate-parameters.ts +3 -3
  114. package/src/context/get/index.ts +1 -1
  115. package/src/context/get/types.ts +5 -12
  116. package/src/context/query/client.ts +5 -5
  117. package/src/context/query/generate-endpoint.ts +3 -3
  118. package/src/context/query/generate-parameters.ts +3 -3
  119. package/src/context/query/index.ts +1 -1
  120. package/src/context/query/types.ts +5 -12
  121. package/src/context/related/client.ts +5 -5
  122. package/src/context/related/generate-endpoint.ts +3 -3
  123. package/src/context/related/generate-parameters.ts +3 -3
  124. package/src/context/related/index.ts +1 -1
  125. package/src/context/related/types.ts +5 -12
  126. package/src/context/types.ts +1 -5
  127. package/src/errors.ts +4 -1
  128. package/src/module.ts +3 -3
  129. package/src/notification/client.ts +19 -16
  130. package/src/notification/notification/delete/client.ts +4 -4
  131. package/src/notification/notification/delete/generate-endpoint.ts +3 -3
  132. package/src/notification/notification/delete/generate-parameters.ts +3 -3
  133. package/src/notification/notification/delete/index.ts +1 -1
  134. package/src/notification/notification/delete/types.ts +3 -3
  135. package/src/notification/notification/get/client.ts +4 -4
  136. package/src/notification/notification/get/generate-endpoint.ts +3 -3
  137. package/src/notification/notification/get/generate-parameters.ts +2 -2
  138. package/src/notification/notification/get/index.ts +1 -1
  139. package/src/notification/notification/get/types.ts +3 -3
  140. package/src/notification/notification/getAll/client.ts +4 -4
  141. package/src/notification/notification/getAll/generate-endpoint.ts +3 -3
  142. package/src/notification/notification/getAll/generate-parameters.ts +2 -2
  143. package/src/notification/notification/getAll/index.ts +1 -1
  144. package/src/notification/notification/getAll/types.ts +3 -3
  145. package/src/notification/notification/patch/client.ts +4 -4
  146. package/src/notification/notification/patch/generate-endpoint.ts +3 -3
  147. package/src/notification/notification/patch/generate-parameters.ts +3 -3
  148. package/src/notification/notification/patch/index.ts +1 -1
  149. package/src/notification/notification/patch/types.ts +3 -3
  150. package/src/notification/notification/post/client.ts +4 -4
  151. package/src/notification/notification/post/generate-endpoint.ts +3 -3
  152. package/src/notification/notification/post/generate-parameters.ts +3 -3
  153. package/src/notification/notification/post/index.ts +1 -1
  154. package/src/notification/notification/post/types.ts +3 -3
  155. package/src/notification/settings/get/client.ts +4 -4
  156. package/src/notification/settings/get/generate-endpoint.ts +3 -3
  157. package/src/notification/settings/get/generate-parameters.ts +2 -2
  158. package/src/notification/settings/get/index.ts +1 -1
  159. package/src/notification/settings/get/types.ts +3 -3
  160. package/src/notification/settings/put/client.ts +4 -4
  161. package/src/notification/settings/put/generate-endpoint.ts +3 -3
  162. package/src/notification/settings/put/generate-parameters.ts +3 -3
  163. package/src/notification/settings/put/index.ts +1 -1
  164. package/src/notification/settings/put/types.ts +3 -3
  165. package/src/notification/types.ts +1 -5
  166. package/src/provider.ts +6 -6
  167. package/src/types.ts +2 -2
  168. package/src/version.ts +2 -0
  169. package/tsconfig.json +1 -1
@@ -1,5 +1,5 @@
1
- import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
2
- import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
1
+ import { UnsupportedApiVersion } from '../../../errors';
2
+ import { ApiVersion } from '../..';
3
3
 
4
4
  import type { PostNotificationArgs } from './types';
5
5
 
@@ -8,7 +8,7 @@ import type { PostNotificationArgs } from './types';
8
8
  */
9
9
  export const generateEndpoint = <TVersion extends string = keyof typeof ApiVersion>(
10
10
  version: TVersion,
11
- args: PostNotificationArgs<TVersion>
11
+ args: PostNotificationArgs<TVersion>,
12
12
  ) => {
13
13
  const apiVersion = ApiVersion[version as keyof typeof ApiVersion] ?? version;
14
14
  switch (apiVersion) {
@@ -9,11 +9,11 @@ import { PostNotificationArgs } from './types';
9
9
  export const generateParameters = <
10
10
  TResult,
11
11
  TVersion extends string = keyof typeof ApiVersion,
12
- TClient extends IHttpClient = IHttpClient
12
+ TClient extends IHttpClient = IHttpClient,
13
13
  >(
14
14
  version: TVersion,
15
15
  args: PostNotificationArgs<TVersion>,
16
- init?: ClientRequestInit<TClient, TResult>
16
+ init?: ClientRequestInit<TClient, TResult>,
17
17
  ): ApiClientArguments<TClient, TResult> => {
18
18
  const path = generateEndpoint(version, args);
19
19
 
@@ -23,7 +23,7 @@ export const generateParameters = <
23
23
  const requestParams: ClientRequestInit<TClient, TResult> = Object.assign(
24
24
  {},
25
25
  { method: 'post', body: JSON.stringify(args), headers: headers },
26
- init
26
+ init,
27
27
  );
28
28
 
29
29
  return [path, requestParams];
@@ -1,4 +1,4 @@
1
- export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
1
+ export { ApiVersion } from '../..';
2
2
 
3
3
  export { generateEndpoint } from './generate-endpoint';
4
4
  export { generateParameters } from './generate-parameters';
@@ -44,14 +44,14 @@ export type PostNotificationFn<
44
44
  TVersion extends string = keyof typeof ApiVersion,
45
45
  TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
46
46
  TClient extends IHttpClient = IHttpClient,
47
- TResult = PostNotificationResponse<TVersion>
47
+ TResult = PostNotificationResponse<TVersion>,
48
48
  > = (
49
49
  args: PostNotificationArgs<TVersion>,
50
- init?: ClientRequestInit<TClient, TResult>
50
+ init?: ClientRequestInit<TClient, TResult>,
51
51
  ) => PostNotificationResult<TVersion, TMethod, TResult>;
52
52
 
53
53
  export type PostNotificationResult<
54
54
  TVersion extends string = keyof typeof ApiVersion,
55
55
  TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
56
- TResult = PostNotificationResponse<TVersion>
56
+ TResult = PostNotificationResponse<TVersion>,
57
57
  > = ClientMethod<TResult>[TMethod];
@@ -20,18 +20,18 @@ export const getUserNotificationSettings =
20
20
  <
21
21
  TVersion extends string = keyof typeof ApiVersion,
22
22
  TMethod extends keyof ClientMethod = keyof ClientMethod,
23
- TClient extends IHttpClient = IHttpClient
23
+ TClient extends IHttpClient = IHttpClient,
24
24
  >(
25
25
  client: TClient,
26
26
  version: TVersion,
27
- method: TMethod = 'json' as TMethod
27
+ method: TMethod = 'json' as TMethod,
28
28
  ) =>
29
29
  <T = GetUserNotificationSettingsResponse<TVersion>>(
30
30
  args: GetUserNotificationSettingsArgs<TVersion>,
31
- init?: ClientRequestInit<TClient, T>
31
+ init?: ClientRequestInit<TClient, T>,
32
32
  ): GetUserNotificationsSettingsResult<TVersion, TMethod, T> =>
33
33
  client[method](
34
- ...generateParameters<T, TVersion, TClient>(version, args, init)
34
+ ...generateParameters<T, TVersion, TClient>(version, args, init),
35
35
  ) as GetUserNotificationsSettingsResult<TVersion, TMethod, T>;
36
36
 
37
37
  export default getUserNotificationSettings;
@@ -1,5 +1,5 @@
1
- import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
2
- import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
1
+ import { UnsupportedApiVersion } from '../../../errors';
2
+ import { ApiVersion } from '../..';
3
3
 
4
4
  import type { GetUserNotificationSettingsArgs } from './types';
5
5
 
@@ -8,7 +8,7 @@ import type { GetUserNotificationSettingsArgs } from './types';
8
8
  */
9
9
  export const generateEndpoint = <TVersion extends string = keyof typeof ApiVersion>(
10
10
  version: TVersion,
11
- args: GetUserNotificationSettingsArgs<TVersion>
11
+ args: GetUserNotificationSettingsArgs<TVersion>,
12
12
  ) => {
13
13
  const apiVersion = ApiVersion[version as keyof typeof ApiVersion] ?? version;
14
14
  switch (apiVersion) {
@@ -9,11 +9,11 @@ import { GetUserNotificationSettingsArgs } from './types';
9
9
  export const generateParameters = <
10
10
  TResult,
11
11
  TVersion extends string = keyof typeof ApiVersion,
12
- TClient extends IHttpClient = IHttpClient
12
+ TClient extends IHttpClient = IHttpClient,
13
13
  >(
14
14
  version: TVersion,
15
15
  args: GetUserNotificationSettingsArgs<TVersion>,
16
- init?: ClientRequestInit<TClient, TResult>
16
+ init?: ClientRequestInit<TClient, TResult>,
17
17
  ): ApiClientArguments<TClient, TResult> => {
18
18
  const path = generateEndpoint(version, args);
19
19
  return [path, init];
@@ -1,4 +1,4 @@
1
- export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
1
+ export { ApiVersion } from '../..';
2
2
 
3
3
  export { generateEndpoint } from './generate-endpoint';
4
4
  export { generateParameters } from './generate-parameters';
@@ -31,14 +31,14 @@ export type GetUserNotificationSettingsFn<
31
31
  TVersion extends string = keyof typeof ApiVersion,
32
32
  TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
33
33
  TClient extends IHttpClient = IHttpClient,
34
- TResult = GetUserNotificationSettingsResponse<TVersion>
34
+ TResult = GetUserNotificationSettingsResponse<TVersion>,
35
35
  > = (
36
36
  args: GetUserNotificationSettingsArgs<TVersion>,
37
- init?: ClientRequestInit<TClient, TResult>
37
+ init?: ClientRequestInit<TClient, TResult>,
38
38
  ) => GetUserNotificationsSettingsResult<TVersion, TMethod, TResult>;
39
39
 
40
40
  export type GetUserNotificationsSettingsResult<
41
41
  TVersion extends string = keyof typeof ApiVersion,
42
42
  TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
43
- TResult = GetUserNotificationSettingsResponse<TVersion>
43
+ TResult = GetUserNotificationSettingsResponse<TVersion>,
44
44
  > = ClientMethod<TResult>[TMethod];
@@ -20,18 +20,18 @@ export const updateUserNotificationSettings =
20
20
  <
21
21
  TVersion extends string = keyof typeof ApiVersion,
22
22
  TMethod extends keyof ClientMethod = keyof ClientMethod,
23
- TClient extends IHttpClient = IHttpClient
23
+ TClient extends IHttpClient = IHttpClient,
24
24
  >(
25
25
  client: TClient,
26
26
  version: TVersion,
27
- method: TMethod = 'json' as TMethod
27
+ method: TMethod = 'json' as TMethod,
28
28
  ) =>
29
29
  <T = PutUserNotificationSettingsResponse<TVersion>>(
30
30
  args: PutUserNotificationSettingsArgs<TVersion>,
31
- init?: ClientRequestInit<TClient, T>
31
+ init?: ClientRequestInit<TClient, T>,
32
32
  ): PutUserNotificationSettingsResult<TVersion, TMethod, T> =>
33
33
  client[method](
34
- ...generateParameters<T, TVersion, TClient>(version, args, init)
34
+ ...generateParameters<T, TVersion, TClient>(version, args, init),
35
35
  ) as PutUserNotificationSettingsResult<TVersion, TMethod, T>;
36
36
 
37
37
  export default updateUserNotificationSettings;
@@ -1,5 +1,5 @@
1
- import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
2
- import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
1
+ import { UnsupportedApiVersion } from '../../../errors';
2
+ import { ApiVersion } from '../..';
3
3
 
4
4
  import type { PutUserNotificationSettingsArgs } from './types';
5
5
 
@@ -8,7 +8,7 @@ import type { PutUserNotificationSettingsArgs } from './types';
8
8
  */
9
9
  export const generateEndpoint = <TVersion extends string = keyof typeof ApiVersion>(
10
10
  version: TVersion,
11
- args: PutUserNotificationSettingsArgs<TVersion>
11
+ args: PutUserNotificationSettingsArgs<TVersion>,
12
12
  ) => {
13
13
  const apiVersion = ApiVersion[version as keyof typeof ApiVersion] ?? version;
14
14
  switch (apiVersion) {
@@ -9,11 +9,11 @@ import { PutUserNotificationSettingsArgs } from './types';
9
9
  export const generateParameters = <
10
10
  TResult,
11
11
  TVersion extends string = keyof typeof ApiVersion,
12
- TClient extends IHttpClient = IHttpClient
12
+ TClient extends IHttpClient = IHttpClient,
13
13
  >(
14
14
  version: TVersion,
15
15
  args: PutUserNotificationSettingsArgs<TVersion>,
16
- init?: ClientRequestInit<TClient, TResult>
16
+ init?: ClientRequestInit<TClient, TResult>,
17
17
  ): ApiClientArguments<TClient, TResult> => {
18
18
  const path = generateEndpoint(version, args);
19
19
  //add versions switch case later
@@ -25,7 +25,7 @@ export const generateParameters = <
25
25
  const requestParams: ClientRequestInit<TClient, TResult> = Object.assign(
26
26
  {},
27
27
  { method: 'put', body: JSON.stringify(args), headers: headers },
28
- init
28
+ init,
29
29
  );
30
30
 
31
31
  return [path, requestParams];
@@ -1,4 +1,4 @@
1
- export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
1
+ export { ApiVersion } from '../..';
2
2
 
3
3
  export { generateEndpoint } from './generate-endpoint';
4
4
  export { generateParameters } from './generate-parameters';
@@ -25,14 +25,14 @@ export type PutUserNotificationSettingsFn<
25
25
  TVersion extends string = keyof typeof ApiVersion,
26
26
  TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
27
27
  TClient extends IHttpClient = IHttpClient,
28
- TResult = PutUserNotificationSettingsResponse<TVersion>
28
+ TResult = PutUserNotificationSettingsResponse<TVersion>,
29
29
  > = (
30
30
  args: PutUserNotificationSettingsArgs<TVersion>,
31
- init?: ClientRequestInit<TClient, TResult>
31
+ init?: ClientRequestInit<TClient, TResult>,
32
32
  ) => PutUserNotificationSettingsResult<TVersion, TMethod, TResult>;
33
33
 
34
34
  export type PutUserNotificationSettingsResult<
35
35
  TVersion extends string = keyof typeof ApiVersion,
36
36
  TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
37
- TResult = PutUserNotificationSettingsResponse<TVersion>
37
+ TResult = PutUserNotificationSettingsResponse<TVersion>,
38
38
  > = ClientMethod<TResult>[TMethod];
@@ -1,5 +1 @@
1
- export {
2
- ClientMethodType,
3
- ClientMethod,
4
- ApiClientArguments,
5
- } from '@equinor/fusion-framework-module-services';
1
+ export { ClientMethodType, ClientMethod, ApiClientArguments } from '..';
package/src/provider.ts CHANGED
@@ -11,20 +11,20 @@ export interface IApiProvider<TClient extends IHttpClient = IHttpClient> {
11
11
  * @param method - Version of the service to use
12
12
  */
13
13
  createBookmarksClient<TMethod extends keyof ClientMethod, TPayload = unknown>(
14
- method: TMethod
14
+ method: TMethod,
15
15
  ): Promise<BookmarksApiClient<TMethod, TClient, TPayload>>;
16
16
 
17
17
  /**
18
18
  * @param method - Version of the service to use
19
19
  */
20
20
  createContextClient<TMethod extends keyof ClientMethod>(
21
- method: TMethod
21
+ method: TMethod,
22
22
  ): Promise<ContextApiClient<TMethod, TClient>>;
23
23
  /**
24
24
  * @param method - Version of the service to use
25
25
  */
26
26
  createNotificationClient<TMethod extends keyof ClientMethod>(
27
- method: TMethod
27
+ method: TMethod,
28
28
  ): Promise<NotificationApiClient<TMethod, TClient>>;
29
29
  }
30
30
 
@@ -80,7 +80,7 @@ export class ApiProvider<TClient extends IHttpClient = IHttpClient>
80
80
  }
81
81
 
82
82
  public async createNotificationClient<TMethod extends keyof ClientMethod>(
83
- method: TMethod
83
+ method: TMethod,
84
84
  ): Promise<NotificationApiClient<TMethod, TClient>> {
85
85
  const httpClient = await this._createClientFn('notification');
86
86
  httpClient.responseHandler.add('validate_api_request', validateResponse);
@@ -88,7 +88,7 @@ export class ApiProvider<TClient extends IHttpClient = IHttpClient>
88
88
  }
89
89
 
90
90
  public async createBookmarksClient<TMethod extends keyof ClientMethod, TPayload = unknown>(
91
- method: TMethod
91
+ method: TMethod,
92
92
  ): Promise<BookmarksApiClient<TMethod, TClient, TPayload>> {
93
93
  const httpClient = await this._createClientFn('bookmarks');
94
94
  httpClient.responseHandler.add('validate_api_request', validateResponse);
@@ -96,7 +96,7 @@ export class ApiProvider<TClient extends IHttpClient = IHttpClient>
96
96
  }
97
97
 
98
98
  public async createContextClient<TMethod extends keyof ClientMethod>(
99
- method: TMethod
99
+ method: TMethod,
100
100
  ): Promise<ContextApiClient<TMethod, TClient>> {
101
101
  const httpClient = await this._createClientFn('context');
102
102
  httpClient.responseHandler.add('validate_api_request', validateResponse);
package/src/types.ts CHANGED
@@ -6,12 +6,12 @@ import {
6
6
  } from '@equinor/fusion-framework-module-http/client';
7
7
 
8
8
  export type ApiClientFactory<TClient extends IHttpClient = IHttpClient> = (
9
- name: string
9
+ name: string,
10
10
  ) => Promise<TClient>;
11
11
 
12
12
  export type ApiClientArguments<TClient extends IHttpClient, TResult = unknown> = [
13
13
  path: string,
14
- init?: ClientRequestInit<TClient, TResult>
14
+ init?: ClientRequestInit<TClient, TResult>,
15
15
  ];
16
16
 
17
17
  /**
package/src/version.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Generated by genversion.
2
+ export const version = '3.1.4';
package/tsconfig.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "outDir": "dist/esm",
5
5
  "rootDir": "src",
6
6
  "declarationDir": "./dist/types",
7
- "baseUrl": "src",
7
+
8
8
  "paths": {
9
9
  "@equinor/fusion-framework-module-services": [
10
10
  "."