@touhidrahman/auditlog-sdk 1.0.3 → 1.1.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.
@@ -1,120 +1,745 @@
1
- import type { Auth } from '../core/auth.gen';
2
- import type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';
3
- import type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';
4
- import type { Middleware } from './utils.gen';
5
- export type ResponseStyle = 'data' | 'fields';
6
- export interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {
7
- /**
8
- * Base URL for all requests made by this client.
9
- */
10
- baseUrl?: T['baseUrl'];
11
- /**
12
- * Fetch API implementation. You can use this option to provide a custom
13
- * fetch instance.
14
- *
15
- * @default globalThis.fetch
16
- */
17
- fetch?: typeof fetch;
18
- /**
19
- * Please don't use the Fetch client for Next.js applications. The `next`
20
- * options won't have any effect.
21
- *
22
- * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
23
- */
24
- next?: never;
25
- /**
26
- * Return the response data parsed in a specified format. By default, `auto`
27
- * will infer the appropriate method from the `Content-Type` response header.
28
- * You can override this behavior with any of the {@link Body} methods.
29
- * Select `stream` if you don't want to parse response data at all.
30
- *
31
- * @default 'auto'
32
- */
33
- parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
34
- /**
35
- * Should we return only data or multiple fields (data, error, response, etc.)?
36
- *
37
- * @default 'fields'
38
- */
39
- responseStyle?: ResponseStyle;
40
- /**
41
- * Throw an error instead of returning it in the response?
42
- *
43
- * @default false
44
- */
45
- throwOnError?: T['throwOnError'];
46
- }
47
- export interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
48
- responseStyle: TResponseStyle;
49
- throwOnError: ThrowOnError;
50
- }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
51
- /**
52
- * Any body that you want to add to your request.
53
- *
54
- * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
55
- */
56
- body?: unknown;
57
- path?: Record<string, unknown>;
58
- query?: Record<string, unknown>;
59
- /**
60
- * Security mechanism(s) to use for the request.
61
- */
62
- security?: ReadonlyArray<Auth>;
63
- url: Url;
64
- }
65
- export interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
66
- headers: Headers;
67
- serializedBody?: string;
68
- }
69
- export type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
70
- data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
71
- request: Request;
72
- response: Response;
73
- }> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
74
- data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
75
- error: undefined;
76
- } | {
77
- data: undefined;
78
- error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
79
- }) & {
80
- /** request may be undefined, because error may be from building the request object itself */
81
- request?: Request;
82
- /** response may be undefined, because error may be from building the request object itself or from a network error */
83
- response?: Response;
84
- }>;
85
- export interface ClientOptions {
86
- baseUrl?: string;
87
- responseStyle?: ResponseStyle;
88
- throwOnError?: boolean;
89
- }
90
- type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
91
- type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
92
- type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
93
- type BuildUrlFn = <TData extends {
94
- body?: unknown;
95
- path?: Record<string, unknown>;
96
- query?: Record<string, unknown>;
97
- url: string;
98
- }>(options: TData & Options<TData>) => string;
99
- export type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
100
- interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
101
- };
102
- /**
103
- * The `createClientConfig()` function will be called on client initialization
104
- * and the returned object will become the client's initial configuration.
105
- *
106
- * You may want to initialize your client this way instead of calling
107
- * `setConfig()`. This is useful for example if you're using Next.js
108
- * to ensure your client always has the correct values.
109
- */
110
- export type CreateClientConfig<T extends ClientOptions = ClientOptions> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
111
- export interface TDataShape {
112
- body?: unknown;
113
- headers?: unknown;
114
- path?: unknown;
115
- query?: unknown;
116
- url: string;
117
- }
118
- type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
119
- export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
120
- export {};
1
+ export type ClientOptions = {
2
+ baseUrl: 'https://auditlog-api.mattrika.com' | (string & {});
3
+ };
4
+ export type GetData = {
5
+ body?: never;
6
+ path?: never;
7
+ query?: never;
8
+ url: '/';
9
+ };
10
+ export type GetResponses = {
11
+ /**
12
+ * Server running
13
+ */
14
+ 200: {
15
+ data: {
16
+ port: number;
17
+ };
18
+ message: string;
19
+ success: boolean;
20
+ error?: unknown;
21
+ meta?: unknown;
22
+ };
23
+ };
24
+ export type GetResponse = GetResponses[keyof GetResponses];
25
+ export type PostAdminNewTokenData = {
26
+ /**
27
+ * Refresh token
28
+ */
29
+ body: {
30
+ refreshToken: string;
31
+ };
32
+ path?: never;
33
+ query?: never;
34
+ url: '/admin/new-token';
35
+ };
36
+ export type PostAdminNewTokenResponses = {
37
+ /**
38
+ * User logged in successfully
39
+ */
40
+ 200: {
41
+ data: {
42
+ accessToken: string;
43
+ refreshToken: string;
44
+ lastLogin?: Date;
45
+ };
46
+ message: string;
47
+ success: boolean;
48
+ error?: unknown;
49
+ meta?: unknown;
50
+ };
51
+ };
52
+ export type PostAdminNewTokenResponse = PostAdminNewTokenResponses[keyof PostAdminNewTokenResponses];
53
+ export type PostAdminLoginData = {
54
+ /**
55
+ * Admin Login Data
56
+ */
57
+ body: {
58
+ password: string;
59
+ };
60
+ path?: never;
61
+ query?: never;
62
+ url: '/admin/login';
63
+ };
64
+ export type PostAdminLoginResponses = {
65
+ /**
66
+ * Admin logged in successfully
67
+ */
68
+ 200: {
69
+ data: {
70
+ accessToken: string;
71
+ refreshToken: string;
72
+ lastLogin?: Date;
73
+ };
74
+ message: string;
75
+ success: boolean;
76
+ error?: unknown;
77
+ meta?: unknown;
78
+ };
79
+ };
80
+ export type PostAdminLoginResponse = PostAdminLoginResponses[keyof PostAdminLoginResponses];
81
+ export type GetProjectsData = {
82
+ body?: never;
83
+ path?: never;
84
+ query?: {
85
+ id?: string;
86
+ name?: string;
87
+ icon?: string | null;
88
+ color?: string | null;
89
+ createdAt?: Date | null;
90
+ updatedAt?: Date | null;
91
+ search?: string;
92
+ ids?: Array<string>;
93
+ orderBy?: string;
94
+ sortOrder?: 'asc' | 'desc';
95
+ page?: number;
96
+ size?: number;
97
+ };
98
+ url: '/projects';
99
+ };
100
+ export type GetProjectsResponses = {
101
+ /**
102
+ * Project List
103
+ */
104
+ 200: {
105
+ data: Array<{
106
+ id: string;
107
+ name: string;
108
+ icon: string | null;
109
+ color: string | null;
110
+ createdAt: Date | null;
111
+ updatedAt: Date | null;
112
+ }>;
113
+ message: string;
114
+ success: boolean;
115
+ error?: unknown;
116
+ meta?: unknown;
117
+ pagination: {
118
+ page: number;
119
+ size: number;
120
+ totalItems: number;
121
+ totalPages: number;
122
+ };
123
+ };
124
+ };
125
+ export type GetProjectsResponse = GetProjectsResponses[keyof GetProjectsResponses];
126
+ export type PostProjectsData = {
127
+ /**
128
+ * Input
129
+ */
130
+ body?: {
131
+ id?: string;
132
+ name: string;
133
+ icon?: string | null;
134
+ color?: string | null;
135
+ createdAt?: Date | null;
136
+ updatedAt?: Date | null;
137
+ };
138
+ path?: never;
139
+ query?: never;
140
+ url: '/projects';
141
+ };
142
+ export type PostProjectsResponses = {
143
+ /**
144
+ * Item
145
+ */
146
+ 200: {
147
+ data: {
148
+ id: string;
149
+ name: string;
150
+ icon: string | null;
151
+ color: string | null;
152
+ createdAt: Date | null;
153
+ updatedAt: Date | null;
154
+ };
155
+ message: string;
156
+ success: boolean;
157
+ error?: unknown;
158
+ meta?: unknown;
159
+ };
160
+ };
161
+ export type PostProjectsResponse = PostProjectsResponses[keyof PostProjectsResponses];
162
+ export type DeleteProjectsByProjectIdData = {
163
+ body?: never;
164
+ path: {
165
+ projectId: string;
166
+ };
167
+ query?: never;
168
+ url: '/projects/{projectId}';
169
+ };
170
+ export type DeleteProjectsByProjectIdResponses = {
171
+ /**
172
+ * Deleted Project
173
+ */
174
+ 200: {
175
+ data: {
176
+ id: string;
177
+ name: string;
178
+ icon: string | null;
179
+ color: string | null;
180
+ createdAt: Date | null;
181
+ updatedAt: Date | null;
182
+ };
183
+ message: string;
184
+ success: boolean;
185
+ error?: unknown;
186
+ meta?: unknown;
187
+ };
188
+ };
189
+ export type DeleteProjectsByProjectIdResponse = DeleteProjectsByProjectIdResponses[keyof DeleteProjectsByProjectIdResponses];
190
+ export type GetProjectsByProjectIdData = {
191
+ body?: never;
192
+ path: {
193
+ projectId: string;
194
+ };
195
+ query?: never;
196
+ url: '/projects/{projectId}';
197
+ };
198
+ export type GetProjectsByProjectIdResponses = {
199
+ /**
200
+ * Item
201
+ */
202
+ 200: {
203
+ data: {
204
+ id: string;
205
+ name: string;
206
+ icon: string | null;
207
+ color: string | null;
208
+ createdAt: Date | null;
209
+ updatedAt: Date | null;
210
+ };
211
+ message: string;
212
+ success: boolean;
213
+ error?: unknown;
214
+ meta?: unknown;
215
+ };
216
+ };
217
+ export type GetProjectsByProjectIdResponse = GetProjectsByProjectIdResponses[keyof GetProjectsByProjectIdResponses];
218
+ export type PutProjectsByProjectIdData = {
219
+ /**
220
+ * Input
221
+ */
222
+ body?: {
223
+ id?: string;
224
+ name?: string;
225
+ icon?: string | null;
226
+ color?: string | null;
227
+ createdAt?: Date | null;
228
+ updatedAt?: Date | null;
229
+ };
230
+ path: {
231
+ projectId: string;
232
+ };
233
+ query?: never;
234
+ url: '/projects/{projectId}';
235
+ };
236
+ export type PutProjectsByProjectIdResponses = {
237
+ /**
238
+ * Item
239
+ */
240
+ 200: {
241
+ data: {
242
+ id: string;
243
+ name: string;
244
+ icon: string | null;
245
+ color: string | null;
246
+ createdAt: Date | null;
247
+ updatedAt: Date | null;
248
+ };
249
+ message: string;
250
+ success: boolean;
251
+ error?: unknown;
252
+ meta?: unknown;
253
+ };
254
+ };
255
+ export type PutProjectsByProjectIdResponse = PutProjectsByProjectIdResponses[keyof PutProjectsByProjectIdResponses];
256
+ export type PutProjectsByProjectIdChangeIdData = {
257
+ /**
258
+ * New Project ID payload
259
+ */
260
+ body?: {
261
+ newId: string;
262
+ };
263
+ path: {
264
+ projectId: string;
265
+ };
266
+ query?: never;
267
+ url: '/projects/{projectId}/change-id';
268
+ };
269
+ export type PutProjectsByProjectIdChangeIdResponses = {
270
+ /**
271
+ * Updated Project ID
272
+ */
273
+ 200: {
274
+ data: {
275
+ id: string;
276
+ };
277
+ message: string;
278
+ success: boolean;
279
+ error?: unknown;
280
+ meta?: unknown;
281
+ };
282
+ };
283
+ export type PutProjectsByProjectIdChangeIdResponse = PutProjectsByProjectIdChangeIdResponses[keyof PutProjectsByProjectIdChangeIdResponses];
284
+ export type GetSecretKeysData = {
285
+ body?: never;
286
+ path?: never;
287
+ query?: {
288
+ id?: string;
289
+ projectId?: string;
290
+ secretHash?: string;
291
+ expiresAt?: Date | null;
292
+ createdAt?: Date | null;
293
+ search?: string;
294
+ ids?: Array<string>;
295
+ orderBy?: string;
296
+ sortOrder?: 'asc' | 'desc';
297
+ page?: number;
298
+ size?: number;
299
+ };
300
+ url: '/secret-keys';
301
+ };
302
+ export type GetSecretKeysResponses = {
303
+ /**
304
+ * SecretKey List
305
+ */
306
+ 200: {
307
+ data: Array<{
308
+ id: string;
309
+ projectId: string;
310
+ expiresAt: Date | null;
311
+ createdAt: Date | null;
312
+ }>;
313
+ message: string;
314
+ success: boolean;
315
+ error?: unknown;
316
+ meta?: unknown;
317
+ pagination: {
318
+ page: number;
319
+ size: number;
320
+ totalItems: number;
321
+ totalPages: number;
322
+ };
323
+ };
324
+ };
325
+ export type GetSecretKeysResponse = GetSecretKeysResponses[keyof GetSecretKeysResponses];
326
+ export type PostSecretKeysData = {
327
+ /**
328
+ * Input
329
+ */
330
+ body?: {
331
+ expiresAt?: Date | null;
332
+ };
333
+ path?: never;
334
+ query?: never;
335
+ url: '/secret-keys';
336
+ };
337
+ export type PostSecretKeysResponses = {
338
+ /**
339
+ * Item
340
+ */
341
+ 200: {
342
+ data: {
343
+ id: string;
344
+ projectId: string;
345
+ expiresAt: Date | null;
346
+ createdAt: Date | null;
347
+ secretKey: string;
348
+ };
349
+ message: string;
350
+ success: boolean;
351
+ error?: unknown;
352
+ meta?: unknown;
353
+ };
354
+ };
355
+ export type PostSecretKeysResponse = PostSecretKeysResponses[keyof PostSecretKeysResponses];
356
+ export type DeleteSecretKeysByIdData = {
357
+ body?: never;
358
+ path: {
359
+ id: string;
360
+ };
361
+ query?: never;
362
+ url: '/secret-keys/{id}';
363
+ };
364
+ export type DeleteSecretKeysByIdResponses = {
365
+ /**
366
+ * Deleted SecretKey
367
+ */
368
+ 200: {
369
+ data: {
370
+ id: string;
371
+ projectId: string;
372
+ secretHash: string;
373
+ expiresAt: Date | null;
374
+ createdAt: Date | null;
375
+ };
376
+ message: string;
377
+ success: boolean;
378
+ error?: unknown;
379
+ meta?: unknown;
380
+ };
381
+ };
382
+ export type DeleteSecretKeysByIdResponse = DeleteSecretKeysByIdResponses[keyof DeleteSecretKeysByIdResponses];
383
+ export type GetSecretKeysByIdData = {
384
+ body?: never;
385
+ path: {
386
+ id: string;
387
+ };
388
+ query?: never;
389
+ url: '/secret-keys/{id}';
390
+ };
391
+ export type GetSecretKeysByIdResponses = {
392
+ /**
393
+ * Item
394
+ */
395
+ 200: {
396
+ data: {
397
+ id: string;
398
+ projectId: string;
399
+ expiresAt: Date | null;
400
+ createdAt: Date | null;
401
+ };
402
+ message: string;
403
+ success: boolean;
404
+ error?: unknown;
405
+ meta?: unknown;
406
+ };
407
+ };
408
+ export type GetSecretKeysByIdResponse = GetSecretKeysByIdResponses[keyof GetSecretKeysByIdResponses];
409
+ export type GetLogsData = {
410
+ body?: never;
411
+ path?: never;
412
+ query?: {
413
+ id?: string;
414
+ entity?: string;
415
+ entityId?: string;
416
+ creatorId?: string | null;
417
+ creatorName?: string | null;
418
+ projectId?: string;
419
+ referenceName?: string | null;
420
+ referenceId?: string | null;
421
+ action?: 'create' | 'update' | 'delete';
422
+ previousData?: string | number | boolean | unknown | {
423
+ [key: string]: unknown;
424
+ } | Array<unknown>;
425
+ updatedData?: string | number | boolean | unknown | {
426
+ [key: string]: unknown;
427
+ } | Array<unknown>;
428
+ createdAt?: Date | null;
429
+ updatedAt?: Date | null;
430
+ search?: string;
431
+ ids?: Array<string>;
432
+ orderBy?: string;
433
+ sortOrder?: 'asc' | 'desc';
434
+ page?: number;
435
+ size?: number;
436
+ searchField?: string;
437
+ dateFrom?: string;
438
+ dateTo?: string;
439
+ };
440
+ url: '/logs';
441
+ };
442
+ export type GetLogsResponses = {
443
+ /**
444
+ * List of logs
445
+ */
446
+ 200: {
447
+ data: Array<{
448
+ id?: string;
449
+ entity?: string;
450
+ entityId?: string;
451
+ creatorId?: string | null;
452
+ creatorName?: string | null;
453
+ projectId?: string;
454
+ referenceName?: string | null;
455
+ referenceId?: string | null;
456
+ action?: 'create' | 'update' | 'delete';
457
+ previousData?: string | number | boolean | unknown | {
458
+ [key: string]: unknown;
459
+ } | Array<unknown>;
460
+ updatedData?: string | number | boolean | unknown | {
461
+ [key: string]: unknown;
462
+ } | Array<unknown>;
463
+ createdAt?: Date | null;
464
+ updatedAt?: Date | null;
465
+ }>;
466
+ message: string;
467
+ success: boolean;
468
+ error?: unknown;
469
+ meta?: unknown;
470
+ pagination: {
471
+ page: number;
472
+ size: number;
473
+ totalItems: number;
474
+ totalPages: number;
475
+ };
476
+ };
477
+ };
478
+ export type GetLogsResponse = GetLogsResponses[keyof GetLogsResponses];
479
+ export type PostLogsData = {
480
+ /**
481
+ * Log details
482
+ */
483
+ body?: {
484
+ id?: string;
485
+ entity: string;
486
+ entityId: string;
487
+ creatorId?: string | null;
488
+ creatorName?: string | null;
489
+ projectId: string;
490
+ referenceName?: string | null;
491
+ referenceId?: string | null;
492
+ action: 'create' | 'update' | 'delete';
493
+ previousData?: string | number | boolean | unknown | {
494
+ [key: string]: unknown;
495
+ } | Array<unknown>;
496
+ updatedData?: string | number | boolean | unknown | {
497
+ [key: string]: unknown;
498
+ } | Array<unknown>;
499
+ createdAt?: Date | null;
500
+ updatedAt?: Date | null;
501
+ };
502
+ path?: never;
503
+ query?: never;
504
+ url: '/logs';
505
+ };
506
+ export type PostLogsErrors = {
507
+ /**
508
+ * Invalid log data
509
+ */
510
+ 400: {
511
+ data: {
512
+ [key: string]: unknown;
513
+ };
514
+ message: string;
515
+ success: boolean;
516
+ error?: unknown;
517
+ meta?: unknown;
518
+ };
519
+ /**
520
+ * Internal server error
521
+ */
522
+ 500: {
523
+ data: {
524
+ [key: string]: unknown;
525
+ };
526
+ message: string;
527
+ success: boolean;
528
+ error?: unknown;
529
+ meta?: unknown;
530
+ };
531
+ };
532
+ export type PostLogsError = PostLogsErrors[keyof PostLogsErrors];
533
+ export type PostLogsResponses = {
534
+ /**
535
+ * Log created successfully
536
+ */
537
+ 201: {
538
+ data: {
539
+ id?: string;
540
+ entity?: string;
541
+ entityId?: string;
542
+ creatorId?: string | null;
543
+ creatorName?: string | null;
544
+ projectId?: string;
545
+ referenceName?: string | null;
546
+ referenceId?: string | null;
547
+ action?: 'create' | 'update' | 'delete';
548
+ previousData?: string | number | boolean | unknown | {
549
+ [key: string]: unknown;
550
+ } | Array<unknown>;
551
+ updatedData?: string | number | boolean | unknown | {
552
+ [key: string]: unknown;
553
+ } | Array<unknown>;
554
+ createdAt?: Date | null;
555
+ updatedAt?: Date | null;
556
+ };
557
+ message: string;
558
+ success: boolean;
559
+ error?: unknown;
560
+ meta?: unknown;
561
+ };
562
+ };
563
+ export type PostLogsResponse = PostLogsResponses[keyof PostLogsResponses];
564
+ export type GetLogsExportCsvData = {
565
+ body?: never;
566
+ path?: never;
567
+ query?: {
568
+ id?: string;
569
+ entity?: string;
570
+ entityId?: string;
571
+ creatorId?: string | null;
572
+ creatorName?: string | null;
573
+ projectId?: string;
574
+ referenceName?: string | null;
575
+ referenceId?: string | null;
576
+ action?: 'create' | 'update' | 'delete';
577
+ previousData?: string | number | boolean | unknown | {
578
+ [key: string]: unknown;
579
+ } | Array<unknown>;
580
+ updatedData?: string | number | boolean | unknown | {
581
+ [key: string]: unknown;
582
+ } | Array<unknown>;
583
+ createdAt?: Date | null;
584
+ updatedAt?: Date | null;
585
+ search?: string;
586
+ ids?: Array<string>;
587
+ orderBy?: string;
588
+ sortOrder?: 'asc' | 'desc';
589
+ page?: number;
590
+ size?: number;
591
+ searchField?: string;
592
+ dateFrom?: string;
593
+ dateTo?: string;
594
+ };
595
+ url: '/logs/export/csv';
596
+ };
597
+ export type GetLogsExportCsvResponses = {
598
+ /**
599
+ * CSV file with logs data
600
+ */
601
+ 200: string;
602
+ };
603
+ export type GetLogsExportCsvResponse = GetLogsExportCsvResponses[keyof GetLogsExportCsvResponses];
604
+ export type DeleteLogsIdData = {
605
+ body?: never;
606
+ path: {
607
+ id: string;
608
+ };
609
+ query?: never;
610
+ url: '/logs/:id';
611
+ };
612
+ export type DeleteLogsIdErrors = {
613
+ /**
614
+ * Log not found
615
+ */
616
+ 404: {
617
+ data: {
618
+ [key: string]: unknown;
619
+ };
620
+ message: string;
621
+ success: boolean;
622
+ error?: unknown;
623
+ meta?: unknown;
624
+ };
625
+ /**
626
+ * Internal server error
627
+ */
628
+ 500: {
629
+ data: {
630
+ [key: string]: unknown;
631
+ };
632
+ message: string;
633
+ success: boolean;
634
+ error?: unknown;
635
+ meta?: unknown;
636
+ };
637
+ };
638
+ export type DeleteLogsIdError = DeleteLogsIdErrors[keyof DeleteLogsIdErrors];
639
+ export type DeleteLogsIdResponses = {
640
+ /**
641
+ * Log deleted successfully
642
+ */
643
+ 200: {
644
+ data: {
645
+ [key: string]: unknown;
646
+ };
647
+ message: string;
648
+ success: boolean;
649
+ error?: unknown;
650
+ meta?: unknown;
651
+ };
652
+ };
653
+ export type DeleteLogsIdResponse = DeleteLogsIdResponses[keyof DeleteLogsIdResponses];
654
+ export type GetLogsIdData = {
655
+ body?: never;
656
+ path: {
657
+ id: string;
658
+ };
659
+ query?: never;
660
+ url: '/logs/:id';
661
+ };
662
+ export type GetLogsIdErrors = {
663
+ /**
664
+ * Log not found
665
+ */
666
+ 404: {
667
+ data: {
668
+ [key: string]: unknown;
669
+ };
670
+ message: string;
671
+ success: boolean;
672
+ error?: unknown;
673
+ meta?: unknown;
674
+ };
675
+ };
676
+ export type GetLogsIdError = GetLogsIdErrors[keyof GetLogsIdErrors];
677
+ export type GetLogsIdResponses = {
678
+ /**
679
+ * Log found
680
+ */
681
+ 200: {
682
+ data: {
683
+ id?: string;
684
+ entity?: string;
685
+ entityId?: string;
686
+ creatorId?: string | null;
687
+ creatorName?: string | null;
688
+ projectId?: string;
689
+ referenceName?: string | null;
690
+ referenceId?: string | null;
691
+ action?: 'create' | 'update' | 'delete';
692
+ previousData?: string | number | boolean | unknown | {
693
+ [key: string]: unknown;
694
+ } | Array<unknown>;
695
+ updatedData?: string | number | boolean | unknown | {
696
+ [key: string]: unknown;
697
+ } | Array<unknown>;
698
+ createdAt?: Date | null;
699
+ updatedAt?: Date | null;
700
+ };
701
+ message: string;
702
+ success: boolean;
703
+ error?: unknown;
704
+ meta?: unknown;
705
+ };
706
+ };
707
+ export type GetLogsIdResponse = GetLogsIdResponses[keyof GetLogsIdResponses];
708
+ export type DeleteLogsEntityEntityIdData = {
709
+ body?: never;
710
+ path: {
711
+ entityId: string;
712
+ };
713
+ query?: never;
714
+ url: '/logs/entity/:entityId';
715
+ };
716
+ export type DeleteLogsEntityEntityIdErrors = {
717
+ /**
718
+ * Internal server error
719
+ */
720
+ 500: {
721
+ data: {
722
+ [key: string]: unknown;
723
+ };
724
+ message: string;
725
+ success: boolean;
726
+ error?: unknown;
727
+ meta?: unknown;
728
+ };
729
+ };
730
+ export type DeleteLogsEntityEntityIdError = DeleteLogsEntityEntityIdErrors[keyof DeleteLogsEntityEntityIdErrors];
731
+ export type DeleteLogsEntityEntityIdResponses = {
732
+ /**
733
+ * Logs deleted successfully
734
+ */
735
+ 200: {
736
+ data: {
737
+ [key: string]: unknown;
738
+ };
739
+ message: string;
740
+ success: boolean;
741
+ error?: unknown;
742
+ meta?: unknown;
743
+ };
744
+ };
745
+ export type DeleteLogsEntityEntityIdResponse = DeleteLogsEntityEntityIdResponses[keyof DeleteLogsEntityEntityIdResponses];