@appsemble/types 0.20.15 → 0.20.16

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.15/config/assets/logo.svg) Appsemble Types
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.20.16/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.15/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.20.15)
7
- [![Code coverage](https://codecov.io/gl/appsemble/appsemble/branch/0.20.15/graph/badge.svg)](https://codecov.io/gl/appsemble/appsemble)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.20.16/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.20.16)
7
+ [![Code coverage](https://codecov.io/gl/appsemble/appsemble/branch/0.20.16/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.15/LICENSE.md) ©
24
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.16/LICENSE.md) ©
25
25
  [Appsemble](https://appsemble.com)
package/action.d.ts CHANGED
@@ -42,5 +42,5 @@ export declare type ResourceUpdateAction = RequestLikeAction<'resource.update'>;
42
42
  /**
43
43
  * An action that can be called from within a block.
44
44
  */
45
- export declare type Action = BaseAction<'analytics'> | BaseAction<'condition'> | BaseAction<'dialog.error'> | BaseAction<'dialog.ok'> | BaseAction<'dialog'> | BaseAction<'download'> | 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<'message'> | BaseAction<'noop'> | BaseAction<'resource.subscription.status'> | BaseAction<'resource.subscription.subscribe'> | BaseAction<'resource.subscription.toggle'> | BaseAction<'resource.subscription.unsubscribe'> | BaseAction<'share'> | BaseAction<'static'> | BaseAction<'storage.read'> | BaseAction<'storage.write'> | BaseAction<'team.invite'> | BaseAction<'team.join'> | BaseAction<'team.list'> | BaseAction<'throw'> | BaseAction<'user.login'> | BaseAction<'user.register'> | BaseAction<'user.update'> | LinkAction | LogAction | RequestAction | ResourceCountAction | ResourceCreateAction | ResourceDeleteAction | ResourceGetAction | ResourceQueryAction | ResourceUpdateAction;
45
+ export declare type Action = BaseAction<'analytics'> | BaseAction<'condition'> | 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<'message'> | BaseAction<'noop'> | BaseAction<'resource.subscription.status'> | BaseAction<'resource.subscription.subscribe'> | BaseAction<'resource.subscription.toggle'> | BaseAction<'resource.subscription.unsubscribe'> | BaseAction<'share'> | BaseAction<'static'> | BaseAction<'storage.read'> | BaseAction<'storage.write'> | BaseAction<'team.invite'> | BaseAction<'team.join'> | BaseAction<'team.list'> | BaseAction<'throw'> | BaseAction<'user.login'> | BaseAction<'user.register'> | BaseAction<'user.update'> | LinkAction | LogAction | RequestAction | ResourceCountAction | ResourceCreateAction | ResourceDeleteAction | ResourceGetAction | ResourceQueryAction | ResourceUpdateAction;
46
46
  export {};
package/action.ts CHANGED
@@ -56,6 +56,7 @@ export type Action =
56
56
  | BaseAction<'dialog.ok'>
57
57
  | BaseAction<'dialog'>
58
58
  | BaseAction<'download'>
59
+ | BaseAction<'each'>
59
60
  | BaseAction<'email'>
60
61
  | BaseAction<'event'>
61
62
  | BaseAction<'flow.back'>
package/index.d.ts CHANGED
@@ -419,6 +419,7 @@ export interface SubscriptionResponseResource {
419
419
  update: boolean;
420
420
  delete: boolean;
421
421
  subscriptions?: Record<string, {
422
+ create?: boolean;
422
423
  update: boolean;
423
424
  delete: boolean;
424
425
  }>;
@@ -649,6 +650,16 @@ export interface DownloadActionDefinition extends BaseActionDefinition<'download
649
650
  */
650
651
  filename: string;
651
652
  }
653
+ export interface EachActionDefinition extends BaseActionDefinition<'each'> {
654
+ /**
655
+ * Run an action for each entry in an array.
656
+ *
657
+ * The actions are run in parallel.
658
+ *
659
+ * If the input is not an array, the action will be applied to the input instead.
660
+ */
661
+ do: ActionDefinition;
662
+ }
652
663
  export interface EmailActionDefinition extends BaseActionDefinition<'email'> {
653
664
  /**
654
665
  * The recipient of the email.
@@ -937,7 +948,7 @@ export declare type MessageActionDefinition = BaseActionDefinition<'message'> &
937
948
  */
938
949
  body: Remapper;
939
950
  };
940
- export declare 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 | DialogActionDefinition | DownloadActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | LinkActionDefinition | LogActionDefinition | MessageActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceGetActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageReadActionDefinition | StorageWriteActionDefinition | TeamInviteActionDefinition | UserLoginAction | UserRegisterAction | UserUpdateAction;
951
+ export declare 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 | DialogActionDefinition | DownloadActionDefinition | EachActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | LinkActionDefinition | LogActionDefinition | MessageActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceGetActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageReadActionDefinition | StorageWriteActionDefinition | TeamInviteActionDefinition | UserLoginAction | UserRegisterAction | UserUpdateAction;
941
952
  export interface ActionType {
942
953
  /**
943
954
  * Whether or not app creators are required to define this action.
package/index.ts CHANGED
@@ -495,6 +495,7 @@ export interface SubscriptionResponseResource {
495
495
  subscriptions?: Record<
496
496
  string,
497
497
  {
498
+ create?: boolean;
498
499
  update: boolean;
499
500
  delete: boolean;
500
501
  }
@@ -776,6 +777,17 @@ export interface DownloadActionDefinition extends BaseActionDefinition<'download
776
777
  filename: string;
777
778
  }
778
779
 
780
+ export interface EachActionDefinition extends BaseActionDefinition<'each'> {
781
+ /**
782
+ * Run an action for each entry in an array.
783
+ *
784
+ * The actions are run in parallel.
785
+ *
786
+ * If the input is not an array, the action will be applied to the input instead.
787
+ */
788
+ do: ActionDefinition;
789
+ }
790
+
779
791
  export interface EmailActionDefinition extends BaseActionDefinition<'email'> {
780
792
  /**
781
793
  * The recipient of the email.
@@ -1148,6 +1160,7 @@ export type ActionDefinition =
1148
1160
  | ConditionActionDefinition
1149
1161
  | DialogActionDefinition
1150
1162
  | DownloadActionDefinition
1163
+ | EachActionDefinition
1151
1164
  | EmailActionDefinition
1152
1165
  | EventActionDefinition
1153
1166
  | FlowToActionDefinition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/types",
3
- "version": "0.20.15",
3
+ "version": "0.20.16",
4
4
  "description": "TypeScript definitions reused within Appsemble internally",
5
5
  "keywords": [
6
6
  "app",