/** This is spectacularly generated code by spectacular based on Qlik Cloud Services APIs */ import Auth from '../auth/auth.js'; import ListableResource from '../listable.js'; import type { Config } from '../types/types.js'; export declare enum GetConnectionsSortField { SpaceId = "spaceId", AscSpaceId = "+spaceId", DescSpaceId = "-spaceId" } export declare enum GetDataFileInfosSortField { Name = "name", AscName = "+name", DescName = "-name", Size = "size", AscSize = "+size", DescSize = "-size", ModifiedDate = "modifiedDate", AscModifiedDate = "+modifiedDate", DescModifiedDate = "-modifiedDate" } export type BatchChangeSpaceItem = { /** The ID of the data file whose space will be changed. @example "ee6a390c-5d33-11e8-9c2d-fa7ae01bbebc" */ id: string; /** The ID of the new space. Passing in a null will result in the data file being moved to the user's personal space. @example "617979737a9f56e49dea2e6e" */ spaceId?: string; [key: string]: any; }; export type BatchDeleteItem = { /** The ID of the data file to delete. @example "ee6a390c-5d33-11e8-9c2d-fa7ae01bbebc" */ id: string; [key: string]: any; }; export type ChangeDataFileOwnerRequest = { /** The ID of the new owner. @example "lDL4DIINndhL_iJkcbqWyJenuwizP-2D" */ ownerId: string; [key: string]: any; }; export type ChangeDataFileSpaceRequest = { /** The ID of the space. If null, this data file will be moved to the user's personal space. @example "617979737a9f56e49dea2e6e" */ spaceId?: string; [key: string]: any; }; export type ConnectionsResponse = { /** The connect statement that will be passed to the connector when invoked. @example "CUSTOM CONNECT TO \"provider=qix-datafiles.exe;path=mydatafiles;\"" */ connectStatement: string; /** The unique identifier of the connection. @example "ee6a390c-5d33-11e8-9c2d-fa7ae01bbebc" */ id: string; /** The name of the connection. @example "DataFiles" */ name: string; /** The team space that the given connection is associated with. If null, the connection is not associated with any specific team space. @example "617979737a9f56e49dea2e6e" */ spaceId?: string; /** The type of the connection. @example "qix-datafiles.exe" */ type: string; [key: string]: any; }; export type DataFileBatchChangeSpaceRequest = { /** The list of data files to delete. */ 'change-space': Array; [key: string]: any; }; export type DataFileBatchDeleteRequest = { /** The list of data files to delete. */ delete: Array; [key: string]: any; }; /** @param appId - If this file is bound to the lifecycle of a specific app, this is the ID of this app. @param createdDate - The date that the uploaded file was created. @param id - The ID for the uploaded file. @param modifiedDate - The date that the updated file was last modified. @param name - The name of the uploaded file. @param ownerId - The 'owner' of a file is the user who last uploaded the file's content. @param size - The size of the uploaded file, in bytes. @param spaceId - If the file was uploaded to a team space, this is the ID of that space. @param auth - Auth object used to make requests */ export declare class DataFileUploadResponse { auth: Auth; appId?: string; createdDate: string; id: string; modifiedDate?: string; name: string; ownerId: string; size: number; spaceId?: string; [key: string]: any; constructor({ appId, createdDate, id, modifiedDate, name, ownerId, size, spaceId, ...rest }: { appId?: string; createdDate: string; id: string; modifiedDate?: string; name: string; ownerId: string; size: number; spaceId?: string; }, auth?: Auth); /** This is primarily an admin type of operation. In general, the owner of a data file is implicitly set as part of a data file upload. For data files that reside in a personal space, changing the owner has the effect of moving the data file to the new owner's personal space. Change the owner of an existing data file. @param data - The request. */ changeOwner(data: ChangeDataFileOwnerRequest): Promise; /** This is to allow for a separate admin type of operation that is more global in terms of access in cases where admin users may not explicitly have been granted full access to a given space within the declared space-level permissions. If the space ID is set to null, then the datafile will end up residing in the personal space of the user who is the owner of the file. Change the space that an existing data file resides in. @param data - The request. */ changeSpace(data: ChangeDataFileSpaceRequest): Promise; /** Delete the specified data file. */ delete(): Promise; /** Re-upload an existing data file. @param File - IFormFile form multipart/form-data @param name - Name that will be given to the uploaded file. If this name is different than the name used when the file was last POSTed or PUT, this will result in a rename of the file. It should be noted that the '/' character in a data file name indicates a 'path' separator in a logical folder hierarchy for the name. Names that contain '/'s should be used with the assumption that a logical 'folder hierarchy' is being defined for the full pathname of that file. '/' is a significant character in the data file name, and may impact the behavior of future APIs that take this folder hierarchy into account. @param appId - If this file should be bound to the lifecycle of a specific app, this is the ID of this app. @param sourceId - If a SourceId is specified, this is the ID of the existing data file whose content should be copied into the specified data file. That is, instead of the file content being specified in the Data element, it is effectively copied from an existing, previously uploaded file. @param connectionId - If present, this is the DataFiles connection that the upload should occur in the context of. If absent, the default is that the upload will occur in the context of the MyDataFiles connection. If the DataFiles connection is different from the one specified when the file was last POSTed or PUT, this will result in a logical move of this file into the new space. @param tempContentFileId - If a TempContentFileId is specified, this is the ID of a previously uploaded temporary content file whose content should be copied into the specified data file. That is, instead of the file content being specified in the Data element, it is effectively copied from an existing, previously uploaded file. The expectation is that this file was previously uploaded to the temporary content service, and the ID specified here is the one returned from the temp content upload request. */ set(File?: Buffer, name?: string, appId?: string, sourceId?: string, connectionId?: string, tempContentFileId?: string): Promise; } export type MultiStatusResponse = { /** List of individual results for the items in the specified batch. */ data: Array; [key: string]: any; }; export type MultiStatusResponseItem = { /** The error code. @example "HTTP-400" */ code: string; /** A human-readable explanation specific to this occurrence of the problem. @example "Invalid encoding of cursor." */ detail?: string; /** The unique identifier of the file. @example "ee6a390c-5d33-11e8-9c2d-fa7ae01bbebc" */ id: string; /** The HTTP status code. @example 400 */ status: number; /** Summary of the problem. @example "Cursor not formatted correctly." */ title?: string; [key: string]: any; }; export type QuotaResponse = { /** The allowed file extensions on files that are uploaded. */ allowedExtensions: Array; /** The allowed file extensions for files that are only used internally by the system (and thus not typically shown to end users). */ allowedInternalExtensions: Array; /** Maximum allowable size of an uploaded file. @example 524288000 */ maxFileSize: number; /** Maximum allowable size for a single uploaded large data file (in bytes). This is a file that was indirectly uploaded using the temp content service chunked upload capability. @example 6442450944 */ maxLargeFileSize: number; /** The maximum aggregate size of all files uploaded by a given user. @example 9223372036854776000 */ maxSize: number; /** The current aggregate size of all files uploaded by a given user. If the current aggregate size is greater than the maximum aggregate size, this is a quota violation. @example 5000 */ size: number; [key: string]: any; }; export declare class DataFiles { auth: Auth; config: Config; constructor(config: Config | Auth); /** This is to allow for a separate admin type of operation that is more global in terms of access in cases where admin users may not explicitly have been granted full access to a given space within the declared space-level permissions. If the space ID is set to null, then the data file will end up residing in the personal space of the user who is the owner of the file. Change the spaces that a set of existing data files reside in a a single batch. @param data - Specifies the list of data file change space operations in a single batch. */ changeSpace(data: DataFileBatchChangeSpaceRequest): Promise; /** Delete the specified set of data files as a single batch. @param data - Specifies the list of data files to be deleted in a single batch. */ delete(data: DataFileBatchDeleteRequest): Promise; /** Get the built-in connection used by the engine to load/write data files given a connection ID. @param id - The ID of the connection. */ getConnection(id: string): Promise; /** The non-filtered list contains a set of hardcoded connections, along with one connection per team space that the given user has access to. Get the list of built-in connections used by the engine to load/write data files. @param appId - If present, get connections with connection strings that are scoped to the given app ID. @param limit - If present, the maximum number of data file connection records to return. @param name - If present, only return connections with the given name. @param page - If present, the cursor that starts the page of data that is returned. @param personal - If true, only return the connections that access data in a personal space. Default is false. @param sort - The name of the field used to sort the result. By default, the sort is ascending. Putting a '+' prefix on the sort field name explicitly indicates ascending sort order. A '-' prefix indicates a descending sort order. @param spaceId - If present, only return the connection that accesses data files in the specified space. */ getConnections(queryParams?: { appId?: string; limit?: number; name?: string; page?: string; personal?: boolean; sort?: GetConnectionsSortField; spaceId?: string; }): Promise>; /** Get quota information for the calling user. */ getQuotas(): Promise; /** Get descriptive info for the specified data file. @param id - The ID of the data file. */ get(id: string): Promise; /** Get descriptive info for the specified data files. @param allowInternalFiles - If set to false, do not return data files with internal extensions else return all the data files. @param appId - Only return files scoped to the specified app. If this parameter is not specified, only files that are not scoped to any app are returned. "*" implies all app-scoped files are returned. @param connectionId - Return files that reside in the space referenced by the specified DataFiles connection. If this parameter is not specified, the user's personal space is implied. @param limit - If present, the maximum number of data files to return. @param name - Filter the list of files returned to the given file name. @param ownerId - If present, fetch the data files for the specified owner. If a connectionId is specified in this case, the returned list is constrained to the specified space. If connectionId is not specified, then all files owned by the specified user are returned regardless of the personal space that a given file resides in. @param page - If present, the cursor that starts the page of data that is returned. @param sort - The name of the field used to sort the result. By default, the sort order is ascending. Putting a '+' prefix on the sort field name explicitly indicates ascending sort order. A '-' prefix indicates a descending sort order. */ getDataFiles(queryParams?: { allowInternalFiles?: boolean; appId?: string; connectionId?: string; limit?: number; name?: string; ownerId?: string; page?: string; sort?: GetDataFileInfosSortField; }): Promise>; /** Upload a new data file. @param File - IFormFile form multipart/form-data @param name - Name that will be given to the uploaded file. It should be noted that the '/' character in a data file name indicates a 'path' separator in a logical folder hierarchy for the name. Names that contain '/'s should be used with the assumption that a logical 'folder hierarchy' is being defined for the full pathname of that file. '/' is a significant character in the data file name, and may impact the behavior of future APIs which take this folder hierarchy into account. @param appId - If this file should be bound to the lifecycle of a specific app, this is the ID of this app. @param sourceId - If a SourceId is specified, this is the ID of the existing data file whose content should be copied into the specified data file. That is, instead of the file content being specified in the Data element, it is effectively copied from an existing, previously uploaded file. @param connectionId - If present, this is the DataFiles connection that the upload should occur in the context of. If absent, the default is that the upload will occur in the context of the MyDataFiles connection. If the DataFiles connection is different from the one specified when the file was last POSTed or PUT, this will result in a logical move of this file into the new space. @param tempContentFileId - If a TempContentFileId is specified, this is the ID of a previously uploaded temporary content file whose content should be copied into the specified data file. That is, instead of the file content being specified in the Data element, it is effectively copied from an existing, previously uploaded file. The expectation is that this file was previously uploaded to the temporary content service, and the ID specified here is the one returned from the temp content upload request. */ create(File?: Buffer, name?: string, appId?: string, sourceId?: string, connectionId?: string, tempContentFileId?: string): Promise; }