Interface KnowledgebasesAPI

interface KnowledgebasesAPI {
    cancelKnowledgebaseDatasource: (
        id: string,
        datasourceId: string,
        options?: ApiCallOptions,
    ) => Promise<CancelKnowledgebaseDatasourceHttpResponse>;
    clearCache: () => void;
    createKnowledgebase: (
        body: CreateKnowledgeBase,
        options?: ApiCallOptions,
    ) => Promise<CreateKnowledgebaseHttpResponse>;
    createKnowledgebaseDatasource: (
        id: string,
        body: CreateDataSource,
        options?: ApiCallOptions,
    ) => Promise<CreateKnowledgebaseDatasourceHttpResponse>;
    createKnowledgebaseDatasourceSchedule: (
        id: string,
        datasourceId: string,
        body: Schedule,
        options?: ApiCallOptions,
    ) => Promise<CreateKnowledgebaseDatasourceScheduleHttpResponse>;
    deleteKnowledgebase: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteKnowledgebaseHttpResponse>;
    deleteKnowledgebaseDatasource: (
        id: string,
        datasourceId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteKnowledgebaseDatasourceHttpResponse>;
    deleteKnowledgebaseDatasourceSchedule: (
        id: string,
        datasourceId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteKnowledgebaseDatasourceScheduleHttpResponse>;
    downloadKnowledgebaseDatasource: (
        id: string,
        datasourceId: string,
        body: DownloadFile,
        options?: ApiCallOptions,
    ) => Promise<DownloadKnowledgebaseDatasourceHttpResponse>;
    getKnowledgebase: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<GetKnowledgebaseHttpResponse>;
    getKnowledgebaseDatasourceHistories: (
        id: string,
        datasourceId: string,
        query: {
            limit?: number;
            next?: string;
            prev?: string;
            sort?: "COMPLETED" | "-COMPLETED";
        },
        options?: ApiCallOptions,
    ) => Promise<GetKnowledgebaseDatasourceHistoriesHttpResponse>;
    getKnowledgebaseDatasourceHistory: (
        id: string,
        datasourceId: string,
        syncId: string,
        options?: ApiCallOptions,
    ) => Promise<GetKnowledgebaseDatasourceHistoryHttpResponse>;
    getKnowledgebaseDatasourceSchedule: (
        id: string,
        datasourceId: string,
        options?: ApiCallOptions,
    ) => Promise<GetKnowledgebaseDatasourceScheduleHttpResponse>;
    getKnowledgebaseHistories: (
        id: string,
        query: {
            limit?: number;
            next?: string;
            prev?: string;
            sort?: "COMPLETED" | "-COMPLETED";
        },
        options?: ApiCallOptions,
    ) => Promise<GetKnowledgebaseHistoriesHttpResponse>;
    getKnowledgebases: (
        query: {
            countTotal?: boolean;
            limit?: number;
            next?: string;
            prev?: string;
            sort?:
                | "NAME"
                | "-NAME"
                | "DESCRIPTION"
                | "-DESCRIPTION"
                | "CREATED"
                | "-CREATED"
                | "UPDATED"
                | "-UPDATED";
        },
        options?: ApiCallOptions,
    ) => Promise<GetKnowledgebasesHttpResponse>;
    patchKnowledgebase: (
        id: string,
        body: JSONPatchArray,
        options?: ApiCallOptions,
    ) => Promise<PatchKnowledgebaseHttpResponse>;
    syncKnowledgebaseDatasource: (
        id: string,
        datasourceId: string,
        query: { migrate?: boolean },
        options?: ApiCallOptions,
    ) => Promise<SyncKnowledgebaseDatasourceHttpResponse>;
    updateKnowledgebaseDatasource: (
        id: string,
        datasourceId: string,
        body: DataSource,
        options?: ApiCallOptions,
    ) => Promise<UpdateKnowledgebaseDatasourceHttpResponse>;
}
Index

Properties

cancelKnowledgebaseDatasource: (
    id: string,
    datasourceId: string,
    options?: ApiCallOptions,
) => Promise<CancelKnowledgebaseDatasourceHttpResponse>

Cancels ongoing sync for a specified datasource.

Type declaration

The id of the knowledgebase the datasource belongs to.

The id of the datasource to cancel sync for.

CancelKnowledgebaseDatasourceHttpError

clearCache: () => void

Clears the cache for knowledgebases api requests.

Type declaration

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

      Returns void

createKnowledgebase: (
    body: CreateKnowledgeBase,
    options?: ApiCallOptions,
) => Promise<CreateKnowledgebaseHttpResponse>

Creates a new knowledgebase.

Type declaration

an object with the body content

CreateKnowledgebaseHttpError

createKnowledgebaseDatasource: (
    id: string,
    body: CreateDataSource,
    options?: ApiCallOptions,
) => Promise<CreateKnowledgebaseDatasourceHttpResponse>

Adds a datasource to a knowledgebase.

Type declaration

The id of the knowledgebase.

an object with the body content

CreateKnowledgebaseDatasourceHttpError

createKnowledgebaseDatasourceSchedule: (
    id: string,
    datasourceId: string,
    body: Schedule,
    options?: ApiCallOptions,
) => Promise<CreateKnowledgebaseDatasourceScheduleHttpResponse>

Creates or updates a specified datasource schedule.

Type declaration

The id of the knowledgebase the schedule belongs to.

The id of the datasource the schedule belongs to.

an object with the body content

CreateKnowledgebaseDatasourceScheduleHttpError

deleteKnowledgebase: (
    id: string,
    options?: ApiCallOptions,
) => Promise<DeleteKnowledgebaseHttpResponse>

Deletes a knowledgebase and all of its resources.

Type declaration

The id of the knowledgebase to delete.

DeleteKnowledgebaseHttpError

deleteKnowledgebaseDatasource: (
    id: string,
    datasourceId: string,
    options?: ApiCallOptions,
) => Promise<DeleteKnowledgebaseDatasourceHttpResponse>

Deletes a specified datasource and all its resources.

Type declaration

The id of the knowledgebase the datasource belongs to.

The id of the datasource to delete.

DeleteKnowledgebaseDatasourceHttpError

deleteKnowledgebaseDatasourceSchedule: (
    id: string,
    datasourceId: string,
    options?: ApiCallOptions,
) => Promise<DeleteKnowledgebaseDatasourceScheduleHttpResponse>

Delete knowledgebase datasource schedule

Type declaration

The id of the knowledgebase the schedule belongs to.

The id of the datasource the schedule belongs to.

DeleteKnowledgebaseDatasourceScheduleHttpError

downloadKnowledgebaseDatasource: (
    id: string,
    datasourceId: string,
    body: DownloadFile,
    options?: ApiCallOptions,
) => Promise<DownloadKnowledgebaseDatasourceHttpResponse>

Download knowledgebase datasource reference

Type declaration

The id of the knowledgebase the datasource belongs to.

The id of the datasource to download from.

an object with the body content

DownloadKnowledgebaseDatasourceHttpError

getKnowledgebase: (
    id: string,
    options?: ApiCallOptions,
) => Promise<GetKnowledgebaseHttpResponse>

Retrieves a specific knowledgebase.

Type declaration

The id of the knowledgebase to retrieve.

GetKnowledgebaseHttpError

getKnowledgebaseDatasourceHistories: (
    id: string,
    datasourceId: string,
    query: {
        limit?: number;
        next?: string;
        prev?: string;
        sort?: "COMPLETED" | "-COMPLETED";
    },
    options?: ApiCallOptions,
) => Promise<GetKnowledgebaseDatasourceHistoriesHttpResponse>

Retrieves sync history for a specified datasource in a knowledgebase. Returns a 404 if there is no sync history, or if the calling user doesn't have access to the datasource.

Type declaration

    • (
          id: string,
          datasourceId: string,
          query: {
              limit?: number;
              next?: string;
              prev?: string;
              sort?: "COMPLETED" | "-COMPLETED";
          },
          options?: ApiCallOptions,
      ): Promise<GetKnowledgebaseDatasourceHistoriesHttpResponse>
    • Retrieves sync history for a specified datasource in a knowledgebase. Returns a 404 if there is no sync history, or if the calling user doesn't have access to the datasource.

      Parameters

      • id: string

        The id of the knowledgebase the datasource belongs to.

      • datasourceId: string

        The id of the datasource.

      • query: {
            limit?: number;
            next?: string;
            prev?: string;
            sort?: "COMPLETED" | "-COMPLETED";
        }

        an object with query parameters

        • Optionallimit?: number

          The number of knowledgebases to get.

        • Optionalnext?: string

          Optional parameter to request the next page.

        • Optionalprev?: string

          Optional parameter to request the previous page.

        • Optionalsort?: "COMPLETED" | "-COMPLETED"

          Optional resource field name to sort on, case insensitive, eg. name. Can be prefixed with - to set descending order, defaults to ascending.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetKnowledgebaseDatasourceHistoriesHttpResponse>

      GetKnowledgebaseDatasourceHistoriesHttpError

The id of the knowledgebase the datasource belongs to.

The id of the datasource.

an object with query parameters

GetKnowledgebaseDatasourceHistoriesHttpError

getKnowledgebaseDatasourceHistory: (
    id: string,
    datasourceId: string,
    syncId: string,
    options?: ApiCallOptions,
) => Promise<GetKnowledgebaseDatasourceHistoryHttpResponse>

Type declaration

Retrieves detailed sync history for a specified datasource.

The id of the knowledgebase the datasource belongs to.

The id of the datasource.

The sync identifier.

GetKnowledgebaseDatasourceHistoryHttpError

getKnowledgebaseDatasourceSchedule: (
    id: string,
    datasourceId: string,
    options?: ApiCallOptions,
) => Promise<GetKnowledgebaseDatasourceScheduleHttpResponse>

Get a knowledgebase datasource schedule

Type declaration

The id of the knowledgebase the schedule belongs to.

The id of the datasource the schedule belongs to.

GetKnowledgebaseDatasourceScheduleHttpError

getKnowledgebaseHistories: (
    id: string,
    query: {
        limit?: number;
        next?: string;
        prev?: string;
        sort?: "COMPLETED" | "-COMPLETED";
    },
    options?: ApiCallOptions,
) => Promise<GetKnowledgebaseHistoriesHttpResponse>

Retrieves sync history for the specified knowledgebase. Will return a 404 if no sync history exists, or if the calling user does not have access to synced datasources.

Type declaration

    • (
          id: string,
          query: {
              limit?: number;
              next?: string;
              prev?: string;
              sort?: "COMPLETED" | "-COMPLETED";
          },
          options?: ApiCallOptions,
      ): Promise<GetKnowledgebaseHistoriesHttpResponse>
    • Retrieves sync history for the specified knowledgebase. Will return a 404 if no sync history exists, or if the calling user does not have access to synced datasources.

      Parameters

      • id: string

        The id of the knowledgebase.

      • query: {
            limit?: number;
            next?: string;
            prev?: string;
            sort?: "COMPLETED" | "-COMPLETED";
        }

        an object with query parameters

        • Optionallimit?: number

          The number of sync histories to get.

        • Optionalnext?: string

          Optional parameter to request the next page.

        • Optionalprev?: string

          Optional parameter to request the previous page.

        • Optionalsort?: "COMPLETED" | "-COMPLETED"

          Optional resource field name to sort on, case insensitive, eg. name. Can be prefixed with - to set descending order, defaults to ascending.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetKnowledgebaseHistoriesHttpResponse>

      GetKnowledgebaseHistoriesHttpError

The id of the knowledgebase.

an object with query parameters

GetKnowledgebaseHistoriesHttpError

getKnowledgebases: (
    query: {
        countTotal?: boolean;
        limit?: number;
        next?: string;
        prev?: string;
        sort?:
            | "NAME"
            | "-NAME"
            | "DESCRIPTION"
            | "-DESCRIPTION"
            | "CREATED"
            | "-CREATED"
            | "UPDATED"
            | "-UPDATED";
    },
    options?: ApiCallOptions,
) => Promise<GetKnowledgebasesHttpResponse>

Returns a list of all knowledgebases the user has access to.

Type declaration

    • (
          query: {
              countTotal?: boolean;
              limit?: number;
              next?: string;
              prev?: string;
              sort?:
                  | "NAME"
                  | "-NAME"
                  | "DESCRIPTION"
                  | "-DESCRIPTION"
                  | "CREATED"
                  | "-CREATED"
                  | "UPDATED"
                  | "-UPDATED";
          },
          options?: ApiCallOptions,
      ): Promise<GetKnowledgebasesHttpResponse>
    • Returns a list of all knowledgebases the user has access to.

      Parameters

      • query: {
            countTotal?: boolean;
            limit?: number;
            next?: string;
            prev?: string;
            sort?:
                | "NAME"
                | "-NAME"
                | "DESCRIPTION"
                | "-DESCRIPTION"
                | "CREATED"
                | "-CREATED"
                | "UPDATED"
                | "-UPDATED";
        }

        an object with query parameters

        • OptionalcountTotal?: boolean

          Optional parameter to request total count for query

        • Optionallimit?: number

          The number of knowledgebases to get.

        • Optionalnext?: string

          Optional parameter to request the next page.

        • Optionalprev?: string

          Optional parameter to request the previous page.

        • Optionalsort?:
              | "NAME"
              | "-NAME"
              | "DESCRIPTION"
              | "-DESCRIPTION"
              | "CREATED"
              | "-CREATED"
              | "UPDATED"
              | "-UPDATED"

          Optional resource field name to sort on, case insensitive, eg. name. Can be prefixed with - to set descending order, defaults to ascending.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetKnowledgebasesHttpResponse>

      GetKnowledgebasesHttpError

an object with query parameters

GetKnowledgebasesHttpError

patchKnowledgebase: (
    id: string,
    body: JSONPatchArray,
    options?: ApiCallOptions,
) => Promise<PatchKnowledgebaseHttpResponse>

Updates properties of a specific knowledgebase.

Type declaration

The knowledgebase id.

an object with the body content

PatchKnowledgebaseHttpError

syncKnowledgebaseDatasource: (
    id: string,
    datasourceId: string,
    query: { migrate?: boolean },
    options?: ApiCallOptions,
) => Promise<SyncKnowledgebaseDatasourceHttpResponse>

Starts syncing a specified datasource to a specified knowledgebase index.

Type declaration

    • (
          id: string,
          datasourceId: string,
          query: { migrate?: boolean },
          options?: ApiCallOptions,
      ): Promise<SyncKnowledgebaseDatasourceHttpResponse>
    • Starts syncing a specified datasource to a specified knowledgebase index.

      Parameters

      • id: string

        The id of the knowledgebase the datasource belongs to.

      • datasourceId: string

        The id of the datasource to sync.

      • query: { migrate?: boolean }

        an object with query parameters

        • Optionalmigrate?: boolean

          Optional parameter to migrate indexed files to docdetails collection

      • Optionaloptions: ApiCallOptions

      Returns Promise<SyncKnowledgebaseDatasourceHttpResponse>

      SyncKnowledgebaseDatasourceHttpError

The id of the knowledgebase the datasource belongs to.

The id of the datasource to sync.

an object with query parameters

SyncKnowledgebaseDatasourceHttpError

updateKnowledgebaseDatasource: (
    id: string,
    datasourceId: string,
    body: DataSource,
    options?: ApiCallOptions,
) => Promise<UpdateKnowledgebaseDatasourceHttpResponse>

Update a knowledgebase datasource

Type declaration

The id of a knowledgebase.

The id of the datasource to update.

an object with the body content

UpdateKnowledgebaseDatasourceHttpError