Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/publish/netlify/api/services/FunctionService.ts
6467 views
1
/* istanbul ignore file */
2
/* tslint:disable */
3
/* eslint-disable */
4
import type { CancelablePromise } from "../core/CancelablePromise.ts";
5
import type { BaseHttpRequest } from "../core/BaseHttpRequest.ts";
6
7
export class FunctionService {
8
constructor(public readonly httpRequest: BaseHttpRequest) {}
9
10
/**
11
* @returns any OK
12
* @throws ApiError
13
*/
14
public uploadDeployFunction({
15
deployId,
16
name,
17
fileBody,
18
runtime,
19
size,
20
}: {
21
deployId: string;
22
name: string;
23
fileBody: Blob;
24
runtime?: string;
25
size?: number;
26
}): CancelablePromise<{
27
id?: string;
28
name?: string;
29
sha?: string;
30
}> {
31
return this.httpRequest.request({
32
method: "PUT",
33
url: "/deploys/{deploy_id}/functions/{name}",
34
path: {
35
"deploy_id": deployId,
36
"name": name,
37
},
38
query: {
39
"runtime": runtime,
40
"size": size,
41
},
42
body: fileBody,
43
});
44
}
45
}
46
47