mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-24 04:04:29 +00:00
* Unpackage-ify jslib * Adjust .tsconfig path for root and apply to jslib * Rebuild package-lock.json * Disable husky in CI * Revert an incorrect find/replace * Add jslib/shared/.eslintrc rules to root eslintrc * Revert package.json change to ignore spec files when linting * Ensure custom matcher gets imported in jslib tests * Fix small workflow bugs from merging * Try and get CI builds moving again * Always sign and notorize builds in CI * Revert erroneous verion bump
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
import { Account as BaseAccount } from "@/jslib/common/src/models/domain/account";
|
|
|
|
import { DirectoryType } from "@/src/enums/directoryType";
|
|
|
|
import { AzureConfiguration } from "./azureConfiguration";
|
|
import { GSuiteConfiguration } from "./gsuiteConfiguration";
|
|
import { LdapConfiguration } from "./ldapConfiguration";
|
|
import { OktaConfiguration } from "./oktaConfiguration";
|
|
import { OneLoginConfiguration } from "./oneLoginConfiguration";
|
|
import { SyncConfiguration } from "./syncConfiguration";
|
|
|
|
export class Account extends BaseAccount {
|
|
directoryConfigurations?: DirectoryConfigurations = new DirectoryConfigurations();
|
|
directorySettings: DirectorySettings = new DirectorySettings();
|
|
clientKeys: ClientKeys = new ClientKeys();
|
|
|
|
constructor(init: Partial<Account>) {
|
|
super(init);
|
|
this.directoryConfigurations = init?.directoryConfigurations ?? new DirectoryConfigurations();
|
|
this.directorySettings = init?.directorySettings ?? new DirectorySettings();
|
|
}
|
|
}
|
|
|
|
export class ClientKeys {
|
|
clientId: string;
|
|
clientSecret: string;
|
|
}
|
|
|
|
export class DirectoryConfigurations {
|
|
ldap: LdapConfiguration;
|
|
gsuite: GSuiteConfiguration;
|
|
azure: AzureConfiguration;
|
|
okta: OktaConfiguration;
|
|
oneLogin: OneLoginConfiguration;
|
|
}
|
|
|
|
export class DirectorySettings {
|
|
organizationId?: string;
|
|
sync?: SyncConfiguration;
|
|
directoryType?: DirectoryType;
|
|
userDelta?: string;
|
|
groupDelta?: string;
|
|
lastUserSync?: Date;
|
|
lastGroupSync?: Date;
|
|
lastSyncHash?: string;
|
|
syncingDir?: boolean;
|
|
}
|