@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.
- package/CHANGELOG.md +103 -98
- package/dist/esm/bookmarks/api-version.js.map +1 -1
- package/dist/esm/bookmarks/client.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark-apply.get.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark.delete.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark.get.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark.patch.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/bookmark.post.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/user-bookmark-favourite.delete.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/user-bookmark-favourite.head.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/user-bookmark-favourite.post.js.map +1 -1
- package/dist/esm/bookmarks/endpoints/user-bookmarks.get.js.map +1 -1
- package/dist/esm/bookmarks/schemas.js +1 -3
- package/dist/esm/bookmarks/schemas.js.map +1 -1
- package/dist/esm/bookmarks/selectors.js.map +1 -1
- package/dist/esm/context/client.js +2 -2
- package/dist/esm/context/client.js.map +1 -1
- package/dist/esm/context/get/client.js.map +1 -1
- package/dist/esm/context/get/generate-endpoint.js +0 -1
- package/dist/esm/context/get/generate-endpoint.js.map +1 -1
- package/dist/esm/context/get/generate-parameters.js.map +1 -1
- package/dist/esm/context/get/types.js.map +1 -1
- package/dist/esm/context/query/client.js.map +1 -1
- package/dist/esm/context/query/generate-endpoint.js +0 -1
- package/dist/esm/context/query/generate-endpoint.js.map +1 -1
- package/dist/esm/context/query/generate-parameters.js.map +1 -1
- package/dist/esm/context/query/types.js.map +1 -1
- package/dist/esm/context/related/client.js.map +1 -1
- package/dist/esm/context/related/generate-endpoint.js +0 -1
- package/dist/esm/context/related/generate-endpoint.js.map +1 -1
- package/dist/esm/context/related/generate-parameters.js.map +1 -1
- package/dist/esm/context/related/types.js.map +1 -1
- package/dist/esm/context/static.js.map +1 -1
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/module.js.map +1 -1
- package/dist/esm/notification/client.js.map +1 -1
- package/dist/esm/notification/notification/delete/client.js.map +1 -1
- package/dist/esm/notification/notification/delete/generate-endpoint.js +0 -1
- package/dist/esm/notification/notification/delete/generate-endpoint.js.map +1 -1
- package/dist/esm/notification/notification/delete/generate-parameters.js.map +1 -1
- package/dist/esm/notification/notification/get/client.js.map +1 -1
- package/dist/esm/notification/notification/get/generate-endpoint.js +0 -1
- package/dist/esm/notification/notification/get/generate-endpoint.js.map +1 -1
- package/dist/esm/notification/notification/get/generate-parameters.js.map +1 -1
- package/dist/esm/notification/notification/getAll/client.js.map +1 -1
- package/dist/esm/notification/notification/getAll/generate-endpoint.js +0 -1
- package/dist/esm/notification/notification/getAll/generate-endpoint.js.map +1 -1
- package/dist/esm/notification/notification/getAll/generate-parameters.js.map +1 -1
- package/dist/esm/notification/notification/patch/client.js.map +1 -1
- package/dist/esm/notification/notification/patch/generate-endpoint.js +0 -1
- package/dist/esm/notification/notification/patch/generate-endpoint.js.map +1 -1
- package/dist/esm/notification/notification/patch/generate-parameters.js.map +1 -1
- package/dist/esm/notification/notification/post/client.js.map +1 -1
- package/dist/esm/notification/notification/post/generate-endpoint.js +0 -1
- package/dist/esm/notification/notification/post/generate-endpoint.js.map +1 -1
- package/dist/esm/notification/notification/post/generate-parameters.js.map +1 -1
- package/dist/esm/notification/settings/get/client.js.map +1 -1
- package/dist/esm/notification/settings/get/generate-endpoint.js +0 -1
- package/dist/esm/notification/settings/get/generate-endpoint.js.map +1 -1
- package/dist/esm/notification/settings/get/generate-parameters.js.map +1 -1
- package/dist/esm/notification/settings/put/client.js.map +1 -1
- package/dist/esm/notification/settings/put/generate-endpoint.js +0 -1
- package/dist/esm/notification/settings/put/generate-endpoint.js.map +1 -1
- package/dist/esm/notification/settings/put/generate-parameters.js.map +1 -1
- package/dist/esm/notification/static.js.map +1 -1
- package/dist/esm/people/client.js.map +1 -1
- package/dist/esm/people/person-details/client.js.map +1 -1
- package/dist/esm/people/person-details/generate-endpoint.js.map +1 -1
- package/dist/esm/people/person-details/generate-parameters.js.map +1 -1
- package/dist/esm/people/person-photo/client.js.map +1 -1
- package/dist/esm/people/person-photo/generate-endpoint.js.map +1 -1
- package/dist/esm/people/person-photo/generate-parameters.js.map +1 -1
- package/dist/esm/people/query/client.js.map +1 -1
- package/dist/esm/people/query/generate-endpoint.js.map +1 -1
- package/dist/esm/people/query/generate-parameters.js.map +1 -1
- package/dist/esm/people/static.js.map +1 -1
- package/dist/esm/people/utils.js.map +1 -1
- package/dist/esm/provider.js.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/bookmarks/api-version.d.ts +2 -2
- package/dist/types/bookmarks/client.d.ts +8 -8
- package/dist/types/bookmarks/endpoints/bookmark-apply.get.d.ts +1 -1
- package/dist/types/bookmarks/endpoints/bookmark.delete.d.ts +1 -1
- package/dist/types/bookmarks/endpoints/bookmark.get.d.ts +1 -1
- package/dist/types/bookmarks/endpoints/bookmark.patch.d.ts +1 -1
- package/dist/types/bookmarks/endpoints/bookmark.post.d.ts +1 -1
- package/dist/types/bookmarks/endpoints/user-bookmark-favourite.delete.d.ts +1 -1
- package/dist/types/bookmarks/endpoints/user-bookmark-favourite.head.d.ts +1 -1
- package/dist/types/bookmarks/endpoints/user-bookmark-favourite.post.d.ts +1 -1
- package/dist/types/bookmarks/endpoints/user-bookmarks.get.d.ts +1 -1
- package/dist/types/bookmarks/selectors.d.ts +1 -1
- package/dist/types/bookmarks/types.d.ts +1 -1
- package/dist/types/configurator.d.ts +1 -1
- package/dist/types/context/client.d.ts +4 -4
- package/dist/types/context/get/client.d.ts +1 -1
- package/dist/types/context/get/types.d.ts +2 -2
- package/dist/types/context/query/client.d.ts +1 -1
- package/dist/types/context/query/generate-parameters.d.ts +1 -1
- package/dist/types/context/query/types.d.ts +2 -2
- package/dist/types/context/related/client.d.ts +1 -1
- package/dist/types/context/related/generate-parameters.d.ts +1 -1
- package/dist/types/context/related/types.d.ts +2 -2
- package/dist/types/context/static.d.ts +2 -2
- package/dist/types/module.d.ts +2 -2
- package/dist/types/notification/client.d.ts +9 -9
- package/dist/types/notification/notification/delete/client.d.ts +2 -2
- package/dist/types/notification/notification/delete/generate-parameters.d.ts +2 -2
- package/dist/types/notification/notification/delete/types.d.ts +3 -3
- package/dist/types/notification/notification/get/client.d.ts +2 -2
- package/dist/types/notification/notification/get/generate-parameters.d.ts +2 -2
- package/dist/types/notification/notification/get/types.d.ts +3 -3
- package/dist/types/notification/notification/getAll/client.d.ts +2 -2
- package/dist/types/notification/notification/getAll/generate-parameters.d.ts +2 -2
- package/dist/types/notification/notification/getAll/types.d.ts +3 -3
- package/dist/types/notification/notification/patch/client.d.ts +2 -2
- package/dist/types/notification/notification/patch/generate-parameters.d.ts +2 -2
- package/dist/types/notification/notification/patch/types.d.ts +3 -3
- package/dist/types/notification/notification/post/client.d.ts +2 -2
- package/dist/types/notification/notification/post/generate-parameters.d.ts +2 -2
- package/dist/types/notification/notification/post/types.d.ts +3 -3
- package/dist/types/notification/settings/get/client.d.ts +2 -2
- package/dist/types/notification/settings/get/generate-parameters.d.ts +2 -2
- package/dist/types/notification/settings/get/types.d.ts +3 -3
- package/dist/types/notification/settings/put/client.d.ts +2 -2
- package/dist/types/notification/settings/put/generate-parameters.d.ts +2 -2
- package/dist/types/notification/settings/put/types.d.ts +3 -3
- package/dist/types/notification/static.d.ts +2 -2
- package/dist/types/people/api-models.d.ts +2 -2
- package/dist/types/people/api-models.v2.d.ts +1 -1
- package/dist/types/people/api-models.v4.d.ts +1 -1
- package/dist/types/people/client.d.ts +4 -4
- package/dist/types/people/person-details/client.d.ts +1 -1
- package/dist/types/people/person-details/types.d.ts +1 -1
- package/dist/types/people/person-photo/client.d.ts +1 -1
- package/dist/types/people/person-photo/types.d.ts +2 -2
- package/dist/types/people/query/client.d.ts +1 -1
- package/dist/types/people/query/types.d.ts +2 -2
- package/dist/types/people/static.d.ts +2 -2
- package/dist/types/people/utils.d.ts +1 -1
- package/dist/types/provider.d.ts +3 -3
- package/dist/types/types.d.ts +1 -1
- package/dist/types/utils.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +5 -5
- package/src/bookmarks/api-version.ts +2 -2
- package/src/bookmarks/client.ts +228 -231
- package/src/bookmarks/endpoints/bookmark-apply.get.ts +58 -58
- package/src/bookmarks/endpoints/bookmark.delete.ts +57 -57
- package/src/bookmarks/endpoints/bookmark.get.ts +62 -62
- package/src/bookmarks/endpoints/bookmark.patch.ts +78 -78
- package/src/bookmarks/endpoints/bookmark.post.ts +68 -68
- package/src/bookmarks/endpoints/user-bookmark-favourite.delete.ts +57 -57
- package/src/bookmarks/endpoints/user-bookmark-favourite.head.ts +57 -57
- package/src/bookmarks/endpoints/user-bookmark-favourite.post.ts +58 -58
- package/src/bookmarks/endpoints/user-bookmarks.get.ts +98 -98
- package/src/bookmarks/schemas.ts +54 -56
- package/src/bookmarks/selectors.ts +24 -24
- package/src/bookmarks/types.ts +6 -6
- package/src/configurator.ts +3 -3
- package/src/context/api-models.ts +19 -19
- package/src/context/client.ts +68 -58
- package/src/context/get/client.ts +18 -18
- package/src/context/get/generate-endpoint.ts +13 -14
- package/src/context/get/generate-parameters.ts +9 -9
- package/src/context/get/types.ts +20 -20
- package/src/context/query/client.ts +22 -22
- package/src/context/query/generate-endpoint.ts +43 -44
- package/src/context/query/generate-parameters.ts +10 -10
- package/src/context/query/types.ts +25 -25
- package/src/context/related/client.ts +22 -22
- package/src/context/related/generate-endpoint.ts +40 -41
- package/src/context/related/generate-parameters.ts +10 -10
- package/src/context/related/types.ts +27 -27
- package/src/context/static.ts +3 -3
- package/src/errors.ts +6 -6
- package/src/module.ts +50 -52
- package/src/notification/api-models.ts +36 -36
- package/src/notification/client.ts +131 -151
- package/src/notification/notification/delete/client.ts +22 -22
- package/src/notification/notification/delete/generate-endpoint.ts +13 -14
- package/src/notification/notification/delete/generate-parameters.ts +18 -18
- package/src/notification/notification/delete/types.ts +21 -21
- package/src/notification/notification/get/client.ts +19 -19
- package/src/notification/notification/get/generate-endpoint.ts +13 -14
- package/src/notification/notification/get/generate-parameters.ts +11 -11
- package/src/notification/notification/get/types.ts +21 -21
- package/src/notification/notification/getAll/client.ts +22 -22
- package/src/notification/notification/getAll/generate-endpoint.ts +13 -14
- package/src/notification/notification/getAll/generate-parameters.ts +11 -11
- package/src/notification/notification/getAll/types.ts +21 -21
- package/src/notification/notification/patch/client.ts +22 -22
- package/src/notification/notification/patch/generate-endpoint.ts +13 -14
- package/src/notification/notification/patch/generate-parameters.ts +18 -18
- package/src/notification/notification/patch/types.ts +22 -22
- package/src/notification/notification/post/client.ts +22 -22
- package/src/notification/notification/post/generate-endpoint.ts +13 -14
- package/src/notification/notification/post/generate-parameters.ts +18 -18
- package/src/notification/notification/post/types.ts +31 -31
- package/src/notification/settings/get/client.ts +22 -22
- package/src/notification/settings/get/generate-endpoint.ts +13 -14
- package/src/notification/settings/get/generate-parameters.ts +11 -11
- package/src/notification/settings/get/types.ts +21 -21
- package/src/notification/settings/put/client.ts +22 -22
- package/src/notification/settings/put/generate-endpoint.ts +13 -14
- package/src/notification/settings/put/generate-parameters.ts +20 -20
- package/src/notification/settings/put/types.ts +20 -20
- package/src/notification/static.ts +3 -3
- package/src/people/api-models.ts +30 -30
- package/src/people/api-models.v2.ts +27 -27
- package/src/people/api-models.v4.ts +79 -79
- package/src/people/client.ts +73 -77
- package/src/people/person-details/client.ts +21 -18
- package/src/people/person-details/generate-endpoint.ts +16 -16
- package/src/people/person-details/generate-parameters.ts +8 -8
- package/src/people/person-details/types.ts +13 -13
- package/src/people/person-photo/client.ts +19 -22
- package/src/people/person-photo/generate-endpoint.ts +13 -13
- package/src/people/person-photo/generate-parameters.ts +8 -8
- package/src/people/person-photo/types.ts +8 -8
- package/src/people/query/client.ts +20 -18
- package/src/people/query/generate-endpoint.ts +14 -14
- package/src/people/query/generate-parameters.ts +8 -8
- package/src/people/query/types.ts +10 -10
- package/src/people/static.ts +2 -2
- package/src/people/utils.ts +20 -20
- package/src/provider.ts +85 -85
- package/src/types.ts +34 -34
- package/src/utils.ts +22 -26
- 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,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;
|
package/dist/types/provider.d.ts
CHANGED
|
@@ -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';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -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
|
*
|
package/dist/types/utils.d.ts
CHANGED
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.1.
|
|
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
|
|
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
|
|
121
|
-
"@equinor/fusion-framework-module": "^
|
|
122
|
-
"@equinor/fusion-framework-module-service-discovery": "^8.0.
|
|
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
|
|
126
|
+
"@equinor/fusion-framework-module": "^4.3.6"
|
|
127
127
|
},
|
|
128
128
|
"scripts": {
|
|
129
129
|
"build": "tsc -b"
|
package/src/bookmarks/client.ts
CHANGED
|
@@ -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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
type CreateBookmarkArg,
|
|
22
|
+
type CreateBookmarkResponse,
|
|
23
|
+
type CreateBookmarkVersion,
|
|
24
|
+
type CreateBookmarksResult,
|
|
25
|
+
createBookmark,
|
|
26
26
|
} from './endpoints/bookmark.post';
|
|
27
27
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
type DeleteBookmarkArg,
|
|
51
|
+
type DeleteBookmarkResponse,
|
|
52
|
+
type DeleteBookmarkVersion,
|
|
53
|
+
deleteBookmark,
|
|
54
54
|
} from './endpoints/bookmark.delete';
|
|
55
55
|
import {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
114
|
-
|
|
113
|
+
TMethod extends keyof ClientMethod<unknown> = keyof ClientMethod<unknown>,
|
|
114
|
+
TClient extends IHttpClient = IHttpClient,
|
|
115
115
|
> {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
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
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
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
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
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;
|