@appsemble/types 0.29.11 → 0.30.1
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/action.d.ts +1 -1
- package/app.d.ts +0 -25
- package/index.d.ts +235 -121
- package/index.js +3 -3
- package/{user.d.ts → oauth2.d.ts} +0 -26
- package/oauth2.js +2 -0
- package/package.json +1 -1
- package/permissions.d.ts +385 -0
- package/permissions.js +411 -0
- package/resource.d.ts +14 -0
- package/roles.d.ts +48 -0
- package/roles.js +202 -0
- package/appMember.d.ts +0 -19
- package/appMember.js +0 -2
- package/team.d.ts +0 -20
- package/team.js +0 -2
- package/user.js +0 -2
package/index.d.ts
CHANGED
|
@@ -3,13 +3,14 @@ import { type Schema } from 'jsonschema';
|
|
|
3
3
|
import { type OpenAPIV3 } from 'openapi-types';
|
|
4
4
|
import { type JsonObject, type RequireExactlyOne } from 'type-fest';
|
|
5
5
|
import { type Action, type LogAction } from './action.js';
|
|
6
|
-
import { type AppVisibility
|
|
6
|
+
import { type AppVisibility } from './app.js';
|
|
7
7
|
import { type BulmaColor } from './bulma.js';
|
|
8
8
|
import { type HTTPMethods } from './http.js';
|
|
9
|
+
import { type AppPermission } from './permissions.js';
|
|
10
|
+
import { type AppRole, type PredefinedAppRole, type PredefinedOrganizationRole } from './roles.js';
|
|
9
11
|
import { type Theme } from './theme.js';
|
|
10
12
|
export * from './action.js';
|
|
11
13
|
export * from './app.js';
|
|
12
|
-
export * from './appMember.js';
|
|
13
14
|
export * from './asset.js';
|
|
14
15
|
export * from './authentication.js';
|
|
15
16
|
export * from './author.js';
|
|
@@ -21,11 +22,12 @@ export * from './snapshot.js';
|
|
|
21
22
|
export * from './resource.js';
|
|
22
23
|
export * from './saml.js';
|
|
23
24
|
export * from './ssl.js';
|
|
24
|
-
export * from './team.js';
|
|
25
25
|
export * from './template.js';
|
|
26
26
|
export * from './theme.js';
|
|
27
|
-
export * from './
|
|
27
|
+
export * from './oauth2.js';
|
|
28
28
|
export * from './quota.js';
|
|
29
|
+
export * from './permissions.js';
|
|
30
|
+
export * from './roles.js';
|
|
29
31
|
/**
|
|
30
32
|
* A representation of a generated OAuth2 authorization code response.
|
|
31
33
|
*/
|
|
@@ -103,7 +105,7 @@ export interface BlockDefinition extends ControllerDefinition {
|
|
|
103
105
|
/**
|
|
104
106
|
* A list of roles that are allowed to view this block.
|
|
105
107
|
*/
|
|
106
|
-
roles?:
|
|
108
|
+
roles?: ViewRole[];
|
|
107
109
|
/**
|
|
108
110
|
* A free form mapping of named parameters.
|
|
109
111
|
*
|
|
@@ -118,7 +120,7 @@ export interface BlockDefinition extends ControllerDefinition {
|
|
|
118
120
|
* The Connect2id server can be set up to provide additional custom claims, such as roles and
|
|
119
121
|
* permissions.
|
|
120
122
|
*/
|
|
121
|
-
export interface
|
|
123
|
+
export interface BaseUserInfo {
|
|
122
124
|
/**
|
|
123
125
|
* The subject (end-user) identifier. This member is always present in a claims set.
|
|
124
126
|
*/
|
|
@@ -139,10 +141,6 @@ export interface UserInfo {
|
|
|
139
141
|
* The URL of the profile picture for the end-user.
|
|
140
142
|
*/
|
|
141
143
|
picture?: string;
|
|
142
|
-
/**
|
|
143
|
-
* A URL that links to the user profile.
|
|
144
|
-
*/
|
|
145
|
-
profile?: string;
|
|
146
144
|
/**
|
|
147
145
|
* The end-user’s locale, represented as a BCP47 language tag.
|
|
148
146
|
*/
|
|
@@ -151,22 +149,41 @@ export interface UserInfo {
|
|
|
151
149
|
* The end-user’s time zone.
|
|
152
150
|
*/
|
|
153
151
|
zoneinfo?: string;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
*/
|
|
157
|
-
properties?: Record<string, any>;
|
|
152
|
+
}
|
|
153
|
+
export interface UserInfo extends BaseUserInfo {
|
|
158
154
|
/**
|
|
159
155
|
* If the user is subscribed to the newsletter
|
|
160
156
|
*/
|
|
161
157
|
subscribed?: boolean;
|
|
158
|
+
}
|
|
159
|
+
export interface AppMemberInfo extends BaseUserInfo {
|
|
162
160
|
/**
|
|
163
|
-
* The
|
|
161
|
+
* The role of the app member.
|
|
164
162
|
*/
|
|
165
|
-
|
|
163
|
+
role: AppRole;
|
|
166
164
|
/**
|
|
167
|
-
*
|
|
165
|
+
* The end-user's additional properties
|
|
168
166
|
*/
|
|
169
|
-
|
|
167
|
+
properties?: Record<string, any>;
|
|
168
|
+
/**
|
|
169
|
+
* Whether this app member is used for demonstration purposes
|
|
170
|
+
*/
|
|
171
|
+
demo: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface SSOConfiguration {
|
|
174
|
+
type: 'oauth2' | 'saml';
|
|
175
|
+
url: string;
|
|
176
|
+
icon: IconName;
|
|
177
|
+
name: string;
|
|
178
|
+
}
|
|
179
|
+
export interface AppAccount {
|
|
180
|
+
app: App;
|
|
181
|
+
appMemberInfo: AppMemberInfo;
|
|
182
|
+
sso: SSOConfiguration[];
|
|
183
|
+
}
|
|
184
|
+
export interface EmailAuthorization {
|
|
185
|
+
email: string;
|
|
186
|
+
verified: boolean;
|
|
170
187
|
}
|
|
171
188
|
/**
|
|
172
189
|
* The payload stored in our JSON web tokens
|
|
@@ -266,13 +283,17 @@ export interface Remappers {
|
|
|
266
283
|
*
|
|
267
284
|
* Supported properties:
|
|
268
285
|
*
|
|
269
|
-
* - `
|
|
270
|
-
* - `
|
|
271
|
-
* - `
|
|
272
|
-
* - `
|
|
273
|
-
* - `
|
|
286
|
+
* - `sub`: Get the id of the app member.
|
|
287
|
+
* - `name`: Get the name of the app member.
|
|
288
|
+
* - `email`: Get the email of the app member.
|
|
289
|
+
* - `email_verified`: Whether the email of the app member is verified.
|
|
290
|
+
* - `picture`: Get the picture of the app member.
|
|
291
|
+
* - `locale`: Get the locale of the app member.
|
|
292
|
+
* - `zoneinfo`: Get the zoneinfo of the app member.
|
|
293
|
+
* - `role`: Get the role of the app member.
|
|
294
|
+
* - `properties`: Get the custom properties of the app member.
|
|
274
295
|
*/
|
|
275
|
-
|
|
296
|
+
'app.member': keyof AppMemberInfo;
|
|
276
297
|
/**
|
|
277
298
|
* Get a predefined app variable by name.
|
|
278
299
|
*/
|
|
@@ -598,7 +619,6 @@ export interface Remappers {
|
|
|
598
619
|
* This does not support parameters, for more nuanced translations use `string.format`.
|
|
599
620
|
*/
|
|
600
621
|
translate: string;
|
|
601
|
-
user: keyof UserInfo;
|
|
602
622
|
container: string;
|
|
603
623
|
}
|
|
604
624
|
export type ObjectRemapper = RequireExactlyOne<Remappers>;
|
|
@@ -615,22 +635,42 @@ export interface SubscriptionResponseResource {
|
|
|
615
635
|
}>;
|
|
616
636
|
}
|
|
617
637
|
export type SubscriptionResponse = Record<string, SubscriptionResponseResource>;
|
|
638
|
+
export type ResourceViewAction = 'get' | 'query';
|
|
639
|
+
export type OwnResourceAction = ResourceViewAction | 'delete' | 'patch' | 'update';
|
|
640
|
+
export type ResourceAction = ResourceViewAction | 'create' | 'delete' | 'patch' | 'update';
|
|
641
|
+
export type CustomAppResourcePermission = `$resource:${string}:${ResourceAction}`;
|
|
642
|
+
export type CustomAppOwnResourcePermission = `$resource:${string}:own:${OwnResourceAction}`;
|
|
643
|
+
export type CustomAppResourceViewPermission = `$resource:${string}:${ResourceViewAction}:${string}`;
|
|
644
|
+
export type CustomAppGuestPermission = AppPermission | CustomAppResourcePermission | CustomAppResourceViewPermission;
|
|
645
|
+
export type CustomAppPermission = CustomAppGuestPermission | CustomAppOwnResourcePermission;
|
|
646
|
+
export interface GuestDefinition {
|
|
647
|
+
permissions?: CustomAppPermission[];
|
|
648
|
+
inherits?: AppRole[];
|
|
649
|
+
}
|
|
618
650
|
export interface RoleDefinition {
|
|
619
651
|
description?: string;
|
|
620
|
-
inherits?: string[];
|
|
621
652
|
defaultPage?: string;
|
|
653
|
+
inherits?: AppRole[];
|
|
654
|
+
permissions?: CustomAppPermission[];
|
|
655
|
+
}
|
|
656
|
+
export type SecurityPolicy = 'everyone' | 'invite' | 'organization';
|
|
657
|
+
export interface MinimalSecurity {
|
|
658
|
+
guest: GuestDefinition;
|
|
659
|
+
default?: {
|
|
660
|
+
role: AppRole;
|
|
661
|
+
policy?: SecurityPolicy;
|
|
662
|
+
};
|
|
663
|
+
roles?: Record<Exclude<string, PredefinedAppRole>, RoleDefinition>;
|
|
622
664
|
}
|
|
623
|
-
export interface
|
|
665
|
+
export interface StrictSecurity {
|
|
666
|
+
guest?: GuestDefinition;
|
|
624
667
|
default: {
|
|
625
|
-
role:
|
|
626
|
-
policy?:
|
|
668
|
+
role: AppRole;
|
|
669
|
+
policy?: SecurityPolicy;
|
|
627
670
|
};
|
|
628
671
|
roles: Record<string, RoleDefinition>;
|
|
629
|
-
/**
|
|
630
|
-
* Define how teams are handled by the app.
|
|
631
|
-
*/
|
|
632
|
-
teams?: TeamsDefinition;
|
|
633
672
|
}
|
|
673
|
+
export type Security = MinimalSecurity | StrictSecurity;
|
|
634
674
|
export type Navigation = 'bottom' | 'hidden' | 'left-menu';
|
|
635
675
|
export type LayoutPosition = 'hidden' | 'navbar' | 'navigation';
|
|
636
676
|
export interface NotificationDefinition {
|
|
@@ -665,10 +705,6 @@ export interface ResourceCall {
|
|
|
665
705
|
* Query parameters to pass along with the request.
|
|
666
706
|
*/
|
|
667
707
|
query?: Remapper;
|
|
668
|
-
/**
|
|
669
|
-
* The roles that are allowed to perform this action.
|
|
670
|
-
*/
|
|
671
|
-
roles?: string[];
|
|
672
708
|
}
|
|
673
709
|
export interface ResourceReferenceActionTrigger {
|
|
674
710
|
type: 'create' | 'delete' | 'update';
|
|
@@ -693,16 +729,12 @@ export interface ResourceHistoryDefinition {
|
|
|
693
729
|
data: boolean;
|
|
694
730
|
}
|
|
695
731
|
export interface ResourceView {
|
|
696
|
-
/**
|
|
697
|
-
* The roles required to use this view.
|
|
698
|
-
*/
|
|
699
|
-
roles: string[];
|
|
700
732
|
/**
|
|
701
733
|
* The remappers used to transform the output.
|
|
702
734
|
*/
|
|
703
735
|
remap: Remapper;
|
|
704
736
|
}
|
|
705
|
-
export interface
|
|
737
|
+
export interface AppMemberPropertyDefinition {
|
|
706
738
|
/**
|
|
707
739
|
* The JSON schema to validate user properties against before sending it to the backend.
|
|
708
740
|
*/
|
|
@@ -715,10 +747,6 @@ export interface UserPropertyDefinition {
|
|
|
715
747
|
};
|
|
716
748
|
}
|
|
717
749
|
export interface ResourceDefinition {
|
|
718
|
-
/**
|
|
719
|
-
* The default list of roles used for permission checks for each action.
|
|
720
|
-
*/
|
|
721
|
-
roles?: string[];
|
|
722
750
|
/**
|
|
723
751
|
* A definition of how versioning should happen for instances of this resource.
|
|
724
752
|
*/
|
|
@@ -1083,35 +1111,55 @@ export interface StorageWriteActionDefinition extends BaseActionDefinition<'stor
|
|
|
1083
1111
|
*/
|
|
1084
1112
|
storage?: StorageType;
|
|
1085
1113
|
}
|
|
1086
|
-
export interface
|
|
1114
|
+
export interface GroupMemberInviteActionDefinition extends BaseActionDefinition<'group.member.invite'> {
|
|
1087
1115
|
/**
|
|
1088
|
-
* The ID of the
|
|
1116
|
+
* The ID of the group to invite the user to.
|
|
1089
1117
|
*/
|
|
1090
|
-
id
|
|
1118
|
+
id: Remapper;
|
|
1091
1119
|
/**
|
|
1092
1120
|
* The email address of the user to invite.
|
|
1093
1121
|
*/
|
|
1094
|
-
email
|
|
1122
|
+
email: Remapper;
|
|
1123
|
+
/**
|
|
1124
|
+
* The role of the invited group member.
|
|
1125
|
+
*/
|
|
1126
|
+
role: Remapper;
|
|
1095
1127
|
}
|
|
1096
|
-
export interface
|
|
1128
|
+
export interface GroupMemberQueryActionDefinition extends BaseActionDefinition<'group.member.query'> {
|
|
1097
1129
|
/**
|
|
1098
|
-
* The ID of the
|
|
1130
|
+
* The ID of the group to query the members of.
|
|
1099
1131
|
*/
|
|
1100
1132
|
id: Remapper;
|
|
1101
1133
|
}
|
|
1102
|
-
export interface
|
|
1134
|
+
export interface GroupMemberDeleteActionDefinition extends BaseActionDefinition<'group.member.delete'> {
|
|
1103
1135
|
/**
|
|
1104
|
-
* The
|
|
1136
|
+
* The ID of the group member to delete.
|
|
1137
|
+
*/
|
|
1138
|
+
id: Remapper;
|
|
1139
|
+
}
|
|
1140
|
+
export interface GroupMemberRoleUpdateActionDefinition extends BaseActionDefinition<'group.member.role.update'> {
|
|
1141
|
+
/**
|
|
1142
|
+
* The ID of the group member to update the role of.
|
|
1143
|
+
*/
|
|
1144
|
+
id: Remapper;
|
|
1145
|
+
/**
|
|
1146
|
+
* The role to invite the app member with.
|
|
1147
|
+
*/
|
|
1148
|
+
role: Remapper;
|
|
1149
|
+
}
|
|
1150
|
+
export interface AppMemberLoginAction extends BaseActionDefinition<'app.member.login'> {
|
|
1151
|
+
/**
|
|
1152
|
+
* The email address to log in with.
|
|
1105
1153
|
*/
|
|
1106
1154
|
email: Remapper;
|
|
1107
1155
|
/**
|
|
1108
|
-
* The password to
|
|
1156
|
+
* The password to log in with.
|
|
1109
1157
|
*/
|
|
1110
1158
|
password: Remapper;
|
|
1111
1159
|
}
|
|
1112
|
-
export interface
|
|
1160
|
+
export interface AppMemberRegisterAction extends BaseActionDefinition<'app.member.register'> {
|
|
1113
1161
|
/**
|
|
1114
|
-
* The email address to
|
|
1162
|
+
* The email address to register with.
|
|
1115
1163
|
*/
|
|
1116
1164
|
email: Remapper;
|
|
1117
1165
|
/**
|
|
@@ -1119,15 +1167,9 @@ export interface UserRegisterAction extends BaseActionDefinition<'user.register'
|
|
|
1119
1167
|
*/
|
|
1120
1168
|
password: Remapper;
|
|
1121
1169
|
/**
|
|
1122
|
-
* The
|
|
1123
|
-
*/
|
|
1124
|
-
displayName: Remapper;
|
|
1125
|
-
/**
|
|
1126
|
-
* Whether to login after registering.
|
|
1127
|
-
*
|
|
1128
|
-
* @default true
|
|
1170
|
+
* The full name of the app member.
|
|
1129
1171
|
*/
|
|
1130
|
-
|
|
1172
|
+
name: Remapper;
|
|
1131
1173
|
/**
|
|
1132
1174
|
* The profile picture to use.
|
|
1133
1175
|
*
|
|
@@ -1140,54 +1182,56 @@ export interface UserRegisterAction extends BaseActionDefinition<'user.register'
|
|
|
1140
1182
|
* Every value will be converted to a string.
|
|
1141
1183
|
*/
|
|
1142
1184
|
properties?: Remapper;
|
|
1143
|
-
}
|
|
1144
|
-
export interface UserCreateAction extends BaseActionDefinition<'user.create'> {
|
|
1145
1185
|
/**
|
|
1146
|
-
*
|
|
1186
|
+
* Whether to login after registering.
|
|
1187
|
+
*
|
|
1188
|
+
* @default true
|
|
1147
1189
|
*/
|
|
1148
|
-
|
|
1190
|
+
login?: boolean;
|
|
1191
|
+
}
|
|
1192
|
+
export interface AppMemberInviteAction extends BaseActionDefinition<'app.member.invite'> {
|
|
1149
1193
|
/**
|
|
1150
|
-
* The email address to
|
|
1194
|
+
* The email address to invite the app member with.
|
|
1151
1195
|
*/
|
|
1152
1196
|
email: Remapper;
|
|
1153
1197
|
/**
|
|
1154
|
-
* The
|
|
1155
|
-
*/
|
|
1156
|
-
password: Remapper;
|
|
1157
|
-
/**
|
|
1158
|
-
* Custom properties that can be assigned freely.
|
|
1159
|
-
*
|
|
1160
|
-
* Every value will be converted to a string.
|
|
1161
|
-
*/
|
|
1162
|
-
properties?: Remapper;
|
|
1163
|
-
/**
|
|
1164
|
-
* The role of the created user
|
|
1198
|
+
* The role to invite the app member with.
|
|
1165
1199
|
*/
|
|
1166
|
-
role
|
|
1200
|
+
role: Remapper;
|
|
1167
1201
|
}
|
|
1168
|
-
export interface
|
|
1202
|
+
export interface AppMemberQueryAction extends BaseActionDefinition<'app.member.query'> {
|
|
1169
1203
|
/**
|
|
1170
1204
|
* The roles of the users to fetch.
|
|
1171
1205
|
*/
|
|
1172
1206
|
roles?: Remapper;
|
|
1173
1207
|
}
|
|
1174
|
-
export interface
|
|
1208
|
+
export interface AppMemberRoleUpdateAction extends BaseActionDefinition<'app.member.role.update'> {
|
|
1175
1209
|
/**
|
|
1176
|
-
* The
|
|
1210
|
+
* The id of the app member to update.
|
|
1177
1211
|
*/
|
|
1178
|
-
|
|
1212
|
+
sub: Remapper;
|
|
1179
1213
|
/**
|
|
1180
|
-
* The
|
|
1214
|
+
* The role of the updated app member
|
|
1181
1215
|
*/
|
|
1182
|
-
|
|
1216
|
+
role: Remapper;
|
|
1217
|
+
}
|
|
1218
|
+
export interface AppMemberPropertiesPatchAction extends BaseActionDefinition<'app.member.properties.patch'> {
|
|
1183
1219
|
/**
|
|
1184
|
-
* The
|
|
1220
|
+
* The id of the app member to update.
|
|
1185
1221
|
*/
|
|
1186
|
-
|
|
1222
|
+
sub: Remapper;
|
|
1187
1223
|
/**
|
|
1188
|
-
*
|
|
1224
|
+
* Custom properties that can be assigned freely.
|
|
1225
|
+
*
|
|
1226
|
+
* Every value will be converted to a string.
|
|
1189
1227
|
*/
|
|
1190
|
-
|
|
1228
|
+
properties: Remapper;
|
|
1229
|
+
}
|
|
1230
|
+
export interface AppMemberCurrentPatchAction extends BaseActionDefinition<'app.member.current.patch'> {
|
|
1231
|
+
/**
|
|
1232
|
+
* The display name to update.
|
|
1233
|
+
*/
|
|
1234
|
+
name?: Remapper;
|
|
1191
1235
|
/**
|
|
1192
1236
|
* Custom properties that can be assigned freely.
|
|
1193
1237
|
*
|
|
@@ -1195,15 +1239,17 @@ export interface UserUpdateAction extends BaseActionDefinition<'user.update'> {
|
|
|
1195
1239
|
*/
|
|
1196
1240
|
properties?: Remapper;
|
|
1197
1241
|
/**
|
|
1198
|
-
* The
|
|
1242
|
+
* The profile picture to use.
|
|
1243
|
+
*
|
|
1244
|
+
* This must be a file, otherwise it’s discarded.
|
|
1199
1245
|
*/
|
|
1200
|
-
|
|
1246
|
+
picture?: Remapper;
|
|
1201
1247
|
}
|
|
1202
|
-
export interface
|
|
1248
|
+
export interface AppMemberDeleteAction extends BaseActionDefinition<'app.member.delete'> {
|
|
1203
1249
|
/**
|
|
1204
|
-
* The
|
|
1250
|
+
* The id of the app member to remove.
|
|
1205
1251
|
*/
|
|
1206
|
-
|
|
1252
|
+
sub: Remapper;
|
|
1207
1253
|
}
|
|
1208
1254
|
export interface RequestLikeActionDefinition<T extends Action['type'] = Action['type']> extends BaseActionDefinition<T> {
|
|
1209
1255
|
/**
|
|
@@ -1247,6 +1293,12 @@ interface ViewResourceDefinition {
|
|
|
1247
1293
|
*/
|
|
1248
1294
|
view?: string;
|
|
1249
1295
|
}
|
|
1296
|
+
interface OwnResourceDefinition {
|
|
1297
|
+
/**
|
|
1298
|
+
* If only the resources created by the authenticated app member should be included
|
|
1299
|
+
*/
|
|
1300
|
+
own?: boolean;
|
|
1301
|
+
}
|
|
1250
1302
|
export interface ControllerActionDefinition extends BaseActionDefinition<'controller'> {
|
|
1251
1303
|
handler: string;
|
|
1252
1304
|
}
|
|
@@ -1254,11 +1306,11 @@ export type RequestActionDefinition = RequestLikeActionDefinition<'request'>;
|
|
|
1254
1306
|
export type ResourceCreateActionDefinition = ResourceActionDefinition<'resource.create'>;
|
|
1255
1307
|
export type ResourceDeleteActionDefinition = ResourceActionDefinition<'resource.delete'>;
|
|
1256
1308
|
export type ResourceGetActionDefinition = ResourceActionDefinition<'resource.get'> & ViewResourceDefinition;
|
|
1257
|
-
export type ResourceQueryActionDefinition = ResourceActionDefinition<'resource.query'> & ViewResourceDefinition;
|
|
1258
|
-
export type ResourceCountActionDefinition = ResourceActionDefinition<'resource.count'>;
|
|
1309
|
+
export type ResourceQueryActionDefinition = OwnResourceDefinition & ResourceActionDefinition<'resource.query'> & ViewResourceDefinition;
|
|
1310
|
+
export type ResourceCountActionDefinition = OwnResourceDefinition & ResourceActionDefinition<'resource.count'>;
|
|
1259
1311
|
export type ResourceUpdateActionDefinition = ResourceActionDefinition<'resource.update'>;
|
|
1260
1312
|
export type ResourcePatchActionDefinition = ResourceActionDefinition<'resource.patch'>;
|
|
1261
|
-
export type
|
|
1313
|
+
export type AppMemberLogoutAction = BaseActionDefinition<'app.member.logout'>;
|
|
1262
1314
|
export interface BaseResourceSubscribeActionDefinition<T extends Action['type']> extends BaseActionDefinition<T> {
|
|
1263
1315
|
/**
|
|
1264
1316
|
* The name of the resource.
|
|
@@ -1323,7 +1375,7 @@ export type MessageActionDefinition = BaseActionDefinition<'message'> & BaseMess
|
|
|
1323
1375
|
*/
|
|
1324
1376
|
body: Remapper;
|
|
1325
1377
|
};
|
|
1326
|
-
export type ActionDefinition = AnalyticsAction | BaseActionDefinition<'dialog.error'> | BaseActionDefinition<'dialog.ok'> | BaseActionDefinition<'flow.back'> | BaseActionDefinition<'flow.cancel'> | BaseActionDefinition<'flow.finish'> | BaseActionDefinition<'flow.next'> | BaseActionDefinition<'
|
|
1378
|
+
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 | DialogActionDefinition | DownloadActionDefinition | EachActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | GroupMemberDeleteActionDefinition | GroupMemberInviteActionDefinition | GroupMemberQueryActionDefinition | GroupMemberRoleUpdateActionDefinition | LinkActionDefinition | LogActionDefinition | MatchActionDefinition | MessageActionDefinition | NotifyActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceGetActionDefinition | ResourcePatchActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageAppendActionDefinition | StorageDeleteActionDefinition | StorageReadActionDefinition | StorageSubtractActionDefinition | StorageUpdateActionDefinition | StorageWriteActionDefinition;
|
|
1327
1379
|
export interface ActionType {
|
|
1328
1380
|
/**
|
|
1329
1381
|
* Whether or not app creators are required to define this action.
|
|
@@ -1340,6 +1392,7 @@ export interface EventType {
|
|
|
1340
1392
|
*/
|
|
1341
1393
|
description?: string;
|
|
1342
1394
|
}
|
|
1395
|
+
export type ViewRole = AppRole | '$guest';
|
|
1343
1396
|
/**
|
|
1344
1397
|
* This describes what a page will look like in the app.
|
|
1345
1398
|
*/
|
|
@@ -1375,7 +1428,7 @@ export interface BasePageDefinition {
|
|
|
1375
1428
|
/**
|
|
1376
1429
|
* A list of roles that may view the page.
|
|
1377
1430
|
*/
|
|
1378
|
-
roles?:
|
|
1431
|
+
roles?: ViewRole[];
|
|
1379
1432
|
/**
|
|
1380
1433
|
* An optional icon from the fontawesome icon set
|
|
1381
1434
|
*
|
|
@@ -1394,9 +1447,9 @@ export interface BasePageDefinition {
|
|
|
1394
1447
|
/**
|
|
1395
1448
|
* A subset of page for use within flow pages and tab pages.
|
|
1396
1449
|
*/
|
|
1397
|
-
export interface
|
|
1450
|
+
export interface SubPageDefinition {
|
|
1398
1451
|
name: Remapper;
|
|
1399
|
-
roles?:
|
|
1452
|
+
roles?: ViewRole[];
|
|
1400
1453
|
blocks: BlockDefinition[];
|
|
1401
1454
|
}
|
|
1402
1455
|
export interface BasicPageDefinition extends BasePageDefinition {
|
|
@@ -1409,7 +1462,7 @@ export interface ContainerPageDefinition extends BasePageDefinition {
|
|
|
1409
1462
|
}
|
|
1410
1463
|
export interface FlowPageDefinition extends BasePageDefinition {
|
|
1411
1464
|
type: 'flow';
|
|
1412
|
-
steps:
|
|
1465
|
+
steps: SubPageDefinition[];
|
|
1413
1466
|
/**
|
|
1414
1467
|
* A mapping of actions that can be fired by the page to action handlers.
|
|
1415
1468
|
*/
|
|
@@ -1437,7 +1490,7 @@ export interface LoopPageDefinition extends BasePageDefinition {
|
|
|
1437
1490
|
/**
|
|
1438
1491
|
* Template step that the loop will pass data onto
|
|
1439
1492
|
*/
|
|
1440
|
-
foreach?:
|
|
1493
|
+
foreach?: SubPageDefinition;
|
|
1441
1494
|
/**
|
|
1442
1495
|
* A mapping of actions that can be fired by the page to action handlers.
|
|
1443
1496
|
*/
|
|
@@ -1462,7 +1515,7 @@ export interface LoopPageDefinition extends BasePageDefinition {
|
|
|
1462
1515
|
retainFlowData?: boolean;
|
|
1463
1516
|
}
|
|
1464
1517
|
export interface AlternateTabsDefinition {
|
|
1465
|
-
foreach:
|
|
1518
|
+
foreach: SubPageDefinition;
|
|
1466
1519
|
events: {
|
|
1467
1520
|
listen?: Record<string, string>;
|
|
1468
1521
|
emit?: Record<string, string>;
|
|
@@ -1470,7 +1523,7 @@ export interface AlternateTabsDefinition {
|
|
|
1470
1523
|
}
|
|
1471
1524
|
export interface TabsPageDefinition extends BasePageDefinition {
|
|
1472
1525
|
type: 'tabs';
|
|
1473
|
-
tabs?:
|
|
1526
|
+
tabs?: SubPageDefinition[];
|
|
1474
1527
|
definition?: AlternateTabsDefinition;
|
|
1475
1528
|
/**
|
|
1476
1529
|
* A mapping of actions that can be fired by the page to action handlers.
|
|
@@ -1503,10 +1556,6 @@ export interface AppDefinition {
|
|
|
1503
1556
|
* This determines user roles and login behavior.
|
|
1504
1557
|
*/
|
|
1505
1558
|
security?: Security;
|
|
1506
|
-
/**
|
|
1507
|
-
* A list of roles that are required to view pages. Specific page roles override this property.
|
|
1508
|
-
*/
|
|
1509
|
-
roles?: string[];
|
|
1510
1559
|
/**
|
|
1511
1560
|
* The default page of the app.
|
|
1512
1561
|
*/
|
|
@@ -1557,8 +1606,8 @@ export interface AppDefinition {
|
|
|
1557
1606
|
*/
|
|
1558
1607
|
pages: PageDefinition[];
|
|
1559
1608
|
controller?: ControllerDefinition;
|
|
1560
|
-
|
|
1561
|
-
properties: Record<string,
|
|
1609
|
+
members?: {
|
|
1610
|
+
properties: Record<string, AppMemberPropertyDefinition>;
|
|
1562
1611
|
};
|
|
1563
1612
|
/**
|
|
1564
1613
|
* Resource definitions that may be used by the app.
|
|
@@ -1602,6 +1651,9 @@ export interface App {
|
|
|
1602
1651
|
* This value will be generated automatically by the API.
|
|
1603
1652
|
*/
|
|
1604
1653
|
id?: number;
|
|
1654
|
+
/**
|
|
1655
|
+
* A domain name on which this app should be served.
|
|
1656
|
+
*/
|
|
1605
1657
|
domain?: string;
|
|
1606
1658
|
/**
|
|
1607
1659
|
* The name used for emails
|
|
@@ -1820,19 +1872,81 @@ export interface OrganizationInvite {
|
|
|
1820
1872
|
/**
|
|
1821
1873
|
* The role the user should get when accepting the invite.
|
|
1822
1874
|
*/
|
|
1875
|
+
role: PredefinedOrganizationRole;
|
|
1876
|
+
}
|
|
1877
|
+
/**
|
|
1878
|
+
* An invite for an app.
|
|
1879
|
+
*/
|
|
1880
|
+
export interface AppInvite {
|
|
1881
|
+
/**
|
|
1882
|
+
* The email address of the app member to invite.
|
|
1883
|
+
*/
|
|
1884
|
+
email: string;
|
|
1885
|
+
/**
|
|
1886
|
+
* The role the app member should get when accepting the invite.
|
|
1887
|
+
*/
|
|
1823
1888
|
role: string;
|
|
1824
1889
|
}
|
|
1825
1890
|
/**
|
|
1826
|
-
*
|
|
1891
|
+
* An invite for a group.
|
|
1827
1892
|
*/
|
|
1828
|
-
export interface
|
|
1829
|
-
|
|
1830
|
-
|
|
1893
|
+
export interface GroupInvite {
|
|
1894
|
+
/**
|
|
1895
|
+
* The name of the group.
|
|
1896
|
+
*/
|
|
1897
|
+
groupId?: number;
|
|
1898
|
+
/**
|
|
1899
|
+
* The name of the group.
|
|
1900
|
+
*/
|
|
1901
|
+
groupName?: string;
|
|
1902
|
+
/**
|
|
1903
|
+
* The email address of the group member to invite.
|
|
1904
|
+
*/
|
|
1905
|
+
email: string;
|
|
1906
|
+
/**
|
|
1907
|
+
* The role the group member should get when accepting the invite.
|
|
1908
|
+
*/
|
|
1909
|
+
role: AppRole;
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* Represents a group within an organization.
|
|
1913
|
+
*/
|
|
1914
|
+
export interface Group {
|
|
1915
|
+
/**
|
|
1916
|
+
* The ID of the group.
|
|
1917
|
+
*/
|
|
1918
|
+
id: number;
|
|
1919
|
+
/**
|
|
1920
|
+
* The display name of the group.
|
|
1921
|
+
*/
|
|
1831
1922
|
name: string;
|
|
1832
|
-
|
|
1923
|
+
/**
|
|
1924
|
+
* Custom annotations for the group.
|
|
1925
|
+
*/
|
|
1926
|
+
annotations?: Record<string, string>;
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* Group member in a group.
|
|
1930
|
+
*/
|
|
1931
|
+
export interface GroupMember {
|
|
1932
|
+
id: string;
|
|
1833
1933
|
role: string;
|
|
1834
|
-
|
|
1835
|
-
|
|
1934
|
+
name: string;
|
|
1935
|
+
email: string;
|
|
1936
|
+
}
|
|
1937
|
+
export interface AppMemberGroup {
|
|
1938
|
+
/**
|
|
1939
|
+
* The ID of the group.
|
|
1940
|
+
*/
|
|
1941
|
+
id: number;
|
|
1942
|
+
/**
|
|
1943
|
+
* The display name of the group.
|
|
1944
|
+
*/
|
|
1945
|
+
name: string;
|
|
1946
|
+
/**
|
|
1947
|
+
* The role of the app member inside the group.
|
|
1948
|
+
*/
|
|
1949
|
+
role: AppRole;
|
|
1836
1950
|
}
|
|
1837
1951
|
/**
|
|
1838
1952
|
* The layout used to store Appsemble messages.
|
package/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './action.js';
|
|
2
2
|
export * from './app.js';
|
|
3
|
-
export * from './appMember.js';
|
|
4
3
|
export * from './asset.js';
|
|
5
4
|
export * from './authentication.js';
|
|
6
5
|
export * from './author.js';
|
|
@@ -12,9 +11,10 @@ export * from './snapshot.js';
|
|
|
12
11
|
export * from './resource.js';
|
|
13
12
|
export * from './saml.js';
|
|
14
13
|
export * from './ssl.js';
|
|
15
|
-
export * from './team.js';
|
|
16
14
|
export * from './template.js';
|
|
17
15
|
export * from './theme.js';
|
|
18
|
-
export * from './
|
|
16
|
+
export * from './oauth2.js';
|
|
19
17
|
export * from './quota.js';
|
|
18
|
+
export * from './permissions.js';
|
|
19
|
+
export * from './roles.js';
|
|
20
20
|
//# sourceMappingURL=index.js.map
|