amocrm-client
Version:
JS Library for AmoCRM
43 lines (42 loc) • 1.75 kB
TypeScript
import { ICriteria, IEntityAttributes } from "./api";
import { Moment, PartialWithRequired } from "./common";
import { ICustomFieldValue } from "./custom_field";
declare type CatalogElementWithString = "invoice_link";
export declare type CatalogElementWith = Array<CatalogElementWithString> | CatalogElementWithString;
export declare type CatalogCriteria = Partial<Pick<ICriteria<never, never>, "page" | "limit">>;
export declare type CatalogElementCriteria = Partial<ICriteria<ICatalogElementFilter, CatalogElementWith>>;
export declare type CatalogCreateCriteria = PartialWithRequired<Pick<ICatalogAttributes, "name" | "type" | "sort" | "can_add_elements" | "can_link_multiple">, "name">;
export declare type CatalogUpdateCriteria = PartialWithRequired<Pick<ICatalogAttributes, "id" | "name" | "type" | "sort" | "can_add_elements" | "can_link_multiple">, "name" | "id">;
export interface ICatalogAttributes extends IEntityAttributes {
name: string;
created_by: number;
updated_by: number;
created_at: Date;
updated_at: Date;
sort: number;
type: string;
can_add_elements: boolean;
can_show_in_cards: boolean;
can_link_multiple: boolean;
can_be_deleted: boolean;
sdk_widget_code: string;
}
export interface ICatalogElementAttributes extends IEntityAttributes {
catalog_id: number;
name: string;
created_by: number;
updated_by: number;
created_at: Date;
updated_at: Date;
is_deleted: boolean;
custom_fields_value: ICustomFieldValue[] | null;
metadata?: {
quantity: number;
catalog_id: number;
price_id: number;
};
}
export interface ICatalogElementFilter {
id: number | number[];
}
export {};