@kohost/api-client 7.9.0 → 7.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/emergencyContacts.d.ts +27 -0
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/kfcStatsWindow.d.ts +4 -4
- package/dist/lib/kfcStatsWindow.js +4 -4
- package/dist/lib/kfcStatsWindow.js.map +1 -1
- package/dist/lib/sosAudiences.d.ts +1 -1
- package/dist/lib/sosAudiences.js +1 -1
- package/dist/lib/sosAudiences.js.map +1 -1
- package/dist/models/announcement.js +5 -1
- package/dist/models/announcement.js.map +1 -1
- package/dist/models/sosEvent.js +2 -0
- package/dist/models/sosEvent.js.map +1 -1
- package/dist/schemas/announcement.d.ts +122 -6
- package/dist/schemas/announcement.js +126 -11
- package/dist/schemas/announcement.js.map +1 -1
- package/dist/schemas/definitions.d.ts +83 -1
- package/dist/schemas/definitions.js +40 -2
- package/dist/schemas/definitions.js.map +1 -1
- package/dist/schemas/sosEvent.d.ts +97 -2
- package/dist/schemas/sosEvent.js +92 -2
- package/dist/schemas/sosEvent.js.map +1 -1
- package/dist/schemas/ticket.d.ts +17 -2
- package/dist/schemas/ticket.js +19 -2
- package/dist/schemas/ticket.js.map +1 -1
- package/dist/useCases/addSOSEventNote.d.ts +36 -0
- package/dist/useCases/addSOSEventNote.js +47 -0
- package/dist/useCases/addSOSEventNote.js.map +1 -0
- package/dist/useCases/createAnnouncementPreset.d.ts +27 -0
- package/dist/useCases/createAnnouncementPreset.js +47 -0
- package/dist/useCases/createAnnouncementPreset.js.map +1 -0
- package/dist/useCases/deleteAnnouncementPreset.d.ts +36 -0
- package/dist/useCases/deleteAnnouncementPreset.js +47 -0
- package/dist/useCases/deleteAnnouncementPreset.js.map +1 -0
- package/dist/useCases/describeAnnouncement.d.ts +36 -0
- package/dist/useCases/describeAnnouncement.js +47 -0
- package/dist/useCases/describeAnnouncement.js.map +1 -0
- package/dist/useCases/exportSOSEventReport.d.ts +36 -0
- package/dist/useCases/exportSOSEventReport.js +47 -0
- package/dist/useCases/exportSOSEventReport.js.map +1 -0
- package/dist/useCases/fetchEmergencyContactPeople.d.ts +27 -0
- package/dist/useCases/fetchEmergencyContactPeople.js +47 -0
- package/dist/useCases/fetchEmergencyContactPeople.js.map +1 -0
- package/dist/useCases/index.d.ts +10 -0
- package/dist/useCases/index.js +21 -1
- package/dist/useCases/index.js.map +1 -1
- package/dist/useCases/listAnnouncements.d.ts +27 -0
- package/dist/useCases/listAnnouncements.js +47 -0
- package/dist/useCases/listAnnouncements.js.map +1 -0
- package/dist/useCases/previewSOSEventReport.d.ts +36 -0
- package/dist/useCases/previewSOSEventReport.js +47 -0
- package/dist/useCases/previewSOSEventReport.js.map +1 -0
- package/dist/useCases/updateAnnouncementPreset.d.ts +36 -0
- package/dist/useCases/updateAnnouncementPreset.js +47 -0
- package/dist/useCases/updateAnnouncementPreset.js.map +1 -0
- package/dist/useCases/voidCostEntry.d.ts +39 -0
- package/dist/useCases/voidCostEntry.js +47 -0
- package/dist/useCases/voidCostEntry.js.map +1 -0
- package/dist/validate.d.ts +0 -3
- package/package.json +6 -6
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region .generated/useCases/previewSOSEventReport.ts
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
var PreviewSOSEventReportCommand = class PreviewSOSEventReportCommand {
|
|
6
|
+
url;
|
|
7
|
+
data;
|
|
8
|
+
query;
|
|
9
|
+
headers;
|
|
10
|
+
config;
|
|
11
|
+
static params = ["eventId"];
|
|
12
|
+
static url = "/sos/events/:eventId/report/preview";
|
|
13
|
+
static method = "get";
|
|
14
|
+
constructor(commandConfig, options = {}) {
|
|
15
|
+
const pathParams = PreviewSOSEventReportCommand.params;
|
|
16
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
17
|
+
if (typeof data === "undefined") data = null;
|
|
18
|
+
if (typeof query === "undefined") query = null;
|
|
19
|
+
if (typeof headers === "undefined") headers = null;
|
|
20
|
+
let url = PreviewSOSEventReportCommand.url;
|
|
21
|
+
if (pathParams && data) for (const param of pathParams) {
|
|
22
|
+
const urlParam = ":" + param;
|
|
23
|
+
url = url.replace(urlParam, data[param]);
|
|
24
|
+
}
|
|
25
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
26
|
+
if (missingParams) {
|
|
27
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
28
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
29
|
+
}
|
|
30
|
+
this.url = url;
|
|
31
|
+
this.data = data;
|
|
32
|
+
this.query = query;
|
|
33
|
+
this.headers = headers;
|
|
34
|
+
this.config = {
|
|
35
|
+
method: PreviewSOSEventReportCommand.method,
|
|
36
|
+
url,
|
|
37
|
+
data,
|
|
38
|
+
params: query,
|
|
39
|
+
headers,
|
|
40
|
+
...options
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { PreviewSOSEventReportCommand };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=previewSOSEventReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"previewSOSEventReport.js","names":[],"sources":["../../.generated/useCases/previewSOSEventReport.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface PreviewSOSEventReportCommandConfig {\n data?: { eventId: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface PreviewSOSEventReportCommandRequestConfig {\n method: \"get\";\n url: string;\n data: { eventId: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * \n */\nexport class PreviewSOSEventReportCommand {\n url: string;\n data: { eventId: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: PreviewSOSEventReportCommandRequestConfig;\n\n static params = [\"eventId\"] as const;\n static url = \"/sos/events/:eventId/report/preview\";\n static method = \"get\" as const;\n\n constructor(commandConfig: PreviewSOSEventReportCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = PreviewSOSEventReportCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = PreviewSOSEventReportCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: PreviewSOSEventReportCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,+BAAb,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC,SAAS;CAC1B,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAAmD,UAAmC,CAAC,GAAG;EACpG,MAAM,aAAa,6BAA6B;EAEhD,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,6BAA6B;EAE/C,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,6BAA6B;GAChC;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface UpdateAnnouncementPresetCommandConfig {
|
|
2
|
+
data?: {
|
|
3
|
+
id: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
} | null;
|
|
6
|
+
headers?: Record<string, string> | null;
|
|
7
|
+
query?: Record<string, unknown> | null;
|
|
8
|
+
}
|
|
9
|
+
export interface UpdateAnnouncementPresetCommandRequestConfig {
|
|
10
|
+
method: "put";
|
|
11
|
+
url: string;
|
|
12
|
+
data: {
|
|
13
|
+
id: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
} | null;
|
|
16
|
+
params: Record<string, unknown> | null;
|
|
17
|
+
headers: Record<string, string> | null;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export declare class UpdateAnnouncementPresetCommand {
|
|
24
|
+
url: string;
|
|
25
|
+
data: {
|
|
26
|
+
id: string;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
} | null;
|
|
29
|
+
query: Record<string, unknown> | null;
|
|
30
|
+
headers: Record<string, string> | null;
|
|
31
|
+
config: UpdateAnnouncementPresetCommandRequestConfig;
|
|
32
|
+
static params: readonly ["id"];
|
|
33
|
+
static url: string;
|
|
34
|
+
static method: "put";
|
|
35
|
+
constructor(commandConfig: UpdateAnnouncementPresetCommandConfig, options?: Record<string, unknown>);
|
|
36
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region .generated/useCases/updateAnnouncementPreset.ts
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
var UpdateAnnouncementPresetCommand = class UpdateAnnouncementPresetCommand {
|
|
6
|
+
url;
|
|
7
|
+
data;
|
|
8
|
+
query;
|
|
9
|
+
headers;
|
|
10
|
+
config;
|
|
11
|
+
static params = ["id"];
|
|
12
|
+
static url = "/announcements/presets/:id";
|
|
13
|
+
static method = "put";
|
|
14
|
+
constructor(commandConfig, options = {}) {
|
|
15
|
+
const pathParams = UpdateAnnouncementPresetCommand.params;
|
|
16
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
17
|
+
if (typeof data === "undefined") data = null;
|
|
18
|
+
if (typeof query === "undefined") query = null;
|
|
19
|
+
if (typeof headers === "undefined") headers = null;
|
|
20
|
+
let url = UpdateAnnouncementPresetCommand.url;
|
|
21
|
+
if (pathParams && data) for (const param of pathParams) {
|
|
22
|
+
const urlParam = ":" + param;
|
|
23
|
+
url = url.replace(urlParam, data[param]);
|
|
24
|
+
}
|
|
25
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
26
|
+
if (missingParams) {
|
|
27
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
28
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
29
|
+
}
|
|
30
|
+
this.url = url;
|
|
31
|
+
this.data = data;
|
|
32
|
+
this.query = query;
|
|
33
|
+
this.headers = headers;
|
|
34
|
+
this.config = {
|
|
35
|
+
method: UpdateAnnouncementPresetCommand.method,
|
|
36
|
+
url,
|
|
37
|
+
data,
|
|
38
|
+
params: query,
|
|
39
|
+
headers,
|
|
40
|
+
...options
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { UpdateAnnouncementPresetCommand };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=updateAnnouncementPreset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateAnnouncementPreset.js","names":[],"sources":["../../.generated/useCases/updateAnnouncementPreset.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface UpdateAnnouncementPresetCommandConfig {\n data?: { id: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface UpdateAnnouncementPresetCommandRequestConfig {\n method: \"put\";\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * \n */\nexport class UpdateAnnouncementPresetCommand {\n url: string;\n data: { id: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: UpdateAnnouncementPresetCommandRequestConfig;\n\n static params = [\"id\"] as const;\n static url = \"/announcements/presets/:id\";\n static method = \"put\" as const;\n\n constructor(commandConfig: UpdateAnnouncementPresetCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = UpdateAnnouncementPresetCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = UpdateAnnouncementPresetCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: UpdateAnnouncementPresetCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,kCAAb,MAAa,gCAAgC;CAC3C;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC,IAAI;CACrB,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAAsD,UAAmC,CAAC,GAAG;EACvG,MAAM,aAAa,gCAAgC;EAEnD,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,gCAAgC;EAElD,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,gCAAgC;GACnC;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface VoidCostEntryCommandConfig {
|
|
2
|
+
data?: {
|
|
3
|
+
id: string;
|
|
4
|
+
costId: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
} | null;
|
|
7
|
+
headers?: Record<string, string> | null;
|
|
8
|
+
query?: Record<string, unknown> | null;
|
|
9
|
+
}
|
|
10
|
+
export interface VoidCostEntryCommandRequestConfig {
|
|
11
|
+
method: "post";
|
|
12
|
+
url: string;
|
|
13
|
+
data: {
|
|
14
|
+
id: string;
|
|
15
|
+
costId: string;
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
} | null;
|
|
18
|
+
params: Record<string, unknown> | null;
|
|
19
|
+
headers: Record<string, string> | null;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export declare class VoidCostEntryCommand {
|
|
26
|
+
url: string;
|
|
27
|
+
data: {
|
|
28
|
+
id: string;
|
|
29
|
+
costId: string;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
} | null;
|
|
32
|
+
query: Record<string, unknown> | null;
|
|
33
|
+
headers: Record<string, string> | null;
|
|
34
|
+
config: VoidCostEntryCommandRequestConfig;
|
|
35
|
+
static params: readonly ["id", "costId"];
|
|
36
|
+
static url: string;
|
|
37
|
+
static method: "post";
|
|
38
|
+
constructor(commandConfig: VoidCostEntryCommandConfig, options?: Record<string, unknown>);
|
|
39
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region .generated/useCases/voidCostEntry.ts
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
var VoidCostEntryCommand = class VoidCostEntryCommand {
|
|
6
|
+
url;
|
|
7
|
+
data;
|
|
8
|
+
query;
|
|
9
|
+
headers;
|
|
10
|
+
config;
|
|
11
|
+
static params = ["id", "costId"];
|
|
12
|
+
static url = "/tickets/:id/costs/:costId/void";
|
|
13
|
+
static method = "post";
|
|
14
|
+
constructor(commandConfig, options = {}) {
|
|
15
|
+
const pathParams = VoidCostEntryCommand.params;
|
|
16
|
+
let { data, query, headers } = commandConfig ?? {};
|
|
17
|
+
if (typeof data === "undefined") data = null;
|
|
18
|
+
if (typeof query === "undefined") query = null;
|
|
19
|
+
if (typeof headers === "undefined") headers = null;
|
|
20
|
+
let url = VoidCostEntryCommand.url;
|
|
21
|
+
if (pathParams && data) for (const param of pathParams) {
|
|
22
|
+
const urlParam = ":" + param;
|
|
23
|
+
url = url.replace(urlParam, data[param]);
|
|
24
|
+
}
|
|
25
|
+
const missingParams = url.match(/:[a-zA-Z0-9]+/g);
|
|
26
|
+
if (missingParams) {
|
|
27
|
+
const missing = missingParams.map((param) => param.replace(":", ""));
|
|
28
|
+
throw new Error("Missing parameters: " + missing.join(", "));
|
|
29
|
+
}
|
|
30
|
+
this.url = url;
|
|
31
|
+
this.data = data;
|
|
32
|
+
this.query = query;
|
|
33
|
+
this.headers = headers;
|
|
34
|
+
this.config = {
|
|
35
|
+
method: VoidCostEntryCommand.method,
|
|
36
|
+
url,
|
|
37
|
+
data,
|
|
38
|
+
params: query,
|
|
39
|
+
headers,
|
|
40
|
+
...options
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { VoidCostEntryCommand };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=voidCostEntry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voidCostEntry.js","names":[],"sources":["../../.generated/useCases/voidCostEntry.ts"],"sourcesContent":["/* This file is automatically generated. Do not modify it manually. */\n\nexport interface VoidCostEntryCommandConfig {\n data?: { id: string; costId: string; [key: string]: unknown } | null;\n headers?: Record<string, string> | null;\n query?: Record<string, unknown> | null;\n}\n\nexport interface VoidCostEntryCommandRequestConfig {\n method: \"post\";\n url: string;\n data: { id: string; costId: string; [key: string]: unknown } | null;\n params: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n [key: string]: unknown;\n}\n\n/**\n * \n */\nexport class VoidCostEntryCommand {\n url: string;\n data: { id: string; costId: string; [key: string]: unknown } | null;\n query: Record<string, unknown> | null;\n headers: Record<string, string> | null;\n config: VoidCostEntryCommandRequestConfig;\n\n static params = [\"id\",\"costId\"] as const;\n static url = \"/tickets/:id/costs/:costId/void\";\n static method = \"post\" as const;\n\n constructor(commandConfig: VoidCostEntryCommandConfig, options: Record<string, unknown> = {}) {\n const pathParams = VoidCostEntryCommand.params;\n\n let { data, query, headers } = commandConfig ?? {};\n\n if (typeof data === \"undefined\") data = null;\n if (typeof query === \"undefined\") query = null;\n if (typeof headers === \"undefined\") headers = null;\n\n // Replace path parameters with values from data\n let url: string = VoidCostEntryCommand.url;\n\n if (pathParams && data) {\n for (const param of pathParams) {\n const urlParam = \":\" + param;\n url = url.replace(urlParam, (data as Record<string, string>)[param]);\n }\n }\n\n // Make sure all parameters have been replaced\n const missingParams = url.match(/:[a-zA-Z0-9]+/g);\n if (missingParams) {\n const missing = missingParams.map((param) => param.replace(\":\", \"\"));\n throw new Error(\"Missing parameters: \" + missing.join(\", \"));\n }\n\n this.url = url;\n this.data = data;\n this.query = query;\n this.headers = headers;\n\n this.config = {\n method: VoidCostEntryCommand.method,\n url: url,\n data: data,\n params: query,\n headers: headers,\n ...options,\n };\n }\n}\n"],"mappings":";;;;AAoBA,IAAa,uBAAb,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;CAEA,OAAO,SAAS,CAAC,MAAK,QAAQ;CAC9B,OAAO,MAAM;CACb,OAAO,SAAS;CAEhB,YAAY,eAA2C,UAAmC,CAAC,GAAG;EAC5F,MAAM,aAAa,qBAAqB;EAExC,IAAI,EAAE,MAAM,OAAO,YAAY,iBAAiB,CAAC;EAEjD,IAAI,OAAO,SAAS,aAAa,OAAO;EACxC,IAAI,OAAO,UAAU,aAAa,QAAQ;EAC1C,IAAI,OAAO,YAAY,aAAa,UAAU;EAG9C,IAAI,MAAc,qBAAqB;EAEvC,IAAI,cAAc,MAChB,KAAK,MAAM,SAAS,YAAY;GAC9B,MAAM,WAAW,MAAM;GACvB,MAAM,IAAI,QAAQ,UAAW,KAAgC,MAAM;EACrE;EAIF,MAAM,gBAAgB,IAAI,MAAM,gBAAgB;EAChD,IAAI,eAAe;GACjB,MAAM,UAAU,cAAc,KAAK,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;GACnE,MAAM,IAAI,MAAM,yBAAyB,QAAQ,KAAK,IAAI,CAAC;EAC7D;EAEA,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;EAEf,KAAK,SAAS;GACZ,QAAQ,qBAAqB;GACxB;GACC;GACN,QAAQ;GACC;GACT,GAAG;EACL;CACF;AACF"}
|
package/dist/validate.d.ts
CHANGED
|
@@ -16,11 +16,8 @@ export declare const validateAlarm: import("ajv").ValidateFunction<{
|
|
|
16
16
|
zones: any;
|
|
17
17
|
}>;
|
|
18
18
|
export declare const validateAnnouncement: import("ajv").ValidateFunction<{
|
|
19
|
-
body: any;
|
|
20
19
|
id: any;
|
|
21
20
|
type: any;
|
|
22
|
-
} & {
|
|
23
|
-
body: any;
|
|
24
21
|
} & {
|
|
25
22
|
id: any;
|
|
26
23
|
} & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kohost/api-client",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.11.0",
|
|
4
4
|
"description": "API client, models, schemas, commands, and events for Kohost applications",
|
|
5
5
|
"author": "Ian Rogers",
|
|
6
6
|
"readme": "README.md",
|
|
@@ -111,17 +111,17 @@
|
|
|
111
111
|
"@eslint/js": "^10.0.1",
|
|
112
112
|
"@types/debug": "^4.1.13",
|
|
113
113
|
"@types/events": "^3.0.3",
|
|
114
|
-
"@types/node": "^
|
|
115
|
-
"eslint": "^10.
|
|
114
|
+
"@types/node": "^24.13.3",
|
|
115
|
+
"eslint": "^10.9.1",
|
|
116
116
|
"eslint-config-prettier": "^10.1.8",
|
|
117
|
-
"globals": "^17.
|
|
117
|
+
"globals": "^17.11.0",
|
|
118
118
|
"husky": "^9.1.7",
|
|
119
119
|
"lint-staged": "^17.3.0",
|
|
120
120
|
"prettier": "^3.9.6",
|
|
121
121
|
"tsdown": "^0.22.14",
|
|
122
|
-
"tsx": "^4.23.
|
|
122
|
+
"tsx": "^4.23.12",
|
|
123
123
|
"typescript": "^7.0.2",
|
|
124
|
-
"vitest": "^4.1.
|
|
124
|
+
"vitest": "^4.1.11"
|
|
125
125
|
},
|
|
126
126
|
"dependencies": {
|
|
127
127
|
"ajv": "^8.20.0",
|