@uipath/ixp-sdk 1.203.0-preview.212 → 1.204.0-preview.211
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/index.js +150 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1217,6 +1217,11 @@ var pickName = (claims) => {
|
|
|
1217
1217
|
const username = asString(claims?.preferred_username);
|
|
1218
1218
|
return asString(claims?.name) ?? (looksLikeEmail(username) ? undefined : username);
|
|
1219
1219
|
};
|
|
1220
|
+
var pickScopes = (claims) => {
|
|
1221
|
+
const raw = claims?.scope;
|
|
1222
|
+
const scopes = Array.isArray(raw) ? raw.filter((entry) => asString(entry) !== undefined) : typeof raw === "string" ? raw.split(/\s+/).filter(Boolean) : [];
|
|
1223
|
+
return scopes.length > 0 ? scopes : undefined;
|
|
1224
|
+
};
|
|
1220
1225
|
var resolveSessionIdentity = (accessToken, authFlow) => {
|
|
1221
1226
|
const claims = accessToken ? decodeClaims(accessToken) : undefined;
|
|
1222
1227
|
const email = pickEmail(claims);
|
|
@@ -1242,6 +1247,7 @@ var resolveSessionIdentity = (accessToken, authFlow) => {
|
|
|
1242
1247
|
identity.clientId = clientId;
|
|
1243
1248
|
return identity;
|
|
1244
1249
|
};
|
|
1250
|
+
var readTokenScopes = (accessToken) => accessToken ? pickScopes(decodeClaims(accessToken)) : undefined;
|
|
1245
1251
|
|
|
1246
1252
|
// ../auth/src/envAuth.ts
|
|
1247
1253
|
var ENV_AUTH_ENABLE_VAR = "UIPATH_CLI_ENABLE_ENV_AUTH";
|
|
@@ -1314,6 +1320,7 @@ var readAuthFromEnv = () => {
|
|
|
1314
1320
|
const expiration = getTokenExpiration(accessToken);
|
|
1315
1321
|
const loginStatus = expiration && expiration <= new Date ? "Expired" : "Logged in";
|
|
1316
1322
|
const identity = resolveSessionIdentity(accessToken);
|
|
1323
|
+
const scopes = readTokenScopes(accessToken);
|
|
1317
1324
|
return {
|
|
1318
1325
|
loginStatus,
|
|
1319
1326
|
accessToken,
|
|
@@ -1324,7 +1331,8 @@ var readAuthFromEnv = () => {
|
|
|
1324
1331
|
tenantId,
|
|
1325
1332
|
expiration,
|
|
1326
1333
|
source: "env-vars" /* EnvironmentVariables */,
|
|
1327
|
-
...identity ? { identity } : {}
|
|
1334
|
+
...identity ? { identity } : {},
|
|
1335
|
+
...scopes ? { scopes } : {}
|
|
1328
1336
|
};
|
|
1329
1337
|
};
|
|
1330
1338
|
|
|
@@ -1966,10 +1974,15 @@ async function buildFileStatus(tokens, credentials, globalHint) {
|
|
|
1966
1974
|
}
|
|
1967
1975
|
function identityFields(accessToken, credentials) {
|
|
1968
1976
|
const identity = resolveSessionIdentity(accessToken, parseAuthFlow(credentials[AUTH_FLOW_ENV_VAR]));
|
|
1969
|
-
|
|
1977
|
+
const scopes = readTokenScopes(accessToken);
|
|
1978
|
+
return {
|
|
1979
|
+
...identity ? { identity } : {},
|
|
1980
|
+
...scopes ? { scopes } : {}
|
|
1981
|
+
};
|
|
1970
1982
|
}
|
|
1971
1983
|
function buildRobotStatus(robotCreds) {
|
|
1972
1984
|
const identity = resolveSessionIdentity(robotCreds.accessToken);
|
|
1985
|
+
const scopes = readTokenScopes(robotCreds.accessToken);
|
|
1973
1986
|
return {
|
|
1974
1987
|
loginStatus: "Logged in",
|
|
1975
1988
|
accessToken: robotCreds.accessToken,
|
|
@@ -1981,7 +1994,8 @@ function buildRobotStatus(robotCreds) {
|
|
|
1981
1994
|
issuer: robotCreds.issuer,
|
|
1982
1995
|
expiration: getTokenExpiration(robotCreds.accessToken),
|
|
1983
1996
|
source: "robot" /* Robot */,
|
|
1984
|
-
...identity ? { identity } : {}
|
|
1997
|
+
...identity ? { identity } : {},
|
|
1998
|
+
...scopes ? { scopes } : {}
|
|
1985
1999
|
};
|
|
1986
2000
|
}
|
|
1987
2001
|
var isFileNotFoundError = (error) => {
|
|
@@ -2281,9 +2295,137 @@ function isTelemetryDisabled() {
|
|
|
2281
2295
|
return value === "1" || value === "true";
|
|
2282
2296
|
}
|
|
2283
2297
|
|
|
2298
|
+
// ../common/src/telemetry/telemetry-dimensions.ts
|
|
2299
|
+
var BaseDimensions = {
|
|
2300
|
+
ApplicationName: "ApplicationName",
|
|
2301
|
+
ProductVersion: "ProductVersion",
|
|
2302
|
+
InstallationId: "InstallationId",
|
|
2303
|
+
CloudUserId: "CloudUserId",
|
|
2304
|
+
CloudTenantId: "CloudTenantId",
|
|
2305
|
+
CloudOrganizationId: "CloudOrganizationId",
|
|
2306
|
+
IsInternalUser: "IsInternalUser",
|
|
2307
|
+
Environment: "Environment",
|
|
2308
|
+
BaseUrl: "BaseUrl",
|
|
2309
|
+
Region: "Region",
|
|
2310
|
+
Agent: "Agent",
|
|
2311
|
+
AgentVersion: "AgentVersion",
|
|
2312
|
+
AgentModel: "AgentModel",
|
|
2313
|
+
ToolName: "ToolName",
|
|
2314
|
+
ToolVersion: "ToolVersion",
|
|
2315
|
+
ExecutionContext: "ExecutionContext",
|
|
2316
|
+
CiProvider: "CiProvider",
|
|
2317
|
+
SessionIdSource: "SessionIdSource",
|
|
2318
|
+
SessionId: "SessionId"
|
|
2319
|
+
};
|
|
2320
|
+
var CommandDimensions = {
|
|
2321
|
+
IsCommand: "IsCommand",
|
|
2322
|
+
IsReexec: "IsReexec",
|
|
2323
|
+
CommandName: "CommandName",
|
|
2324
|
+
ExitCode: "ExitCode",
|
|
2325
|
+
TerminalOutcome: "TerminalOutcome",
|
|
2326
|
+
ErrorClass: "ErrorClass",
|
|
2327
|
+
TerminalSignal: "TerminalSignal",
|
|
2328
|
+
ErrorMessage: "ErrorMessage",
|
|
2329
|
+
SkillName: "SkillName",
|
|
2330
|
+
ProductArea: "ProductArea",
|
|
2331
|
+
Mode: "Mode"
|
|
2332
|
+
};
|
|
2333
|
+
var ShipDimensions = {
|
|
2334
|
+
ShipKind: "ShipKind",
|
|
2335
|
+
Target: "Target",
|
|
2336
|
+
ProjectType: "ProjectType",
|
|
2337
|
+
ProjectTypes: "ProjectTypes",
|
|
2338
|
+
ArtifactCorrelationKey: "ArtifactCorrelationKey",
|
|
2339
|
+
PackageName: "PackageName",
|
|
2340
|
+
PackageVersion: "PackageVersion",
|
|
2341
|
+
PackageVersionKey: "PackageVersionKey",
|
|
2342
|
+
DeploymentKey: "DeploymentKey",
|
|
2343
|
+
SolutionId: "SolutionId",
|
|
2344
|
+
FolderKey: "FolderKey",
|
|
2345
|
+
FeedId: "FeedId"
|
|
2346
|
+
};
|
|
2347
|
+
var ErrorDimensions = {
|
|
2348
|
+
Result: "Result",
|
|
2349
|
+
ErrorCode: "ErrorCode",
|
|
2350
|
+
Retry: "Retry",
|
|
2351
|
+
ErrorMessage: "ErrorMessage"
|
|
2352
|
+
};
|
|
2353
|
+
var AuthDimensions = {
|
|
2354
|
+
AuthenticationMethod: "AuthenticationMethod",
|
|
2355
|
+
Success: "Success",
|
|
2356
|
+
Reason: "Reason"
|
|
2357
|
+
};
|
|
2358
|
+
var SkillsDimensions = {
|
|
2359
|
+
SchemaVersion: "SchemaVersion",
|
|
2360
|
+
AgentType: "AgentType",
|
|
2361
|
+
SkillsVersion: "SkillsVersion",
|
|
2362
|
+
UipSubcommand: "UipSubcommand",
|
|
2363
|
+
FileExtension: "FileExtension",
|
|
2364
|
+
SubagentModel: "SubagentModel",
|
|
2365
|
+
SubagentType: "SubagentType",
|
|
2366
|
+
PermissionMode: "PermissionMode",
|
|
2367
|
+
EffortLevel: "EffortLevel",
|
|
2368
|
+
SessionSource: "SessionSource",
|
|
2369
|
+
Outcome: "Outcome",
|
|
2370
|
+
DurationMs: "DurationMs",
|
|
2371
|
+
Source: "Source"
|
|
2372
|
+
};
|
|
2373
|
+
var PackagerDimensions = {
|
|
2374
|
+
ProjectId: "ProjectId",
|
|
2375
|
+
ProjectType: "ProjectType",
|
|
2376
|
+
SolutionId: "SolutionId"
|
|
2377
|
+
};
|
|
2378
|
+
var ScopeDimensions = {
|
|
2379
|
+
FolderId: "FolderId"
|
|
2380
|
+
};
|
|
2381
|
+
var ID_DIMENSIONS = new Set([
|
|
2382
|
+
BaseDimensions.CloudUserId,
|
|
2383
|
+
BaseDimensions.CloudTenantId,
|
|
2384
|
+
BaseDimensions.CloudOrganizationId,
|
|
2385
|
+
BaseDimensions.InstallationId,
|
|
2386
|
+
ShipDimensions.ArtifactCorrelationKey,
|
|
2387
|
+
ShipDimensions.PackageVersionKey,
|
|
2388
|
+
ShipDimensions.DeploymentKey,
|
|
2389
|
+
ShipDimensions.SolutionId,
|
|
2390
|
+
ShipDimensions.FolderKey,
|
|
2391
|
+
ShipDimensions.FeedId,
|
|
2392
|
+
PackagerDimensions.ProjectId
|
|
2393
|
+
]);
|
|
2394
|
+
var RESERVED_DIMENSION_NAMES = new Set([
|
|
2395
|
+
...Object.values(BaseDimensions),
|
|
2396
|
+
...Object.values(CommandDimensions),
|
|
2397
|
+
...Object.values(ShipDimensions),
|
|
2398
|
+
...Object.values(ErrorDimensions),
|
|
2399
|
+
...Object.values(AuthDimensions),
|
|
2400
|
+
...Object.values(SkillsDimensions),
|
|
2401
|
+
...Object.values(PackagerDimensions),
|
|
2402
|
+
...Object.values(ScopeDimensions)
|
|
2403
|
+
]);
|
|
2404
|
+
var CURATED_DIMENSIONS = new Set([
|
|
2405
|
+
BaseDimensions.ApplicationName,
|
|
2406
|
+
BaseDimensions.ProductVersion,
|
|
2407
|
+
BaseDimensions.InstallationId,
|
|
2408
|
+
BaseDimensions.CloudUserId,
|
|
2409
|
+
BaseDimensions.CloudTenantId,
|
|
2410
|
+
BaseDimensions.CloudOrganizationId,
|
|
2411
|
+
BaseDimensions.IsInternalUser,
|
|
2412
|
+
BaseDimensions.Environment,
|
|
2413
|
+
BaseDimensions.BaseUrl,
|
|
2414
|
+
BaseDimensions.Region,
|
|
2415
|
+
BaseDimensions.Agent,
|
|
2416
|
+
BaseDimensions.AgentVersion,
|
|
2417
|
+
BaseDimensions.ToolVersion,
|
|
2418
|
+
BaseDimensions.ExecutionContext,
|
|
2419
|
+
BaseDimensions.CiProvider,
|
|
2420
|
+
BaseDimensions.SessionIdSource,
|
|
2421
|
+
BaseDimensions.SessionId,
|
|
2422
|
+
...Object.values(CommandDimensions),
|
|
2423
|
+
...Object.values(ShipDimensions)
|
|
2424
|
+
]);
|
|
2425
|
+
|
|
2284
2426
|
// ../common/src/sdk-user-agent.ts
|
|
2285
2427
|
var CODING_AGENT_HEADER = "x-coding-agent-info";
|
|
2286
|
-
var AGENT_PROPERTY =
|
|
2428
|
+
var AGENT_PROPERTY = BaseDimensions.Agent;
|
|
2287
2429
|
var CODING_AGENT_PROPERTY = "CodingAgent";
|
|
2288
2430
|
var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
|
|
2289
2431
|
function splitUserAgentTokens(value) {
|
|
@@ -2333,7 +2475,7 @@ var package_default = {
|
|
|
2333
2475
|
name: "@uipath/ixp-sdk",
|
|
2334
2476
|
author: "UiPath",
|
|
2335
2477
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
2336
|
-
version: "1.
|
|
2478
|
+
version: "1.204.0-preview.211",
|
|
2337
2479
|
description: "SDK for the UiPath IXP (Intelligent eXtraction Platform) API — projects, taxonomies, prompts, predictions, and model publishing.",
|
|
2338
2480
|
repository: {
|
|
2339
2481
|
type: "git",
|
|
@@ -2358,6 +2500,7 @@ var package_default = {
|
|
|
2358
2500
|
],
|
|
2359
2501
|
scripts: {
|
|
2360
2502
|
build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked",
|
|
2503
|
+
typecheck: "tsc --noEmit",
|
|
2361
2504
|
lint: "biome check .",
|
|
2362
2505
|
"lint:fix": "biome check --write .",
|
|
2363
2506
|
test: "vitest run"
|
|
@@ -2713,6 +2856,7 @@ async function changeFieldType(config, projectName, groupName, fieldName, typeNa
|
|
|
2713
2856
|
async function updateFieldPrompts(config, projectName, updates) {
|
|
2714
2857
|
return designtimePost(config, `/api/projects/${encodeURIComponent(projectName)}/fields/update-prompts`, {
|
|
2715
2858
|
Updates: updates.map((u) => ({
|
|
2859
|
+
Group: u.group,
|
|
2716
2860
|
Name: u.name,
|
|
2717
2861
|
Instructions: u.instructions
|
|
2718
2862
|
}))
|
|
@@ -2763,4 +2907,4 @@ export {
|
|
|
2763
2907
|
uploadDocument
|
|
2764
2908
|
};
|
|
2765
2909
|
|
|
2766
|
-
//# debugId=
|
|
2910
|
+
//# debugId=98E0A7579EC811BB64756E2164756E21
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/ixp-sdk",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.204.0-preview.211",
|
|
6
6
|
"description": "SDK for the UiPath IXP (Intelligent eXtraction Platform) API — projects, taxonomies, prompts, predictions, and model publishing.",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "275e01f1f6098d4c3bc9673f5225f33372822534"
|
|
29
29
|
}
|