@budibase/types 2.32.11 → 2.32.13

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.
@@ -10,7 +10,6 @@ export interface CreateAccountRequest {
10
10
  name?: string;
11
11
  password: string;
12
12
  provider?: AccountSSOProvider;
13
- thirdPartyProfile: object;
14
13
  }
15
14
  export interface SearchAccountsRequest {
16
15
  email?: string;
@@ -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;
@@ -69,8 +66,6 @@ export interface AccountSSO {
69
66
  provider: AccountSSOProvider;
70
67
  providerType: AccountSSOProviderType;
71
68
  oauth2?: OAuthTokens;
72
- pictureUrl?: string;
73
- thirdPartyProfile: any;
74
69
  }
75
70
  export type SSOAccount = (Account | CloudAccount) & AccountSSO;
76
71
  export declare enum AuthType {
@@ -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",
@@ -48,13 +56,18 @@ export declare enum CalculationType {
48
56
  MIN = "min",
49
57
  MAX = "max"
50
58
  }
59
+ export declare enum ViewV2Type {
60
+ CALCULATION = "calculation"
61
+ }
51
62
  export interface ViewV2 {
52
63
  version: 2;
53
64
  id: string;
54
65
  name: string;
66
+ type?: ViewV2Type;
55
67
  primaryDisplay?: string;
56
68
  tableId: string;
57
- query?: SearchFilter[];
69
+ query?: LegacyFilter[] | SearchFilters;
70
+ queryUI?: SearchFilterGroup;
58
71
  sort?: {
59
72
  field: string;
60
73
  order?: SortOrder;
@@ -15,7 +15,6 @@ export interface UserSSO {
15
15
  provider: string;
16
16
  providerType: SSOProviderType;
17
17
  oauth2?: OAuth2;
18
- thirdPartyProfile?: SSOProfileJson;
19
18
  profile?: {
20
19
  displayName?: string;
21
20
  name?: {
@@ -32,7 +31,6 @@ export interface User extends Document {
32
31
  userId?: string;
33
32
  firstName?: string;
34
33
  lastName?: string;
35
- pictureUrl?: string;
36
34
  forceResetPassword?: boolean;
37
35
  roles: UserRoles;
38
36
  builder?: {
@@ -56,6 +54,7 @@ export interface User extends Document {
56
54
  } & Record<string, any>;
57
55
  appFavourites?: string[];
58
56
  ssoId?: string;
57
+ appSort?: string;
59
58
  }
60
59
  export declare enum UserStatus {
61
60
  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,
@@ -128,6 +129,7 @@ __export(src_exports, {
128
129
  UserGroupSyncEvents: () => UserGroupSyncEvents,
129
130
  UserStatus: () => UserStatus,
130
131
  ViewCalculation: () => ViewCalculation,
132
+ ViewV2Type: () => ViewV2Type,
131
133
  VirtualDocumentType: () => VirtualDocumentType,
132
134
  WebhookActionType: () => WebhookActionType,
133
135
  isAIConfig: () => isAIConfig,
@@ -721,6 +723,11 @@ var EmptyFilterOption = /* @__PURE__ */ ((EmptyFilterOption2) => {
721
723
  EmptyFilterOption2["RETURN_NONE"] = "none";
722
724
  return EmptyFilterOption2;
723
725
  })(EmptyFilterOption || {});
726
+ var FilterGroupLogicalOperator = /* @__PURE__ */ ((FilterGroupLogicalOperator2) => {
727
+ FilterGroupLogicalOperator2["ALL"] = "all";
728
+ FilterGroupLogicalOperator2["ANY"] = "any";
729
+ return FilterGroupLogicalOperator2;
730
+ })(FilterGroupLogicalOperator || {});
724
731
  var SqlClient = /* @__PURE__ */ ((SqlClient2) => {
725
732
  SqlClient2["MS_SQL"] = "mssql";
726
733
  SqlClient2["POSTGRES"] = "pg";
@@ -1120,6 +1127,10 @@ var CalculationType = /* @__PURE__ */ ((CalculationType2) => {
1120
1127
  CalculationType2["MAX"] = "max";
1121
1128
  return CalculationType2;
1122
1129
  })(CalculationType || {});
1130
+ var ViewV2Type = /* @__PURE__ */ ((ViewV2Type2) => {
1131
+ ViewV2Type2["CALCULATION"] = "calculation";
1132
+ return ViewV2Type2;
1133
+ })(ViewV2Type || {});
1123
1134
  var ViewCalculation = /* @__PURE__ */ ((ViewCalculation2) => {
1124
1135
  ViewCalculation2["SUM"] = "sum";
1125
1136
  ViewCalculation2["COUNT"] = "count";
@@ -1412,6 +1423,7 @@ var MaintenanceType = /* @__PURE__ */ ((MaintenanceType2) => {
1412
1423
  Feature,
1413
1424
  FeatureFlag,
1414
1425
  FieldType,
1426
+ FilterGroupLogicalOperator,
1415
1427
  FilterType,
1416
1428
  FormulaType,
1417
1429
  GroupType,
@@ -1472,6 +1484,7 @@ var MaintenanceType = /* @__PURE__ */ ((MaintenanceType2) => {
1472
1484
  UserGroupSyncEvents,
1473
1485
  UserStatus,
1474
1486
  ViewCalculation,
1487
+ ViewV2Type,
1475
1488
  VirtualDocumentType,
1476
1489
  WebhookActionType,
1477
1490
  isAIConfig,