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,74 +1,74 @@
1
- /auth/{dbname}/change_password:
2
- post:
3
- tags:
4
- - auth
5
- summary: Change a user's password
6
- description: Changes a user account's password by providing the current and new passwords
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: request object
17
- content:
18
- 'application/json':
19
- schema:
20
- type: object
21
- properties:
22
- uid:
23
- type: string
24
- description: Account's uid
25
- password:
26
- type: string
27
- description: Current password set on the account
28
- new_password:
29
- type: string
30
- description: New password to set on the account
31
- required:
32
- - uid
33
- - password
34
- - new_password
35
- responses:
36
- 200:
37
- description: If the password change is successful, returns an object with a new access token
38
- content:
39
- 'application/json':
40
- schema:
41
- type: object
42
- properties:
43
- access_token:
44
- description: New access token that provides access to API calls that require authentication.
45
- type: string
46
- example: ewufh387f3fyubqwekrjbcqwkuiec7gq3euyfbqwkuyebqjk..
47
- 400:
48
- description: Returns a `"400 Bad Request"` if the sent request is invalid. If the request is missing details, response is the string `"Bad Request"`. Otherwise, it's an object with `code` and `message` properties. Possible codes are `"unknown_uid"`, `"wrong_password"`, `"wrong_access_token"` (if not signed in as the user the password change was requested for)
49
- content:
50
- 'text/plain':
51
- schema:
52
- type: string
53
- value: Bad Request
54
- example: Bad Request
55
- 'application/json':
56
- schema:
57
- $ref: '#/components/schemas/Error'
58
- example:
59
- code: wrong_access_token
60
- message: "Cannot change password while signed in as other user, or with an old token"
61
- 422:
62
- description: New password does not meet the criteria
63
- content:
64
- 'text/plain':
65
- schema:
66
- type: string
67
- value: "Invalid new password, must be at least 8 characters and contain a combination of numbers and letters (both lower and uppercase)"
68
- example: "Invalid new password, must be at least 8 characters and contain a combination of numbers and letters (both lower and uppercase)"
69
- 500:
70
- description: An unexpected error occurred
71
- content:
72
- 'application/json':
73
- schema:
1
+ /auth/{dbname}/change_password:
2
+ post:
3
+ tags:
4
+ - auth
5
+ summary: Change a user's password
6
+ description: Changes a user account's password by providing the current and new passwords
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: request object
17
+ content:
18
+ 'application/json':
19
+ schema:
20
+ type: object
21
+ properties:
22
+ uid:
23
+ type: string
24
+ description: Account's uid
25
+ password:
26
+ type: string
27
+ description: Current password set on the account
28
+ new_password:
29
+ type: string
30
+ description: New password to set on the account
31
+ required:
32
+ - uid
33
+ - password
34
+ - new_password
35
+ responses:
36
+ 200:
37
+ description: If the password change is successful, returns an object with a new access token
38
+ content:
39
+ 'application/json':
40
+ schema:
41
+ type: object
42
+ properties:
43
+ access_token:
44
+ description: New access token that provides access to API calls that require authentication.
45
+ type: string
46
+ example: ewufh387f3fyubqwekrjbcqwkuiec7gq3euyfbqwkuyebqjk..
47
+ 400:
48
+ description: Returns a `"400 Bad Request"` if the sent request is invalid. If the request is missing details, response is the string `"Bad Request"`. Otherwise, it's an object with `code` and `message` properties. Possible codes are `"unknown_uid"`, `"wrong_password"`, `"wrong_access_token"` (if not signed in as the user the password change was requested for)
49
+ content:
50
+ 'text/plain':
51
+ schema:
52
+ type: string
53
+ value: Bad Request
54
+ example: Bad Request
55
+ 'application/json':
56
+ schema:
57
+ $ref: '#/components/schemas/Error'
58
+ example:
59
+ code: wrong_access_token
60
+ message: "Cannot change password while signed in as other user, or with an old token"
61
+ 422:
62
+ description: New password does not meet the criteria
63
+ content:
64
+ 'text/plain':
65
+ schema:
66
+ type: string
67
+ value: "Invalid new password, must be at least 8 characters and contain a combination of numbers and letters (both lower and uppercase)"
68
+ example: "Invalid new password, must be at least 8 characters and contain a combination of numbers and letters (both lower and uppercase)"
69
+ 500:
70
+ description: An unexpected error occurred
71
+ content:
72
+ 'application/json':
73
+ schema:
74
74
  $ref: '#/components/schemas/UnexpectedError'
@@ -1,78 +1,78 @@
1
- /auth/{dbname}/delete:
2
- post:
3
- tags:
4
- - auth
5
- summary: Delete a user account
6
- description: Deletes an existing user account
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: Account to delete
17
- content:
18
- 'text/plain':
19
- schema:
20
- type: string
21
- value: ''
22
- example: ''
23
- description: Empty content to delete signed in user account
24
- 'application/json':
25
- schema:
26
- type: object
27
- properties:
28
- uid:
29
- type: string
30
- description: (admin user only) to delete a specific user account, the target account `uid` must be passed with the request
31
- example: jpx0k53u0002ecr7s354c51l
32
- responses:
33
- 200:
34
- description: When delete succeeds, it returns the string `"Farewell"`
35
- content:
36
- 'text/plain':
37
- schema:
38
- type: text
39
- value: Farewell
40
- example: Farewell
41
- 401:
42
- description: If this is an unauthenticated request (not signed in), `"401 Unauthorized"` is returned
43
- content:
44
- 'application/json':
45
- schema:
46
- type: object
47
- properties:
48
- code:
49
- type: string
50
- value: unauthenticated_delete
51
- message:
52
- type: string
53
- value: You are not authorized to perform this operation, your attempt has been logged
54
- example:
55
- code: unauthenticated_delete
56
- message: You are not authorized to perform this operation, your attempt has been logged
57
- 403:
58
- description: If a non-admin user tries to update a user's account details, `"403 Forbidden"` is returned
59
- content:
60
- 'application/json':
61
- schema:
62
- type: object
63
- properties:
64
- code:
65
- type: string
66
- value: unauthorized_delete
67
- message:
68
- type: string
69
- value: You are not authorized to perform this operation. This attempt has been logged.
70
- example:
71
- code: unauthorized_delete
72
- message: You are not authorized to perform this operation. This attempt has been logged.
73
- 500:
74
- description: An unenexpected error occurred on the server
75
- content:
76
- 'application/json':
77
- schema:
1
+ /auth/{dbname}/delete:
2
+ post:
3
+ tags:
4
+ - auth
5
+ summary: Delete a user account
6
+ description: Deletes an existing user account
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: Account to delete
17
+ content:
18
+ 'text/plain':
19
+ schema:
20
+ type: string
21
+ value: ''
22
+ example: ''
23
+ description: Empty content to delete signed in user account
24
+ 'application/json':
25
+ schema:
26
+ type: object
27
+ properties:
28
+ uid:
29
+ type: string
30
+ description: (admin user only) to delete a specific user account, the target account `uid` must be passed with the request
31
+ example: jpx0k53u0002ecr7s354c51l
32
+ responses:
33
+ 200:
34
+ description: When delete succeeds, it returns the string `"Farewell"`
35
+ content:
36
+ 'text/plain':
37
+ schema:
38
+ type: text
39
+ value: Farewell
40
+ example: Farewell
41
+ 401:
42
+ description: If this is an unauthenticated request (not signed in), `"401 Unauthorized"` is returned
43
+ content:
44
+ 'application/json':
45
+ schema:
46
+ type: object
47
+ properties:
48
+ code:
49
+ type: string
50
+ value: unauthenticated_delete
51
+ message:
52
+ type: string
53
+ value: You are not authorized to perform this operation, your attempt has been logged
54
+ example:
55
+ code: unauthenticated_delete
56
+ message: You are not authorized to perform this operation, your attempt has been logged
57
+ 403:
58
+ description: If a non-admin user tries to update a user's account details, `"403 Forbidden"` is returned
59
+ content:
60
+ 'application/json':
61
+ schema:
62
+ type: object
63
+ properties:
64
+ code:
65
+ type: string
66
+ value: unauthorized_delete
67
+ message:
68
+ type: string
69
+ value: You are not authorized to perform this operation. This attempt has been logged.
70
+ example:
71
+ code: unauthorized_delete
72
+ message: You are not authorized to perform this operation. This attempt has been logged.
73
+ 500:
74
+ description: An unenexpected error occurred on the server
75
+ content:
76
+ 'application/json':
77
+ schema:
78
78
  $ref: '#/components/schemas/UnexpectedError'
@@ -1,50 +1,50 @@
1
- /auth/{dbname}/forgot_password:
2
- post:
3
- tags:
4
- - auth
5
- summary: Issue a password reset
6
- description: Issues a password reset for a user that forgot their password. User must have an email address in 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
- requestBody:
16
- description: user details
17
- content:
18
- 'application/json':
19
- schema:
20
- type: object
21
- properties:
22
- email:
23
- type: string
24
- description: User's email address. A password reset email will be sent to this address
25
- required:
26
- - email
27
- responses:
28
- 200:
29
- description: If a password reset email has been successfully sent, returns the string `"OK"`
30
- content:
31
- 'text/plain':
32
- schema:
33
- type: 'string'
34
- value: OK
35
- description: The string `"OK"`
36
- 400:
37
- description: Returns a `"400 Bad Request"` if the server has not been configured properly, or if no or invalid email address was sent with the request
38
- content:
39
- 'application/json':
40
- schema:
41
- $ref: '#/components/schemas/Error'
42
- example:
43
- code: invalid_email
44
- message: Email address not found, or duplicate entries found
45
- 500:
46
- description: An unexpected error occurred
47
- content:
48
- 'application/json':
49
- schema:
1
+ /auth/{dbname}/forgot_password:
2
+ post:
3
+ tags:
4
+ - auth
5
+ summary: Issue a password reset
6
+ description: Issues a password reset for a user that forgot their password. User must have an email address in 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
+ requestBody:
16
+ description: user details
17
+ content:
18
+ 'application/json':
19
+ schema:
20
+ type: object
21
+ properties:
22
+ email:
23
+ type: string
24
+ description: User's email address. A password reset email will be sent to this address
25
+ required:
26
+ - email
27
+ responses:
28
+ 200:
29
+ description: If a password reset email has been successfully sent, returns the string `"OK"`
30
+ content:
31
+ 'text/plain':
32
+ schema:
33
+ type: 'string'
34
+ value: OK
35
+ description: The string `"OK"`
36
+ 400:
37
+ description: Returns a `"400 Bad Request"` if the server has not been configured properly, or if no or invalid email address was sent with the request
38
+ content:
39
+ 'application/json':
40
+ schema:
41
+ $ref: '#/components/schemas/Error'
42
+ example:
43
+ code: invalid_email
44
+ message: Email address not found, or duplicate entries found
45
+ 500:
46
+ description: An unexpected error occurred
47
+ content:
48
+ 'application/json':
49
+ schema:
50
50
  $ref: '#/components/schemas/UnexpectedError'
@@ -1,54 +1,54 @@
1
- /auth/{dbname}/reset_password:
2
- post:
3
- tags:
4
- - auth
5
- summary: Completes a password reset
6
- description: Completes a password reset request for a user account with a code sent to the email address by the `forgot_password` endpoint
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: verification object
17
- content:
18
- 'application/json':
19
- schema:
20
- type: object
21
- properties:
22
- code:
23
- type: string
24
- description: Password reset code that was sent to the user's email address
25
- password:
26
- type: string
27
- description: New password to set on the account
28
- required:
29
- - code
30
- - password
31
- responses:
32
- 200:
33
- description: If the password reset is successful, returns the string `"OK"`
34
- content:
35
- 'text/plain':
36
- schema:
37
- type: 'string'
38
- value: OK
39
- description: The string `"OK"`
40
- 400:
41
- description: Returns a `"401 Bad Request"` if the code sent with the request is invalid, or the new password doesn't meet the requirements
42
- content:
43
- 'application/json':
44
- schema:
45
- $ref: '#/components/schemas/Error'
46
- example:
47
- code: invalid_code
48
- message: Invalid token
49
- 500:
50
- description: An unexpected error occurred
51
- content:
52
- 'application/json':
53
- schema:
1
+ /auth/{dbname}/reset_password:
2
+ post:
3
+ tags:
4
+ - auth
5
+ summary: Completes a password reset
6
+ description: Completes a password reset request for a user account with a code sent to the email address by the `forgot_password` endpoint
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: verification object
17
+ content:
18
+ 'application/json':
19
+ schema:
20
+ type: object
21
+ properties:
22
+ code:
23
+ type: string
24
+ description: Password reset code that was sent to the user's email address
25
+ password:
26
+ type: string
27
+ description: New password to set on the account
28
+ required:
29
+ - code
30
+ - password
31
+ responses:
32
+ 200:
33
+ description: If the password reset is successful, returns the string `"OK"`
34
+ content:
35
+ 'text/plain':
36
+ schema:
37
+ type: 'string'
38
+ value: OK
39
+ description: The string `"OK"`
40
+ 400:
41
+ description: Returns a `"401 Bad Request"` if the code sent with the request is invalid, or the new password doesn't meet the requirements
42
+ content:
43
+ 'application/json':
44
+ schema:
45
+ $ref: '#/components/schemas/Error'
46
+ example:
47
+ code: invalid_code
48
+ message: Invalid token
49
+ 500:
50
+ description: An unexpected error occurred
51
+ content:
52
+ 'application/json':
53
+ schema:
54
54
  $ref: '#/components/schemas/UnexpectedError'