Skip to content

Commit ac93b72

Browse files
authored
Merge pull request #233 from takker99:experimental-tag
docs: Mark APIs in `/unstable-api` as experimental and unstable
2 parents 7fec868 + 2100e78 commit ac93b72

File tree

9 files changed

+69
-6
lines changed

9 files changed

+69
-6
lines changed

api/pages/project.ts

+15-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ import { pooledMap } from "@std/async/pool";
2121
import { range } from "@core/iterutil/range";
2222
import { flatten } from "@core/iterutil/async/flatten";
2323

24-
/** Options for {@linkcode get} */
24+
/** Options for {@linkcode get}
25+
*
26+
* @experimental **UNSTABLE**: New API, yet to be vetted.
27+
*/
2528
export interface ListPagesOption<R extends Response | undefined>
2629
extends BaseOptions<R> {
2730
/** the sort of page list to return
@@ -57,6 +60,8 @@ export interface ListPagesOption<R extends Response | undefined>
5760
}
5861

5962
/** Constructs a request for the `/api/pages/:project` endpoint
63+
*
64+
* @experimental **UNSTABLE**: New API, yet to be vetted.
6065
*
6166
* @param project The project name to list pages from
6267
* @param options - Additional configuration options (sorting, pagination, etc.)
@@ -85,6 +90,8 @@ export const makeGetRequest = <R extends Response | undefined>(
8590
};
8691

8792
/** Lists pages from a specified project
93+
*
94+
* @experimental **UNSTABLE**: New API, yet to be vetted.
8895
*
8996
* @param project The project name to list pages from
9097
* @param options Configuration options for pagination and sorting
@@ -117,7 +124,11 @@ export const get = <R extends Response | undefined = Response>(
117124
}, R>
118125
>;
119126

120-
/** Options for {@linkcode list} */
127+
/**
128+
* Options for {@linkcode list}
129+
*
130+
* @experimental **UNSTABLE**: New API, yet to be vetted.
131+
*/
121132
export interface ListPagesStreamOption<R extends Response | undefined>
122133
extends ListPagesOption<R> {
123134
/** The number of requests to make concurrently
@@ -130,6 +141,8 @@ export interface ListPagesStreamOption<R extends Response | undefined>
130141
/**
131142
* Lists pages from a given `project` with pagination
132143
*
144+
* @experimental **UNSTABLE**: New API, yet to be vetted.
145+
*
133146
* @param project The project name to list pages from
134147
* @param options Configuration options for pagination and sorting
135148
* @throws {HTTPError | TypedError<"NotLoggedInError" | "NotMemberError" | "NotFoundError">} If any requests in the pagination sequence fail

api/pages/project/replace/links.ts

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { cookie } from "../../../../rest/auth.ts";
99
import { get } from "../../../users/me.ts";
1010

1111
/** Constructs a request for the `/api/pages/:project/replace/links` endpoint
12+
*
13+
* @experimental **UNSTABLE**: New API, yet to be vetted.
1214
*
1315
* @param project - The project name where all links will be replaced
1416
* @param from - The original link text to be replaced
@@ -39,6 +41,8 @@ export const makePostRequest = <R extends Response | undefined>(
3941
};
4042

4143
/** Retrieves JSON data for a specified page
44+
*
45+
* @experimental **UNSTABLE**: New API, yet to be vetted.
4246
*
4347
* @param project - The project name where all links will be replaced
4448
* @param from - The original link text to be replaced

api/pages/project/search/query.ts

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { type BaseOptions, setDefaults } from "../../../../util.ts";
99
import { cookie } from "../../../../rest/auth.ts";
1010

1111
/** Constructs a request for the `/api/pages/:project/search/query` endpoint
12+
*
13+
* @experimental **UNSTABLE**: New API, yet to be vetted.
1214
*
1315
* @param project The name of the project to search within
1416
* @param query The search query string to match against pages
@@ -31,6 +33,8 @@ export const makeGetRequest = <R extends Response | undefined>(
3133
};
3234

3335
/** Search for pages within a specific project
36+
*
37+
* @experimental **UNSTABLE**: New API, yet to be vetted.
3438
*
3539
* @param project The name of the project to search within
3640
* @param query The search query string to match against pages

api/pages/project/search/titles.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,20 @@ import {
1414
type TypedError,
1515
} from "../../../../error.ts";
1616

17-
/** Options for {@linkcode get} */
17+
/**
18+
* Options for {@linkcode get}
19+
*
20+
* @experimental **UNSTABLE**: New API, yet to be vetted.
21+
*/
1822
export interface GetLinksOptions<R extends Response | undefined>
1923
extends BaseOptions<R> {
2024
/** ID indicating the next list of links */
2125
followingId?: string;
2226
}
2327

2428
/** Create a request to `GET /api/pages/:project/search/titles`
29+
*
30+
* @experimental **UNSTABLE**: New API, yet to be vetted.
2531
*
2632
* @param project The project to get the links from
2733
* @param options - Additional configuration options
@@ -42,6 +48,8 @@ export const makeGetRequest = <R extends Response | undefined>(
4248
};
4349

4450
/** Retrieve link data from a specified Scrapbox project
51+
*
52+
* @experimental **UNSTABLE**: New API, yet to be vetted.
4553
*
4654
* This function fetches link data from a project, supporting pagination through
4755
* the {@linkcode GetLinksOptions.followingId} parameter. It returns both the link data and the next
@@ -76,6 +84,8 @@ export const get = <R extends Response | undefined = Response>(
7684
>;
7785

7886
/** Retrieve all link data from a specified project one by one
87+
*
88+
* @experimental **UNSTABLE**: New API, yet to be vetted.
7989
*
8090
* @param project The project name to list pages from
8191
* @param options Additional configuration options for the request

api/pages/project/title.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import { type BaseOptions, setDefaults } from "../../../util.ts";
99
import { encodeTitleURI } from "../../../title.ts";
1010
import { cookie } from "../../../rest/auth.ts";
1111

12-
/** Options for {@linkcode getPage} */
12+
/**
13+
* Options for {@linkcode getPage}
14+
*
15+
* @experimental **UNSTABLE**: New API, yet to be vetted.
16+
*/
1317
export interface GetPageOption<R extends Response | undefined>
1418
extends BaseOptions<R> {
1519
/** use `followRename` */
@@ -20,6 +24,8 @@ export interface GetPageOption<R extends Response | undefined>
2024
}
2125

2226
/** Constructs a request for the `/api/pages/:project/:title` endpoint
27+
*
28+
* @experimental **UNSTABLE**: New API, yet to be vetted.
2329
*
2430
* @param project The project name containing the desired page
2531
* @param title The page title to retrieve (case insensitive)
@@ -45,6 +51,8 @@ export const makeGetRequest = <R extends Response | undefined>(
4551
};
4652

4753
/** Retrieves JSON data for a specified page
54+
*
55+
* @experimental **UNSTABLE**: New API, yet to be vetted.
4856
*
4957
* @param project The project name containing the desired page
5058
* @param title The page title to retrieve (case insensitive)

api/pages/project/title/icon.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@ import { type BaseOptions, setDefaults } from "../../../../util.ts";
88
import { encodeTitleURI } from "../../../../title.ts";
99
import { cookie } from "../../../../rest/auth.ts";
1010

11-
/** Options for {@linkcode get} */
11+
/**
12+
* Options for {@linkcode get}
13+
*
14+
* @experimental **UNSTABLE**: New API, yet to be vetted.
15+
*/
1216
export interface GetIconOption<R extends Response | undefined>
1317
extends BaseOptions<R> {
1418
/** use `followRename` */
1519
followRename?: boolean;
1620
}
1721

1822
/** Constructs a request for the `/api/pages/:project/:title/icon` endpoint
23+
*
24+
* @experimental **UNSTABLE**: New API, yet to be vetted.
1925
*
2026
* @param project The project name containing the desired page
2127
* @param title The page title to retrieve (case insensitive)
@@ -38,6 +44,8 @@ export const makeGetRequest = <R extends Response | undefined>(
3844
};
3945

4046
/** Retrieves a specified page image
47+
*
48+
* @experimental **UNSTABLE**: New API, yet to be vetted.
4149
*
4250
* @param project The project name containing the desired page
4351
* @param title The page title to retrieve (case insensitive)

api/pages/project/title/text.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@ import { type BaseOptions, setDefaults } from "../../../../util.ts";
88
import { encodeTitleURI } from "../../../../title.ts";
99
import { cookie } from "../../../../rest/auth.ts";
1010

11-
/** Options for {@linkcode get} */
11+
/**
12+
* Options for {@linkcode get}
13+
*
14+
* @experimental **UNSTABLE**: New API, yet to be vetted.
15+
*/
1216
export interface GetTextOption<R extends Response | undefined>
1317
extends BaseOptions<R> {
1418
/** use `followRename` */
1519
followRename?: boolean;
1620
}
1721

1822
/** Constructs a request for the `/api/pages/:project/:title/text` endpoint
23+
*
24+
* @experimental **UNSTABLE**: New API, yet to be vetted.
1925
*
2026
* @param project The project name containing the desired page
2127
* @param title The page title to retrieve (case insensitive)
@@ -38,6 +44,8 @@ export const makeGetRequest = <R extends Response | undefined>(
3844
};
3945

4046
/** Retrieves a specified page text
47+
*
48+
* @experimental **UNSTABLE**: New API, yet to be vetted.
4149
*
4250
* @param project The project name containing the desired page
4351
* @param title The page title to retrieve (case insensitive)

api/projects/project.ts

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { type BaseOptions, setDefaults } from "../../util.ts";
1010
import { cookie } from "../../rest/auth.ts";
1111

1212
/** Create a request to `GET /api/projects/:project`
13+
*
14+
* @experimental **UNSTABLE**: New API, yet to be vetted.
1315
*
1416
* @param project - Project name to retrieve information for
1517
* @param options - Additional configuration options
@@ -33,6 +35,8 @@ export const makeGetRequest = <R extends Response | undefined>(
3335
* access level, settings, and metadata. The returned data type depends on
3436
* whether the user has member access to the project.
3537
*
38+
* @experimental **UNSTABLE**: New API, yet to be vetted.
39+
*
3640
* @param project - Project name to retrieve information for
3741
* @param options Additional configuration options for the request
3842
* @returns A {@linkcode Response} object containing the project data

api/users/me.ts

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { cookie } from "../../rest/auth.ts";
88
* This endpoint retrieves the current user's profile information,
99
* which can be either a {@linkcode MemberUser} or {@linkcode GuestUser} profile.
1010
*
11+
* @experimental **UNSTABLE**: New API, yet to be vetted.
12+
*
1113
* @param init - Options including `connect.sid` (session ID) and other configuration
1214
* @returns A {@linkcode Request} object for fetching user profile data
1315
*/
@@ -22,6 +24,8 @@ export const makeGetRequest = <R extends Response | undefined>(
2224
};
2325

2426
/** get the user profile
27+
*
28+
* @experimental **UNSTABLE**: New API, yet to be vetted.
2529
*
2630
* @param init - Options including `connect.sid` (session ID) and other configuration
2731
* @returns A {@linkcode Response} object containing the user profile data

0 commit comments

Comments
 (0)