@appsemble/types 0.24.0 → 0.24.1

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.24.0/config/assets/logo.svg) Appsemble Types
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.24.1/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.24.0/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.24.0)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.24.1/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.24.1)
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.24.0/LICENSE.md) ©
29
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.24.1/LICENSE.md) ©
30
30
  [Appsemble](https://appsemble.com)
package/index.d.ts CHANGED
@@ -650,6 +650,18 @@ export interface ResourceView {
650
650
  */
651
651
  remap: Remapper;
652
652
  }
653
+ export interface UserPropertyDefinition {
654
+ /**
655
+ * The JSON schema to validate user properties against before sending it to the backend.
656
+ */
657
+ schema: OpenAPIV3.SchemaObject;
658
+ /**
659
+ * The resource that is referenced by this user property.
660
+ */
661
+ reference?: {
662
+ resource: string;
663
+ };
664
+ }
653
665
  export interface ResourceDefinition {
654
666
  /**
655
667
  * The default list of roles used for permission checks for each action.
@@ -717,6 +729,14 @@ export interface ResourceDefinition {
717
729
  * @example '1d 8h 30m'
718
730
  */
719
731
  expires?: string;
732
+ /**
733
+ * Whether the resource should be able to be transferred when cloning the app it belongs to.
734
+ */
735
+ clonable?: boolean;
736
+ /**
737
+ * Whether the resource should be cleaned up regularly.
738
+ */
739
+ ephemeral?: boolean;
720
740
  }
721
741
  export interface BaseActionDefinition<T extends Action['type']> {
722
742
  /**
@@ -1470,6 +1490,9 @@ export interface AppDefinition {
1470
1490
  */
1471
1491
  pages: PageDefinition[];
1472
1492
  controller?: ControllerDefinition;
1493
+ users?: {
1494
+ properties: Record<string, UserPropertyDefinition>;
1495
+ };
1473
1496
  /**
1474
1497
  * Resource definitions that may be used by the app.
1475
1498
  */
@@ -1584,7 +1607,11 @@ export interface App {
1584
1607
  /**
1585
1608
  * Whether the app has clonable resources.
1586
1609
  */
1587
- resources?: boolean;
1610
+ hasClonableResources?: boolean;
1611
+ /**
1612
+ * Whether the app has clonable assets.
1613
+ */
1614
+ hasClonableAssets?: boolean;
1588
1615
  /**
1589
1616
  * A list of URLs to app screenshots
1590
1617
  */
@@ -1712,13 +1739,15 @@ export interface OrganizationInvite {
1712
1739
  role: string;
1713
1740
  }
1714
1741
  /**
1715
- * The controller of an app.
1742
+ * App member in an app.
1716
1743
  */
1717
1744
  export interface AppMember {
1718
1745
  id: string;
1719
1746
  name: string;
1720
1747
  primaryEmail: string;
1721
1748
  role: string;
1749
+ demo: boolean;
1750
+ properties: Record<string, any>;
1722
1751
  }
1723
1752
  /**
1724
1753
  * The layout used to store Appsemble messages.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/types",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "description": "TypeScript definitions reused within Appsemble internally",
5
5
  "keywords": [
6
6
  "app",
package/resource.d.ts CHANGED
@@ -9,6 +9,15 @@ export interface Resource {
9
9
  * This only applies to template apps.
10
10
  */
11
11
  $clonable: boolean;
12
+ /**
13
+ * A boolean indicating whether the resource will be used for creating ephemeral
14
+ * resources in demo apps
15
+ */
16
+ $seed: boolean;
17
+ /**
18
+ * A boolean indicating whether the resource will be cleaned up regularly
19
+ */
20
+ $ephemeral: boolean;
12
21
  /**
13
22
  * When the resource was first created as an ISO 8601 formatted string.
14
23
  */