amocrm-client
Version:
JS Library for AmoCRM
54 lines (49 loc) • 1.63 kB
text/typescript
import { ICriteria, IEntityAttributes } from "./api";
import { Moment } from "./common";
import { ITaskType } from "./task";
type AccountWithString = "amojo_id" | "amojo_rights" | "users_groups" | "task_types" | "version" | "datetime_settings" | "drive_url" | "is_api_filter_enabled";
export type AccountWith = Array<AccountWithString> | AccountWithString;
export type AccountCriteria = Pick<ICriteria<never, AccountWith, never>, "with">;
export interface IAccountAttributes extends IEntityAttributes {
name: string;
subdomain: string;
country: string;
currency: string;
currency_symbol: string;
customer_mode: string;
current_user_id: number;
is_unsorted_on: boolean;
mobile_feature_vision: boolean;
is_loss_reason_enabled: boolean;
is_helpbod_enabled: false;
contact_name_display_order: number;
created_at: Date;
created_by: number;
updated_at: Date;
updated_by: number;
version?: number;
amojo_id?: string;
is_api_filter_enabled?: number;
_embedded: IAccountEmbedded;
}
export interface IAccountEmbedded {
datetime_settings?: {
date_pattern: string;
short_date_pattern: string;
short_time_pattern: string;
date_format: string;
time_format: string;
timezone: string;
timezone_offset: string;
},
amojo_rights?: {
can_direct: boolean;
can_create_groups: boolean;
},
user_groups: Array<{
id: number;
name: string;
uuid?: string;
}>,
task_types?: Array<ITaskType>;
}