|
1 | 1 | import { request } from "./request";
|
2 | 2 |
|
3 |
| -export type GetArchiveConfigReturn = { |
| 3 | +export type ArchiveConfiguration = { |
4 | 4 | zaaktypesShortProcess: string[]; // List of zaaktypes that should use the short process
|
5 | 5 | };
|
6 | 6 | /**
|
7 | 7 | * API call to get the archive configuration
|
8 |
| - * @returns {Promise<GetArchiveConfigReturn>} The archive configuration |
| 8 | + * @returns {Promise<ArchiveConfiguration>} The archive configuration |
9 | 9 | * @throws {Error} If the request fails
|
10 | 10 | * @example
|
11 | 11 | * const archiveConfig = await getArchiveConfig();
|
12 | 12 | * console.log(archiveConfig);
|
13 | 13 | */
|
14 |
| -export async function getArchiveConfig(): Promise<GetArchiveConfigReturn> { |
| 14 | +export async function getArchiveConfig(): Promise<ArchiveConfiguration> { |
15 | 15 | const response = await request("GET", "/archive-config");
|
16 |
| - const promise: Promise<GetArchiveConfigReturn> = response.json(); |
| 16 | + const promise: Promise<ArchiveConfiguration> = response.json(); |
17 | 17 | return promise;
|
18 | 18 | }
|
19 | 19 |
|
20 |
| -export type PatchArchiveConfigPayload = GetArchiveConfigReturn; |
21 |
| -export type PatchArchiveConfigReturn = void; |
22 | 20 | /**
|
23 | 21 | * API call to PATCH the archive configuration
|
24 |
| - * @param {PatchArchiveConfigPayload} archiveConfig The archive configuration |
25 |
| - * @returns {Promise<PatchArchiveConfigReturn>} The archive configuration |
| 22 | + * @param {ArchiveConfiguration } archiveConfig The archive configuration |
| 23 | + * @returns {Promise<void>} The archive configuration |
26 | 24 | * @throws {Error} If the request fails
|
27 | 25 | * @example
|
28 | 26 | * await patchArchiveConfig(archiveConfig);
|
29 | 27 | * console.log("Archive configuration updated");
|
30 | 28 | */
|
31 | 29 | export async function patchArchiveConfig(
|
32 |
| - archiveConfig: PatchArchiveConfigPayload, |
| 30 | + archiveConfig: ArchiveConfiguration, |
33 | 31 | ): Promise<void> {
|
34 | 32 | const response = await request(
|
35 | 33 | "PATCH",
|
|
0 commit comments