This repository has been archived on 2022-10-05. You can view files and clone it, but cannot push or open issues or pull requests.
assetLabelGen/snipeit.d.ts

64 lines
1.4 KiB
TypeScript
Raw Normal View History

export interface Hardware {
id: number;
name: string;
asset_tag: string;
serial: string;
model: IdName;
model_number: string;
eol?: string; // TODO
status_label: IdName & {
status_type: 'deployable' | 'pending' | 'undeployable' | 'archived';
status_meta: 'deployed' | 'pending'; // TODO
};
category: IdName;
manufacturer: IdName;
supplier?: IdName;
notes?: string;
order_number?: string;
company?: IdName; // TODO
location?: IdName;
rtd_location?: IdName;
image: string;
assigned_to: IdName & { type: string };
warranty_months?: string;
warranty_expires?: string;
created_at: DatetimeFormatted;
updated_at: DatetimeFormatted;
last_audit_date?: DatetimeFormatted;
next_audit_date?: DatetimeFormatted;
deleted_at?: DatetimeFormatted;
purchase_date: DatetimeFormatted;
last_checkout: DatetimeFormatted;
expected_checkin: DatetimeFormatted;
purchase_cost: number;
checkin_counter: number;
checkout_counter: number;
requests_counter: number;
user_can_checkout: boolean;
custom_fields: {
[key: string]: {
field: string;
value?: string;
field_format: string;
};
};
available_actions: {
checkout: boolean;
checkin: boolean;
clone: boolean;
restore: boolean;
update: boolean;
delete: boolean;
};
}
export interface IdName {
id: number;
name: string;
}
export interface DatetimeFormatted {
datetime: string;
formatted: string;
}