@uipath/uipath-typescript 1.4.0 → 1.4.2
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/agent-memory/index.cjs +16 -9
- package/dist/agent-memory/index.mjs +16 -9
- package/dist/agents/index.cjs +278 -9
- package/dist/agents/index.d.ts +465 -6
- package/dist/agents/index.mjs +279 -10
- package/dist/assets/index.cjs +16 -9
- package/dist/assets/index.mjs +16 -9
- package/dist/attachments/index.cjs +16 -9
- package/dist/attachments/index.mjs +16 -9
- package/dist/buckets/index.cjs +114 -124
- package/dist/buckets/index.d.ts +197 -84
- package/dist/buckets/index.mjs +114 -124
- package/dist/cases/index.cjs +79 -13
- package/dist/cases/index.d.ts +30 -3
- package/dist/cases/index.mjs +79 -13
- package/dist/conversational-agent/index.cjs +16 -9
- package/dist/conversational-agent/index.mjs +16 -9
- package/dist/core/index.cjs +35 -6
- package/dist/core/index.mjs +35 -6
- package/dist/document-understanding/index.cjs +84 -84
- package/dist/document-understanding/index.d.ts +2 -1
- package/dist/document-understanding/index.mjs +1 -1
- package/dist/entities/index.cjs +253 -69
- package/dist/entities/index.d.ts +343 -116
- package/dist/entities/index.mjs +253 -69
- package/dist/feedback/index.cjs +16 -9
- package/dist/feedback/index.mjs +16 -9
- package/dist/governance/index.cjs +16 -9
- package/dist/governance/index.mjs +16 -9
- package/dist/index.cjs +529 -193
- package/dist/index.d.ts +2141 -750
- package/dist/index.mjs +529 -194
- package/dist/index.umd.js +529 -193
- package/dist/jobs/index.cjs +16 -9
- package/dist/jobs/index.mjs +16 -9
- package/dist/maestro-processes/index.cjs +16 -9
- package/dist/maestro-processes/index.mjs +16 -9
- package/dist/orchestrator-du-module/index.cjs +1788 -0
- package/dist/orchestrator-du-module/index.d.ts +757 -0
- package/dist/orchestrator-du-module/index.mjs +1785 -0
- package/dist/processes/index.cjs +16 -9
- package/dist/processes/index.mjs +16 -9
- package/dist/queues/index.cjs +16 -9
- package/dist/queues/index.mjs +16 -9
- package/dist/tasks/index.cjs +79 -13
- package/dist/tasks/index.d.ts +109 -4
- package/dist/tasks/index.mjs +80 -14
- package/dist/traces/index.cjs +303 -9
- package/dist/traces/index.d.ts +482 -2
- package/dist/traces/index.mjs +302 -10
- package/package.json +11 -1
package/dist/traces/index.mjs
CHANGED
|
@@ -917,6 +917,35 @@ const ODATA_PREFIX = '$';
|
|
|
917
917
|
const HTTP_METHODS = {
|
|
918
918
|
GET: 'GET',
|
|
919
919
|
POST: 'POST'};
|
|
920
|
+
/**
|
|
921
|
+
* Agents pagination constants — items and total count are nested under the response envelope
|
|
922
|
+
*/
|
|
923
|
+
const AGENTS_PAGINATION = {
|
|
924
|
+
/** Dotted path to the total count in the agents response envelope */
|
|
925
|
+
TOTAL_COUNT_FIELD: 'pagination.totalCount'
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* Agents OFFSET pagination parameter names (page-number style, 0-based, no skip conversion)
|
|
929
|
+
*/
|
|
930
|
+
const AGENTS_OFFSET_PARAMS = {
|
|
931
|
+
/** Page size parameter name */
|
|
932
|
+
PAGE_SIZE_PARAM: 'pageSize',
|
|
933
|
+
/** Page number parameter name (sent directly, 0-based) */
|
|
934
|
+
OFFSET_PARAM: 'pageNumber',
|
|
935
|
+
/** No count param needed */
|
|
936
|
+
COUNT_PARAM: undefined
|
|
937
|
+
};
|
|
938
|
+
/**
|
|
939
|
+
* Traceview spans pagination constants — items sit directly under `data`,
|
|
940
|
+
* total count under the same envelope location as the agents list. Request
|
|
941
|
+
* params reuse {@link AGENTS_OFFSET_PARAMS} (pageSize + 0-based pageNumber).
|
|
942
|
+
*/
|
|
943
|
+
const TRACEVIEW_SPANS_PAGINATION = {
|
|
944
|
+
/** Field name for the spans array in the response envelope */
|
|
945
|
+
ITEMS_FIELD: 'data',
|
|
946
|
+
/** Total count path — same envelope location as the agents list. */
|
|
947
|
+
TOTAL_COUNT_FIELD: AGENTS_PAGINATION.TOTAL_COUNT_FIELD
|
|
948
|
+
};
|
|
920
949
|
/**
|
|
921
950
|
* OData OFFSET pagination parameter names (ODATA-style)
|
|
922
951
|
*/
|
|
@@ -1203,12 +1232,18 @@ class PaginationHelpers {
|
|
|
1203
1232
|
* @returns Promise resolving to a paginated result
|
|
1204
1233
|
*/
|
|
1205
1234
|
static async getAllPaginated(params) {
|
|
1206
|
-
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1235
|
+
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1207
1236
|
const endpoint = getEndpoint(folderId);
|
|
1208
1237
|
const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
|
|
1238
|
+
// On POST, the caller's options go in the body; queryParams stays in the URL.
|
|
1239
|
+
// On GET, everything is URL — queryParams merges with additionalParams.
|
|
1240
|
+
const isPost = method === HTTP_METHODS.POST;
|
|
1241
|
+
const requestSpec = isPost
|
|
1242
|
+
? { body: additionalParams, params: queryParams }
|
|
1243
|
+
: { params: { ...additionalParams, ...queryParams } };
|
|
1209
1244
|
const paginatedResponse = await serviceAccess.requestWithPagination(method, endpoint, paginationParams, {
|
|
1210
1245
|
headers,
|
|
1211
|
-
|
|
1246
|
+
...requestSpec,
|
|
1212
1247
|
pagination: {
|
|
1213
1248
|
paginationType: options.paginationType || PaginationType.OFFSET,
|
|
1214
1249
|
itemsField: options.itemsField || DEFAULT_ITEMS_FIELD,
|
|
@@ -1233,7 +1268,7 @@ class PaginationHelpers {
|
|
|
1233
1268
|
* @returns Promise resolving to an object with data and totalCount
|
|
1234
1269
|
*/
|
|
1235
1270
|
static async getAllNonPaginated(params) {
|
|
1236
|
-
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1271
|
+
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1237
1272
|
// Set default field names
|
|
1238
1273
|
const itemsField = options.itemsField || DEFAULT_ITEMS_FIELD;
|
|
1239
1274
|
const totalCountField = options.totalCountField || DEFAULT_TOTAL_COUNT_FIELD;
|
|
@@ -1243,11 +1278,11 @@ class PaginationHelpers {
|
|
|
1243
1278
|
// Make the API call based on method
|
|
1244
1279
|
let response;
|
|
1245
1280
|
if (method === HTTP_METHODS.POST) {
|
|
1246
|
-
response = await serviceAccess.post(endpoint, additionalParams, { headers });
|
|
1281
|
+
response = await serviceAccess.post(endpoint, additionalParams, { headers, params: queryParams });
|
|
1247
1282
|
}
|
|
1248
1283
|
else {
|
|
1249
1284
|
response = await serviceAccess.get(endpoint, {
|
|
1250
|
-
params: additionalParams,
|
|
1285
|
+
params: { ...additionalParams, ...queryParams },
|
|
1251
1286
|
headers
|
|
1252
1287
|
});
|
|
1253
1288
|
}
|
|
@@ -1302,6 +1337,7 @@ class PaginationHelpers {
|
|
|
1302
1337
|
headers: config.headers,
|
|
1303
1338
|
paginationParams: cursor ? { cursor, pageSize } : jumpToPage !== undefined ? { jumpToPage, pageSize } : { pageSize },
|
|
1304
1339
|
additionalParams: prefixedOptions,
|
|
1340
|
+
queryParams: config.queryParams,
|
|
1305
1341
|
transformFn: config.transformFn,
|
|
1306
1342
|
method: config.method,
|
|
1307
1343
|
options: {
|
|
@@ -1319,6 +1355,7 @@ class PaginationHelpers {
|
|
|
1319
1355
|
folderId,
|
|
1320
1356
|
headers: config.headers,
|
|
1321
1357
|
additionalParams: prefixedOptions,
|
|
1358
|
+
queryParams: config.queryParams,
|
|
1322
1359
|
transformFn: config.transformFn,
|
|
1323
1360
|
method: config.method,
|
|
1324
1361
|
options: {
|
|
@@ -1510,18 +1547,17 @@ class BaseService {
|
|
|
1510
1547
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
1511
1548
|
// Prepare request parameters based on pagination type
|
|
1512
1549
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
1513
|
-
//
|
|
1550
|
+
// Route pagination state to wherever the API expects it (body for POST, URL for GET).
|
|
1551
|
+
// Caller-supplied options.body / options.params are respected as-is — the api-client
|
|
1552
|
+
// already handles params (URL) and body (request body) independently for every method.
|
|
1514
1553
|
if (method.toUpperCase() === 'POST') {
|
|
1515
1554
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
1516
1555
|
options.body = {
|
|
1517
1556
|
...existingBody,
|
|
1518
|
-
...options.params,
|
|
1519
1557
|
...requestParams
|
|
1520
1558
|
};
|
|
1521
|
-
options.params = undefined;
|
|
1522
1559
|
}
|
|
1523
1560
|
else {
|
|
1524
|
-
// Merge pagination parameters with existing parameters
|
|
1525
1561
|
options.params = {
|
|
1526
1562
|
...options.params,
|
|
1527
1563
|
...requestParams
|
|
@@ -1791,6 +1827,23 @@ const SpanAttachmentDirectionMap = {
|
|
|
1791
1827
|
* Base path constants for different services
|
|
1792
1828
|
*/
|
|
1793
1829
|
const LLMOPS_BASE = 'llmopstenant_';
|
|
1830
|
+
const INSIGHTS_RTM_BASE = 'insightsrtm_';
|
|
1831
|
+
|
|
1832
|
+
/**
|
|
1833
|
+
* Agent Traces Service Endpoints
|
|
1834
|
+
*/
|
|
1835
|
+
const AGENT_TRACES_ENDPOINTS = {
|
|
1836
|
+
/** Trace-level time-series of error counts grouped by error name. */
|
|
1837
|
+
GET_ERRORS_TIMELINE: `${INSIGHTS_RTM_BASE}/Traceview/errorsTimeline`,
|
|
1838
|
+
/** Trace-level time-series of latency (decimal seconds per series). */
|
|
1839
|
+
GET_LATENCY_TIMELINE: `${INSIGHTS_RTM_BASE}/Traceview/latencyTimeline`,
|
|
1840
|
+
/** Trace-level per-agent AGU/PLTU consumption totals. */
|
|
1841
|
+
GET_UNIT_CONSUMPTION: `${INSIGHTS_RTM_BASE}/Traceview/unitConsumption`,
|
|
1842
|
+
/** All spans for a single trace (flat array, not paginated). */
|
|
1843
|
+
GET_SPANS_BY_TRACE_ID: (traceId) => `${INSIGHTS_RTM_BASE}/Traceview/spans/${traceId}`,
|
|
1844
|
+
/** Paginated spans whose reference hierarchy contains the given reference id. */
|
|
1845
|
+
GET_SPANS_BY_REFERENCE: (referenceId) => `${INSIGHTS_RTM_BASE}/Traceview/spans/reference/${referenceId}`,
|
|
1846
|
+
};
|
|
1794
1847
|
|
|
1795
1848
|
/**
|
|
1796
1849
|
* Traces Service Endpoints
|
|
@@ -1928,4 +1981,243 @@ __decorate([
|
|
|
1928
1981
|
track('Traces.GetSpansByIds')
|
|
1929
1982
|
], TracesService.prototype, "getSpansByIds", null);
|
|
1930
1983
|
|
|
1931
|
-
|
|
1984
|
+
/**
|
|
1985
|
+
* Maps a raw span record to a {@link AgentSpanGetResponse}
|
|
1986
|
+
*/
|
|
1987
|
+
const transformSpan = (span) => {
|
|
1988
|
+
const { expiryTimeUtc, ...rest } = span;
|
|
1989
|
+
return { ...rest, expiredTime: expiryTimeUtc };
|
|
1990
|
+
};
|
|
1991
|
+
/**
|
|
1992
|
+
* Service for retrieving UiPath Agent trace metrics.
|
|
1993
|
+
*/
|
|
1994
|
+
class AgentTracesService extends BaseService {
|
|
1995
|
+
/**
|
|
1996
|
+
* Retrieves a trace-level time-series of error counts grouped by error name.
|
|
1997
|
+
*
|
|
1998
|
+
* @param options - Optional window and filters
|
|
1999
|
+
* @returns Promise resolving to an array of {@link AgentTraceGetErrorsTimelineResponse}
|
|
2000
|
+
* @example
|
|
2001
|
+
* ```typescript
|
|
2002
|
+
* import { AgentTraces } from '@uipath/uipath-typescript/traces';
|
|
2003
|
+
*
|
|
2004
|
+
* const trace = new AgentTraces(sdk);
|
|
2005
|
+
*
|
|
2006
|
+
* // Get the errors timeline
|
|
2007
|
+
* const result = await trace.getErrorsTimeline();
|
|
2008
|
+
* result.forEach((point) => {
|
|
2009
|
+
* console.log(`${point.date} ${point.name}: ${point.value} errors`);
|
|
2010
|
+
* });
|
|
2011
|
+
* ```
|
|
2012
|
+
* @example
|
|
2013
|
+
* ```typescript
|
|
2014
|
+
* import { AgentTraceExecutionType } from '@uipath/uipath-typescript/traces';
|
|
2015
|
+
*
|
|
2016
|
+
* // Get the errors timeline for an agent version within a time window
|
|
2017
|
+
* const filtered = await trace.getErrorsTimeline({
|
|
2018
|
+
* startTime: new Date('2025-05-01T00:00:00Z'),
|
|
2019
|
+
* endTime: new Date('2025-06-01T00:00:00Z'),
|
|
2020
|
+
* agentId: '<agentId>',
|
|
2021
|
+
* agentVersion: '1.0.0',
|
|
2022
|
+
* executionType: AgentTraceExecutionType.Runtime,
|
|
2023
|
+
* });
|
|
2024
|
+
* ```
|
|
2025
|
+
*/
|
|
2026
|
+
async getErrorsTimeline(options) {
|
|
2027
|
+
const response = await this.post(AGENT_TRACES_ENDPOINTS.GET_ERRORS_TIMELINE, this.buildTraceFilterBody(options));
|
|
2028
|
+
return response.data.data;
|
|
2029
|
+
}
|
|
2030
|
+
/**
|
|
2031
|
+
* Retrieves a trace-level time-series of latency.
|
|
2032
|
+
*
|
|
2033
|
+
* @param options - Optional window and filters
|
|
2034
|
+
* @returns Promise resolving to an array of {@link AgentTraceGetLatencyTimelineResponse}
|
|
2035
|
+
* @example
|
|
2036
|
+
* ```typescript
|
|
2037
|
+
* import { AgentTraces } from '@uipath/uipath-typescript/traces';
|
|
2038
|
+
*
|
|
2039
|
+
* const trace = new AgentTraces(sdk);
|
|
2040
|
+
*
|
|
2041
|
+
* // Get the latency timeline
|
|
2042
|
+
* const result = await trace.getLatencyTimeline();
|
|
2043
|
+
* result.forEach((point) => {
|
|
2044
|
+
* console.log(`${point.date} ${point.name}: ${point.value}s`);
|
|
2045
|
+
* });
|
|
2046
|
+
* ```
|
|
2047
|
+
* @example
|
|
2048
|
+
* ```typescript
|
|
2049
|
+
* import { AgentTraceExecutionType } from '@uipath/uipath-typescript/traces';
|
|
2050
|
+
*
|
|
2051
|
+
* // Get the latency timeline for an agent version within a time window
|
|
2052
|
+
* const filtered = await trace.getLatencyTimeline({
|
|
2053
|
+
* startTime: new Date('2025-05-01T00:00:00Z'),
|
|
2054
|
+
* endTime: new Date('2025-06-01T00:00:00Z'),
|
|
2055
|
+
* agentId: '<agentId>',
|
|
2056
|
+
* agentVersion: '1.0.0',
|
|
2057
|
+
* executionType: AgentTraceExecutionType.Runtime,
|
|
2058
|
+
* });
|
|
2059
|
+
* ```
|
|
2060
|
+
*/
|
|
2061
|
+
async getLatencyTimeline(options) {
|
|
2062
|
+
const response = await this.post(AGENT_TRACES_ENDPOINTS.GET_LATENCY_TIMELINE, this.buildTraceFilterBody(options));
|
|
2063
|
+
return response.data.data;
|
|
2064
|
+
}
|
|
2065
|
+
/**
|
|
2066
|
+
* Retrieves trace-level per-agent unit consumption totals.
|
|
2067
|
+
*
|
|
2068
|
+
* @param options - Optional window and filters
|
|
2069
|
+
* @returns Promise resolving to an array of {@link AgentTraceGetUnitConsumptionResponse}
|
|
2070
|
+
* @example
|
|
2071
|
+
* ```typescript
|
|
2072
|
+
* import { AgentTraces } from '@uipath/uipath-typescript/traces';
|
|
2073
|
+
*
|
|
2074
|
+
* const trace = new AgentTraces(sdk);
|
|
2075
|
+
*
|
|
2076
|
+
* // Get per-agent unit consumption
|
|
2077
|
+
* const result = await trace.getUnitConsumption();
|
|
2078
|
+
* result.forEach((row) => {
|
|
2079
|
+
* console.log(`${row.agentId}: ${row.agentUnitsConsumed} AGU, ${row.platformUnitsConsumed} PLTU`);
|
|
2080
|
+
* });
|
|
2081
|
+
* ```
|
|
2082
|
+
* @example
|
|
2083
|
+
* ```typescript
|
|
2084
|
+
* import { AgentTraceExecutionType } from '@uipath/uipath-typescript/traces';
|
|
2085
|
+
*
|
|
2086
|
+
* // Get per-agent unit consumption for an agent version within a time window
|
|
2087
|
+
* const filtered = await trace.getUnitConsumption({
|
|
2088
|
+
* startTime: new Date('2025-05-01T00:00:00Z'),
|
|
2089
|
+
* endTime: new Date('2025-06-01T00:00:00Z'),
|
|
2090
|
+
* agentId: '<agentId>',
|
|
2091
|
+
* agentVersion: '1.0.0',
|
|
2092
|
+
* executionType: AgentTraceExecutionType.Runtime,
|
|
2093
|
+
* });
|
|
2094
|
+
* ```
|
|
2095
|
+
*/
|
|
2096
|
+
async getUnitConsumption(options) {
|
|
2097
|
+
const response = await this.post(AGENT_TRACES_ENDPOINTS.GET_UNIT_CONSUMPTION, this.buildTraceFilterBody(options));
|
|
2098
|
+
return response.data.data;
|
|
2099
|
+
}
|
|
2100
|
+
/**
|
|
2101
|
+
* Retrieves every span belonging to a single trace.
|
|
2102
|
+
*
|
|
2103
|
+
* @param traceId - Identifier of the trace whose spans should be returned
|
|
2104
|
+
* @returns Promise resolving to an array of {@link AgentSpanGetResponse}
|
|
2105
|
+
* @example
|
|
2106
|
+
* ```typescript
|
|
2107
|
+
* import { AgentTraces } from '@uipath/uipath-typescript/traces';
|
|
2108
|
+
*
|
|
2109
|
+
* const trace = new AgentTraces(sdk);
|
|
2110
|
+
*
|
|
2111
|
+
* const spans = await trace.getSpansByTraceId('<traceId>');
|
|
2112
|
+
* spans.forEach((span) => {
|
|
2113
|
+
* console.log(`${span.name} (${span.startTime} → ${span.endTime ?? 'in progress'})`);
|
|
2114
|
+
* });
|
|
2115
|
+
* ```
|
|
2116
|
+
*/
|
|
2117
|
+
async getSpansByTraceId(traceId) {
|
|
2118
|
+
if (!traceId)
|
|
2119
|
+
throw new ValidationError({ message: 'traceId is required for getSpansByTraceId' });
|
|
2120
|
+
const response = await this.get(AGENT_TRACES_ENDPOINTS.GET_SPANS_BY_TRACE_ID(traceId));
|
|
2121
|
+
return (response.data ?? []).map(transformSpan);
|
|
2122
|
+
}
|
|
2123
|
+
/**
|
|
2124
|
+
* Retrieves spans whose reference hierarchy contains the given reference id.
|
|
2125
|
+
*
|
|
2126
|
+
* Returns a {@link PaginatedResponse} when pagination options (`pageSize`,
|
|
2127
|
+
* `cursor`, or `jumpToPage`) are provided, otherwise a
|
|
2128
|
+
* {@link NonPaginatedResponse}.
|
|
2129
|
+
*
|
|
2130
|
+
* @param referenceId - Reference id matched against each span's reference hierarchy
|
|
2131
|
+
* @param options - Optional pagination and hierarchy/time filters
|
|
2132
|
+
* @returns Promise resolving to a paginated or non-paginated list of {@link AgentSpanGetResponse}
|
|
2133
|
+
* @example
|
|
2134
|
+
* ```typescript
|
|
2135
|
+
* import { AgentTraces } from '@uipath/uipath-typescript/traces';
|
|
2136
|
+
*
|
|
2137
|
+
* const trace = new AgentTraces(sdk);
|
|
2138
|
+
*
|
|
2139
|
+
* // Get spans by referenceId
|
|
2140
|
+
* const result = await trace.getSpansByReference('<referenceId>');
|
|
2141
|
+
* result.items.forEach((span) => console.log(span.name));
|
|
2142
|
+
* ```
|
|
2143
|
+
* @example
|
|
2144
|
+
* ```typescript
|
|
2145
|
+
* import { AgentTraceExecutionType } from '@uipath/uipath-typescript/traces';
|
|
2146
|
+
*
|
|
2147
|
+
* // Get spans by referenceId within a trace and time window
|
|
2148
|
+
* const page = await trace.getSpansByReference('<referenceId>', {
|
|
2149
|
+
* traceId: '<traceId>',
|
|
2150
|
+
* executionType: AgentTraceExecutionType.Runtime,
|
|
2151
|
+
* startTime: new Date('2025-05-01T00:00:00Z'),
|
|
2152
|
+
* endTime: new Date('2025-06-01T00:00:00Z'),
|
|
2153
|
+
* pageSize: 25,
|
|
2154
|
+
* });
|
|
2155
|
+
*
|
|
2156
|
+
* if (page.hasNextPage && page.nextCursor) {
|
|
2157
|
+
* const next = await trace.getSpansByReference('<referenceId>', { cursor: page.nextCursor });
|
|
2158
|
+
* }
|
|
2159
|
+
* ```
|
|
2160
|
+
*/
|
|
2161
|
+
async getSpansByReference(referenceId, options) {
|
|
2162
|
+
if (!referenceId)
|
|
2163
|
+
throw new ValidationError({ message: 'referenceId is required for getSpansByReference' });
|
|
2164
|
+
const { startTime, endTime, ...rest } = options ?? {};
|
|
2165
|
+
const apiOptions = {
|
|
2166
|
+
...rest,
|
|
2167
|
+
...(startTime !== undefined ? { startTime: startTime.toISOString() } : {}),
|
|
2168
|
+
...(endTime !== undefined ? { endTime: endTime.toISOString() } : {}),
|
|
2169
|
+
};
|
|
2170
|
+
return PaginationHelpers.getAll({
|
|
2171
|
+
serviceAccess: this.createPaginationServiceAccess(),
|
|
2172
|
+
getEndpoint: () => AGENT_TRACES_ENDPOINTS.GET_SPANS_BY_REFERENCE(referenceId),
|
|
2173
|
+
method: HTTP_METHODS.GET,
|
|
2174
|
+
transformFn: transformSpan,
|
|
2175
|
+
excludeFromPrefix: Object.keys(apiOptions),
|
|
2176
|
+
pagination: {
|
|
2177
|
+
paginationType: PaginationType.OFFSET,
|
|
2178
|
+
itemsField: TRACEVIEW_SPANS_PAGINATION.ITEMS_FIELD,
|
|
2179
|
+
totalCountField: TRACEVIEW_SPANS_PAGINATION.TOTAL_COUNT_FIELD,
|
|
2180
|
+
paginationParams: {
|
|
2181
|
+
pageSizeParam: AGENTS_OFFSET_PARAMS.PAGE_SIZE_PARAM,
|
|
2182
|
+
offsetParam: AGENTS_OFFSET_PARAMS.OFFSET_PARAM,
|
|
2183
|
+
countParam: AGENTS_OFFSET_PARAMS.COUNT_PARAM,
|
|
2184
|
+
convertToSkip: false,
|
|
2185
|
+
zeroBased: true,
|
|
2186
|
+
},
|
|
2187
|
+
},
|
|
2188
|
+
}, apiOptions);
|
|
2189
|
+
}
|
|
2190
|
+
buildTraceFilterBody(options) {
|
|
2191
|
+
const body = {};
|
|
2192
|
+
if (options?.startTime !== undefined)
|
|
2193
|
+
body.startTime = options.startTime.toISOString();
|
|
2194
|
+
if (options?.endTime !== undefined)
|
|
2195
|
+
body.endTime = options.endTime.toISOString();
|
|
2196
|
+
if (options?.folderKeys !== undefined)
|
|
2197
|
+
body.folderKeys = options.folderKeys;
|
|
2198
|
+
if (options?.agentId !== undefined)
|
|
2199
|
+
body.agentId = options.agentId;
|
|
2200
|
+
if (options?.agentVersion !== undefined)
|
|
2201
|
+
body.agentVersion = options.agentVersion;
|
|
2202
|
+
if (options?.executionType !== undefined)
|
|
2203
|
+
body.executionType = options.executionType;
|
|
2204
|
+
return body;
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
__decorate([
|
|
2208
|
+
track('AgentTraces.GetErrorsTimeline')
|
|
2209
|
+
], AgentTracesService.prototype, "getErrorsTimeline", null);
|
|
2210
|
+
__decorate([
|
|
2211
|
+
track('AgentTraces.GetLatencyTimeline')
|
|
2212
|
+
], AgentTracesService.prototype, "getLatencyTimeline", null);
|
|
2213
|
+
__decorate([
|
|
2214
|
+
track('AgentTraces.GetUnitConsumption')
|
|
2215
|
+
], AgentTracesService.prototype, "getUnitConsumption", null);
|
|
2216
|
+
__decorate([
|
|
2217
|
+
track('AgentTraces.GetSpansByTraceId')
|
|
2218
|
+
], AgentTracesService.prototype, "getSpansByTraceId", null);
|
|
2219
|
+
__decorate([
|
|
2220
|
+
track('AgentTraces.GetSpansByReference')
|
|
2221
|
+
], AgentTracesService.prototype, "getSpansByReference", null);
|
|
2222
|
+
|
|
2223
|
+
export { SpanExecutionType as AgentTraceExecutionType, AgentTracesService as AgentTraces, SpanAttachmentDirection, SpanAttachmentProvider, SpanExecutionType, SpanPermissionStatus, SpanSource, SpanStatus, SpanVerbosityLevel, TracesService as Traces };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/uipath-typescript",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "UiPath TypeScript SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -186,6 +186,16 @@
|
|
|
186
186
|
"default": "./dist/document-understanding/index.cjs"
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
|
+
"./orchestrator-du-module": {
|
|
190
|
+
"import": {
|
|
191
|
+
"types": "./dist/orchestrator-du-module/index.d.ts",
|
|
192
|
+
"default": "./dist/orchestrator-du-module/index.mjs"
|
|
193
|
+
},
|
|
194
|
+
"require": {
|
|
195
|
+
"types": "./dist/orchestrator-du-module/index.d.ts",
|
|
196
|
+
"default": "./dist/orchestrator-du-module/index.cjs"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
189
199
|
"./agents": {
|
|
190
200
|
"import": {
|
|
191
201
|
"types": "./dist/agents/index.d.ts",
|