Interface ItemsAPI

interface ItemsAPI {
    clearCache: () => void;
    deleteItem: (
        itemId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteItemHttpResponse>;
    getItem: (
        itemId: string,
        options?: ApiCallOptions,
    ) => Promise<GetItemHttpResponse>;
    getItemCollections: (
        itemId: string,
        query: {
            limit?: number;
            name?: string;
            next?: string;
            prev?: string;
            query?: string;
            sort?:
                | "-name"
                | "+name"
                | "+createdAt"
                | "-createdAt"
                | "+updatedAt"
                | "-updatedAt";
            type?: CollectionTypes;
        },
        options?: ApiCallOptions,
    ) => Promise<GetItemCollectionsHttpResponse>;
    getItems: (
        query: {
            collectionId?: string;
            createdByUserId?: string;
            id?: string;
            limit?: number;
            name?: string;
            next?: string;
            noActions?: boolean;
            notCreatedByUserId?: string;
            notOwnerId?: string;
            ownerId?: string;
            prev?: string;
            query?: string;
            resourceId?: string;
            resourceIds?: string;
            resourceLink?: string;
            resourceSubType?: string;
            resourceType?: ItemResourceTypeEnum;
            shared?: boolean;
            sort?:
                | "-name"
                | "+name"
                | "+createdAt"
                | "-createdAt"
                | "+updatedAt"
                | "-updatedAt"
                | "+recentlyUsed"
                | "-recentlyUsed";
            spaceId?: string;
            spaceType?: SpaceTypeEnum;
        },
        options?: ApiCallOptions,
    ) => Promise<GetItemsHttpResponse>;
    getItemsSettings: (
        options?: ApiCallOptions,
    ) => Promise<GetItemsSettingsHttpResponse>;
    getPublishedItems: (
        itemId: string,
        query: {
            limit?: number;
            next?: string;
            prev?: string;
            resourceType?: ItemResourceTypeEnum;
            sort?:
                | "-name"
                | "+name"
                | "+createdAt"
                | "-createdAt"
                | "+updatedAt"
                | "-updatedAt";
        },
        options?: ApiCallOptions,
    ) => Promise<GetPublishedItemsHttpResponse>;
    patchItemsSettings: (
        body: ItemsSettingsPatch,
        options?: ApiCallOptions,
    ) => Promise<PatchItemsSettingsHttpResponse>;
    updateItem: (
        itemId: string,
        body: ItemsUpdateItemRequestBody,
        options?: ApiCallOptions,
    ) => Promise<UpdateItemHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for items api requests.

Type declaration

    • (): void
    • Clears the cache for items api requests.

      Returns void

deleteItem: (
    itemId: string,
    options?: ApiCallOptions,
) => Promise<DeleteItemHttpResponse>

Deletes an item and removes the item from all collections.

Type declaration

The item's unique identifier.

DeleteItemHttpError

getItem: (
    itemId: string,
    options?: ApiCallOptions,
) => Promise<GetItemHttpResponse>

Finds and returns an item.

Type declaration

The item's unique identifier

GetItemHttpError

getItemCollections: (
    itemId: string,
    query: {
        limit?: number;
        name?: string;
        next?: string;
        prev?: string;
        query?: string;
        sort?:
            | "-name"
            | "+name"
            | "+createdAt"
            | "-createdAt"
            | "+updatedAt"
            | "-updatedAt";
        type?: CollectionTypes;
    },
    options?: ApiCallOptions,
) => Promise<GetItemCollectionsHttpResponse>

Finds and returns the collections (and tags) of an item. This endpoint does not return the user's favorites collection.

Type declaration

    • (
          itemId: string,
          query: {
              limit?: number;
              name?: string;
              next?: string;
              prev?: string;
              query?: string;
              sort?:
                  | "-name"
                  | "+name"
                  | "+createdAt"
                  | "-createdAt"
                  | "+updatedAt"
                  | "-updatedAt";
              type?: CollectionTypes;
          },
          options?: ApiCallOptions,
      ): Promise<GetItemCollectionsHttpResponse>
    • Finds and returns the collections (and tags) of an item. This endpoint does not return the user's favorites collection.

      Parameters

      • itemId: string

        The item's unique identifier.

      • query: {
            limit?: number;
            name?: string;
            next?: string;
            prev?: string;
            query?: string;
            sort?:
                | "-name"
                | "+name"
                | "+createdAt"
                | "-createdAt"
                | "+updatedAt"
                | "-updatedAt";
            type?: CollectionTypes;
        }

        an object with query parameters

        • Optionallimit?: number

          The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive).

        • Optionalname?: string

          The case-sensitive string used to search for a collection by name.

        • Optionalnext?: string

          The cursor to the next page of resources. Provide either the next or prev cursor, but not both.

        • Optionalprev?: string

          The cursor to the previous page of resources. Provide either the next or prev cursor, but not both.

        • Optionalquery?: string

          The case-insensitive string used to search for a resource by name or description.

        • Optionalsort?: "-name" | "+name" | "+createdAt" | "-createdAt" | "+updatedAt" | "-updatedAt"

          The property of a resource to sort on (default sort is +createdAt). The supported properties are createdAt, updatedAt, and name. A property must be prefixed by + or - to indicate ascending or descending sort order respectively.

        • Optionaltype?: CollectionTypes

          The case-sensitive string used to search for a collection by type.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetItemCollectionsHttpResponse>

      GetItemCollectionsHttpError

The item's unique identifier.

an object with query parameters

GetItemCollectionsHttpError

getItems: (
    query: {
        collectionId?: string;
        createdByUserId?: string;
        id?: string;
        limit?: number;
        name?: string;
        next?: string;
        noActions?: boolean;
        notCreatedByUserId?: string;
        notOwnerId?: string;
        ownerId?: string;
        prev?: string;
        query?: string;
        resourceId?: string;
        resourceIds?: string;
        resourceLink?: string;
        resourceSubType?: string;
        resourceType?: ItemResourceTypeEnum;
        shared?: boolean;
        sort?:
            | "-name"
            | "+name"
            | "+createdAt"
            | "-createdAt"
            | "+updatedAt"
            | "-updatedAt"
            | "+recentlyUsed"
            | "-recentlyUsed";
        spaceId?: string;
        spaceType?: SpaceTypeEnum;
    },
    options?: ApiCallOptions,
) => Promise<GetItemsHttpResponse>

Lists items that the user has access to.

Type declaration

    • (
          query: {
              collectionId?: string;
              createdByUserId?: string;
              id?: string;
              limit?: number;
              name?: string;
              next?: string;
              noActions?: boolean;
              notCreatedByUserId?: string;
              notOwnerId?: string;
              ownerId?: string;
              prev?: string;
              query?: string;
              resourceId?: string;
              resourceIds?: string;
              resourceLink?: string;
              resourceSubType?: string;
              resourceType?: ItemResourceTypeEnum;
              shared?: boolean;
              sort?:
                  | "-name"
                  | "+name"
                  | "+createdAt"
                  | "-createdAt"
                  | "+updatedAt"
                  | "-updatedAt"
                  | "+recentlyUsed"
                  | "-recentlyUsed";
              spaceId?: string;
              spaceType?: SpaceTypeEnum;
          },
          options?: ApiCallOptions,
      ): Promise<GetItemsHttpResponse>
    • Lists items that the user has access to.

      Parameters

      • query: {
            collectionId?: string;
            createdByUserId?: string;
            id?: string;
            limit?: number;
            name?: string;
            next?: string;
            noActions?: boolean;
            notCreatedByUserId?: string;
            notOwnerId?: string;
            ownerId?: string;
            prev?: string;
            query?: string;
            resourceId?: string;
            resourceIds?: string;
            resourceLink?: string;
            resourceSubType?: string;
            resourceType?: ItemResourceTypeEnum;
            shared?: boolean;
            sort?:
                | "-name"
                | "+name"
                | "+createdAt"
                | "-createdAt"
                | "+updatedAt"
                | "-updatedAt"
                | "+recentlyUsed"
                | "-recentlyUsed";
            spaceId?: string;
            spaceType?: SpaceTypeEnum;
        }

        an object with query parameters

        • OptionalcollectionId?: string

          The collection's unique identifier. Used to filter for items with a specific tag (collection type public), or collection.

        • OptionalcreatedByUserId?: string

          User's unique identifier.

        • Optionalid?: string

          The item's unique identifier.

        • Optionallimit?: number

          The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive).

        • Optionalname?: string

          The case-insensitive string used to search for a resource by name.

        • Optionalnext?: string

          The cursor to the next page of resources. Provide either the next or prev cursor, but not both.

        • OptionalnoActions?: boolean

          If set to true, the user's available actions for each item will not be evaluated meaning the actions-array will be omitted from the response (reduces response time).

        • OptionalnotCreatedByUserId?: string

          User's unique identifier.

        • OptionalnotOwnerId?: string

          Owner identifier.

        • OptionalownerId?: string

          Owner identifier.

        • Optionalprev?: string

          The cursor to the previous page of resources. Provide either the next or prev cursor, but not both.

        • Optionalquery?: string

          The case-insensitive string used to search for a resource by name or description.

        • OptionalresourceId?: string

          The case-sensitive string used to search for an item by resourceId. If resourceId is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both.

        • OptionalresourceIds?: string

          The case-sensitive strings used to search for an item by resourceIds. The maximum number of resourceIds it supports is 100. If resourceIds is provided, then resourceType must be provided. For example '?resourceIds=appId1,appId2'

        • OptionalresourceLink?: string

          The case-sensitive string used to search for an item by resourceLink. If resourceLink is provided, then resourceType must be provided. Provide either the resourceId or resourceLink, but not both.

        • OptionalresourceSubType?: string

          the case-sensitive string used to filter items by resourceSubType(s). For example '?resourceSubType=chart-monitoring,qix-df,qvd'. Will return a 400 error if used in conjuction with the square bracket syntax for resourceSubType filtering in the 'resourceType' query parameter.

        • OptionalresourceType?: ItemResourceTypeEnum

          The case-sensitive string used to filter items by resourceType(s). For example '?resourceType=app,qvapp'. Additionally, a optional resourceSubType filter can be added to each resourceType. For example '?resourceType=app[qvd,chart-monitoring],qvapp'. An trailing comma can be used to include the empty resourceSubType, e.g. '?resourceType=app[qvd,chart-monitoring,]', or, to include only empty resourceSubTypes, '?resourceType=app[]' This syntax replaces the 'resourceSubType' query param, and using both in the same query will result in a 400 error.

        • Optionalshared?: boolean

          Whether or not to return items in a shared space.

        • Optionalsort?:
              | "-name"
              | "+name"
              | "+createdAt"
              | "-createdAt"
              | "+updatedAt"
              | "-updatedAt"
              | "+recentlyUsed"
              | "-recentlyUsed"

          The property of a resource to sort on (default sort is +createdAt). The supported properties are createdAt, updatedAt, recentlyUsed and name. A property must be prefixed by + or - to indicate ascending or descending sort order respectively.

        • OptionalspaceId?: string

          The space's unique identifier (supports 'personal' as spaceId).

        • OptionalspaceType?: SpaceTypeEnum

          The case-sensitive string used to filter items on space type(s). For example '?spaceType=shared,personal'.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetItemsHttpResponse>

      GetItemsHttpError

an object with query parameters

GetItemsHttpError

getItemsSettings: (
    options?: ApiCallOptions,
) => Promise<GetItemsSettingsHttpResponse>

Finds and returns the items service settings for the current tenant. Currently used to enable or disable usage metrics in the tenant.

Type declaration

GetItemsSettingsHttpError

getPublishedItems: (
    itemId: string,
    query: {
        limit?: number;
        next?: string;
        prev?: string;
        resourceType?: ItemResourceTypeEnum;
        sort?:
            | "-name"
            | "+name"
            | "+createdAt"
            | "-createdAt"
            | "+updatedAt"
            | "-updatedAt";
    },
    options?: ApiCallOptions,
) => Promise<GetPublishedItemsHttpResponse>

Finds and returns the published items for a given item. This endpoint is particularly useful for finding the published copies of an app or a qvapp when you want to replace the content of a published copy with new information from the source item.

Type declaration

    • (
          itemId: string,
          query: {
              limit?: number;
              next?: string;
              prev?: string;
              resourceType?: ItemResourceTypeEnum;
              sort?:
                  | "-name"
                  | "+name"
                  | "+createdAt"
                  | "-createdAt"
                  | "+updatedAt"
                  | "-updatedAt";
          },
          options?: ApiCallOptions,
      ): Promise<GetPublishedItemsHttpResponse>
    • Finds and returns the published items for a given item. This endpoint is particularly useful for finding the published copies of an app or a qvapp when you want to replace the content of a published copy with new information from the source item.

      Parameters

      • itemId: string

        The item's unique identifier

      • query: {
            limit?: number;
            next?: string;
            prev?: string;
            resourceType?: ItemResourceTypeEnum;
            sort?:
                | "-name"
                | "+name"
                | "+createdAt"
                | "-createdAt"
                | "+updatedAt"
                | "-updatedAt";
        }

        an object with query parameters

        • Optionallimit?: number

          The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive).

        • Optionalnext?: string

          The cursor to the next page of resources. Provide either the next or prev cursor, but not both.

        • Optionalprev?: string

          The cursor to the previous page of resources. Provide either the next or prev cursor, but not both.

        • OptionalresourceType?: ItemResourceTypeEnum

          The case-sensitive string used to search for an item by resourceType.

        • Optionalsort?: "-name" | "+name" | "+createdAt" | "-createdAt" | "+updatedAt" | "-updatedAt"

          The property of a resource to sort on (default sort is +createdAt). The supported properties are createdAt, updatedAt, and name. A property must be prefixed by + or - to indicate ascending or descending sort order respectively.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetPublishedItemsHttpResponse>

      GetPublishedItemsHttpError

The item's unique identifier

an object with query parameters

GetPublishedItemsHttpError

patchItemsSettings: (
    body: ItemsSettingsPatch,
    options?: ApiCallOptions,
) => Promise<PatchItemsSettingsHttpResponse>

Updates the settings provided in the patch body. Currently used to enable or disable usage metrics in the tenant.

Type declaration

an object with the body content

PatchItemsSettingsHttpError

updateItem: (
    itemId: string,
    body: ItemsUpdateItemRequestBody,
    options?: ApiCallOptions,
) => Promise<UpdateItemHttpResponse>

Updates an item. Omitted and unsupported fields are ignored. To unset a field, provide the field's zero value.

Type declaration

The item's unique identifier.

an object with the body content

UpdateItemHttpError