@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,6 +1,6 @@
1
1
  import { ApiVersion } from '../static';
2
- import { ApiPerson_v2 } from '../api-models.v2';
3
- import { ClientMethod } from '../../types';
2
+ import type { ApiPerson_v2 } from '../api-models.v2';
3
+ import type { ClientMethod } from '../../types';
4
4
  export type SupportedApiVersion = Extract<keyof typeof ApiVersion, 'v2'>;
5
5
  type ApiRequestArgsMap = {
6
6
  [ApiVersion.v2]: {
@@ -1,4 +1,4 @@
1
1
  export declare enum ApiVersion {
2
- 'v2' = "2.0",
3
- 'v4' = "4.0"
2
+ v2 = "2.0",
3
+ v4 = "4.0"
4
4
  }
@@ -1,3 +1,3 @@
1
- import { ApiPerson } from './api-models';
1
+ import type { ApiPerson } from './api-models';
2
2
  import { ApiVersion } from './static';
3
3
  export declare const isApiPerson: <V extends keyof typeof ApiVersion>(version: V) => <T>(value: T) => value is T extends ApiPerson<V> ? T : never;
@@ -1,6 +1,6 @@
1
- import { IHttpClient } from '@equinor/fusion-framework-module-http';
2
- import { ClientMethod } from './types';
3
- import { ApiClientFactory } from './types';
1
+ import type { IHttpClient } from '@equinor/fusion-framework-module-http';
2
+ import type { ClientMethod } from './types';
3
+ import type { ApiClientFactory } from './types';
4
4
  import { ContextApiClient } from './context';
5
5
  import BookmarksApiClient from './bookmarks/client';
6
6
  import { NotificationApiClient } from './notification';
@@ -1,4 +1,4 @@
1
- import { ClientRequestInit, IHttpClient, StreamResponse, BlobResult } from '@equinor/fusion-framework-module-http/client';
1
+ import type { ClientRequestInit, IHttpClient, StreamResponse, BlobResult } from '@equinor/fusion-framework-module-http/client';
2
2
  /**
3
3
  * A factory function that creates an instance of an HTTP client.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import type { z } from 'zod';
2
2
  import { type ResponseSelector } from '@equinor/fusion-framework-module-http/selectors';
3
3
  import type { ExtractApiVersion } from './types';
4
4
  /**
@@ -1 +1 @@
1
- export declare const version = "5.1.0";
1
+ export declare const version = "5.1.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-module-services",
3
- "version": "5.1.1-msal-6cf764b628c2afdd64dfd06e42abc953d78556d2",
3
+ "version": "5.1.1",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "main": "dist/esm/index.js",
@@ -117,13 +117,13 @@
117
117
  },
118
118
  "devDependencies": {
119
119
  "typescript": "^5.5.4",
120
- "@equinor/fusion-framework-module-http": "^6.2.1-msal-6cf764b628c2afdd64dfd06e42abc953d78556d2",
121
- "@equinor/fusion-framework-module": "^4.3.6-msal-6cf764b628c2afdd64dfd06e42abc953d78556d2",
122
- "@equinor/fusion-framework-module-service-discovery": "^8.0.6-msal-6cf764b628c2afdd64dfd06e42abc953d78556d2"
120
+ "@equinor/fusion-framework-module": "^4.3.6",
121
+ "@equinor/fusion-framework-module-http": "^6.2.2",
122
+ "@equinor/fusion-framework-module-service-discovery": "^8.0.7"
123
123
  },
124
124
  "peerDependencies": {
125
125
  "odata-query": "^7.0.4",
126
- "@equinor/fusion-framework-module": "^4.3.6-msal-6cf764b628c2afdd64dfd06e42abc953d78556d2"
126
+ "@equinor/fusion-framework-module": "^4.3.6"
127
127
  },
128
128
  "scripts": {
129
129
  "build": "tsc -b"
@@ -1,4 +1,4 @@
1
1
  export enum ApiVersion {
2
- 'v1' = '1.0',
3
- 'v2' = '2.0',
2
+ v1 = '1.0',
3
+ v2 = '2.0',
4
4
  }
@@ -2,69 +2,69 @@ import type { ClientRequestInit, IHttpClient } from '@equinor/fusion-framework-m
2
2
  import type { ClientMethod } from '../types';
3
3
 
4
4
  import {
5
- GetBookmarksArgs,
6
- GetBookmarksResponse,
7
- GetBookmarksResult,
8
- GetBookmarksVersion,
9
- getBookmarks,
5
+ type GetBookmarksArgs,
6
+ type GetBookmarksResponse,
7
+ type GetBookmarksResult,
8
+ type GetBookmarksVersion,
9
+ getBookmarks,
10
10
  } from './endpoints/user-bookmarks.get';
11
11
 
12
12
  import {
13
- GetBookmarkArg,
14
- GetBookmarkResponse,
15
- GetBookmarkResult,
16
- GetBookmarkVersion,
17
- getBookmark,
13
+ type GetBookmarkArg,
14
+ type GetBookmarkResponse,
15
+ type GetBookmarkResult,
16
+ type GetBookmarkVersion,
17
+ getBookmark,
18
18
  } from './endpoints/bookmark.get';
19
19
 
20
20
  import {
21
- CreateBookmarkArg,
22
- CreateBookmarkResponse,
23
- CreateBookmarkVersion,
24
- CreateBookmarksResult,
25
- createBookmark,
21
+ type CreateBookmarkArg,
22
+ type CreateBookmarkResponse,
23
+ type CreateBookmarkVersion,
24
+ type CreateBookmarksResult,
25
+ createBookmark,
26
26
  } from './endpoints/bookmark.post';
27
27
  import {
28
- type PatchBookmarkArg,
29
- type PatchBookmarkResponse,
30
- type PatchBookmarkVersion,
31
- type PatchBookmarksResult,
32
- patchBookmark,
28
+ type PatchBookmarkArg,
29
+ type PatchBookmarkResponse,
30
+ type PatchBookmarkVersion,
31
+ type PatchBookmarksResult,
32
+ patchBookmark,
33
33
  } from './endpoints/bookmark.patch';
34
34
 
35
35
  import {
36
- BookmarkApplyArgs,
37
- BookmarkApplyResponse,
38
- BookmarkApplyResult,
39
- BookmarkApplyVersion,
40
- getBookmarkApply,
36
+ type BookmarkApplyArgs,
37
+ type BookmarkApplyResponse,
38
+ type BookmarkApplyResult,
39
+ type BookmarkApplyVersion,
40
+ getBookmarkApply,
41
41
  } from './endpoints/bookmark-apply.get';
42
42
  import {
43
- AddBookmarkFavouriteArgs,
44
- AddBookmarkFavouriteResponse,
45
- AddBookmarkFavouriteResult,
46
- AddBookmarkFavouriteVersion,
47
- addBookmarkAsFavourite,
43
+ type AddBookmarkFavouriteArgs,
44
+ type AddBookmarkFavouriteResponse,
45
+ type AddBookmarkFavouriteResult,
46
+ type AddBookmarkFavouriteVersion,
47
+ addBookmarkAsFavourite,
48
48
  } from './endpoints/user-bookmark-favourite.post';
49
49
  import {
50
- DeleteBookmarkArg,
51
- DeleteBookmarkResponse,
52
- DeleteBookmarkVersion,
53
- deleteBookmark,
50
+ type DeleteBookmarkArg,
51
+ type DeleteBookmarkResponse,
52
+ type DeleteBookmarkVersion,
53
+ deleteBookmark,
54
54
  } from './endpoints/bookmark.delete';
55
55
  import {
56
- IsFavoriteBookmarkArgs,
57
- IsFavoriteBookmarkResponse,
58
- IsFavoriteBookmarkResult,
59
- IsFavoriteBookmarkVersion,
60
- isFavoriteBookmark,
56
+ type IsFavoriteBookmarkArgs,
57
+ type IsFavoriteBookmarkResponse,
58
+ type IsFavoriteBookmarkResult,
59
+ type IsFavoriteBookmarkVersion,
60
+ isFavoriteBookmark,
61
61
  } from './endpoints/user-bookmark-favourite.head';
62
62
  import {
63
- RemoveBookmarkFavouriteArgs,
64
- RemoveBookmarkFavouriteResponse,
65
- RemoveBookmarkFavouriteResult,
66
- RemoveBookmarkFavouriteVersion,
67
- removeFavoriteBookmark,
63
+ type RemoveBookmarkFavouriteArgs,
64
+ type RemoveBookmarkFavouriteResponse,
65
+ type RemoveBookmarkFavouriteResult,
66
+ type RemoveBookmarkFavouriteVersion,
67
+ removeFavoriteBookmark,
68
68
  } from './endpoints/user-bookmark-favourite.delete';
69
69
 
70
70
  /**
@@ -110,203 +110,200 @@ import {
110
110
  * @template TClient - The HTTP client to use for executing the request.
111
111
  */
112
112
  export class BookmarksApiClient<
113
- TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
114
- TClient extends IHttpClient = IHttpClient,
113
+ TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
114
+ TClient extends IHttpClient = IHttpClient,
115
115
  > {
116
- /**
117
- * Constructs a new instance of the BookmarksClient class.
118
- *
119
- * @param _client - The client instance to use for making API requests.
120
- * @param _method - The client method to use for API requests.
121
- */
122
- constructor(
123
- protected _client: TClient,
124
- protected _method: TMethod,
125
- ) {}
116
+ /**
117
+ * Constructs a new instance of the BookmarksClient class.
118
+ *
119
+ * @param _client - The client instance to use for making API requests.
120
+ * @param _method - The client method to use for API requests.
121
+ */
122
+ constructor(
123
+ protected _client: TClient,
124
+ protected _method: TMethod,
125
+ ) {}
126
126
 
127
- /**
128
- * Fetch a single bookmark
129
- *
130
- * @template TVersion - The version of the API to call
131
- * @template TResponse - The type of the result of the `getBookmark` function
132
- * @param version - The API version to use
133
- * @param args - Additional parameters to pass to the `getBookmark` function
134
- * @returns The result of the `getBookmark` function
135
- */
136
- public get<TVersion extends GetBookmarkVersion, TResponse = GetBookmarkResponse<TVersion>>(
137
- version: TVersion,
138
- args: GetBookmarkArg<TVersion>,
139
- init?: ClientRequestInit<TClient, TResponse>,
140
- ): GetBookmarkResult<TVersion, TMethod, TResponse> {
141
- const fn = getBookmark(version, this._client, this._method);
142
- return fn(args, init);
143
- }
127
+ /**
128
+ * Fetch a single bookmark
129
+ *
130
+ * @template TVersion - The version of the API to call
131
+ * @template TResponse - The type of the result of the `getBookmark` function
132
+ * @param version - The API version to use
133
+ * @param args - Additional parameters to pass to the `getBookmark` function
134
+ * @returns The result of the `getBookmark` function
135
+ */
136
+ public get<TVersion extends GetBookmarkVersion, TResponse = GetBookmarkResponse<TVersion>>(
137
+ version: TVersion,
138
+ args: GetBookmarkArg<TVersion>,
139
+ init?: ClientRequestInit<TClient, TResponse>,
140
+ ): GetBookmarkResult<TVersion, TMethod, TResponse> {
141
+ const fn = getBookmark(version, this._client, this._method);
142
+ return fn(args, init);
143
+ }
144
144
 
145
- /**
146
- * Retrieves the payload for a bookmark using the specified API version.
147
- *
148
- * @template TVersion - The version of the API to call.
149
- * @template TResult - The type of the result of the `getBookmarkPayload` function.
150
- * @param version - The API version to use for the bookmark payload.
151
- * @param args - The arguments to pass to the `getBookmarkPayload` function.
152
- * @returns The result of the `getBookmarkPayload` function.
153
- */
154
- public getPayload<
155
- TVersion extends BookmarkApplyVersion,
156
- TResponse = BookmarkApplyResponse<TVersion>,
157
- >(
158
- version: TVersion,
159
- args: BookmarkApplyArgs<TVersion>,
160
- init?: ClientRequestInit<TClient, TResponse>,
161
- ): BookmarkApplyResult<TVersion, TMethod, TResponse> {
162
- const fn = getBookmarkApply(version, this._client, this._method);
163
- return fn(args, init);
164
- }
145
+ /**
146
+ * Retrieves the payload for a bookmark using the specified API version.
147
+ *
148
+ * @template TVersion - The version of the API to call.
149
+ * @template TResult - The type of the result of the `getBookmarkPayload` function.
150
+ * @param version - The API version to use for the bookmark payload.
151
+ * @param args - The arguments to pass to the `getBookmarkPayload` function.
152
+ * @returns The result of the `getBookmarkPayload` function.
153
+ */
154
+ public getPayload<
155
+ TVersion extends BookmarkApplyVersion,
156
+ TResponse = BookmarkApplyResponse<TVersion>,
157
+ >(
158
+ version: TVersion,
159
+ args: BookmarkApplyArgs<TVersion>,
160
+ init?: ClientRequestInit<TClient, TResponse>,
161
+ ): BookmarkApplyResult<TVersion, TMethod, TResponse> {
162
+ const fn = getBookmarkApply(version, this._client, this._method);
163
+ return fn(args, init);
164
+ }
165
165
 
166
- /**
167
- * Query a person's bookmarks.
168
- *
169
- * @template TVersion - The version of the API to call.
170
- * @template TResponse - The type of the result of the `getBookmarks` function.
171
- * @param version - The API version to use.
172
- * @param args - Additional arguments to pass to the `getBookmarks` function.
173
- * @param init - Optional request initialization options.
174
- * @returns The result of calling the `getBookmarks` function.
175
- */
176
- public query<TVersion extends GetBookmarksVersion, TResponse = GetBookmarksResponse<TVersion>>(
177
- version: TVersion,
178
- args?: GetBookmarksArgs<TVersion>,
179
- init?: ClientRequestInit<TClient, TResponse>,
180
- ): GetBookmarksResult<TVersion, TMethod, TResponse> {
181
- const fn = getBookmarks(version, this._client, this._method);
182
- return fn(args, init);
183
- }
166
+ /**
167
+ * Query a person's bookmarks.
168
+ *
169
+ * @template TVersion - The version of the API to call.
170
+ * @template TResponse - The type of the result of the `getBookmarks` function.
171
+ * @param version - The API version to use.
172
+ * @param args - Additional arguments to pass to the `getBookmarks` function.
173
+ * @param init - Optional request initialization options.
174
+ * @returns The result of calling the `getBookmarks` function.
175
+ */
176
+ public query<TVersion extends GetBookmarksVersion, TResponse = GetBookmarksResponse<TVersion>>(
177
+ version: TVersion,
178
+ args?: GetBookmarksArgs<TVersion>,
179
+ init?: ClientRequestInit<TClient, TResponse>,
180
+ ): GetBookmarksResult<TVersion, TMethod, TResponse> {
181
+ const fn = getBookmarks(version, this._client, this._method);
182
+ return fn(args, init);
183
+ }
184
184
 
185
- /**
186
- * Update a bookmark
187
- *
188
- * @template TVersion - The version of the API to call
189
- * @template TResponse - The type of the result of the `patchBookmark` function
190
- * @param version - The API version to use
191
- * @param args - The parameters to pass to the `patchBookmark` function
192
- * @returns The result of the `patchBookmark` function
193
- */
194
- public patch<
195
- TVersion extends PatchBookmarkVersion,
196
- TResponse = PatchBookmarkResponse<TVersion>,
197
- >(
198
- version: TVersion,
199
- args: PatchBookmarkArg<TVersion>,
200
- init?: ClientRequestInit<TClient, TResponse>,
201
- ): PatchBookmarksResult<TVersion, TMethod, TResponse> {
202
- const fn = patchBookmark(version, this._client, this._method);
203
- return fn(args, init);
204
- }
185
+ /**
186
+ * Update a bookmark
187
+ *
188
+ * @template TVersion - The version of the API to call
189
+ * @template TResponse - The type of the result of the `patchBookmark` function
190
+ * @param version - The API version to use
191
+ * @param args - The parameters to pass to the `patchBookmark` function
192
+ * @returns The result of the `patchBookmark` function
193
+ */
194
+ public patch<TVersion extends PatchBookmarkVersion, TResponse = PatchBookmarkResponse<TVersion>>(
195
+ version: TVersion,
196
+ args: PatchBookmarkArg<TVersion>,
197
+ init?: ClientRequestInit<TClient, TResponse>,
198
+ ): PatchBookmarksResult<TVersion, TMethod, TResponse> {
199
+ const fn = patchBookmark(version, this._client, this._method);
200
+ return fn(args, init);
201
+ }
205
202
 
206
- /**
207
- * Create a new bookmark
208
- *
209
- * @template TVersion - The version of the API to call
210
- * @template TResult - The type of the result of the `postBookmark` function
211
- * @param version - The API version to use
212
- * @param request - The parameters to pass to the `postBookmark` function
213
- * @returns The result of creating the bookmark
214
- */
215
- public create<
216
- TVersion extends CreateBookmarkVersion,
217
- TResponse = CreateBookmarkResponse<TVersion>,
218
- >(
219
- version: TVersion,
220
- request: CreateBookmarkArg<TVersion>,
221
- init?: ClientRequestInit<TClient, TResponse>,
222
- ): CreateBookmarksResult<TVersion, TMethod, TResponse> {
223
- const fn = createBookmark(version, this._client, this._method);
224
- return fn(request, init);
225
- }
203
+ /**
204
+ * Create a new bookmark
205
+ *
206
+ * @template TVersion - The version of the API to call
207
+ * @template TResult - The type of the result of the `postBookmark` function
208
+ * @param version - The API version to use
209
+ * @param request - The parameters to pass to the `postBookmark` function
210
+ * @returns The result of creating the bookmark
211
+ */
212
+ public create<
213
+ TVersion extends CreateBookmarkVersion,
214
+ TResponse = CreateBookmarkResponse<TVersion>,
215
+ >(
216
+ version: TVersion,
217
+ request: CreateBookmarkArg<TVersion>,
218
+ init?: ClientRequestInit<TClient, TResponse>,
219
+ ): CreateBookmarksResult<TVersion, TMethod, TResponse> {
220
+ const fn = createBookmark(version, this._client, this._method);
221
+ return fn(request, init);
222
+ }
226
223
 
227
- /**
228
- * Deletes a bookmark.
229
- *
230
- * @template TVersion - The version of the API to call.
231
- * @template TResponse - The type of the result of the `deleteBookmark` function.
232
- * @param version - The version of the delete bookmark API to use.
233
- * @param args - The arguments to pass to the `deleteBookmark` function.
234
- * @returns The result of the delete bookmark operation.
235
- */
236
- public delete<
237
- TVersion extends DeleteBookmarkVersion,
238
- TResponse = DeleteBookmarkResponse<TVersion>,
239
- >(
240
- version: TVersion,
241
- args: DeleteBookmarkArg<TVersion>,
242
- init?: ClientRequestInit<TClient, TResponse>,
243
- ): GetBookmarkResult<TVersion, TMethod, TResponse> {
244
- const fn = deleteBookmark(version, this._client, this._method);
245
- return fn(args, init);
246
- }
224
+ /**
225
+ * Deletes a bookmark.
226
+ *
227
+ * @template TVersion - The version of the API to call.
228
+ * @template TResponse - The type of the result of the `deleteBookmark` function.
229
+ * @param version - The version of the delete bookmark API to use.
230
+ * @param args - The arguments to pass to the `deleteBookmark` function.
231
+ * @returns The result of the delete bookmark operation.
232
+ */
233
+ public delete<
234
+ TVersion extends DeleteBookmarkVersion,
235
+ TResponse = DeleteBookmarkResponse<TVersion>,
236
+ >(
237
+ version: TVersion,
238
+ args: DeleteBookmarkArg<TVersion>,
239
+ init?: ClientRequestInit<TClient, TResponse>,
240
+ ): GetBookmarkResult<TVersion, TMethod, TResponse> {
241
+ const fn = deleteBookmark(version, this._client, this._method);
242
+ return fn(args, init);
243
+ }
247
244
 
248
- /**
249
- * Check if a bookmark is a favorite.
250
- *
251
- * @template TVersion - The version of the API to call.
252
- * @template TResult - The type of the result of the `verifyBookmarkFavorite` function.
253
- * @param version - The API version to use.
254
- * @param args - The arguments to pass to the `HeadBookmarkFavoriteFn` function.
255
- * @returns The result of the `HeadBookmarksFavoriteResult` function.
256
- */
257
- public isFavorite<
258
- TVersion extends IsFavoriteBookmarkVersion,
259
- TResponse = IsFavoriteBookmarkResponse<TVersion>,
260
- >(
261
- version: TVersion,
262
- args: IsFavoriteBookmarkArgs<TVersion>,
263
- init?: ClientRequestInit<TClient, TResponse>,
264
- ): IsFavoriteBookmarkResult<TVersion, TMethod, TResponse> {
265
- const fn = isFavoriteBookmark(version, this._client, this._method);
266
- return fn(args, init);
267
- }
245
+ /**
246
+ * Check if a bookmark is a favorite.
247
+ *
248
+ * @template TVersion - The version of the API to call.
249
+ * @template TResult - The type of the result of the `verifyBookmarkFavorite` function.
250
+ * @param version - The API version to use.
251
+ * @param args - The arguments to pass to the `HeadBookmarkFavoriteFn` function.
252
+ * @returns The result of the `HeadBookmarksFavoriteResult` function.
253
+ */
254
+ public isFavorite<
255
+ TVersion extends IsFavoriteBookmarkVersion,
256
+ TResponse = IsFavoriteBookmarkResponse<TVersion>,
257
+ >(
258
+ version: TVersion,
259
+ args: IsFavoriteBookmarkArgs<TVersion>,
260
+ init?: ClientRequestInit<TClient, TResponse>,
261
+ ): IsFavoriteBookmarkResult<TVersion, TMethod, TResponse> {
262
+ const fn = isFavoriteBookmark(version, this._client, this._method);
263
+ return fn(args, init);
264
+ }
268
265
 
269
- /**
270
- * Add the provided bookmark to the user's favorites.
271
- *
272
- * @template TVersion - The version of the API to call.
273
- * @template TResponse - The type of the result of the `addBookmarkFavorite` function.
274
- * @param version - The API version to use.
275
- * @param args - The parameters to pass to the `PostBookmarkFavoriteFn` function.
276
- * @returns The result of adding the bookmark to the user's favorites.
277
- */
278
- public addFavourite<
279
- TVersion extends AddBookmarkFavouriteVersion,
280
- TResponse = AddBookmarkFavouriteResponse<TVersion>,
281
- >(
282
- version: TVersion,
283
- args: AddBookmarkFavouriteArgs<TVersion>,
284
- init?: ClientRequestInit<TClient, TResponse>,
285
- ): AddBookmarkFavouriteResult<TVersion, TMethod, TResponse> {
286
- const fn = addBookmarkAsFavourite(version, this._client, this._method);
287
- return fn(args, init);
288
- }
266
+ /**
267
+ * Add the provided bookmark to the user's favorites.
268
+ *
269
+ * @template TVersion - The version of the API to call.
270
+ * @template TResponse - The type of the result of the `addBookmarkFavorite` function.
271
+ * @param version - The API version to use.
272
+ * @param args - The parameters to pass to the `PostBookmarkFavoriteFn` function.
273
+ * @returns The result of adding the bookmark to the user's favorites.
274
+ */
275
+ public addFavourite<
276
+ TVersion extends AddBookmarkFavouriteVersion,
277
+ TResponse = AddBookmarkFavouriteResponse<TVersion>,
278
+ >(
279
+ version: TVersion,
280
+ args: AddBookmarkFavouriteArgs<TVersion>,
281
+ init?: ClientRequestInit<TClient, TResponse>,
282
+ ): AddBookmarkFavouriteResult<TVersion, TMethod, TResponse> {
283
+ const fn = addBookmarkAsFavourite(version, this._client, this._method);
284
+ return fn(args, init);
285
+ }
289
286
 
290
- /**
291
- * Removes the provided bookmark from the user's collection of bookmarks.
292
- *
293
- * @template TVersion - The version of the API to call.
294
- * @template TResult - The type of the result of the `deleteBookmarkFavorite` function.
295
- * @param version - The API version to use for the request.
296
- * @param request - The parameters to pass to the `deleteBookmarkFavorite` function.
297
- * @returns The result of the `deleteBookmarkFavorite` function.
298
- */
299
- public removeFavourite<
300
- TVersion extends RemoveBookmarkFavouriteVersion,
301
- TResponse = RemoveBookmarkFavouriteResponse<TVersion>,
302
- >(
303
- version: TVersion,
304
- request: RemoveBookmarkFavouriteArgs<TVersion>,
305
- init?: ClientRequestInit<TClient, TResponse>,
306
- ): RemoveBookmarkFavouriteResult<TVersion, TMethod, TResponse> {
307
- const fn = removeFavoriteBookmark(version, this._client, this._method);
308
- return fn(request, init);
309
- }
287
+ /**
288
+ * Removes the provided bookmark from the user's collection of bookmarks.
289
+ *
290
+ * @template TVersion - The version of the API to call.
291
+ * @template TResult - The type of the result of the `deleteBookmarkFavorite` function.
292
+ * @param version - The API version to use for the request.
293
+ * @param request - The parameters to pass to the `deleteBookmarkFavorite` function.
294
+ * @returns The result of the `deleteBookmarkFavorite` function.
295
+ */
296
+ public removeFavourite<
297
+ TVersion extends RemoveBookmarkFavouriteVersion,
298
+ TResponse = RemoveBookmarkFavouriteResponse<TVersion>,
299
+ >(
300
+ version: TVersion,
301
+ request: RemoveBookmarkFavouriteArgs<TVersion>,
302
+ init?: ClientRequestInit<TClient, TResponse>,
303
+ ): RemoveBookmarkFavouriteResult<TVersion, TMethod, TResponse> {
304
+ const fn = removeFavoriteBookmark(version, this._client, this._method);
305
+ return fn(request, init);
306
+ }
310
307
  }
311
308
 
312
309
  export default BookmarksApiClient;