@budibase/types 3.8.4 → 3.8.6

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.
@@ -29,6 +29,7 @@ export interface App extends Document {
29
29
  snippets?: Snippet[];
30
30
  creationVersion?: string;
31
31
  updatedBy?: string;
32
+ pwa?: PWAManifest;
32
33
  scripts?: AppScript[];
33
34
  }
34
35
  export interface AppInstance {
@@ -74,9 +75,28 @@ export interface AppFeatures {
74
75
  export interface AutomationSettings {
75
76
  chainAutomations?: boolean;
76
77
  }
78
+ export interface PWAManifest {
79
+ name: string;
80
+ short_name: string;
81
+ description: string;
82
+ icons: PWAManifestImage[];
83
+ screenshots: PWAManifestImage[];
84
+ background_color: string;
85
+ theme_color: string;
86
+ display?: string;
87
+ start_url: string;
88
+ }
89
+ export interface PWAManifestImage {
90
+ src: string;
91
+ sizes: string;
92
+ type: string;
93
+ form_factor?: "wide" | "narrow" | undefined;
94
+ label?: string;
95
+ }
77
96
  export interface AppScript {
78
97
  id: string;
79
98
  name: string;
80
99
  location: "Head" | "Body";
81
100
  html?: string;
101
+ cspWhitelist?: string;
82
102
  }
@@ -6,16 +6,17 @@ export interface QuerySchema {
6
6
  type: string;
7
7
  subtype?: string;
8
8
  }
9
+ export type QueryVerb = "read" | "create" | "update" | "delete";
9
10
  export interface Query extends Document {
10
11
  datasourceId: string;
11
12
  name: string;
12
13
  parameters: QueryParameter[];
13
- fields: RestQueryFields | any;
14
+ fields: RestQueryFields & SQLQueryFields & MongoQueryFields & GoogleSheetsQueryFields;
14
15
  transformer: string | null;
15
16
  schema: Record<string, QuerySchema | string>;
16
17
  nestedSchemaFields?: Record<string, Record<string, QuerySchema | string>>;
17
18
  readable: boolean;
18
- queryVerb: string;
19
+ queryVerb: QueryVerb;
19
20
  nullDefaultSupport?: boolean;
20
21
  }
21
22
  export interface QueryPreview extends Omit<Query, "_id"> {
@@ -57,6 +58,21 @@ export interface RestQueryFields {
57
58
  pagination?: PaginationConfig;
58
59
  paginationValues?: PaginationValues;
59
60
  }
61
+ export interface SQLQueryFields {
62
+ sql?: string;
63
+ }
64
+ export interface MongoQueryFields {
65
+ extra?: {
66
+ collection?: string;
67
+ actionType: "findOne" | "find" | "updateOne" | "updateMany" | "findOneAndUpdate" | "count" | "distinct" | "insertOne" | "deleteOne" | "deleteMany";
68
+ };
69
+ json?: object | string;
70
+ }
71
+ export interface GoogleSheetsQueryFields {
72
+ sheet?: string;
73
+ rowIndex?: string;
74
+ row?: Row;
75
+ }
60
76
  export interface PaginationConfig {
61
77
  type: string;
62
78
  location: string;