hud-ai
Version:
Hud.ai API Client
55 lines (54 loc) • 1.9 kB
TypeScript
/// <reference types="bluebird" />
import * as Promise from 'bluebird';
import { HudAiCreateAttributes, HudAiListAttributes, HudAiUpdateAttributes, Resource } from '../utils/Resource';
import { RequestManager } from '../RequestManager';
import { CompanyEvent } from '../entities';
export interface CompanyEventListAttributes extends HudAiListAttributes {
companyId?: string | string[];
startingBefore?: Date;
startingAfter?: Date;
endingBefore?: Date;
endingAfter?: Date;
occurringAt?: Date;
title?: string;
type?: string;
limit?: number;
offset?: number;
}
export interface CompanyEventCreateAttributes extends HudAiCreateAttributes {
companyId: string;
title: string;
description?: string;
type?: string;
linkUrl?: string;
startsAt: Date;
endsAt: Date;
}
export interface CompanyEventGetAttributes {
id: string;
}
export interface CompanyEventUpdateAttributes extends HudAiUpdateAttributes {
id: string;
companyId?: string;
title?: string;
description?: string;
type?: string;
linkUrl?: string;
startsAt?: Date;
endsAt?: Date;
}
export interface CompanyEventDestroyAttributes {
id: string;
}
export declare class CompanyEventResource extends Resource<CompanyEvent, CompanyEventListAttributes, CompanyEventCreateAttributes, CompanyEventUpdateAttributes> {
constructor(requestManager: RequestManager);
list(listArgs: CompanyEventListAttributes): Promise<{
count: number;
rows: CompanyEvent[];
}>;
create(createArgs: CompanyEventCreateAttributes): Promise<CompanyEvent>;
get(getArgs: CompanyEventGetAttributes): Promise<CompanyEvent>;
update(updateArgs: CompanyEventUpdateAttributes): Promise<CompanyEvent>;
del(destroyArgs: CompanyEventDestroyAttributes): Promise<void>;
destroy(destroyArgs: CompanyEventDestroyAttributes): Promise<void>;
}