@uipath/uipath-typescript 1.3.8 → 1.3.9
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/dist/assets/index.cjs +25 -270
- package/dist/assets/index.mjs +25 -270
- package/dist/attachments/index.cjs +23 -267
- package/dist/attachments/index.mjs +23 -267
- package/dist/buckets/index.cjs +54 -270
- package/dist/buckets/index.d.ts +50 -1
- package/dist/buckets/index.mjs +54 -270
- package/dist/cases/index.cjs +408 -337
- package/dist/cases/index.d.ts +534 -2
- package/dist/cases/index.mjs +409 -338
- package/dist/conversational-agent/index.cjs +71 -281
- package/dist/conversational-agent/index.d.ts +62 -12
- package/dist/conversational-agent/index.mjs +71 -282
- package/dist/core/index.cjs +39 -289
- package/dist/core/index.d.ts +9 -98
- package/dist/core/index.mjs +40 -275
- package/dist/document-understanding/index.cjs +18 -1
- package/dist/document-understanding/index.d.ts +636 -610
- package/dist/document-understanding/index.mjs +18 -1
- package/dist/entities/index.cjs +25 -270
- package/dist/entities/index.mjs +25 -270
- package/dist/feedback/index.cjs +23 -268
- package/dist/feedback/index.mjs +23 -268
- package/dist/index.cjs +600 -293
- package/dist/index.d.ts +1603 -722
- package/dist/index.mjs +600 -279
- package/dist/index.umd.js +789 -158
- package/dist/jobs/index.cjs +25 -270
- package/dist/jobs/index.mjs +25 -270
- package/dist/maestro-processes/index.cjs +1751 -1720
- package/dist/maestro-processes/index.d.ts +430 -2
- package/dist/maestro-processes/index.mjs +1752 -1721
- package/dist/processes/index.cjs +25 -270
- package/dist/processes/index.mjs +25 -270
- package/dist/queues/index.cjs +25 -270
- package/dist/queues/index.mjs +25 -270
- package/dist/tasks/index.cjs +25 -270
- package/dist/tasks/index.mjs +25 -270
- package/package.json +8 -10
package/dist/core/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var coreTelemetry = require('@uipath/core-telemetry');
|
|
4
4
|
|
|
5
5
|
/******************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation.
|
|
@@ -5302,284 +5302,49 @@ function normalizeBaseUrl(url) {
|
|
|
5302
5302
|
}
|
|
5303
5303
|
|
|
5304
5304
|
/**
|
|
5305
|
-
* SDK Telemetry constants
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
5314
|
-
const CLOUD_TENANT_NAME = "CloudTenantName";
|
|
5315
|
-
const CLOUD_URL = "CloudUrl";
|
|
5316
|
-
const CLOUD_CLIENT_ID = "CloudClientId";
|
|
5317
|
-
const CLOUD_REDIRECT_URI = "CloudRedirectUri";
|
|
5318
|
-
const APP_NAME = "ApplicationName";
|
|
5319
|
-
const CLOUD_ROLE_NAME = "uipath-ts-sdk";
|
|
5320
|
-
// Service and logger names
|
|
5321
|
-
const SDK_SERVICE_NAME = "UiPath.TypeScript.Sdk";
|
|
5322
|
-
const SDK_LOGGER_NAME = "uipath-ts-sdk-telemetry";
|
|
5323
|
-
// Event names
|
|
5324
|
-
const SDK_RUN_EVENT = "Sdk.Run";
|
|
5325
|
-
// Default value for unknown/empty attributes
|
|
5326
|
-
const UNKNOWN = "";
|
|
5327
|
-
|
|
5328
|
-
/**
|
|
5329
|
-
* Log exporter that sends ALL logs as Application Insights custom events
|
|
5330
|
-
*/
|
|
5331
|
-
class ApplicationInsightsEventExporter {
|
|
5332
|
-
constructor(connectionString) {
|
|
5333
|
-
this.connectionString = connectionString;
|
|
5334
|
-
}
|
|
5335
|
-
export(logs, resultCallback) {
|
|
5336
|
-
try {
|
|
5337
|
-
logs.forEach(logRecord => {
|
|
5338
|
-
this.sendAsCustomEvent(logRecord);
|
|
5339
|
-
});
|
|
5340
|
-
resultCallback({ code: 0 });
|
|
5341
|
-
}
|
|
5342
|
-
catch (error) {
|
|
5343
|
-
console.debug('Failed to export logs to Application Insights:', error);
|
|
5344
|
-
resultCallback({ code: 2, error });
|
|
5345
|
-
}
|
|
5346
|
-
}
|
|
5347
|
-
shutdown() {
|
|
5348
|
-
return Promise.resolve();
|
|
5349
|
-
}
|
|
5350
|
-
sendAsCustomEvent(logRecord) {
|
|
5351
|
-
// Get event name from body or attributes
|
|
5352
|
-
const eventName = logRecord.body || SDK_RUN_EVENT;
|
|
5353
|
-
const payload = {
|
|
5354
|
-
name: 'Microsoft.ApplicationInsights.Event',
|
|
5355
|
-
time: new Date().toISOString(),
|
|
5356
|
-
iKey: this.extractInstrumentationKey(),
|
|
5357
|
-
data: {
|
|
5358
|
-
baseType: 'EventData',
|
|
5359
|
-
baseData: {
|
|
5360
|
-
ver: 2,
|
|
5361
|
-
name: eventName,
|
|
5362
|
-
properties: this.convertAttributesToProperties(logRecord.attributes || {})
|
|
5363
|
-
}
|
|
5364
|
-
},
|
|
5365
|
-
tags: {
|
|
5366
|
-
'ai.cloud.role': CLOUD_ROLE_NAME,
|
|
5367
|
-
'ai.cloud.roleInstance': SDK_VERSION
|
|
5368
|
-
}
|
|
5369
|
-
};
|
|
5370
|
-
this.sendToApplicationInsights(payload);
|
|
5371
|
-
}
|
|
5372
|
-
extractInstrumentationKey() {
|
|
5373
|
-
const match = this.connectionString.match(/InstrumentationKey=([^;]+)/);
|
|
5374
|
-
return match ? match[1] : '';
|
|
5375
|
-
}
|
|
5376
|
-
convertAttributesToProperties(attributes) {
|
|
5377
|
-
const properties = {};
|
|
5378
|
-
Object.entries(attributes || {}).forEach(([key, value]) => {
|
|
5379
|
-
properties[key] = String(value);
|
|
5380
|
-
});
|
|
5381
|
-
return properties;
|
|
5382
|
-
}
|
|
5383
|
-
async sendToApplicationInsights(payload) {
|
|
5384
|
-
try {
|
|
5385
|
-
const ingestionEndpoint = this.extractIngestionEndpoint();
|
|
5386
|
-
if (!ingestionEndpoint) {
|
|
5387
|
-
console.debug('No ingestion endpoint found in connection string');
|
|
5388
|
-
return;
|
|
5389
|
-
}
|
|
5390
|
-
const url = `${ingestionEndpoint}/v2/track`;
|
|
5391
|
-
const response = await fetch(url, {
|
|
5392
|
-
method: 'POST',
|
|
5393
|
-
headers: {
|
|
5394
|
-
'Content-Type': 'application/json',
|
|
5395
|
-
},
|
|
5396
|
-
body: JSON.stringify(payload)
|
|
5397
|
-
});
|
|
5398
|
-
if (!response.ok) {
|
|
5399
|
-
console.debug(`Failed to send event telemetry: ${response.status} ${response.statusText}`);
|
|
5400
|
-
}
|
|
5401
|
-
}
|
|
5402
|
-
catch (error) {
|
|
5403
|
-
console.debug('Error sending event telemetry to Application Insights:', error);
|
|
5404
|
-
}
|
|
5405
|
-
}
|
|
5406
|
-
extractIngestionEndpoint() {
|
|
5407
|
-
const match = this.connectionString.match(/IngestionEndpoint=([^;]+)/);
|
|
5408
|
-
return match ? match[1] : '';
|
|
5409
|
-
}
|
|
5410
|
-
}
|
|
5411
|
-
/**
|
|
5412
|
-
* Singleton telemetry client
|
|
5305
|
+
* SDK Telemetry constants.
|
|
5306
|
+
*
|
|
5307
|
+
* Only the SDK's identity (version, service name, role name, …) lives
|
|
5308
|
+
* here. The Application Insights connection string is injected into
|
|
5309
|
+
* `@uipath/core-telemetry` itself at publish time, and the generic attribute
|
|
5310
|
+
* keys (`Version`, `Service`, `CloudOrganizationName`, …) are owned by
|
|
5311
|
+
* `@uipath/core-telemetry` and consumed there — they are not part of the
|
|
5312
|
+
* SDK's public API.
|
|
5413
5313
|
*/
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
TelemetryClient.instance = new TelemetryClient();
|
|
5421
|
-
}
|
|
5422
|
-
return TelemetryClient.instance;
|
|
5423
|
-
}
|
|
5424
|
-
/**
|
|
5425
|
-
* Initialize telemetry
|
|
5426
|
-
*/
|
|
5427
|
-
initialize(config) {
|
|
5428
|
-
if (this.isInitialized) {
|
|
5429
|
-
return;
|
|
5430
|
-
}
|
|
5431
|
-
this.isInitialized = true;
|
|
5432
|
-
if (config) {
|
|
5433
|
-
this.telemetryContext = config;
|
|
5434
|
-
}
|
|
5435
|
-
try {
|
|
5436
|
-
const connectionString = this.getConnectionString();
|
|
5437
|
-
if (!connectionString) {
|
|
5438
|
-
return;
|
|
5439
|
-
}
|
|
5440
|
-
this.setupTelemetryProvider(connectionString);
|
|
5441
|
-
}
|
|
5442
|
-
catch (error) {
|
|
5443
|
-
// Silent failure - telemetry errors shouldn't break functionality
|
|
5444
|
-
console.debug('Failed to initialize OpenTelemetry:', error);
|
|
5445
|
-
}
|
|
5446
|
-
}
|
|
5447
|
-
getConnectionString() {
|
|
5448
|
-
const connectionString = CONNECTION_STRING;
|
|
5449
|
-
return connectionString;
|
|
5450
|
-
}
|
|
5451
|
-
setupTelemetryProvider(connectionString) {
|
|
5452
|
-
const exporter = new ApplicationInsightsEventExporter(connectionString);
|
|
5453
|
-
const processor = new sdkLogs.BatchLogRecordProcessor(exporter);
|
|
5454
|
-
this.logProvider = new sdkLogs.LoggerProvider({
|
|
5455
|
-
processors: [processor]
|
|
5456
|
-
});
|
|
5457
|
-
this.logger = this.logProvider.getLogger(SDK_LOGGER_NAME);
|
|
5458
|
-
}
|
|
5459
|
-
/**
|
|
5460
|
-
* Track a telemetry event
|
|
5461
|
-
*/
|
|
5462
|
-
track(eventName, name, extraAttributes = {}) {
|
|
5463
|
-
try {
|
|
5464
|
-
// Skip if logger not initialized
|
|
5465
|
-
if (!this.logger) {
|
|
5466
|
-
return;
|
|
5467
|
-
}
|
|
5468
|
-
const finalDisplayName = name || eventName;
|
|
5469
|
-
const attributes = this.getEnrichedAttributes(extraAttributes, eventName);
|
|
5470
|
-
// Emit as log
|
|
5471
|
-
this.logger.emit({
|
|
5472
|
-
body: finalDisplayName,
|
|
5473
|
-
attributes: attributes,
|
|
5474
|
-
timestamp: Date.now(),
|
|
5475
|
-
});
|
|
5476
|
-
}
|
|
5477
|
-
catch (error) {
|
|
5478
|
-
// Silent failure
|
|
5479
|
-
console.debug('Failed to track telemetry event:', error);
|
|
5480
|
-
}
|
|
5481
|
-
}
|
|
5482
|
-
/**
|
|
5483
|
-
* Get enriched attributes for telemetry events
|
|
5484
|
-
*/
|
|
5485
|
-
getEnrichedAttributes(extraAttributes, eventName) {
|
|
5486
|
-
const attributes = {
|
|
5487
|
-
[APP_NAME]: SDK_SERVICE_NAME,
|
|
5488
|
-
[VERSION]: SDK_VERSION,
|
|
5489
|
-
[SERVICE]: eventName,
|
|
5490
|
-
[CLOUD_URL]: this.createCloudUrl(),
|
|
5491
|
-
[CLOUD_ORGANIZATION_NAME]: this.telemetryContext?.orgName || UNKNOWN,
|
|
5492
|
-
[CLOUD_TENANT_NAME]: this.telemetryContext?.tenantName || UNKNOWN,
|
|
5493
|
-
[CLOUD_REDIRECT_URI]: this.telemetryContext?.redirectUri || UNKNOWN,
|
|
5494
|
-
[CLOUD_CLIENT_ID]: this.telemetryContext?.clientId || UNKNOWN,
|
|
5495
|
-
...extraAttributes,
|
|
5496
|
-
};
|
|
5497
|
-
return attributes;
|
|
5498
|
-
}
|
|
5499
|
-
/**
|
|
5500
|
-
* Create cloud URL from base URL, organization ID, and tenant ID
|
|
5501
|
-
*/
|
|
5502
|
-
createCloudUrl() {
|
|
5503
|
-
const baseUrl = this.telemetryContext?.baseUrl;
|
|
5504
|
-
const orgId = this.telemetryContext?.orgName;
|
|
5505
|
-
const tenantId = this.telemetryContext?.tenantName;
|
|
5506
|
-
if (!baseUrl || !orgId || !tenantId) {
|
|
5507
|
-
return UNKNOWN;
|
|
5508
|
-
}
|
|
5509
|
-
return `${baseUrl}/${orgId}/${tenantId}`;
|
|
5510
|
-
}
|
|
5511
|
-
}
|
|
5512
|
-
// Export singleton instance
|
|
5513
|
-
const telemetryClient = TelemetryClient.getInstance();
|
|
5314
|
+
/** SDK version placeholder — patched by the SDK publish workflow. */
|
|
5315
|
+
const SDK_VERSION = '1.3.9';
|
|
5316
|
+
const CLOUD_ROLE_NAME = 'uipath-ts-sdk';
|
|
5317
|
+
const SDK_SERVICE_NAME = 'UiPath.TypeScript.Sdk';
|
|
5318
|
+
const SDK_LOGGER_NAME = 'uipath-ts-sdk-telemetry';
|
|
5319
|
+
const SDK_RUN_EVENT = 'Sdk.Run';
|
|
5514
5320
|
|
|
5515
5321
|
/**
|
|
5516
|
-
*
|
|
5517
|
-
*/
|
|
5518
|
-
/**
|
|
5519
|
-
* Common tracking logic shared between method and function decorators
|
|
5520
|
-
*/
|
|
5521
|
-
function createTrackedFunction(originalFunction, nameOrOptions, fallbackName, opts) {
|
|
5522
|
-
return function (...args) {
|
|
5523
|
-
// Determine if we should track this call
|
|
5524
|
-
let shouldTrack = true;
|
|
5525
|
-
if (opts.condition !== undefined) {
|
|
5526
|
-
if (typeof opts.condition === 'function') {
|
|
5527
|
-
shouldTrack = opts.condition.apply(this, args);
|
|
5528
|
-
}
|
|
5529
|
-
else {
|
|
5530
|
-
shouldTrack = opts.condition;
|
|
5531
|
-
}
|
|
5532
|
-
}
|
|
5533
|
-
// Track the event if enabled
|
|
5534
|
-
if (shouldTrack) {
|
|
5535
|
-
// Use the full name provided in the decorator (e.g., "Queue.GetAll")
|
|
5536
|
-
const serviceMethod = typeof nameOrOptions === 'string'
|
|
5537
|
-
? nameOrOptions
|
|
5538
|
-
: fallbackName;
|
|
5539
|
-
// Use 'Sdk.Run' as the name and serviceMethod as the service
|
|
5540
|
-
telemetryClient.track(serviceMethod, SDK_RUN_EVENT, opts.attributes);
|
|
5541
|
-
}
|
|
5542
|
-
// Execute the original function
|
|
5543
|
-
return originalFunction.apply(this, args);
|
|
5544
|
-
};
|
|
5545
|
-
}
|
|
5546
|
-
/**
|
|
5547
|
-
* Track decorator that can be used to automatically track function calls
|
|
5322
|
+
* UiPath TypeScript SDK Telemetry
|
|
5548
5323
|
*
|
|
5549
|
-
*
|
|
5550
|
-
*
|
|
5551
|
-
*
|
|
5552
|
-
*
|
|
5553
|
-
* @track("Queue.GetAll")
|
|
5554
|
-
* async getAll() { ... }
|
|
5555
|
-
*
|
|
5556
|
-
* @track("Tasks.Create")
|
|
5557
|
-
* async create() { ... }
|
|
5558
|
-
*
|
|
5559
|
-
* @track("Assets.Update", { condition: false })
|
|
5560
|
-
* function myFunction() { ... }
|
|
5561
|
-
*
|
|
5562
|
-
* @track("Processes.Start", { attributes: { customProp: "value" } })
|
|
5563
|
-
* function myFunction() { ... }
|
|
5324
|
+
* Constructs the SDK's own `TelemetryClient` and binds the SDK-local
|
|
5325
|
+
* `track` / `trackEvent` to it. Each consumer of `@uipath/core-telemetry`
|
|
5326
|
+
* does this independently, so events carry their own consumer's identity
|
|
5327
|
+
* and tenant context.
|
|
5564
5328
|
*/
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
}
|
|
5329
|
+
// Keyed by `CLOUD_ROLE_NAME` so every SDK subpath bundle resolves to the
|
|
5330
|
+
// same `TelemetryClient` instance at runtime. A single `initialize(...)`
|
|
5331
|
+
// from the `UiPath` constructor therefore wires up `@track` decorators
|
|
5332
|
+
// across every subpath bundle (`assets`, `feedback`, `tasks`, …).
|
|
5333
|
+
const sdkClient = coreTelemetry.getOrCreateClient(CLOUD_ROLE_NAME);
|
|
5334
|
+
const track = coreTelemetry.createTrack(sdkClient);
|
|
5335
|
+
const trackEvent = coreTelemetry.createTrackEvent(sdkClient);
|
|
5336
|
+
const telemetryClient = {
|
|
5337
|
+
initialize(context) {
|
|
5338
|
+
sdkClient.initialize({
|
|
5339
|
+
sdkVersion: SDK_VERSION,
|
|
5340
|
+
serviceName: SDK_SERVICE_NAME,
|
|
5341
|
+
cloudRoleName: CLOUD_ROLE_NAME,
|
|
5342
|
+
loggerName: SDK_LOGGER_NAME,
|
|
5343
|
+
defaultEventName: SDK_RUN_EVENT,
|
|
5344
|
+
context,
|
|
5345
|
+
});
|
|
5346
|
+
},
|
|
5347
|
+
};
|
|
5583
5348
|
|
|
5584
5349
|
/**
|
|
5585
5350
|
* SDK Internals Registry - Internal registry for SDK instances
|
|
@@ -5955,16 +5720,8 @@ function getLimitedPageSize(pageSize) {
|
|
|
5955
5720
|
return Math.max(1, Math.min(pageSize, MAX_PAGE_SIZE));
|
|
5956
5721
|
}
|
|
5957
5722
|
|
|
5958
|
-
exports.APP_NAME = APP_NAME;
|
|
5959
5723
|
exports.AuthenticationError = AuthenticationError;
|
|
5960
5724
|
exports.AuthorizationError = AuthorizationError;
|
|
5961
|
-
exports.CLOUD_CLIENT_ID = CLOUD_CLIENT_ID;
|
|
5962
|
-
exports.CLOUD_ORGANIZATION_NAME = CLOUD_ORGANIZATION_NAME;
|
|
5963
|
-
exports.CLOUD_REDIRECT_URI = CLOUD_REDIRECT_URI;
|
|
5964
|
-
exports.CLOUD_ROLE_NAME = CLOUD_ROLE_NAME;
|
|
5965
|
-
exports.CLOUD_TENANT_NAME = CLOUD_TENANT_NAME;
|
|
5966
|
-
exports.CLOUD_URL = CLOUD_URL;
|
|
5967
|
-
exports.CONNECTION_STRING = CONNECTION_STRING;
|
|
5968
5725
|
exports.DEFAULT_ITEMS_FIELD = DEFAULT_ITEMS_FIELD;
|
|
5969
5726
|
exports.DEFAULT_PAGE_SIZE = DEFAULT_PAGE_SIZE;
|
|
5970
5727
|
exports.DEFAULT_TOTAL_COUNT_FIELD = DEFAULT_TOTAL_COUNT_FIELD;
|
|
@@ -5974,16 +5731,9 @@ exports.MAX_PAGE_SIZE = MAX_PAGE_SIZE;
|
|
|
5974
5731
|
exports.NetworkError = NetworkError;
|
|
5975
5732
|
exports.NotFoundError = NotFoundError;
|
|
5976
5733
|
exports.RateLimitError = RateLimitError;
|
|
5977
|
-
exports.SDK_LOGGER_NAME = SDK_LOGGER_NAME;
|
|
5978
|
-
exports.SDK_RUN_EVENT = SDK_RUN_EVENT;
|
|
5979
|
-
exports.SDK_SERVICE_NAME = SDK_SERVICE_NAME;
|
|
5980
|
-
exports.SDK_VERSION = SDK_VERSION;
|
|
5981
|
-
exports.SERVICE = SERVICE;
|
|
5982
5734
|
exports.ServerError = ServerError;
|
|
5983
|
-
exports.UNKNOWN = UNKNOWN;
|
|
5984
5735
|
exports.UiPath = UiPath;
|
|
5985
5736
|
exports.UiPathError = UiPathError;
|
|
5986
|
-
exports.VERSION = VERSION;
|
|
5987
5737
|
exports.ValidationError = ValidationError;
|
|
5988
5738
|
exports.getErrorDetails = getErrorDetails;
|
|
5989
5739
|
exports.getLimitedPageSize = getLimitedPageSize;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import * as _uipath_core_telemetry from '@uipath/core-telemetry';
|
|
2
|
+
import { TelemetryContext } from '@uipath/core-telemetry';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Authentication token information
|
|
3
6
|
*/
|
|
@@ -446,103 +449,11 @@ declare const DEFAULT_TOTAL_COUNT_FIELD = "@odata.count";
|
|
|
446
449
|
*/
|
|
447
450
|
declare function getLimitedPageSize(pageSize?: number): number;
|
|
448
451
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}
|
|
455
|
-
interface TelemetryConfig {
|
|
456
|
-
baseUrl?: string;
|
|
457
|
-
orgName?: string;
|
|
458
|
-
tenantName?: string;
|
|
459
|
-
clientId?: string;
|
|
460
|
-
redirectUri?: string;
|
|
461
|
-
}
|
|
462
|
-
interface TrackOptions {
|
|
463
|
-
condition?: boolean | ((...args: any[]) => boolean);
|
|
464
|
-
attributes?: TelemetryAttributes;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* SDK Track decorator and function for telemetry
|
|
469
|
-
*/
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Track decorator that can be used to automatically track function calls
|
|
473
|
-
*
|
|
474
|
-
* Usage:
|
|
475
|
-
* @track("Service.Method")
|
|
476
|
-
* function myFunction() { ... }
|
|
477
|
-
*
|
|
478
|
-
* @track("Queue.GetAll")
|
|
479
|
-
* async getAll() { ... }
|
|
480
|
-
*
|
|
481
|
-
* @track("Tasks.Create")
|
|
482
|
-
* async create() { ... }
|
|
483
|
-
*
|
|
484
|
-
* @track("Assets.Update", { condition: false })
|
|
485
|
-
* function myFunction() { ... }
|
|
486
|
-
*
|
|
487
|
-
* @track("Processes.Start", { attributes: { customProp: "value" } })
|
|
488
|
-
* function myFunction() { ... }
|
|
489
|
-
*/
|
|
490
|
-
declare function track(nameOrOptions?: string | TrackOptions, options?: TrackOptions): MethodDecorator | ((target: any) => any);
|
|
491
|
-
/**
|
|
492
|
-
* Direct tracking function
|
|
493
|
-
*/
|
|
494
|
-
declare function trackEvent(eventName: string, name?: string, attributes?: TelemetryAttributes): void;
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Singleton telemetry client
|
|
498
|
-
*/
|
|
499
|
-
declare class TelemetryClient {
|
|
500
|
-
private static instance;
|
|
501
|
-
private isInitialized;
|
|
502
|
-
private logProvider?;
|
|
503
|
-
private logger?;
|
|
504
|
-
private telemetryContext?;
|
|
505
|
-
private constructor();
|
|
506
|
-
static getInstance(): TelemetryClient;
|
|
507
|
-
/**
|
|
508
|
-
* Initialize telemetry
|
|
509
|
-
*/
|
|
510
|
-
initialize(config?: TelemetryConfig): void;
|
|
511
|
-
private getConnectionString;
|
|
512
|
-
private setupTelemetryProvider;
|
|
513
|
-
/**
|
|
514
|
-
* Track a telemetry event
|
|
515
|
-
*/
|
|
516
|
-
track(eventName: string, name?: string, extraAttributes?: TelemetryAttributes): void;
|
|
517
|
-
/**
|
|
518
|
-
* Get enriched attributes for telemetry events
|
|
519
|
-
*/
|
|
520
|
-
private getEnrichedAttributes;
|
|
521
|
-
/**
|
|
522
|
-
* Create cloud URL from base URL, organization ID, and tenant ID
|
|
523
|
-
*/
|
|
524
|
-
private createCloudUrl;
|
|
525
|
-
}
|
|
526
|
-
declare const telemetryClient: TelemetryClient;
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* SDK Telemetry constants
|
|
530
|
-
*/
|
|
531
|
-
declare 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";
|
|
532
|
-
declare const SDK_VERSION = "1.3.8";
|
|
533
|
-
declare const VERSION = "Version";
|
|
534
|
-
declare const SERVICE = "Service";
|
|
535
|
-
declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
536
|
-
declare const CLOUD_TENANT_NAME = "CloudTenantName";
|
|
537
|
-
declare const CLOUD_URL = "CloudUrl";
|
|
538
|
-
declare const CLOUD_CLIENT_ID = "CloudClientId";
|
|
539
|
-
declare const CLOUD_REDIRECT_URI = "CloudRedirectUri";
|
|
540
|
-
declare const APP_NAME = "ApplicationName";
|
|
541
|
-
declare const CLOUD_ROLE_NAME = "uipath-ts-sdk";
|
|
542
|
-
declare const SDK_SERVICE_NAME = "UiPath.TypeScript.Sdk";
|
|
543
|
-
declare const SDK_LOGGER_NAME = "uipath-ts-sdk-telemetry";
|
|
544
|
-
declare const SDK_RUN_EVENT = "Sdk.Run";
|
|
545
|
-
declare const UNKNOWN = "";
|
|
452
|
+
declare const track: _uipath_core_telemetry.Track;
|
|
453
|
+
declare const trackEvent: (eventName: string, name?: string, attributes?: _uipath_core_telemetry.TelemetryAttributes) => void;
|
|
454
|
+
declare const telemetryClient: {
|
|
455
|
+
initialize(context?: TelemetryContext): void;
|
|
456
|
+
};
|
|
546
457
|
|
|
547
|
-
export {
|
|
458
|
+
export { AuthenticationError, AuthorizationError, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, ErrorType, HttpStatus, MAX_PAGE_SIZE, NetworkError, NotFoundError, RateLimitError, ServerError, UiPath, UiPathError, ValidationError, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, telemetryClient, track, trackEvent };
|
|
548
459
|
export type { HasPaginationOptions, NonPaginatedResponse, PaginatedResponse, PaginationCursor, PaginationMethodUnion, PaginationOptions, TokenInfo, UiPathSDKConfig };
|