@appsemble/types 0.20.28 → 0.20.29

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,10 +1,10 @@
1
- # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.20.28/config/assets/logo.svg) Appsemble Types
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.20.29/config/assets/logo.svg) Appsemble Types
2
2
 
3
3
  > Reusable TypeScript types
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@appsemble/types)](https://www.npmjs.com/package/@appsemble/types)
6
- [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.20.28/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.20.28)
7
- [![Code coverage](https://codecov.io/gl/appsemble/appsemble/branch/0.20.28/graph/badge.svg)](https://codecov.io/gl/appsemble/appsemble)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.20.29/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.20.29)
7
+ [![Code coverage](https://codecov.io/gl/appsemble/appsemble/branch/0.20.29/graph/badge.svg)](https://codecov.io/gl/appsemble/appsemble)
8
8
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](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.28/LICENSE.md) ©
24
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.29/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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/types",
3
- "version": "0.20.28",
3
+ "version": "0.20.29",
4
4
  "description": "TypeScript definitions reused within Appsemble internally",
5
5
  "keywords": [
6
6
  "app",
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
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"authentication.js","sourceRoot":"","sources":["authentication.ts"],"names":[],"mappings":""}
package/authentication.ts DELETED
@@ -1,5 +0,0 @@
1
- export interface LoginCodeResponse {
2
- isAllowed: boolean;
3
- appName?: string;
4
- code: string;
5
- }
package/author.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"author.js","sourceRoot":"","sources":["author.ts"],"names":[],"mappings":""}
package/author.ts DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * A minimal user representation used to display author information on various data types.
3
- */
4
- export interface Author {
5
- /**
6
- * The user id.
7
- */
8
- id: string;
9
-
10
- /**
11
- * The display name of the user.
12
- */
13
- name: string;
14
- }
package/bulma.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"bulma.js","sourceRoot":"","sources":["bulma.ts"],"names":[],"mappings":""}
package/bulma.ts DELETED
@@ -1,14 +0,0 @@
1
- /**
2
- * A color known to Bulma.
3
- */
4
- export type BulmaColor =
5
- | 'danger'
6
- | 'dark'
7
- | 'info'
8
- | 'link'
9
- | 'primary'
10
- | 'success'
11
- | 'warning'
12
- | 'white';
13
-
14
- export type BulmaSize = 'large' | 'medium' | 'normal' | 'small';
File without changes
File without changes
File without changes
File without changes
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
@@ -1,14 +0,0 @@
1
- /**
2
- * Common HTTP methods, but either all upper case or all lower case.
3
- */
4
- export type HTTPMethods =
5
- | 'DELETE'
6
- | 'delete'
7
- | 'GET'
8
- | 'get'
9
- | 'PATCH'
10
- | 'patch'
11
- | 'POST'
12
- | 'post'
13
- | 'PUT'
14
- | 'put';
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"}