@appsemble/lang-sdk 0.35.11-test.3 → 0.35.14
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/package.json +4 -4
- package/reference-schemas/actions/group.js +2 -0
- package/schemas/AppLayoutDefinition.js +15 -0
- package/schemas/actions/ActionDefinition.js +1 -0
- package/schemas/actions/GroupMemberCreateActionDefinition.d.ts +1 -0
- package/schemas/actions/GroupMemberCreateActionDefinition.js +26 -0
- package/schemas/index.d.ts +1 -0
- package/schemas/index.js +1 -0
- package/types/action.d.ts +1 -1
- package/types/actionDefinition.d.ts +16 -2
- package/types/core.d.ts +14 -0
- package/types/permission.d.ts +5 -0
- package/types/permission.js +5 -0
- package/types/roles.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/lang-sdk",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.14",
|
|
4
4
|
"description": "Language SDK for Appsemble",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"lcm": "^0.0.3"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@types/language-tags": "
|
|
60
|
-
"@types/lcm": "
|
|
61
|
-
"vitest": "
|
|
59
|
+
"@types/language-tags": "1.0.4",
|
|
60
|
+
"@types/lcm": "0.0.2",
|
|
61
|
+
"vitest": "2.1.9"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=20"
|
|
@@ -3,11 +3,13 @@ import { GroupMemberInviteActionDefinition } from '../../schemas/actions/GroupMe
|
|
|
3
3
|
import { GroupMemberQueryActionDefinition } from '../../schemas/actions/GroupMemberQueryActionDefinition.js';
|
|
4
4
|
import { GroupMemberRoleUpdateActionDefinition } from '../../schemas/actions/GroupMemberRoleUpdateActionDefinition.js';
|
|
5
5
|
import { GroupQueryActionDefinition } from '../../schemas/actions/GroupQueryActionDefinition.js';
|
|
6
|
+
import { GroupMemberCreateActionDefinition } from '../../schemas/index.js';
|
|
6
7
|
export const groupActions = {
|
|
7
8
|
'group.query': GroupQueryActionDefinition,
|
|
8
9
|
'group.member.invite': GroupMemberInviteActionDefinition,
|
|
9
10
|
'group.member.query': GroupMemberQueryActionDefinition,
|
|
10
11
|
'group.member.delete': GroupMemberDeleteActionDefinition,
|
|
11
12
|
'group.member.role.update': GroupMemberRoleUpdateActionDefinition,
|
|
13
|
+
'group.member.create': GroupMemberCreateActionDefinition,
|
|
12
14
|
};
|
|
13
15
|
//# sourceMappingURL=group.js.map
|
|
@@ -69,6 +69,21 @@ If this is omitted, a collapsable side navigation menu will be rendered on the l
|
|
|
69
69
|
asset: { type: 'string' },
|
|
70
70
|
},
|
|
71
71
|
},
|
|
72
|
+
headerTag: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
description: 'Header text to be shown in a tag next to the page name',
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
properties: {
|
|
77
|
+
text: {
|
|
78
|
+
description: 'Text to be shown inside the tag',
|
|
79
|
+
$ref: '#/components/schemas/RemapperDefinition',
|
|
80
|
+
},
|
|
81
|
+
hide: {
|
|
82
|
+
description: 'Whether to hide the tag',
|
|
83
|
+
$ref: '#/components/schemas/RemapperDefinition',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
72
87
|
},
|
|
73
88
|
};
|
|
74
89
|
//# sourceMappingURL=AppLayoutDefinition.js.map
|
|
@@ -74,6 +74,7 @@ export const ActionDefinition = {
|
|
|
74
74
|
{ $ref: '#/components/schemas/StorageUpdateActionDefinition' },
|
|
75
75
|
{ $ref: '#/components/schemas/StorageDeleteActionDefinition' },
|
|
76
76
|
{ $ref: '#/components/schemas/GroupMemberInviteActionDefinition' },
|
|
77
|
+
{ $ref: '#/components/schemas/GroupMemberCreateActionDefinition' },
|
|
77
78
|
{ $ref: '#/components/schemas/GroupMemberQueryActionDefinition' },
|
|
78
79
|
{ $ref: '#/components/schemas/GroupMemberDeleteActionDefinition' },
|
|
79
80
|
{ $ref: '#/components/schemas/GroupMemberRoleUpdateActionDefinition' },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GroupMemberCreateActionDefinition: import("openapi-types").OpenAPIV3.SchemaObject;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseActionDefinition } from './BaseActionDefinition.js';
|
|
2
|
+
import { extendJSONSchema } from '../utils/extendJSONSchema.js';
|
|
3
|
+
export const GroupMemberCreateActionDefinition = extendJSONSchema(BaseActionDefinition, {
|
|
4
|
+
type: 'object',
|
|
5
|
+
additionalProperties: false,
|
|
6
|
+
required: ['type'],
|
|
7
|
+
properties: {
|
|
8
|
+
type: {
|
|
9
|
+
enum: ['group.member.create'],
|
|
10
|
+
description: 'Invite an app member to join a group.',
|
|
11
|
+
},
|
|
12
|
+
id: {
|
|
13
|
+
description: 'The ID of the group to invite the app member to.',
|
|
14
|
+
$ref: '#/components/schemas/RemapperDefinition',
|
|
15
|
+
},
|
|
16
|
+
appMemberId: {
|
|
17
|
+
description: 'The ID of the app member to invite',
|
|
18
|
+
$ref: '#/components/schemas/RemapperDefinition',
|
|
19
|
+
},
|
|
20
|
+
role: {
|
|
21
|
+
description: 'The role to invite the user as.',
|
|
22
|
+
$ref: '#/components/schemas/RemapperDefinition',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=GroupMemberCreateActionDefinition.js.map
|
package/schemas/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export * from './actions/FlowCancelActionDefinition.js';
|
|
|
45
45
|
export * from './actions/FlowFinishActionDefinition.js';
|
|
46
46
|
export * from './actions/FlowNextActionDefinition.js';
|
|
47
47
|
export * from './actions/FlowToActionDefinition.js';
|
|
48
|
+
export * from './actions/GroupMemberCreateActionDefinition.js';
|
|
48
49
|
export * from './actions/GroupMemberDeleteActionDefinition.js';
|
|
49
50
|
export * from './actions/GroupMemberInviteActionDefinition.js';
|
|
50
51
|
export * from './actions/GroupMemberQueryActionDefinition.js';
|
package/schemas/index.js
CHANGED
|
@@ -45,6 +45,7 @@ export * from './actions/FlowCancelActionDefinition.js';
|
|
|
45
45
|
export * from './actions/FlowFinishActionDefinition.js';
|
|
46
46
|
export * from './actions/FlowNextActionDefinition.js';
|
|
47
47
|
export * from './actions/FlowToActionDefinition.js';
|
|
48
|
+
export * from './actions/GroupMemberCreateActionDefinition.js';
|
|
48
49
|
export * from './actions/GroupMemberDeleteActionDefinition.js';
|
|
49
50
|
export * from './actions/GroupMemberInviteActionDefinition.js';
|
|
50
51
|
export * from './actions/GroupMemberQueryActionDefinition.js';
|
package/types/action.d.ts
CHANGED
|
@@ -47,5 +47,5 @@ export type ResourcePatchAction = RequestLikeAction<'resource.patch'>;
|
|
|
47
47
|
/**
|
|
48
48
|
* An action that can be called from within a block.
|
|
49
49
|
*/
|
|
50
|
-
export type Action = BaseAction<'analytics'> | BaseAction<'app.member.current.patch'> | BaseAction<'app.member.delete'> | BaseAction<'app.member.invite'> | BaseAction<'app.member.login'> | BaseAction<'app.member.logout'> | BaseAction<'app.member.properties.patch'> | BaseAction<'app.member.query'> | BaseAction<'app.member.register'> | BaseAction<'app.member.role.update'> | BaseAction<'condition'> | BaseAction<'controller'> | BaseAction<'csv.parse'> | BaseAction<'dialog.error'> | BaseAction<'dialog.ok'> | BaseAction<'dialog'> | BaseAction<'download'> | BaseAction<'each'> | BaseAction<'email'> | BaseAction<'event'> | BaseAction<'flow.back'> | BaseAction<'flow.cancel'> | BaseAction<'flow.finish'> | BaseAction<'flow.next'> | BaseAction<'flow.to'> | BaseAction<'group.member.delete'> | BaseAction<'group.member.invite'> | BaseAction<'group.member.query'> | BaseAction<'group.member.role.update'> | BaseAction<'group.query'> | BaseAction<'link.back'> | BaseAction<'link.next'> | BaseAction<'match'> | BaseAction<'message'> | BaseAction<'noop'> | BaseAction<'notify'> | BaseAction<'resource.subscription.status'> | BaseAction<'resource.subscription.subscribe'> | BaseAction<'resource.subscription.toggle'> | BaseAction<'resource.subscription.unsubscribe'> | BaseAction<'share'> | BaseAction<'static'> | BaseAction<'storage.append'> | BaseAction<'storage.delete'> | BaseAction<'storage.read'> | BaseAction<'storage.subtract'> | BaseAction<'storage.update'> | BaseAction<'storage.write'> | BaseAction<'throw'> | LinkAction | LogAction | RequestAction | ResourceCountAction | ResourceCreateAction | ResourceDeleteAction | ResourceDeleteAllAction | ResourceDeleteBulkAction | ResourceGetAction | ResourceHistoryGetAction | ResourcePatchAction | ResourceQueryAction | ResourceUpdateAction | ResourceUpdatePositionsAction;
|
|
50
|
+
export type Action = BaseAction<'analytics'> | BaseAction<'app.member.current.patch'> | BaseAction<'app.member.delete'> | BaseAction<'app.member.invite'> | BaseAction<'app.member.login'> | BaseAction<'app.member.logout'> | BaseAction<'app.member.properties.patch'> | BaseAction<'app.member.query'> | BaseAction<'app.member.register'> | BaseAction<'app.member.role.update'> | BaseAction<'condition'> | BaseAction<'controller'> | BaseAction<'csv.parse'> | BaseAction<'dialog.error'> | BaseAction<'dialog.ok'> | BaseAction<'dialog'> | BaseAction<'download'> | BaseAction<'each'> | BaseAction<'email'> | BaseAction<'event'> | BaseAction<'flow.back'> | BaseAction<'flow.cancel'> | BaseAction<'flow.finish'> | BaseAction<'flow.next'> | BaseAction<'flow.to'> | BaseAction<'group.member.create'> | BaseAction<'group.member.delete'> | BaseAction<'group.member.invite'> | BaseAction<'group.member.query'> | BaseAction<'group.member.role.update'> | BaseAction<'group.query'> | BaseAction<'link.back'> | BaseAction<'link.next'> | BaseAction<'match'> | BaseAction<'message'> | BaseAction<'noop'> | BaseAction<'notify'> | BaseAction<'resource.subscription.status'> | BaseAction<'resource.subscription.subscribe'> | BaseAction<'resource.subscription.toggle'> | BaseAction<'resource.subscription.unsubscribe'> | BaseAction<'share'> | BaseAction<'static'> | BaseAction<'storage.append'> | BaseAction<'storage.delete'> | BaseAction<'storage.read'> | BaseAction<'storage.subtract'> | BaseAction<'storage.update'> | BaseAction<'storage.write'> | BaseAction<'throw'> | LinkAction | LogAction | RequestAction | ResourceCountAction | ResourceCreateAction | ResourceDeleteAction | ResourceDeleteAllAction | ResourceDeleteBulkAction | ResourceGetAction | ResourceHistoryGetAction | ResourcePatchAction | ResourceQueryAction | ResourceUpdateAction | ResourceUpdatePositionsAction;
|
|
51
51
|
export {};
|
|
@@ -3,8 +3,8 @@ import { type BlockDefinition } from './block.js';
|
|
|
3
3
|
import { type BulmaColor } from './bulma.js';
|
|
4
4
|
import { type HTTPMethods } from './http.js';
|
|
5
5
|
import { type Remapper } from './remapper.js';
|
|
6
|
-
export type ActionDefinition = AnalyticsAction | AppMemberCurrentPatchAction | AppMemberDeleteAction | AppMemberInviteAction | AppMemberLoginAction | AppMemberLogoutAction | AppMemberPropertiesPatchAction | AppMemberQueryAction | AppMemberRegisterAction | AppMemberRoleUpdateAction | BaseActionDefinition<'dialog.error'> | BaseActionDefinition<'dialog.ok'> | BaseActionDefinition<'flow.back'> | BaseActionDefinition<'flow.cancel'> | BaseActionDefinition<'flow.finish'> | BaseActionDefinition<'flow.next'> | BaseActionDefinition<'group.query'> | BaseActionDefinition<'link.back'> | BaseActionDefinition<'link.next'> | BaseActionDefinition<'noop'> | BaseActionDefinition<'throw'> | ConditionActionDefinition | ControllerActionDefinition | CsvParserActionDefinition | DialogActionDefinition | DownloadActionDefinition | EachActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | GroupMemberDeleteActionDefinition | GroupMemberInviteActionDefinition | GroupMemberQueryActionDefinition | GroupMemberRoleUpdateActionDefinition | LinkActionDefinition | LogActionDefinition | MatchActionDefinition | MessageActionDefinition | NotifyActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceDeleteAllActionDefinition | ResourceDeleteBulkActionDefinition | ResourceGetActionDefinition | ResourceHistoryGetActionDefinition | ResourcePatchActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ResourceUpdatePositionsActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageAppendActionDefinition | StorageDeleteActionDefinition | StorageReadActionDefinition | StorageSubtractActionDefinition | StorageUpdateActionDefinition | StorageWriteActionDefinition;
|
|
7
|
-
export type ActionName = 'analytics' | 'app.member.current.patch' | 'app.member.delete' | 'app.member.invite' | 'app.member.login' | 'app.member.logout' | 'app.member.properties.patch' | 'app.member.query' | 'app.member.register' | 'app.member.role.update' | 'condition' | 'controller' | 'csv.parse' | 'dialog.error' | 'dialog.ok' | 'dialog' | 'download' | 'each' | 'email' | 'event' | 'flow.back' | 'flow.cancel' | 'flow.finish' | 'flow.next' | 'flow.to' | 'group.member.delete' | 'group.member.invite' | 'group.member.query' | 'group.member.role.update' | 'group.query' | 'link.back' | 'link.next' | 'link' | 'log' | 'match' | 'message' | 'noop' | 'notify' | 'request' | 'resource.count' | 'resource.create' | 'resource.delete.all' | 'resource.delete.bulk' | 'resource.delete' | 'resource.get' | 'resource.history.get' | 'resource.patch' | 'resource.query' | 'resource.subscription.status' | 'resource.subscription.subscribe' | 'resource.subscription.toggle' | 'resource.subscription.unsubscribe' | 'resource.update.positions' | 'resource.update' | 'share' | 'static' | 'storage.append' | 'storage.delete' | 'storage.read' | 'storage.subtract' | 'storage.update' | 'storage.write' | 'throw';
|
|
6
|
+
export type ActionDefinition = AnalyticsAction | AppMemberCurrentPatchAction | AppMemberDeleteAction | AppMemberInviteAction | AppMemberLoginAction | AppMemberLogoutAction | AppMemberPropertiesPatchAction | AppMemberQueryAction | AppMemberRegisterAction | AppMemberRoleUpdateAction | BaseActionDefinition<'dialog.error'> | BaseActionDefinition<'dialog.ok'> | BaseActionDefinition<'flow.back'> | BaseActionDefinition<'flow.cancel'> | BaseActionDefinition<'flow.finish'> | BaseActionDefinition<'flow.next'> | BaseActionDefinition<'group.query'> | BaseActionDefinition<'link.back'> | BaseActionDefinition<'link.next'> | BaseActionDefinition<'noop'> | BaseActionDefinition<'throw'> | ConditionActionDefinition | ControllerActionDefinition | CsvParserActionDefinition | DialogActionDefinition | DownloadActionDefinition | EachActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | GroupMemberCreateActionDefinition | GroupMemberDeleteActionDefinition | GroupMemberInviteActionDefinition | GroupMemberQueryActionDefinition | GroupMemberRoleUpdateActionDefinition | LinkActionDefinition | LogActionDefinition | MatchActionDefinition | MessageActionDefinition | NotifyActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceDeleteAllActionDefinition | ResourceDeleteBulkActionDefinition | ResourceGetActionDefinition | ResourceHistoryGetActionDefinition | ResourcePatchActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ResourceUpdatePositionsActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageAppendActionDefinition | StorageDeleteActionDefinition | StorageReadActionDefinition | StorageSubtractActionDefinition | StorageUpdateActionDefinition | StorageWriteActionDefinition;
|
|
7
|
+
export type ActionName = 'analytics' | 'app.member.current.patch' | 'app.member.delete' | 'app.member.invite' | 'app.member.login' | 'app.member.logout' | 'app.member.properties.patch' | 'app.member.query' | 'app.member.register' | 'app.member.role.update' | 'condition' | 'controller' | 'csv.parse' | 'dialog.error' | 'dialog.ok' | 'dialog' | 'download' | 'each' | 'email' | 'event' | 'flow.back' | 'flow.cancel' | 'flow.finish' | 'flow.next' | 'flow.to' | 'group.member.create' | 'group.member.delete' | 'group.member.invite' | 'group.member.query' | 'group.member.role.update' | 'group.query' | 'link.back' | 'link.next' | 'link' | 'log' | 'match' | 'message' | 'noop' | 'notify' | 'request' | 'resource.count' | 'resource.create' | 'resource.delete.all' | 'resource.delete.bulk' | 'resource.delete' | 'resource.get' | 'resource.history.get' | 'resource.patch' | 'resource.query' | 'resource.subscription.status' | 'resource.subscription.subscribe' | 'resource.subscription.toggle' | 'resource.subscription.unsubscribe' | 'resource.update.positions' | 'resource.update' | 'share' | 'static' | 'storage.append' | 'storage.delete' | 'storage.read' | 'storage.subtract' | 'storage.update' | 'storage.write' | 'throw';
|
|
8
8
|
export interface BaseActionDefinition<T extends ActionName> {
|
|
9
9
|
/**
|
|
10
10
|
* The type of the action.
|
|
@@ -324,6 +324,20 @@ export interface GroupMemberInviteActionDefinition extends BaseActionDefinition<
|
|
|
324
324
|
*/
|
|
325
325
|
role: Remapper;
|
|
326
326
|
}
|
|
327
|
+
export interface GroupMemberCreateActionDefinition extends BaseActionDefinition<'group.member.create'> {
|
|
328
|
+
/**
|
|
329
|
+
* The ID of the group to add the user to.
|
|
330
|
+
*/
|
|
331
|
+
id: Remapper;
|
|
332
|
+
/**
|
|
333
|
+
* The id of the app member to add.
|
|
334
|
+
*/
|
|
335
|
+
appMemberId: Remapper;
|
|
336
|
+
/**
|
|
337
|
+
* The role of the group member.
|
|
338
|
+
*/
|
|
339
|
+
role: Remapper;
|
|
340
|
+
}
|
|
327
341
|
export interface GroupMemberQueryActionDefinition extends BaseActionDefinition<'group.member.query'> {
|
|
328
342
|
/**
|
|
329
343
|
* The ID of the group to query the members of.
|
package/types/core.d.ts
CHANGED
|
@@ -95,6 +95,10 @@ export interface AppDefinition {
|
|
|
95
95
|
* The settings for displaying the app logo.
|
|
96
96
|
*/
|
|
97
97
|
logo?: AppLogo;
|
|
98
|
+
/**
|
|
99
|
+
* The settings for displaying a tag in the header.
|
|
100
|
+
*/
|
|
101
|
+
headerTag?: HeaderTag;
|
|
98
102
|
};
|
|
99
103
|
/**
|
|
100
104
|
* The strategy to use for apps to subscribe to push notifications.
|
|
@@ -325,6 +329,16 @@ export interface AppMemberPropertyDefinition {
|
|
|
325
329
|
resource: string;
|
|
326
330
|
};
|
|
327
331
|
}
|
|
332
|
+
export interface HeaderTag {
|
|
333
|
+
/**
|
|
334
|
+
* The text to be displayed in the tag.
|
|
335
|
+
*/
|
|
336
|
+
text: Remapper;
|
|
337
|
+
/**
|
|
338
|
+
* Whether to hide the tag.
|
|
339
|
+
*/
|
|
340
|
+
hide: Remapper;
|
|
341
|
+
}
|
|
328
342
|
export interface AppLogo {
|
|
329
343
|
/**
|
|
330
344
|
* The location of the logo
|
package/types/permission.d.ts
CHANGED
|
@@ -39,6 +39,11 @@ export declare enum AppPermission {
|
|
|
39
39
|
* The permission to create group invites.
|
|
40
40
|
*/
|
|
41
41
|
CreateGroupInvites = "$group:member:invite",
|
|
42
|
+
/**
|
|
43
|
+
* The permission to add new members to a group.
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
CreateGroupMembers = "$group:member:create",
|
|
42
47
|
/**
|
|
43
48
|
* The permission to query app members.
|
|
44
49
|
*/
|
package/types/permission.js
CHANGED
|
@@ -40,6 +40,11 @@ export var AppPermission;
|
|
|
40
40
|
* The permission to create group invites.
|
|
41
41
|
*/
|
|
42
42
|
AppPermission["CreateGroupInvites"] = "$group:member:invite";
|
|
43
|
+
/**
|
|
44
|
+
* The permission to add new members to a group.
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
AppPermission["CreateGroupMembers"] = "$group:member:create";
|
|
43
48
|
/**
|
|
44
49
|
* The permission to query app members.
|
|
45
50
|
*/
|
package/types/roles.js
CHANGED
|
@@ -14,6 +14,7 @@ const AppGroupMembersManagerPermissions = [
|
|
|
14
14
|
AppPermission.QueryGroupMembers,
|
|
15
15
|
AppPermission.RemoveGroupMembers,
|
|
16
16
|
AppPermission.UpdateGroupMemberRoles,
|
|
17
|
+
AppPermission.CreateGroupMembers,
|
|
17
18
|
];
|
|
18
19
|
const AppGroupsManagerPermissions = [
|
|
19
20
|
...AppMemberPermissions,
|