@budibase/types 2.19.4 → 2.19.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.
@@ -63,7 +63,8 @@ export declare enum AutomationActionStepId {
63
63
  discord = "discord",
64
64
  slack = "slack",
65
65
  zapier = "zapier",
66
- integromat = "integromat"
66
+ integromat = "integromat",
67
+ n8n = "n8n"
67
68
  }
68
69
  export interface EmailInvite {
69
70
  startTime: Date;
@@ -3,6 +3,7 @@ import type { Row } from "./row";
3
3
  export interface QuerySchema {
4
4
  name?: string;
5
5
  type: string;
6
+ subtype?: string;
6
7
  }
7
8
  export interface Query extends Document {
8
9
  datasourceId: string;
@@ -14,10 +15,20 @@ export interface Query extends Document {
14
15
  readable: boolean;
15
16
  queryVerb: string;
16
17
  }
18
+ export interface QueryPreview extends Omit<Query, "_id"> {
19
+ queryId: string;
20
+ }
17
21
  export interface QueryParameter {
18
22
  name: string;
19
23
  default: string;
20
24
  }
25
+ export interface QueryResponse {
26
+ rows: any[];
27
+ keys: string[];
28
+ info: any;
29
+ extra: any;
30
+ pagination: any;
31
+ }
21
32
  export interface RestQueryFields {
22
33
  path: string;
23
34
  queryString?: string;
@@ -61,3 +72,11 @@ export interface ExecuteQueryRequest {
61
72
  export interface ExecuteQueryResponse {
62
73
  data: Row[];
63
74
  }
75
+ export declare enum HttpMethod {
76
+ GET = "GET",
77
+ POST = "POST",
78
+ PATCH = "PATCH",
79
+ PUT = "PUT",
80
+ HEAD = "HEAD",
81
+ DELETE = "DELETE"
82
+ }
@@ -13,6 +13,9 @@ export declare enum AutoFieldSubType {
13
13
  UPDATED_AT = "updatedAt",
14
14
  AUTO_ID = "autoID"
15
15
  }
16
+ export declare enum JsonFieldSubType {
17
+ ARRAY = "array"
18
+ }
16
19
  export declare enum FormulaType {
17
20
  STATIC = "static",
18
21
  DYNAMIC = "dynamic"
@@ -1,5 +1,5 @@
1
1
  import { FieldSubtype, FieldType } from "../row";
2
- import { AutoFieldSubType, AutoReason, FormulaType, RelationshipType } from "./constants";
2
+ import { AutoFieldSubType, AutoReason, FormulaType, JsonFieldSubType, RelationshipType } from "./constants";
3
3
  export interface UIFieldMetadata {
4
4
  order?: number;
5
5
  width?: number;
@@ -52,6 +52,10 @@ export interface NumberFieldMetadata extends Omit<BaseFieldSchema, "subtype"> {
52
52
  toKey: string;
53
53
  };
54
54
  }
55
+ export interface JsonFieldMetadata extends Omit<BaseFieldSchema, "subtype"> {
56
+ type: FieldType.JSON;
57
+ subtype?: JsonFieldSubType.ARRAY;
58
+ }
55
59
  export interface DateFieldMetadata extends Omit<BaseFieldSchema, "subtype"> {
56
60
  type: FieldType.DATETIME;
57
61
  ignoreTimezones?: boolean;
@@ -105,7 +109,7 @@ interface BaseFieldSchema extends UIFieldMetadata {
105
109
  interface OtherFieldMetadata extends BaseFieldSchema {
106
110
  type: Exclude<FieldType, FieldType.DATETIME | FieldType.LINK | FieldType.AUTO | FieldType.FORMULA | FieldType.NUMBER | FieldType.LONGFORM>;
107
111
  }
108
- export type FieldSchema = OtherFieldMetadata | DateFieldMetadata | RelationshipFieldMetadata | AutoColumnFieldMetadata | FormulaFieldMetadata | NumberFieldMetadata | LongFormFieldMetadata | BBReferenceFieldMetadata;
112
+ export type FieldSchema = OtherFieldMetadata | DateFieldMetadata | RelationshipFieldMetadata | AutoColumnFieldMetadata | FormulaFieldMetadata | NumberFieldMetadata | LongFormFieldMetadata | BBReferenceFieldMetadata | JsonFieldMetadata;
109
113
  export interface TableSchema {
110
114
  [key: string]: FieldSchema;
111
115
  }
package/dist/index.js CHANGED
@@ -65,11 +65,13 @@ __export(src_exports, {
65
65
  FormulaType: () => FormulaType,
66
66
  GroupType: () => GroupType,
67
67
  Hosting: () => Hosting,
68
+ HttpMethod: () => HttpMethod,
68
69
  INTERNAL_TABLE_SOURCE_ID: () => INTERNAL_TABLE_SOURCE_ID,
69
70
  IdentityType: () => IdentityType,
70
71
  IncludeRelationship: () => IncludeRelationship,
71
72
  InitType: () => InitType,
72
73
  InternalTable: () => InternalTable,
74
+ JsonFieldSubType: () => JsonFieldSubType,
73
75
  LockName: () => LockName,
74
76
  LockType: () => LockType,
75
77
  MigrationName: () => MigrationName,
@@ -854,6 +856,7 @@ var AutomationActionStepId = /* @__PURE__ */ ((AutomationActionStepId2) => {
854
856
  AutomationActionStepId2["slack"] = "slack";
855
857
  AutomationActionStepId2["zapier"] = "zapier";
856
858
  AutomationActionStepId2["integromat"] = "integromat";
859
+ AutomationActionStepId2["n8n"] = "n8n";
857
860
  return AutomationActionStepId2;
858
861
  })(AutomationActionStepId || {});
859
862
  var AutomationStepIdArray = [
@@ -883,6 +886,17 @@ var RestAuthType = /* @__PURE__ */ ((RestAuthType2) => {
883
886
  return RestAuthType2;
884
887
  })(RestAuthType || {});
885
888
 
889
+ // src/documents/app/query.ts
890
+ var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
891
+ HttpMethod2["GET"] = "GET";
892
+ HttpMethod2["POST"] = "POST";
893
+ HttpMethod2["PATCH"] = "PATCH";
894
+ HttpMethod2["PUT"] = "PUT";
895
+ HttpMethod2["HEAD"] = "HEAD";
896
+ HttpMethod2["DELETE"] = "DELETE";
897
+ return HttpMethod2;
898
+ })(HttpMethod || {});
899
+
886
900
  // src/documents/app/table/table.ts
887
901
  var INTERNAL_TABLE_SOURCE_ID = "bb_internal";
888
902
  var TableSourceType = /* @__PURE__ */ ((TableSourceType2) => {
@@ -942,6 +956,10 @@ var AutoFieldSubType = /* @__PURE__ */ ((AutoFieldSubType3) => {
942
956
  AutoFieldSubType3["AUTO_ID"] = "autoID";
943
957
  return AutoFieldSubType3;
944
958
  })(AutoFieldSubType || {});
959
+ var JsonFieldSubType = /* @__PURE__ */ ((JsonFieldSubType3) => {
960
+ JsonFieldSubType3["ARRAY"] = "array";
961
+ return JsonFieldSubType3;
962
+ })(JsonFieldSubType || {});
945
963
  var FormulaType = /* @__PURE__ */ ((FormulaType3) => {
946
964
  FormulaType3["STATIC"] = "static";
947
965
  FormulaType3["DYNAMIC"] = "dynamic";
@@ -1251,11 +1269,13 @@ var ServiceType = /* @__PURE__ */ ((ServiceType2) => {
1251
1269
  FormulaType,
1252
1270
  GroupType,
1253
1271
  Hosting,
1272
+ HttpMethod,
1254
1273
  INTERNAL_TABLE_SOURCE_ID,
1255
1274
  IdentityType,
1256
1275
  IncludeRelationship,
1257
1276
  InitType,
1258
1277
  InternalTable,
1278
+ JsonFieldSubType,
1259
1279
  LockName,
1260
1280
  LockType,
1261
1281
  MigrationName,