@equinor/fusion-framework-module-services 5.1.1-msal-6cf764b628c2afdd64dfd06e42abc953d78556d2 → 5.1.1

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 (231) hide show
  1. package/CHANGELOG.md +103 -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/query/client.js.map +1 -1
  24. package/dist/esm/context/query/generate-endpoint.js +0 -1
  25. package/dist/esm/context/query/generate-endpoint.js.map +1 -1
  26. package/dist/esm/context/query/generate-parameters.js.map +1 -1
  27. package/dist/esm/context/query/types.js.map +1 -1
  28. package/dist/esm/context/related/client.js.map +1 -1
  29. package/dist/esm/context/related/generate-endpoint.js +0 -1
  30. package/dist/esm/context/related/generate-endpoint.js.map +1 -1
  31. package/dist/esm/context/related/generate-parameters.js.map +1 -1
  32. package/dist/esm/context/related/types.js.map +1 -1
  33. package/dist/esm/context/static.js.map +1 -1
  34. package/dist/esm/errors.js.map +1 -1
  35. package/dist/esm/module.js.map +1 -1
  36. package/dist/esm/notification/client.js.map +1 -1
  37. package/dist/esm/notification/notification/delete/client.js.map +1 -1
  38. package/dist/esm/notification/notification/delete/generate-endpoint.js +0 -1
  39. package/dist/esm/notification/notification/delete/generate-endpoint.js.map +1 -1
  40. package/dist/esm/notification/notification/delete/generate-parameters.js.map +1 -1
  41. package/dist/esm/notification/notification/get/client.js.map +1 -1
  42. package/dist/esm/notification/notification/get/generate-endpoint.js +0 -1
  43. package/dist/esm/notification/notification/get/generate-endpoint.js.map +1 -1
  44. package/dist/esm/notification/notification/get/generate-parameters.js.map +1 -1
  45. package/dist/esm/notification/notification/getAll/client.js.map +1 -1
  46. package/dist/esm/notification/notification/getAll/generate-endpoint.js +0 -1
  47. package/dist/esm/notification/notification/getAll/generate-endpoint.js.map +1 -1
  48. package/dist/esm/notification/notification/getAll/generate-parameters.js.map +1 -1
  49. package/dist/esm/notification/notification/patch/client.js.map +1 -1
  50. package/dist/esm/notification/notification/patch/generate-endpoint.js +0 -1
  51. package/dist/esm/notification/notification/patch/generate-endpoint.js.map +1 -1
  52. package/dist/esm/notification/notification/patch/generate-parameters.js.map +1 -1
  53. package/dist/esm/notification/notification/post/client.js.map +1 -1
  54. package/dist/esm/notification/notification/post/generate-endpoint.js +0 -1
  55. package/dist/esm/notification/notification/post/generate-endpoint.js.map +1 -1
  56. package/dist/esm/notification/notification/post/generate-parameters.js.map +1 -1
  57. package/dist/esm/notification/settings/get/client.js.map +1 -1
  58. package/dist/esm/notification/settings/get/generate-endpoint.js +0 -1
  59. package/dist/esm/notification/settings/get/generate-endpoint.js.map +1 -1
  60. package/dist/esm/notification/settings/get/generate-parameters.js.map +1 -1
  61. package/dist/esm/notification/settings/put/client.js.map +1 -1
  62. package/dist/esm/notification/settings/put/generate-endpoint.js +0 -1
  63. package/dist/esm/notification/settings/put/generate-endpoint.js.map +1 -1
  64. package/dist/esm/notification/settings/put/generate-parameters.js.map +1 -1
  65. package/dist/esm/notification/static.js.map +1 -1
  66. package/dist/esm/people/client.js.map +1 -1
  67. package/dist/esm/people/person-details/client.js.map +1 -1
  68. package/dist/esm/people/person-details/generate-endpoint.js.map +1 -1
  69. package/dist/esm/people/person-details/generate-parameters.js.map +1 -1
  70. package/dist/esm/people/person-photo/client.js.map +1 -1
  71. package/dist/esm/people/person-photo/generate-endpoint.js.map +1 -1
  72. package/dist/esm/people/person-photo/generate-parameters.js.map +1 -1
  73. package/dist/esm/people/query/client.js.map +1 -1
  74. package/dist/esm/people/query/generate-endpoint.js.map +1 -1
  75. package/dist/esm/people/query/generate-parameters.js.map +1 -1
  76. package/dist/esm/people/static.js.map +1 -1
  77. package/dist/esm/people/utils.js.map +1 -1
  78. package/dist/esm/provider.js.map +1 -1
  79. package/dist/esm/utils.js.map +1 -1
  80. package/dist/esm/version.js +1 -1
  81. package/dist/tsconfig.tsbuildinfo +1 -1
  82. package/dist/types/bookmarks/api-version.d.ts +2 -2
  83. package/dist/types/bookmarks/client.d.ts +8 -8
  84. package/dist/types/bookmarks/endpoints/bookmark-apply.get.d.ts +1 -1
  85. package/dist/types/bookmarks/endpoints/bookmark.delete.d.ts +1 -1
  86. package/dist/types/bookmarks/endpoints/bookmark.get.d.ts +1 -1
  87. package/dist/types/bookmarks/endpoints/bookmark.patch.d.ts +1 -1
  88. package/dist/types/bookmarks/endpoints/bookmark.post.d.ts +1 -1
  89. package/dist/types/bookmarks/endpoints/user-bookmark-favourite.delete.d.ts +1 -1
  90. package/dist/types/bookmarks/endpoints/user-bookmark-favourite.head.d.ts +1 -1
  91. package/dist/types/bookmarks/endpoints/user-bookmark-favourite.post.d.ts +1 -1
  92. package/dist/types/bookmarks/endpoints/user-bookmarks.get.d.ts +1 -1
  93. package/dist/types/bookmarks/selectors.d.ts +1 -1
  94. package/dist/types/bookmarks/types.d.ts +1 -1
  95. package/dist/types/configurator.d.ts +1 -1
  96. package/dist/types/context/client.d.ts +4 -4
  97. package/dist/types/context/get/client.d.ts +1 -1
  98. package/dist/types/context/get/types.d.ts +2 -2
  99. package/dist/types/context/query/client.d.ts +1 -1
  100. package/dist/types/context/query/generate-parameters.d.ts +1 -1
  101. package/dist/types/context/query/types.d.ts +2 -2
  102. package/dist/types/context/related/client.d.ts +1 -1
  103. package/dist/types/context/related/generate-parameters.d.ts +1 -1
  104. package/dist/types/context/related/types.d.ts +2 -2
  105. package/dist/types/context/static.d.ts +2 -2
  106. package/dist/types/module.d.ts +2 -2
  107. package/dist/types/notification/client.d.ts +9 -9
  108. package/dist/types/notification/notification/delete/client.d.ts +2 -2
  109. package/dist/types/notification/notification/delete/generate-parameters.d.ts +2 -2
  110. package/dist/types/notification/notification/delete/types.d.ts +3 -3
  111. package/dist/types/notification/notification/get/client.d.ts +2 -2
  112. package/dist/types/notification/notification/get/generate-parameters.d.ts +2 -2
  113. package/dist/types/notification/notification/get/types.d.ts +3 -3
  114. package/dist/types/notification/notification/getAll/client.d.ts +2 -2
  115. package/dist/types/notification/notification/getAll/generate-parameters.d.ts +2 -2
  116. package/dist/types/notification/notification/getAll/types.d.ts +3 -3
  117. package/dist/types/notification/notification/patch/client.d.ts +2 -2
  118. package/dist/types/notification/notification/patch/generate-parameters.d.ts +2 -2
  119. package/dist/types/notification/notification/patch/types.d.ts +3 -3
  120. package/dist/types/notification/notification/post/client.d.ts +2 -2
  121. package/dist/types/notification/notification/post/generate-parameters.d.ts +2 -2
  122. package/dist/types/notification/notification/post/types.d.ts +3 -3
  123. package/dist/types/notification/settings/get/client.d.ts +2 -2
  124. package/dist/types/notification/settings/get/generate-parameters.d.ts +2 -2
  125. package/dist/types/notification/settings/get/types.d.ts +3 -3
  126. package/dist/types/notification/settings/put/client.d.ts +2 -2
  127. package/dist/types/notification/settings/put/generate-parameters.d.ts +2 -2
  128. package/dist/types/notification/settings/put/types.d.ts +3 -3
  129. package/dist/types/notification/static.d.ts +2 -2
  130. package/dist/types/people/api-models.d.ts +2 -2
  131. package/dist/types/people/api-models.v2.d.ts +1 -1
  132. package/dist/types/people/api-models.v4.d.ts +1 -1
  133. package/dist/types/people/client.d.ts +4 -4
  134. package/dist/types/people/person-details/client.d.ts +1 -1
  135. package/dist/types/people/person-details/types.d.ts +1 -1
  136. package/dist/types/people/person-photo/client.d.ts +1 -1
  137. package/dist/types/people/person-photo/types.d.ts +2 -2
  138. package/dist/types/people/query/client.d.ts +1 -1
  139. package/dist/types/people/query/types.d.ts +2 -2
  140. package/dist/types/people/static.d.ts +2 -2
  141. package/dist/types/people/utils.d.ts +1 -1
  142. package/dist/types/provider.d.ts +3 -3
  143. package/dist/types/types.d.ts +1 -1
  144. package/dist/types/utils.d.ts +1 -1
  145. package/dist/types/version.d.ts +1 -1
  146. package/package.json +5 -5
  147. package/src/bookmarks/api-version.ts +2 -2
  148. package/src/bookmarks/client.ts +228 -231
  149. package/src/bookmarks/endpoints/bookmark-apply.get.ts +58 -58
  150. package/src/bookmarks/endpoints/bookmark.delete.ts +57 -57
  151. package/src/bookmarks/endpoints/bookmark.get.ts +62 -62
  152. package/src/bookmarks/endpoints/bookmark.patch.ts +78 -78
  153. package/src/bookmarks/endpoints/bookmark.post.ts +68 -68
  154. package/src/bookmarks/endpoints/user-bookmark-favourite.delete.ts +57 -57
  155. package/src/bookmarks/endpoints/user-bookmark-favourite.head.ts +57 -57
  156. package/src/bookmarks/endpoints/user-bookmark-favourite.post.ts +58 -58
  157. package/src/bookmarks/endpoints/user-bookmarks.get.ts +98 -98
  158. package/src/bookmarks/schemas.ts +54 -56
  159. package/src/bookmarks/selectors.ts +24 -24
  160. package/src/bookmarks/types.ts +6 -6
  161. package/src/configurator.ts +3 -3
  162. package/src/context/api-models.ts +19 -19
  163. package/src/context/client.ts +68 -58
  164. package/src/context/get/client.ts +18 -18
  165. package/src/context/get/generate-endpoint.ts +13 -14
  166. package/src/context/get/generate-parameters.ts +9 -9
  167. package/src/context/get/types.ts +20 -20
  168. package/src/context/query/client.ts +22 -22
  169. package/src/context/query/generate-endpoint.ts +43 -44
  170. package/src/context/query/generate-parameters.ts +10 -10
  171. package/src/context/query/types.ts +25 -25
  172. package/src/context/related/client.ts +22 -22
  173. package/src/context/related/generate-endpoint.ts +40 -41
  174. package/src/context/related/generate-parameters.ts +10 -10
  175. package/src/context/related/types.ts +27 -27
  176. package/src/context/static.ts +3 -3
  177. package/src/errors.ts +6 -6
  178. package/src/module.ts +50 -52
  179. package/src/notification/api-models.ts +36 -36
  180. package/src/notification/client.ts +131 -151
  181. package/src/notification/notification/delete/client.ts +22 -22
  182. package/src/notification/notification/delete/generate-endpoint.ts +13 -14
  183. package/src/notification/notification/delete/generate-parameters.ts +18 -18
  184. package/src/notification/notification/delete/types.ts +21 -21
  185. package/src/notification/notification/get/client.ts +19 -19
  186. package/src/notification/notification/get/generate-endpoint.ts +13 -14
  187. package/src/notification/notification/get/generate-parameters.ts +11 -11
  188. package/src/notification/notification/get/types.ts +21 -21
  189. package/src/notification/notification/getAll/client.ts +22 -22
  190. package/src/notification/notification/getAll/generate-endpoint.ts +13 -14
  191. package/src/notification/notification/getAll/generate-parameters.ts +11 -11
  192. package/src/notification/notification/getAll/types.ts +21 -21
  193. package/src/notification/notification/patch/client.ts +22 -22
  194. package/src/notification/notification/patch/generate-endpoint.ts +13 -14
  195. package/src/notification/notification/patch/generate-parameters.ts +18 -18
  196. package/src/notification/notification/patch/types.ts +22 -22
  197. package/src/notification/notification/post/client.ts +22 -22
  198. package/src/notification/notification/post/generate-endpoint.ts +13 -14
  199. package/src/notification/notification/post/generate-parameters.ts +18 -18
  200. package/src/notification/notification/post/types.ts +31 -31
  201. package/src/notification/settings/get/client.ts +22 -22
  202. package/src/notification/settings/get/generate-endpoint.ts +13 -14
  203. package/src/notification/settings/get/generate-parameters.ts +11 -11
  204. package/src/notification/settings/get/types.ts +21 -21
  205. package/src/notification/settings/put/client.ts +22 -22
  206. package/src/notification/settings/put/generate-endpoint.ts +13 -14
  207. package/src/notification/settings/put/generate-parameters.ts +20 -20
  208. package/src/notification/settings/put/types.ts +20 -20
  209. package/src/notification/static.ts +3 -3
  210. package/src/people/api-models.ts +30 -30
  211. package/src/people/api-models.v2.ts +27 -27
  212. package/src/people/api-models.v4.ts +79 -79
  213. package/src/people/client.ts +73 -77
  214. package/src/people/person-details/client.ts +21 -18
  215. package/src/people/person-details/generate-endpoint.ts +16 -16
  216. package/src/people/person-details/generate-parameters.ts +8 -8
  217. package/src/people/person-details/types.ts +13 -13
  218. package/src/people/person-photo/client.ts +19 -22
  219. package/src/people/person-photo/generate-endpoint.ts +13 -13
  220. package/src/people/person-photo/generate-parameters.ts +8 -8
  221. package/src/people/person-photo/types.ts +8 -8
  222. package/src/people/query/client.ts +20 -18
  223. package/src/people/query/generate-endpoint.ts +14 -14
  224. package/src/people/query/generate-parameters.ts +8 -8
  225. package/src/people/query/types.ts +10 -10
  226. package/src/people/static.ts +2 -2
  227. package/src/people/utils.ts +20 -20
  228. package/src/provider.ts +85 -85
  229. package/src/types.ts +34 -34
  230. package/src/utils.ts +22 -26
  231. package/src/version.ts +1 -1
@@ -1,38 +1,38 @@
1
- import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
- import { ClientMethod } from '../../../types';
3
- import { ApiNotificationSettingsEntity } from '../../api-models';
1
+ import type { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import type { ClientMethod } from '../../../types';
3
+ import type { ApiNotificationSettingsEntity } from '../../api-models';
4
4
  import { ApiVersion } from '../../static';
5
5
 
6
6
  type PutUserNotificationSettingsArgsTypes = {
7
- [ApiVersion.v1]: ApiNotificationSettingsEntity<ApiVersion.v1>;
8
- [ApiVersion.v2]: ApiNotificationSettingsEntity<ApiVersion.v2>;
7
+ [ApiVersion.v1]: ApiNotificationSettingsEntity<ApiVersion.v1>;
8
+ [ApiVersion.v2]: ApiNotificationSettingsEntity<ApiVersion.v2>;
9
9
  };
10
10
 
11
11
  export type PutUserNotificationSettingsArgs<T extends string> = T extends keyof typeof ApiVersion
12
- ? PutUserNotificationSettingsArgsTypes[(typeof ApiVersion)[T]]
13
- : unknown;
12
+ ? PutUserNotificationSettingsArgsTypes[(typeof ApiVersion)[T]]
13
+ : unknown;
14
14
 
15
15
  type GetUserNotificationSettingsResponseTypes = {
16
- [ApiVersion.v2]: ApiNotificationSettingsEntity<ApiVersion.v2>;
17
- [ApiVersion.v1]: ApiNotificationSettingsEntity<ApiVersion.v1>;
16
+ [ApiVersion.v2]: ApiNotificationSettingsEntity<ApiVersion.v2>;
17
+ [ApiVersion.v1]: ApiNotificationSettingsEntity<ApiVersion.v1>;
18
18
  };
19
19
 
20
20
  export type PutUserNotificationSettingsResponse<T> = T extends keyof typeof ApiVersion
21
- ? GetUserNotificationSettingsResponseTypes[(typeof ApiVersion)[T]]
22
- : unknown;
21
+ ? GetUserNotificationSettingsResponseTypes[(typeof ApiVersion)[T]]
22
+ : unknown;
23
23
 
24
24
  export type PutUserNotificationSettingsFn<
25
- TVersion extends string = keyof typeof ApiVersion,
26
- TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
27
- TClient extends IHttpClient = IHttpClient,
28
- TResult = PutUserNotificationSettingsResponse<TVersion>,
25
+ TVersion extends string = keyof typeof ApiVersion,
26
+ TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
27
+ TClient extends IHttpClient = IHttpClient,
28
+ TResult = PutUserNotificationSettingsResponse<TVersion>,
29
29
  > = (
30
- args: PutUserNotificationSettingsArgs<TVersion>,
31
- init?: ClientRequestInit<TClient, TResult>,
30
+ args: PutUserNotificationSettingsArgs<TVersion>,
31
+ init?: ClientRequestInit<TClient, TResult>,
32
32
  ) => PutUserNotificationSettingsResult<TVersion, TMethod, TResult>;
33
33
 
34
34
  export type PutUserNotificationSettingsResult<
35
- TVersion extends string = keyof typeof ApiVersion,
36
- TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
37
- TResult = PutUserNotificationSettingsResponse<TVersion>,
35
+ TVersion extends string = keyof typeof ApiVersion,
36
+ TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
37
+ TResult = PutUserNotificationSettingsResponse<TVersion>,
38
38
  > = ClientMethod<TResult>[TMethod];
@@ -1,6 +1,6 @@
1
1
  /** index of api versions of context service */
2
2
  export enum ApiVersion {
3
- 'v1' = '1.0',
4
- /** not in use atm */
5
- 'v2' = '2.0',
3
+ v1 = '1.0',
4
+ /** not in use atm */
5
+ v2 = '2.0',
6
6
  }
@@ -1,52 +1,52 @@
1
- import { ApiPerson_v2 } from './api-models.v2';
2
- import { ApiPerson_v4 } from './api-models.v4';
1
+ import type { ApiPerson_v2 } from './api-models.v2';
2
+ import type { ApiPerson_v4 } from './api-models.v4';
3
3
  import { ApiVersion } from './static';
4
4
 
5
5
  export type ApiProjectMaster = {
6
- id: string;
7
- name?: string;
6
+ id: string;
7
+ name?: string;
8
8
  };
9
9
 
10
10
  export type ApiManager = {
11
- azureUniqueId: string;
12
- name?: string;
13
- mail?: string;
14
- department?: string;
15
- fullDepartment?: string;
16
- upn?: string;
17
- jobTitle?: string;
18
- accountType: ApiProfileAccountType;
19
- accountClassification: ApiAccountClassification;
11
+ azureUniqueId: string;
12
+ name?: string;
13
+ mail?: string;
14
+ department?: string;
15
+ fullDepartment?: string;
16
+ upn?: string;
17
+ jobTitle?: string;
18
+ accountType: ApiProfileAccountType;
19
+ accountClassification: ApiAccountClassification;
20
20
  };
21
21
 
22
22
  export type ApiInvitationStatus = 'Accepted' | 'Pending' | 'NotSent';
23
23
 
24
24
  export type ApiProfileAccountType =
25
- | 'Employee'
26
- | 'Consultant'
27
- | 'Enterprise'
28
- | 'External'
29
- | 'External Hire';
25
+ | 'Employee'
26
+ | 'Consultant'
27
+ | 'Enterprise'
28
+ | 'External'
29
+ | 'External Hire';
30
30
 
31
31
  // TODO what are these?
32
32
  export type ApiAccountClassification = 'Unclassified' | 'Internal' | 'External';
33
33
 
34
34
  export type ApiProfileAccountLink = {
35
- azureUniqueId: string;
36
- mail?: string;
37
- isPrimaryAccount?: boolean;
38
- preferredContactMail?: string;
39
- isExpired?: boolean;
40
- upn?: string;
35
+ azureUniqueId: string;
36
+ mail?: string;
37
+ isPrimaryAccount?: boolean;
38
+ preferredContactMail?: string;
39
+ isExpired?: boolean;
40
+ upn?: string;
41
41
  };
42
42
 
43
43
  export type ApiPersonMap = {
44
- [ApiVersion.v2]: ApiPerson_v2;
45
- [ApiVersion.v4]: ApiPerson_v4;
44
+ [ApiVersion.v2]: ApiPerson_v2;
45
+ [ApiVersion.v4]: ApiPerson_v4;
46
46
  };
47
47
 
48
48
  export type ApiPerson<T extends keyof typeof ApiVersion | ApiVersion> = T extends ApiVersion
49
- ? ApiPersonMap[T]
50
- : T extends keyof typeof ApiVersion
51
- ? ApiPersonMap[(typeof ApiVersion)[T]]
52
- : unknown;
49
+ ? ApiPersonMap[T]
50
+ : T extends keyof typeof ApiVersion
51
+ ? ApiPersonMap[(typeof ApiVersion)[T]]
52
+ : unknown;
@@ -1,31 +1,31 @@
1
- import {
2
- ApiAccountClassification,
3
- ApiInvitationStatus,
4
- ApiProfileAccountLink,
5
- ApiProfileAccountType,
1
+ import type {
2
+ ApiAccountClassification,
3
+ ApiInvitationStatus,
4
+ ApiProfileAccountLink,
5
+ ApiProfileAccountType,
6
6
  } from './api-models';
7
7
 
8
8
  export type ApiPerson_v2 = {
9
- fusionPersonId?: string;
10
- azureUniqueId: string;
11
- mail?: string;
12
- name?: string;
13
- jobTitle?: string;
14
- department?: string;
15
- fullDepartment?: string;
16
- mobilePhone?: string;
17
- officeLocation?: string;
18
- sapId?: string;
19
- employeeId?: string;
20
- isResourceOwner?: boolean;
21
- isExpired?: boolean;
22
- expiredDate?: string;
23
- upn?: string;
24
- accountType: ApiProfileAccountType;
25
- invitationStatus: ApiInvitationStatus;
26
- accountClassification: ApiAccountClassification;
27
- managerAzureUniqueId: string;
28
- linkedAccounts?: Array<ApiProfileAccountLink>;
29
- isPrimaryAccount?: boolean;
30
- preferredContactMail?: string;
9
+ fusionPersonId?: string;
10
+ azureUniqueId: string;
11
+ mail?: string;
12
+ name?: string;
13
+ jobTitle?: string;
14
+ department?: string;
15
+ fullDepartment?: string;
16
+ mobilePhone?: string;
17
+ officeLocation?: string;
18
+ sapId?: string;
19
+ employeeId?: string;
20
+ isResourceOwner?: boolean;
21
+ isExpired?: boolean;
22
+ expiredDate?: string;
23
+ upn?: string;
24
+ accountType: ApiProfileAccountType;
25
+ invitationStatus: ApiInvitationStatus;
26
+ accountClassification: ApiAccountClassification;
27
+ managerAzureUniqueId: string;
28
+ linkedAccounts?: Array<ApiProfileAccountLink>;
29
+ isPrimaryAccount?: boolean;
30
+ preferredContactMail?: string;
31
31
  };
@@ -1,114 +1,114 @@
1
- import {
2
- ApiAccountClassification,
3
- ApiInvitationStatus,
4
- ApiManager,
5
- ApiProfileAccountLink,
6
- ApiProfileAccountType,
7
- ApiProjectMaster,
1
+ import type {
2
+ ApiAccountClassification,
3
+ ApiInvitationStatus,
4
+ ApiManager,
5
+ ApiProfileAccountLink,
6
+ ApiProfileAccountType,
7
+ ApiProjectMaster,
8
8
  } from './api-models';
9
9
 
10
10
  export type ApiPersonExpandMap_v4 = {
11
- roles: Array<ApiPersonRole_v4>;
12
- positions: Array<ApiPersonPosition_v4>;
13
- contracts: Array<ApiPersonContract_v4>;
14
- manager: ApiManager;
15
- companies: Array<ApiCompanyInfo_v4>;
11
+ roles: Array<ApiPersonRole_v4>;
12
+ positions: Array<ApiPersonPosition_v4>;
13
+ contracts: Array<ApiPersonContract_v4>;
14
+ manager: ApiManager;
15
+ companies: Array<ApiCompanyInfo_v4>;
16
16
  };
17
17
 
18
18
  export type ApiPersonExpandProps_v4 = keyof ApiPersonExpandMap_v4;
19
19
 
20
20
  export type ApiPerson_v4<TExpand extends Array<ApiPersonExpandProps_v4> = []> = {
21
- azureUniqueId: string;
22
- mail?: string;
23
- name?: string;
24
- jobTitle?: string;
25
- department?: string;
26
- fullDepartment?: string;
27
- mobilePhone?: string;
28
- officeLocation?: string;
29
- upn?: string;
30
- isResourceOwner?: boolean;
31
- isExpired?: boolean;
32
- expiredDate?: string;
33
- isPrimaryAccount?: boolean;
34
- preferredContactMail?: string;
35
- accountType?: ApiProfileAccountType;
21
+ azureUniqueId: string;
22
+ mail?: string;
23
+ name?: string;
24
+ jobTitle?: string;
25
+ department?: string;
26
+ fullDepartment?: string;
27
+ mobilePhone?: string;
28
+ officeLocation?: string;
29
+ upn?: string;
30
+ isResourceOwner?: boolean;
31
+ isExpired?: boolean;
32
+ expiredDate?: string;
33
+ isPrimaryAccount?: boolean;
34
+ preferredContactMail?: string;
35
+ accountType?: ApiProfileAccountType;
36
36
 
37
- // TODO is this default
38
- invitationStatus?: ApiInvitationStatus;
39
- accountClassification?: ApiAccountClassification;
40
- managerAzureUniqueId?: string;
37
+ // TODO is this default
38
+ invitationStatus?: ApiInvitationStatus;
39
+ accountClassification?: ApiAccountClassification;
40
+ managerAzureUniqueId?: string;
41
41
 
42
- // TODO is this default
43
- linkedAccounts?: Array<ApiProfileAccountLink>;
42
+ // TODO is this default
43
+ linkedAccounts?: Array<ApiProfileAccountLink>;
44
44
  } & /** expanded */ Partial<ApiPersonExpandMap_v4> & {
45
- /** Provided */
46
- [K in TExpand[number]]: ApiPersonExpandMap_v4[K];
47
- };
45
+ /** Provided */
46
+ [K in TExpand[number]]: ApiPersonExpandMap_v4[K];
47
+ };
48
48
 
49
49
  export type ApiCompanyInfo_v4 = {
50
- id: string;
51
- name?: string;
50
+ id: string;
51
+ name?: string;
52
52
  };
53
53
 
54
54
  export type ApiPersonRole_v4 = {
55
- name?: string;
56
- displayName?: string;
57
- sourceSystem?: string;
58
- type?: string;
59
- isActive?: boolean;
60
- activeToUtc?: string;
61
- onDemandSupport?: boolean;
62
- scopes?: Array<ApiPersonRoleScope_v4>;
55
+ name?: string;
56
+ displayName?: string;
57
+ sourceSystem?: string;
58
+ type?: string;
59
+ isActive?: boolean;
60
+ activeToUtc?: string;
61
+ onDemandSupport?: boolean;
62
+ scopes?: Array<ApiPersonRoleScope_v4>;
63
63
  };
64
64
 
65
65
  export type ApiPersonRoleScope_v4 = {
66
- type?: string;
67
- values?: string[];
68
- valueType?: string;
66
+ type?: string;
67
+ values?: string[];
68
+ valueType?: string;
69
69
  };
70
70
 
71
71
  export type ApiPersonPosition_v4 = {
72
- positionId: string;
73
- positionExternalId?: string;
74
- id: string;
75
- parentPositionId?: string;
76
- taskOwnerIds?: string[];
77
- name?: string;
78
- obs?: string;
79
- basePosition: ApiPersonBasePosition_v4;
80
- project: ApiPersonProject_v4;
81
- appliesFrom: string;
82
- appliesTo: string;
83
- workload?: number;
72
+ positionId: string;
73
+ positionExternalId?: string;
74
+ id: string;
75
+ parentPositionId?: string;
76
+ taskOwnerIds?: string[];
77
+ name?: string;
78
+ obs?: string;
79
+ basePosition: ApiPersonBasePosition_v4;
80
+ project: ApiPersonProject_v4;
81
+ appliesFrom: string;
82
+ appliesTo: string;
83
+ workload?: number;
84
84
  };
85
85
 
86
86
  export type ApiPersonBasePosition_v4 = {
87
- id: string;
88
- name?: string;
89
- type?: string;
90
- discipline?: string;
87
+ id: string;
88
+ name?: string;
89
+ type?: string;
90
+ discipline?: string;
91
91
  };
92
92
 
93
93
  export type ApiPersonProject_v4 = {
94
- id: string;
95
- name?: string;
96
- domainId?: string;
97
- type?: string;
94
+ id: string;
95
+ name?: string;
96
+ domainId?: string;
97
+ type?: string;
98
98
  };
99
99
 
100
100
  export type ApiPersonContract_v4 = {
101
- id: string;
102
- name?: string;
103
- contractNumber?: string;
104
- companyId?: string;
105
- companyName?: string;
106
- project: ApiPersonProject_v4;
107
- projectMaster: ApiProjectMaster;
108
- positions: Array<ApiPersonPosition_v4>;
101
+ id: string;
102
+ name?: string;
103
+ contractNumber?: string;
104
+ companyId?: string;
105
+ companyName?: string;
106
+ project: ApiPersonProject_v4;
107
+ projectMaster: ApiProjectMaster;
108
+ positions: Array<ApiPersonPosition_v4>;
109
109
  };
110
110
 
111
111
  export type ApiCompanyInfoV4 = {
112
- id: string;
113
- name?: string;
112
+ id: string;
113
+ name?: string;
114
114
  };
@@ -1,99 +1,95 @@
1
- import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
1
+ import type { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
2
 
3
3
  import type { ClientDataMethod, ClientMethod } from '../types';
4
4
  import { ApiVersion } from './static';
5
5
 
6
6
  import {
7
- client as personDetailClient,
8
- ApiResponse as PersonDetailApiResponse,
9
- ApiResult as PersonDetailResult,
10
- SupportedApiVersion as PersonDetailSupportedApiVersion,
11
- ApiRequestArgs as PersonDetailApiRequestArgs,
7
+ client as personDetailClient,
8
+ type ApiResponse as PersonDetailApiResponse,
9
+ type ApiResult as PersonDetailResult,
10
+ type SupportedApiVersion as PersonDetailSupportedApiVersion,
11
+ type ApiRequestArgs as PersonDetailApiRequestArgs,
12
12
  } from './person-details';
13
13
 
14
14
  import {
15
- client as personQueryClient,
16
- ApiResponse as PersonQueryApiResponse,
17
- ApiResult as PersonQueryResult,
18
- SupportedApiVersion as PersonQuerySupportedApiVersion,
19
- ApiRequestArgs as PersonQueryApiRequestArgs,
15
+ client as personQueryClient,
16
+ type ApiResponse as PersonQueryApiResponse,
17
+ type ApiResult as PersonQueryResult,
18
+ type SupportedApiVersion as PersonQuerySupportedApiVersion,
19
+ type ApiRequestArgs as PersonQueryApiRequestArgs,
20
20
  } from './query';
21
21
 
22
22
  import {
23
- client as personPhotoClient,
24
- ApiResponse as PersonPhotoApiResponse,
25
- ApiResult as PersonPhotoResult,
26
- SupportedApiVersion as PersonPhotoSupportedApiVersion,
27
- ApiRequestArgs as PersonPhotoApiRequestArgs,
23
+ client as personPhotoClient,
24
+ type ApiResponse as PersonPhotoApiResponse,
25
+ type ApiResult as PersonPhotoResult,
26
+ type SupportedApiVersion as PersonPhotoSupportedApiVersion,
27
+ type ApiRequestArgs as PersonPhotoApiRequestArgs,
28
28
  } from './person-photo';
29
29
 
30
30
  export class PeopleApiClient<
31
- // TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
32
- TClient extends IHttpClient = IHttpClient,
31
+ // TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
32
+ TClient extends IHttpClient = IHttpClient,
33
33
  > {
34
- get Version(): typeof ApiVersion {
35
- return ApiVersion;
36
- }
34
+ get Version(): typeof ApiVersion {
35
+ return ApiVersion;
36
+ }
37
37
 
38
- constructor(protected _client: TClient) {}
38
+ constructor(protected _client: TClient) {}
39
39
 
40
- /**
41
- * Fetch person by id
42
- */
43
- public get<
44
- TVersion extends PersonDetailSupportedApiVersion,
45
- TArgs extends PersonDetailApiRequestArgs<TVersion>,
46
- TResult extends PersonDetailApiResponse<TVersion, TArgs>,
47
- TMethod extends keyof ClientMethod<TResult>,
48
- >(
49
- version: TVersion,
50
- method: TMethod,
51
- args: TArgs,
52
- init?: ClientRequestInit<TClient, TResult>,
53
- ): PersonDetailResult<TVersion, TArgs, TMethod, TResult> {
54
- const fn = personDetailClient<TVersion, TMethod, TClient, TArgs>(
55
- this._client,
56
- version,
57
- method,
58
- );
59
- return fn(args, init);
60
- }
40
+ /**
41
+ * Fetch person by id
42
+ */
43
+ public get<
44
+ TVersion extends PersonDetailSupportedApiVersion,
45
+ TArgs extends PersonDetailApiRequestArgs<TVersion>,
46
+ TResult extends PersonDetailApiResponse<TVersion, TArgs>,
47
+ TMethod extends keyof ClientMethod<TResult>,
48
+ >(
49
+ version: TVersion,
50
+ method: TMethod,
51
+ args: TArgs,
52
+ init?: ClientRequestInit<TClient, TResult>,
53
+ ): PersonDetailResult<TVersion, TArgs, TMethod, TResult> {
54
+ const fn = personDetailClient<TVersion, TMethod, TClient, TArgs>(this._client, version, method);
55
+ return fn(args, init);
56
+ }
61
57
 
62
- /**
63
- * Query person service
64
- */
65
- public query<
66
- TVersion extends PersonQuerySupportedApiVersion,
67
- TArgs extends PersonQueryApiRequestArgs<TVersion>,
68
- TResult = PersonQueryApiResponse<TVersion>,
69
- TMethod extends keyof ClientMethod<TResult> = keyof ClientMethod<TResult>,
70
- >(
71
- version: TVersion,
72
- method: TMethod,
73
- args: TArgs,
74
- init?: ClientRequestInit<TClient, TResult>,
75
- ): PersonQueryResult<TVersion, TMethod, TResult> {
76
- const fn = personQueryClient<TVersion, TMethod, TClient>(this._client, version, method);
77
- return fn<TResult>(args, init);
78
- }
58
+ /**
59
+ * Query person service
60
+ */
61
+ public query<
62
+ TVersion extends PersonQuerySupportedApiVersion,
63
+ TArgs extends PersonQueryApiRequestArgs<TVersion>,
64
+ TResult = PersonQueryApiResponse<TVersion>,
65
+ TMethod extends keyof ClientMethod<TResult> = keyof ClientMethod<TResult>,
66
+ >(
67
+ version: TVersion,
68
+ method: TMethod,
69
+ args: TArgs,
70
+ init?: ClientRequestInit<TClient, TResult>,
71
+ ): PersonQueryResult<TVersion, TMethod, TResult> {
72
+ const fn = personQueryClient<TVersion, TMethod, TClient>(this._client, version, method);
73
+ return fn<TResult>(args, init);
74
+ }
79
75
 
80
- /**
81
- * Photo person service
82
- */
83
- public photo<
84
- TVersion extends PersonPhotoSupportedApiVersion,
85
- TArgs extends PersonPhotoApiRequestArgs<TVersion>,
86
- TResult extends PersonPhotoApiResponse<TVersion> = PersonPhotoApiResponse<TVersion>,
87
- TMethod extends keyof ClientDataMethod = keyof ClientDataMethod,
88
- >(
89
- version: TVersion,
90
- method: TMethod,
91
- args: TArgs,
92
- init?: ClientRequestInit<TClient, TResult>,
93
- ): PersonPhotoResult<TMethod> {
94
- const fn = personPhotoClient<TVersion, TMethod, TClient>(this._client, version, method);
95
- return fn<TResult>(args, init);
96
- }
76
+ /**
77
+ * Photo person service
78
+ */
79
+ public photo<
80
+ TVersion extends PersonPhotoSupportedApiVersion,
81
+ TArgs extends PersonPhotoApiRequestArgs<TVersion>,
82
+ TResult extends PersonPhotoApiResponse<TVersion> = PersonPhotoApiResponse<TVersion>,
83
+ TMethod extends keyof ClientDataMethod = keyof ClientDataMethod,
84
+ >(
85
+ version: TVersion,
86
+ method: TMethod,
87
+ args: TArgs,
88
+ init?: ClientRequestInit<TClient, TResult>,
89
+ ): PersonPhotoResult<TMethod> {
90
+ const fn = personPhotoClient<TVersion, TMethod, TClient>(this._client, version, method);
91
+ return fn<TResult>(args, init);
92
+ }
97
93
  }
98
94
 
99
95
  // const oo = new PeopleApiClient(null).get('v4', 'fetch', { azureId: '123' });
@@ -1,4 +1,4 @@
1
- import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
2
 
3
3
  import { generateParameters } from './generate-parameters';
4
4
 
@@ -12,22 +12,25 @@ import type { ApiResponse, ApiResult, ApiRequestArgs, SupportedApiVersion } from
12
12
  * @param method - client method to call
13
13
  */
14
14
  export const client =
15
- <
16
- TVersion extends SupportedApiVersion,
17
- TMethod extends keyof ClientMethod = keyof ClientMethod,
18
- TClient extends IHttpClient = IHttpClient,
19
- TArgs extends ApiRequestArgs<TVersion> = ApiRequestArgs<TVersion>,
20
- >(
21
- client: TClient,
22
- version: TVersion,
23
- method: TMethod = 'json' as TMethod,
24
- ) =>
25
- <T = ApiResponse<TVersion, TArgs>>(
26
- args: TArgs,
27
- init?: ClientRequestInit<TClient, T>,
28
- ): ApiResult<TVersion, TArgs, TMethod, T> =>
29
- client[method](
30
- ...generateParameters<T, TVersion, TClient>(version, args, init),
31
- ) as ApiResult<TVersion, TArgs, TMethod, T>;
15
+ <
16
+ TVersion extends SupportedApiVersion,
17
+ TMethod extends keyof ClientMethod = keyof ClientMethod,
18
+ TClient extends IHttpClient = IHttpClient,
19
+ TArgs extends ApiRequestArgs<TVersion> = ApiRequestArgs<TVersion>,
20
+ >(
21
+ client: TClient,
22
+ version: TVersion,
23
+ method: TMethod = 'json' as TMethod,
24
+ ) =>
25
+ <T = ApiResponse<TVersion, TArgs>>(
26
+ args: TArgs,
27
+ init?: ClientRequestInit<TClient, T>,
28
+ ): ApiResult<TVersion, TArgs, TMethod, T> =>
29
+ client[method](...generateParameters<T, TVersion, TClient>(version, args, init)) as ApiResult<
30
+ TVersion,
31
+ TArgs,
32
+ TMethod,
33
+ T
34
+ >;
32
35
 
33
36
  export default client;