@appsemble/utils 0.36.8 → 0.36.10-test.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 +3 -3
- package/api/components/securitySchemes/app.js +1 -8
- package/api/paths/apps/appId/assets/assetId/download.d.ts +2 -0
- package/api/paths/apps/appId/assets/assetId/download.js +18 -0
- package/api/paths/apps/appId/assets/assetId.js +2 -2
- package/api/paths/index.d.ts +1 -0
- package/api/paths/index.js +2 -0
- package/api/paths/organizations/organizationId.js +1 -0
- package/constants/scopes.d.ts +9 -0
- package/constants/scopes.js +9 -0
- package/package.json +3 -3
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.36.10-test.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.36.
|
|
29
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.36.10-test.0/LICENSE.md) ©
|
|
30
30
|
[Appsemble](https://appsemble.com)
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
email: 'Read the user email address.',
|
|
3
|
-
openid: 'Login the user to the requesting app using OpenID.',
|
|
4
|
-
profile: 'Read the user profile, including the display name and profile picture.',
|
|
5
|
-
'resources:manage': 'Manage app resources on behalf of a user.',
|
|
6
|
-
'groups:read': 'Read the groups the user is a part of.',
|
|
7
|
-
'groups:write': 'Add new members to a group.',
|
|
8
|
-
};
|
|
1
|
+
import { appOAuth2Scopes as scopes } from '../../../constants/index.js';
|
|
9
2
|
export const app = {
|
|
10
3
|
type: 'oauth2',
|
|
11
4
|
description: `
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const pathItems = {
|
|
2
|
+
parameters: [
|
|
3
|
+
{ $ref: '#/components/parameters/appId' },
|
|
4
|
+
{ $ref: '#/components/parameters/assetId' },
|
|
5
|
+
],
|
|
6
|
+
get: {
|
|
7
|
+
tags: ['main', 'app', 'asset'],
|
|
8
|
+
description: 'Download the original asset binary.',
|
|
9
|
+
operationId: 'getOriginalAppAsset',
|
|
10
|
+
responses: {
|
|
11
|
+
200: {
|
|
12
|
+
description: 'The original asset that matches the given id.',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
security: [{ studio: [] }, { cli: ['assets:write'] }],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=download.js.map
|
|
@@ -7,7 +7,7 @@ export const pathItems = {
|
|
|
7
7
|
],
|
|
8
8
|
get: {
|
|
9
9
|
tags: ['common', 'app', 'asset'],
|
|
10
|
-
description: 'Get a single asset',
|
|
10
|
+
description: 'Get a single asset. Public image delivery uses AVIF derivatives by default.',
|
|
11
11
|
operationId: 'getAppAssetById',
|
|
12
12
|
responses: {
|
|
13
13
|
200: {
|
|
@@ -17,7 +17,7 @@ export const pathItems = {
|
|
|
17
17
|
},
|
|
18
18
|
head: {
|
|
19
19
|
tags: ['common', 'app', 'asset'],
|
|
20
|
-
description: 'Get the headers for a single asset',
|
|
20
|
+
description: 'Get the headers for a single asset. Public image delivery headers describe AVIF derivatives by default.',
|
|
21
21
|
operationId: 'getAppAssetHeadersById',
|
|
22
22
|
responses: {
|
|
23
23
|
200: {
|
package/api/paths/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare const paths: {
|
|
|
16
16
|
'/api/apps/{appId}/clonable-assets': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
17
17
|
'/api/apps/{appId}/clonable-resources': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
18
18
|
'/api/apps/{appId}/assets/\\$count': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
19
|
+
'/api/apps/{appId}/assets/{assetId}/download': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
19
20
|
'/api/apps/{appId}/assets/{assetId}': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
20
21
|
'/api/apps/{appId}/assets': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
|
21
22
|
'/api/apps/{appId}/broadcast': import("openapi-types").OpenAPIV3.PathItemObject<{}>;
|
package/api/paths/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { pathItems as appCollectionsAppCollectionIdHeaderImage } from './app-col
|
|
|
6
6
|
import { pathItems as appCollectionsAppCollectionId } from './app-collections/appCollectionId.js';
|
|
7
7
|
import { pathItems as appCollections } from './appCollections.js';
|
|
8
8
|
import { pathItems as appsAppIdActionsPath } from './apps/appId/actions/path.js';
|
|
9
|
+
import { pathItems as appsAppIdAssetsAssetIdDownload } from './apps/appId/assets/assetId/download.js';
|
|
9
10
|
import { pathItems as appsAppIdAssetsAssetId } from './apps/appId/assets/assetId.js';
|
|
10
11
|
import { pathItems as appsAppIdAssets$Count } from './apps/appId/assets/count.js';
|
|
11
12
|
import { pathItems as appsAppIdAssets } from './apps/appId/assets.js';
|
|
@@ -186,6 +187,7 @@ export const paths = {
|
|
|
186
187
|
// XXX: Temporary workaround until this is fixed in Koas
|
|
187
188
|
// See https://gitlab.com/remcohaszing/koas/-/issues/2
|
|
188
189
|
'/api/apps/{appId}/assets/\\$count': appsAppIdAssets$Count,
|
|
190
|
+
'/api/apps/{appId}/assets/{assetId}/download': appsAppIdAssetsAssetIdDownload,
|
|
189
191
|
'/api/apps/{appId}/assets/{assetId}': appsAppIdAssetsAssetId,
|
|
190
192
|
'/api/apps/{appId}/assets': appsAppIdAssets,
|
|
191
193
|
'/api/apps/{appId}/broadcast': appsAppIdBroadcast,
|
package/constants/scopes.d.ts
CHANGED
|
@@ -2,3 +2,12 @@
|
|
|
2
2
|
* All known OAuth2 scopes for client credentials.
|
|
3
3
|
*/
|
|
4
4
|
export declare const scopes: readonly ["apps:export", "apps:write", "apps:delete", "blocks:write", "blocks:delete", "organizations:write", "resources:read", "resources:write", "assets:write", "groups:read", "groups:write"];
|
|
5
|
+
export declare const appOAuth2Scopes: {
|
|
6
|
+
readonly email: "Read the user email address.";
|
|
7
|
+
readonly openid: "Login the user to the requesting app using OpenID.";
|
|
8
|
+
readonly profile: "Read the user profile, including the display name and profile picture.";
|
|
9
|
+
readonly 'resources:manage': "Manage app resources on behalf of a user.";
|
|
10
|
+
readonly 'groups:read': "Read the groups the user is a part of.";
|
|
11
|
+
readonly 'groups:write': "Add new members to a group.";
|
|
12
|
+
};
|
|
13
|
+
export declare const appOAuth2Scope: string;
|
package/constants/scopes.js
CHANGED
|
@@ -14,4 +14,13 @@ export const scopes = [
|
|
|
14
14
|
'groups:read',
|
|
15
15
|
'groups:write',
|
|
16
16
|
];
|
|
17
|
+
export const appOAuth2Scopes = {
|
|
18
|
+
email: 'Read the user email address.',
|
|
19
|
+
openid: 'Login the user to the requesting app using OpenID.',
|
|
20
|
+
profile: 'Read the user profile, including the display name and profile picture.',
|
|
21
|
+
'resources:manage': 'Manage app resources on behalf of a user.',
|
|
22
|
+
'groups:read': 'Read the groups the user is a part of.',
|
|
23
|
+
'groups:write': 'Add new members to a group.',
|
|
24
|
+
};
|
|
25
|
+
export const appOAuth2Scope = Object.keys(appOAuth2Scopes).join(' ');
|
|
17
26
|
//# sourceMappingURL=scopes.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/utils",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.10-test.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.36.
|
|
43
|
-
"@appsemble/types": "0.36.
|
|
42
|
+
"@appsemble/lang-sdk": "0.36.10-test.0",
|
|
43
|
+
"@appsemble/types": "0.36.10-test.0",
|
|
44
44
|
"@fortawesome/fontawesome-common-types": "^6.0.0",
|
|
45
45
|
"axios": "^1.0.0",
|
|
46
46
|
"langmap": "^0.0.16",
|