/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { HeadersOption } from '@managed-api/commons-core'; import { ObjectEntity, ObjectsResponse } from '../definitions/Object'; import { CommonError, ErrorStrategyOption } from '../errorStrategy'; export interface GetObjectRequest extends HeadersOption, ErrorStrategyOption { /** * The object id to operate on */ id: string; } export interface GetObjectResponseOK extends ObjectEntity { } export interface GetObjectResponseError extends CommonError { } export interface UpdateObjectRequest extends HeadersOption, ErrorStrategyOption { /** * The object id to operate on */ id: string; body: { /** * The object type determines where the object should be stored and which attributes are available */ objectTypeId: number; attributes: { /** * The object that this attribute should be associated with */ objectId: number; /** * The type of the attribute. The type decides how this value should be interpreted */ objectTypeAttributeId: number; /** * The value(s) */ objectAttributeValues: { value: string; }[]; }[]; hasAvatar?: boolean; /** * The UUID as retrieved by uploading an avatar. */ avatarUUID?: string; }; } export interface UpdateObjectResponseOK extends ObjectEntity { } export interface UpdateObjectResponseError extends CommonError { } export interface DeleteObjectRequest extends HeadersOption, ErrorStrategyOption { /** * The object id to operate on */ id: string; } export type DeleteObjectResponseOK = undefined; export interface DeleteObjectResponseError extends CommonError { } export interface CreateObjectRequest extends HeadersOption, ErrorStrategyOption { body: { objectTypeId: number; attributes: { /** * The type of the attribute. The type decides how this value should be interpreted */ objectTypeAttributeId: number; /** * The value(s) */ objectAttributeValues: { value: string; }[]; }[]; hasAvatar?: boolean; /** * The UUID as retrieved by uploading an avatar. */ avatarUUID?: string; }; } export interface CreateObjectResponseOK extends ObjectEntity { } export interface CreateObjectResponseError extends CommonError { } export interface GetObjectsWithAqlRequest extends HeadersOption, ErrorStrategyOption { body: { /** * The AQL that will fetch the objects. The object type parameter will be appended implicitly to this AQL */ qlQuery: string; objectTypeId: number; /** * The requested page to be loaded for a paginated result. The default value is page = 1 */ page?: number; /** * How many objects should be returned in the request. It is used with page attribute for pagination. */ resultsPerPage: number; /** * Which attribute should be used to order by. The preferred way is to use the AQL order by and not pass this argument. */ orderByTypeAttrId?: number; /** * Sort objects in ascending order or descending order based on the attribute identified by orderByTypeAttrId. 1 means ascending all other values mean descending. The preferred way is to not supply the asc parameter and use the order by in AQL instead. */ asc?: number; /** * Identifies an object that should be included in the result. The page will be calculated accordingly to include the object specified in the result set */ objectId?: number; objectSchemaId?: number; /** * Should attribute values be included in the response. */ includeAttributes?: boolean; /** * Identifies the attributes which values should be included in the response. Note that the includeAttributes must be specified to true in order for this parameter to be used. */ attributesToDisplay?: { /** * The identifier of the object type attributes to be displayed */ attributesToDisplayIds: number[]; }; }; } export interface GetObjectsWithAqlResponseOK extends ObjectsResponse { } export interface GetObjectsWithAqlResponseError extends CommonError { } //# sourceMappingURL=object.d.ts.map