@appsemble/types 0.23.9 → 0.24.0

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,9 +1,9 @@
1
- # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.23.9/config/assets/logo.svg) Appsemble Types
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.24.0/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.23.9/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.23.9)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.24.0/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.24.0)
7
7
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
8
8
 
9
9
  ## Table of Contents
@@ -26,5 +26,5 @@ not guaranteed.
26
26
 
27
27
  ## License
28
28
 
29
- [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.23.9/LICENSE.md) ©
29
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.24.0/LICENSE.md) ©
30
30
  [Appsemble](https://appsemble.com)
package/action.d.ts CHANGED
@@ -43,5 +43,5 @@ export type ResourcePatchAction = RequestLikeAction<'resource.patch'>;
43
43
  /**
44
44
  * An action that can be called from within a block.
45
45
  */
46
- export type Action = BaseAction<'analytics'> | BaseAction<'condition'> | BaseAction<'controller'> | BaseAction<'dialog.error'> | BaseAction<'dialog.ok'> | BaseAction<'dialog'> | BaseAction<'download'> | BaseAction<'each'> | BaseAction<'email'> | BaseAction<'event'> | BaseAction<'flow.back'> | BaseAction<'flow.cancel'> | BaseAction<'flow.finish'> | BaseAction<'flow.next'> | BaseAction<'flow.to'> | BaseAction<'link.back'> | BaseAction<'link.next'> | BaseAction<'match'> | BaseAction<'message'> | BaseAction<'noop'> | BaseAction<'notify'> | BaseAction<'resource.subscription.status'> | BaseAction<'resource.subscription.subscribe'> | BaseAction<'resource.subscription.toggle'> | BaseAction<'resource.subscription.unsubscribe'> | BaseAction<'share'> | BaseAction<'static'> | BaseAction<'storage.append'> | BaseAction<'storage.delete'> | BaseAction<'storage.read'> | BaseAction<'storage.subtract'> | BaseAction<'storage.update'> | BaseAction<'storage.write'> | BaseAction<'team.invite'> | BaseAction<'team.join'> | BaseAction<'team.list'> | BaseAction<'team.members'> | BaseAction<'throw'> | BaseAction<'user.create'> | BaseAction<'user.login'> | BaseAction<'user.logout'> | BaseAction<'user.register'> | BaseAction<'user.update'> | LinkAction | LogAction | RequestAction | ResourceCountAction | ResourceCreateAction | ResourceDeleteAction | ResourceGetAction | ResourcePatchAction | ResourceQueryAction | ResourceUpdateAction;
46
+ export type Action = BaseAction<'analytics'> | BaseAction<'condition'> | BaseAction<'controller'> | BaseAction<'dialog.error'> | BaseAction<'dialog.ok'> | BaseAction<'dialog'> | BaseAction<'download'> | BaseAction<'each'> | BaseAction<'email'> | BaseAction<'event'> | BaseAction<'flow.back'> | BaseAction<'flow.cancel'> | BaseAction<'flow.finish'> | BaseAction<'flow.next'> | BaseAction<'flow.to'> | BaseAction<'link.back'> | BaseAction<'link.next'> | BaseAction<'match'> | BaseAction<'message'> | BaseAction<'noop'> | BaseAction<'notify'> | BaseAction<'resource.subscription.status'> | BaseAction<'resource.subscription.subscribe'> | BaseAction<'resource.subscription.toggle'> | BaseAction<'resource.subscription.unsubscribe'> | BaseAction<'share'> | BaseAction<'static'> | BaseAction<'storage.append'> | BaseAction<'storage.delete'> | BaseAction<'storage.read'> | BaseAction<'storage.subtract'> | BaseAction<'storage.update'> | BaseAction<'storage.write'> | BaseAction<'team.invite'> | BaseAction<'team.join'> | BaseAction<'team.list'> | BaseAction<'team.members'> | BaseAction<'throw'> | BaseAction<'user.create'> | BaseAction<'user.login'> | BaseAction<'user.logout'> | BaseAction<'user.query'> | BaseAction<'user.register'> | BaseAction<'user.remove'> | BaseAction<'user.update'> | LinkAction | LogAction | RequestAction | ResourceCountAction | ResourceCreateAction | ResourceDeleteAction | ResourceGetAction | ResourcePatchAction | ResourceQueryAction | ResourceUpdateAction;
47
47
  export {};
package/index.d.ts CHANGED
@@ -883,7 +883,7 @@ export interface LinkActionDefinition extends BaseActionDefinition<'link'> {
883
883
  *
884
884
  * This should be a page name.
885
885
  */
886
- to: string[] | string;
886
+ to: Remapper | string[] | string;
887
887
  }
888
888
  export interface NotifyActionDefinition extends BaseActionDefinition<'notify'> {
889
889
  /**
@@ -1074,6 +1074,10 @@ export interface UserRegisterAction extends BaseActionDefinition<'user.register'
1074
1074
  properties?: Remapper;
1075
1075
  }
1076
1076
  export interface UserCreateAction extends BaseActionDefinition<'user.create'> {
1077
+ /**
1078
+ * The display name of the user.
1079
+ */
1080
+ name: Remapper;
1077
1081
  /**
1078
1082
  * The email address to login with.
1079
1083
  */
@@ -1083,49 +1087,55 @@ export interface UserCreateAction extends BaseActionDefinition<'user.create'> {
1083
1087
  */
1084
1088
  password: Remapper;
1085
1089
  /**
1086
- * The display name of the user.
1090
+ * Custom properties that can be assigned freely.
1091
+ *
1092
+ * Every value will be converted to a string.
1087
1093
  */
1088
- displayName: Remapper;
1094
+ properties?: Remapper;
1089
1095
  /**
1090
1096
  * The role of the created user
1091
1097
  */
1092
1098
  role?: Remapper;
1099
+ }
1100
+ export interface UserQueryAction extends BaseActionDefinition<'user.query'> {
1093
1101
  /**
1094
- * Custom properties that can be assigned freely.
1095
- *
1096
- * Every value will be converted to a string.
1102
+ * The roles of the users to fetch.
1097
1103
  */
1098
- properties?: Remapper;
1104
+ roles?: Remapper;
1099
1105
  }
1100
1106
  export interface UserUpdateAction extends BaseActionDefinition<'user.update'> {
1101
1107
  /**
1102
- * The email address to update.
1103
- */
1104
- email?: Remapper;
1105
- /**
1106
- * The password to update.
1108
+ * The display name to update.
1107
1109
  */
1108
- password?: Remapper;
1110
+ name?: Remapper;
1109
1111
  /**
1110
- * The display name to update.
1112
+ * The email address of the user to update.
1111
1113
  */
1112
- displayName?: Remapper;
1114
+ currentEmail: Remapper;
1113
1115
  /**
1114
- * The role of the created user
1116
+ * The new email address of the user.
1115
1117
  */
1116
- role?: Remapper;
1118
+ newEmail?: Remapper;
1117
1119
  /**
1118
- * The profile picture to update.
1119
- *
1120
- * This must be a file, otherwise it’s ignored.
1120
+ * The password to update.
1121
1121
  */
1122
- picture?: Remapper;
1122
+ password?: Remapper;
1123
1123
  /**
1124
1124
  * Custom properties that can be assigned freely.
1125
1125
  *
1126
1126
  * Every value will be converted to a string.
1127
1127
  */
1128
1128
  properties?: Remapper;
1129
+ /**
1130
+ * The role of the created user
1131
+ */
1132
+ role?: Remapper;
1133
+ }
1134
+ export interface UserRemoveAction extends BaseActionDefinition<'user.remove'> {
1135
+ /**
1136
+ * The email address of the account to delete.
1137
+ */
1138
+ email: Remapper;
1129
1139
  }
1130
1140
  export interface RequestLikeActionDefinition<T extends Action['type'] = Action['type']> extends BaseActionDefinition<T> {
1131
1141
  /**
@@ -1245,7 +1255,7 @@ export type MessageActionDefinition = BaseActionDefinition<'message'> & BaseMess
1245
1255
  */
1246
1256
  body: Remapper;
1247
1257
  };
1248
- export type ActionDefinition = AnalyticsAction | BaseActionDefinition<'dialog.error'> | BaseActionDefinition<'dialog.ok'> | BaseActionDefinition<'flow.back'> | BaseActionDefinition<'flow.cancel'> | BaseActionDefinition<'flow.finish'> | BaseActionDefinition<'flow.next'> | BaseActionDefinition<'link.back'> | BaseActionDefinition<'link.next'> | BaseActionDefinition<'noop'> | BaseActionDefinition<'team.join'> | BaseActionDefinition<'team.list'> | BaseActionDefinition<'throw'> | ConditionActionDefinition | ControllerActionDefinition | DialogActionDefinition | DownloadActionDefinition | EachActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | 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 | TeamInviteActionDefinition | TeamMembersActionDefinition | UserCreateAction | UserLoginAction | UserLogoutAction | UserRegisterAction | UserUpdateAction;
1258
+ export type ActionDefinition = AnalyticsAction | BaseActionDefinition<'dialog.error'> | BaseActionDefinition<'dialog.ok'> | BaseActionDefinition<'flow.back'> | BaseActionDefinition<'flow.cancel'> | BaseActionDefinition<'flow.finish'> | BaseActionDefinition<'flow.next'> | BaseActionDefinition<'link.back'> | BaseActionDefinition<'link.next'> | BaseActionDefinition<'noop'> | BaseActionDefinition<'team.join'> | BaseActionDefinition<'team.list'> | BaseActionDefinition<'throw'> | ConditionActionDefinition | ControllerActionDefinition | DialogActionDefinition | DownloadActionDefinition | EachActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | 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 | TeamInviteActionDefinition | TeamMembersActionDefinition | UserCreateAction | UserLoginAction | UserLogoutAction | UserQueryAction | UserRegisterAction | UserRemoveAction | UserUpdateAction;
1249
1259
  export interface ActionType {
1250
1260
  /**
1251
1261
  * Whether or not app creators are required to define this action.
@@ -1924,7 +1934,7 @@ export interface Training {
1924
1934
  /**
1925
1935
  * Tags related to competence of the training.
1926
1936
  */
1927
- competence: string;
1937
+ competences: string[];
1928
1938
  /**
1929
1939
  * Difficulty level of the training.
1930
1940
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/types",
3
- "version": "0.23.9",
3
+ "version": "0.24.0",
4
4
  "description": "TypeScript definitions reused within Appsemble internally",
5
5
  "keywords": [
6
6
  "app",