import type { JsonValue } from "./types.js";
export type EntityId = string;
export type Operator = "Equal" | "NotEqual" | "LessThan" | "GreaterThan" | "LessThanOrEqual" | "GreaterThanOrEqual" | "BeginsWith" | "EndsWith" | "Contains" | "DoesNotContain" | "In" | "Like" | "InRange" | "NotInRange" | "NotIn";
export type Order = "Ascending" | "Descending";
export type DatePeriod = "ThisWeek" | "ThisMonth" | "ThisQuarter" | "ThisYear" | "NextWeek" | "NextMonth" | "NextQuarter" | "NextYear" | "LastWeek" | "LastMonth" | "LastQuarter" | "LastYear";
export type FunctionType = "Count" | "Max" | "Min" | "Sum" | "Avg";
export type LicenseType = "Full" | "Limited" | "Email" | "None" | "TeamMember" | "Social" | "ExternalCollaborator";
export type NewsFeedMode = "Following" | "All";
export type TimesheetState = "UnSubmitted" | "PendingApproval" | "Approved" | "All";
export type ErrorCode = "EntityNotFound" | "InvalidArgument" | "MissingArgument" | "InvalidOperation" | "DuplicateKey" | "InvalidField" | "InvalidType" | "FileNotFound" | "VirusCheckFailed" | "Unauthorized" | "UnsupportedClient" | "General" | "Internal" | "ValidationRuleError" | "LoginFailure" | "SessionTimeout" | "Redirect" | "InvalidQuery" | "ExecutionThresholdExceeded" | "TooManyRequests";
export type FieldType = "Boolean" | "String" | "Integer" | "Long" | "Double" | "DateTime" | "Date" | "Entity" | "Duration" | "Money";
export type PresentationType = "Text" | "Numeric" | "Date" | "Time" | "Checkbox" | "TextArea" | "Currency" | "Duration" | "ReferenceToObject" | "PickList" | "Url" | "Percent" | "Other";
export type RecipientType = "To" | "CC";
export type AccessType = "Public" | "Private";
export type TriggerType = "Create" | "CreateOrEdit" | "Delete" | "CreateOrEditWithPreviousValueNotEqual";
export type HttpMethod = "DELETE" | "GET" | "POST" | "PUT";
export interface AndCondition {
    and: Condition[];
}
export interface OrCondition {
    or: Condition[];
}
export interface NotCondition {
    not: Condition;
}
export interface CompareCondition {
    _type?: "Compare";
    leftExpression: Expression;
    operator: ComparisonOperator;
    rightExpression: Expression;
}
export interface CzqlCondition {
    text: string;
    parameters?: Parameters;
}
export type Condition = AndCondition | OrCondition | NotCondition | CompareCondition | CzqlCondition;
export interface FieldExpression {
    fieldName: string;
}
export interface ConstantExpression {
    value: JsonValue;
}
export interface ConstantListExpression {
    values: JsonValue[];
}
export interface QueryExpression {
    query: Query;
}
export interface PredefinedDateRangeExpression {
    value?: DatePeriod;
    dateRangeValue?: DatePeriod;
}
export type Expression = FieldExpression | ConstantExpression | ConstantListExpression | QueryExpression | PredefinedDateRangeExpression;
export type ApplyOnMembersResult = string;
export type IFormat = Record<string, JsonValue>;
export type RoleType = string;
export interface Action {
    url: string;
    method: HttpMethod;
    headers?: string;
    body?: string;
}
export interface ApplyOnMembersResultItemStatus {
    userGroupId?: EntityId;
    userGroupName?: string;
    status?: ApplyOnMembersResult;
    failureStatusMessage?: FailureStatusMessage;
}
export interface CalendarException {
    id?: EntityId;
    name?: string;
    isWorkingDay?: boolean;
    isAllDay?: boolean;
    startHour?: number;
    endHour?: number;
    exceptionType?: EntityId;
    startDate?: DateTime;
    endDate?: DateTime;
    repeat?: Repeat;
}
export interface CreateResult {
    id?: EntityId;
}
export interface DateTime {
}
export interface DayInformation {
    isWorkingDay?: boolean;
    totalWorkingHours?: number;
    startHour?: number;
    endHour?: number;
}
export interface Entity {
    id?: EntityId;
    objectFields?: Record<string, JsonValue>;
}
export interface EntityDescription {
    typeName?: string;
    fields?: FieldDescription[];
    validStates?: string[];
    label?: string;
    labelPlural?: string;
    parentEntity?: string;
    displayField?: string;
    disabled?: boolean;
    relations?: RelationDescription[];
}
export interface EntityRelationsDescription {
    typeName?: string;
    relations?: RelationDescription[];
}
export interface Error {
    errorCode?: ErrorCode;
    message?: string;
    referenceId?: string;
}
export interface Every {
    recurrenceType?: string;
    period?: number;
}
export interface ExceptionDate {
    date?: DateTime;
    calendarExceptionId?: EntityId;
}
export interface FailureStatusMessage {
    failureMessage?: string;
}
export interface FieldAggregation {
    function?: FunctionType;
    fieldName?: string;
    alias?: string;
}
export interface FieldDescription {
    name?: string;
    type?: FieldType;
    presentationType?: PresentationType;
    label?: string;
    defaultValue?: JsonValue;
    system?: boolean;
    calculated?: boolean;
    nullable?: boolean;
    createOnly?: boolean;
    updateable?: boolean;
    internal?: boolean;
    custom?: boolean;
    visible?: boolean;
    decimalPlaces?: number;
    filterable?: boolean;
    sortable?: boolean;
    format?: IFormat;
    maxLength?: number;
    flags?: string[];
    restrictedFieldSetName?: string;
    manuallySetName?: string;
}
export interface FieldValue {
    fieldName?: string;
    value?: JsonValue;
}
export interface FileInformation {
    storage?: Storage;
    url?: string;
    fileName?: string;
    subType?: string;
    extendedInfo?: string;
}
export interface IdentifierMap {
    oid?: string;
    id?: string;
}
export interface LicenseConsumption {
    licenseTypeLabel?: string;
    licenseType?: LicenseType;
    assignedLicenses?: number;
    activeUsers?: number;
    allocatedLicenses?: number;
}
export interface LoginOptions {
    partnerId?: string;
    applicationId?: string;
}
export interface MissingTimesheets {
    date?: DateTime;
    workingHours?: number;
    reportedHours?: number;
    missingHours?: number;
}
export interface OrderBy {
    fieldName?: string;
    order?: Order;
}
export interface OrganizationLicenseConsumption {
    id?: EntityId;
    licenseConsumption?: LicenseConsumption;
}
export interface Paging {
    from?: number;
    limit?: number;
    hasMore?: boolean;
}
export interface Parameters {
    objectFields?: Record<string, JsonValue>;
}
export interface PostFeedItem {
    latestReplies?: ReplyFeedItem;
    pinned?: boolean;
    message?: Entity;
    likedByMe?: boolean;
    relatedEntities?: Entity;
    notify?: Entity;
    topics?: Entity;
    bodyMarkup?: string;
    summary?: string;
}
export interface Recipient {
    recipientType?: RecipientType;
    user?: EntityId;
    eMail?: string;
}
export interface Relation {
    name?: string;
    fields?: string[];
    where?: Condition;
    orders?: OrderBy[];
    fromLink?: boolean;
}
export interface RelationDescription {
    name?: string;
    label?: string;
    roleLabel?: string;
    readOnly?: boolean;
    linkTypeName?: string;
    relatedTypeName?: string;
    sourceFieldName?: string;
}
export interface Repeat {
    every?: Every;
    occurrences?: number;
    endBy?: DateTime;
}
export interface ReplyFeedItem {
    message?: Entity;
    likedByMe?: boolean;
    relatedEntities?: Entity;
    notify?: Entity;
    topics?: Entity;
    bodyMarkup?: string;
    summary?: string;
}
export interface Request {
    url?: string;
    method?: string;
    body?: JsonValue;
}
export interface Response {
    statusCode?: number;
    body?: JsonValue;
}
export interface RetrieveResult {
    entity?: Entity;
}
export interface RoleForResource {
    role: RoleType;
    resource: EntityId;
}
export interface EntityFeedQuery {
    entityId: EntityId;
    fields?: string[];
    feedItemOptions?: string[];
    paging?: Paging;
}
export interface GroupsQuery {
    fields?: string[];
    paging?: Paging;
}
export interface NewsFeedQuery {
    mode?: NewsFeedMode;
    fields?: string[];
    feedItemOptions?: string[];
    paging?: Paging;
}
export interface RepliesQuery {
    postId: EntityId;
    fields?: string[];
    feedItemOptions?: string[];
    paging?: Paging;
}
export interface AggregateQuery {
    typeName: string;
    groupBy?: string[];
    orders?: OrderBy[];
    where?: Condition;
    aggregations: FieldAggregation[];
    paging?: Paging;
}
export interface CzqlQuery {
    q?: string;
    parameters?: Parameters;
    paging?: Paging;
}
export interface EntityQuery {
    typeName: string;
    fields?: string[];
    orders?: OrderBy[];
    where?: Condition;
    relations?: Relation[];
    deleted?: boolean;
    originalExternalID?: boolean;
    paging?: Paging;
}
export interface RelationQuery {
    entityId: EntityId;
    relationName: string;
    fields?: string[];
    orders?: OrderBy[];
    where?: Condition;
    relations?: Relation[];
    fromLink?: boolean;
    paging?: Paging;
}
export interface ExpenseQuery {
    projectId?: EntityId;
    customerId?: EntityId;
    typeName: string;
    fields?: string[];
    orders?: OrderBy[];
    where?: Condition;
    relations?: Relation[];
    deleted?: boolean;
    originalExternalID?: boolean;
    paging?: Paging;
}
export interface TimesheetQuery {
    projectId?: EntityId;
    customerId?: EntityId;
    iAmTheApprover?: boolean;
    workItems?: EntityId[];
    timesheetState?: TimesheetState;
    typeName: string;
    fields?: string[];
    orders?: OrderBy[];
    where?: Condition;
    relations?: Relation[];
    deleted?: boolean;
    originalExternalID?: boolean;
    paging?: Paging;
}
export interface FindUserQuery {
    firstName?: string;
    lastName?: string;
    eMail?: string;
    fuzzySearchUserName?: boolean;
    includeSuspendedUsers?: boolean;
    fields?: string[];
    orders?: OrderBy[];
    paging?: Paging;
}
export type Query = EntityFeedQuery | GroupsQuery | NewsFeedQuery | RepliesQuery | AggregateQuery | CzqlQuery | EntityQuery | RelationQuery | ExpenseQuery | TimesheetQuery | FindUserQuery;
export type EntityQueryBody = EntityQuery;
export type ComparisonOperator = Operator;
export type SortOrder = Order;
export type ConditionParameters = Parameters;
//# sourceMappingURL=clarizen-api-types.d.ts.map