@appsemble/utils 0.38.2-test.0 → 0.39.0
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.
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#  Appsemble Utilities
|
|
2
2
|
|
|
3
3
|
> Internal utility functions used across multiple Appsemble projects.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/utils)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.39.0)
|
|
7
7
|
[](https://prettier.io)
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
@@ -26,5 +26,5 @@ not guaranteed.
|
|
|
26
26
|
|
|
27
27
|
## License
|
|
28
28
|
|
|
29
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.
|
|
29
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.39.0/LICENSE.md) ©
|
|
30
30
|
[Appsemble](https://appsemble.com)
|
|
@@ -1,16 +1,38 @@
|
|
|
1
1
|
export const Health = {
|
|
2
2
|
type: 'object',
|
|
3
|
-
description: 'A health check
|
|
3
|
+
description: 'A health check response in the MicroProfile Health format',
|
|
4
4
|
readOnly: true,
|
|
5
5
|
additionalProperties: false,
|
|
6
|
+
required: ['status', 'checks'],
|
|
6
7
|
properties: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
description: '
|
|
8
|
+
status: {
|
|
9
|
+
enum: ['UP', 'DOWN'],
|
|
10
|
+
description: 'The overall status',
|
|
10
11
|
},
|
|
11
|
-
|
|
12
|
-
type: '
|
|
13
|
-
description: '
|
|
12
|
+
checks: {
|
|
13
|
+
type: 'array',
|
|
14
|
+
description: 'The individual checks the status is based on',
|
|
15
|
+
items: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
description: 'The outcome of one check',
|
|
18
|
+
additionalProperties: false,
|
|
19
|
+
required: ['name', 'status'],
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'The name of the check',
|
|
24
|
+
},
|
|
25
|
+
status: {
|
|
26
|
+
enum: ['UP', 'DOWN'],
|
|
27
|
+
description: 'The status of the check',
|
|
28
|
+
},
|
|
29
|
+
data: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
description: 'Details about the check',
|
|
32
|
+
additionalProperties: { type: 'string' },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
14
36
|
},
|
|
15
37
|
},
|
|
16
38
|
};
|
package/api/paths/health.js
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
export const pathItems = {
|
|
2
2
|
get: {
|
|
3
3
|
tags: ['main'],
|
|
4
|
-
description: '
|
|
4
|
+
description: 'Deprecated alias of `/health/ready`. Use `/health/live` for liveness probes.',
|
|
5
5
|
operationId: 'checkHealth',
|
|
6
|
+
deprecated: true,
|
|
6
7
|
responses: {
|
|
7
8
|
200: {
|
|
8
|
-
description: '
|
|
9
|
+
description: 'The instance is ready to receive traffic.',
|
|
10
|
+
content: {
|
|
11
|
+
'application/json': {
|
|
12
|
+
schema: {
|
|
13
|
+
$ref: '#/components/schemas/Health',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
503: {
|
|
19
|
+
description: 'The instance is draining or a hard dependency is unavailable.',
|
|
9
20
|
content: {
|
|
10
21
|
'application/json': {
|
|
11
22
|
schema: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { predefinedOrganizationRoles } from '@appsemble/types';
|
|
1
2
|
export const pathItems = {
|
|
2
3
|
parameters: [{ $ref: '#/components/parameters/organizationId' }],
|
|
3
4
|
get: {
|
|
@@ -19,7 +20,47 @@ export const pathItems = {
|
|
|
19
20
|
},
|
|
20
21
|
},
|
|
21
22
|
},
|
|
22
|
-
security: [{ studio: [] }],
|
|
23
|
+
security: [{ studio: [] }, { cli: ['organizations:write'] }],
|
|
24
|
+
},
|
|
25
|
+
post: {
|
|
26
|
+
tags: ['main', 'organization', 'member'],
|
|
27
|
+
description: 'Add an existing account to the organization that matches the given id.',
|
|
28
|
+
operationId: 'addOrganizationMember',
|
|
29
|
+
requestBody: {
|
|
30
|
+
description: 'The account to add.',
|
|
31
|
+
required: true,
|
|
32
|
+
content: {
|
|
33
|
+
'application/json': {
|
|
34
|
+
schema: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
required: ['email', 'role'],
|
|
37
|
+
properties: {
|
|
38
|
+
email: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
format: 'email',
|
|
41
|
+
},
|
|
42
|
+
role: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
enum: predefinedOrganizationRoles,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
responses: {
|
|
52
|
+
201: {
|
|
53
|
+
description: 'The newly added member.',
|
|
54
|
+
content: {
|
|
55
|
+
'application/json': {
|
|
56
|
+
schema: {
|
|
57
|
+
$ref: '#/components/schemas/OrganizationMember',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
security: [{ studio: [] }, { cli: ['organizations:write'] }],
|
|
23
64
|
},
|
|
24
65
|
};
|
|
25
66
|
//# sourceMappingURL=members.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "Utility functions used in Appsemble internally",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"test": "vitest"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@appsemble/lang-sdk": "0.
|
|
43
|
-
"@appsemble/types": "0.
|
|
42
|
+
"@appsemble/lang-sdk": "0.39.0",
|
|
43
|
+
"@appsemble/types": "0.39.0",
|
|
44
44
|
"@fortawesome/fontawesome-common-types": "^6.0.0",
|
|
45
45
|
"axios": "^1.0.0",
|
|
46
46
|
"langmap": "^0.0.16",
|