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,41 +1,41 @@
1
- /schema/{dbname}:
2
- get:
3
- tags:
4
- - data
5
- - schemas
6
- summary: Gets all defined schema definitions
7
- description: Gets a list of all defined schema definitions
8
- parameters:
9
- - name: dbname
10
- in: path
11
- description: name of the database
12
- required: true
13
- schema:
14
- type: string
15
- example: mydb
16
- responses:
17
- 200:
18
- description: Returns all defined schemas in the database
19
- content:
20
- 'application/json':
21
- schema:
22
- type: array
23
- items:
24
- type: object
25
- description: Object containing the string representation of the schema
26
- example:
27
- - path: collection/child
28
- schema: "{ name: string, stats?: { size: number, created: Date, modified: Date, deleted?: Date } }"
29
- text: "{ name: string, stats?: { size: number, created: Date, modified: Date, deleted?: Date } }"
30
- 403:
31
- description: Returns a "403 Forbidden" if the signed in user is not admin
32
- content:
33
- 'application/json':
34
- schema:
35
- $ref: '#/components/schemas/Error'
36
- 500:
37
- description: An unexpected error occurred
38
- content:
39
- 'application/json':
40
- schema:
41
- $ref: '#/components/schemas/UnexpectedError'
1
+ /schema/{dbname}:
2
+ get:
3
+ tags:
4
+ - data
5
+ - schemas
6
+ summary: Gets all defined schema definitions
7
+ description: Gets a list of all defined schema definitions
8
+ parameters:
9
+ - name: dbname
10
+ in: path
11
+ description: name of the database
12
+ required: true
13
+ schema:
14
+ type: string
15
+ example: mydb
16
+ responses:
17
+ 200:
18
+ description: Returns all defined schemas in the database
19
+ content:
20
+ 'application/json':
21
+ schema:
22
+ type: array
23
+ items:
24
+ type: object
25
+ description: Object containing the string representation of the schema
26
+ example:
27
+ - path: collection/child
28
+ schema: "{ name: string, stats?: { size: number, created: Date, modified: Date, deleted?: Date } }"
29
+ text: "{ name: string, stats?: { size: number, created: Date, modified: Date, deleted?: Date } }"
30
+ 403:
31
+ description: Returns a "403 Forbidden" if the signed in user is not admin
32
+ content:
33
+ 'application/json':
34
+ schema:
35
+ $ref: '#/components/schemas/Error'
36
+ 500:
37
+ description: An unexpected error occurred
38
+ content:
39
+ 'application/json':
40
+ schema:
41
+ $ref: '#/components/schemas/UnexpectedError'
@@ -1,77 +1,77 @@
1
- /data/{dbname}/{path}:
2
- put:
3
- tags:
4
- - data
5
- summary: Sets the value of a path
6
- description: Sets the stored value of a path in the database, overwriting existing data and its children
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
+ put:
3
+ tags:
4
+ - data
5
+ summary: Sets the value of a path
6
+ description: Sets the stored value of a path in the database, overwriting existing data and its children
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,67 +1,67 @@
1
- /sync/changes/{dbname}:
2
- get:
3
- tags:
4
- - data
5
- summary: Gets effective changes since cursor
6
- description: Gets effective changes for specific path(s) and event combinations since given cursor. Use either the _path_ or _for_ parameter. If both are given, only _path_ is used.
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: query
17
- description: "single database path to get all changes for (equivalent to _for_ `[{ path, events: ['value'] }]`)"
18
- schema:
19
- type: string
20
- example: collection
21
- - name: for
22
- in: query
23
- description: JSON array of path / events combinations
24
- schema:
25
- type: string
26
- example: "[{ path: 'collection', events: ['child_changed'] }]"
27
- - name: cursor
28
- in: query
29
- description: previously acquired cursor to use
30
- schema:
31
- type: string
32
- example: l2a37q55000008ll8dyngkny
33
- - name: timestamp
34
- in: query
35
- description: instead of a cursor, you can also use a timestamp (ms since 1970/01/01)
36
- schema:
37
- type: integer
38
- example: ""
39
- responses:
40
- 200:
41
- description: Returns an array of all effective changes to the requested selection
42
- content:
43
- 'application/json':
44
- schema:
45
- type: object
46
- example: []
47
- 400:
48
- description: Returns "400 Bad Request" if transaction logging is not enabled in the server settings (code `no_transaction_logging`) or if no targets were specified in your query (no _path_ or _for_ parameters given, code `invalid_request`)
49
- content:
50
- 'application/json':
51
- schema:
52
- $ref: '#/components/schemas/Error'
53
- example:
54
- code: no_transaction_logging
55
- message: Transaction logging not enabled
56
- 403:
57
- description: Returns a "403 Forbidden" if the signed in user is not allowed to read from any of the targeted paths
58
- content:
59
- 'application/json':
60
- schema:
61
- $ref: '#/components/schemas/Error'
62
- 500:
63
- description: An unexpected error occurred
64
- content:
65
- 'application/json':
66
- schema:
1
+ /sync/changes/{dbname}:
2
+ get:
3
+ tags:
4
+ - data
5
+ summary: Gets effective changes since cursor
6
+ description: Gets effective changes for specific path(s) and event combinations since given cursor. Use either the _path_ or _for_ parameter. If both are given, only _path_ is used.
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: query
17
+ description: "single database path to get all changes for (equivalent to _for_ `[{ path, events: ['value'] }]`)"
18
+ schema:
19
+ type: string
20
+ example: collection
21
+ - name: for
22
+ in: query
23
+ description: JSON array of path / events combinations
24
+ schema:
25
+ type: string
26
+ example: "[{ path: 'collection', events: ['child_changed'] }]"
27
+ - name: cursor
28
+ in: query
29
+ description: previously acquired cursor to use
30
+ schema:
31
+ type: string
32
+ example: l2a37q55000008ll8dyngkny
33
+ - name: timestamp
34
+ in: query
35
+ description: instead of a cursor, you can also use a timestamp (ms since 1970/01/01)
36
+ schema:
37
+ type: integer
38
+ example: ""
39
+ responses:
40
+ 200:
41
+ description: Returns an array of all effective changes to the requested selection
42
+ content:
43
+ 'application/json':
44
+ schema:
45
+ type: object
46
+ example: []
47
+ 400:
48
+ description: Returns "400 Bad Request" if transaction logging is not enabled in the server settings (code `no_transaction_logging`) or if no targets were specified in your query (no _path_ or _for_ parameters given, code `invalid_request`)
49
+ content:
50
+ 'application/json':
51
+ schema:
52
+ $ref: '#/components/schemas/Error'
53
+ example:
54
+ code: no_transaction_logging
55
+ message: Transaction logging not enabled
56
+ 403:
57
+ description: Returns a "403 Forbidden" if the signed in user is not allowed to read from any of the targeted paths
58
+ content:
59
+ 'application/json':
60
+ schema:
61
+ $ref: '#/components/schemas/Error'
62
+ 500:
63
+ description: An unexpected error occurred
64
+ content:
65
+ 'application/json':
66
+ schema:
67
67
  $ref: '#/components/schemas/UnexpectedError'
@@ -1,67 +1,67 @@
1
- /sync/mutations/{dbname}:
2
- get:
3
- tags:
4
- - data
5
- summary: Gets mutations since cursor
6
- description: Gets all mutations for specific path(s) and event combinations since given cursor. Use either the _path_ or _for_ parameter. If both are given, only _path_ is used.
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: query
17
- description: "single database path to get all changes for (equivalent to _for_ `[{ path, events: ['value'] }]`)"
18
- schema:
19
- type: string
20
- example: collection
21
- - name: for
22
- in: query
23
- description: JSON array of path / events combinations
24
- schema:
25
- type: string
26
- example: "[{ path: 'collection', events: ['child_changed'] }]"
27
- - name: cursor
28
- in: query
29
- description: previously acquired cursor to use
30
- schema:
31
- type: string
32
- example: l2a37q55000008ll8dyngkny
33
- - name: timestamp
34
- in: query
35
- description: instead of a cursor, you can also use a timestamp (ms since 1970/01/01)
36
- schema:
37
- type: integer
38
- example: ""
39
- responses:
40
- 200:
41
- description: Returns an array of all mutations to the requested selection
42
- content:
43
- 'application/json':
44
- schema:
45
- type: object
46
- example: []
47
- 400:
48
- description: Returns "400 Bad Request" if transaction logging is not enabled in the server settings (code `no_transaction_logging`) or if no targets were specified in your query (no _path_ or _for_ parameters given, code `invalid_request`)
49
- content:
50
- 'application/json':
51
- schema:
52
- $ref: '#/components/schemas/Error'
53
- example:
54
- code: no_transaction_logging
55
- message: Transaction logging not enabled
56
- 403:
57
- description: Returns a "403 Forbidden" if the signed in user is not allowed to read from any of the targeted paths
58
- content:
59
- 'application/json':
60
- schema:
61
- $ref: '#/components/schemas/Error'
62
- 500:
63
- description: An unexpected error occurred
64
- content:
65
- 'application/json':
66
- schema:
1
+ /sync/mutations/{dbname}:
2
+ get:
3
+ tags:
4
+ - data
5
+ summary: Gets mutations since cursor
6
+ description: Gets all mutations for specific path(s) and event combinations since given cursor. Use either the _path_ or _for_ parameter. If both are given, only _path_ is used.
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: query
17
+ description: "single database path to get all changes for (equivalent to _for_ `[{ path, events: ['value'] }]`)"
18
+ schema:
19
+ type: string
20
+ example: collection
21
+ - name: for
22
+ in: query
23
+ description: JSON array of path / events combinations
24
+ schema:
25
+ type: string
26
+ example: "[{ path: 'collection', events: ['child_changed'] }]"
27
+ - name: cursor
28
+ in: query
29
+ description: previously acquired cursor to use
30
+ schema:
31
+ type: string
32
+ example: l2a37q55000008ll8dyngkny
33
+ - name: timestamp
34
+ in: query
35
+ description: instead of a cursor, you can also use a timestamp (ms since 1970/01/01)
36
+ schema:
37
+ type: integer
38
+ example: ""
39
+ responses:
40
+ 200:
41
+ description: Returns an array of all mutations to the requested selection
42
+ content:
43
+ 'application/json':
44
+ schema:
45
+ type: object
46
+ example: []
47
+ 400:
48
+ description: Returns "400 Bad Request" if transaction logging is not enabled in the server settings (code `no_transaction_logging`) or if no targets were specified in your query (no _path_ or _for_ parameters given, code `invalid_request`)
49
+ content:
50
+ 'application/json':
51
+ schema:
52
+ $ref: '#/components/schemas/Error'
53
+ example:
54
+ code: no_transaction_logging
55
+ message: Transaction logging not enabled
56
+ 403:
57
+ description: Returns a "403 Forbidden" if the signed in user is not allowed to read from any of the targeted paths
58
+ content:
59
+ 'application/json':
60
+ schema:
61
+ $ref: '#/components/schemas/Error'
62
+ 500:
63
+ description: An unexpected error occurred
64
+ content:
65
+ 'application/json':
66
+ schema:
67
67
  $ref: '#/components/schemas/UnexpectedError'