@aifabrix/miso-client 4.4.1 → 4.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +20 -38
- package/dist/api/auth-token.api.d.ts.map +1 -1
- package/dist/api/auth-token.api.js +45 -48
- package/dist/api/auth-token.api.js.map +1 -1
- package/dist/api/logs-create.api.d.ts.map +1 -1
- package/dist/api/logs-create.api.js +37 -50
- package/dist/api/logs-create.api.js.map +1 -1
- package/dist/api/types/applications.types.d.ts +13 -6
- package/dist/api/types/applications.types.d.ts.map +1 -1
- package/dist/api/types/applications.types.js +9 -0
- package/dist/api/types/applications.types.js.map +1 -1
- package/dist/express/client-token-endpoint.d.ts.map +1 -1
- package/dist/express/client-token-endpoint.js +88 -82
- package/dist/express/client-token-endpoint.js.map +1 -1
- package/dist/express/error-handler.d.ts.map +1 -1
- package/dist/express/error-handler.js +15 -7
- package/dist/express/error-handler.js.map +1 -1
- package/dist/express/error-types.d.ts +8 -1
- package/dist/express/error-types.d.ts.map +1 -1
- package/dist/express/error-types.js +11 -5
- package/dist/express/error-types.js.map +1 -1
- package/dist/express/index.d.ts +1 -1
- package/dist/express/index.d.ts.map +1 -1
- package/dist/express/response-helper.d.ts.map +1 -1
- package/dist/express/response-helper.js +4 -1
- package/dist/express/response-helper.js.map +1 -1
- package/dist/express/validation-helper.d.ts +1 -1
- package/dist/express/validation-helper.d.ts.map +1 -1
- package/dist/express/validation-helper.js +8 -10
- package/dist/express/validation-helper.js.map +1 -1
- package/dist/index.d.ts +3 -353
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -539
- package/dist/index.js.map +1 -1
- package/dist/miso-client.d.ts +82 -0
- package/dist/miso-client.d.ts.map +1 -0
- package/dist/miso-client.js +187 -0
- package/dist/miso-client.js.map +1 -0
- package/dist/sdk-exports.d.ts +56 -0
- package/dist/sdk-exports.d.ts.map +1 -0
- package/dist/sdk-exports.js +105 -0
- package/dist/sdk-exports.js.map +1 -0
- package/dist/services/application-context.service.d.ts +9 -1
- package/dist/services/application-context.service.d.ts.map +1 -1
- package/dist/services/application-context.service.js +46 -60
- package/dist/services/application-context.service.js.map +1 -1
- package/dist/services/auth-cache-helpers.d.ts.map +1 -1
- package/dist/services/auth-cache-helpers.js +4 -6
- package/dist/services/auth-cache-helpers.js.map +1 -1
- package/dist/services/auth-error-handler.d.ts.map +1 -1
- package/dist/services/auth-error-handler.js +12 -1
- package/dist/services/auth-error-handler.js.map +1 -1
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js +9 -13
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/browser-permission.service.d.ts +4 -4
- package/dist/services/browser-permission.service.d.ts.map +1 -1
- package/dist/services/browser-permission.service.js +35 -80
- package/dist/services/browser-permission.service.js.map +1 -1
- package/dist/services/browser-role.service.d.ts +4 -4
- package/dist/services/browser-role.service.d.ts.map +1 -1
- package/dist/services/browser-role.service.js +40 -96
- package/dist/services/browser-role.service.js.map +1 -1
- package/dist/services/cache.service.d.ts +1 -0
- package/dist/services/cache.service.d.ts.map +1 -1
- package/dist/services/cache.service.js +19 -32
- package/dist/services/cache.service.js.map +1 -1
- package/dist/services/logger/logger-context.d.ts +17 -17
- package/dist/services/logger/logger-context.d.ts.map +1 -1
- package/dist/services/logger/logger-context.js +7 -17
- package/dist/services/logger/logger-context.js.map +1 -1
- package/dist/services/logger/logger-http-utils.d.ts +9 -0
- package/dist/services/logger/logger-http-utils.d.ts.map +1 -0
- package/dist/services/logger/logger-http-utils.js +45 -0
- package/dist/services/logger/logger-http-utils.js.map +1 -0
- package/dist/services/logger/logger.service.d.ts +1 -4
- package/dist/services/logger/logger.service.d.ts.map +1 -1
- package/dist/services/logger/logger.service.js +61 -77
- package/dist/services/logger/logger.service.js.map +1 -1
- package/dist/services/permission.service.d.ts.map +1 -1
- package/dist/services/permission.service.js +17 -30
- package/dist/services/permission.service.js.map +1 -1
- package/dist/services/role.service.d.ts.map +1 -1
- package/dist/services/role.service.js +12 -20
- package/dist/services/role.service.js.map +1 -1
- package/dist/services/token-validation.service.js +1 -3
- package/dist/services/token-validation.service.js.map +1 -1
- package/dist/types/config.types.d.ts +1 -0
- package/dist/types/config.types.d.ts.map +1 -1
- package/dist/types/config.types.js.map +1 -1
- package/dist/utils/audit-log-queue.d.ts +3 -0
- package/dist/utils/audit-log-queue.d.ts.map +1 -1
- package/dist/utils/audit-log-queue.js +47 -66
- package/dist/utils/audit-log-queue.js.map +1 -1
- package/dist/utils/client-token-manager.d.ts +0 -7
- package/dist/utils/client-token-manager.d.ts.map +1 -1
- package/dist/utils/client-token-manager.js +40 -46
- package/dist/utils/client-token-manager.js.map +1 -1
- package/dist/utils/config-loader.d.ts +0 -5
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +14 -11
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/console-logger.d.ts +4 -0
- package/dist/utils/console-logger.d.ts.map +1 -1
- package/dist/utils/console-logger.js +21 -5
- package/dist/utils/console-logger.js.map +1 -1
- package/dist/utils/data-client-audit.d.ts +19 -1
- package/dist/utils/data-client-audit.d.ts.map +1 -1
- package/dist/utils/data-client-audit.js +87 -117
- package/dist/utils/data-client-audit.js.map +1 -1
- package/dist/utils/data-client-auth.d.ts.map +1 -1
- package/dist/utils/data-client-auth.js +139 -95
- package/dist/utils/data-client-auth.js.map +1 -1
- package/dist/utils/data-client-auto-init.d.ts.map +1 -1
- package/dist/utils/data-client-auto-init.js +57 -72
- package/dist/utils/data-client-auto-init.js.map +1 -1
- package/dist/utils/data-client-init.d.ts.map +1 -1
- package/dist/utils/data-client-init.js +3 -3
- package/dist/utils/data-client-init.js.map +1 -1
- package/dist/utils/data-client-oauth.d.ts.map +1 -1
- package/dist/utils/data-client-oauth.js +84 -60
- package/dist/utils/data-client-oauth.js.map +1 -1
- package/dist/utils/data-client-redirect.d.ts.map +1 -1
- package/dist/utils/data-client-redirect.js +75 -98
- package/dist/utils/data-client-redirect.js.map +1 -1
- package/dist/utils/data-client-request.d.ts +24 -5
- package/dist/utils/data-client-request.d.ts.map +1 -1
- package/dist/utils/data-client-request.js +80 -42
- package/dist/utils/data-client-request.js.map +1 -1
- package/dist/utils/data-client-response.d.ts +63 -15
- package/dist/utils/data-client-response.d.ts.map +1 -1
- package/dist/utils/data-client-response.js +89 -33
- package/dist/utils/data-client-response.js.map +1 -1
- package/dist/utils/data-client.d.ts +4 -0
- package/dist/utils/data-client.d.ts.map +1 -1
- package/dist/utils/data-client.js +57 -30
- package/dist/utils/data-client.js.map +1 -1
- package/dist/utils/environment-token.d.ts.map +1 -1
- package/dist/utils/environment-token.js +49 -59
- package/dist/utils/environment-token.js.map +1 -1
- package/dist/utils/error-extractor.d.ts.map +1 -1
- package/dist/utils/error-extractor.js +56 -79
- package/dist/utils/error-extractor.js.map +1 -1
- package/dist/utils/filter-colon.utils.d.ts.map +1 -1
- package/dist/utils/filter-colon.utils.js +34 -45
- package/dist/utils/filter-colon.utils.js.map +1 -1
- package/dist/utils/filter-schema-loader.d.ts +12 -0
- package/dist/utils/filter-schema-loader.d.ts.map +1 -0
- package/dist/utils/filter-schema-loader.js +69 -0
- package/dist/utils/filter-schema-loader.js.map +1 -0
- package/dist/utils/filter-schema.utils.d.ts +1 -14
- package/dist/utils/filter-schema.utils.d.ts.map +1 -1
- package/dist/utils/filter-schema.utils.js +78 -136
- package/dist/utils/filter-schema.utils.js.map +1 -1
- package/dist/utils/filter.utils.d.ts.map +1 -1
- package/dist/utils/filter.utils.js +38 -36
- package/dist/utils/filter.utils.js.map +1 -1
- package/dist/utils/http-client-audit.d.ts.map +1 -1
- package/dist/utils/http-client-audit.js +3 -12
- package/dist/utils/http-client-audit.js.map +1 -1
- package/dist/utils/http-client-masking.d.ts +13 -2
- package/dist/utils/http-client-masking.d.ts.map +1 -1
- package/dist/utils/http-client-masking.js +27 -27
- package/dist/utils/http-client-masking.js.map +1 -1
- package/dist/utils/http-response-validator.d.ts.map +1 -1
- package/dist/utils/http-response-validator.js +8 -3
- package/dist/utils/http-response-validator.js.map +1 -1
- package/dist/utils/internal-http-client.d.ts.map +1 -1
- package/dist/utils/internal-http-client.js +5 -3
- package/dist/utils/internal-http-client.js.map +1 -1
- package/dist/utils/response-validator.d.ts.map +1 -1
- package/dist/utils/response-validator.js +29 -44
- package/dist/utils/response-validator.js.map +1 -1
- package/dist/utils/sensitive-fields.loader.d.ts +0 -7
- package/dist/utils/sensitive-fields.loader.d.ts.map +1 -1
- package/dist/utils/sensitive-fields.loader.js +68 -114
- package/dist/utils/sensitive-fields.loader.js.map +1 -1
- package/dist/utils/token-utils.d.ts.map +1 -1
- package/dist/utils/token-utils.js +28 -37
- package/dist/utils/token-utils.js.map +1 -1
- package/package.json +16 -15
package/dist/index.d.ts
CHANGED
|
@@ -1,356 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Main MisoClient SDK
|
|
2
|
+
* Main MisoClient SDK entry point
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { MisoClientConfig, UserInfo, AuthStrategy } from "./types/config.types";
|
|
7
|
-
import { OriginValidationResult } from "./utils/origin-validator";
|
|
8
|
-
import { Request } from "express";
|
|
9
|
-
import { EncryptionService } from "./services/encryption.service";
|
|
10
|
-
import { TokenValidationOptions, TokenValidationResult, KeycloakConfig } from "./types/token-validation.types";
|
|
11
|
-
import type { UpdateSelfStatusRequest, UpdateSelfStatusResponse, ApplicationStatusResponse } from "./api/types/applications.types";
|
|
12
|
-
export declare class MisoClient {
|
|
13
|
-
private config;
|
|
14
|
-
private httpClient;
|
|
15
|
-
private apiClient;
|
|
16
|
-
private redis;
|
|
17
|
-
private auth;
|
|
18
|
-
private roles;
|
|
19
|
-
private permissions;
|
|
20
|
-
private logger;
|
|
21
|
-
private cacheService;
|
|
22
|
-
private tokenValidation;
|
|
23
|
-
private encryptionService;
|
|
24
|
-
private initialized;
|
|
25
|
-
constructor(config: MisoClientConfig);
|
|
26
|
-
/**
|
|
27
|
-
* Initialize the client (connect to Redis if configured)
|
|
28
|
-
*/
|
|
29
|
-
initialize(): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* Disconnect from Redis
|
|
32
|
-
*/
|
|
33
|
-
disconnect(): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Check if client is initialized
|
|
36
|
-
*/
|
|
37
|
-
isInitialized(): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Extract Bearer token from request headers
|
|
40
|
-
* Supports common request object patterns (Express, Fastify, Next.js)
|
|
41
|
-
*/
|
|
42
|
-
getToken(req: {
|
|
43
|
-
headers: {
|
|
44
|
-
authorization?: string;
|
|
45
|
-
};
|
|
46
|
-
}): string | null;
|
|
47
|
-
/**
|
|
48
|
-
* Validate request origin against configured allowed origins
|
|
49
|
-
* Uses allowedOrigins from client configuration if not provided
|
|
50
|
-
*
|
|
51
|
-
* @param req - Express Request object
|
|
52
|
-
* @param allowedOrigins - Optional array of allowed origins (defaults to config.allowedOrigins)
|
|
53
|
-
* @returns Validation result with valid flag and optional error message
|
|
54
|
-
*/
|
|
55
|
-
validateOrigin(req: Request, allowedOrigins?: string[]): OriginValidationResult;
|
|
56
|
-
/**
|
|
57
|
-
* Get environment token using client credentials.
|
|
58
|
-
* @returns Environment token string or empty string on failure.
|
|
59
|
-
*/
|
|
60
|
-
getEnvironmentToken(): Promise<string>;
|
|
61
|
-
/**
|
|
62
|
-
* Initiate login flow and return login URL for browser redirect.
|
|
63
|
-
* @param params - Login parameters.
|
|
64
|
-
* @param params.redirect - Final destination URL after authentication.
|
|
65
|
-
* @param params.state - Optional CSRF protection token.
|
|
66
|
-
* @returns Login response with loginUrl and state.
|
|
67
|
-
*/
|
|
68
|
-
login(params: {
|
|
69
|
-
redirect: string;
|
|
70
|
-
state?: string;
|
|
71
|
-
}): Promise<import("./types/config.types").LoginResponse>;
|
|
72
|
-
/**
|
|
73
|
-
* Validate token with controller.
|
|
74
|
-
* @param token - User JWT token.
|
|
75
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
76
|
-
* @returns True if token is valid, otherwise false.
|
|
77
|
-
*/
|
|
78
|
-
validateToken(token: string, authStrategy?: AuthStrategy): Promise<boolean>;
|
|
79
|
-
/**
|
|
80
|
-
* Get user information from token.
|
|
81
|
-
* @param token - User JWT token.
|
|
82
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
83
|
-
* @returns User info or null when not available.
|
|
84
|
-
*/
|
|
85
|
-
getUser(token: string, authStrategy?: AuthStrategy): Promise<UserInfo | null>;
|
|
86
|
-
/**
|
|
87
|
-
* Get user information from GET /api/v1/auth/user endpoint.
|
|
88
|
-
* @param token - User JWT token.
|
|
89
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
90
|
-
* @returns User info or null when not available.
|
|
91
|
-
*/
|
|
92
|
-
getUserInfo(token: string, authStrategy?: AuthStrategy): Promise<UserInfo | null>;
|
|
93
|
-
/**
|
|
94
|
-
* Check if user is authenticated.
|
|
95
|
-
* @param token - User JWT token.
|
|
96
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
97
|
-
* @returns True if authenticated, otherwise false.
|
|
98
|
-
*/
|
|
99
|
-
isAuthenticated(token: string, authStrategy?: AuthStrategy): Promise<boolean>;
|
|
100
|
-
/**
|
|
101
|
-
* Logout user.
|
|
102
|
-
* @param params - Logout parameters.
|
|
103
|
-
* @param params.token - User JWT token.
|
|
104
|
-
* @returns Logout response.
|
|
105
|
-
*/
|
|
106
|
-
logout(params: {
|
|
107
|
-
token: string;
|
|
108
|
-
}): Promise<import("./types/config.types").LogoutResponse>;
|
|
109
|
-
/**
|
|
110
|
-
* Refresh user access token using refresh token.
|
|
111
|
-
* @param refreshToken - Refresh token.
|
|
112
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
113
|
-
* @returns Refresh token response or null on failure.
|
|
114
|
-
*/
|
|
115
|
-
refreshToken(refreshToken: string, authStrategy?: AuthStrategy): Promise<import("./types/config.types").RefreshTokenResponse | null>;
|
|
116
|
-
/**
|
|
117
|
-
* Validate token locally using JWKS (no API call).
|
|
118
|
-
* @param token - User JWT token.
|
|
119
|
-
* @param options - Optional validation options.
|
|
120
|
-
* @returns Validation result.
|
|
121
|
-
*/
|
|
122
|
-
validateTokenLocal(token: string, options?: TokenValidationOptions): Promise<TokenValidationResult>;
|
|
123
|
-
/**
|
|
124
|
-
* Set or update Keycloak configuration for local validation.
|
|
125
|
-
* @param config - Keycloak configuration.
|
|
126
|
-
*/
|
|
127
|
-
setKeycloakConfig(config: KeycloakConfig): void;
|
|
128
|
-
/**
|
|
129
|
-
* Clear JWKS cache.
|
|
130
|
-
* @param jwksUri - Optional JWKS URI to clear.
|
|
131
|
-
*/
|
|
132
|
-
clearJwksCache(jwksUri?: string): void;
|
|
133
|
-
/**
|
|
134
|
-
* Clear validation result cache.
|
|
135
|
-
*/
|
|
136
|
-
clearValidationCache(): void;
|
|
137
|
-
/**
|
|
138
|
-
* Clear all token validation caches (JWKS + results).
|
|
139
|
-
*/
|
|
140
|
-
clearAllTokenCaches(): void;
|
|
141
|
-
/**
|
|
142
|
-
* Get user roles (cached if Redis available).
|
|
143
|
-
* @param token - User JWT token.
|
|
144
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
145
|
-
* @returns Array of roles.
|
|
146
|
-
*/
|
|
147
|
-
getRoles(token: string, authStrategy?: AuthStrategy): Promise<string[]>;
|
|
148
|
-
/**
|
|
149
|
-
* Check if user has specific role.
|
|
150
|
-
* @param token - User JWT token.
|
|
151
|
-
* @param role - Role to check.
|
|
152
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
153
|
-
* @returns True if user has the role.
|
|
154
|
-
*/
|
|
155
|
-
hasRole(token: string, role: string, authStrategy?: AuthStrategy): Promise<boolean>;
|
|
156
|
-
/**
|
|
157
|
-
* Check if user has any of the specified roles.
|
|
158
|
-
* @param token - User JWT token.
|
|
159
|
-
* @param roles - Roles to check.
|
|
160
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
161
|
-
* @returns True if user has any of the roles.
|
|
162
|
-
*/
|
|
163
|
-
hasAnyRole(token: string, roles: string[], authStrategy?: AuthStrategy): Promise<boolean>;
|
|
164
|
-
/**
|
|
165
|
-
* Check if user has all of the specified roles.
|
|
166
|
-
* @param token - User JWT token.
|
|
167
|
-
* @param roles - Roles to check.
|
|
168
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
169
|
-
* @returns True if user has all roles.
|
|
170
|
-
*/
|
|
171
|
-
hasAllRoles(token: string, roles: string[], authStrategy?: AuthStrategy): Promise<boolean>;
|
|
172
|
-
/**
|
|
173
|
-
* Force refresh roles from controller (bypass cache).
|
|
174
|
-
* @param token - User JWT token.
|
|
175
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
176
|
-
* @returns Array of roles.
|
|
177
|
-
*/
|
|
178
|
-
refreshRoles(token: string, authStrategy?: AuthStrategy): Promise<string[]>;
|
|
179
|
-
/**
|
|
180
|
-
* Get user permissions (cached if Redis available).
|
|
181
|
-
* @param token - User JWT token.
|
|
182
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
183
|
-
* @returns Array of permissions.
|
|
184
|
-
*/
|
|
185
|
-
getPermissions(token: string, authStrategy?: AuthStrategy): Promise<string[]>;
|
|
186
|
-
/**
|
|
187
|
-
* Check if user has specific permission.
|
|
188
|
-
* @param token - User JWT token.
|
|
189
|
-
* @param permission - Permission to check.
|
|
190
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
191
|
-
* @returns True if user has permission.
|
|
192
|
-
*/
|
|
193
|
-
hasPermission(token: string, permission: string, authStrategy?: AuthStrategy): Promise<boolean>;
|
|
194
|
-
/**
|
|
195
|
-
* Check if user has any of the specified permissions.
|
|
196
|
-
* @param token - User JWT token.
|
|
197
|
-
* @param permissions - Permissions to check.
|
|
198
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
199
|
-
* @returns True if user has any permission.
|
|
200
|
-
*/
|
|
201
|
-
hasAnyPermission(token: string, permissions: string[], authStrategy?: AuthStrategy): Promise<boolean>;
|
|
202
|
-
/**
|
|
203
|
-
* Check if user has all of the specified permissions.
|
|
204
|
-
* @param token - User JWT token.
|
|
205
|
-
* @param permissions - Permissions to check.
|
|
206
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
207
|
-
* @returns True if user has all permissions.
|
|
208
|
-
*/
|
|
209
|
-
hasAllPermissions(token: string, permissions: string[], authStrategy?: AuthStrategy): Promise<boolean>;
|
|
210
|
-
/**
|
|
211
|
-
* Force refresh permissions from controller (bypass cache).
|
|
212
|
-
* @param token - User JWT token.
|
|
213
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
214
|
-
* @returns Array of permissions.
|
|
215
|
-
*/
|
|
216
|
-
refreshPermissions(token: string, authStrategy?: AuthStrategy): Promise<string[]>;
|
|
217
|
-
/**
|
|
218
|
-
* Clear cached permissions for a user.
|
|
219
|
-
* @param token - User JWT token.
|
|
220
|
-
* @param authStrategy - Optional authentication strategy override.
|
|
221
|
-
*/
|
|
222
|
-
clearPermissionsCache(token: string, authStrategy?: AuthStrategy): Promise<void>;
|
|
223
|
-
/**
|
|
224
|
-
* Get logger service for application logging
|
|
225
|
-
*/
|
|
226
|
-
get log(): LoggerService;
|
|
227
|
-
/**
|
|
228
|
-
* Get encryption service for security parameter management
|
|
229
|
-
* Provides encrypt/decrypt methods that call the controller
|
|
230
|
-
*/
|
|
231
|
-
get encryption(): EncryptionService;
|
|
232
|
-
/**
|
|
233
|
-
* Get cache service for generic caching
|
|
234
|
-
*/
|
|
235
|
-
get cache(): CacheService;
|
|
236
|
-
/**
|
|
237
|
-
* Update the current application's status and URLs (server-side only).
|
|
238
|
-
* Uses client credentials or provided authStrategy.
|
|
239
|
-
* When envKey is omitted, resolves from application context (client token / clientId).
|
|
240
|
-
*
|
|
241
|
-
* @param body - Update request (status, url, internalUrl, port)
|
|
242
|
-
* @param options - Optional envKey and authStrategy; if envKey omitted, uses context (throws if context missing)
|
|
243
|
-
* @returns Update response with success and optional application data
|
|
244
|
-
*/
|
|
245
|
-
updateMyApplicationStatus(body: UpdateSelfStatusRequest, options?: {
|
|
246
|
-
envKey?: string;
|
|
247
|
-
authStrategy?: AuthStrategy;
|
|
248
|
-
}): Promise<UpdateSelfStatusResponse>;
|
|
249
|
-
/**
|
|
250
|
-
* Get any application's status and URLs (without configuration).
|
|
251
|
-
* Uses client credentials or provided authStrategy.
|
|
252
|
-
*
|
|
253
|
-
* @param envKey - Environment key
|
|
254
|
-
* @param appKey - Application key
|
|
255
|
-
* @param authStrategy - Optional authentication strategy override
|
|
256
|
-
* @returns Application status response with metadata
|
|
257
|
-
*/
|
|
258
|
-
getApplicationStatus(envKey: string, appKey: string, authStrategy?: AuthStrategy): Promise<ApplicationStatusResponse>;
|
|
259
|
-
/**
|
|
260
|
-
* Get the current application's status and URLs (server-side only).
|
|
261
|
-
* Uses envKey and appKey from application context when not provided.
|
|
262
|
-
*
|
|
263
|
-
* @param options - Optional envKey and appKey; if omitted, uses context
|
|
264
|
-
* @param authStrategy - Optional authentication strategy override
|
|
265
|
-
* @returns Application status response with metadata
|
|
266
|
-
*/
|
|
267
|
-
getMyApplicationStatus(options?: {
|
|
268
|
-
envKey?: string;
|
|
269
|
-
appKey?: string;
|
|
270
|
-
}, authStrategy?: AuthStrategy): Promise<ApplicationStatusResponse>;
|
|
271
|
-
/**
|
|
272
|
-
* Get current configuration
|
|
273
|
-
*/
|
|
274
|
-
getConfig(): MisoClientConfig;
|
|
275
|
-
/**
|
|
276
|
-
* Check if Redis is connected.
|
|
277
|
-
* @returns True if Redis connection is active.
|
|
278
|
-
*/
|
|
279
|
-
isRedisConnected(): boolean;
|
|
280
|
-
/**
|
|
281
|
-
* Make request with authentication strategy.
|
|
282
|
-
* @param method - HTTP method.
|
|
283
|
-
* @param url - Request URL.
|
|
284
|
-
* @param authStrategy - Authentication strategy to use.
|
|
285
|
-
* @param data - Optional request data.
|
|
286
|
-
* @param config - Optional Axios config overrides.
|
|
287
|
-
* @returns Parsed response data.
|
|
288
|
-
*/
|
|
289
|
-
requestWithAuthStrategy<T>(method: "GET" | "POST" | "PUT" | "DELETE", url: string, authStrategy: AuthStrategy, data?: unknown, config?: import("axios").AxiosRequestConfig): Promise<T>;
|
|
290
|
-
/**
|
|
291
|
-
* Create authentication strategy helper.
|
|
292
|
-
* @param methods - Auth methods in priority order.
|
|
293
|
-
* @param bearerToken - Optional bearer token.
|
|
294
|
-
* @param apiKey - Optional API key.
|
|
295
|
-
* @returns Authentication strategy.
|
|
296
|
-
*/
|
|
297
|
-
createAuthStrategy(methods: ("bearer" | "client-token" | "client-credentials" | "api-key")[], bearerToken?: string, apiKey?: string): AuthStrategy;
|
|
298
|
-
/**
|
|
299
|
-
* Get default authentication strategy.
|
|
300
|
-
* @param bearerToken - Optional bearer token.
|
|
301
|
-
* @returns Default authentication strategy.
|
|
302
|
-
*/
|
|
303
|
-
getDefaultAuthStrategy(bearerToken?: string): AuthStrategy;
|
|
304
|
-
}
|
|
305
|
-
export * from "./types/config.types";
|
|
306
|
-
export type * from "./types/pagination.types";
|
|
307
|
-
export * from "./types/filter.types";
|
|
308
|
-
export * from "./types/filter-schema.types";
|
|
309
|
-
export type * from "./types/sort.types";
|
|
310
|
-
export type { ErrorResponse as ErrorResponseFromErrors, ErrorEnvelope, AuthErrorMethod, } from "./types/errors.types";
|
|
311
|
-
export { detectAuthMethodFromHeaders } from "./utils/http-error-handler";
|
|
312
|
-
export { AuthService } from "./services/auth.service";
|
|
313
|
-
export { RoleService } from "./services/role.service";
|
|
314
|
-
export { PermissionService } from "./services/permission.service";
|
|
315
|
-
export { BrowserPermissionService } from "./services/browser-permission.service";
|
|
316
|
-
export { BrowserRoleService } from "./services/browser-role.service";
|
|
317
|
-
export { LoggerService } from "./services/logger";
|
|
318
|
-
export { RedisService } from "./services/redis.service";
|
|
319
|
-
export { CacheService } from "./services/cache.service";
|
|
320
|
-
export { HttpClient } from "./utils/http-client";
|
|
321
|
-
export { getLogger } from "./services/logger/unified-logger.factory";
|
|
322
|
-
export { LoggerContextStorage } from "./services/logger";
|
|
323
|
-
export type { UnifiedLogger, } from "./services/logger/unified-logger.service";
|
|
324
|
-
export { loadConfig } from "./utils/config-loader";
|
|
325
|
-
export { validateOrigin } from "./utils/origin-validator";
|
|
326
|
-
export { getEnvironmentToken } from "./utils/environment-token";
|
|
327
|
-
export { extractClientTokenInfo } from "./utils/token-utils";
|
|
328
|
-
export type { ClientTokenInfo } from "./utils/token-utils";
|
|
329
|
-
export type { OriginValidationResult } from "./utils/origin-validator";
|
|
330
|
-
export { resolveControllerUrl, resolveKeycloakUrl, isBrowser, validateUrl } from "./utils/controller-url-resolver";
|
|
331
|
-
export { extractLoggingContext } from "./utils/logging-helpers";
|
|
332
|
-
export type { IndexedLoggingContext, HasKey, HasExternalSystem } from "./utils/logging-helpers";
|
|
333
|
-
export { extractRequestContext } from "./utils/request-context";
|
|
334
|
-
export type { RequestContext } from "./utils/request-context";
|
|
335
|
-
export * from "./utils/pagination.utils";
|
|
336
|
-
export * from "./utils/filter.utils";
|
|
337
|
-
export * from "./utils/filter-schema.utils";
|
|
338
|
-
export * from "./utils/sort.utils";
|
|
339
|
-
export { MisoClientError, ApiErrorException, transformError, handleApiError, } from "./utils/errors";
|
|
340
|
-
export { EncryptionService } from "./services/encryption.service";
|
|
341
|
-
export type { EncryptResult } from "./services/encryption.service";
|
|
342
|
-
export { EncryptionError } from "./utils/encryption-error";
|
|
343
|
-
export type { EncryptionErrorCode } from "./utils/encryption-error";
|
|
344
|
-
export type { EncryptRequest, EncryptResponse, DecryptRequest, DecryptResponse, EncryptionStorage, } from "./api/types/encryption.types";
|
|
345
|
-
export type { UpdateSelfStatusRequest, UpdateSelfStatusResponse, ApplicationStatusResponse, } from "./api/types/applications.types";
|
|
346
|
-
export { ResponseHelper, injectResponseHelpers, asyncHandler, asyncHandlerNamed, ValidationHelper, AppError, createSuccessResponse, createErrorResponse, setErrorLogger, handleRouteError, getErrorTypeUri, getErrorTitle, sendErrorResponse, createClientTokenEndpoint, hasConfig, loggerContextMiddleware, } from "./express";
|
|
347
|
-
export type { PaginationMeta, ApiError, ValidationError, ApiResponse, ErrorLogger, RBACErrorExtensions, } from "./express";
|
|
348
|
-
export type { ClientTokenEndpointOptions, ClientTokenResponse, DataClientConfigResponse, } from "./express";
|
|
349
|
-
export type { ErrorResponse as ExpressErrorResponse } from "./express/error-response";
|
|
350
|
-
export { DataClient, dataClient } from "./utils/data-client";
|
|
351
|
-
export type { DataClientConfig, ApiRequestOptions, InterceptorConfig, RequestMetrics, AuditConfig as DataClientAuditConfig, CacheEntry, NetworkError, TimeoutError, AuthenticationError, ApiError as DataClientApiError, } from "./types/data-client.types";
|
|
352
|
-
export { autoInitializeDataClient, getCachedDataClientConfig } from "./utils/data-client-auto-init";
|
|
353
|
-
export type { AutoInitOptions } from "./utils/data-client-auto-init";
|
|
354
|
-
export type { TokenType, TokenValidationOptions, TokenValidationResult, TokenPayload, KeycloakConfig, DelegatedProviderConfig, DelegatedProviderLookup, } from "./types/token-validation.types";
|
|
355
|
-
export { TokenValidationService } from "./services/token-validation.service";
|
|
4
|
+
export { MisoClient } from "./miso-client";
|
|
5
|
+
export * from "./sdk-exports";
|
|
356
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,cAAc,eAAe,CAAC"}
|