@aifabrix/miso-client 3.2.5 → 3.4.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +624 -0
  2. package/dist/api/auth-cache.api.d.ts +52 -0
  3. package/dist/api/auth-cache.api.d.ts.map +1 -0
  4. package/dist/api/auth-cache.api.js +125 -0
  5. package/dist/api/auth-cache.api.js.map +1 -0
  6. package/dist/api/auth-login.api.d.ts +52 -0
  7. package/dist/api/auth-login.api.d.ts.map +1 -0
  8. package/dist/api/auth-login.api.js +102 -0
  9. package/dist/api/auth-login.api.js.map +1 -0
  10. package/dist/api/auth-token.api.d.ts +46 -0
  11. package/dist/api/auth-token.api.d.ts.map +1 -0
  12. package/dist/api/auth-token.api.js +90 -0
  13. package/dist/api/auth-token.api.js.map +1 -0
  14. package/dist/api/auth-user.api.d.ts +43 -0
  15. package/dist/api/auth-user.api.d.ts.map +1 -0
  16. package/dist/api/auth-user.api.js +87 -0
  17. package/dist/api/auth-user.api.js.map +1 -0
  18. package/dist/api/auth.api.d.ts +48 -0
  19. package/dist/api/auth.api.d.ts.map +1 -0
  20. package/dist/api/auth.api.js +152 -0
  21. package/dist/api/auth.api.js.map +1 -0
  22. package/dist/api/index.d.ts +39 -0
  23. package/dist/api/index.d.ts.map +1 -0
  24. package/dist/api/index.js +31 -0
  25. package/dist/api/index.js.map +1 -0
  26. package/dist/api/logs-create.api.d.ts +32 -0
  27. package/dist/api/logs-create.api.d.ts.map +1 -0
  28. package/dist/api/logs-create.api.js +63 -0
  29. package/dist/api/logs-create.api.js.map +1 -0
  30. package/dist/api/logs-export.api.d.ts +24 -0
  31. package/dist/api/logs-export.api.d.ts.map +1 -0
  32. package/dist/api/logs-export.api.js +43 -0
  33. package/dist/api/logs-export.api.js.map +1 -0
  34. package/dist/api/logs-list.api.d.ts +63 -0
  35. package/dist/api/logs-list.api.d.ts.map +1 -0
  36. package/dist/api/logs-list.api.js +155 -0
  37. package/dist/api/logs-list.api.js.map +1 -0
  38. package/dist/api/logs-stats.api.d.ts +48 -0
  39. package/dist/api/logs-stats.api.d.ts.map +1 -0
  40. package/dist/api/logs-stats.api.js +107 -0
  41. package/dist/api/logs-stats.api.js.map +1 -0
  42. package/dist/api/logs.api.d.ts +35 -0
  43. package/dist/api/logs.api.d.ts.map +1 -0
  44. package/dist/api/logs.api.js +71 -0
  45. package/dist/api/logs.api.js.map +1 -0
  46. package/dist/api/permissions.api.d.ts +31 -0
  47. package/dist/api/permissions.api.d.ts.map +1 -0
  48. package/dist/api/permissions.api.js +62 -0
  49. package/dist/api/permissions.api.js.map +1 -0
  50. package/dist/api/roles.api.d.ts +31 -0
  51. package/dist/api/roles.api.d.ts.map +1 -0
  52. package/dist/api/roles.api.js +62 -0
  53. package/dist/api/roles.api.js.map +1 -0
  54. package/dist/api/types/auth.types.d.ts +293 -0
  55. package/dist/api/types/auth.types.d.ts.map +1 -0
  56. package/dist/api/types/auth.types.js +7 -0
  57. package/dist/api/types/auth.types.js.map +1 -0
  58. package/dist/api/types/logs.types.d.ts +266 -0
  59. package/dist/api/types/logs.types.d.ts.map +1 -0
  60. package/dist/api/types/logs.types.js +7 -0
  61. package/dist/api/types/logs.types.js.map +1 -0
  62. package/dist/api/types/permissions.types.d.ts +32 -0
  63. package/dist/api/types/permissions.types.d.ts.map +1 -0
  64. package/dist/api/types/permissions.types.js +7 -0
  65. package/dist/api/types/permissions.types.js.map +1 -0
  66. package/dist/api/types/roles.types.d.ts +32 -0
  67. package/dist/api/types/roles.types.d.ts.map +1 -0
  68. package/dist/api/types/roles.types.js +7 -0
  69. package/dist/api/types/roles.types.js.map +1 -0
  70. package/dist/index.d.ts +31 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +52 -5
  73. package/dist/index.js.map +1 -1
  74. package/dist/services/auth.service.d.ts +3 -1
  75. package/dist/services/auth.service.d.ts.map +1 -1
  76. package/dist/services/auth.service.js +62 -23
  77. package/dist/services/auth.service.js.map +1 -1
  78. package/dist/services/browser-permission.service.d.ts +3 -1
  79. package/dist/services/browser-permission.service.d.ts.map +1 -1
  80. package/dist/services/browser-permission.service.js +32 -16
  81. package/dist/services/browser-permission.service.js.map +1 -1
  82. package/dist/services/browser-role.service.d.ts +3 -1
  83. package/dist/services/browser-role.service.d.ts.map +1 -1
  84. package/dist/services/browser-role.service.js +32 -16
  85. package/dist/services/browser-role.service.js.map +1 -1
  86. package/dist/services/logger.service.d.ts +7 -0
  87. package/dist/services/logger.service.d.ts.map +1 -1
  88. package/dist/services/logger.service.js +72 -7
  89. package/dist/services/logger.service.js.map +1 -1
  90. package/dist/services/permission.service.d.ts +3 -1
  91. package/dist/services/permission.service.d.ts.map +1 -1
  92. package/dist/services/permission.service.js +32 -16
  93. package/dist/services/permission.service.js.map +1 -1
  94. package/dist/services/role.service.d.ts +3 -1
  95. package/dist/services/role.service.d.ts.map +1 -1
  96. package/dist/services/role.service.js +25 -13
  97. package/dist/services/role.service.js.map +1 -1
  98. package/dist/services/token-validation.service.d.ts +49 -0
  99. package/dist/services/token-validation.service.d.ts.map +1 -0
  100. package/dist/services/token-validation.service.js +258 -0
  101. package/dist/services/token-validation.service.js.map +1 -0
  102. package/dist/types/config.types.d.ts +7 -0
  103. package/dist/types/config.types.d.ts.map +1 -1
  104. package/dist/types/config.types.js.map +1 -1
  105. package/dist/types/token-validation.types.d.ts +88 -0
  106. package/dist/types/token-validation.types.d.ts.map +1 -0
  107. package/dist/types/token-validation.types.js +7 -0
  108. package/dist/types/token-validation.types.js.map +1 -0
  109. package/dist/utils/audit-log-queue.d.ts +7 -0
  110. package/dist/utils/audit-log-queue.d.ts.map +1 -1
  111. package/dist/utils/audit-log-queue.js +29 -8
  112. package/dist/utils/audit-log-queue.js.map +1 -1
  113. package/dist/utils/data-client.d.ts.map +1 -1
  114. package/dist/utils/data-client.js +8 -3
  115. package/dist/utils/data-client.js.map +1 -1
  116. package/package.json +4 -2
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ /**
3
+ * Auth API client
4
+ * Provides typed interfaces for all authentication-related controller API calls
5
+ * Composed from specialized sub-modules to keep file size manageable
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AuthApi = void 0;
9
+ const auth_login_api_1 = require("./auth-login.api");
10
+ const auth_token_api_1 = require("./auth-token.api");
11
+ const auth_user_api_1 = require("./auth-user.api");
12
+ const auth_cache_api_1 = require("./auth-cache.api");
13
+ /**
14
+ * Auth API class
15
+ * Centralizes all authentication-related endpoint URLs and provides typed methods
16
+ * Delegates to specialized sub-modules to keep file size manageable
17
+ */
18
+ class AuthApi {
19
+ constructor(httpClient) {
20
+ this.httpClient = httpClient;
21
+ this.loginApi = new auth_login_api_1.AuthLoginApi(httpClient);
22
+ this.tokenApi = new auth_token_api_1.AuthTokenApi(httpClient);
23
+ this.userApi = new auth_user_api_1.AuthUserApi(httpClient);
24
+ this.cacheApi = new auth_cache_api_1.AuthCacheApi(httpClient);
25
+ }
26
+ // Login methods - delegate to AuthLoginApi
27
+ async login(params, authStrategy) {
28
+ return this.loginApi.login(params, authStrategy);
29
+ }
30
+ async initiateDeviceCode(params, authStrategy) {
31
+ return this.loginApi.initiateDeviceCode(params, authStrategy);
32
+ }
33
+ async pollDeviceCodeToken(params) {
34
+ return this.loginApi.pollDeviceCodeToken(params);
35
+ }
36
+ async refreshDeviceCodeToken(params) {
37
+ return this.loginApi.refreshDeviceCodeToken(params);
38
+ }
39
+ async getLoginDiagnostics(environment) {
40
+ return this.loginApi.getLoginDiagnostics(environment);
41
+ }
42
+ // Token methods - delegate to AuthTokenApi
43
+ async getClientToken(authStrategy) {
44
+ return this.tokenApi.getClientToken(authStrategy);
45
+ }
46
+ async generateClientToken(authStrategy) {
47
+ return this.tokenApi.generateClientToken(authStrategy);
48
+ }
49
+ async validateToken(params, authStrategy) {
50
+ return this.tokenApi.validateToken(params, authStrategy);
51
+ }
52
+ async refreshToken(params, authStrategy) {
53
+ return this.tokenApi.refreshToken(params, authStrategy);
54
+ }
55
+ // User methods - delegate to AuthUserApi
56
+ async getUser(authStrategy) {
57
+ return this.userApi.getUser(authStrategy);
58
+ }
59
+ async logout() {
60
+ return this.userApi.logout();
61
+ }
62
+ async logoutWithToken(token) {
63
+ return this.userApi.logoutWithToken(token);
64
+ }
65
+ async handleCallback(params, authStrategy) {
66
+ return this.userApi.handleCallback(params, authStrategy);
67
+ }
68
+ // Cache methods - delegate to AuthCacheApi
69
+ async getCacheStats(authStrategy) {
70
+ return this.cacheApi.getCacheStats(authStrategy);
71
+ }
72
+ async getCachePerformance(authStrategy) {
73
+ return this.cacheApi.getCachePerformance(authStrategy);
74
+ }
75
+ async getCacheEfficiency(authStrategy) {
76
+ return this.cacheApi.getCacheEfficiency(authStrategy);
77
+ }
78
+ async clearCache(authStrategy) {
79
+ return this.cacheApi.clearCache(authStrategy);
80
+ }
81
+ async invalidateCache(params, authStrategy) {
82
+ return this.cacheApi.invalidateCache(params, authStrategy);
83
+ }
84
+ // Roles and Permissions methods - kept here for now (could be moved to separate modules)
85
+ async getRoles(params, authStrategy) {
86
+ try {
87
+ if (authStrategy?.bearerToken) {
88
+ return await this.httpClient.authenticatedRequest('GET', AuthApi.ROLES_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
89
+ }
90
+ if (authStrategy) {
91
+ return await this.httpClient.requestWithAuthStrategy('GET', AuthApi.ROLES_ENDPOINT, authStrategy, undefined, { params });
92
+ }
93
+ throw new Error('getRoles requires authentication - provide authStrategy with bearerToken');
94
+ }
95
+ catch (error) {
96
+ console.error('Get roles API call failed:', error);
97
+ throw error;
98
+ }
99
+ }
100
+ async refreshRoles(authStrategy) {
101
+ try {
102
+ if (authStrategy?.bearerToken) {
103
+ return await this.httpClient.authenticatedRequest('GET', AuthApi.ROLES_REFRESH_ENDPOINT, authStrategy.bearerToken, undefined, undefined, authStrategy);
104
+ }
105
+ if (authStrategy) {
106
+ return await this.httpClient.requestWithAuthStrategy('GET', AuthApi.ROLES_REFRESH_ENDPOINT, authStrategy);
107
+ }
108
+ throw new Error('refreshRoles requires authentication - provide authStrategy with bearerToken');
109
+ }
110
+ catch (error) {
111
+ console.error('Refresh roles API call failed:', error);
112
+ throw error;
113
+ }
114
+ }
115
+ async getPermissions(params, authStrategy) {
116
+ try {
117
+ if (authStrategy?.bearerToken) {
118
+ return await this.httpClient.authenticatedRequest('GET', AuthApi.PERMISSIONS_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
119
+ }
120
+ if (authStrategy) {
121
+ return await this.httpClient.requestWithAuthStrategy('GET', AuthApi.PERMISSIONS_ENDPOINT, authStrategy, undefined, { params });
122
+ }
123
+ throw new Error('getPermissions requires authentication - provide authStrategy with bearerToken');
124
+ }
125
+ catch (error) {
126
+ console.error('Get permissions API call failed:', error);
127
+ throw error;
128
+ }
129
+ }
130
+ async refreshPermissions(authStrategy) {
131
+ try {
132
+ if (authStrategy?.bearerToken) {
133
+ return await this.httpClient.authenticatedRequest('GET', AuthApi.PERMISSIONS_REFRESH_ENDPOINT, authStrategy.bearerToken, undefined, undefined, authStrategy);
134
+ }
135
+ if (authStrategy) {
136
+ return await this.httpClient.requestWithAuthStrategy('GET', AuthApi.PERMISSIONS_REFRESH_ENDPOINT, authStrategy);
137
+ }
138
+ throw new Error('refreshPermissions requires authentication - provide authStrategy with bearerToken');
139
+ }
140
+ catch (error) {
141
+ console.error('Refresh permissions API call failed:', error);
142
+ throw error;
143
+ }
144
+ }
145
+ }
146
+ exports.AuthApi = AuthApi;
147
+ // Centralize endpoint URLs as constants (for roles/permissions which are still here)
148
+ AuthApi.ROLES_ENDPOINT = '/api/v1/auth/roles';
149
+ AuthApi.ROLES_REFRESH_ENDPOINT = '/api/v1/auth/roles/refresh';
150
+ AuthApi.PERMISSIONS_ENDPOINT = '/api/v1/auth/permissions';
151
+ AuthApi.PERMISSIONS_REFRESH_ENDPOINT = '/api/v1/auth/permissions/refresh';
152
+ //# sourceMappingURL=auth.api.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IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAC/C,KAAK,EACL,OAAO,CAAC,4BAA4B,EACpC,YAAY,CAAC,WAAW,EACxB,SAAS,EACT,SAAS,EACT,YAAY,CACb,CAAC;YACJ,CAAC;YACD,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAClD,KAAK,EACL,OAAO,CAAC,4BAA4B,EACpC,YAAY,CACb,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,oFAAoF,CAAC,CAAC;QACxG,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;YAC7D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;;AAzPH,0BA0PC;AAzPC,qFAAqF;AAC7D,sBAAc,GAAG,oBAAoB,CAAC;AACtC,8BAAsB,GAAG,4BAA4B,CAAC;AACtD,4BAAoB,GAAG,0BAA0B,CAAC;AAClD,oCAA4B,GAAG,kCAAkC,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Centralized API client
3
+ * Provides typed interfaces for all controller API calls
4
+ * Wraps HttpClient internally and organizes APIs by domain
5
+ */
6
+ import { HttpClient } from '../utils/http-client';
7
+ import { AuthApi } from './auth.api';
8
+ import { RolesApi } from './roles.api';
9
+ import { PermissionsApi } from './permissions.api';
10
+ import { LogsApi } from './logs.api';
11
+ /**
12
+ * API Client class
13
+ * Wraps HttpClient and provides domain-specific API interfaces
14
+ * Services can gradually migrate from direct HttpClient usage to ApiClient
15
+ */
16
+ export declare class ApiClient {
17
+ /**
18
+ * Auth API - Authentication, token management, user info, roles, permissions, cache
19
+ */
20
+ readonly auth: AuthApi;
21
+ /**
22
+ * Roles API - User roles management
23
+ */
24
+ readonly roles: RolesApi;
25
+ /**
26
+ * Permissions API - User permissions management
27
+ */
28
+ readonly permissions: PermissionsApi;
29
+ /**
30
+ * Logs API - Logging and log management
31
+ */
32
+ readonly logs: LogsApi;
33
+ /**
34
+ * Create API client instance
35
+ * @param httpClient - HttpClient instance to wrap
36
+ */
37
+ constructor(httpClient: HttpClient);
38
+ }
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;GAIG;AACH,qBAAa,SAAS;IACpB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAEvB;;;OAGG;gBACS,UAAU,EAAE,UAAU;CAMnC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * Centralized API client
4
+ * Provides typed interfaces for all controller API calls
5
+ * Wraps HttpClient internally and organizes APIs by domain
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ApiClient = void 0;
9
+ const auth_api_1 = require("./auth.api");
10
+ const roles_api_1 = require("./roles.api");
11
+ const permissions_api_1 = require("./permissions.api");
12
+ const logs_api_1 = require("./logs.api");
13
+ /**
14
+ * API Client class
15
+ * Wraps HttpClient and provides domain-specific API interfaces
16
+ * Services can gradually migrate from direct HttpClient usage to ApiClient
17
+ */
18
+ class ApiClient {
19
+ /**
20
+ * Create API client instance
21
+ * @param httpClient - HttpClient instance to wrap
22
+ */
23
+ constructor(httpClient) {
24
+ this.auth = new auth_api_1.AuthApi(httpClient);
25
+ this.roles = new roles_api_1.RolesApi(httpClient);
26
+ this.permissions = new permissions_api_1.PermissionsApi(httpClient);
27
+ this.logs = new logs_api_1.LogsApi(httpClient);
28
+ }
29
+ }
30
+ exports.ApiClient = ApiClient;
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,yCAAqC;AACrC,2CAAuC;AACvC,uDAAmD;AACnD,yCAAqC;AAErC;;;;GAIG;AACH,MAAa,SAAS;IAqBpB;;;OAGG;IACH,YAAY,UAAsB;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,kBAAO,CAAC,UAAU,CAAC,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,oBAAQ,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,GAAG,IAAI,gCAAc,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,CAAC,IAAI,GAAG,IAAI,kBAAO,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;CACF;AA/BD,8BA+BC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Logs Create API client
3
+ * Handles log creation (single and batch)
4
+ */
5
+ import { HttpClient } from '../utils/http-client';
6
+ import { AuthStrategy } from '../types/config.types';
7
+ import { CreateLogRequest, CreateLogResponse, BatchLogRequest, BatchLogResponse } from './types/logs.types';
8
+ /**
9
+ * Logs Create API class
10
+ * Handles log creation endpoints
11
+ */
12
+ export declare class LogsCreateApi {
13
+ private httpClient;
14
+ private static readonly LOGS_ENDPOINT;
15
+ private static readonly LOGS_BATCH_ENDPOINT;
16
+ constructor(httpClient: HttpClient);
17
+ /**
18
+ * Create log entry (unified endpoint for error/general/audit logs)
19
+ * @param logEntry - Log entry request
20
+ * @param authStrategy - Optional authentication strategy override
21
+ * @returns Create log response with success message
22
+ */
23
+ createLog(logEntry: CreateLogRequest, authStrategy?: AuthStrategy): Promise<CreateLogResponse>;
24
+ /**
25
+ * Create multiple log entries in batch (1-100 logs)
26
+ * @param logs - Batch log request with logs array
27
+ * @param authStrategy - Optional authentication strategy override
28
+ * @returns Batch log response with processed and failed counts
29
+ */
30
+ createBatchLogs(logs: BatchLogRequest, authStrategy?: AuthStrategy): Promise<BatchLogResponse>;
31
+ }
32
+ //# sourceMappingURL=logs-create.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-create.api.d.ts","sourceRoot":"","sources":["../../src/api/logs-create.api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,qBAAa,aAAa;IAKZ,OAAO,CAAC,UAAU;IAH9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAkB;IACvD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAwB;gBAE/C,UAAU,EAAE,UAAU;IAE1C;;;;;OAKG;IACG,SAAS,CACb,QAAQ,EAAE,gBAAgB,EAC1B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,iBAAiB,CAAC;IA+B7B;;;;;OAKG;IACG,eAAe,CACnB,IAAI,EAAE,eAAe,EACrB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,gBAAgB,CAAC;CA8B7B"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /**
3
+ * Logs Create API client
4
+ * Handles log creation (single and batch)
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.LogsCreateApi = void 0;
8
+ /**
9
+ * Logs Create API class
10
+ * Handles log creation endpoints
11
+ */
12
+ class LogsCreateApi {
13
+ constructor(httpClient) {
14
+ this.httpClient = httpClient;
15
+ }
16
+ /**
17
+ * Create log entry (unified endpoint for error/general/audit logs)
18
+ * @param logEntry - Log entry request
19
+ * @param authStrategy - Optional authentication strategy override
20
+ * @returns Create log response with success message
21
+ */
22
+ async createLog(logEntry, authStrategy) {
23
+ try {
24
+ if (authStrategy?.bearerToken) {
25
+ return await this.httpClient.authenticatedRequest('POST', LogsCreateApi.LOGS_ENDPOINT, authStrategy.bearerToken, logEntry, undefined, authStrategy);
26
+ }
27
+ if (authStrategy) {
28
+ return await this.httpClient.requestWithAuthStrategy('POST', LogsCreateApi.LOGS_ENDPOINT, authStrategy, logEntry);
29
+ }
30
+ return await this.httpClient.request('POST', LogsCreateApi.LOGS_ENDPOINT, logEntry);
31
+ }
32
+ catch (error) {
33
+ console.error('Create log API call failed:', error);
34
+ throw error;
35
+ }
36
+ }
37
+ /**
38
+ * Create multiple log entries in batch (1-100 logs)
39
+ * @param logs - Batch log request with logs array
40
+ * @param authStrategy - Optional authentication strategy override
41
+ * @returns Batch log response with processed and failed counts
42
+ */
43
+ async createBatchLogs(logs, authStrategy) {
44
+ try {
45
+ if (authStrategy?.bearerToken) {
46
+ return await this.httpClient.authenticatedRequest('POST', LogsCreateApi.LOGS_BATCH_ENDPOINT, authStrategy.bearerToken, logs, undefined, authStrategy);
47
+ }
48
+ if (authStrategy) {
49
+ return await this.httpClient.requestWithAuthStrategy('POST', LogsCreateApi.LOGS_BATCH_ENDPOINT, authStrategy, logs);
50
+ }
51
+ return await this.httpClient.request('POST', LogsCreateApi.LOGS_BATCH_ENDPOINT, logs);
52
+ }
53
+ catch (error) {
54
+ console.error('Create batch logs API call failed:', error);
55
+ throw error;
56
+ }
57
+ }
58
+ }
59
+ exports.LogsCreateApi = LogsCreateApi;
60
+ // Centralize endpoint URLs as constants
61
+ LogsCreateApi.LOGS_ENDPOINT = '/api/v1/logs';
62
+ LogsCreateApi.LOGS_BATCH_ENDPOINT = '/api/v1/logs/batch';
63
+ //# sourceMappingURL=logs-create.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-create.api.js","sourceRoot":"","sources":["../../src/api/logs-create.api.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH;;;GAGG;AACH,MAAa,aAAa;IAKxB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,QAA0B,EAC1B,YAA2B;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAC/C,MAAM,EACN,aAAa,CAAC,aAAa,EAC3B,YAAY,CAAC,WAAW,EACxB,QAAQ,EACR,SAAS,EACT,YAAY,CACb,CAAC;YACJ,CAAC;YACD,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAClD,MAAM,EACN,aAAa,CAAC,aAAa,EAC3B,YAAY,EACZ,QAAQ,CACT,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAClC,MAAM,EACN,aAAa,CAAC,aAAa,EAC3B,QAAQ,CACT,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;YACpD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CACnB,IAAqB,EACrB,YAA2B;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAC/C,MAAM,EACN,aAAa,CAAC,mBAAmB,EACjC,YAAY,CAAC,WAAW,EACxB,IAAI,EACJ,SAAS,EACT,YAAY,CACb,CAAC;YACJ,CAAC;YACD,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAClD,MAAM,EACN,aAAa,CAAC,mBAAmB,EACjC,YAAY,EACZ,IAAI,CACL,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAClC,MAAM,EACN,aAAa,CAAC,mBAAmB,EACjC,IAAI,CACL,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;YAC3D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;;AArFH,sCAsFC;AArFC,wCAAwC;AAChB,2BAAa,GAAG,cAAc,CAAC;AAC/B,iCAAmB,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Logs Export API client
3
+ * Handles log export endpoints
4
+ */
5
+ import { HttpClient } from '../utils/http-client';
6
+ import { AuthStrategy } from '../types/config.types';
7
+ import { ExportLogsQueryParams, ExportLogsResponse } from './types/logs.types';
8
+ /**
9
+ * Logs Export API class
10
+ * Handles log export endpoints
11
+ */
12
+ export declare class LogsExportApi {
13
+ private httpClient;
14
+ private static readonly LOGS_EXPORT_ENDPOINT;
15
+ constructor(httpClient: HttpClient);
16
+ /**
17
+ * Export logs (CSV or JSON format)
18
+ * @param params - Export logs query parameters
19
+ * @param authStrategy - Optional authentication strategy override
20
+ * @returns CSV string or JSON ExportLogsResponse object
21
+ */
22
+ exportLogs(params: ExportLogsQueryParams, authStrategy?: AuthStrategy): Promise<string | ExportLogsResponse>;
23
+ }
24
+ //# sourceMappingURL=logs-export.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-export.api.d.ts","sourceRoot":"","sources":["../../src/api/logs-export.api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,qBAAa,aAAa;IAIZ,OAAO,CAAC,UAAU;IAF9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAyB;gBAEjD,UAAU,EAAE,UAAU;IAE1C;;;;;OAKG;IACG,UAAU,CACd,MAAM,EAAE,qBAAqB,EAC7B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,MAAM,GAAG,kBAAkB,CAAC;CAkCxC"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /**
3
+ * Logs Export API client
4
+ * Handles log export endpoints
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.LogsExportApi = void 0;
8
+ /**
9
+ * Logs Export API class
10
+ * Handles log export endpoints
11
+ */
12
+ class LogsExportApi {
13
+ constructor(httpClient) {
14
+ this.httpClient = httpClient;
15
+ }
16
+ /**
17
+ * Export logs (CSV or JSON format)
18
+ * @param params - Export logs query parameters
19
+ * @param authStrategy - Optional authentication strategy override
20
+ * @returns CSV string or JSON ExportLogsResponse object
21
+ */
22
+ async exportLogs(params, authStrategy) {
23
+ try {
24
+ // Export endpoint returns different content types based on format parameter
25
+ // CSV returns text/csv (string), JSON returns application/json (object)
26
+ if (authStrategy?.bearerToken) {
27
+ return await this.httpClient.authenticatedRequest('GET', LogsExportApi.LOGS_EXPORT_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
28
+ }
29
+ if (authStrategy) {
30
+ return await this.httpClient.requestWithAuthStrategy('GET', LogsExportApi.LOGS_EXPORT_ENDPOINT, authStrategy, undefined, { params });
31
+ }
32
+ return await this.httpClient.request('GET', LogsExportApi.LOGS_EXPORT_ENDPOINT, undefined, { params });
33
+ }
34
+ catch (error) {
35
+ console.error('Export logs API call failed:', error);
36
+ throw error;
37
+ }
38
+ }
39
+ }
40
+ exports.LogsExportApi = LogsExportApi;
41
+ // Centralize endpoint URLs as constants
42
+ LogsExportApi.LOGS_EXPORT_ENDPOINT = '/api/v1/logs/export';
43
+ //# sourceMappingURL=logs-export.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-export.api.js","sourceRoot":"","sources":["../../src/api/logs-export.api.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH;;;GAGG;AACH,MAAa,aAAa;IAIxB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CACd,MAA6B,EAC7B,YAA2B;QAE3B,IAAI,CAAC;YACH,4EAA4E;YAC5E,wEAAwE;YACxE,IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAC/C,KAAK,EACL,aAAa,CAAC,oBAAoB,EAClC,YAAY,CAAC,WAAW,EACxB,SAAS,EACT,EAAE,MAAM,EAAE,EACV,YAAY,CACb,CAAC;YACJ,CAAC;YACD,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAClD,KAAK,EACL,aAAa,CAAC,oBAAoB,EAClC,YAAY,EACZ,SAAS,EACT,EAAE,MAAM,EAAE,CACX,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAClC,KAAK,EACL,aAAa,CAAC,oBAAoB,EAClC,SAAS,EACT,EAAE,MAAM,EAAE,CACX,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;YACrD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;;AAhDH,sCAiDC;AAhDC,wCAAwC;AAChB,kCAAoB,GAAG,qBAAqB,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Logs List API client
3
+ * Handles listing and retrieving logs (general, audit, jobs)
4
+ */
5
+ import { HttpClient } from '../utils/http-client';
6
+ import { AuthStrategy } from '../types/config.types';
7
+ import { ListLogsQueryParams, PaginatedLogsResponse, GeneralLogEntry, AuditLogEntry, JobLogEntry } from './types/logs.types';
8
+ /**
9
+ * Logs List API class
10
+ * Handles log listing and retrieval endpoints
11
+ */
12
+ export declare class LogsListApi {
13
+ private httpClient;
14
+ private static readonly LOGS_GENERAL_ENDPOINT;
15
+ private static readonly LOGS_AUDIT_ENDPOINT;
16
+ private static readonly LOGS_JOBS_ENDPOINT;
17
+ constructor(httpClient: HttpClient);
18
+ /**
19
+ * List general logs (paginated, with filtering)
20
+ * @param params - Optional query parameters for pagination and filtering
21
+ * @param authStrategy - Optional authentication strategy override
22
+ * @returns Paginated general logs response
23
+ */
24
+ listGeneralLogs(params?: ListLogsQueryParams, authStrategy?: AuthStrategy): Promise<PaginatedLogsResponse<GeneralLogEntry>>;
25
+ /**
26
+ * Get general log by ID (501 Not Implemented)
27
+ * @param id - Log ID
28
+ * @param environment - Optional environment parameter
29
+ * @param authStrategy - Optional authentication strategy override
30
+ * @returns General log entry
31
+ */
32
+ getGeneralLog(id: string, environment?: string, authStrategy?: AuthStrategy): Promise<GeneralLogEntry>;
33
+ /**
34
+ * List audit logs (paginated, with filtering)
35
+ * @param params - Optional query parameters for pagination and filtering
36
+ * @param authStrategy - Optional authentication strategy override
37
+ * @returns Paginated audit logs response
38
+ */
39
+ listAuditLogs(params?: ListLogsQueryParams, authStrategy?: AuthStrategy): Promise<PaginatedLogsResponse<AuditLogEntry>>;
40
+ /**
41
+ * Get audit log by ID (501 Not Implemented)
42
+ * @param id - Log ID
43
+ * @param environment - Optional environment parameter
44
+ * @param authStrategy - Optional authentication strategy override
45
+ * @returns Audit log entry
46
+ */
47
+ getAuditLog(id: string, environment?: string, authStrategy?: AuthStrategy): Promise<AuditLogEntry>;
48
+ /**
49
+ * List job logs (paginated, with filtering)
50
+ * @param params - Optional query parameters for pagination and filtering
51
+ * @param authStrategy - Optional authentication strategy override
52
+ * @returns Paginated job logs response
53
+ */
54
+ listJobLogs(params?: ListLogsQueryParams, authStrategy?: AuthStrategy): Promise<PaginatedLogsResponse<JobLogEntry>>;
55
+ /**
56
+ * Get job log by ID
57
+ * @param id - Log ID
58
+ * @param authStrategy - Optional authentication strategy override
59
+ * @returns Job log entry
60
+ */
61
+ getJobLog(id: string, authStrategy?: AuthStrategy): Promise<JobLogEntry>;
62
+ }
63
+ //# sourceMappingURL=logs-list.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-list.api.d.ts","sourceRoot":"","sources":["../../src/api/logs-list.api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,qBAAa,WAAW;IAMV,OAAO,CAAC,UAAU;IAJ9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAA0B;IACvE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAwB;IACnE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAuB;gBAE7C,UAAU,EAAE,UAAU;IAE1C;;;;;OAKG;IACG,eAAe,CACnB,MAAM,CAAC,EAAE,mBAAmB,EAC5B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC;IAiClD;;;;;;OAMG;IACG,aAAa,CACjB,EAAE,EAAE,MAAM,EACV,WAAW,CAAC,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,eAAe,CAAC;IAmC3B;;;;;OAKG;IACG,aAAa,CACjB,MAAM,CAAC,EAAE,mBAAmB,EAC5B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAiChD;;;;;;OAMG;IACG,WAAW,CACf,EAAE,EAAE,MAAM,EACV,WAAW,CAAC,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,aAAa,CAAC;IAmCzB;;;;;OAKG;IACG,WAAW,CACf,MAAM,CAAC,EAAE,mBAAmB,EAC5B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAiC9C;;;;;OAKG;IACG,SAAS,CACb,EAAE,EAAE,MAAM,EACV,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,WAAW,CAAC;CA6BxB"}
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ /**
3
+ * Logs List API client
4
+ * Handles listing and retrieving logs (general, audit, jobs)
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.LogsListApi = void 0;
8
+ /**
9
+ * Logs List API class
10
+ * Handles log listing and retrieval endpoints
11
+ */
12
+ class LogsListApi {
13
+ constructor(httpClient) {
14
+ this.httpClient = httpClient;
15
+ }
16
+ /**
17
+ * List general logs (paginated, with filtering)
18
+ * @param params - Optional query parameters for pagination and filtering
19
+ * @param authStrategy - Optional authentication strategy override
20
+ * @returns Paginated general logs response
21
+ */
22
+ async listGeneralLogs(params, authStrategy) {
23
+ try {
24
+ if (authStrategy?.bearerToken) {
25
+ return await this.httpClient.authenticatedRequest('GET', LogsListApi.LOGS_GENERAL_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
26
+ }
27
+ if (authStrategy) {
28
+ return await this.httpClient.requestWithAuthStrategy('GET', LogsListApi.LOGS_GENERAL_ENDPOINT, authStrategy, undefined, { params });
29
+ }
30
+ return await this.httpClient.request('GET', LogsListApi.LOGS_GENERAL_ENDPOINT, undefined, { params });
31
+ }
32
+ catch (error) {
33
+ console.error('List general logs API call failed:', error);
34
+ throw error;
35
+ }
36
+ }
37
+ /**
38
+ * Get general log by ID (501 Not Implemented)
39
+ * @param id - Log ID
40
+ * @param environment - Optional environment parameter
41
+ * @param authStrategy - Optional authentication strategy override
42
+ * @returns General log entry
43
+ */
44
+ async getGeneralLog(id, environment, authStrategy) {
45
+ try {
46
+ const url = `${LogsListApi.LOGS_GENERAL_ENDPOINT}/${id}`;
47
+ const params = environment ? { environment } : undefined;
48
+ if (authStrategy?.bearerToken) {
49
+ return await this.httpClient.authenticatedRequest('GET', url, authStrategy.bearerToken, undefined, { params }, authStrategy);
50
+ }
51
+ if (authStrategy) {
52
+ return await this.httpClient.requestWithAuthStrategy('GET', url, authStrategy, undefined, { params });
53
+ }
54
+ return await this.httpClient.request('GET', url, undefined, { params });
55
+ }
56
+ catch (error) {
57
+ console.error('Get general log API call failed:', error);
58
+ throw error;
59
+ }
60
+ }
61
+ /**
62
+ * List audit logs (paginated, with filtering)
63
+ * @param params - Optional query parameters for pagination and filtering
64
+ * @param authStrategy - Optional authentication strategy override
65
+ * @returns Paginated audit logs response
66
+ */
67
+ async listAuditLogs(params, authStrategy) {
68
+ try {
69
+ if (authStrategy?.bearerToken) {
70
+ return await this.httpClient.authenticatedRequest('GET', LogsListApi.LOGS_AUDIT_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
71
+ }
72
+ if (authStrategy) {
73
+ return await this.httpClient.requestWithAuthStrategy('GET', LogsListApi.LOGS_AUDIT_ENDPOINT, authStrategy, undefined, { params });
74
+ }
75
+ return await this.httpClient.request('GET', LogsListApi.LOGS_AUDIT_ENDPOINT, undefined, { params });
76
+ }
77
+ catch (error) {
78
+ console.error('List audit logs API call failed:', error);
79
+ throw error;
80
+ }
81
+ }
82
+ /**
83
+ * Get audit log by ID (501 Not Implemented)
84
+ * @param id - Log ID
85
+ * @param environment - Optional environment parameter
86
+ * @param authStrategy - Optional authentication strategy override
87
+ * @returns Audit log entry
88
+ */
89
+ async getAuditLog(id, environment, authStrategy) {
90
+ try {
91
+ const url = `${LogsListApi.LOGS_AUDIT_ENDPOINT}/${id}`;
92
+ const params = environment ? { environment } : undefined;
93
+ if (authStrategy?.bearerToken) {
94
+ return await this.httpClient.authenticatedRequest('GET', url, authStrategy.bearerToken, undefined, { params }, authStrategy);
95
+ }
96
+ if (authStrategy) {
97
+ return await this.httpClient.requestWithAuthStrategy('GET', url, authStrategy, undefined, { params });
98
+ }
99
+ return await this.httpClient.request('GET', url, undefined, { params });
100
+ }
101
+ catch (error) {
102
+ console.error('Get audit log API call failed:', error);
103
+ throw error;
104
+ }
105
+ }
106
+ /**
107
+ * List job logs (paginated, with filtering)
108
+ * @param params - Optional query parameters for pagination and filtering
109
+ * @param authStrategy - Optional authentication strategy override
110
+ * @returns Paginated job logs response
111
+ */
112
+ async listJobLogs(params, authStrategy) {
113
+ try {
114
+ if (authStrategy?.bearerToken) {
115
+ return await this.httpClient.authenticatedRequest('GET', LogsListApi.LOGS_JOBS_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
116
+ }
117
+ if (authStrategy) {
118
+ return await this.httpClient.requestWithAuthStrategy('GET', LogsListApi.LOGS_JOBS_ENDPOINT, authStrategy, undefined, { params });
119
+ }
120
+ return await this.httpClient.request('GET', LogsListApi.LOGS_JOBS_ENDPOINT, undefined, { params });
121
+ }
122
+ catch (error) {
123
+ console.error('List job logs API call failed:', error);
124
+ throw error;
125
+ }
126
+ }
127
+ /**
128
+ * Get job log by ID
129
+ * @param id - Log ID
130
+ * @param authStrategy - Optional authentication strategy override
131
+ * @returns Job log entry
132
+ */
133
+ async getJobLog(id, authStrategy) {
134
+ try {
135
+ const url = `${LogsListApi.LOGS_JOBS_ENDPOINT}/${id}`;
136
+ if (authStrategy?.bearerToken) {
137
+ return await this.httpClient.authenticatedRequest('GET', url, authStrategy.bearerToken, undefined, undefined, authStrategy);
138
+ }
139
+ if (authStrategy) {
140
+ return await this.httpClient.requestWithAuthStrategy('GET', url, authStrategy);
141
+ }
142
+ return await this.httpClient.request('GET', url);
143
+ }
144
+ catch (error) {
145
+ console.error('Get job log API call failed:', error);
146
+ throw error;
147
+ }
148
+ }
149
+ }
150
+ exports.LogsListApi = LogsListApi;
151
+ // Centralize endpoint URLs as constants
152
+ LogsListApi.LOGS_GENERAL_ENDPOINT = '/api/v1/logs/general';
153
+ LogsListApi.LOGS_AUDIT_ENDPOINT = '/api/v1/logs/audit';
154
+ LogsListApi.LOGS_JOBS_ENDPOINT = '/api/v1/logs/jobs';
155
+ //# sourceMappingURL=logs-list.api.js.map