@budibase/types 3.13.7 → 3.13.9

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.
@@ -107,6 +107,11 @@ export interface CreateAdminUserRequest {
107
107
  familyName?: string;
108
108
  givenName?: string;
109
109
  }
110
+ export interface CreateAdminUserResponse {
111
+ _id: string;
112
+ _rev: string;
113
+ email: string;
114
+ }
110
115
  export interface AddSSoUserRequest {
111
116
  ssoId: string;
112
117
  email: string;
@@ -114,11 +119,6 @@ export interface AddSSoUserRequest {
114
119
  export interface AddSSoUserResponse {
115
120
  message: string;
116
121
  }
117
- export interface CreateAdminUserResponse {
118
- _id: string;
119
- _rev: string;
120
- email: string;
121
- }
122
122
  export interface AcceptUserInviteRequest {
123
123
  inviteCode: string;
124
124
  password: string;
@@ -154,3 +154,8 @@ export interface UpdateInviteRequest extends Omit<Invite, "email"> {
154
154
  export interface UpdateInviteResponse extends Invite {
155
155
  }
156
156
  export type LookupAccountHolderResponse = AccountMetadata | null;
157
+ export interface ChangeTenantOwnerEmailRequest {
158
+ newAccountEmail: string;
159
+ originalEmail: string;
160
+ tenantIds: string[];
161
+ }
@@ -22,9 +22,7 @@ export interface Table extends Document {
22
22
  relatedFormula?: string[];
23
23
  constrained?: string[];
24
24
  sql?: boolean;
25
- indexes?: {
26
- [key: string]: any;
27
- };
25
+ indexes?: string[];
28
26
  created?: boolean;
29
27
  rowHeight?: number;
30
28
  aiGenerated?: boolean;
@@ -30,22 +30,29 @@ export interface UserIdentifier {
30
30
  userId: string;
31
31
  email: string;
32
32
  }
33
- export interface User extends Document {
34
- tenantId: string;
35
- email: string;
36
- userId?: string;
37
- firstName?: string;
38
- lastName?: string;
39
- forceResetPassword?: boolean;
40
- roles: UserRoles;
33
+ export interface UserBuilderInfo {
41
34
  builder?: {
42
35
  global?: boolean;
43
36
  apps?: string[];
44
37
  creator?: boolean;
45
38
  };
39
+ }
40
+ export interface UserAdminInfo {
46
41
  admin?: {
47
42
  global: boolean;
48
43
  };
44
+ }
45
+ export interface UserRoleInfo {
46
+ roles: UserRoles;
47
+ }
48
+ export interface User extends Document, UserBuilderInfo, UserAdminInfo, UserRoleInfo {
49
+ tenantId: string;
50
+ email: string;
51
+ userId?: string;
52
+ firstName?: string;
53
+ lastName?: string;
54
+ forceResetPassword?: boolean;
55
+ roles: UserRoles;
49
56
  password?: string;
50
57
  status?: UserStatus;
51
58
  createdAt?: number;
@@ -71,6 +78,9 @@ export interface UserBindings extends Document {
71
78
  roleId?: string | null;
72
79
  globalId?: string;
73
80
  userId?: string;
81
+ oauth2?: OAuth2;
82
+ provider?: string;
83
+ providerType?: SSOProviderType;
74
84
  }
75
85
  export declare enum UserStatus {
76
86
  ACTIVE = "active",
@@ -27,6 +27,19 @@ export interface SearchGroupRequest {
27
27
  export interface SearchGroupResponse {
28
28
  data: UserGroup[];
29
29
  }
30
+ export interface UpdateGroupAppRequest {
31
+ add?: {
32
+ appId: string;
33
+ roleId: string;
34
+ }[];
35
+ remove?: {
36
+ appId: string;
37
+ }[];
38
+ }
39
+ export interface UpdateGroupAppResponse {
40
+ id: string;
41
+ rev: string;
42
+ }
30
43
  export interface SearchUserGroupResponse extends PaginationResponse {
31
44
  users: {
32
45
  _id: any;
@@ -3,6 +3,9 @@ import { Document } from "../document";
3
3
  * doc id is user email
4
4
  */
5
5
  export interface PlatformUserByEmail extends Document {
6
+ /**
7
+ * @deprecated - multi-tenancy means that there is a one email to many tenant ids relationship
8
+ */
6
9
  tenantId: string;
7
10
  userId: string;
8
11
  }