@appsemble/types 0.20.10 → 0.20.13
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/{dist/action.d.ts → action.d.ts} +0 -0
- package/{dist/action.js → action.js} +0 -0
- package/action.js.map +1 -0
- package/action.ts +93 -0
- package/{dist/app.d.ts → app.d.ts} +0 -0
- package/{dist/app.js → app.js} +0 -0
- package/app.js.map +1 -0
- package/app.ts +39 -0
- package/{dist/appMember.d.ts → appMember.d.ts} +0 -0
- package/{dist/appMember.js → appMember.js} +0 -0
- package/appMember.js.map +1 -0
- package/appMember.ts +22 -0
- package/{dist/asset.d.ts → asset.d.ts} +0 -0
- package/{dist/asset.js → asset.js} +0 -0
- package/asset.js.map +1 -0
- package/asset.ts +31 -0
- package/{dist/authentication.d.ts → authentication.d.ts} +0 -0
- package/{dist/authentication.js → authentication.js} +0 -0
- package/{dist/authentication.js.map → authentication.js.map} +1 -1
- package/authentication.ts +5 -0
- package/{dist/author.d.ts → author.d.ts} +0 -0
- package/{dist/author.js → author.js} +0 -0
- package/author.js.map +1 -0
- package/author.ts +14 -0
- package/{dist/bulma.d.ts → bulma.d.ts} +0 -0
- package/{dist/bulma.js → bulma.js} +0 -0
- package/bulma.js.map +1 -0
- package/bulma.ts +14 -0
- 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/{dist/http.d.ts → http.d.ts} +0 -0
- package/{dist/http.js → http.js} +0 -0
- package/http.js.map +1 -0
- package/http.ts +14 -0
- package/{dist/index.d.ts → index.d.ts} +4 -0
- package/{dist/index.js → index.js} +0 -0
- package/index.js.map +1 -0
- package/index.ts +1988 -0
- package/jest.config.js +1 -0
- package/package.json +5 -4
- package/{dist/resource.d.ts → resource.d.ts} +0 -0
- package/{dist/resource.js → resource.js} +0 -0
- package/resource.js.map +1 -0
- package/resource.ts +56 -0
- package/{dist/saml.d.ts → saml.d.ts} +0 -0
- package/{dist/saml.js → saml.js} +0 -0
- package/saml.js.map +1 -0
- package/saml.ts +3 -0
- package/{dist/snapshot.d.ts → snapshot.d.ts} +0 -0
- package/{dist/snapshot.js → snapshot.js} +0 -0
- package/snapshot.js.map +1 -0
- package/snapshot.ts +26 -0
- package/{dist/ssl.d.ts → ssl.d.ts} +0 -0
- package/{dist/ssl.js → ssl.js} +0 -0
- package/ssl.js.map +1 -0
- package/ssl.ts +15 -0
- package/{dist/team.d.ts → team.d.ts} +0 -0
- package/{dist/team.js → team.js} +0 -0
- package/team.js.map +1 -0
- package/team.ts +23 -0
- package/{dist/template.d.ts → template.d.ts} +0 -0
- package/{dist/template.js → template.js} +0 -0
- package/template.js.map +1 -0
- package/template.ts +33 -0
- package/{dist/theme.d.ts → theme.d.ts} +0 -0
- package/{dist/theme.js → theme.js} +0 -0
- package/theme.js.map +1 -0
- package/theme.ts +65 -0
- package/tsconfig.json +4 -0
- package/{dist/user.d.ts → user.d.ts} +0 -0
- package/{dist/user.js → user.js} +0 -0
- package/user.js.map +1 -0
- package/user.ts +66 -0
- package/dist/action.js.map +0 -1
- package/dist/app.js.map +0 -1
- package/dist/appMember.js.map +0 -1
- package/dist/asset.js.map +0 -1
- package/dist/author.js.map +0 -1
- package/dist/bulma.js.map +0 -1
- package/dist/http.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/resource.js.map +0 -1
- package/dist/saml.js.map +0 -1
- package/dist/snapshot.js.map +0 -1
- package/dist/ssl.js.map +0 -1
- package/dist/team.js.map +0 -1
- package/dist/template.js.map +0 -1
- package/dist/theme.js.map +0 -1
- package/dist/user.js.map +0 -1
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.13)
|
|
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.
|
|
24
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.13/LICENSE.md) ©
|
|
25
25
|
[Appsemble](https://appsemble.com)
|
|
File without changes
|
|
File without changes
|
package/action.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["action.ts"],"names":[],"mappings":""}
|
package/action.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Remapper } from '.';
|
|
2
|
+
import { HTTPMethods } from './http';
|
|
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<'email'>
|
|
60
|
+
| BaseAction<'event'>
|
|
61
|
+
| BaseAction<'flow.back'>
|
|
62
|
+
| BaseAction<'flow.cancel'>
|
|
63
|
+
| BaseAction<'flow.finish'>
|
|
64
|
+
| BaseAction<'flow.next'>
|
|
65
|
+
| BaseAction<'flow.to'>
|
|
66
|
+
| BaseAction<'link.back'>
|
|
67
|
+
| BaseAction<'link.next'>
|
|
68
|
+
| BaseAction<'message'>
|
|
69
|
+
| BaseAction<'noop'>
|
|
70
|
+
| BaseAction<'resource.subscription.status'>
|
|
71
|
+
| BaseAction<'resource.subscription.subscribe'>
|
|
72
|
+
| BaseAction<'resource.subscription.toggle'>
|
|
73
|
+
| BaseAction<'resource.subscription.unsubscribe'>
|
|
74
|
+
| BaseAction<'share'>
|
|
75
|
+
| BaseAction<'static'>
|
|
76
|
+
| BaseAction<'storage.read'>
|
|
77
|
+
| BaseAction<'storage.write'>
|
|
78
|
+
| BaseAction<'team.invite'>
|
|
79
|
+
| BaseAction<'team.join'>
|
|
80
|
+
| BaseAction<'team.list'>
|
|
81
|
+
| BaseAction<'throw'>
|
|
82
|
+
| BaseAction<'user.login'>
|
|
83
|
+
| BaseAction<'user.register'>
|
|
84
|
+
| BaseAction<'user.update'>
|
|
85
|
+
| LinkAction
|
|
86
|
+
| LogAction
|
|
87
|
+
| RequestAction
|
|
88
|
+
| ResourceCountAction
|
|
89
|
+
| ResourceCreateAction
|
|
90
|
+
| ResourceDeleteAction
|
|
91
|
+
| ResourceGetAction
|
|
92
|
+
| ResourceQueryAction
|
|
93
|
+
| ResourceUpdateAction;
|
|
File without changes
|
package/{dist/app.js → app.js}
RENAMED
|
File without changes
|
package/app.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":""}
|
package/app.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
}
|
|
File without changes
|
|
File without changes
|
package/appMember.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appMember.js","sourceRoot":"","sources":["appMember.ts"],"names":[],"mappings":""}
|
package/appMember.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IconName } from '@fortawesome/fontawesome-common-types';
|
|
2
|
+
|
|
3
|
+
import { App } from '.';
|
|
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
|
+
}
|
|
File without changes
|
|
File without changes
|
package/asset.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset.js","sourceRoot":"","sources":["asset.ts"],"names":[],"mappings":""}
|
package/asset.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["authentication.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
package/author.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"author.js","sourceRoot":"","sources":["author.ts"],"names":[],"mappings":""}
|
package/author.ts
ADDED
|
File without changes
|
|
File without changes
|
package/bulma.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulma.js","sourceRoot":"","sources":["bulma.ts"],"names":[],"mappings":""}
|
package/bulma.ts
ADDED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{dist/http.js → http.js}
RENAMED
|
File without changes
|
package/http.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["http.ts"],"names":[],"mappings":""}
|
package/http.ts
ADDED
|
@@ -135,6 +135,10 @@ export interface UserInfo {
|
|
|
135
135
|
* The end-user’s locale, represented as a BCP47 language tag.
|
|
136
136
|
*/
|
|
137
137
|
locale?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The end-user’s time zone.
|
|
140
|
+
*/
|
|
141
|
+
zoneinfo?: string;
|
|
138
142
|
}
|
|
139
143
|
/**
|
|
140
144
|
* The payload stored in our JSON web tokens
|
|
File without changes
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAWA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|