@appsemble/types 0.23.6 → 0.23.8

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.6/config/assets/logo.svg) Appsemble Types
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.23.8/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.6/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.23.6)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.23.8/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.23.8)
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.6/LICENSE.md) ©
29
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.23.8/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.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.register'> | BaseAction<'user.update'> | LinkAction | LogAction | RequestAction | ResourceCountAction | ResourceCreateAction | ResourceDeleteAction | ResourceGetAction | ResourcePatchAction | ResourceQueryAction | ResourceUpdateAction;
47
47
  export {};
package/index.d.ts CHANGED
@@ -150,7 +150,7 @@ export interface UserInfo {
150
150
  /**
151
151
  * The end-user's additional properties
152
152
  */
153
- properties?: Record<string, string>;
153
+ properties?: Record<string, any>;
154
154
  /**
155
155
  * If the user is subscribed to the newsletter
156
156
  */
@@ -362,6 +362,10 @@ export interface Remappers {
362
362
  * Returns nothing if array.map’s context isn’t set.
363
363
  */
364
364
  array: 'index' | 'length';
365
+ /**
366
+ * Returns an object based on the specified condition
367
+ */
368
+ 'array.find': Remapper;
365
369
  /**
366
370
  * Create a new array with an array of predefined remappers.
367
371
  */
@@ -1069,6 +1073,30 @@ export interface UserRegisterAction extends BaseActionDefinition<'user.register'
1069
1073
  */
1070
1074
  properties?: Remapper;
1071
1075
  }
1076
+ export interface UserCreateAction extends BaseActionDefinition<'user.create'> {
1077
+ /**
1078
+ * The email address to login with.
1079
+ */
1080
+ email: Remapper;
1081
+ /**
1082
+ * The password to login with.
1083
+ */
1084
+ password: Remapper;
1085
+ /**
1086
+ * The display name of the user.
1087
+ */
1088
+ displayName: Remapper;
1089
+ /**
1090
+ * The role of the created user
1091
+ */
1092
+ role?: Remapper;
1093
+ /**
1094
+ * Custom properties that can be assigned freely.
1095
+ *
1096
+ * Every value will be converted to a string.
1097
+ */
1098
+ properties?: Remapper;
1099
+ }
1072
1100
  export interface UserUpdateAction extends BaseActionDefinition<'user.update'> {
1073
1101
  /**
1074
1102
  * The email address to update.
@@ -1082,6 +1110,10 @@ export interface UserUpdateAction extends BaseActionDefinition<'user.update'> {
1082
1110
  * The display name to update.
1083
1111
  */
1084
1112
  displayName?: Remapper;
1113
+ /**
1114
+ * The role of the created user
1115
+ */
1116
+ role?: Remapper;
1085
1117
  /**
1086
1118
  * The profile picture to update.
1087
1119
  *
@@ -1213,7 +1245,7 @@ export type MessageActionDefinition = BaseActionDefinition<'message'> & BaseMess
1213
1245
  */
1214
1246
  body: Remapper;
1215
1247
  };
1216
- 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 | UserLoginAction | UserLogoutAction | UserRegisterAction | UserUpdateAction;
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;
1217
1249
  export interface ActionType {
1218
1250
  /**
1219
1251
  * Whether or not app creators are required to define this action.
@@ -1506,6 +1538,10 @@ export interface App {
1506
1538
  * Whether the Appsemble OAuth2 login method should be shown.
1507
1539
  */
1508
1540
  showAppsembleOAuth2Login: boolean;
1541
+ /**
1542
+ * Whether new users should be able to register themselves.
1543
+ */
1544
+ enableSelfRegistration: boolean;
1509
1545
  /**
1510
1546
  * The Sentry DSN of the app.
1511
1547
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/types",
3
- "version": "0.23.6",
3
+ "version": "0.23.8",
4
4
  "description": "TypeScript definitions reused within Appsemble internally",
5
5
  "keywords": [
6
6
  "app",