Changes relating to adding accountName to Account entity (#14712)
* Remove unused code * Typing compromise because Account extends CreateAccount * Update account-portal * Update account-portal
This commit is contained in:
parent
a779912ae3
commit
db25511948
|
@ -1 +1 @@
|
||||||
Subproject commit 3e24f6293ff5ee5f9b42822e001504e3bbf19cc0
|
Subproject commit 8cd052ce8288f343812a514d06c5a9459b3ba1a8
|
|
@ -6,9 +6,6 @@ import {
|
||||||
AccountSSOProviderType,
|
AccountSSOProviderType,
|
||||||
AuthType,
|
AuthType,
|
||||||
CloudAccount,
|
CloudAccount,
|
||||||
CreateAccount,
|
|
||||||
CreatePassswordAccount,
|
|
||||||
CreateVerifiableSSOAccount,
|
|
||||||
Hosting,
|
Hosting,
|
||||||
SSOAccount,
|
SSOAccount,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
@ -19,6 +16,7 @@ export const account = (partial: Partial<Account> = {}): Account => {
|
||||||
accountId: uuid(),
|
accountId: uuid(),
|
||||||
tenantId: generator.word(),
|
tenantId: generator.word(),
|
||||||
email: generator.email({ domain: "example.com" }),
|
email: generator.email({ domain: "example.com" }),
|
||||||
|
accountName: generator.word(),
|
||||||
tenantName: generator.word(),
|
tenantName: generator.word(),
|
||||||
hosting: Hosting.SELF,
|
hosting: Hosting.SELF,
|
||||||
createdAt: Date.now(),
|
createdAt: Date.now(),
|
||||||
|
@ -84,62 +82,3 @@ export function verifiableSsoAccount(
|
||||||
thirdPartyProfile: { id: "abc123" },
|
thirdPartyProfile: { id: "abc123" },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const cloudCreateAccount: CreatePassswordAccount = {
|
|
||||||
email: "cloud@budibase.com",
|
|
||||||
tenantId: "cloud",
|
|
||||||
hosting: Hosting.CLOUD,
|
|
||||||
authType: AuthType.PASSWORD,
|
|
||||||
password: "Password123!",
|
|
||||||
tenantName: "cloud",
|
|
||||||
name: "Budi Armstrong",
|
|
||||||
size: "10+",
|
|
||||||
profession: "Software Engineer",
|
|
||||||
}
|
|
||||||
|
|
||||||
export const cloudSSOCreateAccount: CreateAccount = {
|
|
||||||
email: "cloud-sso@budibase.com",
|
|
||||||
tenantId: "cloud-sso",
|
|
||||||
hosting: Hosting.CLOUD,
|
|
||||||
authType: AuthType.SSO,
|
|
||||||
tenantName: "cloudsso",
|
|
||||||
name: "Budi Armstrong",
|
|
||||||
size: "10+",
|
|
||||||
profession: "Software Engineer",
|
|
||||||
}
|
|
||||||
|
|
||||||
export const cloudVerifiableSSOCreateAccount: CreateVerifiableSSOAccount = {
|
|
||||||
email: "cloud-sso@budibase.com",
|
|
||||||
tenantId: "cloud-sso",
|
|
||||||
hosting: Hosting.CLOUD,
|
|
||||||
authType: AuthType.SSO,
|
|
||||||
tenantName: "cloudsso",
|
|
||||||
name: "Budi Armstrong",
|
|
||||||
size: "10+",
|
|
||||||
profession: "Software Engineer",
|
|
||||||
provider: AccountSSOProvider.MICROSOFT,
|
|
||||||
thirdPartyProfile: { id: "abc123" },
|
|
||||||
}
|
|
||||||
|
|
||||||
export const selfCreateAccount: CreatePassswordAccount = {
|
|
||||||
email: "self@budibase.com",
|
|
||||||
tenantId: "self",
|
|
||||||
hosting: Hosting.SELF,
|
|
||||||
authType: AuthType.PASSWORD,
|
|
||||||
password: "Password123!",
|
|
||||||
tenantName: "self",
|
|
||||||
name: "Budi Armstrong",
|
|
||||||
size: "10+",
|
|
||||||
profession: "Software Engineer",
|
|
||||||
}
|
|
||||||
|
|
||||||
export const selfSSOCreateAccount: CreateAccount = {
|
|
||||||
email: "self-sso@budibase.com",
|
|
||||||
tenantId: "self-sso",
|
|
||||||
hosting: Hosting.SELF,
|
|
||||||
authType: AuthType.SSO,
|
|
||||||
tenantName: "selfsso",
|
|
||||||
name: "Budi Armstrong",
|
|
||||||
size: "10+",
|
|
||||||
profession: "Software Engineer",
|
|
||||||
}
|
|
||||||
|
|
|
@ -7,10 +7,9 @@ export interface CreateAccount {
|
||||||
tenantId: string
|
tenantId: string
|
||||||
hosting: Hosting
|
hosting: Hosting
|
||||||
authType: AuthType
|
authType: AuthType
|
||||||
|
accountName: string
|
||||||
// optional fields - for sso based sign ups
|
// optional fields - for sso based sign ups
|
||||||
registrationStep?: string
|
registrationStep?: string
|
||||||
// profile
|
|
||||||
tenantName?: string
|
|
||||||
name?: string
|
name?: string
|
||||||
size?: string
|
size?: string
|
||||||
profession?: string
|
profession?: string
|
||||||
|
@ -20,11 +19,6 @@ export interface CreatePassswordAccount extends CreateAccount {
|
||||||
password: string
|
password: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateVerifiableSSOAccount extends CreateAccount {
|
|
||||||
provider?: AccountSSOProvider
|
|
||||||
thirdPartyProfile?: any
|
|
||||||
}
|
|
||||||
|
|
||||||
export const isCreatePasswordAccount = (
|
export const isCreatePasswordAccount = (
|
||||||
account: CreateAccount
|
account: CreateAccount
|
||||||
): account is CreatePassswordAccount => account.authType === AuthType.PASSWORD
|
): account is CreatePassswordAccount => account.authType === AuthType.PASSWORD
|
||||||
|
@ -56,6 +50,7 @@ export interface Account extends CreateAccount {
|
||||||
providerType?: AccountSSOProviderType
|
providerType?: AccountSSOProviderType
|
||||||
quotaUsage?: QuotaUsage
|
quotaUsage?: QuotaUsage
|
||||||
offlineLicenseToken?: string
|
offlineLicenseToken?: string
|
||||||
|
tenantName?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PasswordAccount extends Account {
|
export interface PasswordAccount extends Account {
|
||||||
|
|
Loading…
Reference in New Issue