acebase-server 1.19.0 → 1.19.2

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 (57) hide show
  1. package/.eslintrc.json +49 -49
  2. package/.github/workflows/publish.yml +125 -0
  3. package/Dockerfile +26 -26
  4. package/LICENSE +21 -21
  5. package/bin/acebase-server.js +8 -8
  6. package/create-package-files.sh +25 -0
  7. package/dist/cjs/routes/data-exists.js +2 -2
  8. package/dist/cjs/routes/data-export.js +2 -2
  9. package/dist/cjs/routes/data-get.js +2 -2
  10. package/dist/cjs/routes/data-reflect.js +2 -2
  11. package/dist/cjs/routes/docs.js +1 -1
  12. package/dist/cjs/routes/meta-info.js +1 -1
  13. package/dist/esm/routes/data-exists.js +1 -2
  14. package/dist/esm/routes/data-export.js +1 -2
  15. package/dist/esm/routes/data-get.js +1 -1
  16. package/dist/esm/routes/data-reflect.js +1 -2
  17. package/dist/esm/routes/docs.js +1 -1
  18. package/dist/esm/routes/meta-info.js +1 -1
  19. package/package.json +6 -7
  20. package/release_notes.md +2 -0
  21. package/src/routes/auth-change-password.yaml +73 -73
  22. package/src/routes/auth-delete.yaml +77 -77
  23. package/src/routes/auth-forgot-password.yaml +49 -49
  24. package/src/routes/auth-reset-password.yaml +53 -53
  25. package/src/routes/auth-signin.yaml +129 -129
  26. package/src/routes/auth-signout.yaml +46 -46
  27. package/src/routes/auth-signup.yaml +135 -135
  28. package/src/routes/auth-state.yaml +28 -28
  29. package/src/routes/auth-update.yaml +151 -151
  30. package/src/routes/auth-verify-email.yaml +52 -52
  31. package/src/routes/data-exists.yaml +44 -44
  32. package/src/routes/data-export.yaml +63 -63
  33. package/src/routes/data-import.yaml +74 -74
  34. package/src/routes/data-index-create.yaml +105 -105
  35. package/src/routes/data-index-delete.yaml +51 -51
  36. package/src/routes/data-index-list.yaml +84 -84
  37. package/src/routes/data-query.yaml +165 -165
  38. package/src/routes/data-reflect.yaml +124 -124
  39. package/src/routes/data-schema-get.yaml +53 -53
  40. package/src/routes/data-schema-set.yaml +64 -64
  41. package/src/routes/data-schema-test.yaml +66 -66
  42. package/src/routes/data-schemas-list.yaml +41 -41
  43. package/src/routes/data-set.yaml +77 -77
  44. package/src/routes/data-sync-changes.yaml +66 -66
  45. package/src/routes/data-sync-mutations.yaml +66 -66
  46. package/src/routes/data-transaction-finish.yaml +82 -82
  47. package/src/routes/data-transaction-start.yaml +58 -58
  48. package/src/routes/data-update.yaml +77 -77
  49. package/src/routes/meta-info.yaml +40 -40
  50. package/src/routes/meta-ping.yaml +22 -22
  51. package/src/routes/meta-stats.yaml +40 -40
  52. package/src/routes/oauth2-init.yaml +62 -62
  53. package/src/routes/oauth2-refresh.yaml +64 -64
  54. package/src/routes/oauth2-signin.yaml +65 -65
  55. package/webmanager/acebase-client-browser.min.js +12 -12
  56. package/webmanager/index.html +271 -271
  57. package/webmanager/index.js +437 -437
@@ -1,82 +1,82 @@
1
- /transaction/{dbname}/finish:
2
- post:
3
- tags:
4
- - data
5
- summary: Finishes a transaction on a path
6
- description: Finishes a transaction on a path in the database by overwriting it with a new value. NOTE this API endpoint is also available through the websocket connection, which is the preferred method. This API endpoint is provided for clients not supporting websockets, and those that don't have a websocket connection by choice or because of network limitations.
7
- parameters:
8
- - name: dbname
9
- in: path
10
- description: name of the database
11
- required: true
12
- schema:
13
- type: string
14
- example: mydb
15
- requestBody:
16
- description: transaction details and the new value to store
17
- content:
18
- 'application/json':
19
- schema:
20
- type: object
21
- properties:
22
- id:
23
- type: string
24
- description: transaction id returned by the _start_ endpoint
25
- example: jld2cjxh0000qzrmn831i7rn
26
- path:
27
- type: string
28
- description: the same path used in the _start_ endpoint call
29
- example: collection/child/property
30
- value:
31
- $ref: '#/components/schemas/SerializedValue'
32
- responses:
33
- 200:
34
- description: If successful returns the string `"done"`
35
- content:
36
- 'text/plain':
37
- headers:
38
- 'AceBase-Context':
39
- description: Returns the context that was passed to the transaction start endpoint, augmented with an `acebase_cursor` if transaction logging is enabled on the server.
40
- schema:
41
- type: string
42
- example: '{ "acebase_cursor": "l3lf2iwd000109mgdn0d6pqt" }'
43
- schema:
44
- type: string
45
- value: done
46
- example: done
47
- description: the string `"done"`
48
- 400:
49
- description: Returns "400 Bad Request" if the sent value is incorrect
50
- content:
51
- 'application/json':
52
- schema:
53
- $ref: '#/components/schemas/Error'
54
- example:
55
- code: invalid_serialized_value
56
- message: The sent value is not properly serialized
57
- 403:
58
- description: Returns "403 Forbidden" if the signed in user is not allowed to write to the target path
59
- content:
60
- 'application/json':
61
- schema:
62
- $ref: '#/components/schemas/Error'
63
- 410:
64
- description: Returns "410 Gone" if the specified transaction was not found, timed out, or the path does not match with the one provided in the _start_ endpoint.
65
- content:
66
- 'text/plain':
67
- schema:
68
- type: string
69
- value: transaction not found
70
- example: transaction not found
71
- 422:
72
- description: Returns "422 Unprocessable Entity" if schema validation for the sent value failed.
73
- content:
74
- 'application/json':
75
- schema:
76
- $ref: '#/components/schemas/SchemaValidationError'
77
- 500:
78
- description: An unexpected error occurred
79
- content:
80
- 'application/json':
81
- schema:
82
- $ref: '#/components/schemas/UnexpectedError'
1
+ /transaction/{dbname}/finish:
2
+ post:
3
+ tags:
4
+ - data
5
+ summary: Finishes a transaction on a path
6
+ description: Finishes a transaction on a path in the database by overwriting it with a new value. NOTE this API endpoint is also available through the websocket connection, which is the preferred method. This API endpoint is provided for clients not supporting websockets, and those that don't have a websocket connection by choice or because of network limitations.
7
+ parameters:
8
+ - name: dbname
9
+ in: path
10
+ description: name of the database
11
+ required: true
12
+ schema:
13
+ type: string
14
+ example: mydb
15
+ requestBody:
16
+ description: transaction details and the new value to store
17
+ content:
18
+ 'application/json':
19
+ schema:
20
+ type: object
21
+ properties:
22
+ id:
23
+ type: string
24
+ description: transaction id returned by the _start_ endpoint
25
+ example: jld2cjxh0000qzrmn831i7rn
26
+ path:
27
+ type: string
28
+ description: the same path used in the _start_ endpoint call
29
+ example: collection/child/property
30
+ value:
31
+ $ref: '#/components/schemas/SerializedValue'
32
+ responses:
33
+ 200:
34
+ description: If successful returns the string `"done"`
35
+ content:
36
+ 'text/plain':
37
+ headers:
38
+ 'AceBase-Context':
39
+ description: Returns the context that was passed to the transaction start endpoint, augmented with an `acebase_cursor` if transaction logging is enabled on the server.
40
+ schema:
41
+ type: string
42
+ example: '{ "acebase_cursor": "l3lf2iwd000109mgdn0d6pqt" }'
43
+ schema:
44
+ type: string
45
+ value: done
46
+ example: done
47
+ description: the string `"done"`
48
+ 400:
49
+ description: Returns "400 Bad Request" if the sent value is incorrect
50
+ content:
51
+ 'application/json':
52
+ schema:
53
+ $ref: '#/components/schemas/Error'
54
+ example:
55
+ code: invalid_serialized_value
56
+ message: The sent value is not properly serialized
57
+ 403:
58
+ description: Returns "403 Forbidden" if the signed in user is not allowed to write to the target path
59
+ content:
60
+ 'application/json':
61
+ schema:
62
+ $ref: '#/components/schemas/Error'
63
+ 410:
64
+ description: Returns "410 Gone" if the specified transaction was not found, timed out, or the path does not match with the one provided in the _start_ endpoint.
65
+ content:
66
+ 'text/plain':
67
+ schema:
68
+ type: string
69
+ value: transaction not found
70
+ example: transaction not found
71
+ 422:
72
+ description: Returns "422 Unprocessable Entity" if schema validation for the sent value failed.
73
+ content:
74
+ 'application/json':
75
+ schema:
76
+ $ref: '#/components/schemas/SchemaValidationError'
77
+ 500:
78
+ description: An unexpected error occurred
79
+ content:
80
+ 'application/json':
81
+ schema:
82
+ $ref: '#/components/schemas/UnexpectedError'
@@ -1,58 +1,58 @@
1
- /transaction/{dbname}/start:
2
- post:
3
- tags:
4
- - data
5
- summary: Starts a transaction on a path
6
- description: Starts a transaction on a path in the database by returning its current value, locking it until the _finish_ endpoint is called. NOTE this API endpoint is also available through the websocket connection, which is the preferred method. This API endpoint is provided for clients not supporting websockets, and those that don't have a websocket connection by choice or because of network limitations.
7
- parameters:
8
- - name: dbname
9
- in: path
10
- description: name of the database
11
- required: true
12
- schema:
13
- type: string
14
- example: mydb
15
- - name: AceBase-Context
16
- in: header
17
- description: Contextual info about the database operation (must be valid JSON). This info is included in event notifications sent to clients watching data at this or child paths
18
- schema:
19
- type: string
20
- example: {}
21
- requestBody:
22
- description: path to start the transaction on
23
- content:
24
- 'application/json':
25
- schema:
26
- type: object
27
- properties:
28
- path:
29
- type: string
30
- description: database path
31
- example:
32
- path: collection/child/property
33
- responses:
34
- 200:
35
- description: returns an object with the transaction id, and the current (serialized) value of the given path
36
- content:
37
- 'application/json':
38
- schema:
39
- type: object
40
- properties:
41
- id:
42
- type: string
43
- description: transaction id
44
- example: jld2cjxh0000qzrmn831i7rn
45
- value:
46
- $ref: '#/components/schemas/SerializedValue'
47
- 403:
48
- description: Returns a "403 Forbidden" if the signed in user is not allowed to write to the target path
49
- content:
50
- 'application/json':
51
- schema:
52
- $ref: '#/components/schemas/Error'
53
- 500:
54
- description: An unexpected error occurred
55
- content:
56
- 'application/json':
57
- schema:
58
- $ref: '#/components/schemas/UnexpectedError'
1
+ /transaction/{dbname}/start:
2
+ post:
3
+ tags:
4
+ - data
5
+ summary: Starts a transaction on a path
6
+ description: Starts a transaction on a path in the database by returning its current value, locking it until the _finish_ endpoint is called. NOTE this API endpoint is also available through the websocket connection, which is the preferred method. This API endpoint is provided for clients not supporting websockets, and those that don't have a websocket connection by choice or because of network limitations.
7
+ parameters:
8
+ - name: dbname
9
+ in: path
10
+ description: name of the database
11
+ required: true
12
+ schema:
13
+ type: string
14
+ example: mydb
15
+ - name: AceBase-Context
16
+ in: header
17
+ description: Contextual info about the database operation (must be valid JSON). This info is included in event notifications sent to clients watching data at this or child paths
18
+ schema:
19
+ type: string
20
+ example: {}
21
+ requestBody:
22
+ description: path to start the transaction on
23
+ content:
24
+ 'application/json':
25
+ schema:
26
+ type: object
27
+ properties:
28
+ path:
29
+ type: string
30
+ description: database path
31
+ example:
32
+ path: collection/child/property
33
+ responses:
34
+ 200:
35
+ description: returns an object with the transaction id, and the current (serialized) value of the given path
36
+ content:
37
+ 'application/json':
38
+ schema:
39
+ type: object
40
+ properties:
41
+ id:
42
+ type: string
43
+ description: transaction id
44
+ example: jld2cjxh0000qzrmn831i7rn
45
+ value:
46
+ $ref: '#/components/schemas/SerializedValue'
47
+ 403:
48
+ description: Returns a "403 Forbidden" if the signed in user is not allowed to write to the target path
49
+ content:
50
+ 'application/json':
51
+ schema:
52
+ $ref: '#/components/schemas/Error'
53
+ 500:
54
+ description: An unexpected error occurred
55
+ content:
56
+ 'application/json':
57
+ schema:
58
+ $ref: '#/components/schemas/UnexpectedError'
@@ -1,77 +1,77 @@
1
- /data/{dbname}/{path}:
2
- post:
3
- tags:
4
- - data
5
- summary: Update the value of a path
6
- description: Updates the stored value of a path in the database. If the value is an object, only the given properties are overwritten
7
- parameters:
8
- - name: dbname
9
- in: path
10
- description: name of the database
11
- required: true
12
- schema:
13
- type: string
14
- example: mydb
15
- - name: path
16
- in: path
17
- description: database path
18
- required: true
19
- schema:
20
- type: string
21
- example: collection/child/property
22
- - name: AceBase-Context
23
- in: header
24
- description: Contextual info about the database operation (must be valid JSON). This info is included in event notifications sent to clients watching data at this or child paths
25
- schema:
26
- type: string
27
- example: '{}'
28
- requestBody:
29
- description: serialized value to store in the database
30
- content:
31
- 'application/json':
32
- schema:
33
- $ref: '#/components/schemas/SerializedValue'
34
- responses:
35
- 200:
36
- description: Returns "200 OK" when the database operation succeeded
37
- content:
38
- 'application/json':
39
- headers:
40
- 'AceBase-Context':
41
- description: Returns contextual information, such as the `acebase_cursor` if transaction logging is enabled on the server.
42
- schema:
43
- type: string
44
- example: '{ "acebase_cursor": "l3lf2iwd000109mgdn0d6pqt" }'
45
- schema:
46
- type: object
47
- properties:
48
- success:
49
- type: boolean
50
- example: true
51
- 400:
52
- description: Returns "400 Bad Request" if the sent value is incorrect
53
- content:
54
- 'application/json':
55
- schema:
56
- $ref: '#/components/schemas/Error'
57
- example:
58
- code: invalid_serialized_value
59
- message: The sent value is not properly serialized
60
- 403:
61
- description: Returns "403 Forbidden" if the signed in user is not allowed to write to the target path
62
- content:
63
- 'application/json':
64
- schema:
65
- $ref: '#/components/schemas/RuleValidationError'
66
- 422:
67
- description: Returns "422 Unprocessable Entity" if schema validation for the sent value failed.
68
- content:
69
- 'application/json':
70
- schema:
71
- $ref: '#/components/schemas/SchemaValidationError'
72
- 500:
73
- description: An unexpected error occurred
74
- content:
75
- 'application/json':
76
- schema:
77
- $ref: '#/components/schemas/UnexpectedError'
1
+ /data/{dbname}/{path}:
2
+ post:
3
+ tags:
4
+ - data
5
+ summary: Update the value of a path
6
+ description: Updates the stored value of a path in the database. If the value is an object, only the given properties are overwritten
7
+ parameters:
8
+ - name: dbname
9
+ in: path
10
+ description: name of the database
11
+ required: true
12
+ schema:
13
+ type: string
14
+ example: mydb
15
+ - name: path
16
+ in: path
17
+ description: database path
18
+ required: true
19
+ schema:
20
+ type: string
21
+ example: collection/child/property
22
+ - name: AceBase-Context
23
+ in: header
24
+ description: Contextual info about the database operation (must be valid JSON). This info is included in event notifications sent to clients watching data at this or child paths
25
+ schema:
26
+ type: string
27
+ example: '{}'
28
+ requestBody:
29
+ description: serialized value to store in the database
30
+ content:
31
+ 'application/json':
32
+ schema:
33
+ $ref: '#/components/schemas/SerializedValue'
34
+ responses:
35
+ 200:
36
+ description: Returns "200 OK" when the database operation succeeded
37
+ content:
38
+ 'application/json':
39
+ headers:
40
+ 'AceBase-Context':
41
+ description: Returns contextual information, such as the `acebase_cursor` if transaction logging is enabled on the server.
42
+ schema:
43
+ type: string
44
+ example: '{ "acebase_cursor": "l3lf2iwd000109mgdn0d6pqt" }'
45
+ schema:
46
+ type: object
47
+ properties:
48
+ success:
49
+ type: boolean
50
+ example: true
51
+ 400:
52
+ description: Returns "400 Bad Request" if the sent value is incorrect
53
+ content:
54
+ 'application/json':
55
+ schema:
56
+ $ref: '#/components/schemas/Error'
57
+ example:
58
+ code: invalid_serialized_value
59
+ message: The sent value is not properly serialized
60
+ 403:
61
+ description: Returns "403 Forbidden" if the signed in user is not allowed to write to the target path
62
+ content:
63
+ 'application/json':
64
+ schema:
65
+ $ref: '#/components/schemas/RuleValidationError'
66
+ 422:
67
+ description: Returns "422 Unprocessable Entity" if schema validation for the sent value failed.
68
+ content:
69
+ 'application/json':
70
+ schema:
71
+ $ref: '#/components/schemas/SchemaValidationError'
72
+ 500:
73
+ description: An unexpected error occurred
74
+ content:
75
+ 'application/json':
76
+ schema:
77
+ $ref: '#/components/schemas/UnexpectedError'
@@ -1,41 +1,41 @@
1
- /info/{dbname}:
2
- get:
3
- tags:
4
- - metadata
5
- summary: Get server info
6
- description: Returns info about the server, such as version, current date/time and process id. When signed in as the admin user, info about the platform, cpu, memory, and network will also be included
7
- parameters:
8
- - name: dbname
9
- in: path
10
- description: name of the database
11
- required: true
12
- schema:
13
- type: string
14
- example: mydb
15
- responses:
16
- 200:
17
- description: Returns server information
18
- content:
19
- 'application/json':
20
- schema:
21
- type: object
22
- properties:
23
- version:
24
- type: string
25
- example: 1.10.0
26
- summary: server version number
27
- time:
28
- type: number
29
- example: 868
30
- summary: unix timestamp (ms since Jan 1, 1970)
31
- process:
32
- type: integer
33
- example: 465
34
- summary: process number
35
- 500:
36
- description: Returns the server error
37
- content:
38
- 'text/plain':
39
- schema:
40
- type: string
1
+ /info/{dbname}:
2
+ get:
3
+ tags:
4
+ - metadata
5
+ summary: Get server info
6
+ description: Returns info about the server, such as version, current date/time and process id. When signed in as the admin user, info about the platform, cpu, memory, and network will also be included
7
+ parameters:
8
+ - name: dbname
9
+ in: path
10
+ description: name of the database
11
+ required: true
12
+ schema:
13
+ type: string
14
+ example: mydb
15
+ responses:
16
+ 200:
17
+ description: Returns server information
18
+ content:
19
+ 'application/json':
20
+ schema:
21
+ type: object
22
+ properties:
23
+ version:
24
+ type: string
25
+ example: 1.10.0
26
+ summary: server version number
27
+ time:
28
+ type: number
29
+ example: 868
30
+ summary: unix timestamp (ms since Jan 1, 1970)
31
+ process:
32
+ type: integer
33
+ example: 465
34
+ summary: process number
35
+ 500:
36
+ description: Returns the server error
37
+ content:
38
+ 'text/plain':
39
+ schema:
40
+ type: string
41
41
  example: Some error message
@@ -1,23 +1,23 @@
1
- /ping/{dbname}:
2
- get:
3
- tags:
4
- - metadata
5
- summary: Ping the server
6
- description: Ping endpoint to test connectivity with the server. Returns `"pong"`
7
- parameters:
8
- - name: dbname
9
- in: path
10
- description: name of the database
11
- required: true
12
- schema:
13
- type: string
14
- example: mydb
15
- responses:
16
- 200:
17
- description: Returns the string `"pong"`
18
- content:
19
- 'text/plain':
20
- schema:
21
- type: string
22
- value: pong
1
+ /ping/{dbname}:
2
+ get:
3
+ tags:
4
+ - metadata
5
+ summary: Ping the server
6
+ description: Ping endpoint to test connectivity with the server. Returns `"pong"`
7
+ parameters:
8
+ - name: dbname
9
+ in: path
10
+ description: name of the database
11
+ required: true
12
+ schema:
13
+ type: string
14
+ example: mydb
15
+ responses:
16
+ 200:
17
+ description: Returns the string `"pong"`
18
+ content:
19
+ 'text/plain':
20
+ schema:
21
+ type: string
22
+ value: pong
23
23
  example: pong
@@ -1,41 +1,41 @@
1
- /stats/{dbname}:
2
- get:
3
- tags:
4
- - metadata
5
- summary: Get basic database statistics
6
- description: Returns basic statistics about the database
7
- parameters:
8
- - name: dbname
9
- in: path
10
- description: name of the database
11
- required: true
12
- schema:
13
- type: string
14
- example: mydb
15
- responses:
16
- 200:
17
- description: Returns basic database statistics
18
- content:
19
- 'application/json':
20
- schema:
21
- type: object
22
- properties:
23
- writes:
24
- type: integer
25
- example: 154
26
- reads:
27
- type: integer
28
- example: 868
29
- bytesRead:
30
- type: integer
31
- example: 78480
32
- bytesWritten:
33
- type: integer
34
- example: 12560
35
- 500:
36
- description: Returns the server error
37
- content:
38
- 'text/plain':
39
- schema:
40
- type: string
1
+ /stats/{dbname}:
2
+ get:
3
+ tags:
4
+ - metadata
5
+ summary: Get basic database statistics
6
+ description: Returns basic statistics about the database
7
+ parameters:
8
+ - name: dbname
9
+ in: path
10
+ description: name of the database
11
+ required: true
12
+ schema:
13
+ type: string
14
+ example: mydb
15
+ responses:
16
+ 200:
17
+ description: Returns basic database statistics
18
+ content:
19
+ 'application/json':
20
+ schema:
21
+ type: object
22
+ properties:
23
+ writes:
24
+ type: integer
25
+ example: 154
26
+ reads:
27
+ type: integer
28
+ example: 868
29
+ bytesRead:
30
+ type: integer
31
+ example: 78480
32
+ bytesWritten:
33
+ type: integer
34
+ example: 12560
35
+ 500:
36
+ description: Returns the server error
37
+ content:
38
+ 'text/plain':
39
+ schema:
40
+ type: string
41
41
  example: Some error message