@appsemble/types 0.20.28 → 0.20.30
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 +4 -4
- package/index.d.ts +34 -1
- package/package.json +1 -1
- package/action.js.map +0 -1
- package/action.ts +0 -98
- package/app.js.map +0 -1
- package/app.ts +0 -39
- package/appMember.js.map +0 -1
- package/appMember.ts +0 -22
- package/asset.js.map +0 -1
- package/asset.ts +0 -31
- package/authentication.js.map +0 -1
- package/authentication.ts +0 -5
- package/author.js.map +0 -1
- package/author.ts +0 -14
- package/bulma.js.map +0 -1
- package/bulma.ts +0 -14
- package/changed/added/.gitkeep +0 -0
- package/changed/changed/.gitkeep +0 -0
- package/changed/deprecated/.gitkeep +0 -0
- package/changed/fixed/.gitkeep +0 -0
- package/changed/removed/.gitkeep +0 -0
- package/changed/security/.gitkeep +0 -0
- package/http.js.map +0 -1
- package/http.ts +0 -14
- package/index.js.map +0 -1
- package/index.ts +0 -2181
- package/jest.config.js +0 -3
- package/resource.js.map +0 -1
- package/resource.ts +0 -56
- package/saml.js.map +0 -1
- package/saml.ts +0 -3
- package/snapshot.js.map +0 -1
- package/snapshot.ts +0 -26
- package/ssl.js.map +0 -1
- package/ssl.ts +0 -15
- package/team.js.map +0 -1
- package/team.ts +0 -23
- package/template.js.map +0 -1
- package/template.ts +0 -33
- package/theme.js.map +0 -1
- package/theme.ts +0 -65
- package/tsconfig.json +0 -4
- package/user.js.map +0 -1
- package/user.ts +0 -66
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#  Appsemble Types
|
|
2
2
|
|
|
3
3
|
> Reusable TypeScript types
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/types)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.20.30)
|
|
7
|
+
[](https://codecov.io/gl/appsemble/appsemble)
|
|
8
8
|
[](https://prettier.io)
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
@@ -21,5 +21,5 @@ not guaranteed.
|
|
|
21
21
|
|
|
22
22
|
## License
|
|
23
23
|
|
|
24
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.
|
|
24
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.30/LICENSE.md) ©
|
|
25
25
|
[Appsemble](https://appsemble.com)
|
package/index.d.ts
CHANGED
|
@@ -260,6 +260,10 @@ export interface Remappers {
|
|
|
260
260
|
* Returns `true` if all entries are equal, otherwise `false`.
|
|
261
261
|
*/
|
|
262
262
|
equals: Remapper[];
|
|
263
|
+
/**
|
|
264
|
+
* Get data stored at the current flow page step
|
|
265
|
+
*/
|
|
266
|
+
step: string;
|
|
263
267
|
/**
|
|
264
268
|
* Compares the first computed remapper value with the second computed remapper value.
|
|
265
269
|
*
|
|
@@ -1269,11 +1273,40 @@ export interface FlowPageDefinition extends BasePageDefinition {
|
|
|
1269
1273
|
*/
|
|
1270
1274
|
retainFlowData?: boolean;
|
|
1271
1275
|
}
|
|
1276
|
+
export interface LoopPageDefinition extends BasePageDefinition {
|
|
1277
|
+
type: 'loop';
|
|
1278
|
+
/**
|
|
1279
|
+
* Template step that the loop will pass data onto
|
|
1280
|
+
*/
|
|
1281
|
+
foreach?: SubPage;
|
|
1282
|
+
/**
|
|
1283
|
+
* A mapping of actions that can be fired by the page to action handlers.
|
|
1284
|
+
*/
|
|
1285
|
+
actions?: {
|
|
1286
|
+
onFlowCancel?: ActionDefinition;
|
|
1287
|
+
onFlowFinish?: ActionDefinition;
|
|
1288
|
+
onLoad?: ActionDefinition;
|
|
1289
|
+
};
|
|
1290
|
+
/**
|
|
1291
|
+
* The method used to display the progress of the flow page.
|
|
1292
|
+
*
|
|
1293
|
+
* @default 'corner-dots'
|
|
1294
|
+
*/
|
|
1295
|
+
progress?: 'corner-dots' | 'hidden';
|
|
1296
|
+
/**
|
|
1297
|
+
* Whether to retain the flow data when navigating away to another page outside the flow.
|
|
1298
|
+
*
|
|
1299
|
+
* By default the flow page retains it's data after navigating once. Set to false to clear it.
|
|
1300
|
+
*
|
|
1301
|
+
* @default true
|
|
1302
|
+
*/
|
|
1303
|
+
retainFlowData?: boolean;
|
|
1304
|
+
}
|
|
1272
1305
|
export interface TabsPageDefinition extends BasePageDefinition {
|
|
1273
1306
|
type: 'tabs';
|
|
1274
1307
|
tabs: SubPage[];
|
|
1275
1308
|
}
|
|
1276
|
-
export type PageDefinition = BasicPageDefinition | FlowPageDefinition | TabsPageDefinition;
|
|
1309
|
+
export type PageDefinition = BasicPageDefinition | FlowPageDefinition | LoopPageDefinition | TabsPageDefinition;
|
|
1277
1310
|
export interface AppDefinition {
|
|
1278
1311
|
/**
|
|
1279
1312
|
* The name of the app.
|
package/package.json
CHANGED
package/action.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action.js","sourceRoot":"","sources":["action.ts"],"names":[],"mappings":""}
|
package/action.ts
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { HTTPMethods } from './http.js';
|
|
2
|
-
import { Remapper } from './index.js';
|
|
3
|
-
|
|
4
|
-
interface BaseAction<T extends string> {
|
|
5
|
-
/**
|
|
6
|
-
* A function which can be called to dispatch the action.
|
|
7
|
-
*/
|
|
8
|
-
<R>(data?: any, context?: Record<string, any>): Promise<R>;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The type of the action.
|
|
12
|
-
*/
|
|
13
|
-
type: T;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface LinkAction extends BaseAction<'link'> {
|
|
17
|
-
/**
|
|
18
|
-
* Get the link that the action would link to if the given data was passed.
|
|
19
|
-
*/
|
|
20
|
-
href: (data?: unknown) => string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface LogAction extends BaseAction<'log'> {
|
|
24
|
-
/**
|
|
25
|
-
* The logging level.
|
|
26
|
-
*/
|
|
27
|
-
level: 'error' | 'info' | 'warn';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface RequestLikeAction<T extends Action['type']> extends BaseAction<T> {
|
|
31
|
-
/**
|
|
32
|
-
* The HTTP method used to make the request.
|
|
33
|
-
*/
|
|
34
|
-
method: HTTPMethods;
|
|
35
|
-
/**
|
|
36
|
-
* The URL to which the request will be made.
|
|
37
|
-
*/
|
|
38
|
-
url: Remapper;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type RequestAction = RequestLikeAction<'request'>;
|
|
42
|
-
export type ResourceCreateAction = RequestLikeAction<'resource.create'>;
|
|
43
|
-
export type ResourceDeleteAction = RequestLikeAction<'resource.delete'>;
|
|
44
|
-
export type ResourceGetAction = RequestLikeAction<'resource.get'>;
|
|
45
|
-
export type ResourceQueryAction = RequestLikeAction<'resource.query'>;
|
|
46
|
-
export type ResourceCountAction = RequestLikeAction<'resource.count'>;
|
|
47
|
-
export type ResourceUpdateAction = RequestLikeAction<'resource.update'>;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* An action that can be called from within a block.
|
|
51
|
-
*/
|
|
52
|
-
export type Action =
|
|
53
|
-
| BaseAction<'analytics'>
|
|
54
|
-
| BaseAction<'condition'>
|
|
55
|
-
| BaseAction<'dialog.error'>
|
|
56
|
-
| BaseAction<'dialog.ok'>
|
|
57
|
-
| BaseAction<'dialog'>
|
|
58
|
-
| BaseAction<'download'>
|
|
59
|
-
| BaseAction<'each'>
|
|
60
|
-
| BaseAction<'email'>
|
|
61
|
-
| BaseAction<'event'>
|
|
62
|
-
| BaseAction<'flow.back'>
|
|
63
|
-
| BaseAction<'flow.cancel'>
|
|
64
|
-
| BaseAction<'flow.finish'>
|
|
65
|
-
| BaseAction<'flow.next'>
|
|
66
|
-
| BaseAction<'flow.to'>
|
|
67
|
-
| BaseAction<'link.back'>
|
|
68
|
-
| BaseAction<'link.next'>
|
|
69
|
-
| BaseAction<'message'>
|
|
70
|
-
| BaseAction<'noop'>
|
|
71
|
-
| BaseAction<'resource.subscription.status'>
|
|
72
|
-
| BaseAction<'resource.subscription.subscribe'>
|
|
73
|
-
| BaseAction<'resource.subscription.toggle'>
|
|
74
|
-
| BaseAction<'resource.subscription.unsubscribe'>
|
|
75
|
-
| BaseAction<'share'>
|
|
76
|
-
| BaseAction<'static'>
|
|
77
|
-
| BaseAction<'storage.append'>
|
|
78
|
-
| BaseAction<'storage.delete'>
|
|
79
|
-
| BaseAction<'storage.read'>
|
|
80
|
-
| BaseAction<'storage.subtract'>
|
|
81
|
-
| BaseAction<'storage.update'>
|
|
82
|
-
| BaseAction<'storage.write'>
|
|
83
|
-
| BaseAction<'team.invite'>
|
|
84
|
-
| BaseAction<'team.join'>
|
|
85
|
-
| BaseAction<'team.list'>
|
|
86
|
-
| BaseAction<'throw'>
|
|
87
|
-
| BaseAction<'user.login'>
|
|
88
|
-
| BaseAction<'user.register'>
|
|
89
|
-
| BaseAction<'user.update'>
|
|
90
|
-
| LinkAction
|
|
91
|
-
| LogAction
|
|
92
|
-
| RequestAction
|
|
93
|
-
| ResourceCountAction
|
|
94
|
-
| ResourceCreateAction
|
|
95
|
-
| ResourceDeleteAction
|
|
96
|
-
| ResourceGetAction
|
|
97
|
-
| ResourceQueryAction
|
|
98
|
-
| ResourceUpdateAction;
|
package/app.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":""}
|
package/app.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The app visibility of the app in the Appsemble app store.
|
|
3
|
-
*
|
|
4
|
-
* This doesn’t affect whether or not the app can be accessed on its own domain.
|
|
5
|
-
*
|
|
6
|
-
* - **public**: The app is publicly listed in the Appsemble app store.
|
|
7
|
-
* - **unlisted**: The app store page can be accessed, but the app isn’t listed publicly in the
|
|
8
|
-
* Appsemble app store.
|
|
9
|
-
* - **private**: The app is only visible to people who are part of the organization.
|
|
10
|
-
*/
|
|
11
|
-
export type AppVisibility = 'private' | 'public' | 'unlisted';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* This defines how teams are handled by an app.
|
|
15
|
-
*/
|
|
16
|
-
export interface TeamsDefinition {
|
|
17
|
-
/**
|
|
18
|
-
* If this is set to `anyone`, any logged in user may join a team. If this is set to `invite`,
|
|
19
|
-
* only users may join who have been invited.
|
|
20
|
-
*/
|
|
21
|
-
join: 'anyone' | 'invite';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* A list of app roles which may create a team.
|
|
25
|
-
*
|
|
26
|
-
* By default teams can only be created from Appsemble Studio.
|
|
27
|
-
*
|
|
28
|
-
* @default []
|
|
29
|
-
*/
|
|
30
|
-
create?: string[];
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The roles here determine which users may invite a team member.
|
|
34
|
-
*
|
|
35
|
-
* The special roles `$team:member` and `$team:manager` mean that users who are already member of
|
|
36
|
-
* manager of the team may also invite new members.
|
|
37
|
-
*/
|
|
38
|
-
invite: string[];
|
|
39
|
-
}
|
package/appMember.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appMember.js","sourceRoot":"","sources":["appMember.ts"],"names":[],"mappings":""}
|
package/appMember.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IconName } from '@fortawesome/fontawesome-common-types';
|
|
2
|
-
|
|
3
|
-
import { App } from './index.js';
|
|
4
|
-
|
|
5
|
-
export interface SSOConfiguration {
|
|
6
|
-
type: 'oauth2' | 'saml';
|
|
7
|
-
url: string;
|
|
8
|
-
icon: IconName;
|
|
9
|
-
name: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface AppAccount {
|
|
13
|
-
id: string;
|
|
14
|
-
role: string;
|
|
15
|
-
name: string;
|
|
16
|
-
email: string;
|
|
17
|
-
emailVerified: boolean;
|
|
18
|
-
picture: string;
|
|
19
|
-
app: App;
|
|
20
|
-
sso: SSOConfiguration[];
|
|
21
|
-
properties: Record<string, string>;
|
|
22
|
-
}
|
package/asset.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asset.js","sourceRoot":"","sources":["asset.ts"],"names":[],"mappings":""}
|
package/asset.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export interface Asset {
|
|
2
|
-
/**
|
|
3
|
-
* The unique ID of the asset.
|
|
4
|
-
*/
|
|
5
|
-
id: string;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The mime type of the asset.
|
|
9
|
-
*/
|
|
10
|
-
mime: string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The filename of the asset as it was uploaded.
|
|
14
|
-
*/
|
|
15
|
-
filename?: string;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* A custom name that was given to the asset.
|
|
19
|
-
*/
|
|
20
|
-
name?: string;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* The ID of the resource the asset is linked to.
|
|
24
|
-
*/
|
|
25
|
-
resourceId?: number;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* The type of the resource the asset is linked to.
|
|
29
|
-
*/
|
|
30
|
-
resourceType?: number;
|
|
31
|
-
}
|
package/authentication.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["authentication.ts"],"names":[],"mappings":""}
|
package/authentication.ts
DELETED
package/author.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"author.js","sourceRoot":"","sources":["author.ts"],"names":[],"mappings":""}
|
package/author.ts
DELETED
package/bulma.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bulma.js","sourceRoot":"","sources":["bulma.ts"],"names":[],"mappings":""}
|
package/bulma.ts
DELETED
package/changed/added/.gitkeep
DELETED
|
File without changes
|
package/changed/changed/.gitkeep
DELETED
|
File without changes
|
|
File without changes
|
package/changed/fixed/.gitkeep
DELETED
|
File without changes
|
package/changed/removed/.gitkeep
DELETED
|
File without changes
|
|
File without changes
|
package/http.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["http.ts"],"names":[],"mappings":""}
|
package/http.ts
DELETED
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAWA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|