@budibase/types 2.32.11 → 2.32.12

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.
@@ -9,7 +9,7 @@ export interface RowActionResponse extends RowActionData {
9
9
  id: string;
10
10
  tableId: string;
11
11
  automationId: string;
12
- allowedViews: string[] | undefined;
12
+ allowedSources: string[] | undefined;
13
13
  }
14
14
  export interface RowActionsResponse {
15
15
  actions: Record<string, RowActionResponse>;
@@ -18,6 +18,7 @@ export interface UpdateSelfRequest {
18
18
  freeTrialConfirmedAt?: string;
19
19
  appFavourites?: string[];
20
20
  tours?: Record<string, Date>;
21
+ appSort?: string;
21
22
  }
22
23
  export interface UpdateSelfResponse {
23
24
  _id: string;
@@ -1,6 +1,6 @@
1
1
  import { FieldType } from "../../documents";
2
- import { EmptyFilterOption, SearchFilters } from "../../sdk";
3
- export type SearchFilter = {
2
+ import { EmptyFilterOption, FilterGroupLogicalOperator, SearchFilters } from "../../sdk";
3
+ export type LegacyFilter = {
4
4
  operator: keyof SearchFilters | "rangeLow" | "rangeHigh";
5
5
  onEmptyFilter?: EmptyFilterOption;
6
6
  field: string;
@@ -8,3 +8,9 @@ export type SearchFilter = {
8
8
  value: any;
9
9
  externalType?: string;
10
10
  };
11
+ export type SearchFilterGroup = {
12
+ logicalOperator: FilterGroupLogicalOperator;
13
+ onEmptyFilter?: EmptyFilterOption;
14
+ groups?: SearchFilterGroup[];
15
+ filters?: LegacyFilter[];
16
+ };
@@ -6,8 +6,8 @@ export interface CreateAccount {
6
6
  tenantId: string;
7
7
  hosting: Hosting;
8
8
  authType: AuthType;
9
+ accountName: string;
9
10
  registrationStep?: string;
10
- tenantName?: string;
11
11
  name?: string;
12
12
  size?: string;
13
13
  profession?: string;
@@ -15,10 +15,6 @@ export interface CreateAccount {
15
15
  export interface CreatePassswordAccount extends CreateAccount {
16
16
  password: string;
17
17
  }
18
- export interface CreateVerifiableSSOAccount extends CreateAccount {
19
- provider?: AccountSSOProvider;
20
- thirdPartyProfile?: any;
21
- }
22
18
  export declare const isCreatePasswordAccount: (account: CreateAccount) => account is CreatePassswordAccount;
23
19
  export interface LicenseOverrides {
24
20
  features?: Feature[];
@@ -43,6 +39,7 @@ export interface Account extends CreateAccount {
43
39
  providerType?: AccountSSOProviderType;
44
40
  quotaUsage?: QuotaUsage;
45
41
  offlineLicenseToken?: string;
42
+ tenantName?: string;
46
43
  }
47
44
  export interface PasswordAccount extends Account {
48
45
  password: string;
@@ -6,12 +6,13 @@ export interface TableRowActions extends Document {
6
6
  export interface RowActionData {
7
7
  name: string;
8
8
  automationId: string;
9
- permissions: {
10
- table: {
11
- runAllowed: boolean;
12
- };
13
- views: Record<string, {
14
- runAllowed: boolean;
15
- }>;
9
+ permissions: RowActionPermissions;
10
+ }
11
+ export interface RowActionPermissions {
12
+ table: {
13
+ runAllowed: boolean;
16
14
  };
15
+ views: Record<string, {
16
+ runAllowed: boolean;
17
+ }>;
17
18
  }
@@ -1,7 +1,7 @@
1
- import { SearchFilter, SortOrder, SortType } from "../../api";
1
+ import { LegacyFilter, SearchFilterGroup, SortOrder, SortType } from "../../api";
2
2
  import { UIFieldMetadata } from "./table";
3
3
  import { Document } from "../document";
4
- import { DBView } from "../../sdk";
4
+ import { DBView, SearchFilters } from "../../sdk";
5
5
  export type ViewTemplateOpts = {
6
6
  field: string;
7
7
  tableId: string;
@@ -36,10 +36,18 @@ export interface BasicViewFieldMetadata extends UIFieldMetadata {
36
36
  export interface RelationSchemaField extends UIFieldMetadata {
37
37
  readonly?: boolean;
38
38
  }
39
- export interface ViewCalculationFieldMetadata extends BasicViewFieldMetadata {
40
- calculationType: CalculationType;
39
+ export interface NumericCalculationFieldMetadata extends BasicViewFieldMetadata {
40
+ calculationType: CalculationType.MIN | CalculationType.MAX | CalculationType.SUM | CalculationType.AVG;
41
41
  field: string;
42
42
  }
43
+ export interface CountCalculationFieldMetadata extends BasicViewFieldMetadata {
44
+ calculationType: CalculationType.COUNT;
45
+ }
46
+ export interface CountDistinctCalculationFieldMetadata extends CountCalculationFieldMetadata {
47
+ distinct: true;
48
+ field: string;
49
+ }
50
+ export type ViewCalculationFieldMetadata = NumericCalculationFieldMetadata | CountCalculationFieldMetadata | CountDistinctCalculationFieldMetadata;
43
51
  export type ViewFieldMetadata = BasicViewFieldMetadata | ViewCalculationFieldMetadata;
44
52
  export declare enum CalculationType {
45
53
  SUM = "sum",
@@ -54,13 +62,15 @@ export interface ViewV2 {
54
62
  name: string;
55
63
  primaryDisplay?: string;
56
64
  tableId: string;
57
- query?: SearchFilter[];
65
+ query?: LegacyFilter[] | SearchFilters;
66
+ queryUI?: SearchFilterGroup;
58
67
  sort?: {
59
68
  field: string;
60
69
  order?: SortOrder;
61
70
  type?: SortType;
62
71
  };
63
72
  schema?: ViewV2Schema;
73
+ uiMetadata?: Record<string, any>;
64
74
  }
65
75
  export type ViewV2Schema = Record<string, ViewFieldMetadata>;
66
76
  export type ViewSchema = ViewCountOrSumSchema | ViewStatisticsSchema;
@@ -56,6 +56,7 @@ export interface User extends Document {
56
56
  } & Record<string, any>;
57
57
  appFavourites?: string[];
58
58
  ssoId?: string;
59
+ appSort?: string;
59
60
  }
60
61
  export declare enum UserStatus {
61
62
  ACTIVE = "active",
package/dist/index.js CHANGED
@@ -68,6 +68,7 @@ __export(src_exports, {
68
68
  Feature: () => Feature,
69
69
  FeatureFlag: () => FeatureFlag,
70
70
  FieldType: () => FieldType,
71
+ FilterGroupLogicalOperator: () => FilterGroupLogicalOperator,
71
72
  FilterType: () => FilterType,
72
73
  FormulaType: () => FormulaType,
73
74
  GroupType: () => GroupType,
@@ -721,6 +722,11 @@ var EmptyFilterOption = /* @__PURE__ */ ((EmptyFilterOption2) => {
721
722
  EmptyFilterOption2["RETURN_NONE"] = "none";
722
723
  return EmptyFilterOption2;
723
724
  })(EmptyFilterOption || {});
725
+ var FilterGroupLogicalOperator = /* @__PURE__ */ ((FilterGroupLogicalOperator2) => {
726
+ FilterGroupLogicalOperator2["ALL"] = "all";
727
+ FilterGroupLogicalOperator2["ANY"] = "any";
728
+ return FilterGroupLogicalOperator2;
729
+ })(FilterGroupLogicalOperator || {});
724
730
  var SqlClient = /* @__PURE__ */ ((SqlClient2) => {
725
731
  SqlClient2["MS_SQL"] = "mssql";
726
732
  SqlClient2["POSTGRES"] = "pg";
@@ -1412,6 +1418,7 @@ var MaintenanceType = /* @__PURE__ */ ((MaintenanceType2) => {
1412
1418
  Feature,
1413
1419
  FeatureFlag,
1414
1420
  FieldType,
1421
+ FilterGroupLogicalOperator,
1415
1422
  FilterType,
1416
1423
  FormulaType,
1417
1424
  GroupType,