@budibase/types 3.12.5 → 3.12.6

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,4 +1,4 @@
1
- import { AccountMetadata, PlatformUser, User } from "../../documents";
1
+ import { AccountMetadata, PlatformUser, StrippedUser, User } from "../../documents";
2
2
  import { SearchFilters } from "../../sdk";
3
3
  export interface Invite {
4
4
  email: string;
@@ -91,7 +91,7 @@ export interface SearchUsersRequest {
91
91
  paginate?: boolean;
92
92
  }
93
93
  export interface SearchUsersResponse {
94
- data: User[];
94
+ data: User[] | StrippedUser[];
95
95
  hasNextPage?: boolean;
96
96
  nextPage?: string;
97
97
  }
@@ -130,3 +130,4 @@ export declare enum ConfigType {
130
130
  SCIM = "scim",
131
131
  AI = "ai"
132
132
  }
133
+ export type ConfigTypeToConfig<T extends ConfigType> = T extends ConfigType.SETTINGS ? SettingsConfig : T extends ConfigType.SMTP ? SMTPConfig : T extends ConfigType.GOOGLE ? GoogleConfig : T extends ConfigType.OIDC ? OIDCConfig : T extends ConfigType.OIDC_LOGOS ? OIDCLogosConfig : T extends ConfigType.SCIM ? SCIMConfig : T extends ConfigType.AI ? AIConfig : never;
@@ -62,6 +62,7 @@ export interface User extends Document {
62
62
  onboardedAt?: string;
63
63
  tours?: Record<string, Date>;
64
64
  }
65
+ export type StrippedUser = Pick<User, "_id" | "tenantId" | "email" | "userId">;
65
66
  export interface UserBindings extends Document {
66
67
  firstName?: string;
67
68
  lastName?: string;