1 | |
2 | |
3 | * Get helm default values |
4 | * |
5 | */ |
6 | export async function main(auth: RT.Qovery, environmentId: string, body: Body) { |
7 | const url = new URL(`https://api.qovery.com/environment/${environmentId}/helmDefaultValues`) |
8 |
|
9 | const response = await fetch(url, { |
10 | method: 'POST', |
11 | headers: { |
12 | 'Content-Type': 'application/json', |
13 | Authorization: 'Token ' + auth.apiKey |
14 | }, |
15 | body: JSON.stringify(body) |
16 | }) |
17 | if (!response.ok) { |
18 | const text = await response.text() |
19 | throw new Error(`${response.status} ${text}`) |
20 | } |
21 | return await response.text() |
22 | } |
23 |
|
24 | |
25 | |
26 | * This file was automatically generated by json-schema-to-typescript. |
27 | * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, |
28 | * and run json-schema-to-typescript to regenerate this file. |
29 | */ |
30 |
|
31 | export type Body = { |
32 | source: |
33 | | { |
34 | git_repository?: { |
35 | |
36 | * application git repository URL |
37 | */ |
38 | url: string |
39 | |
40 | * Name of the branch to use. This is optional |
41 | * If not specified, then the branch used is the `main` or `master` one |
42 | * |
43 | */ |
44 | branch?: string |
45 | |
46 | * indicates the root path of the application. |
47 | */ |
48 | root_path?: string |
49 | |
50 | * The git token id on Qovery side |
51 | */ |
52 | git_token_id?: string |
53 | [k: string]: unknown |
54 | } |
55 | [k: string]: unknown |
56 | } |
57 | | { |
58 | helm_repository?: { |
59 | |
60 | * The id of the helm repository |
61 | */ |
62 | repository?: string |
63 | |
64 | * The name of the chart in the repository |
65 | */ |
66 | chart_name?: string |
67 | |
68 | * The version of the chart to use |
69 | */ |
70 | chart_version?: string |
71 | [k: string]: unknown |
72 | } |
73 | [k: string]: unknown |
74 | } |
75 | [k: string]: unknown |
76 | } |
77 |
|