@aifabrix/miso-client 3.2.5 → 3.3.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 (104) hide show
  1. package/dist/api/auth-cache.api.d.ts +52 -0
  2. package/dist/api/auth-cache.api.d.ts.map +1 -0
  3. package/dist/api/auth-cache.api.js +125 -0
  4. package/dist/api/auth-cache.api.js.map +1 -0
  5. package/dist/api/auth-login.api.d.ts +52 -0
  6. package/dist/api/auth-login.api.d.ts.map +1 -0
  7. package/dist/api/auth-login.api.js +102 -0
  8. package/dist/api/auth-login.api.js.map +1 -0
  9. package/dist/api/auth-token.api.d.ts +46 -0
  10. package/dist/api/auth-token.api.d.ts.map +1 -0
  11. package/dist/api/auth-token.api.js +90 -0
  12. package/dist/api/auth-token.api.js.map +1 -0
  13. package/dist/api/auth-user.api.d.ts +43 -0
  14. package/dist/api/auth-user.api.d.ts.map +1 -0
  15. package/dist/api/auth-user.api.js +87 -0
  16. package/dist/api/auth-user.api.js.map +1 -0
  17. package/dist/api/auth.api.d.ts +48 -0
  18. package/dist/api/auth.api.d.ts.map +1 -0
  19. package/dist/api/auth.api.js +152 -0
  20. package/dist/api/auth.api.js.map +1 -0
  21. package/dist/api/index.d.ts +39 -0
  22. package/dist/api/index.d.ts.map +1 -0
  23. package/dist/api/index.js +31 -0
  24. package/dist/api/index.js.map +1 -0
  25. package/dist/api/logs-create.api.d.ts +32 -0
  26. package/dist/api/logs-create.api.d.ts.map +1 -0
  27. package/dist/api/logs-create.api.js +63 -0
  28. package/dist/api/logs-create.api.js.map +1 -0
  29. package/dist/api/logs-export.api.d.ts +24 -0
  30. package/dist/api/logs-export.api.d.ts.map +1 -0
  31. package/dist/api/logs-export.api.js +43 -0
  32. package/dist/api/logs-export.api.js.map +1 -0
  33. package/dist/api/logs-list.api.d.ts +63 -0
  34. package/dist/api/logs-list.api.d.ts.map +1 -0
  35. package/dist/api/logs-list.api.js +155 -0
  36. package/dist/api/logs-list.api.js.map +1 -0
  37. package/dist/api/logs-stats.api.d.ts +48 -0
  38. package/dist/api/logs-stats.api.d.ts.map +1 -0
  39. package/dist/api/logs-stats.api.js +107 -0
  40. package/dist/api/logs-stats.api.js.map +1 -0
  41. package/dist/api/logs.api.d.ts +35 -0
  42. package/dist/api/logs.api.d.ts.map +1 -0
  43. package/dist/api/logs.api.js +71 -0
  44. package/dist/api/logs.api.js.map +1 -0
  45. package/dist/api/permissions.api.d.ts +31 -0
  46. package/dist/api/permissions.api.d.ts.map +1 -0
  47. package/dist/api/permissions.api.js +62 -0
  48. package/dist/api/permissions.api.js.map +1 -0
  49. package/dist/api/roles.api.d.ts +31 -0
  50. package/dist/api/roles.api.d.ts.map +1 -0
  51. package/dist/api/roles.api.js +62 -0
  52. package/dist/api/roles.api.js.map +1 -0
  53. package/dist/api/types/auth.types.d.ts +293 -0
  54. package/dist/api/types/auth.types.d.ts.map +1 -0
  55. package/dist/api/types/auth.types.js +7 -0
  56. package/dist/api/types/auth.types.js.map +1 -0
  57. package/dist/api/types/logs.types.d.ts +266 -0
  58. package/dist/api/types/logs.types.d.ts.map +1 -0
  59. package/dist/api/types/logs.types.js +7 -0
  60. package/dist/api/types/logs.types.js.map +1 -0
  61. package/dist/api/types/permissions.types.d.ts +32 -0
  62. package/dist/api/types/permissions.types.d.ts.map +1 -0
  63. package/dist/api/types/permissions.types.js +7 -0
  64. package/dist/api/types/permissions.types.js.map +1 -0
  65. package/dist/api/types/roles.types.d.ts +32 -0
  66. package/dist/api/types/roles.types.d.ts.map +1 -0
  67. package/dist/api/types/roles.types.js +7 -0
  68. package/dist/api/types/roles.types.js.map +1 -0
  69. package/dist/index.d.ts +1 -0
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +9 -4
  72. package/dist/index.js.map +1 -1
  73. package/dist/services/auth.service.d.ts +3 -1
  74. package/dist/services/auth.service.d.ts.map +1 -1
  75. package/dist/services/auth.service.js +62 -23
  76. package/dist/services/auth.service.js.map +1 -1
  77. package/dist/services/browser-permission.service.d.ts +3 -1
  78. package/dist/services/browser-permission.service.d.ts.map +1 -1
  79. package/dist/services/browser-permission.service.js +32 -16
  80. package/dist/services/browser-permission.service.js.map +1 -1
  81. package/dist/services/browser-role.service.d.ts +3 -1
  82. package/dist/services/browser-role.service.d.ts.map +1 -1
  83. package/dist/services/browser-role.service.js +32 -16
  84. package/dist/services/browser-role.service.js.map +1 -1
  85. package/dist/services/logger.service.d.ts +7 -0
  86. package/dist/services/logger.service.d.ts.map +1 -1
  87. package/dist/services/logger.service.js +72 -7
  88. package/dist/services/logger.service.js.map +1 -1
  89. package/dist/services/permission.service.d.ts +3 -1
  90. package/dist/services/permission.service.d.ts.map +1 -1
  91. package/dist/services/permission.service.js +32 -16
  92. package/dist/services/permission.service.js.map +1 -1
  93. package/dist/services/role.service.d.ts +3 -1
  94. package/dist/services/role.service.d.ts.map +1 -1
  95. package/dist/services/role.service.js +25 -13
  96. package/dist/services/role.service.js.map +1 -1
  97. package/dist/utils/audit-log-queue.d.ts +7 -0
  98. package/dist/utils/audit-log-queue.d.ts.map +1 -1
  99. package/dist/utils/audit-log-queue.js +29 -8
  100. package/dist/utils/audit-log-queue.js.map +1 -1
  101. package/dist/utils/data-client.d.ts.map +1 -1
  102. package/dist/utils/data-client.js +8 -3
  103. package/dist/utils/data-client.js.map +1 -1
  104. package/package.json +1 -1
@@ -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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-list.api.js","sourceRoot":"","sources":["../../src/api/logs-list.api.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH;;;GAGG;AACH,MAAa,WAAW;IAMtB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CACnB,MAA4B,EAC5B,YAA2B;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAC/C,KAAK,EACL,WAAW,CAAC,qBAAqB,EACjC,YAAY,CAAC,WAAW,EACxB,SAAS,EACT,EAAE,MAAM,EAAE,EACV,YAAY,CACb,CAAC;YACJ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E,CACX,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;YACvD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,EAAU,EACV,YAA2B;QAE3B,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,GAAG,WAAW,CAAC,kBAAkB,IAAI,EAAE,EAAE,CAAC;YACtD,IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAC/C,KAAK,EACL,GAAG,EACH,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,GAAG,EACH,YAAY,CACb,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAClC,KAAK,EACL,GAAG,CACJ,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;;AAvQH,kCAwQC;AAvQC,wCAAwC;AAChB,iCAAqB,GAAG,sBAAsB,CAAC;AAC/C,+BAAmB,GAAG,oBAAoB,CAAC;AAC3C,8BAAkB,GAAG,mBAAmB,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Logs Stats API client
3
+ * Handles log statistics endpoints
4
+ */
5
+ import { HttpClient } from '../utils/http-client';
6
+ import { AuthStrategy } from '../types/config.types';
7
+ import { GetLogStatsQueryParams, LogStatsSummaryResponse, ErrorStatsQueryParams, ErrorStatsResponse, UserActivityStatsQueryParams, UserActivityStatsResponse, ApplicationStatsResponse } from './types/logs.types';
8
+ /**
9
+ * Logs Stats API class
10
+ * Handles log statistics endpoints
11
+ */
12
+ export declare class LogsStatsApi {
13
+ private httpClient;
14
+ private static readonly LOGS_STATS_SUMMARY_ENDPOINT;
15
+ private static readonly LOGS_STATS_ERRORS_ENDPOINT;
16
+ private static readonly LOGS_STATS_USERS_ENDPOINT;
17
+ private static readonly LOGS_STATS_APPLICATIONS_ENDPOINT;
18
+ constructor(httpClient: HttpClient);
19
+ /**
20
+ * Get log statistics summary
21
+ * @param params - Optional query parameters for filtering
22
+ * @param authStrategy - Optional authentication strategy override
23
+ * @returns Log stats summary response
24
+ */
25
+ getLogStatsSummary(params?: GetLogStatsQueryParams, authStrategy?: AuthStrategy): Promise<LogStatsSummaryResponse>;
26
+ /**
27
+ * Get error statistics
28
+ * @param params - Optional query parameters for filtering
29
+ * @param authStrategy - Optional authentication strategy override
30
+ * @returns Error stats response
31
+ */
32
+ getErrorStats(params?: ErrorStatsQueryParams, authStrategy?: AuthStrategy): Promise<ErrorStatsResponse>;
33
+ /**
34
+ * Get user activity statistics
35
+ * @param params - Optional query parameters for filtering
36
+ * @param authStrategy - Optional authentication strategy override
37
+ * @returns User activity stats response
38
+ */
39
+ getUserActivityStats(params?: UserActivityStatsQueryParams, authStrategy?: AuthStrategy): Promise<UserActivityStatsResponse>;
40
+ /**
41
+ * Get application statistics
42
+ * @param params - Optional query parameters for filtering
43
+ * @param authStrategy - Optional authentication strategy override
44
+ * @returns Application stats response
45
+ */
46
+ getApplicationStats(params?: GetLogStatsQueryParams, authStrategy?: AuthStrategy): Promise<ApplicationStatsResponse>;
47
+ }
48
+ //# sourceMappingURL=logs-stats.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-stats.api.d.ts","sourceRoot":"","sources":["../../src/api/logs-stats.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,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,qBAAa,YAAY;IAOX,OAAO,CAAC,UAAU;IAL9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,2BAA2B,CAAgC;IACnF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAA+B;IACjF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAA8B;IAC/E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gCAAgC,CAAqC;gBAEzE,UAAU,EAAE,UAAU;IAE1C;;;;;OAKG;IACG,kBAAkB,CACtB,MAAM,CAAC,EAAE,sBAAsB,EAC/B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,uBAAuB,CAAC;IAiCnC;;;;;OAKG;IACG,aAAa,CACjB,MAAM,CAAC,EAAE,qBAAqB,EAC9B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,kBAAkB,CAAC;IAiC9B;;;;;OAKG;IACG,oBAAoB,CACxB,MAAM,CAAC,EAAE,4BAA4B,EACrC,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,yBAAyB,CAAC;IAiCrC;;;;;OAKG;IACG,mBAAmB,CACvB,MAAM,CAAC,EAAE,sBAAsB,EAC/B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,wBAAwB,CAAC;CAgCrC"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ /**
3
+ * Logs Stats API client
4
+ * Handles log statistics endpoints
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.LogsStatsApi = void 0;
8
+ /**
9
+ * Logs Stats API class
10
+ * Handles log statistics endpoints
11
+ */
12
+ class LogsStatsApi {
13
+ constructor(httpClient) {
14
+ this.httpClient = httpClient;
15
+ }
16
+ /**
17
+ * Get log statistics summary
18
+ * @param params - Optional query parameters for filtering
19
+ * @param authStrategy - Optional authentication strategy override
20
+ * @returns Log stats summary response
21
+ */
22
+ async getLogStatsSummary(params, authStrategy) {
23
+ try {
24
+ if (authStrategy?.bearerToken) {
25
+ return await this.httpClient.authenticatedRequest('GET', LogsStatsApi.LOGS_STATS_SUMMARY_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
26
+ }
27
+ if (authStrategy) {
28
+ return await this.httpClient.requestWithAuthStrategy('GET', LogsStatsApi.LOGS_STATS_SUMMARY_ENDPOINT, authStrategy, undefined, { params });
29
+ }
30
+ return await this.httpClient.request('GET', LogsStatsApi.LOGS_STATS_SUMMARY_ENDPOINT, undefined, { params });
31
+ }
32
+ catch (error) {
33
+ console.error('Get log stats summary API call failed:', error);
34
+ throw error;
35
+ }
36
+ }
37
+ /**
38
+ * Get error statistics
39
+ * @param params - Optional query parameters for filtering
40
+ * @param authStrategy - Optional authentication strategy override
41
+ * @returns Error stats response
42
+ */
43
+ async getErrorStats(params, authStrategy) {
44
+ try {
45
+ if (authStrategy?.bearerToken) {
46
+ return await this.httpClient.authenticatedRequest('GET', LogsStatsApi.LOGS_STATS_ERRORS_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
47
+ }
48
+ if (authStrategy) {
49
+ return await this.httpClient.requestWithAuthStrategy('GET', LogsStatsApi.LOGS_STATS_ERRORS_ENDPOINT, authStrategy, undefined, { params });
50
+ }
51
+ return await this.httpClient.request('GET', LogsStatsApi.LOGS_STATS_ERRORS_ENDPOINT, undefined, { params });
52
+ }
53
+ catch (error) {
54
+ console.error('Get error stats API call failed:', error);
55
+ throw error;
56
+ }
57
+ }
58
+ /**
59
+ * Get user activity statistics
60
+ * @param params - Optional query parameters for filtering
61
+ * @param authStrategy - Optional authentication strategy override
62
+ * @returns User activity stats response
63
+ */
64
+ async getUserActivityStats(params, authStrategy) {
65
+ try {
66
+ if (authStrategy?.bearerToken) {
67
+ return await this.httpClient.authenticatedRequest('GET', LogsStatsApi.LOGS_STATS_USERS_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
68
+ }
69
+ if (authStrategy) {
70
+ return await this.httpClient.requestWithAuthStrategy('GET', LogsStatsApi.LOGS_STATS_USERS_ENDPOINT, authStrategy, undefined, { params });
71
+ }
72
+ return await this.httpClient.request('GET', LogsStatsApi.LOGS_STATS_USERS_ENDPOINT, undefined, { params });
73
+ }
74
+ catch (error) {
75
+ console.error('Get user activity stats API call failed:', error);
76
+ throw error;
77
+ }
78
+ }
79
+ /**
80
+ * Get application statistics
81
+ * @param params - Optional query parameters for filtering
82
+ * @param authStrategy - Optional authentication strategy override
83
+ * @returns Application stats response
84
+ */
85
+ async getApplicationStats(params, authStrategy) {
86
+ try {
87
+ if (authStrategy?.bearerToken) {
88
+ return await this.httpClient.authenticatedRequest('GET', LogsStatsApi.LOGS_STATS_APPLICATIONS_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
89
+ }
90
+ if (authStrategy) {
91
+ return await this.httpClient.requestWithAuthStrategy('GET', LogsStatsApi.LOGS_STATS_APPLICATIONS_ENDPOINT, authStrategy, undefined, { params });
92
+ }
93
+ return await this.httpClient.request('GET', LogsStatsApi.LOGS_STATS_APPLICATIONS_ENDPOINT, undefined, { params });
94
+ }
95
+ catch (error) {
96
+ console.error('Get application stats API call failed:', error);
97
+ throw error;
98
+ }
99
+ }
100
+ }
101
+ exports.LogsStatsApi = LogsStatsApi;
102
+ // Centralize endpoint URLs as constants
103
+ LogsStatsApi.LOGS_STATS_SUMMARY_ENDPOINT = '/api/v1/logs/stats/summary';
104
+ LogsStatsApi.LOGS_STATS_ERRORS_ENDPOINT = '/api/v1/logs/stats/errors';
105
+ LogsStatsApi.LOGS_STATS_USERS_ENDPOINT = '/api/v1/logs/stats/users';
106
+ LogsStatsApi.LOGS_STATS_APPLICATIONS_ENDPOINT = '/api/v1/logs/stats/applications';
107
+ //# sourceMappingURL=logs-stats.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-stats.api.js","sourceRoot":"","sources":["../../src/api/logs-stats.api.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAcH;;;GAGG;AACH,MAAa,YAAY;IAOvB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,kBAAkB,CACtB,MAA+B,EAC/B,YAA2B;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAC/C,KAAK,EACL,YAAY,CAAC,2BAA2B,EACxC,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,YAAY,CAAC,2BAA2B,EACxC,YAAY,EACZ,SAAS,EACT,EAAE,MAAM,EAAE,CACX,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAClC,KAAK,EACL,YAAY,CAAC,2BAA2B,EACxC,SAAS,EACT,EAAE,MAAM,EAAE,CACX,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,KAAK,CAAC,CAAC;YAC/D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,MAA8B,EAC9B,YAA2B;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,C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AM,EAAE,CACX,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,0CAA0C,EAAE,KAAK,CAAC,CAAC;YACjE,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CACvB,MAA+B,EAC/B,YAA2B;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAC/C,KAAK,EACL,YAAY,CAAC,gCAAgC,EAC7C,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,YAAY,CAAC,gCAAgC,EAC7C,YAAY,EACZ,SAAS,EACT,EAAE,MAAM,EAAE,CACX,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAClC,KAAK,EACL,YAAY,CAAC,gCAAgC,EAC7C,SAAS,EACT,EAAE,MAAM,EAAE,CACX,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,KAAK,CAAC,CAAC;YAC/D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;;AA/KH,oCAgLC;AA/KC,wCAAwC;AAChB,wCAA2B,GAAG,4BAA4B,CAAC;AAC3D,uCAA0B,GAAG,2BAA2B,CAAC;AACzD,sCAAyB,GAAG,0BAA0B,CAAC;AACvD,6CAAgC,GAAG,iCAAiC,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Logs API client
3
+ * Provides typed interfaces for logs-related controller API calls
4
+ * Composed from specialized sub-modules to keep file size manageable
5
+ */
6
+ import { HttpClient } from '../utils/http-client';
7
+ import { AuthStrategy } from '../types/config.types';
8
+ import { CreateLogRequest, CreateLogResponse, BatchLogRequest, BatchLogResponse, ListLogsQueryParams, PaginatedLogsResponse, GeneralLogEntry, AuditLogEntry, JobLogEntry, GetLogStatsQueryParams, LogStatsSummaryResponse, ErrorStatsQueryParams, ErrorStatsResponse, UserActivityStatsQueryParams, UserActivityStatsResponse, ApplicationStatsResponse, ExportLogsQueryParams, ExportLogsResponse } from './types/logs.types';
9
+ /**
10
+ * Logs API class
11
+ * Centralizes all logs-related endpoint URLs and provides typed methods
12
+ * Delegates to specialized sub-modules to keep file size manageable
13
+ */
14
+ export declare class LogsApi {
15
+ private httpClient;
16
+ private readonly create;
17
+ private readonly list;
18
+ private readonly stats;
19
+ private readonly export;
20
+ constructor(httpClient: HttpClient);
21
+ createLog(logEntry: CreateLogRequest, authStrategy?: AuthStrategy): Promise<CreateLogResponse>;
22
+ createBatchLogs(logs: BatchLogRequest, authStrategy?: AuthStrategy): Promise<BatchLogResponse>;
23
+ listGeneralLogs(params?: ListLogsQueryParams, authStrategy?: AuthStrategy): Promise<PaginatedLogsResponse<GeneralLogEntry>>;
24
+ getGeneralLog(id: string, environment?: string, authStrategy?: AuthStrategy): Promise<GeneralLogEntry>;
25
+ listAuditLogs(params?: ListLogsQueryParams, authStrategy?: AuthStrategy): Promise<PaginatedLogsResponse<AuditLogEntry>>;
26
+ getAuditLog(id: string, environment?: string, authStrategy?: AuthStrategy): Promise<AuditLogEntry>;
27
+ listJobLogs(params?: ListLogsQueryParams, authStrategy?: AuthStrategy): Promise<PaginatedLogsResponse<JobLogEntry>>;
28
+ getJobLog(id: string, authStrategy?: AuthStrategy): Promise<JobLogEntry>;
29
+ getLogStatsSummary(params?: GetLogStatsQueryParams, authStrategy?: AuthStrategy): Promise<LogStatsSummaryResponse>;
30
+ getErrorStats(params?: ErrorStatsQueryParams, authStrategy?: AuthStrategy): Promise<ErrorStatsResponse>;
31
+ getUserActivityStats(params?: UserActivityStatsQueryParams, authStrategy?: AuthStrategy): Promise<UserActivityStatsResponse>;
32
+ getApplicationStats(params?: GetLogStatsQueryParams, authStrategy?: AuthStrategy): Promise<ApplicationStatsResponse>;
33
+ exportLogs(params: ExportLogsQueryParams, authStrategy?: AuthStrategy): Promise<string | ExportLogsResponse>;
34
+ }
35
+ //# sourceMappingURL=logs.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.api.d.ts","sourceRoot":"","sources":["../../src/api/logs.api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAKrD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,WAAW,EACX,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,qBAAa,OAAO;IAON,OAAO,CAAC,UAAU;IAL9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;gBAEnB,UAAU,EAAE,UAAU;IAQpC,SAAS,CACb,QAAQ,EAAE,gBAAgB,EAC1B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,iBAAiB,CAAC;IAIvB,eAAe,CACnB,IAAI,EAAE,eAAe,EACrB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,gBAAgB,CAAC;IAKtB,eAAe,CACnB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Y,GAC1B,OAAO,CAAC,MAAM,GAAG,kBAAkB,CAAC;CAGxC"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /**
3
+ * Logs API client
4
+ * Provides typed interfaces for logs-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.LogsApi = void 0;
9
+ const logs_create_api_1 = require("./logs-create.api");
10
+ const logs_list_api_1 = require("./logs-list.api");
11
+ const logs_stats_api_1 = require("./logs-stats.api");
12
+ const logs_export_api_1 = require("./logs-export.api");
13
+ /**
14
+ * Logs API class
15
+ * Centralizes all logs-related endpoint URLs and provides typed methods
16
+ * Delegates to specialized sub-modules to keep file size manageable
17
+ */
18
+ class LogsApi {
19
+ constructor(httpClient) {
20
+ this.httpClient = httpClient;
21
+ this.create = new logs_create_api_1.LogsCreateApi(httpClient);
22
+ this.list = new logs_list_api_1.LogsListApi(httpClient);
23
+ this.stats = new logs_stats_api_1.LogsStatsApi(httpClient);
24
+ this.export = new logs_export_api_1.LogsExportApi(httpClient);
25
+ }
26
+ // Create methods - delegate to LogsCreateApi
27
+ async createLog(logEntry, authStrategy) {
28
+ return this.create.createLog(logEntry, authStrategy);
29
+ }
30
+ async createBatchLogs(logs, authStrategy) {
31
+ return this.create.createBatchLogs(logs, authStrategy);
32
+ }
33
+ // List methods - delegate to LogsListApi
34
+ async listGeneralLogs(params, authStrategy) {
35
+ return this.list.listGeneralLogs(params, authStrategy);
36
+ }
37
+ async getGeneralLog(id, environment, authStrategy) {
38
+ return this.list.getGeneralLog(id, environment, authStrategy);
39
+ }
40
+ async listAuditLogs(params, authStrategy) {
41
+ return this.list.listAuditLogs(params, authStrategy);
42
+ }
43
+ async getAuditLog(id, environment, authStrategy) {
44
+ return this.list.getAuditLog(id, environment, authStrategy);
45
+ }
46
+ async listJobLogs(params, authStrategy) {
47
+ return this.list.listJobLogs(params, authStrategy);
48
+ }
49
+ async getJobLog(id, authStrategy) {
50
+ return this.list.getJobLog(id, authStrategy);
51
+ }
52
+ // Stats methods - delegate to LogsStatsApi
53
+ async getLogStatsSummary(params, authStrategy) {
54
+ return this.stats.getLogStatsSummary(params, authStrategy);
55
+ }
56
+ async getErrorStats(params, authStrategy) {
57
+ return this.stats.getErrorStats(params, authStrategy);
58
+ }
59
+ async getUserActivityStats(params, authStrategy) {
60
+ return this.stats.getUserActivityStats(params, authStrategy);
61
+ }
62
+ async getApplicationStats(params, authStrategy) {
63
+ return this.stats.getApplicationStats(params, authStrategy);
64
+ }
65
+ // Export methods - delegate to LogsExportApi
66
+ async exportLogs(params, authStrategy) {
67
+ return this.export.exportLogs(params, authStrategy);
68
+ }
69
+ }
70
+ exports.LogsApi = LogsApi;
71
+ //# sourceMappingURL=logs.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.api.js","sourceRoot":"","sources":["../../src/api/logs.api.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,uDAAkD;AAClD,mDAA8C;AAC9C,qDAAgD;AAChD,uDAAkD;AAsBlD;;;;GAIG;AACH,MAAa,OAAO;IAOlB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QACxC,IAAI,CAAC,MAAM,GAAG,IAAI,+BAAa,CAAC,UAAU,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,2BAAW,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,6BAAY,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,IAAI,+BAAa,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAED,6CAA6C;IAC7C,KAAK,CAAC,SAAS,CACb,QAA0B,EAC1B,YAA2B;QAE3B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,IAAqB,EACrB,YAA2B;Q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C,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,MAAqC,EACrC,YAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,mBAAmB,CACvB,MAA+B,EAC/B,YAA2B;QAE3B,OAAO,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC9D,CAAC;IAED,6CAA6C;IAC7C,KAAK,CAAC,UAAU,CACd,MAA6B,EAC7B,YAA2B;QAE3B,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACtD,CAAC;CACF;AA9GD,0BA8GC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Permissions API client
3
+ * Provides typed interfaces for permissions-related controller API calls
4
+ */
5
+ import { HttpClient } from '../utils/http-client';
6
+ import { AuthStrategy } from '../types/config.types';
7
+ import { GetPermissionsQueryParams, GetPermissionsResponse, RefreshPermissionsResponse } from './types/permissions.types';
8
+ /**
9
+ * Permissions API class
10
+ * Centralizes all permissions-related endpoint URLs and provides typed methods
11
+ */
12
+ export declare class PermissionsApi {
13
+ private httpClient;
14
+ private static readonly PERMISSIONS_ENDPOINT;
15
+ private static readonly PERMISSIONS_REFRESH_ENDPOINT;
16
+ constructor(httpClient: HttpClient);
17
+ /**
18
+ * Get user permissions
19
+ * @param params - Optional query parameters (environment, application)
20
+ * @param authStrategy - Optional authentication strategy override
21
+ * @returns Permissions response with user permissions array
22
+ */
23
+ getPermissions(params?: GetPermissionsQueryParams, authStrategy?: AuthStrategy): Promise<GetPermissionsResponse>;
24
+ /**
25
+ * Refresh user permissions
26
+ * @param authStrategy - Optional authentication strategy override
27
+ * @returns Refresh permissions response with updated permissions array
28
+ */
29
+ refreshPermissions(authStrategy?: AuthStrategy): Promise<RefreshPermissionsResponse>;
30
+ }
31
+ //# sourceMappingURL=permissions.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.api.d.ts","sourceRoot":"","sources":["../../src/api/permissions.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,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AAEnC;;;GAGG;AACH,qBAAa,cAAc;IAKb,OAAO,CAAC,UAAU;IAH9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAA8B;IAC1E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,4BAA4B,CAAsC;gBAEtE,UAAU,EAAE,UAAU;IAE1C;;;;;OAKG;IACG,cAAc,CAClB,MAAM,CAAC,EAAE,yBAAyB,EAClC,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,sBAAsB,CAAC;IA4BlC;;;;OAIG;IACG,kBAAkB,CACtB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,0BAA0B,CAAC;CAyBvC"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /**
3
+ * Permissions API client
4
+ * Provides typed interfaces for permissions-related controller API calls
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.PermissionsApi = void 0;
8
+ /**
9
+ * Permissions API class
10
+ * Centralizes all permissions-related endpoint URLs and provides typed methods
11
+ */
12
+ class PermissionsApi {
13
+ constructor(httpClient) {
14
+ this.httpClient = httpClient;
15
+ }
16
+ /**
17
+ * Get user permissions
18
+ * @param params - Optional query parameters (environment, application)
19
+ * @param authStrategy - Optional authentication strategy override
20
+ * @returns Permissions response with user permissions array
21
+ */
22
+ async getPermissions(params, authStrategy) {
23
+ try {
24
+ if (authStrategy?.bearerToken) {
25
+ return await this.httpClient.authenticatedRequest('GET', PermissionsApi.PERMISSIONS_ENDPOINT, authStrategy.bearerToken, undefined, { params }, authStrategy);
26
+ }
27
+ if (authStrategy) {
28
+ return await this.httpClient.requestWithAuthStrategy('GET', PermissionsApi.PERMISSIONS_ENDPOINT, authStrategy, undefined, { params });
29
+ }
30
+ throw new Error('getPermissions requires authentication - provide authStrategy with bearerToken');
31
+ }
32
+ catch (error) {
33
+ console.error('Get permissions API call failed:', error);
34
+ throw error;
35
+ }
36
+ }
37
+ /**
38
+ * Refresh user permissions
39
+ * @param authStrategy - Optional authentication strategy override
40
+ * @returns Refresh permissions response with updated permissions array
41
+ */
42
+ async refreshPermissions(authStrategy) {
43
+ try {
44
+ if (authStrategy?.bearerToken) {
45
+ return await this.httpClient.authenticatedRequest('GET', PermissionsApi.PERMISSIONS_REFRESH_ENDPOINT, authStrategy.bearerToken, undefined, undefined, authStrategy);
46
+ }
47
+ if (authStrategy) {
48
+ return await this.httpClient.requestWithAuthStrategy('GET', PermissionsApi.PERMISSIONS_REFRESH_ENDPOINT, authStrategy);
49
+ }
50
+ throw new Error('refreshPermissions requires authentication - provide authStrategy with bearerToken');
51
+ }
52
+ catch (error) {
53
+ console.error('Refresh permissions API call failed:', error);
54
+ throw error;
55
+ }
56
+ }
57
+ }
58
+ exports.PermissionsApi = PermissionsApi;
59
+ // Centralize endpoint URLs as constants
60
+ PermissionsApi.PERMISSIONS_ENDPOINT = '/api/v1/auth/permissions';
61
+ PermissionsApi.PERMISSIONS_REFRESH_ENDPOINT = '/api/v1/auth/permissions/refresh';
62
+ //# sourceMappingURL=permissions.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.api.js","sourceRoot":"","sources":["../../src/api/permissions.api.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAUH;;;GAGG;AACH,MAAa,cAAc;IAKzB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CA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;YACf,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;YAC7D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;;AA3EH,wCA4EC;AA3EC,wCAAwC;AAChB,mCAAoB,GAAG,0BAA0B,CAAC;AAClD,2CAA4B,GAAG,kCAAkC,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Roles API client
3
+ * Provides typed interfaces for roles-related controller API calls
4
+ */
5
+ import { HttpClient } from '../utils/http-client';
6
+ import { AuthStrategy } from '../types/config.types';
7
+ import { GetRolesQueryParams, GetRolesResponse, RefreshRolesResponse } from './types/roles.types';
8
+ /**
9
+ * Roles API class
10
+ * Centralizes all roles-related endpoint URLs and provides typed methods
11
+ */
12
+ export declare class RolesApi {
13
+ private httpClient;
14
+ private static readonly ROLES_ENDPOINT;
15
+ private static readonly ROLES_REFRESH_ENDPOINT;
16
+ constructor(httpClient: HttpClient);
17
+ /**
18
+ * Get user roles
19
+ * @param params - Optional query parameters (environment, application)
20
+ * @param authStrategy - Optional authentication strategy override
21
+ * @returns Roles response with user roles array
22
+ */
23
+ getRoles(params?: GetRolesQueryParams, authStrategy?: AuthStrategy): Promise<GetRolesResponse>;
24
+ /**
25
+ * Refresh user roles
26
+ * @param authStrategy - Optional authentication strategy override
27
+ * @returns Refresh roles response with updated roles array
28
+ */
29
+ refreshRoles(authStrategy?: AuthStrategy): Promise<RefreshRolesResponse>;
30
+ }
31
+ //# sourceMappingURL=roles.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roles.api.d.ts","sourceRoot":"","sources":["../../src/api/roles.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,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,qBAAa,QAAQ;IAKP,OAAO,CAAC,UAAU;IAH9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAwB;IAC9D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAgC;gBAE1D,UAAU,EAAE,UAAU;IAE1C;;;;;OAKG;IACG,QAAQ,CACZ,MAAM,CAAC,EAAE,mBAAmB,EAC5B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,gBAAgB,CAAC;IA4B5B;;;;OAIG;IACG,YAAY,CAChB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,oBAAoB,CAAC;CAyBjC"}