@appsemble/types 0.20.21 → 0.20.23

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.21/config/assets/logo.svg) Appsemble Types
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.20.23/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.21/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.20.21)
7
- [![Code coverage](https://codecov.io/gl/appsemble/appsemble/branch/0.20.21/graph/badge.svg)](https://codecov.io/gl/appsemble/appsemble)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.20.23/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.20.23)
7
+ [![Code coverage](https://codecov.io/gl/appsemble/appsemble/branch/0.20.23/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.21/LICENSE.md) ©
24
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.23/LICENSE.md) ©
25
25
  [Appsemble](https://appsemble.com)
package/action.d.ts CHANGED
@@ -42,5 +42,5 @@ export type ResourceUpdateAction = RequestLikeAction<'resource.update'>;
42
42
  /**
43
43
  * An action that can be called from within a block.
44
44
  */
45
- export 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;
45
+ export 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.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<'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
@@ -74,7 +74,11 @@ export type Action =
74
74
  | BaseAction<'resource.subscription.unsubscribe'>
75
75
  | BaseAction<'share'>
76
76
  | BaseAction<'static'>
77
+ | BaseAction<'storage.append'>
78
+ | BaseAction<'storage.delete'>
77
79
  | BaseAction<'storage.read'>
80
+ | BaseAction<'storage.subtract'>
81
+ | BaseAction<'storage.update'>
78
82
  | BaseAction<'storage.write'>
79
83
  | BaseAction<'team.invite'>
80
84
  | BaseAction<'team.join'>
package/index.d.ts CHANGED
@@ -74,7 +74,7 @@ export interface BlockDefinition {
74
74
  */
75
75
  theme?: Partial<Theme>;
76
76
  /**
77
- * A free form mapping of named paramters.
77
+ * A free form mapping of named parameters.
78
78
  *
79
79
  * The exact meaning of the parameters depends on the block type.
80
80
  */
@@ -822,6 +822,66 @@ export interface ShareActionDefinition extends BaseActionDefinition<'share'> {
822
822
  title?: Remapper;
823
823
  }
824
824
  type StorageType = 'indexedDB' | 'localStorage' | 'sessionStorage';
825
+ export interface StorageAppendActionDefinition extends BaseActionDefinition<'storage.append'> {
826
+ /**
827
+ * The key of the entry to write to the app’s storage.
828
+ */
829
+ key: Remapper;
830
+ /**
831
+ * The data to write to the app’s storage.
832
+ */
833
+ value: Remapper;
834
+ /**
835
+ * The mechanism used to read the data from.
836
+ *
837
+ * @default 'indexedDB'
838
+ */
839
+ storage?: StorageType;
840
+ }
841
+ export interface StorageDeleteActionDefinition extends BaseActionDefinition<'storage.delete'> {
842
+ /**
843
+ * The key of the entry to delete from the app’s storage.
844
+ */
845
+ key: Remapper;
846
+ /**
847
+ * The mechanism used to delete the data from.
848
+ *
849
+ * @default 'indexedDB'
850
+ */
851
+ storage?: StorageType;
852
+ }
853
+ export interface StorageSubtractActionDefinition extends BaseActionDefinition<'storage.subtract'> {
854
+ /**
855
+ * The key of the entry to subtract the last entry from
856
+ */
857
+ key: Remapper;
858
+ /**
859
+ * The mechanism used to read the data from.
860
+ *
861
+ * @default 'indexedDB'
862
+ */
863
+ storage?: StorageType;
864
+ }
865
+ export interface StorageUpdateActionDefinition extends BaseActionDefinition<'storage.update'> {
866
+ /**
867
+ * The key of the entry to write to the app’s storage.
868
+ */
869
+ key: Remapper;
870
+ /**
871
+ * The key of the item to update.
872
+ */
873
+ item: Remapper;
874
+ /**
875
+ * The data to update the specified item with.
876
+ */
877
+ value: Remapper;
878
+ /**
879
+ * The mechanism used to read the data from.
880
+ *
881
+ * @default 'indexedDB'
882
+ */
883
+ storage?: StorageType;
884
+ }
825
885
  export interface StorageReadActionDefinition extends BaseActionDefinition<'storage.read'> {
826
886
  /**
827
887
  * The key of the entry to read from the app’s storage.
@@ -1029,7 +1089,7 @@ export type MessageActionDefinition = BaseActionDefinition<'message'> & BaseMess
1029
1089
  */
1030
1090
  body: Remapper;
1031
1091
  };
1032
- 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 | 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;
1092
+ 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 | DialogActionDefinition | DownloadActionDefinition | EachActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | LinkActionDefinition | LogActionDefinition | MessageActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceGetActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageAppendActionDefinition | StorageDeleteActionDefinition | StorageReadActionDefinition | StorageSubtractActionDefinition | StorageUpdateActionDefinition | StorageWriteActionDefinition | TeamInviteActionDefinition | UserLoginAction | UserRegisterAction | UserUpdateAction;
1033
1093
  export interface ActionType {
1034
1094
  /**
1035
1095
  * Whether or not app creators are required to define this action.
@@ -1495,7 +1555,7 @@ export interface Organization {
1495
1555
  iconUrl: string;
1496
1556
  }
1497
1557
  /**
1498
- * An invite for an organizaton.
1558
+ * An invite for an organization.
1499
1559
  */
1500
1560
  export interface OrganizationInvite {
1501
1561
  /**
package/index.ts CHANGED
@@ -92,7 +92,7 @@ export interface BlockDefinition {
92
92
  theme?: Partial<Theme>;
93
93
 
94
94
  /**
95
- * A free form mapping of named paramters.
95
+ * A free form mapping of named parameters.
96
96
  *
97
97
  * The exact meaning of the parameters depends on the block type.
98
98
  */
@@ -974,6 +974,77 @@ export interface ShareActionDefinition extends BaseActionDefinition<'share'> {
974
974
 
975
975
  type StorageType = 'indexedDB' | 'localStorage' | 'sessionStorage';
976
976
 
977
+ export interface StorageAppendActionDefinition extends BaseActionDefinition<'storage.append'> {
978
+ /**
979
+ * The key of the entry to write to the app’s storage.
980
+ */
981
+ key: Remapper;
982
+
983
+ /**
984
+ * The data to write to the app’s storage.
985
+ */
986
+ value: Remapper;
987
+
988
+ /**
989
+ * The mechanism used to read the data from.
990
+ *
991
+ * @default 'indexedDB'
992
+ */
993
+ storage?: StorageType;
994
+ }
995
+
996
+ export interface StorageDeleteActionDefinition extends BaseActionDefinition<'storage.delete'> {
997
+ /**
998
+ * The key of the entry to delete from the app’s storage.
999
+ */
1000
+ key: Remapper;
1001
+
1002
+ /**
1003
+ * The mechanism used to delete the data from.
1004
+ *
1005
+ * @default 'indexedDB'
1006
+ */
1007
+ storage?: StorageType;
1008
+ }
1009
+
1010
+ export interface StorageSubtractActionDefinition extends BaseActionDefinition<'storage.subtract'> {
1011
+ /**
1012
+ * The key of the entry to subtract the last entry from
1013
+ */
1014
+ key: Remapper;
1015
+
1016
+ /**
1017
+ * The mechanism used to read the data from.
1018
+ *
1019
+ * @default 'indexedDB'
1020
+ */
1021
+ storage?: StorageType;
1022
+ }
1023
+
1024
+ export interface StorageUpdateActionDefinition extends BaseActionDefinition<'storage.update'> {
1025
+ /**
1026
+ * The key of the entry to write to the app’s storage.
1027
+ */
1028
+ key: Remapper;
1029
+
1030
+ /**
1031
+ * The key of the item to update.
1032
+ */
1033
+ item: Remapper;
1034
+
1035
+ /**
1036
+ * The data to update the specified item with.
1037
+ */
1038
+ value: Remapper;
1039
+
1040
+ /**
1041
+ * The mechanism used to read the data from.
1042
+ *
1043
+ * @default 'indexedDB'
1044
+ */
1045
+ storage?: StorageType;
1046
+ }
1047
+
977
1048
  export interface StorageReadActionDefinition extends BaseActionDefinition<'storage.read'> {
978
1049
  /**
979
1050
  * The key of the entry to read from the app’s storage.
@@ -1271,7 +1342,11 @@ export type ActionDefinition =
1271
1342
  | ResourceUpdateActionDefinition
1272
1343
  | ShareActionDefinition
1273
1344
  | StaticActionDefinition
1345
+ | StorageAppendActionDefinition
1346
+ | StorageDeleteActionDefinition
1274
1347
  | StorageReadActionDefinition
1348
+ | StorageSubtractActionDefinition
1349
+ | StorageUpdateActionDefinition
1275
1350
  | StorageWriteActionDefinition
1276
1351
  | TeamInviteActionDefinition
1277
1352
  | UserLoginAction
@@ -1838,7 +1913,7 @@ export interface Organization {
1838
1913
  }
1839
1914
 
1840
1915
  /**
1841
- * An invite for an organizaton.
1916
+ * An invite for an organization.
1842
1917
  */
1843
1918
  export interface OrganizationInvite {
1844
1919
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/types",
3
- "version": "0.20.21",
3
+ "version": "0.20.23",
4
4
  "description": "TypeScript definitions reused within Appsemble internally",
5
5
  "keywords": [
6
6
  "app",
package/theme.d.ts CHANGED
@@ -20,7 +20,7 @@ export interface Theme {
20
20
  */
21
21
  linkColor: string;
22
22
  /**
23
- * The color used to feature succesful or positive actions.
23
+ * The color used to feature successful or positive actions.
24
24
  */
25
25
  successColor: string;
26
26
  /**
package/theme.ts CHANGED
@@ -24,7 +24,7 @@ export interface Theme {
24
24
  linkColor: string;
25
25
 
26
26
  /**
27
- * The color used to feature succesful or positive actions.
27
+ * The color used to feature successful or positive actions.
28
28
  */
29
29
  successColor: string;
30
30