@privateaim/telemetry-kit 0.8.23 → 0.8.26

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/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.26](https://github.com/PrivateAIM/hub/compare/v0.8.25...v0.8.26) (2026-02-11)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * devDependencies
10
+ * @privateaim/kit bumped from ^0.8.25 to ^0.8.26
11
+ * peerDependencies
12
+ * @privateaim/kit bumped from ^0.8.25 to ^0.8.26
13
+
14
+ ## [0.8.25](https://github.com/PrivateAIM/hub/compare/v0.8.24...v0.8.25) (2026-02-09)
15
+
16
+
17
+ ### Dependencies
18
+
19
+ * The following workspace dependencies were updated
20
+ * devDependencies
21
+ * @privateaim/kit bumped from ^0.8.24 to ^0.8.25
22
+ * peerDependencies
23
+ * @privateaim/kit bumped from ^0.8.24 to ^0.8.25
24
+
25
+ ## [0.8.24](https://github.com/PrivateAIM/hub/compare/v0.8.23...v0.8.24) (2026-02-09)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * time property in log validator ([3f54557](https://github.com/PrivateAIM/hub/commit/3f54557e9f444e29ec4a65a660ebfd0f7e76a909))
31
+
32
+
33
+ ### Dependencies
34
+
35
+ * The following workspace dependencies were updated
36
+ * devDependencies
37
+ * @privateaim/kit bumped from ^0.8.23 to ^0.8.24
38
+ * peerDependencies
39
+ * @privateaim/kit bumped from ^0.8.23 to ^0.8.24
40
+
3
41
  ## [0.8.23](https://github.com/PrivateAIM/hub/compare/v0.8.22...v0.8.23) (2026-02-02)
4
42
 
5
43
 
@@ -1 +1 @@
1
- {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/domains/log/validator.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,qBAAa,YAAa,SAAQ,SAAS,CAAC,QAAQ,CAAC;IACjD,SAAS,CAAC,UAAU;CAgEvB"}
1
+ {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/domains/log/validator.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,qBAAa,YAAa,SAAQ,SAAS,CAAC,QAAQ,CAAC;IACjD,SAAS,CAAC,UAAU;CA8DvB"}
package/dist/index.mjs CHANGED
@@ -192,7 +192,7 @@ class LogValidator extends Container {
192
192
  super.initialize();
193
193
  this.mount('time', {
194
194
  optional: true
195
- }, createValidator(zod.string().min(0).max(20).or(zod.bigint()).optional()));
195
+ }, createValidator(zod.iso.datetime().optional()));
196
196
  this.mount('message', createValidator(zod.string().min(3).max(4096)));
197
197
  this.mount('service', createValidator(zod.string().min(3).max(64)));
198
198
  // ----------------------------------------------
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/domains/base.ts","../src/domains/event/api.ts","../src/domains/event/validator.ts","../src/domains/log/api.ts","../src/domains/log/constants.ts","../src/domains/log/helpers.ts","../src/domains/log/validator.ts","../src/domains/constants.ts","../src/http/api-client/module.ts"],"sourcesContent":["/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { createClient, isClient } from 'hapic';\nimport type { Client, RequestBaseOptions } from 'hapic';\nimport type { BaseAPIContext } from './types-base';\n\nexport class BaseAPI {\n protected client! : Client;\n\n // -----------------------------------------------------------------------------------\n\n constructor(context?: BaseAPIContext) {\n context = context || {};\n\n this.setClient(context.client);\n }\n\n // -----------------------------------------------------------------------------------\n\n setClient(input?: Client | RequestBaseOptions) {\n this.client = isClient(input) ?\n input :\n createClient(input);\n }\n}\n","/*\n * Copyright (c) 2021-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { BuildInput } from 'rapiq';\nimport { buildQuery } from 'rapiq';\nimport type { Event } from './entity';\nimport type { CollectionResourceResponse, SingleResourceResponse } from '../types-base';\nimport { BaseAPI } from '../base';\n\nexport class EventAPI extends BaseAPI {\n async getMany(options?: BuildInput<Event>): Promise<CollectionResourceResponse<Event>> {\n const { data: response } = await this.client.get(`events${buildQuery(options)}`);\n return response;\n }\n\n async getOne(id: Event['id']): Promise<SingleResourceResponse<Event>> {\n const { data: response } = await this.client.get(`events/${id}`);\n\n return response;\n }\n\n async delete(id: Event['id']): Promise<SingleResourceResponse<Event>> {\n const { data: response } = await this.client.delete(`events/${id}`);\n\n return response;\n }\n\n async update(id: Event['id'], data: Partial<Event>): Promise<SingleResourceResponse<Event>> {\n const { data: response } = await this.client.post(`events/${id}`, data);\n\n return response;\n }\n\n async create(data: Partial<Event>): Promise<SingleResourceResponse<Event>> {\n const { data: response } = await this.client.post('events', data);\n\n return response;\n }\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport zod from 'zod';\nimport type { Event } from './entity';\n\nexport class EventValidator extends Container<Event> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'ref_type',\n createValidator(\n zod\n .string()\n .min(3)\n .max(128),\n ),\n );\n\n this.mount(\n 'ref_id',\n { optional: true },\n createValidator(\n zod\n .uuidv4()\n .nullable(),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'scope',\n createValidator(\n zod\n .string()\n .min(3)\n .max(128),\n ),\n );\n\n this.mount(\n 'name',\n createValidator(\n zod\n .string()\n .min(3)\n .max(128),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'data',\n { optional: true },\n createValidator(\n zod\n .record(zod.string(), zod.any())\n .nullable(),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'expiring',\n { optional: true },\n createValidator(\n zod\n .boolean()\n .nullable(),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'request_path',\n { optional: true },\n createValidator(zod.string().min(3).max(256).nullable()),\n );\n\n this.mount(\n 'request_method',\n { optional: true },\n createValidator(zod.string().min(3).max(10).nullable()),\n );\n\n this.mount(\n 'request_ip_address',\n { optional: true },\n createValidator(zod.ipv4().nullable()),\n );\n\n this.mount(\n 'request_user_agent',\n { optional: true },\n createValidator(zod.string().min(3).max(512).nullable()),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'actor_type',\n { optional: true },\n createValidator(zod.string().min(3).max(64).nullable()),\n );\n\n this.mount(\n 'actor_id',\n { optional: true },\n createValidator(zod.uuidv4().nullable()),\n );\n\n this.mount(\n 'actor_name',\n { optional: true },\n createValidator(zod.string().min(3).max(64).nullable()),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'realm_id',\n { optional: true },\n createValidator(zod.uuidv4().nullable()),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'expires_at',\n { optional: true },\n createValidator(\n zod.iso.datetime()\n .nullable(),\n ),\n );\n }\n}\n","/*\n * Copyright (c) 2021-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { BuildInput } from 'rapiq';\nimport { buildQuery } from 'rapiq';\nimport type { Log, LogInput } from './entity';\nimport type { CollectionResourceResponse, SingleResourceResponse } from '../types-base';\nimport { BaseAPI } from '../base';\n\nexport class LogAPI extends BaseAPI {\n async getMany(options?: BuildInput<Log>): Promise<CollectionResourceResponse<Log>> {\n const { data: response } = await this.client.get(`logs${buildQuery(options)}`);\n return response;\n }\n\n async deleteMany(options?: BuildInput<Log>): Promise<void> {\n await this.client.delete(`logs${buildQuery(options)}`);\n }\n\n async create(data: LogInput): Promise<SingleResourceResponse<Log>> {\n const { data: response } = await this.client.post('logs', data);\n\n return response;\n }\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum LogLevel {\n /**\n * indicates that the system is unusable\n * and requires immediate attention\n */\n EMERGENCE = 'emerg',\n\n /**\n * indicates that immediate action is necessary\n * to resolve a critical issue.\n */\n ALERT = 'alert',\n\n /**\n * signifies critical conditions in the program that demand\n * intervention to prevent system failure.\n */\n CRITICAL = 'crit',\n\n /**\n * indicates error conditions that impair\n * some operation but are less severe than critical situations.\n */\n ERROR = 'error',\n\n /**\n * signifies potential issues that may lead to errors\n * or unexpected behavior in the future if not addressed.\n */\n WARNING = 'warn',\n\n /**\n * applies to normal but significant\n * conditions that may require monitoring\n */\n NOTICE = 'notice',\n\n /**\n * includes messages that provide a record\n * of the normal operation of the system.\n */\n INFORMATIONAL = 'info',\n\n /**\n * intended for logging detailed information about the system\n * for debugging purposes.\n */\n DEBUG = 'debug',\n}\n\nexport enum LogLevelColor {\n EMERGENCE = '#8B0000',\n ALERT = '#FF0000',\n CRITICAL = '#FF4500',\n ERROR = '#FF6347',\n WARNING = '#FFD700',\n NOTICE = '#1E90FF',\n INFORMATIONAL = '#228B22',\n DEBUG = '#A9A9A9',\n}\n\nexport enum LogFlag {\n CHANNEL = 'channel',\n\n COMPONENT = 'component',\n\n SERVICE = 'service',\n\n LEVEL = 'level',\n\n REF_TYPE = 'ref_type',\n\n REF_ID = 'ref_id',\n}\n\nexport enum LogChannel {\n HTTP = 'http',\n WEBSOCKET = 'websocket',\n BACKGROUND = 'background',\n SYSTEM = 'system',\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { Log, LogInput } from './entity';\n\nexport function normalizeLogInput(input: LogInput) : Log {\n return {\n ...input,\n time: input.time || new Date().toISOString(),\n labels: input.labels || {},\n };\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport zod from 'zod';\nimport { LogChannel, LogLevel } from './constants';\nimport type { LogInput } from './entity';\n\nexport class LogValidator extends Container<LogInput> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'time',\n { optional: true },\n createValidator(\n zod\n .string()\n .min(0)\n .max(20)\n .or(zod.bigint())\n .optional(),\n ),\n );\n\n this.mount(\n 'message',\n createValidator(\n zod\n .string()\n .min(3)\n .max(4096),\n ),\n );\n\n this.mount(\n 'service',\n createValidator(\n zod\n .string()\n .min(3)\n .max(64),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'level',\n createValidator(\n zod\n .enum(Object.values(LogLevel)),\n ),\n );\n\n this.mount(\n 'channel',\n createValidator(\n zod\n .enum(Object.values(LogChannel)),\n ),\n );\n\n this.mount(\n 'labels',\n { optional: true },\n createValidator(\n zod\n .record(zod.string(), zod.string())\n .nullable(),\n ),\n );\n }\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum DomainType {\n EVENT = 'event',\n LOG = 'log',\n}\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { RequestBaseOptions } from 'hapic';\nimport { Client, HookName, isClientError } from 'hapic';\nimport {\n EventAPI,\n LogAPI,\n} from '../../domains';\n\nexport class APIClient extends Client {\n public readonly event : EventAPI;\n\n public readonly log : LogAPI;\n\n constructor(config: RequestBaseOptions) {\n super(config);\n\n this.event = new EventAPI({ client: this });\n this.log = new LogAPI({ client: this });\n\n this.on(HookName.RESPONSE_ERROR, ((error) => {\n if (\n isClientError(error) &&\n error.response &&\n error.response.data &&\n typeof error.response.data.message === 'string'\n ) {\n error.message = error.response.data.message;\n }\n\n throw error;\n }));\n }\n}\n"],"names":["BaseAPI","client","context","setClient","input","isClient","createClient","EventAPI","getMany","options","data","response","get","buildQuery","getOne","id","delete","update","post","create","EventValidator","Container","initialize","mount","createValidator","zod","string","min","max","optional","uuidv4","nullable","record","any","boolean","ipv4","iso","datetime","LogAPI","deleteMany","LogLevel","LogLevelColor","LogFlag","LogChannel","normalizeLogInput","time","Date","toISOString","labels","LogValidator","or","bigint","enum","Object","values","DomainType","APIClient","Client","event","log","config","on","HookName","RESPONSE_ERROR","error","isClientError","message"],"mappings":";;;;;;AAWO,MAAMA,OAAAA,CAAAA;IACCC,MAAAA;;AAIV,IAAA,WAAA,CAAYC,OAAwB,CAAE;AAClCA,QAAAA,OAAAA,GAAUA,WAAW,EAAC;AAEtB,QAAA,IAAI,CAACC,SAAS,CAACD,OAAAA,CAAQD,MAAM,CAAA;AACjC,IAAA;;AAIAE,IAAAA,SAAAA,CAAUC,KAAmC,EAAE;AAC3C,QAAA,IAAI,CAACH,MAAM,GAAGI,QAAAA,CAASD,KAAAA,CAAAA,GACnBA,QACAE,YAAAA,CAAaF,KAAAA,CAAAA;AACrB,IAAA;AACJ;;AChBO,MAAMG,QAAAA,SAAiBP,OAAAA,CAAAA;IAC1B,MAAMQ,OAAAA,CAAQC,OAA2B,EAA8C;AACnF,QAAA,MAAM,EAAEC,IAAAA,EAAMC,QAAQ,EAAE,GAAG,MAAM,IAAI,CAACV,MAAM,CAACW,GAAG,CAAC,CAAC,MAAM,EAAEC,WAAWJ,OAAAA,CAAAA,CAAAA,CAAU,CAAA;QAC/E,OAAOE,QAAAA;AACX,IAAA;IAEA,MAAMG,MAAAA,CAAOC,EAAe,EAA0C;AAClE,QAAA,MAAM,EAAEL,IAAAA,EAAMC,QAAQ,EAAE,GAAG,MAAM,IAAI,CAACV,MAAM,CAACW,GAAG,CAAC,CAAC,OAAO,EAAEG,EAAAA,CAAAA,C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AA,CAAA;AACJ,IAAA;AACJ;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/domains/base.ts","../src/domains/event/api.ts","../src/domains/event/validator.ts","../src/domains/log/api.ts","../src/domains/log/constants.ts","../src/domains/log/helpers.ts","../src/domains/log/validator.ts","../src/domains/constants.ts","../src/http/api-client/module.ts"],"sourcesContent":["/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { createClient, isClient } from 'hapic';\nimport type { Client, RequestBaseOptions } from 'hapic';\nimport type { BaseAPIContext } from './types-base';\n\nexport class BaseAPI {\n protected client! : Client;\n\n // -----------------------------------------------------------------------------------\n\n constructor(context?: BaseAPIContext) {\n context = context || {};\n\n this.setClient(context.client);\n }\n\n // -----------------------------------------------------------------------------------\n\n setClient(input?: Client | RequestBaseOptions) {\n this.client = isClient(input) ?\n input :\n createClient(input);\n }\n}\n","/*\n * Copyright (c) 2021-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { BuildInput } from 'rapiq';\nimport { buildQuery } from 'rapiq';\nimport type { Event } from './entity';\nimport type { CollectionResourceResponse, SingleResourceResponse } from '../types-base';\nimport { BaseAPI } from '../base';\n\nexport class EventAPI extends BaseAPI {\n async getMany(options?: BuildInput<Event>): Promise<CollectionResourceResponse<Event>> {\n const { data: response } = await this.client.get(`events${buildQuery(options)}`);\n return response;\n }\n\n async getOne(id: Event['id']): Promise<SingleResourceResponse<Event>> {\n const { data: response } = await this.client.get(`events/${id}`);\n\n return response;\n }\n\n async delete(id: Event['id']): Promise<SingleResourceResponse<Event>> {\n const { data: response } = await this.client.delete(`events/${id}`);\n\n return response;\n }\n\n async update(id: Event['id'], data: Partial<Event>): Promise<SingleResourceResponse<Event>> {\n const { data: response } = await this.client.post(`events/${id}`, data);\n\n return response;\n }\n\n async create(data: Partial<Event>): Promise<SingleResourceResponse<Event>> {\n const { data: response } = await this.client.post('events', data);\n\n return response;\n }\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport zod from 'zod';\nimport type { Event } from './entity';\n\nexport class EventValidator extends Container<Event> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'ref_type',\n createValidator(\n zod\n .string()\n .min(3)\n .max(128),\n ),\n );\n\n this.mount(\n 'ref_id',\n { optional: true },\n createValidator(\n zod\n .uuidv4()\n .nullable(),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'scope',\n createValidator(\n zod\n .string()\n .min(3)\n .max(128),\n ),\n );\n\n this.mount(\n 'name',\n createValidator(\n zod\n .string()\n .min(3)\n .max(128),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'data',\n { optional: true },\n createValidator(\n zod\n .record(zod.string(), zod.any())\n .nullable(),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'expiring',\n { optional: true },\n createValidator(\n zod\n .boolean()\n .nullable(),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'request_path',\n { optional: true },\n createValidator(zod.string().min(3).max(256).nullable()),\n );\n\n this.mount(\n 'request_method',\n { optional: true },\n createValidator(zod.string().min(3).max(10).nullable()),\n );\n\n this.mount(\n 'request_ip_address',\n { optional: true },\n createValidator(zod.ipv4().nullable()),\n );\n\n this.mount(\n 'request_user_agent',\n { optional: true },\n createValidator(zod.string().min(3).max(512).nullable()),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'actor_type',\n { optional: true },\n createValidator(zod.string().min(3).max(64).nullable()),\n );\n\n this.mount(\n 'actor_id',\n { optional: true },\n createValidator(zod.uuidv4().nullable()),\n );\n\n this.mount(\n 'actor_name',\n { optional: true },\n createValidator(zod.string().min(3).max(64).nullable()),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'realm_id',\n { optional: true },\n createValidator(zod.uuidv4().nullable()),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'expires_at',\n { optional: true },\n createValidator(\n zod.iso.datetime()\n .nullable(),\n ),\n );\n }\n}\n","/*\n * Copyright (c) 2021-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { BuildInput } from 'rapiq';\nimport { buildQuery } from 'rapiq';\nimport type { Log, LogInput } from './entity';\nimport type { CollectionResourceResponse, SingleResourceResponse } from '../types-base';\nimport { BaseAPI } from '../base';\n\nexport class LogAPI extends BaseAPI {\n async getMany(options?: BuildInput<Log>): Promise<CollectionResourceResponse<Log>> {\n const { data: response } = await this.client.get(`logs${buildQuery(options)}`);\n return response;\n }\n\n async deleteMany(options?: BuildInput<Log>): Promise<void> {\n await this.client.delete(`logs${buildQuery(options)}`);\n }\n\n async create(data: LogInput): Promise<SingleResourceResponse<Log>> {\n const { data: response } = await this.client.post('logs', data);\n\n return response;\n }\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum LogLevel {\n /**\n * indicates that the system is unusable\n * and requires immediate attention\n */\n EMERGENCE = 'emerg',\n\n /**\n * indicates that immediate action is necessary\n * to resolve a critical issue.\n */\n ALERT = 'alert',\n\n /**\n * signifies critical conditions in the program that demand\n * intervention to prevent system failure.\n */\n CRITICAL = 'crit',\n\n /**\n * indicates error conditions that impair\n * some operation but are less severe than critical situations.\n */\n ERROR = 'error',\n\n /**\n * signifies potential issues that may lead to errors\n * or unexpected behavior in the future if not addressed.\n */\n WARNING = 'warn',\n\n /**\n * applies to normal but significant\n * conditions that may require monitoring\n */\n NOTICE = 'notice',\n\n /**\n * includes messages that provide a record\n * of the normal operation of the system.\n */\n INFORMATIONAL = 'info',\n\n /**\n * intended for logging detailed information about the system\n * for debugging purposes.\n */\n DEBUG = 'debug',\n}\n\nexport enum LogLevelColor {\n EMERGENCE = '#8B0000',\n ALERT = '#FF0000',\n CRITICAL = '#FF4500',\n ERROR = '#FF6347',\n WARNING = '#FFD700',\n NOTICE = '#1E90FF',\n INFORMATIONAL = '#228B22',\n DEBUG = '#A9A9A9',\n}\n\nexport enum LogFlag {\n CHANNEL = 'channel',\n\n COMPONENT = 'component',\n\n SERVICE = 'service',\n\n LEVEL = 'level',\n\n REF_TYPE = 'ref_type',\n\n REF_ID = 'ref_id',\n}\n\nexport enum LogChannel {\n HTTP = 'http',\n WEBSOCKET = 'websocket',\n BACKGROUND = 'background',\n SYSTEM = 'system',\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { Log, LogInput } from './entity';\n\nexport function normalizeLogInput(input: LogInput) : Log {\n return {\n ...input,\n time: input.time || new Date().toISOString(),\n labels: input.labels || {},\n };\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport zod from 'zod';\nimport { LogChannel, LogLevel } from './constants';\nimport type { LogInput } from './entity';\n\nexport class LogValidator extends Container<LogInput> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'time',\n { optional: true },\n createValidator(\n zod\n .iso\n .datetime()\n .optional(),\n ),\n );\n\n this.mount(\n 'message',\n createValidator(\n zod\n .string()\n .min(3)\n .max(4096),\n ),\n );\n\n this.mount(\n 'service',\n createValidator(\n zod\n .string()\n .min(3)\n .max(64),\n ),\n );\n\n // ----------------------------------------------\n\n this.mount(\n 'level',\n createValidator(\n zod\n .enum(Object.values(LogLevel)),\n ),\n );\n\n this.mount(\n 'channel',\n createValidator(\n zod\n .enum(Object.values(LogChannel)),\n ),\n );\n\n this.mount(\n 'labels',\n { optional: true },\n createValidator(\n zod\n .record(zod.string(), zod.string())\n .nullable(),\n ),\n );\n }\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum DomainType {\n EVENT = 'event',\n LOG = 'log',\n}\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { RequestBaseOptions } from 'hapic';\nimport { Client, HookName, isClientError } from 'hapic';\nimport {\n EventAPI,\n LogAPI,\n} from '../../domains';\n\nexport class APIClient extends Client {\n public readonly event : EventAPI;\n\n public readonly log : LogAPI;\n\n constructor(config: RequestBaseOptions) {\n super(config);\n\n this.event = new EventAPI({ client: this });\n this.log = new LogAPI({ client: this });\n\n this.on(HookName.RESPONSE_ERROR, ((error) => {\n if (\n isClientError(error) &&\n error.response &&\n error.response.data &&\n typeof error.response.data.message === 'string'\n ) {\n error.message = error.response.data.message;\n }\n\n throw error;\n }));\n }\n}\n"],"names":["BaseAPI","client","context","setClient","input","isClient","createClient","EventAPI","getMany","options","data","response","get","buildQuery","getOne","id","delete","update","post","create","EventValidator","Container","initialize","mount","createValidator","zod","string","min","max","optional","uuidv4","nullable","record","any","boolean","ipv4","iso","datetime","LogAPI","deleteMany","LogLevel","LogLevelColor","LogFlag","LogChannel","normalizeLogInput","time","Date","toISOString","labels","LogValidator","enum","Object","values","DomainType","APIClient","Client","event","log","config","on","HookName","RESPONSE_ERROR","error","isClientError","message"],"mappings":";;;;;;AAWO,MAAMA,OAAAA,CAAAA;IACCC,MAAAA;;AAIV,IAAA,WAAA,CAAYC,OAAwB,CAAE;AAClCA,QAAAA,OAAAA,GAAUA,WAAW,EAAC;AAEtB,QAAA,IAAI,CAACC,SAAS,CAACD,OAAAA,CAAQD,MAAM,CAAA;AACjC,IAAA;;AAIAE,IAAAA,SAAAA,CAAUC,KAAmC,EAAE;AAC3C,QAAA,IAAI,CA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G,IAAInB,MAAAA,CAAO;AAAErC,YAAAA,MAAAA,EAAQ;AAAK,SAAA,CAAA;AAErC,QAAA,IAAI,CAAC0D,EAAE,CAACC,QAAAA,CAASC,cAAc,EAAG,CAACC,KAAAA,GAAAA;AAC/B,YAAA,IACIC,cAAcD,KAAAA,CAAAA,IACdA,KAAAA,CAAMnD,QAAQ,IACdmD,KAAAA,CAAMnD,QAAQ,CAACD,IAAI,IACnB,OAAOoD,MAAMnD,QAAQ,CAACD,IAAI,CAACsD,OAAO,KAAK,QAAA,EACzC;AACEF,gBAAAA,KAAAA,CAAME,OAAO,GAAGF,KAAAA,CAAMnD,QAAQ,CAACD,IAAI,CAACsD,OAAO;AAC/C,YAAA;YAEA,MAAMF,KAAAA;AACV,QAAA,CAAA,CAAA;AACJ,IAAA;AACJ;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@privateaim/telemetry-kit",
3
3
  "type": "module",
4
- "version": "0.8.23",
4
+ "version": "0.8.26",
5
5
  "license": "Apache-2.0",
6
6
  "description": "",
7
7
  "module": "./dist/index.mjs",
@@ -26,14 +26,14 @@
26
26
  "devDependencies": {
27
27
  "@authup/kit": "^1.0.0-beta.28",
28
28
  "@authup/core-kit": "^1.0.0-beta.28",
29
- "@privateaim/kit": "^0.8.23",
29
+ "@privateaim/kit": "^0.8.26",
30
30
  "hapic": "^2.7.0",
31
31
  "rapiq": "^0.9.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@authup/kit": "^1.0.0-beta.28",
35
35
  "@authup/core-kit": "^1.0.0-beta.28",
36
- "@privateaim/kit": "^0.8.23",
36
+ "@privateaim/kit": "^0.8.26",
37
37
  "hapic": "^2.7.0",
38
38
  "rapiq": "^0.9.0"
39
39
  },
@@ -20,10 +20,8 @@ export class LogValidator extends Container<LogInput> {
20
20
  { optional: true },
21
21
  createValidator(
22
22
  zod
23
- .string()
24
- .min(0)
25
- .max(20)
26
- .or(zod.bigint())
23
+ .iso
24
+ .datetime()
27
25
  .optional(),
28
26
  ),
29
27
  );