@appsemble/types 0.20.10 → 0.20.11

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.
Files changed (93) hide show
  1. package/{dist/action.d.ts → action.d.ts} +0 -0
  2. package/{dist/action.js → action.js} +0 -0
  3. package/action.js.map +1 -0
  4. package/action.ts +93 -0
  5. package/{dist/app.d.ts → app.d.ts} +0 -0
  6. package/{dist/app.js → app.js} +0 -0
  7. package/app.js.map +1 -0
  8. package/app.ts +39 -0
  9. package/{dist/appMember.d.ts → appMember.d.ts} +0 -0
  10. package/{dist/appMember.js → appMember.js} +0 -0
  11. package/appMember.js.map +1 -0
  12. package/appMember.ts +22 -0
  13. package/{dist/asset.d.ts → asset.d.ts} +0 -0
  14. package/{dist/asset.js → asset.js} +0 -0
  15. package/asset.js.map +1 -0
  16. package/asset.ts +31 -0
  17. package/{dist/authentication.d.ts → authentication.d.ts} +0 -0
  18. package/{dist/authentication.js → authentication.js} +0 -0
  19. package/{dist/authentication.js.map → authentication.js.map} +1 -1
  20. package/authentication.ts +5 -0
  21. package/{dist/author.d.ts → author.d.ts} +0 -0
  22. package/{dist/author.js → author.js} +0 -0
  23. package/author.js.map +1 -0
  24. package/author.ts +14 -0
  25. package/{dist/bulma.d.ts → bulma.d.ts} +0 -0
  26. package/{dist/bulma.js → bulma.js} +0 -0
  27. package/bulma.js.map +1 -0
  28. package/bulma.ts +14 -0
  29. package/changed/added/.gitkeep +0 -0
  30. package/changed/changed/.gitkeep +0 -0
  31. package/changed/deprecated/.gitkeep +0 -0
  32. package/changed/fixed/.gitkeep +0 -0
  33. package/changed/removed/.gitkeep +0 -0
  34. package/changed/security/.gitkeep +0 -0
  35. package/{dist/http.d.ts → http.d.ts} +0 -0
  36. package/{dist/http.js → http.js} +0 -0
  37. package/http.js.map +1 -0
  38. package/http.ts +14 -0
  39. package/{dist/index.d.ts → index.d.ts} +0 -0
  40. package/{dist/index.js → index.js} +0 -0
  41. package/index.js.map +1 -0
  42. package/index.ts +1983 -0
  43. package/jest.config.js +1 -0
  44. package/package.json +5 -4
  45. package/{dist/resource.d.ts → resource.d.ts} +0 -0
  46. package/{dist/resource.js → resource.js} +0 -0
  47. package/resource.js.map +1 -0
  48. package/resource.ts +56 -0
  49. package/{dist/saml.d.ts → saml.d.ts} +0 -0
  50. package/{dist/saml.js → saml.js} +0 -0
  51. package/saml.js.map +1 -0
  52. package/saml.ts +3 -0
  53. package/{dist/snapshot.d.ts → snapshot.d.ts} +0 -0
  54. package/{dist/snapshot.js → snapshot.js} +0 -0
  55. package/snapshot.js.map +1 -0
  56. package/snapshot.ts +26 -0
  57. package/{dist/ssl.d.ts → ssl.d.ts} +0 -0
  58. package/{dist/ssl.js → ssl.js} +0 -0
  59. package/ssl.js.map +1 -0
  60. package/ssl.ts +15 -0
  61. package/{dist/team.d.ts → team.d.ts} +0 -0
  62. package/{dist/team.js → team.js} +0 -0
  63. package/team.js.map +1 -0
  64. package/team.ts +23 -0
  65. package/{dist/template.d.ts → template.d.ts} +0 -0
  66. package/{dist/template.js → template.js} +0 -0
  67. package/template.js.map +1 -0
  68. package/template.ts +33 -0
  69. package/{dist/theme.d.ts → theme.d.ts} +0 -0
  70. package/{dist/theme.js → theme.js} +0 -0
  71. package/theme.js.map +1 -0
  72. package/theme.ts +65 -0
  73. package/tsconfig.json +4 -0
  74. package/{dist/user.d.ts → user.d.ts} +0 -0
  75. package/{dist/user.js → user.js} +0 -0
  76. package/user.js.map +1 -0
  77. package/user.ts +66 -0
  78. package/dist/action.js.map +0 -1
  79. package/dist/app.js.map +0 -1
  80. package/dist/appMember.js.map +0 -1
  81. package/dist/asset.js.map +0 -1
  82. package/dist/author.js.map +0 -1
  83. package/dist/bulma.js.map +0 -1
  84. package/dist/http.js.map +0 -1
  85. package/dist/index.js.map +0 -1
  86. package/dist/resource.js.map +0 -1
  87. package/dist/saml.js.map +0 -1
  88. package/dist/snapshot.js.map +0 -1
  89. package/dist/ssl.js.map +0 -1
  90. package/dist/team.js.map +0 -1
  91. package/dist/template.js.map +0 -1
  92. package/dist/theme.js.map +0 -1
  93. package/dist/user.js.map +0 -1
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
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
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../src/authentication.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"authentication.js","sourceRoot":"","sources":["authentication.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface LoginCodeResponse {
2
+ isAllowed: boolean;
3
+ appName?: string;
4
+ code: string;
5
+ }
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
@@ -0,0 +1,14 @@
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
+ }
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
@@ -0,0 +1,14 @@
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
File without changes
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
@@ -0,0 +1,14 @@
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';
File without changes
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"}