Customer File Info
Endpoints for managing customer file information.
'/customers/{id}/files'
GET
async find(
@param.path.string('id') id: typeof Customer.prototype.userId,
@param.query.object('filter') filter?: Filter<FileInfo>,
): Promise<FileInfo[]>Auth: Yes RBAC: Admin, Customer (owner)
Retrieves all files a customer uploaded.
POST
async fileUpload(
@param.path.string('id') id: typeof Customer.prototype.userId,
@requestBody.file() request: Request,
@inject(RestBindings.Http.RESPONSE) response: Response,
): Promise<FileInfo>Auth: Yes RBAC: Admin, Customer
Upload a file for a customer.
'/guest/files'
POST
async guestFileUpload(
@requestBody.file() request: Request,
@inject(RestBindings.Http.RESPONSE) response: Response,
): Promise<FileInfo>Auth: No
Upload a file for a guest.
'/customers/{id}/guestTransfer/{fileId}'
PATCH
async transferFile(
@param.path.string('id') id: typeof Customer.prototype.id,
@param.path.string('fileId') fileId: string,
): Promise<string>Auth: Yes RBAC: Customer
Transfer ownership of the guest uploaded file to the currently logged in customer.
'/customers/{id}/files/{fileId}'
GET
async getById(
@param.path.string('id') id: typeof Customer.prototype.id,
@param.path.string('fileId') fileId: string,
): Promise<FileInfo>Auth: Yes RBAC: Admin, Customer (owner)
Get a given file by ID.
DEL
async delete(
@param.path.string('id') id: typeof Customer.prototype.id,
@param.path.string('fileId') fileId: string,
): Promise<Count>Auth: Yes RBAC: Admin, Customer (owner)
Delete a given file by ID.
'/guest/files/{fileId}'
GET
async guestGetById(
@param.path.string('fileId') fileId: string,
): Promise<FileInfo>Auth: No
Get a guest file by ID.
'/customers/{id}/files/{fileId}/download'
GET
async downloadFile(
@param.path.string('id') id: typeof Customer.prototype.id,
@param.path.string('fileId') fileId: string,
@inject(RestBindings.Http.RESPONSE) response: Response,
): Promise<Response>Auth: Yes RBAC: Admin, Customer (owner)
Download an uploaded file.
'/guest/files/{fileId}/download'
GET
async guestDownloadFile(
@param.path.string('fileId') fileId: string,
@inject(RestBindings.Http.RESPONSE) response: Response,
): Promise<Response>Auth: No
Download a file uploaded by a guest.
Last updated