@budibase/types 2.23.6 → 2.23.7

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.
@@ -1,64 +1,10 @@
1
1
  import { FieldType } from "../../documents";
2
- import { EmptyFilterOption } from "../../sdk";
2
+ import { EmptyFilterOption, SearchFilters } from "../../sdk";
3
3
  export type SearchFilter = {
4
- operator: keyof SearchQuery;
4
+ operator: keyof SearchFilters | "rangeLow" | "rangeHigh";
5
5
  onEmptyFilter?: EmptyFilterOption;
6
6
  field: string;
7
7
  type?: FieldType;
8
8
  value: any;
9
9
  externalType?: string;
10
10
  };
11
- export declare enum SearchQueryOperators {
12
- STRING = "string",
13
- FUZZY = "fuzzy",
14
- RANGE = "range",
15
- EQUAL = "equal",
16
- NOT_EQUAL = "notEqual",
17
- EMPTY = "empty",
18
- NOT_EMPTY = "notEmpty",
19
- ONE_OF = "oneOf",
20
- CONTAINS = "contains",
21
- NOT_CONTAINS = "notContains",
22
- CONTAINS_ANY = "containsAny"
23
- }
24
- export type SearchQuery = {
25
- allOr?: boolean;
26
- onEmptyFilter?: EmptyFilterOption;
27
- [SearchQueryOperators.STRING]?: {
28
- [key: string]: string;
29
- };
30
- [SearchQueryOperators.FUZZY]?: {
31
- [key: string]: string;
32
- };
33
- [SearchQueryOperators.RANGE]?: {
34
- [key: string]: {
35
- high: number | string;
36
- low: number | string;
37
- };
38
- };
39
- [SearchQueryOperators.EQUAL]?: {
40
- [key: string]: any;
41
- };
42
- [SearchQueryOperators.NOT_EQUAL]?: {
43
- [key: string]: any;
44
- };
45
- [SearchQueryOperators.EMPTY]?: {
46
- [key: string]: any;
47
- };
48
- [SearchQueryOperators.NOT_EMPTY]?: {
49
- [key: string]: any;
50
- };
51
- [SearchQueryOperators.ONE_OF]?: {
52
- [key: string]: any[];
53
- };
54
- [SearchQueryOperators.CONTAINS]?: {
55
- [key: string]: any[];
56
- };
57
- [SearchQueryOperators.NOT_CONTAINS]?: {
58
- [key: string]: any[];
59
- };
60
- [SearchQueryOperators.CONTAINS_ANY]?: {
61
- [key: string]: any[];
62
- };
63
- };
64
- export type SearchQueryFields = Omit<SearchQuery, "allOr" | "onEmptyFilter">;
@@ -1,5 +1,5 @@
1
1
  import { User } from "../../documents";
2
- import { SearchQuery } from "./searchFilter";
2
+ import { SearchFilters } from "../../sdk";
3
3
  export interface SaveUserResponse {
4
4
  _id: string;
5
5
  _rev: string;
@@ -57,7 +57,7 @@ export interface InviteUsersResponse {
57
57
  }
58
58
  export interface SearchUsersRequest {
59
59
  bookmark?: string;
60
- query?: SearchQuery;
60
+ query?: SearchFilters;
61
61
  appId?: string;
62
62
  limit?: number;
63
63
  paginate?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Document } from "../../document";
2
2
  import { View, ViewV2 } from "../view";
3
- import { AddColumn, RenameColumn } from "../../../sdk";
3
+ import { RenameColumn } from "../../../sdk";
4
4
  import { TableSchema } from "./schema";
5
5
  export declare const INTERNAL_TABLE_SOURCE_ID = "bb_internal";
6
6
  export declare enum TableSourceType {
@@ -30,6 +30,5 @@ export interface Table extends Document {
30
30
  }
31
31
  export interface TableRequest extends Table {
32
32
  _rename?: RenameColumn;
33
- _add?: AddColumn;
34
33
  created?: boolean;
35
34
  }
package/dist/index.js CHANGED
@@ -100,8 +100,8 @@ __export(src_exports, {
100
100
  SSOProviderType: () => SSOProviderType,
101
101
  ScheduleRepeatPeriod: () => ScheduleRepeatPeriod,
102
102
  ScheduleType: () => ScheduleType,
103
+ SearchFilterOperator: () => SearchFilterOperator,
103
104
  SearchIndex: () => SearchIndex,
104
- SearchQueryOperators: () => SearchQueryOperators,
105
105
  ServiceType: () => ServiceType,
106
106
  SortDirection: () => SortDirection,
107
107
  SortOption: () => SortOption,
@@ -647,6 +647,20 @@ var DatasourceFeature = /* @__PURE__ */ ((DatasourceFeature2) => {
647
647
  })(DatasourceFeature || {});
648
648
 
649
649
  // src/sdk/search.ts
650
+ var SearchFilterOperator = /* @__PURE__ */ ((SearchFilterOperator2) => {
651
+ SearchFilterOperator2["STRING"] = "string";
652
+ SearchFilterOperator2["FUZZY"] = "fuzzy";
653
+ SearchFilterOperator2["RANGE"] = "range";
654
+ SearchFilterOperator2["EQUAL"] = "equal";
655
+ SearchFilterOperator2["NOT_EQUAL"] = "notEqual";
656
+ SearchFilterOperator2["EMPTY"] = "empty";
657
+ SearchFilterOperator2["NOT_EMPTY"] = "notEmpty";
658
+ SearchFilterOperator2["ONE_OF"] = "oneOf";
659
+ SearchFilterOperator2["CONTAINS"] = "contains";
660
+ SearchFilterOperator2["NOT_CONTAINS"] = "notContains";
661
+ SearchFilterOperator2["CONTAINS_ANY"] = "containsAny";
662
+ return SearchFilterOperator2;
663
+ })(SearchFilterOperator || {});
650
664
  var EmptyFilterOption = /* @__PURE__ */ ((EmptyFilterOption2) => {
651
665
  EmptyFilterOption2["RETURN_ALL"] = "all";
652
666
  EmptyFilterOption2["RETURN_NONE"] = "none";
@@ -1221,22 +1235,6 @@ var SortType = /* @__PURE__ */ ((SortType2) => {
1221
1235
  return SortType2;
1222
1236
  })(SortType || {});
1223
1237
 
1224
- // src/api/web/searchFilter.ts
1225
- var SearchQueryOperators = /* @__PURE__ */ ((SearchQueryOperators2) => {
1226
- SearchQueryOperators2["STRING"] = "string";
1227
- SearchQueryOperators2["FUZZY"] = "fuzzy";
1228
- SearchQueryOperators2["RANGE"] = "range";
1229
- SearchQueryOperators2["EQUAL"] = "equal";
1230
- SearchQueryOperators2["NOT_EQUAL"] = "notEqual";
1231
- SearchQueryOperators2["EMPTY"] = "empty";
1232
- SearchQueryOperators2["NOT_EMPTY"] = "notEmpty";
1233
- SearchQueryOperators2["ONE_OF"] = "oneOf";
1234
- SearchQueryOperators2["CONTAINS"] = "contains";
1235
- SearchQueryOperators2["NOT_CONTAINS"] = "notContains";
1236
- SearchQueryOperators2["CONTAINS_ANY"] = "containsAny";
1237
- return SearchQueryOperators2;
1238
- })(SearchQueryOperators || {});
1239
-
1240
1238
  // src/core/installation.ts
1241
1239
  var ServiceType = /* @__PURE__ */ ((ServiceType2) => {
1242
1240
  ServiceType2["WORKER"] = "worker";
@@ -1329,8 +1327,8 @@ var MaintenanceType = /* @__PURE__ */ ((MaintenanceType2) => {
1329
1327
  SSOProviderType,
1330
1328
  ScheduleRepeatPeriod,
1331
1329
  ScheduleType,
1330
+ SearchFilterOperator,
1332
1331
  SearchIndex,
1333
- SearchQueryOperators,
1334
1332
  ServiceType,
1335
1333
  SortDirection,
1336
1334
  SortOption,