Path: blob/main/src/publish/netlify/api/services/FileService.ts
6475 views
/* istanbul ignore file */1/* tslint:disable */2/* eslint-disable */3import type { CancelablePromise } from "../core/CancelablePromise.ts";4import type { BaseHttpRequest } from "../core/BaseHttpRequest.ts";56export class FileService {7constructor(public readonly httpRequest: BaseHttpRequest) {}89/**10* @returns any OK11* @throws ApiError12*/13public listSiteFiles({14siteId,15}: {16siteId: string;17}): CancelablePromise<18Array<{19id?: string;20path?: string;21sha?: string;22mime_type?: string;23size?: number;24}>25> {26return this.httpRequest.request({27method: "GET",28url: "/sites/{site_id}/files",29path: {30"site_id": siteId,31},32});33}3435/**36* @returns any OK37* @throws ApiError38*/39public getSiteFileByPathName({40siteId,41filePath,42}: {43siteId: string;44filePath: string;45}): CancelablePromise<{46id?: string;47path?: string;48sha?: string;49mime_type?: string;50size?: number;51}> {52return this.httpRequest.request({53method: "GET",54url: "/sites/{site_id}/files/{file_path}",55path: {56"site_id": siteId,57"file_path": filePath,58},59});60}6162/**63* @returns any OK64* @throws ApiError65*/66public uploadDeployFile({67deployId,68path,69fileBody,70size,71}: {72deployId: string;73path: string;74fileBody: Blob;75size?: number;76}): CancelablePromise<{77id?: string;78path?: string;79sha?: string;80mime_type?: string;81size?: number;82}> {83return this.httpRequest.request({84method: "PUT",85url: "/deploys/{deploy_id}/files/{path}",86path: {87"deploy_id": deployId,88"path": path,89},90query: {91"size": size,92},93body: fileBody,94});95}96}979899