@uipath/uipath-typescript 1.0.0 → 1.1.1
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/LICENSE +2 -2
- package/README.md +2 -0
- package/dist/assets/index.cjs +199 -221
- package/dist/assets/index.mjs +199 -221
- package/dist/buckets/index.cjs +199 -221
- package/dist/buckets/index.mjs +199 -221
- package/dist/cases/index.cjs +220 -238
- package/dist/cases/index.mjs +220 -238
- package/dist/conversational-agent/index.cjs +6622 -0
- package/dist/conversational-agent/index.d.ts +6579 -0
- package/dist/conversational-agent/index.mjs +6575 -0
- package/dist/core/index.cjs +1264 -1111
- package/dist/core/index.d.ts +111 -11
- package/dist/core/index.mjs +1247 -1112
- package/dist/entities/index.cjs +199 -221
- package/dist/entities/index.mjs +199 -221
- package/dist/index.cjs +799 -435
- package/dist/index.d.ts +4403 -64
- package/dist/index.mjs +793 -436
- package/dist/index.umd.js +799 -435
- package/dist/maestro-processes/index.cjs +199 -221
- package/dist/maestro-processes/index.mjs +199 -221
- package/dist/processes/index.cjs +246 -232
- package/dist/processes/index.d.ts +1 -1
- package/dist/processes/index.mjs +246 -232
- package/dist/queues/index.cjs +199 -221
- package/dist/queues/index.mjs +199 -221
- package/dist/tasks/index.cjs +199 -221
- package/dist/tasks/index.mjs +199 -221
- package/package.json +22 -4
package/dist/buckets/index.mjs
CHANGED
|
@@ -43,40 +43,31 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
* Pure TypeScript class with clean interface
|
|
46
|
+
* Type guards for error response types
|
|
48
47
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
* Returns detailed debug information including stack trace
|
|
73
|
-
*/
|
|
74
|
-
getDebugInfo() {
|
|
75
|
-
return {
|
|
76
|
-
...this.toJSON(),
|
|
77
|
-
stack: this.stack
|
|
78
|
-
};
|
|
79
|
-
}
|
|
48
|
+
function isOrchestratorError(error) {
|
|
49
|
+
return typeof error === 'object' &&
|
|
50
|
+
error !== null &&
|
|
51
|
+
'message' in error &&
|
|
52
|
+
'errorCode' in error &&
|
|
53
|
+
typeof error.message === 'string' &&
|
|
54
|
+
typeof error.errorCode === 'number';
|
|
55
|
+
}
|
|
56
|
+
function isEntityError(error) {
|
|
57
|
+
return typeof error === 'object' &&
|
|
58
|
+
error !== null &&
|
|
59
|
+
'error' in error &&
|
|
60
|
+
typeof error.error === 'string';
|
|
61
|
+
}
|
|
62
|
+
function isPimsError(error) {
|
|
63
|
+
return typeof error === 'object' &&
|
|
64
|
+
error !== null &&
|
|
65
|
+
'type' in error &&
|
|
66
|
+
'title' in error &&
|
|
67
|
+
'status' in error &&
|
|
68
|
+
typeof error.type === 'string' &&
|
|
69
|
+
typeof error.title === 'string' &&
|
|
70
|
+
typeof error.status === 'number';
|
|
80
71
|
}
|
|
81
72
|
|
|
82
73
|
/**
|
|
@@ -140,161 +131,6 @@ const ErrorMessages = {
|
|
|
140
131
|
const ErrorNames = {
|
|
141
132
|
ABORT_ERROR: 'AbortError'};
|
|
142
133
|
|
|
143
|
-
/**
|
|
144
|
-
* Error thrown when authentication fails (401 errors)
|
|
145
|
-
* Common scenarios:
|
|
146
|
-
* - Invalid credentials
|
|
147
|
-
* - Expired token
|
|
148
|
-
* - Missing authentication
|
|
149
|
-
*/
|
|
150
|
-
class AuthenticationError extends UiPathError {
|
|
151
|
-
constructor(params = {}) {
|
|
152
|
-
super(ErrorType.AUTHENTICATION, {
|
|
153
|
-
message: params.message || ErrorMessages.AUTHENTICATION_FAILED,
|
|
154
|
-
statusCode: params.statusCode ?? HttpStatus.UNAUTHORIZED,
|
|
155
|
-
requestId: params.requestId
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Error thrown when authorization fails (403 errors)
|
|
162
|
-
* Common scenarios:
|
|
163
|
-
* - Insufficient permissions
|
|
164
|
-
* - Access denied to resource
|
|
165
|
-
* - Invalid scope
|
|
166
|
-
*/
|
|
167
|
-
class AuthorizationError extends UiPathError {
|
|
168
|
-
constructor(params = {}) {
|
|
169
|
-
super(ErrorType.AUTHORIZATION, {
|
|
170
|
-
message: params.message || ErrorMessages.ACCESS_DENIED,
|
|
171
|
-
statusCode: params.statusCode ?? HttpStatus.FORBIDDEN,
|
|
172
|
-
requestId: params.requestId
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Error thrown when validation fails (400 errors or client-side validation)
|
|
179
|
-
* Common scenarios:
|
|
180
|
-
* - Invalid input parameters
|
|
181
|
-
* - Missing required fields
|
|
182
|
-
* - Invalid data format
|
|
183
|
-
*/
|
|
184
|
-
class ValidationError extends UiPathError {
|
|
185
|
-
constructor(params = {}) {
|
|
186
|
-
super(ErrorType.VALIDATION, {
|
|
187
|
-
message: params.message || ErrorMessages.VALIDATION_FAILED,
|
|
188
|
-
statusCode: params.statusCode ?? HttpStatus.BAD_REQUEST,
|
|
189
|
-
requestId: params.requestId
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Error thrown when a resource is not found (404 errors)
|
|
196
|
-
* Common scenarios:
|
|
197
|
-
* - Resource doesn't exist
|
|
198
|
-
* - Invalid ID provided
|
|
199
|
-
* - Resource deleted
|
|
200
|
-
*/
|
|
201
|
-
class NotFoundError extends UiPathError {
|
|
202
|
-
constructor(params = {}) {
|
|
203
|
-
super(ErrorType.NOT_FOUND, {
|
|
204
|
-
message: params.message || ErrorMessages.RESOURCE_NOT_FOUND,
|
|
205
|
-
statusCode: params.statusCode ?? HttpStatus.NOT_FOUND,
|
|
206
|
-
requestId: params.requestId
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Error thrown when rate limit is exceeded (429 errors)
|
|
213
|
-
* Common scenarios:
|
|
214
|
-
* - Too many requests in a time window
|
|
215
|
-
* - API throttling
|
|
216
|
-
*/
|
|
217
|
-
class RateLimitError extends UiPathError {
|
|
218
|
-
constructor(params = {}) {
|
|
219
|
-
super(ErrorType.RATE_LIMIT, {
|
|
220
|
-
message: params.message || ErrorMessages.RATE_LIMIT_EXCEEDED,
|
|
221
|
-
statusCode: params.statusCode ?? HttpStatus.TOO_MANY_REQUESTS,
|
|
222
|
-
requestId: params.requestId
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Error thrown when server encounters an error (5xx errors)
|
|
229
|
-
* Common scenarios:
|
|
230
|
-
* - Internal server error
|
|
231
|
-
* - Service unavailable
|
|
232
|
-
* - Gateway timeout
|
|
233
|
-
*/
|
|
234
|
-
class ServerError extends UiPathError {
|
|
235
|
-
constructor(params = {}) {
|
|
236
|
-
super(ErrorType.SERVER, {
|
|
237
|
-
message: params.message || ErrorMessages.INTERNAL_SERVER_ERROR,
|
|
238
|
-
statusCode: params.statusCode ?? HttpStatus.INTERNAL_SERVER_ERROR,
|
|
239
|
-
requestId: params.requestId
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Checks if this is a temporary error that might succeed on retry
|
|
244
|
-
*/
|
|
245
|
-
get isRetryable() {
|
|
246
|
-
return this.statusCode === HttpStatus.BAD_GATEWAY ||
|
|
247
|
-
this.statusCode === HttpStatus.SERVICE_UNAVAILABLE ||
|
|
248
|
-
this.statusCode === HttpStatus.GATEWAY_TIMEOUT;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Error thrown when network/connection issues occur
|
|
254
|
-
* Common scenarios:
|
|
255
|
-
* - Connection timeout
|
|
256
|
-
* - DNS resolution failure
|
|
257
|
-
* - Network unreachable
|
|
258
|
-
* - Request aborted
|
|
259
|
-
*/
|
|
260
|
-
class NetworkError extends UiPathError {
|
|
261
|
-
constructor(params = {}) {
|
|
262
|
-
super(ErrorType.NETWORK, {
|
|
263
|
-
message: params.message || ErrorMessages.NETWORK_ERROR,
|
|
264
|
-
statusCode: params.statusCode, // Network errors typically don't have HTTP status codes
|
|
265
|
-
requestId: params.requestId
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Type guards for error response types
|
|
272
|
-
*/
|
|
273
|
-
function isOrchestratorError(error) {
|
|
274
|
-
return typeof error === 'object' &&
|
|
275
|
-
error !== null &&
|
|
276
|
-
'message' in error &&
|
|
277
|
-
'errorCode' in error &&
|
|
278
|
-
typeof error.message === 'string' &&
|
|
279
|
-
typeof error.errorCode === 'number';
|
|
280
|
-
}
|
|
281
|
-
function isEntityError(error) {
|
|
282
|
-
return typeof error === 'object' &&
|
|
283
|
-
error !== null &&
|
|
284
|
-
'error' in error &&
|
|
285
|
-
typeof error.error === 'string';
|
|
286
|
-
}
|
|
287
|
-
function isPimsError(error) {
|
|
288
|
-
return typeof error === 'object' &&
|
|
289
|
-
error !== null &&
|
|
290
|
-
'type' in error &&
|
|
291
|
-
'title' in error &&
|
|
292
|
-
'status' in error &&
|
|
293
|
-
typeof error.type === 'string' &&
|
|
294
|
-
typeof error.title === 'string' &&
|
|
295
|
-
typeof error.status === 'number';
|
|
296
|
-
}
|
|
297
|
-
|
|
298
134
|
/**
|
|
299
135
|
* Parser for Orchestrator/Task error format
|
|
300
136
|
*/
|
|
@@ -445,6 +281,173 @@ class ErrorResponseParser {
|
|
|
445
281
|
// Export singleton instance
|
|
446
282
|
const errorResponseParser = new ErrorResponseParser();
|
|
447
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Base error class for all UiPath SDK errors
|
|
286
|
+
* Extends Error for standard error handling compatibility
|
|
287
|
+
*/
|
|
288
|
+
class UiPathError extends Error {
|
|
289
|
+
constructor(type, params) {
|
|
290
|
+
super(params.message);
|
|
291
|
+
this.name = type;
|
|
292
|
+
this.type = type;
|
|
293
|
+
this.statusCode = params.statusCode;
|
|
294
|
+
this.requestId = params.requestId;
|
|
295
|
+
this.timestamp = new Date();
|
|
296
|
+
// Maintains proper stack trace for where our error was thrown
|
|
297
|
+
if (Error.captureStackTrace) {
|
|
298
|
+
Error.captureStackTrace(this, this.constructor);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Returns a clean JSON representation of the error
|
|
303
|
+
*/
|
|
304
|
+
toJSON() {
|
|
305
|
+
return {
|
|
306
|
+
type: this.type,
|
|
307
|
+
message: this.message,
|
|
308
|
+
statusCode: this.statusCode,
|
|
309
|
+
requestId: this.requestId,
|
|
310
|
+
timestamp: this.timestamp
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Returns detailed debug information including stack trace
|
|
315
|
+
*/
|
|
316
|
+
getDebugInfo() {
|
|
317
|
+
return {
|
|
318
|
+
...this.toJSON(),
|
|
319
|
+
stack: this.stack
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Error thrown when authentication fails (401 errors)
|
|
326
|
+
* Common scenarios:
|
|
327
|
+
* - Invalid credentials
|
|
328
|
+
* - Expired token
|
|
329
|
+
* - Missing authentication
|
|
330
|
+
*/
|
|
331
|
+
class AuthenticationError extends UiPathError {
|
|
332
|
+
constructor(params = {}) {
|
|
333
|
+
super(ErrorType.AUTHENTICATION, {
|
|
334
|
+
message: params.message || ErrorMessages.AUTHENTICATION_FAILED,
|
|
335
|
+
statusCode: params.statusCode ?? HttpStatus.UNAUTHORIZED,
|
|
336
|
+
requestId: params.requestId
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Error thrown when authorization fails (403 errors)
|
|
343
|
+
* Common scenarios:
|
|
344
|
+
* - Insufficient permissions
|
|
345
|
+
* - Access denied to resource
|
|
346
|
+
* - Invalid scope
|
|
347
|
+
*/
|
|
348
|
+
class AuthorizationError extends UiPathError {
|
|
349
|
+
constructor(params = {}) {
|
|
350
|
+
super(ErrorType.AUTHORIZATION, {
|
|
351
|
+
message: params.message || ErrorMessages.ACCESS_DENIED,
|
|
352
|
+
statusCode: params.statusCode ?? HttpStatus.FORBIDDEN,
|
|
353
|
+
requestId: params.requestId
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Error thrown when validation fails (400 errors or client-side validation)
|
|
360
|
+
* Common scenarios:
|
|
361
|
+
* - Invalid input parameters
|
|
362
|
+
* - Missing required fields
|
|
363
|
+
* - Invalid data format
|
|
364
|
+
*/
|
|
365
|
+
class ValidationError extends UiPathError {
|
|
366
|
+
constructor(params = {}) {
|
|
367
|
+
super(ErrorType.VALIDATION, {
|
|
368
|
+
message: params.message || ErrorMessages.VALIDATION_FAILED,
|
|
369
|
+
statusCode: params.statusCode ?? HttpStatus.BAD_REQUEST,
|
|
370
|
+
requestId: params.requestId
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Error thrown when a resource is not found (404 errors)
|
|
377
|
+
* Common scenarios:
|
|
378
|
+
* - Resource doesn't exist
|
|
379
|
+
* - Invalid ID provided
|
|
380
|
+
* - Resource deleted
|
|
381
|
+
*/
|
|
382
|
+
class NotFoundError extends UiPathError {
|
|
383
|
+
constructor(params = {}) {
|
|
384
|
+
super(ErrorType.NOT_FOUND, {
|
|
385
|
+
message: params.message || ErrorMessages.RESOURCE_NOT_FOUND,
|
|
386
|
+
statusCode: params.statusCode ?? HttpStatus.NOT_FOUND,
|
|
387
|
+
requestId: params.requestId
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Error thrown when rate limit is exceeded (429 errors)
|
|
394
|
+
* Common scenarios:
|
|
395
|
+
* - Too many requests in a time window
|
|
396
|
+
* - API throttling
|
|
397
|
+
*/
|
|
398
|
+
class RateLimitError extends UiPathError {
|
|
399
|
+
constructor(params = {}) {
|
|
400
|
+
super(ErrorType.RATE_LIMIT, {
|
|
401
|
+
message: params.message || ErrorMessages.RATE_LIMIT_EXCEEDED,
|
|
402
|
+
statusCode: params.statusCode ?? HttpStatus.TOO_MANY_REQUESTS,
|
|
403
|
+
requestId: params.requestId
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Error thrown when server encounters an error (5xx errors)
|
|
410
|
+
* Common scenarios:
|
|
411
|
+
* - Internal server error
|
|
412
|
+
* - Service unavailable
|
|
413
|
+
* - Gateway timeout
|
|
414
|
+
*/
|
|
415
|
+
class ServerError extends UiPathError {
|
|
416
|
+
constructor(params = {}) {
|
|
417
|
+
super(ErrorType.SERVER, {
|
|
418
|
+
message: params.message || ErrorMessages.INTERNAL_SERVER_ERROR,
|
|
419
|
+
statusCode: params.statusCode ?? HttpStatus.INTERNAL_SERVER_ERROR,
|
|
420
|
+
requestId: params.requestId
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Checks if this is a temporary error that might succeed on retry
|
|
425
|
+
*/
|
|
426
|
+
get isRetryable() {
|
|
427
|
+
return this.statusCode === HttpStatus.BAD_GATEWAY ||
|
|
428
|
+
this.statusCode === HttpStatus.SERVICE_UNAVAILABLE ||
|
|
429
|
+
this.statusCode === HttpStatus.GATEWAY_TIMEOUT;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Error thrown when network/connection issues occur
|
|
435
|
+
* Common scenarios:
|
|
436
|
+
* - Connection timeout
|
|
437
|
+
* - DNS resolution failure
|
|
438
|
+
* - Network unreachable
|
|
439
|
+
* - Request aborted
|
|
440
|
+
*/
|
|
441
|
+
class NetworkError extends UiPathError {
|
|
442
|
+
constructor(params = {}) {
|
|
443
|
+
super(ErrorType.NETWORK, {
|
|
444
|
+
message: params.message || ErrorMessages.NETWORK_ERROR,
|
|
445
|
+
statusCode: params.statusCode, // Network errors typically don't have HTTP status codes
|
|
446
|
+
requestId: params.requestId
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
448
451
|
/**
|
|
449
452
|
* Factory for creating typed errors based on HTTP status codes
|
|
450
453
|
* Follows the Factory pattern for clean error instantiation
|
|
@@ -538,29 +541,7 @@ class ApiClient {
|
|
|
538
541
|
* @throws AuthenticationError if no token available or refresh fails
|
|
539
542
|
*/
|
|
540
543
|
async getValidToken() {
|
|
541
|
-
|
|
542
|
-
const tokenInfo = this.executionContext.get('tokenInfo');
|
|
543
|
-
if (!tokenInfo) {
|
|
544
|
-
throw new AuthenticationError({ message: 'No authentication token available. Make sure to initialize the SDK first.' });
|
|
545
|
-
}
|
|
546
|
-
// For secret-based tokens, they never expire
|
|
547
|
-
if (tokenInfo.type === 'secret') {
|
|
548
|
-
return tokenInfo.token;
|
|
549
|
-
}
|
|
550
|
-
// If token is not expired, return it
|
|
551
|
-
if (!this.tokenManager.isTokenExpired(tokenInfo)) {
|
|
552
|
-
return tokenInfo.token;
|
|
553
|
-
}
|
|
554
|
-
try {
|
|
555
|
-
const newToken = await this.tokenManager.refreshAccessToken();
|
|
556
|
-
return newToken.access_token;
|
|
557
|
-
}
|
|
558
|
-
catch (error) {
|
|
559
|
-
throw new AuthenticationError({
|
|
560
|
-
message: `Token refresh failed: ${error.message}. Please re-authenticate.`,
|
|
561
|
-
statusCode: HttpStatus.UNAUTHORIZED
|
|
562
|
-
});
|
|
563
|
-
}
|
|
544
|
+
return this.tokenManager.getValidToken();
|
|
564
545
|
}
|
|
565
546
|
async getDefaultHeaders() {
|
|
566
547
|
// Get headers from execution context first
|
|
@@ -1318,10 +1299,7 @@ class PaginationHelpers {
|
|
|
1318
1299
|
*/
|
|
1319
1300
|
static async getAll(config, options) {
|
|
1320
1301
|
const optionsWithDefaults = options || {};
|
|
1321
|
-
const { folderId, ...restOptions } = optionsWithDefaults;
|
|
1322
|
-
const cursor = options?.cursor;
|
|
1323
|
-
const pageSize = options?.pageSize;
|
|
1324
|
-
const jumpToPage = options?.jumpToPage;
|
|
1302
|
+
const { folderId, pageSize, cursor, jumpToPage, ...restOptions } = optionsWithDefaults;
|
|
1325
1303
|
// Determine if pagination is requested
|
|
1326
1304
|
const isPaginationRequested = PaginationHelpers.hasPaginationParameters(options || {});
|
|
1327
1305
|
// Process parameters (custom processing if provided, otherwise default)
|
|
@@ -1709,14 +1687,14 @@ class FolderScopedService extends BaseService {
|
|
|
1709
1687
|
}
|
|
1710
1688
|
}
|
|
1711
1689
|
|
|
1712
|
-
/**
|
|
1713
|
-
* API Endpoint Constants
|
|
1714
|
-
* Centralized location for all API endpoints used throughout the SDK
|
|
1715
|
-
*/
|
|
1716
1690
|
/**
|
|
1717
1691
|
* Base path constants for different services
|
|
1718
1692
|
*/
|
|
1719
1693
|
const ORCHESTRATOR_BASE = 'orchestrator_';
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* Orchestrator Service Endpoints
|
|
1697
|
+
*/
|
|
1720
1698
|
/**
|
|
1721
1699
|
* Orchestrator Bucket Endpoints
|
|
1722
1700
|
*/
|
|
@@ -1744,7 +1722,7 @@ const BucketMap = {
|
|
|
1744
1722
|
// Connection string placeholder that will be replaced during build
|
|
1745
1723
|
const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
|
|
1746
1724
|
// SDK Version placeholder
|
|
1747
|
-
const SDK_VERSION = "1.
|
|
1725
|
+
const SDK_VERSION = "1.1.1";
|
|
1748
1726
|
const VERSION = "Version";
|
|
1749
1727
|
const SERVICE = "Service";
|
|
1750
1728
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -1921,7 +1899,6 @@ class TelemetryClient {
|
|
|
1921
1899
|
*/
|
|
1922
1900
|
getEnrichedAttributes(extraAttributes, eventName) {
|
|
1923
1901
|
const attributes = {
|
|
1924
|
-
...extraAttributes,
|
|
1925
1902
|
[APP_NAME]: SDK_SERVICE_NAME,
|
|
1926
1903
|
[VERSION]: SDK_VERSION,
|
|
1927
1904
|
[SERVICE]: eventName,
|
|
@@ -1930,6 +1907,7 @@ class TelemetryClient {
|
|
|
1930
1907
|
[CLOUD_TENANT_NAME]: this.telemetryContext?.tenantName || UNKNOWN,
|
|
1931
1908
|
[CLOUD_REDIRECT_URI]: this.telemetryContext?.redirectUri || UNKNOWN,
|
|
1932
1909
|
[CLOUD_CLIENT_ID]: this.telemetryContext?.clientId || UNKNOWN,
|
|
1910
|
+
...extraAttributes,
|
|
1933
1911
|
};
|
|
1934
1912
|
return attributes;
|
|
1935
1913
|
}
|