Skip to content

Commit ced67cb

Browse files
committed
Tweak docs
1 parent ed952f8 commit ced67cb

File tree

10 files changed

+156
-144
lines changed

10 files changed

+156
-144
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ jobs:
7171
- name: Rebuild docs for tag
7272
if: env.VERSION != 'devel'
7373
run: |
74-
./node_modules/.bin/typedoc --gitRevision ${{ github.ref_name }} --out gh-pages/${VERSION} --sourceLinkTemplate https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/src/{path}:{line}
74+
./node_modules/.bin/typedoc --includeVersion --out gh-pages/${VERSION} --sourceLinkTemplate "https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/src/{path}:{line}"
7575
node -p 'var all=fs.readdirSync("gh-pages",{withFileTypes:true}).flatMap(f=>f.isDirectory()&&!isNaN(f.name.charAt(0))?[f.name]:[]).sort(require("semver").rcompare);JSON.stringify({all,stable:all.filter(s=>!s.includes("-"))})' > gh-pages/_data/versions.json
7676
7777
- name: Rebuild docs for devel
7878
if: env.VERSION == 'devel'
7979
run: |
80-
./node_modules/.bin/typedoc --gitRevision ${{ github.sha }} --out gh-pages/${VERSION} --sourceLinkTemplate https://github.com/${{ github.repository }}/blob/${{ github.sha }}/src/{path}:{line}
80+
./node_modules/.bin/typedoc --out gh-pages/${VERSION} --sourceLinkTemplate https://github.com/${{ github.repository }}/blob/${{ github.sha }}/src/{path}:{line}
8181
8282
- name: Commit to gh-pages
8383
uses: EndBug/add-and-commit@v9

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ for upgrading your code to arangojs v10.
4747

4848
The following options were moved: `credentials`, `headers` and `keepalive`.
4949

50+
- `db.setUserAccessLevel` now takes `grant` as a separate parameter
51+
52+
The parameter was previously passed as an additional property in the
53+
`options` parameter.
54+
5055
#### Error handling
5156

5257
- Errors encountered before a request completes are now wrapped in a

src/analyzers.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*
99
* @packageDocumentation
1010
*/
11-
import * as databases from "./databases.js";
1211
import * as connection from "./connection.js";
12+
import * as databases from "./databases.js";
1313
import * as errors from "./errors.js";
1414
import { ANALYZER_NOT_FOUND } from "./lib/codes.js";
1515

@@ -75,7 +75,10 @@ export type CreateAnalyzerOptions =
7575
| CreateGeoPointAnalyzerOptions
7676
| CreateGeoS2AnalyzerOptions;
7777

78-
type CreateAnalyzerOptionsType<
78+
/**
79+
* Shared attributes of all Analyzer creation options.
80+
*/
81+
export type CreateAnalyzerOptionsType<
7982
Type extends AnalyzerType,
8083
Properties = void,
8184
> = Properties extends void
@@ -580,7 +583,7 @@ export type AnalyzerDescription =
580583
/**
581584
* Shared attributes of all Analyzer descriptions.
582585
*/
583-
type AnalyzerDescriptionType<
586+
export type AnalyzerDescriptionType<
584587
Type extends string,
585588
Properties = Record<string, never>,
586589
> = {
@@ -931,7 +934,7 @@ export class Analyzer {
931934
* ```
932935
*/
933936
create<Options extends CreateAnalyzerOptions>(
934-
options: Options,
937+
options: Options
935938
): Promise<
936939
Options extends CreateIdentityAnalyzerOptions
937940
? IdentityAnalyzerDescription
@@ -991,7 +994,7 @@ export class Analyzer {
991994
* ```
992995
*/
993996
drop(
994-
force: boolean = false,
997+
force: boolean = false
995998
): Promise<connection.ArangoApiResponse<{ name: string }>> {
996999
return this._db.request({
9971000
method: "DELETE",

src/databases.ts

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,8 +1855,7 @@ export class Database {
18551855
* given collection in the given database.
18561856
*
18571857
* @param username - Name of the ArangoDB user to fetch the access level for.
1858-
* @param database - Database to fetch the access level for.
1859-
* @param collection - Collection to fetch the access level for.
1858+
* @param options - Collection and/or database to fetch the access level for.
18601859
*
18611860
* @example
18621861
* ```js
@@ -1921,8 +1920,9 @@ export class Database {
19211920
*/
19221921
getUserAccessLevel(
19231922
username: string,
1924-
{ database, collection }: users.UserAccessLevelOptions
1923+
options: users.UserAccessLevelOptions
19251924
): Promise<users.AccessLevel> {
1925+
const { database, collection } = options;
19261926
const databaseName = isArangoDatabase(database)
19271927
? database.name
19281928
: (database ??
@@ -1951,8 +1951,7 @@ export class Database {
19511951
* given collection in the given database.
19521952
*
19531953
* @param username - Name of the ArangoDB user to set the access level for.
1954-
* @param database - Database to set the access level for.
1955-
* @param collection - Collection to set the access level for.
1954+
* @param options - Database and/or collection to set the access level for.
19561955
* @param grant - Access level to set for the given user.
19571956
*
19581957
* @example
@@ -2020,12 +2019,10 @@ export class Database {
20202019
*/
20212020
setUserAccessLevel(
20222021
username: string,
2023-
{
2024-
database,
2025-
collection,
2026-
grant,
2027-
}: users.UserAccessLevelOptions & { grant: users.AccessLevel }
2022+
options: users.UserAccessLevelOptions,
2023+
grant: users.AccessLevel
20282024
): Promise<connection.ArangoApiResponse<Record<string, users.AccessLevel>>> {
2025+
const { database, collection } = options;
20292026
const databaseName = isArangoDatabase(database)
20302027
? database.name
20312028
: (database ??
@@ -2056,8 +2053,7 @@ export class Database {
20562053
* given collection in the given database.
20572054
*
20582055
* @param username - Name of the ArangoDB user to clear the access level for.
2059-
* @param database - Database to clear the access level for.
2060-
* @param collection - Collection to clear the access level for.
2056+
* @param options - Database and/or collection to clear the access level for.
20612057
*
20622058
* @example
20632059
* ```js
@@ -2116,8 +2112,9 @@ export class Database {
21162112
*/
21172113
clearUserAccessLevel(
21182114
username: string,
2119-
{ database, collection }: users.UserAccessLevelOptions
2115+
options: users.UserAccessLevelOptions
21202116
): Promise<connection.ArangoApiResponse<Record<string, users.AccessLevel>>> {
2117+
const { database, collection } = options;
21212118
const databaseName = isArangoDatabase(database)
21222119
? database.name
21232120
: (database ??
@@ -2393,7 +2390,7 @@ export class Database {
23932390
*
23942391
* See also {@link Database#beginTransaction}.
23952392
*
2396-
* @param id - The `id` of an existing stream transaction.
2393+
* @param transactionId - The `id` of an existing stream transaction.
23972394
*
23982395
* @example
23992396
* ```js
@@ -3875,7 +3872,7 @@ export class Database {
38753872
* {@link Database#getServiceDependencies}.
38763873
*
38773874
* @param mount - The service's mount point, relative to the database.
3878-
* @param cfg - An object mapping dependency aliases to mount points.
3875+
* @param deps - An object mapping dependency aliases to mount points.
38793876
* @param minimal - If set to `true`, the result will only include each
38803877
* dependency's current mount point. Otherwise it will include the full
38813878
* definition for each dependency.
@@ -3911,7 +3908,7 @@ export class Database {
39113908
* {@link Database#getServiceDependencies}.
39123909
*
39133910
* @param mount - The service's mount point, relative to the database.
3914-
* @param cfg - An object mapping dependency aliases to mount points.
3911+
* @param deps - An object mapping dependency aliases to mount points.
39153912
* @param minimal - If set to `true`, the result will only include each
39163913
* dependency's current mount point. Otherwise it will include the full
39173914
* definition for each dependency.
@@ -3960,7 +3957,7 @@ export class Database {
39603957
* {@link Database#getServiceDependencies}.
39613958
*
39623959
* @param mount - The service's mount point, relative to the database.
3963-
* @param cfg - An object mapping dependency aliases to mount points.
3960+
* @param deps - An object mapping dependency aliases to mount points.
39643961
* @param minimal - If set to `true`, the result will only include each
39653962
* dependency's current mount point. Otherwise it will include the full
39663963
* definition for each dependency.
@@ -3996,7 +3993,7 @@ export class Database {
39963993
* {@link Database#getServiceDependencies}.
39973994
*
39983995
* @param mount - The service's mount point, relative to the database.
3999-
* @param cfg - An object mapping dependency aliases to mount points.
3996+
* @param deps - An object mapping dependency aliases to mount points.
40003997
* @param minimal - If set to `true`, the result will only include each
40013998
* dependency's current mount point. Otherwise it will include the full
40023999
* definition for each dependency.

0 commit comments

Comments
 (0)