@appsemble/types 0.19.10 → 0.19.14
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/dist/index.d.ts +33 -0
- package/dist/resource.d.ts +35 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -382,11 +382,21 @@ interface ResourceReference {
|
|
|
382
382
|
update?: ResourceReferenceAction;
|
|
383
383
|
delete?: ResourceReferenceAction;
|
|
384
384
|
}
|
|
385
|
+
export interface ResourceHistoryDefinition {
|
|
386
|
+
/**
|
|
387
|
+
* If set to `false`, edits are still tracked, but exactly what changed is lost.
|
|
388
|
+
*/
|
|
389
|
+
data: boolean;
|
|
390
|
+
}
|
|
385
391
|
export interface ResourceDefinition {
|
|
386
392
|
/**
|
|
387
393
|
* The default list of roles used for permission checks for each action.
|
|
388
394
|
*/
|
|
389
395
|
roles?: string[];
|
|
396
|
+
/**
|
|
397
|
+
* A definition of how versioning should happen for instances of this resource.
|
|
398
|
+
*/
|
|
399
|
+
history?: ResourceHistoryDefinition | boolean;
|
|
390
400
|
/**
|
|
391
401
|
* The definition for the `resource.create` action.
|
|
392
402
|
*/
|
|
@@ -504,6 +514,12 @@ export interface EmailActionDefinition extends BaseActionDefinition<'email'> {
|
|
|
504
514
|
* The recipient of the email.
|
|
505
515
|
*/
|
|
506
516
|
to?: Remapper;
|
|
517
|
+
/**
|
|
518
|
+
* The name of the sender.
|
|
519
|
+
*
|
|
520
|
+
* The default value depends on the email server.
|
|
521
|
+
*/
|
|
522
|
+
from?: Remapper;
|
|
507
523
|
/**
|
|
508
524
|
* The recipients to CC the email to.
|
|
509
525
|
*/
|
|
@@ -563,11 +579,18 @@ export interface ShareActionDefinition extends BaseActionDefinition<'share'> {
|
|
|
563
579
|
*/
|
|
564
580
|
title?: Remapper;
|
|
565
581
|
}
|
|
582
|
+
declare type StorageType = 'indexedDB' | 'localStorage' | 'sessionStorage';
|
|
566
583
|
export interface StorageReadActionDefinition extends BaseActionDefinition<'storage.read'> {
|
|
567
584
|
/**
|
|
568
585
|
* The key of the entry to read from the app’s storage.
|
|
569
586
|
*/
|
|
570
587
|
key: Remapper;
|
|
588
|
+
/**
|
|
589
|
+
* The mechanism used to read the data from.
|
|
590
|
+
*
|
|
591
|
+
* @default 'indexedDB'
|
|
592
|
+
*/
|
|
593
|
+
storage?: StorageType;
|
|
571
594
|
}
|
|
572
595
|
export interface StorageWriteActionDefinition extends BaseActionDefinition<'storage.write'> {
|
|
573
596
|
/**
|
|
@@ -578,6 +601,12 @@ export interface StorageWriteActionDefinition extends BaseActionDefinition<'stor
|
|
|
578
601
|
* The data to write to the app’s storage.
|
|
579
602
|
*/
|
|
580
603
|
value: Remapper;
|
|
604
|
+
/**
|
|
605
|
+
* The mechanism used to read the data from.
|
|
606
|
+
*
|
|
607
|
+
* @default 'indexedDB'
|
|
608
|
+
*/
|
|
609
|
+
storage?: StorageType;
|
|
581
610
|
}
|
|
582
611
|
export interface UserLoginAction extends BaseActionDefinition<'user.login'> {
|
|
583
612
|
/**
|
|
@@ -995,6 +1024,10 @@ export interface App {
|
|
|
995
1024
|
*/
|
|
996
1025
|
id?: number;
|
|
997
1026
|
domain?: string;
|
|
1027
|
+
/**
|
|
1028
|
+
* The name used for emails
|
|
1029
|
+
*/
|
|
1030
|
+
emailName?: string;
|
|
998
1031
|
/**
|
|
999
1032
|
* The id of the organization this app belongs to.
|
|
1000
1033
|
*/
|
package/dist/resource.d.ts
CHANGED
|
@@ -1,12 +1,47 @@
|
|
|
1
1
|
export interface Resource {
|
|
2
|
+
/**
|
|
3
|
+
* The unique ID of the resource
|
|
4
|
+
*/
|
|
2
5
|
id: number;
|
|
6
|
+
/**
|
|
7
|
+
* A boolean indicating whether or not the resource will be cloned with the app.
|
|
8
|
+
*
|
|
9
|
+
* This only applies to template apps.
|
|
10
|
+
*/
|
|
3
11
|
$clonable: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* When the resource was first created as an ISO 8601 formatted string.
|
|
14
|
+
*/
|
|
4
15
|
$created: string;
|
|
16
|
+
/**
|
|
17
|
+
* When the resource was last updated as an ISO 8601 formatted string.
|
|
18
|
+
*/
|
|
5
19
|
$updated: string;
|
|
20
|
+
/**
|
|
21
|
+
* The user who initially created the resource.
|
|
22
|
+
*/
|
|
6
23
|
$author?: ResourceAuthor;
|
|
24
|
+
/**
|
|
25
|
+
* The user who last updated the resource.
|
|
26
|
+
*/
|
|
27
|
+
$editor?: ResourceAuthor;
|
|
28
|
+
/**
|
|
29
|
+
* Any non-reserved properties are allowed on the resource as defined in the app definition.
|
|
30
|
+
*/
|
|
7
31
|
[key: string]: unknown;
|
|
8
32
|
}
|
|
9
33
|
export interface ResourceAuthor {
|
|
34
|
+
/**
|
|
35
|
+
* The user ID of the author.
|
|
36
|
+
*/
|
|
10
37
|
id: string;
|
|
38
|
+
/**
|
|
39
|
+
* The display name of the user.
|
|
40
|
+
*/
|
|
11
41
|
name: string;
|
|
12
42
|
}
|
|
43
|
+
export interface ResourceVersion {
|
|
44
|
+
created: string;
|
|
45
|
+
data: Record<string, unknown>;
|
|
46
|
+
author: ResourceAuthor;
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/types",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.14",
|
|
4
4
|
"description": "TypeScript definitions reused within Appsemble internally",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"test": "jest"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@appsemble/sdk": "0.19.
|
|
33
|
+
"@appsemble/sdk": "0.19.14",
|
|
34
34
|
"@fortawesome/fontawesome-common-types": "^0.2.0",
|
|
35
35
|
"jsonschema": "^1.0.0",
|
|
36
|
-
"openapi-types": "^
|
|
36
|
+
"openapi-types": "^10.0.0",
|
|
37
37
|
"type-fest": "^2.0.0"
|
|
38
38
|
}
|
|
39
39
|
}
|