@budibase/types 2.8.22-alpha.4 → 2.8.22

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.
Files changed (97) hide show
  1. package/dist/cjs/api/account/accounts.d.ts +0 -6
  2. package/dist/cjs/api/web/app/index.d.ts +0 -3
  3. package/dist/cjs/api/web/app/index.js +0 -3
  4. package/dist/cjs/api/web/app/index.js.map +1 -1
  5. package/dist/cjs/api/web/index.d.ts +0 -1
  6. package/dist/cjs/api/web/index.js +0 -1
  7. package/dist/cjs/api/web/index.js.map +1 -1
  8. package/dist/cjs/documents/app/app.d.ts +0 -2
  9. package/dist/cjs/documents/app/table.d.ts +94 -0
  10. package/dist/cjs/documents/app/table.js +14 -0
  11. package/dist/cjs/documents/app/table.js.map +1 -0
  12. package/dist/cjs/documents/app/view.d.ts +0 -16
  13. package/dist/cjs/documents/app/view.js.map +1 -1
  14. package/dist/cjs/sdk/db.d.ts +1 -1
  15. package/dist/cjs/sdk/search.d.ts +1 -1
  16. package/dist/cjs/tsconfig-cjs.build.tsbuildinfo +1 -1
  17. package/dist/mjs/api/account/accounts.d.ts +0 -6
  18. package/dist/mjs/api/web/app/index.d.ts +0 -3
  19. package/dist/mjs/api/web/app/index.js +0 -3
  20. package/dist/mjs/api/web/app/index.js.map +1 -1
  21. package/dist/mjs/api/web/index.d.ts +0 -1
  22. package/dist/mjs/api/web/index.js +0 -1
  23. package/dist/mjs/api/web/index.js.map +1 -1
  24. package/dist/mjs/documents/app/app.d.ts +0 -2
  25. package/dist/mjs/documents/app/table.d.ts +94 -0
  26. package/dist/mjs/documents/app/table.js +11 -0
  27. package/dist/mjs/documents/app/table.js.map +1 -0
  28. package/dist/mjs/documents/app/view.d.ts +0 -16
  29. package/dist/mjs/documents/app/view.js.map +1 -1
  30. package/dist/mjs/sdk/db.d.ts +1 -1
  31. package/dist/mjs/sdk/search.d.ts +1 -1
  32. package/dist/mjs/tsconfig.build.tsbuildinfo +1 -1
  33. package/package.json +2 -2
  34. package/src/api/account/accounts.ts +0 -9
  35. package/src/api/web/app/index.ts +0 -3
  36. package/src/api/web/index.ts +0 -1
  37. package/src/documents/app/app.ts +0 -2
  38. package/src/documents/app/table.ts +97 -0
  39. package/src/documents/app/view.ts +0 -18
  40. package/src/sdk/db.ts +1 -1
  41. package/src/sdk/search.ts +1 -1
  42. package/dist/cjs/api/web/app/rows.d.ts +0 -3
  43. package/dist/cjs/api/web/app/rows.js +0 -3
  44. package/dist/cjs/api/web/app/rows.js.map +0 -1
  45. package/dist/cjs/api/web/app/table.d.ts +0 -12
  46. package/dist/cjs/api/web/app/table.js +0 -3
  47. package/dist/cjs/api/web/app/table.js.map +0 -1
  48. package/dist/cjs/api/web/app/view.d.ts +0 -5
  49. package/dist/cjs/api/web/app/view.js +0 -3
  50. package/dist/cjs/api/web/app/view.js.map +0 -1
  51. package/dist/cjs/api/web/debug.d.ts +0 -11
  52. package/dist/cjs/api/web/debug.js +0 -3
  53. package/dist/cjs/api/web/debug.js.map +0 -1
  54. package/dist/cjs/documents/app/table/constants.d.ts +0 -8
  55. package/dist/cjs/documents/app/table/constants.js +0 -14
  56. package/dist/cjs/documents/app/table/constants.js.map +0 -1
  57. package/dist/cjs/documents/app/table/index.d.ts +0 -3
  58. package/dist/cjs/documents/app/table/index.js +0 -20
  59. package/dist/cjs/documents/app/table/index.js.map +0 -1
  60. package/dist/cjs/documents/app/table/schema.d.ts +0 -71
  61. package/dist/cjs/documents/app/table/schema.js +0 -3
  62. package/dist/cjs/documents/app/table/schema.js.map +0 -1
  63. package/dist/cjs/documents/app/table/table.d.ts +0 -33
  64. package/dist/cjs/documents/app/table/table.js +0 -3
  65. package/dist/cjs/documents/app/table/table.js.map +0 -1
  66. package/dist/mjs/api/web/app/rows.d.ts +0 -3
  67. package/dist/mjs/api/web/app/rows.js +0 -2
  68. package/dist/mjs/api/web/app/rows.js.map +0 -1
  69. package/dist/mjs/api/web/app/table.d.ts +0 -12
  70. package/dist/mjs/api/web/app/table.js +0 -2
  71. package/dist/mjs/api/web/app/table.js.map +0 -1
  72. package/dist/mjs/api/web/app/view.d.ts +0 -5
  73. package/dist/mjs/api/web/app/view.js +0 -2
  74. package/dist/mjs/api/web/app/view.js.map +0 -1
  75. package/dist/mjs/api/web/debug.d.ts +0 -11
  76. package/dist/mjs/api/web/debug.js +0 -2
  77. package/dist/mjs/api/web/debug.js.map +0 -1
  78. package/dist/mjs/documents/app/table/constants.d.ts +0 -8
  79. package/dist/mjs/documents/app/table/constants.js +0 -11
  80. package/dist/mjs/documents/app/table/constants.js.map +0 -1
  81. package/dist/mjs/documents/app/table/index.d.ts +0 -3
  82. package/dist/mjs/documents/app/table/index.js +0 -4
  83. package/dist/mjs/documents/app/table/index.js.map +0 -1
  84. package/dist/mjs/documents/app/table/schema.d.ts +0 -71
  85. package/dist/mjs/documents/app/table/schema.js +0 -2
  86. package/dist/mjs/documents/app/table/schema.js.map +0 -1
  87. package/dist/mjs/documents/app/table/table.d.ts +0 -33
  88. package/dist/mjs/documents/app/table/table.js +0 -2
  89. package/dist/mjs/documents/app/table/table.js.map +0 -1
  90. package/src/api/web/app/rows.ts +0 -3
  91. package/src/api/web/app/table.ts +0 -13
  92. package/src/api/web/app/view.ts +0 -7
  93. package/src/api/web/debug.ts +0 -11
  94. package/src/documents/app/table/constants.ts +0 -9
  95. package/src/documents/app/table/index.ts +0 -3
  96. package/src/documents/app/table/schema.ts +0 -98
  97. package/src/documents/app/table/table.ts +0 -30
@@ -0,0 +1,97 @@
1
+ import { Document } from "../document"
2
+ import { View } from "./view"
3
+ import { RenameColumn } from "../../sdk"
4
+ import { FieldType } from "./row"
5
+
6
+ export enum RelationshipTypes {
7
+ ONE_TO_MANY = "one-to-many",
8
+ MANY_TO_ONE = "many-to-one",
9
+ MANY_TO_MANY = "many-to-many",
10
+ }
11
+
12
+ export enum AutoReason {
13
+ FOREIGN_KEY = "foreign_key",
14
+ }
15
+
16
+ export interface FieldSchema {
17
+ type: FieldType
18
+ externalType?: string
19
+ fieldName?: string
20
+ name: string
21
+ sortable?: boolean
22
+ tableId?: string
23
+ relationshipType?: RelationshipTypes
24
+ through?: string
25
+ foreignKey?: string
26
+ icon?: string
27
+ autocolumn?: boolean
28
+ autoReason?: AutoReason
29
+ subtype?: string
30
+ throughFrom?: string
31
+ throughTo?: string
32
+ formula?: string
33
+ formulaType?: string
34
+ main?: boolean
35
+ ignoreTimezones?: boolean
36
+ timeOnly?: boolean
37
+ lastID?: number
38
+ useRichText?: boolean | null
39
+ order?: number
40
+ width?: number
41
+ meta?: {
42
+ toTable: string
43
+ toKey: string
44
+ }
45
+ constraints?: {
46
+ type?: string
47
+ email?: boolean
48
+ inclusion?: string[]
49
+ length?: {
50
+ minimum?: string | number | null
51
+ maximum?: string | number | null
52
+ }
53
+ numericality?: {
54
+ greaterThanOrEqualTo: string | null
55
+ lessThanOrEqualTo: string | null
56
+ }
57
+ presence?:
58
+ | boolean
59
+ | {
60
+ allowEmpty?: boolean
61
+ }
62
+ datetime?: {
63
+ latest: string
64
+ earliest: string
65
+ }
66
+ }
67
+ }
68
+
69
+ export interface TableSchema {
70
+ [key: string]: FieldSchema
71
+ }
72
+
73
+ export interface Table extends Document {
74
+ type?: string
75
+ views?: { [key: string]: View }
76
+ name: string
77
+ primary?: string[]
78
+ schema: TableSchema
79
+ primaryDisplay?: string
80
+ sourceId?: string
81
+ relatedFormula?: string[]
82
+ constrained?: string[]
83
+ sql?: boolean
84
+ indexes?: { [key: string]: any }
85
+ rows?: { [key: string]: any }
86
+ created?: boolean
87
+ rowHeight?: number
88
+ }
89
+
90
+ export interface ExternalTable extends Table {
91
+ sourceId: string
92
+ }
93
+
94
+ export interface TableRequest extends Table {
95
+ _rename?: RenameColumn
96
+ created?: boolean
97
+ }
@@ -1,7 +1,3 @@
1
- import { SortOrder, SortType } from "../../api"
2
- import { SearchFilters } from "../../sdk"
3
- import { TableSchema, UIFieldMetadata } from "./table"
4
-
5
1
  export interface View {
6
2
  name: string
7
3
  tableId: string
@@ -14,20 +10,6 @@ export interface View {
14
10
  meta?: Record<string, any>
15
11
  }
16
12
 
17
- export interface ViewV2 {
18
- version: 2
19
- id: string
20
- name: string
21
- tableId: string
22
- query?: SearchFilters
23
- sort?: {
24
- field: string
25
- order?: SortOrder
26
- type?: SortType
27
- }
28
- columns?: Record<string, UIFieldMetadata>
29
- }
30
-
31
13
  export type ViewSchema = ViewCountOrSumSchema | ViewStatisticsSchema
32
14
 
33
15
  export interface ViewCountOrSumSchema {
package/src/sdk/db.ts CHANGED
@@ -89,7 +89,7 @@ export interface Database {
89
89
 
90
90
  exists(): Promise<boolean>
91
91
  checkSetup(): Promise<Nano.DocumentScope<any>>
92
- get<T>(id?: string): Promise<T>
92
+ get<T>(id?: string): Promise<T | any>
93
93
  remove(
94
94
  id: string | Document,
95
95
  rev?: string
package/src/sdk/search.ts CHANGED
@@ -32,7 +32,7 @@ export interface SearchFilters {
32
32
  [key: string]: any[]
33
33
  }
34
34
  contains?: {
35
- [key: string]: any[] | any
35
+ [key: string]: any[]
36
36
  }
37
37
  notContains?: {
38
38
  [key: string]: any[]
@@ -1,3 +0,0 @@
1
- export interface SearchResponse {
2
- rows: any[];
3
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=rows.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rows.js","sourceRoot":"","sources":["../../../../../src/api/web/app/rows.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { Table, TableSchema, View, ViewV2 } from "../../../documents";
2
- interface ViewV2Response extends ViewV2 {
3
- schema: TableSchema;
4
- }
5
- export declare type TableViewsResponse = {
6
- [key: string]: View | ViewV2Response;
7
- };
8
- export interface TableResponse extends Table {
9
- views?: TableViewsResponse;
10
- }
11
- export declare type FetchTablesResponse = TableResponse[];
12
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../../src/api/web/app/table.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { ViewV2 } from "../../../documents";
2
- export interface ViewResponse {
3
- data: ViewV2;
4
- }
5
- export declare type CreateViewRequest = Omit<ViewV2, "version" | "id">;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=view.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../../src/api/web/app/view.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- export interface GetDiagnosticsResponse {
2
- budibaseVersion: string;
3
- hosting: string;
4
- nodeVersion: string;
5
- platform: string;
6
- cpuArch: string;
7
- cpuCores: number;
8
- cpuInfo: string;
9
- totalMemory: string;
10
- uptime: string;
11
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=debug.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../../src/api/web/debug.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- export declare enum RelationshipType {
2
- ONE_TO_MANY = "one-to-many",
3
- MANY_TO_ONE = "many-to-one",
4
- MANY_TO_MANY = "many-to-many"
5
- }
6
- export declare enum AutoReason {
7
- FOREIGN_KEY = "foreign_key"
8
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AutoReason = exports.RelationshipType = void 0;
4
- var RelationshipType;
5
- (function (RelationshipType) {
6
- RelationshipType["ONE_TO_MANY"] = "one-to-many";
7
- RelationshipType["MANY_TO_ONE"] = "many-to-one";
8
- RelationshipType["MANY_TO_MANY"] = "many-to-many";
9
- })(RelationshipType = exports.RelationshipType || (exports.RelationshipType = {}));
10
- var AutoReason;
11
- (function (AutoReason) {
12
- AutoReason["FOREIGN_KEY"] = "foreign_key";
13
- })(AutoReason = exports.AutoReason || (exports.AutoReason = {}));
14
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/documents/app/table/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,+CAA2B,CAAA;IAC3B,iDAA6B,CAAA;AAC/B,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,yCAA2B,CAAA;AAC7B,CAAC,EAFW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAErB"}
@@ -1,3 +0,0 @@
1
- export * from "./table";
2
- export * from "./schema";
3
- export * from "./constants";
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./table"), exports);
18
- __exportStar(require("./schema"), exports);
19
- __exportStar(require("./constants"), exports);
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/documents/app/table/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B"}
@@ -1,71 +0,0 @@
1
- import { FieldType } from "../row";
2
- import { AutoReason, RelationshipType } from "./constants";
3
- export interface UIFieldMetadata {
4
- order?: number;
5
- width?: number;
6
- visible?: boolean;
7
- icon?: string;
8
- }
9
- export interface RelationshipFieldMetadata {
10
- main?: boolean;
11
- fieldName?: string;
12
- tableId?: string;
13
- relationshipType?: RelationshipType;
14
- through?: string;
15
- foreignKey?: string;
16
- throughFrom?: string;
17
- throughTo?: string;
18
- }
19
- export interface AutoColumnFieldMetadata {
20
- autocolumn?: boolean;
21
- subtype?: string;
22
- lastID?: number;
23
- autoReason?: AutoReason;
24
- }
25
- export interface NumberFieldMetadata {
26
- meta?: {
27
- toTable: string;
28
- toKey: string;
29
- };
30
- }
31
- export interface DateFieldMetadata {
32
- ignoreTimezones?: boolean;
33
- timeOnly?: boolean;
34
- }
35
- export interface StringFieldMetadata {
36
- useRichText?: boolean | null;
37
- }
38
- export interface FormulaFieldMetadata {
39
- formula?: string;
40
- formulaType?: string;
41
- }
42
- export interface FieldConstraints {
43
- type?: string;
44
- email?: boolean;
45
- inclusion?: string[];
46
- length?: {
47
- minimum?: string | number | null;
48
- maximum?: string | number | null;
49
- };
50
- numericality?: {
51
- greaterThanOrEqualTo: string | null;
52
- lessThanOrEqualTo: string | null;
53
- };
54
- presence?: boolean | {
55
- allowEmpty?: boolean;
56
- };
57
- datetime?: {
58
- latest: string;
59
- earliest: string;
60
- };
61
- }
62
- export interface FieldSchema extends UIFieldMetadata, DateFieldMetadata, RelationshipFieldMetadata, AutoColumnFieldMetadata, StringFieldMetadata, FormulaFieldMetadata, NumberFieldMetadata {
63
- type: FieldType;
64
- name: string;
65
- sortable?: boolean;
66
- externalType?: string;
67
- constraints?: FieldConstraints;
68
- }
69
- export interface TableSchema {
70
- [key: string]: FieldSchema;
71
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../src/documents/app/table/schema.ts"],"names":[],"mappings":""}
@@ -1,33 +0,0 @@
1
- import { Document } from "../../document";
2
- import { View, ViewV2 } from "../view";
3
- import { RenameColumn } from "../../../sdk";
4
- import { TableSchema } from "./schema";
5
- export interface Table extends Document {
6
- type?: string;
7
- views?: {
8
- [key: string]: View | ViewV2;
9
- };
10
- name: string;
11
- primary?: string[];
12
- schema: TableSchema;
13
- primaryDisplay?: string;
14
- sourceId?: string;
15
- relatedFormula?: string[];
16
- constrained?: string[];
17
- sql?: boolean;
18
- indexes?: {
19
- [key: string]: any;
20
- };
21
- rows?: {
22
- [key: string]: any;
23
- };
24
- created?: boolean;
25
- rowHeight?: number;
26
- }
27
- export interface ExternalTable extends Table {
28
- sourceId: string;
29
- }
30
- export interface TableRequest extends Table {
31
- _rename?: RenameColumn;
32
- created?: boolean;
33
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../../src/documents/app/table/table.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export interface SearchResponse {
2
- rows: any[];
3
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=rows.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rows.js","sourceRoot":"","sources":["../../../../../src/api/web/app/rows.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { Table, TableSchema, View, ViewV2 } from "../../../documents";
2
- interface ViewV2Response extends ViewV2 {
3
- schema: TableSchema;
4
- }
5
- export declare type TableViewsResponse = {
6
- [key: string]: View | ViewV2Response;
7
- };
8
- export interface TableResponse extends Table {
9
- views?: TableViewsResponse;
10
- }
11
- export declare type FetchTablesResponse = TableResponse[];
12
- export {};
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../../src/api/web/app/table.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { ViewV2 } from "../../../documents";
2
- export interface ViewResponse {
3
- data: ViewV2;
4
- }
5
- export declare type CreateViewRequest = Omit<ViewV2, "version" | "id">;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=view.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../../src/api/web/app/view.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- export interface GetDiagnosticsResponse {
2
- budibaseVersion: string;
3
- hosting: string;
4
- nodeVersion: string;
5
- platform: string;
6
- cpuArch: string;
7
- cpuCores: number;
8
- cpuInfo: string;
9
- totalMemory: string;
10
- uptime: string;
11
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=debug.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../../src/api/web/debug.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- export declare enum RelationshipType {
2
- ONE_TO_MANY = "one-to-many",
3
- MANY_TO_ONE = "many-to-one",
4
- MANY_TO_MANY = "many-to-many"
5
- }
6
- export declare enum AutoReason {
7
- FOREIGN_KEY = "foreign_key"
8
- }
@@ -1,11 +0,0 @@
1
- export var RelationshipType;
2
- (function (RelationshipType) {
3
- RelationshipType["ONE_TO_MANY"] = "one-to-many";
4
- RelationshipType["MANY_TO_ONE"] = "many-to-one";
5
- RelationshipType["MANY_TO_MANY"] = "many-to-many";
6
- })(RelationshipType || (RelationshipType = {}));
7
- export var AutoReason;
8
- (function (AutoReason) {
9
- AutoReason["FOREIGN_KEY"] = "foreign_key";
10
- })(AutoReason || (AutoReason = {}));
11
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/documents/app/table/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,+CAA2B,CAAA;IAC3B,iDAA6B,CAAA;AAC/B,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,MAAM,CAAN,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,yCAA2B,CAAA;AAC7B,CAAC,EAFW,UAAU,KAAV,UAAU,QAErB"}
@@ -1,3 +0,0 @@
1
- export * from "./table";
2
- export * from "./schema";
3
- export * from "./constants";
@@ -1,4 +0,0 @@
1
- export * from "./table";
2
- export * from "./schema";
3
- export * from "./constants";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/documents/app/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA"}
@@ -1,71 +0,0 @@
1
- import { FieldType } from "../row";
2
- import { AutoReason, RelationshipType } from "./constants";
3
- export interface UIFieldMetadata {
4
- order?: number;
5
- width?: number;
6
- visible?: boolean;
7
- icon?: string;
8
- }
9
- export interface RelationshipFieldMetadata {
10
- main?: boolean;
11
- fieldName?: string;
12
- tableId?: string;
13
- relationshipType?: RelationshipType;
14
- through?: string;
15
- foreignKey?: string;
16
- throughFrom?: string;
17
- throughTo?: string;
18
- }
19
- export interface AutoColumnFieldMetadata {
20
- autocolumn?: boolean;
21
- subtype?: string;
22
- lastID?: number;
23
- autoReason?: AutoReason;
24
- }
25
- export interface NumberFieldMetadata {
26
- meta?: {
27
- toTable: string;
28
- toKey: string;
29
- };
30
- }
31
- export interface DateFieldMetadata {
32
- ignoreTimezones?: boolean;
33
- timeOnly?: boolean;
34
- }
35
- export interface StringFieldMetadata {
36
- useRichText?: boolean | null;
37
- }
38
- export interface FormulaFieldMetadata {
39
- formula?: string;
40
- formulaType?: string;
41
- }
42
- export interface FieldConstraints {
43
- type?: string;
44
- email?: boolean;
45
- inclusion?: string[];
46
- length?: {
47
- minimum?: string | number | null;
48
- maximum?: string | number | null;
49
- };
50
- numericality?: {
51
- greaterThanOrEqualTo: string | null;
52
- lessThanOrEqualTo: string | null;
53
- };
54
- presence?: boolean | {
55
- allowEmpty?: boolean;
56
- };
57
- datetime?: {
58
- latest: string;
59
- earliest: string;
60
- };
61
- }
62
- export interface FieldSchema extends UIFieldMetadata, DateFieldMetadata, RelationshipFieldMetadata, AutoColumnFieldMetadata, StringFieldMetadata, FormulaFieldMetadata, NumberFieldMetadata {
63
- type: FieldType;
64
- name: string;
65
- sortable?: boolean;
66
- externalType?: string;
67
- constraints?: FieldConstraints;
68
- }
69
- export interface TableSchema {
70
- [key: string]: FieldSchema;
71
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../src/documents/app/table/schema.ts"],"names":[],"mappings":""}
@@ -1,33 +0,0 @@
1
- import { Document } from "../../document";
2
- import { View, ViewV2 } from "../view";
3
- import { RenameColumn } from "../../../sdk";
4
- import { TableSchema } from "./schema";
5
- export interface Table extends Document {
6
- type?: string;
7
- views?: {
8
- [key: string]: View | ViewV2;
9
- };
10
- name: string;
11
- primary?: string[];
12
- schema: TableSchema;
13
- primaryDisplay?: string;
14
- sourceId?: string;
15
- relatedFormula?: string[];
16
- constrained?: string[];
17
- sql?: boolean;
18
- indexes?: {
19
- [key: string]: any;
20
- };
21
- rows?: {
22
- [key: string]: any;
23
- };
24
- created?: boolean;
25
- rowHeight?: number;
26
- }
27
- export interface ExternalTable extends Table {
28
- sourceId: string;
29
- }
30
- export interface TableRequest extends Table {
31
- _rename?: RenameColumn;
32
- created?: boolean;
33
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../../src/documents/app/table/table.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export interface SearchResponse {
2
- rows: any[]
3
- }
@@ -1,13 +0,0 @@
1
- import { Table, TableSchema, View, ViewV2 } from "../../../documents"
2
-
3
- interface ViewV2Response extends ViewV2 {
4
- schema: TableSchema
5
- }
6
-
7
- export type TableViewsResponse = { [key: string]: View | ViewV2Response }
8
-
9
- export interface TableResponse extends Table {
10
- views?: TableViewsResponse
11
- }
12
-
13
- export type FetchTablesResponse = TableResponse[]