@equinor/fusion-framework-module-services 0.0.0-next-20230915111233

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 (546) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/CHANGELOG.md +1470 -0
  3. package/LICENSE +21 -0
  4. package/dist/esm/bookmarks/api-models.js +2 -0
  5. package/dist/esm/bookmarks/api-models.js.map +1 -0
  6. package/dist/esm/bookmarks/client.js +48 -0
  7. package/dist/esm/bookmarks/client.js.map +1 -0
  8. package/dist/esm/bookmarks/delete/client.js +4 -0
  9. package/dist/esm/bookmarks/delete/client.js.map +1 -0
  10. package/dist/esm/bookmarks/delete/generate-endpoint.js +17 -0
  11. package/dist/esm/bookmarks/delete/generate-endpoint.js.map +1 -0
  12. package/dist/esm/bookmarks/delete/generate-parameters.js +7 -0
  13. package/dist/esm/bookmarks/delete/generate-parameters.js.map +1 -0
  14. package/dist/esm/bookmarks/delete/index.js +5 -0
  15. package/dist/esm/bookmarks/delete/index.js.map +1 -0
  16. package/dist/esm/bookmarks/delete/types-v1.js +2 -0
  17. package/dist/esm/bookmarks/delete/types-v1.js.map +1 -0
  18. package/dist/esm/bookmarks/delete/types.js +2 -0
  19. package/dist/esm/bookmarks/delete/types.js.map +1 -0
  20. package/dist/esm/bookmarks/favorites/delete/client.js +4 -0
  21. package/dist/esm/bookmarks/favorites/delete/client.js.map +1 -0
  22. package/dist/esm/bookmarks/favorites/delete/generate-endpoint.js +12 -0
  23. package/dist/esm/bookmarks/favorites/delete/generate-endpoint.js.map +1 -0
  24. package/dist/esm/bookmarks/favorites/delete/generate-parameters.js +7 -0
  25. package/dist/esm/bookmarks/favorites/delete/generate-parameters.js.map +1 -0
  26. package/dist/esm/bookmarks/favorites/delete/index.js +5 -0
  27. package/dist/esm/bookmarks/favorites/delete/index.js.map +1 -0
  28. package/dist/esm/bookmarks/favorites/delete/types-v1.js +2 -0
  29. package/dist/esm/bookmarks/favorites/delete/types-v1.js.map +1 -0
  30. package/dist/esm/bookmarks/favorites/delete/types.js +2 -0
  31. package/dist/esm/bookmarks/favorites/delete/types.js.map +1 -0
  32. package/dist/esm/bookmarks/favorites/head/client.js +4 -0
  33. package/dist/esm/bookmarks/favorites/head/client.js.map +1 -0
  34. package/dist/esm/bookmarks/favorites/head/generate-endpoint.js +12 -0
  35. package/dist/esm/bookmarks/favorites/head/generate-endpoint.js.map +1 -0
  36. package/dist/esm/bookmarks/favorites/head/generate-parameters.js +9 -0
  37. package/dist/esm/bookmarks/favorites/head/generate-parameters.js.map +1 -0
  38. package/dist/esm/bookmarks/favorites/head/index.js +5 -0
  39. package/dist/esm/bookmarks/favorites/head/index.js.map +1 -0
  40. package/dist/esm/bookmarks/favorites/head/types.js +2 -0
  41. package/dist/esm/bookmarks/favorites/head/types.js.map +1 -0
  42. package/dist/esm/bookmarks/favorites/post/client.js +4 -0
  43. package/dist/esm/bookmarks/favorites/post/client.js.map +1 -0
  44. package/dist/esm/bookmarks/favorites/post/generate-endpoint.js +11 -0
  45. package/dist/esm/bookmarks/favorites/post/generate-endpoint.js.map +1 -0
  46. package/dist/esm/bookmarks/favorites/post/generate-parameters.js +9 -0
  47. package/dist/esm/bookmarks/favorites/post/generate-parameters.js.map +1 -0
  48. package/dist/esm/bookmarks/favorites/post/index.js +5 -0
  49. package/dist/esm/bookmarks/favorites/post/index.js.map +1 -0
  50. package/dist/esm/bookmarks/favorites/post/types.js +2 -0
  51. package/dist/esm/bookmarks/favorites/post/types.js.map +1 -0
  52. package/dist/esm/bookmarks/get/client.js +4 -0
  53. package/dist/esm/bookmarks/get/client.js.map +1 -0
  54. package/dist/esm/bookmarks/get/generate-endpoint.js +17 -0
  55. package/dist/esm/bookmarks/get/generate-endpoint.js.map +1 -0
  56. package/dist/esm/bookmarks/get/generate-parameters.js +6 -0
  57. package/dist/esm/bookmarks/get/generate-parameters.js.map +1 -0
  58. package/dist/esm/bookmarks/get/index.js +5 -0
  59. package/dist/esm/bookmarks/get/index.js.map +1 -0
  60. package/dist/esm/bookmarks/get/types.js +2 -0
  61. package/dist/esm/bookmarks/get/types.js.map +1 -0
  62. package/dist/esm/bookmarks/getAll/client.js +4 -0
  63. package/dist/esm/bookmarks/getAll/client.js.map +1 -0
  64. package/dist/esm/bookmarks/getAll/generate-endpoint.js +11 -0
  65. package/dist/esm/bookmarks/getAll/generate-endpoint.js.map +1 -0
  66. package/dist/esm/bookmarks/getAll/generate-parameters.js +6 -0
  67. package/dist/esm/bookmarks/getAll/generate-parameters.js.map +1 -0
  68. package/dist/esm/bookmarks/getAll/index.js +5 -0
  69. package/dist/esm/bookmarks/getAll/index.js.map +1 -0
  70. package/dist/esm/bookmarks/getAll/types.js +2 -0
  71. package/dist/esm/bookmarks/getAll/types.js.map +1 -0
  72. package/dist/esm/bookmarks/index.js +4 -0
  73. package/dist/esm/bookmarks/index.js.map +1 -0
  74. package/dist/esm/bookmarks/patch/client.js +4 -0
  75. package/dist/esm/bookmarks/patch/client.js.map +1 -0
  76. package/dist/esm/bookmarks/patch/generate-endpoint.js +11 -0
  77. package/dist/esm/bookmarks/patch/generate-endpoint.js.map +1 -0
  78. package/dist/esm/bookmarks/patch/generate-parameters.js +9 -0
  79. package/dist/esm/bookmarks/patch/generate-parameters.js.map +1 -0
  80. package/dist/esm/bookmarks/patch/index.js +5 -0
  81. package/dist/esm/bookmarks/patch/index.js.map +1 -0
  82. package/dist/esm/bookmarks/patch/types.js +2 -0
  83. package/dist/esm/bookmarks/patch/types.js.map +1 -0
  84. package/dist/esm/bookmarks/post/client.js +4 -0
  85. package/dist/esm/bookmarks/post/client.js.map +1 -0
  86. package/dist/esm/bookmarks/post/generate-endpoint.js +11 -0
  87. package/dist/esm/bookmarks/post/generate-endpoint.js.map +1 -0
  88. package/dist/esm/bookmarks/post/generate-parameters.js +9 -0
  89. package/dist/esm/bookmarks/post/generate-parameters.js.map +1 -0
  90. package/dist/esm/bookmarks/post/index.js +5 -0
  91. package/dist/esm/bookmarks/post/index.js.map +1 -0
  92. package/dist/esm/bookmarks/post/types.js +2 -0
  93. package/dist/esm/bookmarks/post/types.js.map +1 -0
  94. package/dist/esm/bookmarks/types.js +2 -0
  95. package/dist/esm/bookmarks/types.js.map +1 -0
  96. package/dist/esm/configurator.js +3 -0
  97. package/dist/esm/configurator.js.map +1 -0
  98. package/dist/esm/context/api-models.js +2 -0
  99. package/dist/esm/context/api-models.js.map +1 -0
  100. package/dist/esm/context/client.js +27 -0
  101. package/dist/esm/context/client.js.map +1 -0
  102. package/dist/esm/context/get/client.js +4 -0
  103. package/dist/esm/context/get/client.js.map +1 -0
  104. package/dist/esm/context/get/generate-endpoint.js +18 -0
  105. package/dist/esm/context/get/generate-endpoint.js.map +1 -0
  106. package/dist/esm/context/get/generate-parameters.js +7 -0
  107. package/dist/esm/context/get/generate-parameters.js.map +1 -0
  108. package/dist/esm/context/get/index.js +6 -0
  109. package/dist/esm/context/get/index.js.map +1 -0
  110. package/dist/esm/context/get/types.js +2 -0
  111. package/dist/esm/context/get/types.js.map +1 -0
  112. package/dist/esm/context/index.js +5 -0
  113. package/dist/esm/context/index.js.map +1 -0
  114. package/dist/esm/context/query/client.js +4 -0
  115. package/dist/esm/context/query/client.js.map +1 -0
  116. package/dist/esm/context/query/generate-endpoint.js +49 -0
  117. package/dist/esm/context/query/generate-endpoint.js.map +1 -0
  118. package/dist/esm/context/query/generate-parameters.js +7 -0
  119. package/dist/esm/context/query/generate-parameters.js.map +1 -0
  120. package/dist/esm/context/query/index.js +6 -0
  121. package/dist/esm/context/query/index.js.map +1 -0
  122. package/dist/esm/context/query/types.js +2 -0
  123. package/dist/esm/context/query/types.js.map +1 -0
  124. package/dist/esm/context/related/client.js +4 -0
  125. package/dist/esm/context/related/client.js.map +1 -0
  126. package/dist/esm/context/related/generate-endpoint.js +46 -0
  127. package/dist/esm/context/related/generate-endpoint.js.map +1 -0
  128. package/dist/esm/context/related/generate-parameters.js +7 -0
  129. package/dist/esm/context/related/generate-parameters.js.map +1 -0
  130. package/dist/esm/context/related/index.js +6 -0
  131. package/dist/esm/context/related/index.js.map +1 -0
  132. package/dist/esm/context/related/types.js +2 -0
  133. package/dist/esm/context/related/types.js.map +1 -0
  134. package/dist/esm/context/static.js +6 -0
  135. package/dist/esm/context/static.js.map +1 -0
  136. package/dist/esm/context/types.js +2 -0
  137. package/dist/esm/context/types.js.map +1 -0
  138. package/dist/esm/errors.js +7 -0
  139. package/dist/esm/errors.js.map +1 -0
  140. package/dist/esm/index.js +5 -0
  141. package/dist/esm/index.js.map +1 -0
  142. package/dist/esm/module.js +51 -0
  143. package/dist/esm/module.js.map +1 -0
  144. package/dist/esm/notification/api-models.js +2 -0
  145. package/dist/esm/notification/api-models.js.map +1 -0
  146. package/dist/esm/notification/client.js +43 -0
  147. package/dist/esm/notification/client.js.map +1 -0
  148. package/dist/esm/notification/index.js +5 -0
  149. package/dist/esm/notification/index.js.map +1 -0
  150. package/dist/esm/notification/notification/delete/client.js +4 -0
  151. package/dist/esm/notification/notification/delete/client.js.map +1 -0
  152. package/dist/esm/notification/notification/delete/generate-endpoint.js +18 -0
  153. package/dist/esm/notification/notification/delete/generate-endpoint.js.map +1 -0
  154. package/dist/esm/notification/notification/delete/generate-parameters.js +10 -0
  155. package/dist/esm/notification/notification/delete/generate-parameters.js.map +1 -0
  156. package/dist/esm/notification/notification/delete/index.js +6 -0
  157. package/dist/esm/notification/notification/delete/index.js.map +1 -0
  158. package/dist/esm/notification/notification/delete/types.js +2 -0
  159. package/dist/esm/notification/notification/delete/types.js.map +1 -0
  160. package/dist/esm/notification/notification/get/client.js +4 -0
  161. package/dist/esm/notification/notification/get/client.js.map +1 -0
  162. package/dist/esm/notification/notification/get/generate-endpoint.js +18 -0
  163. package/dist/esm/notification/notification/get/generate-endpoint.js.map +1 -0
  164. package/dist/esm/notification/notification/get/generate-parameters.js +7 -0
  165. package/dist/esm/notification/notification/get/generate-parameters.js.map +1 -0
  166. package/dist/esm/notification/notification/get/index.js +6 -0
  167. package/dist/esm/notification/notification/get/index.js.map +1 -0
  168. package/dist/esm/notification/notification/get/types.js +2 -0
  169. package/dist/esm/notification/notification/get/types.js.map +1 -0
  170. package/dist/esm/notification/notification/getAll/client.js +4 -0
  171. package/dist/esm/notification/notification/getAll/client.js.map +1 -0
  172. package/dist/esm/notification/notification/getAll/generate-endpoint.js +18 -0
  173. package/dist/esm/notification/notification/getAll/generate-endpoint.js.map +1 -0
  174. package/dist/esm/notification/notification/getAll/generate-parameters.js +7 -0
  175. package/dist/esm/notification/notification/getAll/generate-parameters.js.map +1 -0
  176. package/dist/esm/notification/notification/getAll/index.js +6 -0
  177. package/dist/esm/notification/notification/getAll/index.js.map +1 -0
  178. package/dist/esm/notification/notification/getAll/types.js +2 -0
  179. package/dist/esm/notification/notification/getAll/types.js.map +1 -0
  180. package/dist/esm/notification/notification/index.js +6 -0
  181. package/dist/esm/notification/notification/index.js.map +1 -0
  182. package/dist/esm/notification/notification/patch/client.js +4 -0
  183. package/dist/esm/notification/notification/patch/client.js.map +1 -0
  184. package/dist/esm/notification/notification/patch/generate-endpoint.js +18 -0
  185. package/dist/esm/notification/notification/patch/generate-endpoint.js.map +1 -0
  186. package/dist/esm/notification/notification/patch/generate-parameters.js +10 -0
  187. package/dist/esm/notification/notification/patch/generate-parameters.js.map +1 -0
  188. package/dist/esm/notification/notification/patch/index.js +6 -0
  189. package/dist/esm/notification/notification/patch/index.js.map +1 -0
  190. package/dist/esm/notification/notification/patch/types.js +2 -0
  191. package/dist/esm/notification/notification/patch/types.js.map +1 -0
  192. package/dist/esm/notification/notification/post/client.js +4 -0
  193. package/dist/esm/notification/notification/post/client.js.map +1 -0
  194. package/dist/esm/notification/notification/post/generate-endpoint.js +18 -0
  195. package/dist/esm/notification/notification/post/generate-endpoint.js.map +1 -0
  196. package/dist/esm/notification/notification/post/generate-parameters.js +10 -0
  197. package/dist/esm/notification/notification/post/generate-parameters.js.map +1 -0
  198. package/dist/esm/notification/notification/post/index.js +6 -0
  199. package/dist/esm/notification/notification/post/index.js.map +1 -0
  200. package/dist/esm/notification/notification/post/types.js +2 -0
  201. package/dist/esm/notification/notification/post/types.js.map +1 -0
  202. package/dist/esm/notification/settings/get/client.js +4 -0
  203. package/dist/esm/notification/settings/get/client.js.map +1 -0
  204. package/dist/esm/notification/settings/get/generate-endpoint.js +18 -0
  205. package/dist/esm/notification/settings/get/generate-endpoint.js.map +1 -0
  206. package/dist/esm/notification/settings/get/generate-parameters.js +7 -0
  207. package/dist/esm/notification/settings/get/generate-parameters.js.map +1 -0
  208. package/dist/esm/notification/settings/get/index.js +6 -0
  209. package/dist/esm/notification/settings/get/index.js.map +1 -0
  210. package/dist/esm/notification/settings/get/types.js +2 -0
  211. package/dist/esm/notification/settings/get/types.js.map +1 -0
  212. package/dist/esm/notification/settings/put/client.js +4 -0
  213. package/dist/esm/notification/settings/put/client.js.map +1 -0
  214. package/dist/esm/notification/settings/put/generate-endpoint.js +18 -0
  215. package/dist/esm/notification/settings/put/generate-endpoint.js.map +1 -0
  216. package/dist/esm/notification/settings/put/generate-parameters.js +10 -0
  217. package/dist/esm/notification/settings/put/generate-parameters.js.map +1 -0
  218. package/dist/esm/notification/settings/put/index.js +6 -0
  219. package/dist/esm/notification/settings/put/index.js.map +1 -0
  220. package/dist/esm/notification/settings/put/types.js +2 -0
  221. package/dist/esm/notification/settings/put/types.js.map +1 -0
  222. package/dist/esm/notification/static.js +6 -0
  223. package/dist/esm/notification/static.js.map +1 -0
  224. package/dist/esm/notification/types.js +2 -0
  225. package/dist/esm/notification/types.js.map +1 -0
  226. package/dist/esm/people/api-models.js +2 -0
  227. package/dist/esm/people/api-models.js.map +1 -0
  228. package/dist/esm/people/api-models.v2.js +2 -0
  229. package/dist/esm/people/api-models.v2.js.map +1 -0
  230. package/dist/esm/people/api-models.v4.js +2 -0
  231. package/dist/esm/people/api-models.v4.js.map +1 -0
  232. package/dist/esm/people/client.js +26 -0
  233. package/dist/esm/people/client.js.map +1 -0
  234. package/dist/esm/people/index.js +4 -0
  235. package/dist/esm/people/index.js.map +1 -0
  236. package/dist/esm/people/person-details/client.js +4 -0
  237. package/dist/esm/people/person-details/client.js.map +1 -0
  238. package/dist/esm/people/person-details/generate-endpoint.js +21 -0
  239. package/dist/esm/people/person-details/generate-endpoint.js.map +1 -0
  240. package/dist/esm/people/person-details/generate-parameters.js +7 -0
  241. package/dist/esm/people/person-details/generate-parameters.js.map +1 -0
  242. package/dist/esm/people/person-details/index.js +5 -0
  243. package/dist/esm/people/person-details/index.js.map +1 -0
  244. package/dist/esm/people/person-details/types.js +2 -0
  245. package/dist/esm/people/person-details/types.js.map +1 -0
  246. package/dist/esm/people/person-photo/client.js +4 -0
  247. package/dist/esm/people/person-photo/client.js.map +1 -0
  248. package/dist/esm/people/person-photo/generate-endpoint.js +18 -0
  249. package/dist/esm/people/person-photo/generate-endpoint.js.map +1 -0
  250. package/dist/esm/people/person-photo/generate-parameters.js +7 -0
  251. package/dist/esm/people/person-photo/generate-parameters.js.map +1 -0
  252. package/dist/esm/people/person-photo/index.js +5 -0
  253. package/dist/esm/people/person-photo/index.js.map +1 -0
  254. package/dist/esm/people/person-photo/types.js +2 -0
  255. package/dist/esm/people/person-photo/types.js.map +1 -0
  256. package/dist/esm/people/query/client.js +4 -0
  257. package/dist/esm/people/query/client.js.map +1 -0
  258. package/dist/esm/people/query/generate-endpoint.js +19 -0
  259. package/dist/esm/people/query/generate-endpoint.js.map +1 -0
  260. package/dist/esm/people/query/generate-parameters.js +7 -0
  261. package/dist/esm/people/query/generate-parameters.js.map +1 -0
  262. package/dist/esm/people/query/index.js +5 -0
  263. package/dist/esm/people/query/index.js.map +1 -0
  264. package/dist/esm/people/query/types.js +2 -0
  265. package/dist/esm/people/query/types.js.map +1 -0
  266. package/dist/esm/people/static.js +6 -0
  267. package/dist/esm/people/static.js.map +1 -0
  268. package/dist/esm/provider.js +70 -0
  269. package/dist/esm/provider.js.map +1 -0
  270. package/dist/esm/types.js +2 -0
  271. package/dist/esm/types.js.map +1 -0
  272. package/dist/esm/version.js +2 -0
  273. package/dist/esm/version.js.map +1 -0
  274. package/dist/tsconfig.tsbuildinfo +1 -0
  275. package/dist/types/bookmarks/api-models.d.ts +42 -0
  276. package/dist/types/bookmarks/client.d.ts +24 -0
  277. package/dist/types/bookmarks/delete/client.d.ts +5 -0
  278. package/dist/types/bookmarks/delete/generate-endpoint.d.ts +2 -0
  279. package/dist/types/bookmarks/delete/generate-parameters.d.ts +4 -0
  280. package/dist/types/bookmarks/delete/index.d.ts +4 -0
  281. package/dist/types/bookmarks/delete/types-v1.d.ts +3 -0
  282. package/dist/types/bookmarks/delete/types.d.ts +15 -0
  283. package/dist/types/bookmarks/favorites/delete/client.d.ts +5 -0
  284. package/dist/types/bookmarks/favorites/delete/generate-endpoint.d.ts +2 -0
  285. package/dist/types/bookmarks/favorites/delete/generate-parameters.d.ts +4 -0
  286. package/dist/types/bookmarks/favorites/delete/index.d.ts +4 -0
  287. package/dist/types/bookmarks/favorites/delete/types-v1.d.ts +3 -0
  288. package/dist/types/bookmarks/favorites/delete/types.d.ts +15 -0
  289. package/dist/types/bookmarks/favorites/head/client.d.ts +5 -0
  290. package/dist/types/bookmarks/favorites/head/generate-endpoint.d.ts +2 -0
  291. package/dist/types/bookmarks/favorites/head/generate-parameters.d.ts +4 -0
  292. package/dist/types/bookmarks/favorites/head/index.d.ts +4 -0
  293. package/dist/types/bookmarks/favorites/head/types.d.ts +17 -0
  294. package/dist/types/bookmarks/favorites/post/client.d.ts +5 -0
  295. package/dist/types/bookmarks/favorites/post/generate-endpoint.d.ts +2 -0
  296. package/dist/types/bookmarks/favorites/post/generate-parameters.d.ts +4 -0
  297. package/dist/types/bookmarks/favorites/post/index.d.ts +4 -0
  298. package/dist/types/bookmarks/favorites/post/types.d.ts +17 -0
  299. package/dist/types/bookmarks/get/client.d.ts +5 -0
  300. package/dist/types/bookmarks/get/generate-endpoint.d.ts +2 -0
  301. package/dist/types/bookmarks/get/generate-parameters.d.ts +4 -0
  302. package/dist/types/bookmarks/get/index.d.ts +4 -0
  303. package/dist/types/bookmarks/get/types.d.ts +19 -0
  304. package/dist/types/bookmarks/getAll/client.d.ts +5 -0
  305. package/dist/types/bookmarks/getAll/generate-endpoint.d.ts +1 -0
  306. package/dist/types/bookmarks/getAll/generate-parameters.d.ts +3 -0
  307. package/dist/types/bookmarks/getAll/index.d.ts +4 -0
  308. package/dist/types/bookmarks/getAll/types.d.ts +10 -0
  309. package/dist/types/bookmarks/index.d.ts +3 -0
  310. package/dist/types/bookmarks/patch/client.d.ts +5 -0
  311. package/dist/types/bookmarks/patch/generate-endpoint.d.ts +2 -0
  312. package/dist/types/bookmarks/patch/generate-parameters.d.ts +4 -0
  313. package/dist/types/bookmarks/patch/index.d.ts +4 -0
  314. package/dist/types/bookmarks/patch/types.d.ts +19 -0
  315. package/dist/types/bookmarks/post/client.d.ts +5 -0
  316. package/dist/types/bookmarks/post/generate-endpoint.d.ts +2 -0
  317. package/dist/types/bookmarks/post/generate-parameters.d.ts +4 -0
  318. package/dist/types/bookmarks/post/index.d.ts +4 -0
  319. package/dist/types/bookmarks/post/types.d.ts +28 -0
  320. package/dist/types/bookmarks/types.d.ts +1 -0
  321. package/dist/types/configurator.d.ts +6 -0
  322. package/dist/types/context/api-models.d.ts +31 -0
  323. package/dist/types/context/client.d.ts +16 -0
  324. package/dist/types/context/get/client.d.ts +4 -0
  325. package/dist/types/context/get/generate-endpoint.d.ts +2 -0
  326. package/dist/types/context/get/generate-parameters.d.ts +4 -0
  327. package/dist/types/context/get/index.d.ts +5 -0
  328. package/dist/types/context/get/types.d.ts +19 -0
  329. package/dist/types/context/index.d.ts +4 -0
  330. package/dist/types/context/query/client.d.ts +4 -0
  331. package/dist/types/context/query/generate-endpoint.d.ts +3 -0
  332. package/dist/types/context/query/generate-parameters.d.ts +4 -0
  333. package/dist/types/context/query/index.d.ts +5 -0
  334. package/dist/types/context/query/types.d.ts +32 -0
  335. package/dist/types/context/related/client.d.ts +4 -0
  336. package/dist/types/context/related/generate-endpoint.d.ts +3 -0
  337. package/dist/types/context/related/generate-parameters.d.ts +4 -0
  338. package/dist/types/context/related/index.d.ts +5 -0
  339. package/dist/types/context/related/types.d.ts +33 -0
  340. package/dist/types/context/static.d.ts +4 -0
  341. package/dist/types/context/types.d.ts +1 -0
  342. package/dist/types/errors.d.ts +4 -0
  343. package/dist/types/index.d.ts +5 -0
  344. package/dist/types/module.d.ts +20 -0
  345. package/dist/types/notification/api-models.d.ts +54 -0
  346. package/dist/types/notification/client.d.ts +24 -0
  347. package/dist/types/notification/index.d.ts +4 -0
  348. package/dist/types/notification/notification/delete/client.d.ts +5 -0
  349. package/dist/types/notification/notification/delete/generate-endpoint.d.ts +2 -0
  350. package/dist/types/notification/notification/delete/generate-parameters.d.ts +5 -0
  351. package/dist/types/notification/notification/delete/index.d.ts +5 -0
  352. package/dist/types/notification/notification/delete/types.d.ts +21 -0
  353. package/dist/types/notification/notification/get/client.d.ts +5 -0
  354. package/dist/types/notification/notification/get/generate-endpoint.d.ts +2 -0
  355. package/dist/types/notification/notification/get/generate-parameters.d.ts +5 -0
  356. package/dist/types/notification/notification/get/index.d.ts +5 -0
  357. package/dist/types/notification/notification/get/types.d.ts +21 -0
  358. package/dist/types/notification/notification/getAll/client.d.ts +5 -0
  359. package/dist/types/notification/notification/getAll/generate-endpoint.d.ts +2 -0
  360. package/dist/types/notification/notification/getAll/generate-parameters.d.ts +5 -0
  361. package/dist/types/notification/notification/getAll/index.d.ts +5 -0
  362. package/dist/types/notification/notification/getAll/types.d.ts +21 -0
  363. package/dist/types/notification/notification/index.d.ts +5 -0
  364. package/dist/types/notification/notification/patch/client.d.ts +5 -0
  365. package/dist/types/notification/notification/patch/generate-endpoint.d.ts +2 -0
  366. package/dist/types/notification/notification/patch/generate-parameters.d.ts +5 -0
  367. package/dist/types/notification/notification/patch/index.d.ts +5 -0
  368. package/dist/types/notification/notification/patch/types.d.ts +22 -0
  369. package/dist/types/notification/notification/post/client.d.ts +5 -0
  370. package/dist/types/notification/notification/post/generate-endpoint.d.ts +2 -0
  371. package/dist/types/notification/notification/post/generate-parameters.d.ts +5 -0
  372. package/dist/types/notification/notification/post/index.d.ts +5 -0
  373. package/dist/types/notification/notification/post/types.d.ts +33 -0
  374. package/dist/types/notification/settings/get/client.d.ts +5 -0
  375. package/dist/types/notification/settings/get/generate-endpoint.d.ts +2 -0
  376. package/dist/types/notification/settings/get/generate-parameters.d.ts +5 -0
  377. package/dist/types/notification/settings/get/index.d.ts +5 -0
  378. package/dist/types/notification/settings/get/types.d.ts +21 -0
  379. package/dist/types/notification/settings/put/client.d.ts +5 -0
  380. package/dist/types/notification/settings/put/generate-endpoint.d.ts +2 -0
  381. package/dist/types/notification/settings/put/generate-parameters.d.ts +5 -0
  382. package/dist/types/notification/settings/put/index.d.ts +5 -0
  383. package/dist/types/notification/settings/put/types.d.ts +17 -0
  384. package/dist/types/notification/static.d.ts +4 -0
  385. package/dist/types/notification/types.d.ts +1 -0
  386. package/dist/types/people/api-models.d.ts +34 -0
  387. package/dist/types/people/api-models.v2.d.ts +25 -0
  388. package/dist/types/people/api-models.v4.d.ts +81 -0
  389. package/dist/types/people/client.d.ts +15 -0
  390. package/dist/types/people/index.d.ts +3 -0
  391. package/dist/types/people/person-details/client.d.ts +5 -0
  392. package/dist/types/people/person-details/generate-endpoint.d.ts +2 -0
  393. package/dist/types/people/person-details/generate-parameters.d.ts +5 -0
  394. package/dist/types/people/person-details/index.d.ts +4 -0
  395. package/dist/types/people/person-details/types.d.ts +30 -0
  396. package/dist/types/people/person-photo/client.d.ts +5 -0
  397. package/dist/types/people/person-photo/generate-endpoint.d.ts +2 -0
  398. package/dist/types/people/person-photo/generate-parameters.d.ts +5 -0
  399. package/dist/types/people/person-photo/index.d.ts +4 -0
  400. package/dist/types/people/person-photo/types.d.ts +16 -0
  401. package/dist/types/people/query/client.d.ts +5 -0
  402. package/dist/types/people/query/generate-endpoint.d.ts +2 -0
  403. package/dist/types/people/query/generate-parameters.d.ts +5 -0
  404. package/dist/types/people/query/index.d.ts +4 -0
  405. package/dist/types/people/query/types.d.ts +17 -0
  406. package/dist/types/people/static.d.ts +4 -0
  407. package/dist/types/provider.d.ts +37 -0
  408. package/dist/types/types.d.ts +17 -0
  409. package/dist/types/version.d.ts +1 -0
  410. package/package.json +85 -0
  411. package/src/bookmarks/api-models.ts +46 -0
  412. package/src/bookmarks/client.ts +132 -0
  413. package/src/bookmarks/delete/client.ts +35 -0
  414. package/src/bookmarks/delete/generate-endpoint.ts +24 -0
  415. package/src/bookmarks/delete/generate-parameters.ts +25 -0
  416. package/src/bookmarks/delete/index.ts +6 -0
  417. package/src/bookmarks/delete/types-v1.ts +2 -0
  418. package/src/bookmarks/delete/types.ts +35 -0
  419. package/src/bookmarks/favorites/delete/client.ts +35 -0
  420. package/src/bookmarks/favorites/delete/generate-endpoint.ts +19 -0
  421. package/src/bookmarks/favorites/delete/generate-parameters.ts +25 -0
  422. package/src/bookmarks/favorites/delete/index.ts +6 -0
  423. package/src/bookmarks/favorites/delete/types-v1.ts +2 -0
  424. package/src/bookmarks/favorites/delete/types.ts +33 -0
  425. package/src/bookmarks/favorites/head/client.ts +35 -0
  426. package/src/bookmarks/favorites/head/generate-endpoint.ts +19 -0
  427. package/src/bookmarks/favorites/head/generate-parameters.ts +28 -0
  428. package/src/bookmarks/favorites/head/index.ts +6 -0
  429. package/src/bookmarks/favorites/head/types.ts +35 -0
  430. package/src/bookmarks/favorites/post/client.ts +35 -0
  431. package/src/bookmarks/favorites/post/generate-endpoint.ts +18 -0
  432. package/src/bookmarks/favorites/post/generate-parameters.ts +28 -0
  433. package/src/bookmarks/favorites/post/index.ts +6 -0
  434. package/src/bookmarks/favorites/post/types.ts +35 -0
  435. package/src/bookmarks/get/client.ts +30 -0
  436. package/src/bookmarks/get/generate-endpoint.ts +24 -0
  437. package/src/bookmarks/get/generate-parameters.ts +18 -0
  438. package/src/bookmarks/get/index.ts +6 -0
  439. package/src/bookmarks/get/types.ts +39 -0
  440. package/src/bookmarks/getAll/client.ts +30 -0
  441. package/src/bookmarks/getAll/generate-endpoint.ts +15 -0
  442. package/src/bookmarks/getAll/generate-parameters.ts +18 -0
  443. package/src/bookmarks/getAll/index.ts +6 -0
  444. package/src/bookmarks/getAll/types.ts +21 -0
  445. package/src/bookmarks/index.ts +4 -0
  446. package/src/bookmarks/patch/client.ts +30 -0
  447. package/src/bookmarks/patch/generate-endpoint.ts +18 -0
  448. package/src/bookmarks/patch/generate-parameters.ts +28 -0
  449. package/src/bookmarks/patch/index.ts +6 -0
  450. package/src/bookmarks/patch/types.ts +45 -0
  451. package/src/bookmarks/post/client.ts +30 -0
  452. package/src/bookmarks/post/generate-endpoint.ts +18 -0
  453. package/src/bookmarks/post/generate-parameters.ts +28 -0
  454. package/src/bookmarks/post/index.ts +6 -0
  455. package/src/bookmarks/post/types.ts +58 -0
  456. package/src/bookmarks/types.ts +1 -0
  457. package/src/configurator.ts +8 -0
  458. package/src/context/api-models.ts +42 -0
  459. package/src/context/client.ts +76 -0
  460. package/src/context/get/client.ts +33 -0
  461. package/src/context/get/generate-endpoint.ts +25 -0
  462. package/src/context/get/generate-parameters.ts +23 -0
  463. package/src/context/get/index.ts +8 -0
  464. package/src/context/get/types.ts +45 -0
  465. package/src/context/index.ts +6 -0
  466. package/src/context/query/client.ts +35 -0
  467. package/src/context/query/generate-endpoint.ts +67 -0
  468. package/src/context/query/generate-parameters.ts +23 -0
  469. package/src/context/query/index.ts +8 -0
  470. package/src/context/query/types.ts +56 -0
  471. package/src/context/related/client.ts +35 -0
  472. package/src/context/related/generate-endpoint.ts +63 -0
  473. package/src/context/related/generate-parameters.ts +23 -0
  474. package/src/context/related/index.ts +8 -0
  475. package/src/context/related/types.ts +61 -0
  476. package/src/context/static.ts +6 -0
  477. package/src/context/types.ts +1 -0
  478. package/src/errors.ts +8 -0
  479. package/src/index.ts +6 -0
  480. package/src/module.ts +104 -0
  481. package/src/notification/api-models.ts +70 -0
  482. package/src/notification/client.ts +170 -0
  483. package/src/notification/index.ts +6 -0
  484. package/src/notification/notification/delete/client.ts +37 -0
  485. package/src/notification/notification/delete/generate-endpoint.ts +24 -0
  486. package/src/notification/notification/delete/generate-parameters.ts +32 -0
  487. package/src/notification/notification/delete/index.ts +8 -0
  488. package/src/notification/notification/delete/types.ts +44 -0
  489. package/src/notification/notification/get/client.ts +33 -0
  490. package/src/notification/notification/get/generate-endpoint.ts +25 -0
  491. package/src/notification/notification/get/generate-parameters.ts +22 -0
  492. package/src/notification/notification/get/index.ts +8 -0
  493. package/src/notification/notification/get/types.ts +44 -0
  494. package/src/notification/notification/getAll/client.ts +37 -0
  495. package/src/notification/notification/getAll/generate-endpoint.ts +25 -0
  496. package/src/notification/notification/getAll/generate-parameters.ts +22 -0
  497. package/src/notification/notification/getAll/index.ts +8 -0
  498. package/src/notification/notification/getAll/types.ts +44 -0
  499. package/src/notification/notification/index.ts +5 -0
  500. package/src/notification/notification/patch/client.ts +37 -0
  501. package/src/notification/notification/patch/generate-endpoint.ts +24 -0
  502. package/src/notification/notification/patch/generate-parameters.ts +32 -0
  503. package/src/notification/notification/patch/index.ts +8 -0
  504. package/src/notification/notification/patch/types.ts +45 -0
  505. package/src/notification/notification/post/client.ts +37 -0
  506. package/src/notification/notification/post/generate-endpoint.ts +25 -0
  507. package/src/notification/notification/post/generate-parameters.ts +32 -0
  508. package/src/notification/notification/post/index.ts +8 -0
  509. package/src/notification/notification/post/types.ts +57 -0
  510. package/src/notification/settings/get/client.ts +37 -0
  511. package/src/notification/settings/get/generate-endpoint.ts +25 -0
  512. package/src/notification/settings/get/generate-parameters.ts +22 -0
  513. package/src/notification/settings/get/index.ts +8 -0
  514. package/src/notification/settings/get/types.ts +44 -0
  515. package/src/notification/settings/put/client.ts +37 -0
  516. package/src/notification/settings/put/generate-endpoint.ts +25 -0
  517. package/src/notification/settings/put/generate-parameters.ts +34 -0
  518. package/src/notification/settings/put/index.ts +8 -0
  519. package/src/notification/settings/put/types.ts +38 -0
  520. package/src/notification/static.ts +6 -0
  521. package/src/notification/types.ts +1 -0
  522. package/src/people/api-models.ts +52 -0
  523. package/src/people/api-models.v2.ts +31 -0
  524. package/src/people/api-models.v4.ts +100 -0
  525. package/src/people/client.ts +109 -0
  526. package/src/people/index.ts +5 -0
  527. package/src/people/person-details/client.ts +33 -0
  528. package/src/people/person-details/generate-endpoint.ts +28 -0
  529. package/src/people/person-details/generate-parameters.ts +22 -0
  530. package/src/people/person-details/index.ts +6 -0
  531. package/src/people/person-details/types.ts +54 -0
  532. package/src/people/person-photo/client.ts +33 -0
  533. package/src/people/person-photo/generate-endpoint.ts +25 -0
  534. package/src/people/person-photo/generate-parameters.ts +22 -0
  535. package/src/people/person-photo/index.ts +6 -0
  536. package/src/people/person-photo/types.ts +24 -0
  537. package/src/people/query/client.ts +33 -0
  538. package/src/people/query/generate-endpoint.ts +26 -0
  539. package/src/people/query/generate-parameters.ts +22 -0
  540. package/src/people/query/index.ts +6 -0
  541. package/src/people/query/types.ts +28 -0
  542. package/src/people/static.ts +4 -0
  543. package/src/provider.ts +115 -0
  544. package/src/types.ts +46 -0
  545. package/src/version.ts +2 -0
  546. package/tsconfig.json +38 -0
@@ -0,0 +1,37 @@
1
+ import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import { ClientMethod } from '../../../types';
3
+ import { ApiVersion } from '../../static';
4
+
5
+ import { generateParameters } from './generate-parameters';
6
+
7
+ import type {
8
+ GetUserNotificationSettingsArgs,
9
+ GetUserNotificationsSettingsResult,
10
+ GetUserNotificationSettingsResponse,
11
+ } from './types';
12
+
13
+ /**
14
+ * Method for fetching user notification settings from the notifications service
15
+ * @param client - client for execution of request
16
+ * @param version - version of API to call
17
+ * @param method - client method to call
18
+ */
19
+ export const getUserNotificationSettings =
20
+ <
21
+ TVersion extends string = keyof typeof ApiVersion,
22
+ TMethod extends keyof ClientMethod = keyof ClientMethod,
23
+ TClient extends IHttpClient = IHttpClient,
24
+ >(
25
+ client: TClient,
26
+ version: TVersion,
27
+ method: TMethod = 'json' as TMethod,
28
+ ) =>
29
+ <T = GetUserNotificationSettingsResponse<TVersion>>(
30
+ args: GetUserNotificationSettingsArgs<TVersion>,
31
+ init?: ClientRequestInit<TClient, T>,
32
+ ): GetUserNotificationsSettingsResult<TVersion, TMethod, T> =>
33
+ client[method](
34
+ ...generateParameters<T, TVersion, TClient>(version, args, init),
35
+ ) as GetUserNotificationsSettingsResult<TVersion, TMethod, T>;
36
+
37
+ export default getUserNotificationSettings;
@@ -0,0 +1,25 @@
1
+ import { UnsupportedApiVersion } from '../../../errors';
2
+ import { ApiVersion } from '../..';
3
+
4
+ import type { GetUserNotificationSettingsArgs } from './types';
5
+
6
+ /**
7
+ * Method for generating endpoint for getting all notifications
8
+ */
9
+ export const generateEndpoint = <TVersion extends string = keyof typeof ApiVersion>(
10
+ version: TVersion,
11
+ args: GetUserNotificationSettingsArgs<TVersion>,
12
+ ) => {
13
+ const apiVersion = ApiVersion[version as keyof typeof ApiVersion] ?? version;
14
+ switch (apiVersion) {
15
+ case ApiVersion.v2:
16
+ throw new UnsupportedApiVersion(version);
17
+ case ApiVersion.v1:
18
+ default: {
19
+ const { userId } = args as { userId: string };
20
+ const params = new URLSearchParams();
21
+ params.append('api-version', apiVersion);
22
+ return `/person/${userId}/notifications/settings/?${String(params)}`;
23
+ }
24
+ }
25
+ };
@@ -0,0 +1,22 @@
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import { ApiVersion } from '../../static';
3
+ import { ApiClientArguments } from '../../types';
4
+
5
+ import { generateEndpoint } from './generate-endpoint';
6
+ import { GetUserNotificationSettingsArgs } from './types';
7
+
8
+ /** function for creating http client arguments */
9
+ export const generateParameters = <
10
+ TResult,
11
+ TVersion extends string = keyof typeof ApiVersion,
12
+ TClient extends IHttpClient = IHttpClient,
13
+ >(
14
+ version: TVersion,
15
+ args: GetUserNotificationSettingsArgs<TVersion>,
16
+ init?: ClientRequestInit<TClient, TResult>,
17
+ ): ApiClientArguments<TClient, TResult> => {
18
+ const path = generateEndpoint(version, args);
19
+ return [path, init];
20
+ };
21
+
22
+ export default generateParameters;
@@ -0,0 +1,8 @@
1
+ export { ApiVersion } from '../..';
2
+
3
+ export { generateEndpoint } from './generate-endpoint';
4
+ export { generateParameters } from './generate-parameters';
5
+
6
+ export * from './types';
7
+
8
+ export { getUserNotificationSettings, default } from './client';
@@ -0,0 +1,44 @@
1
+ import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import { ClientMethod } from '../../../types';
3
+ import { ApiNotificationSettingsEntity } from '../../api-models';
4
+ import { ApiVersion } from '../../static';
5
+
6
+ type GetUserNotificationSettingsArgs_v1 = {
7
+ userId: string;
8
+ };
9
+
10
+ type GetUserNotificationSettingsArgs_v2 = GetUserNotificationSettingsArgs_v1;
11
+
12
+ type GetUserNotificationSettingsArgsTypes = {
13
+ [ApiVersion.v1]: GetUserNotificationSettingsArgs_v1;
14
+ [ApiVersion.v2]: GetUserNotificationSettingsArgs_v2;
15
+ };
16
+
17
+ export type GetUserNotificationSettingsArgs<T extends string> = T extends keyof typeof ApiVersion
18
+ ? GetUserNotificationSettingsArgsTypes[(typeof ApiVersion)[T]]
19
+ : unknown;
20
+
21
+ type GetUserNotificationSettingsResponseTypes = {
22
+ [ApiVersion.v1]: ApiNotificationSettingsEntity<ApiVersion.v1>;
23
+ [ApiVersion.v2]: ApiNotificationSettingsEntity<ApiVersion.v2>;
24
+ };
25
+
26
+ export type GetUserNotificationSettingsResponse<T> = T extends keyof typeof ApiVersion
27
+ ? GetUserNotificationSettingsResponseTypes[(typeof ApiVersion)[T]]
28
+ : unknown;
29
+
30
+ export type GetUserNotificationSettingsFn<
31
+ TVersion extends string = keyof typeof ApiVersion,
32
+ TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
33
+ TClient extends IHttpClient = IHttpClient,
34
+ TResult = GetUserNotificationSettingsResponse<TVersion>,
35
+ > = (
36
+ args: GetUserNotificationSettingsArgs<TVersion>,
37
+ init?: ClientRequestInit<TClient, TResult>,
38
+ ) => GetUserNotificationsSettingsResult<TVersion, TMethod, TResult>;
39
+
40
+ export type GetUserNotificationsSettingsResult<
41
+ TVersion extends string = keyof typeof ApiVersion,
42
+ TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
43
+ TResult = GetUserNotificationSettingsResponse<TVersion>,
44
+ > = ClientMethod<TResult>[TMethod];
@@ -0,0 +1,37 @@
1
+ import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import { ClientMethod } from '../../../types';
3
+ import { ApiVersion } from '../../static';
4
+
5
+ import { generateParameters } from './generate-parameters';
6
+
7
+ import type {
8
+ PutUserNotificationSettingsArgs,
9
+ PutUserNotificationSettingsResult,
10
+ PutUserNotificationSettingsResponse,
11
+ } from './types';
12
+
13
+ /**
14
+ * Method for fetching user notification settings from the notifications service
15
+ * @param client - client for execution of request
16
+ * @param version - version of API to call
17
+ * @param method - client method to call
18
+ */
19
+ export const updateUserNotificationSettings =
20
+ <
21
+ TVersion extends string = keyof typeof ApiVersion,
22
+ TMethod extends keyof ClientMethod = keyof ClientMethod,
23
+ TClient extends IHttpClient = IHttpClient,
24
+ >(
25
+ client: TClient,
26
+ version: TVersion,
27
+ method: TMethod = 'json' as TMethod,
28
+ ) =>
29
+ <T = PutUserNotificationSettingsResponse<TVersion>>(
30
+ args: PutUserNotificationSettingsArgs<TVersion>,
31
+ init?: ClientRequestInit<TClient, T>,
32
+ ): PutUserNotificationSettingsResult<TVersion, TMethod, T> =>
33
+ client[method](
34
+ ...generateParameters<T, TVersion, TClient>(version, args, init),
35
+ ) as PutUserNotificationSettingsResult<TVersion, TMethod, T>;
36
+
37
+ export default updateUserNotificationSettings;
@@ -0,0 +1,25 @@
1
+ import { UnsupportedApiVersion } from '../../../errors';
2
+ import { ApiVersion } from '../..';
3
+
4
+ import type { PutUserNotificationSettingsArgs } from './types';
5
+
6
+ /**
7
+ * Method for generating endpoint for getting all notifications
8
+ */
9
+ export const generateEndpoint = <TVersion extends string = keyof typeof ApiVersion>(
10
+ version: TVersion,
11
+ args: PutUserNotificationSettingsArgs<TVersion>,
12
+ ) => {
13
+ const apiVersion = ApiVersion[version as keyof typeof ApiVersion] ?? version;
14
+ switch (apiVersion) {
15
+ case ApiVersion.v2:
16
+ throw new UnsupportedApiVersion(version);
17
+ case ApiVersion.v1:
18
+ default: {
19
+ const { userId } = args as { userId: string };
20
+ const params = new URLSearchParams();
21
+ params.append('api-version', apiVersion);
22
+ return `/person/${userId}/notifications/settings/?${String(params)}`;
23
+ }
24
+ }
25
+ };
@@ -0,0 +1,34 @@
1
+ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+ import { ApiVersion } from '../../static';
3
+ import { ApiClientArguments } from '../../types';
4
+
5
+ import { generateEndpoint } from './generate-endpoint';
6
+ import { PutUserNotificationSettingsArgs } from './types';
7
+
8
+ /** function for creating http client arguments */
9
+ export const generateParameters = <
10
+ TResult,
11
+ TVersion extends string = keyof typeof ApiVersion,
12
+ TClient extends IHttpClient = IHttpClient,
13
+ >(
14
+ version: TVersion,
15
+ args: PutUserNotificationSettingsArgs<TVersion>,
16
+ init?: ClientRequestInit<TClient, TResult>,
17
+ ): ApiClientArguments<TClient, TResult> => {
18
+ const path = generateEndpoint(version, args);
19
+ //add versions switch case later
20
+
21
+ //Not sure why this is needed, defaults to application/problem+json failing the request
22
+ const headers = new Headers();
23
+ headers.append('content-type', 'application/json');
24
+
25
+ const requestParams: ClientRequestInit<TClient, TResult> = Object.assign(
26
+ {},
27
+ { method: 'put', body: JSON.stringify(args), headers: headers },
28
+ init,
29
+ );
30
+
31
+ return [path, requestParams];
32
+ };
33
+
34
+ export default generateParameters;
@@ -0,0 +1,8 @@
1
+ export { ApiVersion } from '../..';
2
+
3
+ export { generateEndpoint } from './generate-endpoint';
4
+ export { generateParameters } from './generate-parameters';
5
+
6
+ export * from './types';
7
+
8
+ export { updateUserNotificationSettings, default } from './client';
@@ -0,0 +1,38 @@
1
+ import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+ import { ClientMethod } from '../../../types';
3
+ import { ApiNotificationSettingsEntity } from '../../api-models';
4
+ import { ApiVersion } from '../../static';
5
+
6
+ type PutUserNotificationSettingsArgsTypes = {
7
+ [ApiVersion.v1]: ApiNotificationSettingsEntity<ApiVersion.v1>;
8
+ [ApiVersion.v2]: ApiNotificationSettingsEntity<ApiVersion.v2>;
9
+ };
10
+
11
+ export type PutUserNotificationSettingsArgs<T extends string> = T extends keyof typeof ApiVersion
12
+ ? PutUserNotificationSettingsArgsTypes[(typeof ApiVersion)[T]]
13
+ : unknown;
14
+
15
+ type GetUserNotificationSettingsResponseTypes = {
16
+ [ApiVersion.v2]: ApiNotificationSettingsEntity<ApiVersion.v2>;
17
+ [ApiVersion.v1]: ApiNotificationSettingsEntity<ApiVersion.v1>;
18
+ };
19
+
20
+ export type PutUserNotificationSettingsResponse<T> = T extends keyof typeof ApiVersion
21
+ ? GetUserNotificationSettingsResponseTypes[(typeof ApiVersion)[T]]
22
+ : unknown;
23
+
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>,
29
+ > = (
30
+ args: PutUserNotificationSettingsArgs<TVersion>,
31
+ init?: ClientRequestInit<TClient, TResult>,
32
+ ) => PutUserNotificationSettingsResult<TVersion, TMethod, TResult>;
33
+
34
+ export type PutUserNotificationSettingsResult<
35
+ TVersion extends string = keyof typeof ApiVersion,
36
+ TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
37
+ TResult = PutUserNotificationSettingsResponse<TVersion>,
38
+ > = ClientMethod<TResult>[TMethod];
@@ -0,0 +1,6 @@
1
+ /** index of api versions of context service */
2
+ export enum ApiVersion {
3
+ 'v1' = '1.0',
4
+ /** not in use atm */
5
+ 'v2' = '2.0',
6
+ }
@@ -0,0 +1 @@
1
+ export { ClientMethodType, ClientMethod, ApiClientArguments } from '..';
@@ -0,0 +1,52 @@
1
+ import { ApiPerson_v2 } from './api-models.v2';
2
+ import { ApiPerson_v4 } from './api-models.v4';
3
+ import { ApiVersion } from './static';
4
+
5
+ export type ApiProjectMaster = {
6
+ id: string;
7
+ name?: string;
8
+ };
9
+
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;
20
+ };
21
+
22
+ export type ApiInvitationStatus = 'Accepted' | 'Pending' | 'NotSent';
23
+
24
+ export type ApiProfileAccountType =
25
+ | 'Employee'
26
+ | 'Consultant'
27
+ | 'Enterprise'
28
+ | 'External'
29
+ | 'External Hire';
30
+
31
+ // TODO what are these?
32
+ export type ApiAccountClassification = 'Unclassified' | 'Internal' | 'External';
33
+
34
+ export type ApiProfileAccountLink = {
35
+ azureUniqueId: string;
36
+ mail?: string;
37
+ isPrimaryAccount?: boolean;
38
+ preferredContactMail?: string;
39
+ isExpired?: boolean;
40
+ upn?: string;
41
+ };
42
+
43
+ export type ApiPersonMap = {
44
+ [ApiVersion.v2]: ApiPerson_v2;
45
+ [ApiVersion.v4]: ApiPerson_v4;
46
+ };
47
+
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;
@@ -0,0 +1,31 @@
1
+ import {
2
+ ApiAccountClassification,
3
+ ApiInvitationStatus,
4
+ ApiProfileAccountLink,
5
+ ApiProfileAccountType,
6
+ } from './api-models';
7
+
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;
31
+ };
@@ -0,0 +1,100 @@
1
+ import {
2
+ ApiAccountClassification,
3
+ ApiInvitationStatus,
4
+ ApiProfileAccountLink,
5
+ ApiProfileAccountType,
6
+ ApiProjectMaster,
7
+ } from './api-models';
8
+
9
+ export type ApiPerson_v4 = {
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
+ upn?: string;
19
+ isResourceOwner?: boolean;
20
+ isExpired?: boolean;
21
+ expiredDate?: string;
22
+ isPrimaryAccount?: boolean;
23
+ preferredContactMail?: string;
24
+ accountType?: ApiProfileAccountType;
25
+
26
+ // TODO is this default
27
+ invitationStatus?: ApiInvitationStatus;
28
+ accountClassification?: ApiAccountClassification;
29
+ managerAzureUniqueId?: string;
30
+
31
+ // TODO is this default
32
+ linkedAccounts?: Array<ApiProfileAccountLink>;
33
+ };
34
+
35
+ export type ApiCompanyInfo_v4 = {
36
+ id: string;
37
+ name?: string;
38
+ };
39
+
40
+ export type ApiPersonRole_v4 = {
41
+ name?: string;
42
+ displayName?: string;
43
+ sourceSystem?: string;
44
+ type?: string;
45
+ isActive?: boolean;
46
+ activeToUtc?: string;
47
+ onDemandSupport?: boolean;
48
+ scopes?: Array<ApiPersonRoleScope_v4>;
49
+ };
50
+
51
+ export type ApiPersonRoleScope_v4 = {
52
+ type?: string;
53
+ values?: string[];
54
+ valueType?: string;
55
+ };
56
+
57
+ export type ApiPersonPosition_v4 = {
58
+ positionId: string;
59
+ positionExternalId?: string;
60
+ id: string;
61
+ parentPositionId?: string;
62
+ taskOwnerIds?: string[];
63
+ name?: string;
64
+ obs?: string;
65
+ basePosition: ApiPersonBasePosition_v4;
66
+ project: ApiPersonProject_v4;
67
+ appliesFrom: string;
68
+ appliesTo: string;
69
+ workload?: number;
70
+ };
71
+
72
+ export type ApiPersonBasePosition_v4 = {
73
+ id: string;
74
+ name?: string;
75
+ type?: string;
76
+ discipline?: string;
77
+ };
78
+
79
+ export type ApiPersonProject_v4 = {
80
+ id: string;
81
+ name?: string;
82
+ domainId?: string;
83
+ type?: string;
84
+ };
85
+
86
+ export type ApiPersonContract_v4 = {
87
+ id: string;
88
+ name?: string;
89
+ contractNumber?: string;
90
+ companyId?: string;
91
+ companyName?: string;
92
+ project: ApiPersonProject_v4;
93
+ projectMaster: ApiProjectMaster;
94
+ positions: Array<ApiPersonPosition_v4>;
95
+ };
96
+
97
+ export type ApiCompanyInfoV4 = {
98
+ id: string;
99
+ name?: string;
100
+ };
@@ -0,0 +1,109 @@
1
+ import { IHttpClient, ClientRequestInit } from '@equinor/fusion-framework-module-http/client';
2
+
3
+ import type { ClientDataMethod, ClientMethod } from '../types';
4
+ import { ApiVersion } from './static';
5
+
6
+ import {
7
+ client as personDetailClient,
8
+ ApiResponse as PersonDetailApiResponse,
9
+ ApiResult as PersonDetailResult,
10
+ SupportedApiVersion as PersonDetailSupportedApiVersion,
11
+ ApiRequestArgs as PersonDetailApiRequestArgs,
12
+ } from './person-details';
13
+
14
+ import {
15
+ client as personQueryClient,
16
+ ApiResponse as PersonQueryApiResponse,
17
+ ApiResult as PersonQueryResult,
18
+ SupportedApiVersion as PersonQuerySupportedApiVersion,
19
+ ApiRequestArgs as PersonQueryApiRequestArgs,
20
+ } from './query';
21
+
22
+ import {
23
+ client as personPhotoClient,
24
+ ApiResponse as PersonPhotoApiResponse,
25
+ ApiResult as PersonPhotoResult,
26
+ SupportedApiVersion as PersonPhotoSupportedApiVersion,
27
+ ApiRequestArgs as PersonPhotoApiRequestArgs,
28
+ } from './person-photo';
29
+
30
+ export class PeopleApiClient<
31
+ // TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
32
+ TClient extends IHttpClient = IHttpClient,
33
+ > {
34
+ get Version(): typeof ApiVersion {
35
+ return ApiVersion;
36
+ }
37
+
38
+ constructor(protected _client: TClient) {}
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
+ }
61
+
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
+ }
79
+
80
+ /**
81
+ * Photo person service
82
+ */
83
+ public photo<
84
+ TVersion extends PersonPhotoSupportedApiVersion,
85
+ TArgs extends PersonPhotoApiRequestArgs<TVersion>,
86
+ TResult extends Blob = 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
+ }
97
+ }
98
+
99
+ // const oo = new PeopleApiClient(null).get('v4', 'fetch', { azureId: '123' });
100
+ // const o2 = await new PeopleApiClient(null).get('v4', 'fetch', {
101
+ // azureId: '123',
102
+ // expand: ['roles'],
103
+ // });
104
+ // const o3 = await new PeopleApiClient(null).get('v4', 'fetch', {
105
+ // azureId: '123',
106
+ // expand: ['companies', 'roles'],
107
+ // });
108
+
109
+ export default PeopleApiClient;
@@ -0,0 +1,5 @@
1
+ export { PeopleApiClient, default } from './client';
2
+
3
+ export { ApiVersion } from './static';
4
+
5
+ export * from './api-models';
@@ -0,0 +1,33 @@
1
+ import { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-module-http/client';
2
+
3
+ import { generateParameters } from './generate-parameters';
4
+
5
+ import type { ClientMethod } from '../../types';
6
+ import type { ApiResponse, ApiResult, ApiRequestArgs, SupportedApiVersion } from './types';
7
+
8
+ /**
9
+ * Method for fetching context item from context service
10
+ * @param client - client for execution of request
11
+ * @param version - version of API to call
12
+ * @param method - client method to call
13
+ */
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>;
32
+
33
+ export default client;
@@ -0,0 +1,28 @@
1
+ import { UnsupportedApiVersion } from '../../errors';
2
+ import { ApiVersion } from '../static';
3
+
4
+ import type { ApiRequestArgs, SupportedApiVersion } from './types';
5
+
6
+ /**
7
+ * Method for generating endpoint for getting context by id
8
+ */
9
+ export const generateEndpoint = <TVersion extends SupportedApiVersion>(
10
+ version: TVersion,
11
+ args: ApiRequestArgs<TVersion>,
12
+ ) => {
13
+ const apiVersion = ApiVersion[version as keyof typeof ApiVersion] ?? version;
14
+ switch (apiVersion) {
15
+ case ApiVersion.v4: {
16
+ const { azureId, expand } = args;
17
+ const params = new URLSearchParams();
18
+ params.append('api-version', apiVersion);
19
+ if (expand) {
20
+ params.append('$expand', expand.join(','));
21
+ }
22
+ return `/persons/${azureId}?${String(params)}`;
23
+ }
24
+ default: {
25
+ throw new UnsupportedApiVersion(version);
26
+ }
27
+ }
28
+ };