Files
cosmos-explorer/src/Explorer/Tables/Entities.ts
2021-10-12 08:07:06 -07:00

40 lines
853 B
TypeScript

import { ItemDefinition, QueryIterator, Resource } from "@azure/cosmos";
export interface ITableEntity {
[property: string]: ITableEntityAttribute;
}
export interface ITableEntityForTablesAPI extends ITableEntity {
PartitionKey: ITableEntityAttribute;
RowKey: ITableEntityAttribute;
Timestamp: ITableEntityAttribute;
}
export interface ITableEntityAttribute {
_: string; // Value of a property
$?: string; // Edm Type
}
export interface IListTableEntitiesResult {
Results: ITableEntity[];
//eslint-disable-next-line
ContinuationToken: any;
iterator?: QueryIterator<ItemDefinition & Resource>;
}
export interface IProperty {
key: string;
subkey?: string;
value: string;
}
export interface ITableQuery {
select?: string[];
filter?: string;
top?: number;
}
export interface ITableEntityIdentity {
RowKey: string;
}