@uipath/uipath-typescript 1.3.3 → 1.3.5
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 +8 -1
- package/dist/assets/index.mjs +8 -1
- package/dist/attachments/index.cjs +8 -1
- package/dist/attachments/index.mjs +8 -1
- package/dist/buckets/index.cjs +8 -1
- package/dist/buckets/index.mjs +8 -1
- package/dist/cases/index.cjs +8 -1
- package/dist/cases/index.mjs +8 -1
- package/dist/conversational-agent/index.cjs +8 -1
- package/dist/conversational-agent/index.d.ts +29 -2
- package/dist/conversational-agent/index.mjs +8 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/document-understanding/index.cjs +257 -0
- package/dist/document-understanding/index.d.ts +1185 -0
- package/dist/document-understanding/index.mjs +255 -0
- package/dist/entities/index.cjs +277 -15
- package/dist/entities/index.d.ts +135 -0
- package/dist/entities/index.mjs +277 -15
- package/dist/feedback/index.cjs +8 -1
- package/dist/feedback/index.mjs +8 -1
- package/dist/index.cjs +578 -15
- package/dist/index.d.ts +1384 -9
- package/dist/index.mjs +580 -18
- package/dist/index.umd.js +578 -15
- package/dist/jobs/index.cjs +54 -1
- package/dist/jobs/index.d.ts +52 -0
- package/dist/jobs/index.mjs +54 -1
- package/dist/maestro-processes/index.cjs +8 -1
- package/dist/maestro-processes/index.mjs +8 -1
- package/dist/processes/index.cjs +8 -1
- package/dist/processes/index.mjs +8 -1
- package/dist/queues/index.cjs +8 -1
- package/dist/queues/index.mjs +8 -1
- package/dist/tasks/index.cjs +8 -1
- package/dist/tasks/index.mjs +8 -1
- package/package.json +12 -2
package/dist/entities/index.d.ts
CHANGED
|
@@ -515,6 +515,14 @@ interface EntityFieldBase {
|
|
|
515
515
|
isEncrypted?: boolean;
|
|
516
516
|
/** Default value for the field */
|
|
517
517
|
defaultValue?: string;
|
|
518
|
+
/** Maximum character length for STRING fields (default: 200, range: 1–4000) and MULTILINE_TEXT fields (default: 200, range: 1–10000). */
|
|
519
|
+
lengthLimit?: number;
|
|
520
|
+
/** Maximum allowed value for numeric fields (INTEGER, BIG_INTEGER, FLOAT, DOUBLE, DECIMAL — default: 1,000,000,000,000; range: ±9,007,199,254,740,991) */
|
|
521
|
+
maxValue?: number;
|
|
522
|
+
/** Minimum allowed value for numeric fields (INTEGER, BIG_INTEGER, FLOAT, DOUBLE, DECIMAL — default: -1,000,000,000,000; range: ±9,007,199,254,740,991) */
|
|
523
|
+
minValue?: number;
|
|
524
|
+
/** Number of decimal places for DECIMAL, FLOAT, and DOUBLE fields (default: 2, range: 0–10) */
|
|
525
|
+
decimalPrecision?: number;
|
|
518
526
|
}
|
|
519
527
|
/**
|
|
520
528
|
* User-facing field definition for creating or updating entity schemas
|
|
@@ -1122,6 +1130,8 @@ interface EntityServiceModel {
|
|
|
1122
1130
|
/**
|
|
1123
1131
|
* Deletes data from an entity by entity ID
|
|
1124
1132
|
*
|
|
1133
|
+
* Note: Records deleted using deleteRecordsById will not trigger Data Fabric trigger events. Use {@link deleteRecordById} if you need trigger events to fire for the deleted record.
|
|
1134
|
+
*
|
|
1125
1135
|
* @param id - UUID of the entity
|
|
1126
1136
|
* @param recordIds - Array of record UUIDs to delete
|
|
1127
1137
|
* @param options - Delete options
|
|
@@ -1136,6 +1146,25 @@ interface EntityServiceModel {
|
|
|
1136
1146
|
* ```
|
|
1137
1147
|
*/
|
|
1138
1148
|
deleteRecordsById(id: string, recordIds: string[], options?: EntityDeleteRecordsOptions): Promise<EntityDeleteResponse>;
|
|
1149
|
+
/**
|
|
1150
|
+
* Deletes a single record from an entity by entity ID and record ID
|
|
1151
|
+
*
|
|
1152
|
+
* Note: Data Fabric supports trigger events only on individual deletes, not on deleting multiple records.
|
|
1153
|
+
* Use this method if you need trigger events to fire for the deleted record.
|
|
1154
|
+
*
|
|
1155
|
+
* @param entityId - UUID of the entity
|
|
1156
|
+
* @param recordId - UUID of the record to delete
|
|
1157
|
+
* @returns Promise resolving to void on success
|
|
1158
|
+
* @example
|
|
1159
|
+
* ```typescript
|
|
1160
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1161
|
+
*
|
|
1162
|
+
* const entities = new Entities(sdk);
|
|
1163
|
+
*
|
|
1164
|
+
* await entities.deleteRecordById("<entityId>", "<recordId>");
|
|
1165
|
+
* ```
|
|
1166
|
+
*/
|
|
1167
|
+
deleteRecordById(entityId: string, recordId: string): Promise<void>;
|
|
1139
1168
|
/**
|
|
1140
1169
|
* Queries entity records with filters, sorting, and SDK-managed pagination
|
|
1141
1170
|
*
|
|
@@ -1321,6 +1350,13 @@ interface EntityServiceModel {
|
|
|
1321
1350
|
* { fieldName: "product_name", type: EntityFieldDataType.STRING, isRequired: true, isUnique: true },
|
|
1322
1351
|
* { fieldName: "price", type: EntityFieldDataType.INTEGER, defaultValue: "0" },
|
|
1323
1352
|
* ], { displayName: "Product Catalog", description: "Our product catalog", isRbacEnabled: true });
|
|
1353
|
+
*
|
|
1354
|
+
* // With advanced sqlType constraints (lengthLimit, decimalPrecision, maxValue, minValue) and defaultValue
|
|
1355
|
+
* const ordersId = await entities.create("orders", [
|
|
1356
|
+
* { fieldName: "product_name", type: EntityFieldDataType.STRING, isRequired: true, isUnique: true, lengthLimit: 500 },
|
|
1357
|
+
* { fieldName: "price", type: EntityFieldDataType.DECIMAL, decimalPrecision: 4, maxValue: 999999, minValue: 0 },
|
|
1358
|
+
* { fieldName: "quantity", type: EntityFieldDataType.INTEGER, maxValue: 10000, minValue: 1, defaultValue: "0" },
|
|
1359
|
+
* ]);
|
|
1324
1360
|
* ```
|
|
1325
1361
|
* @internal
|
|
1326
1362
|
*/
|
|
@@ -1368,6 +1404,17 @@ interface EntityServiceModel {
|
|
|
1368
1404
|
* updateFields: [{ id: <fieldId>, displayName: "Unit Price", isRequired: true }],
|
|
1369
1405
|
* displayName: "Price Catalog",
|
|
1370
1406
|
* });
|
|
1407
|
+
*
|
|
1408
|
+
* // Add a STRING/DECIMAL field with explicit advanced sqlType constraints and defaultValue
|
|
1409
|
+
* await entities.updateById(<id>, {
|
|
1410
|
+
* addFields: [
|
|
1411
|
+
* { fieldName: "summary", type: EntityFieldDataType.STRING, lengthLimit: 500, defaultValue: "summary" },
|
|
1412
|
+
* { fieldName: "amount", type: EntityFieldDataType.DECIMAL, decimalPrecision: 4, maxValue: 999999, minValue: 0 },
|
|
1413
|
+
* ],
|
|
1414
|
+
* updateFields: [
|
|
1415
|
+
* { id: <fieldId>, lengthLimit: 1000 },
|
|
1416
|
+
* ],
|
|
1417
|
+
* });
|
|
1371
1418
|
* ```
|
|
1372
1419
|
* @internal
|
|
1373
1420
|
*/
|
|
@@ -1426,11 +1473,23 @@ interface EntityMethods {
|
|
|
1426
1473
|
/**
|
|
1427
1474
|
* Delete data from this entity
|
|
1428
1475
|
*
|
|
1476
|
+
* Note: Records deleted using deleteRecords will not trigger Data Fabric trigger events. Use {@link deleteRecord} if you need trigger events to fire for the deleted record.
|
|
1477
|
+
*
|
|
1429
1478
|
* @param recordIds - Array of record UUIDs to delete
|
|
1430
1479
|
* @param options - Delete options
|
|
1431
1480
|
* @returns Promise resolving to delete response
|
|
1432
1481
|
*/
|
|
1433
1482
|
deleteRecords(recordIds: string[], options?: EntityDeleteRecordsOptions): Promise<EntityDeleteResponse>;
|
|
1483
|
+
/**
|
|
1484
|
+
* Delete a single record from this entity
|
|
1485
|
+
*
|
|
1486
|
+
* Note: Data Fabric supports trigger events only on individual deletes, not on deleting multiple records.
|
|
1487
|
+
* Use this method if you need trigger events to fire for the deleted record.
|
|
1488
|
+
*
|
|
1489
|
+
* @param recordId - UUID of the record to delete
|
|
1490
|
+
* @returns Promise resolving to void on success
|
|
1491
|
+
*/
|
|
1492
|
+
deleteRecord(recordId: string): Promise<void>;
|
|
1434
1493
|
/**
|
|
1435
1494
|
* Get all records from this entity
|
|
1436
1495
|
*
|
|
@@ -1545,6 +1604,14 @@ interface EntityMethods {
|
|
|
1545
1604
|
* displayName: "Updated Name",
|
|
1546
1605
|
* addFields: [{ fieldName: "notes", type: EntityFieldDataType.MULTILINE_TEXT }],
|
|
1547
1606
|
* });
|
|
1607
|
+
*
|
|
1608
|
+
* // Add a STRING/DECIMAL field with explicit advanced sqlType constraints
|
|
1609
|
+
* await entity.update({
|
|
1610
|
+
* addFields: [
|
|
1611
|
+
* { fieldName: "summary", type: EntityFieldDataType.STRING, lengthLimit: 500, defaultValue: "string" },
|
|
1612
|
+
* { fieldName: "amount", type: EntityFieldDataType.DECIMAL, decimalPrecision: 4, maxValue: 999999, minValue: 0 },
|
|
1613
|
+
* ],
|
|
1614
|
+
* });
|
|
1548
1615
|
* ```
|
|
1549
1616
|
* @internal
|
|
1550
1617
|
*/
|
|
@@ -1764,6 +1831,8 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1764
1831
|
/**
|
|
1765
1832
|
* Deletes data from an entity by entity ID
|
|
1766
1833
|
*
|
|
1834
|
+
* Note: Records deleted using deleteRecordsById will not trigger Data Fabric trigger events. Use {@link deleteRecordById} if you need trigger events to fire for the deleted record.
|
|
1835
|
+
*
|
|
1767
1836
|
* @param entityId - UUID of the entity
|
|
1768
1837
|
* @param recordIds - Array of record UUIDs to delete
|
|
1769
1838
|
* @param options - Delete options
|
|
@@ -1782,6 +1851,25 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1782
1851
|
* ```
|
|
1783
1852
|
*/
|
|
1784
1853
|
deleteRecordsById(id: string, recordIds: string[], options?: EntityDeleteRecordsOptions): Promise<EntityDeleteResponse>;
|
|
1854
|
+
/**
|
|
1855
|
+
* Deletes a single record from an entity by entity ID and record ID
|
|
1856
|
+
*
|
|
1857
|
+
* Note: Data Fabric supports trigger events only on individual deletes, not on deleting multiple records.
|
|
1858
|
+
* Use this method if you need trigger events to fire for the deleted record.
|
|
1859
|
+
*
|
|
1860
|
+
* @param entityId - UUID of the entity
|
|
1861
|
+
* @param recordId - UUID of the record to delete
|
|
1862
|
+
* @returns Promise resolving to void on success
|
|
1863
|
+
* @example
|
|
1864
|
+
* ```typescript
|
|
1865
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1866
|
+
*
|
|
1867
|
+
* const entities = new Entities(sdk);
|
|
1868
|
+
*
|
|
1869
|
+
* await entities.deleteRecordById("<entityId>", "<recordId>");
|
|
1870
|
+
* ```
|
|
1871
|
+
*/
|
|
1872
|
+
deleteRecordById(entityId: string, recordId: string): Promise<void>;
|
|
1785
1873
|
/**
|
|
1786
1874
|
* Gets all entities in the system
|
|
1787
1875
|
*
|
|
@@ -1980,6 +2068,13 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1980
2068
|
* { fieldName: "product_name", type: EntityFieldDataType.STRING, isRequired: true, isUnique: true },
|
|
1981
2069
|
* { fieldName: "price", type: EntityFieldDataType.INTEGER, defaultValue: "0" },
|
|
1982
2070
|
* ], { displayName: "Product Catalog", description: "Our product catalog", isRbacEnabled: true });
|
|
2071
|
+
*
|
|
2072
|
+
* // With advanced sqlType constraints (lengthLimit, decimalPrecision, maxValue, minValue) and defaultValue
|
|
2073
|
+
* const ordersId = await entities.create("orders", [
|
|
2074
|
+
* { fieldName: "product_name", type: EntityFieldDataType.STRING, isRequired: true, isUnique: true, lengthLimit: 500 },
|
|
2075
|
+
* { fieldName: "price", type: EntityFieldDataType.DECIMAL, decimalPrecision: 4, maxValue: 999999, minValue: 0 },
|
|
2076
|
+
* { fieldName: "quantity", type: EntityFieldDataType.INTEGER, maxValue: 10000, minValue: 1, defaultValue: "0" },
|
|
2077
|
+
* ]);
|
|
1983
2078
|
* ```
|
|
1984
2079
|
* @internal
|
|
1985
2080
|
*/
|
|
@@ -2031,6 +2126,17 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
2031
2126
|
* updateFields: [{ id: "<fieldId>", displayName: "Unit Price", isRequired: true }],
|
|
2032
2127
|
* displayName: "Price Catalog",
|
|
2033
2128
|
* });
|
|
2129
|
+
*
|
|
2130
|
+
* // Add a STRING/DECIMAL field with explicit advanced sqlType constraints and defaultValue
|
|
2131
|
+
* await entities.updateById("<entityId>", {
|
|
2132
|
+
* addFields: [
|
|
2133
|
+
* { fieldName: "summary", type: EntityFieldDataType.STRING, lengthLimit: 500, defaultValue: "summary" },
|
|
2134
|
+
* { fieldName: "amount", type: EntityFieldDataType.DECIMAL, decimalPrecision: 4, maxValue: 999999, minValue: 0 },
|
|
2135
|
+
* ],
|
|
2136
|
+
* updateFields: [
|
|
2137
|
+
* { id: "<fieldId>", lengthLimit: 1000 },
|
|
2138
|
+
* ],
|
|
2139
|
+
* });
|
|
2034
2140
|
* ```
|
|
2035
2141
|
* @internal
|
|
2036
2142
|
*/
|
|
@@ -2057,6 +2163,13 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
2057
2163
|
* @private
|
|
2058
2164
|
*/
|
|
2059
2165
|
private mapFieldTypes;
|
|
2166
|
+
/**
|
|
2167
|
+
* Resolves an {@link EntityFieldDataType} from a field's `fieldDisplayType` and
|
|
2168
|
+
* raw SQL type name. Prefers `fieldDisplayType` to disambiguate types that
|
|
2169
|
+
* share a SQL type (FILE, CHOICE_SET_*, AUTO_NUMBER, RELATIONSHIP); falls back
|
|
2170
|
+
* to the SQL-type-name mapping. Returns `undefined` if neither resolves.
|
|
2171
|
+
*/
|
|
2172
|
+
private tryResolveFieldDataType;
|
|
2060
2173
|
/**
|
|
2061
2174
|
* Transforms nested reference objects in field metadata
|
|
2062
2175
|
*/
|
|
@@ -2070,6 +2183,28 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
2070
2183
|
private mapExternalFields;
|
|
2071
2184
|
/** Converts a user-facing EntityCreateFieldOptions to the raw API field payload */
|
|
2072
2185
|
private buildSchemaFieldPayload;
|
|
2186
|
+
/**
|
|
2187
|
+
* Derives the user-facing {@link EntityFieldDataType} for a field on the raw
|
|
2188
|
+
* API response. Throws if the field's `fieldDisplayType` and `sqlType.name`
|
|
2189
|
+
* are both unmappable.
|
|
2190
|
+
*/
|
|
2191
|
+
private resolveFieldDataType;
|
|
2192
|
+
/**
|
|
2193
|
+
* Validates that the user-supplied constraint properties on a field are
|
|
2194
|
+
* supported by the field's data type. Throws a `ValidationError` listing
|
|
2195
|
+
* any unsupported properties.
|
|
2196
|
+
*/
|
|
2197
|
+
private validateFieldConstraints;
|
|
2198
|
+
/**
|
|
2199
|
+
* Returns the sqlType constraint fields for a given field type.
|
|
2200
|
+
*
|
|
2201
|
+
* The API requires specific constraint properties to be set per SQL type;
|
|
2202
|
+
* without them the field is stored in an incomplete state, causing
|
|
2203
|
+
* "Field type cannot be changed" errors when the UI later tries to edit
|
|
2204
|
+
* advanced options. User-supplied values from `EntityCreateFieldOptions`
|
|
2205
|
+
* override the defaults where the type accepts overrides.
|
|
2206
|
+
*/
|
|
2207
|
+
private buildSqlTypeConstraints;
|
|
2073
2208
|
private static readonly RESERVED_FIELD_NAMES;
|
|
2074
2209
|
private validateName;
|
|
2075
2210
|
}
|
package/dist/entities/index.mjs
CHANGED
|
@@ -504,6 +504,8 @@ class ErrorFactory {
|
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
const FOLDER_ID = 'X-UIPATH-OrganizationUnitId';
|
|
507
|
+
const TRACEPARENT = 'traceparent';
|
|
508
|
+
const UIPATH_TRACEPARENT_ID = 'x-uipath-traceparent-id';
|
|
507
509
|
/**
|
|
508
510
|
* Content type constants for HTTP requests/responses
|
|
509
511
|
*/
|
|
@@ -557,8 +559,13 @@ class ApiClient {
|
|
|
557
559
|
if (isFormData) {
|
|
558
560
|
delete defaultHeaders['Content-Type'];
|
|
559
561
|
}
|
|
562
|
+
const traceId = crypto.randomUUID().replace(/-/g, '');
|
|
563
|
+
const spanId = crypto.randomUUID().replace(/-/g, '').slice(0, 16);
|
|
564
|
+
const traceparentValue = `00-${traceId}-${spanId}-01`;
|
|
560
565
|
const headers = {
|
|
561
566
|
...defaultHeaders,
|
|
567
|
+
[TRACEPARENT]: traceparentValue,
|
|
568
|
+
[UIPATH_TRACEPARENT_ID]: traceparentValue,
|
|
562
569
|
...options.headers
|
|
563
570
|
};
|
|
564
571
|
// Convert params to URLSearchParams
|
|
@@ -1667,6 +1674,13 @@ function createEntityMethods(entityData, service) {
|
|
|
1667
1674
|
throw new Error('Entity ID is undefined');
|
|
1668
1675
|
return service.deleteRecordsById(entityData.id, recordIds, options);
|
|
1669
1676
|
},
|
|
1677
|
+
async deleteRecord(recordId) {
|
|
1678
|
+
if (!entityData.id)
|
|
1679
|
+
throw new Error('Entity ID is undefined');
|
|
1680
|
+
if (!recordId)
|
|
1681
|
+
throw new Error('Record ID is undefined');
|
|
1682
|
+
return service.deleteRecordById(entityData.id, recordId);
|
|
1683
|
+
},
|
|
1670
1684
|
async getAllRecords(options) {
|
|
1671
1685
|
if (!entityData.id)
|
|
1672
1686
|
throw new Error('Entity ID is undefined');
|
|
@@ -1861,6 +1875,7 @@ const DATA_FABRIC_ENDPOINTS = {
|
|
|
1861
1875
|
BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
|
|
1862
1876
|
UPDATE_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update/${recordId}`,
|
|
1863
1877
|
UPDATE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update-batch`,
|
|
1878
|
+
DELETE_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete/${recordId}`,
|
|
1864
1879
|
DELETE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete-batch`,
|
|
1865
1880
|
UPSERT: `${DATAFABRIC_BASE}/api/Entity`,
|
|
1866
1881
|
DELETE: (entityId) => `${DATAFABRIC_BASE}/api/Entity/${entityId}`,
|
|
@@ -1912,6 +1927,20 @@ function createParams(paramsObj = {}) {
|
|
|
1912
1927
|
return params;
|
|
1913
1928
|
}
|
|
1914
1929
|
|
|
1930
|
+
/**
|
|
1931
|
+
* Names of the per-field SQL constraint properties (i.e. the contents of `sqlType`
|
|
1932
|
+
* excluding its `name`). Used internally to validate user-supplied constraints
|
|
1933
|
+
* against the set of constraints that each `EntityFieldDataType` accepts.
|
|
1934
|
+
*
|
|
1935
|
+
* Enum values match the corresponding property names on `EntityCreateFieldOptions`.
|
|
1936
|
+
*/
|
|
1937
|
+
var EntityFieldConstraint;
|
|
1938
|
+
(function (EntityFieldConstraint) {
|
|
1939
|
+
EntityFieldConstraint["LengthLimit"] = "lengthLimit";
|
|
1940
|
+
EntityFieldConstraint["MaxValue"] = "maxValue";
|
|
1941
|
+
EntityFieldConstraint["MinValue"] = "minValue";
|
|
1942
|
+
EntityFieldConstraint["DecimalPrecision"] = "decimalPrecision";
|
|
1943
|
+
})(EntityFieldConstraint || (EntityFieldConstraint = {}));
|
|
1915
1944
|
/**
|
|
1916
1945
|
* Entity field data types (SQL types from API)
|
|
1917
1946
|
*/
|
|
@@ -1974,6 +2003,70 @@ const FieldDisplayTypeToDataType = {
|
|
|
1974
2003
|
[FieldDisplayType.AutoNumber]: EntityFieldDataType.AUTO_NUMBER,
|
|
1975
2004
|
[FieldDisplayType.Relationship]: EntityFieldDataType.RELATIONSHIP,
|
|
1976
2005
|
};
|
|
2006
|
+
/**
|
|
2007
|
+
* Default and fixed sqlType constraint values applied when the user does not provide them.
|
|
2008
|
+
* The API requires these to be present on field creation — without them the field
|
|
2009
|
+
* is stored in an incomplete state, causing "Field type cannot be changed" errors
|
|
2010
|
+
* when the UI later tries to edit advanced options.
|
|
2011
|
+
*/
|
|
2012
|
+
const ENTITY_FIELD_CONSTRAINT_DEFAULTS = {
|
|
2013
|
+
STRING_LENGTH_LIMIT: 200,
|
|
2014
|
+
MULTILINE_TEXT_LENGTH_LIMIT: 200,
|
|
2015
|
+
/** Fixed (non-overridable) length limit on DECIMAL payloads*/
|
|
2016
|
+
DECIMAL_LENGTH_LIMIT: 1000,
|
|
2017
|
+
DECIMAL_PRECISION: 2,
|
|
2018
|
+
/** Fixed (non-overridable) length limit for BIT (BOOLEAN) fields */
|
|
2019
|
+
BOOLEAN_LENGTH_LIMIT: 100,
|
|
2020
|
+
/** Fixed (non-overridable) length limit for DATE / DATETIMEOFFSET fields */
|
|
2021
|
+
DATE_LENGTH_LIMIT: 1000,
|
|
2022
|
+
/** Fixed (non-overridable) length limit for UNIQUEIDENTIFIER-backed FILE and RELATIONSHIP fields */
|
|
2023
|
+
UNIQUEIDENTIFIER_LENGTH_LIMIT: 300,
|
|
2024
|
+
/** Fixed (non-overridable) length limit for CHOICE_SET_MULTIPLE fields */
|
|
2025
|
+
CHOICE_SET_MULTIPLE_LENGTH_LIMIT: 4000,
|
|
2026
|
+
NUMERIC_MAX_VALUE: 1000000000000,
|
|
2027
|
+
NUMERIC_MIN_VALUE: -1e12,
|
|
2028
|
+
};
|
|
2029
|
+
/**
|
|
2030
|
+
* Per-field-type spec describing which {@link EntityFieldConstraint}s the user
|
|
2031
|
+
* may supply on create / update, and the inclusive value range for each.
|
|
2032
|
+
*
|
|
2033
|
+
* Source of truth: the platform's `Constants.cs` constraint table. Keys absent
|
|
2034
|
+
* from a type's spec are not user-configurable for that type; passing one
|
|
2035
|
+
* throws a `ValidationError`. Field types absent from this map (BOOLEAN, DATE,
|
|
2036
|
+
* DATETIME, DATETIME_WITH_TZ, FILE, RELATIONSHIP, UUID, CHOICE_SET_SINGLE,
|
|
2037
|
+
* CHOICE_SET_MULTIPLE, AUTO_NUMBER) accept no user-supplied constraints.
|
|
2038
|
+
*/
|
|
2039
|
+
const ENTITY_FIELD_CONSTRAINT_SPEC = {
|
|
2040
|
+
[EntityFieldDataType.STRING]: {
|
|
2041
|
+
[EntityFieldConstraint.LengthLimit]: { min: 1, max: 4000 },
|
|
2042
|
+
},
|
|
2043
|
+
[EntityFieldDataType.MULTILINE_TEXT]: {
|
|
2044
|
+
[EntityFieldConstraint.LengthLimit]: { min: 1, max: 10000 },
|
|
2045
|
+
},
|
|
2046
|
+
[EntityFieldDataType.INTEGER]: {
|
|
2047
|
+
[EntityFieldConstraint.MaxValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2048
|
+
[EntityFieldConstraint.MinValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2049
|
+
},
|
|
2050
|
+
[EntityFieldDataType.BIG_INTEGER]: {
|
|
2051
|
+
[EntityFieldConstraint.MaxValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2052
|
+
[EntityFieldConstraint.MinValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2053
|
+
},
|
|
2054
|
+
[EntityFieldDataType.DECIMAL]: {
|
|
2055
|
+
[EntityFieldConstraint.MaxValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2056
|
+
[EntityFieldConstraint.MinValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2057
|
+
[EntityFieldConstraint.DecimalPrecision]: { min: 0, max: 10 },
|
|
2058
|
+
},
|
|
2059
|
+
[EntityFieldDataType.FLOAT]: {
|
|
2060
|
+
[EntityFieldConstraint.MaxValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2061
|
+
[EntityFieldConstraint.MinValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2062
|
+
[EntityFieldConstraint.DecimalPrecision]: { min: 0, max: 10 },
|
|
2063
|
+
},
|
|
2064
|
+
[EntityFieldDataType.DOUBLE]: {
|
|
2065
|
+
[EntityFieldConstraint.MaxValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2066
|
+
[EntityFieldConstraint.MinValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
2067
|
+
[EntityFieldConstraint.DecimalPrecision]: { min: 0, max: 10 },
|
|
2068
|
+
},
|
|
2069
|
+
};
|
|
1977
2070
|
/**
|
|
1978
2071
|
* Maps SQL field types to friendly display names
|
|
1979
2072
|
*/
|
|
@@ -1998,7 +2091,7 @@ const EntityFieldTypeMap = {
|
|
|
1998
2091
|
// Connection string placeholder that will be replaced during build
|
|
1999
2092
|
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";
|
|
2000
2093
|
// SDK Version placeholder
|
|
2001
|
-
const SDK_VERSION = "1.3.
|
|
2094
|
+
const SDK_VERSION = "1.3.5";
|
|
2002
2095
|
const VERSION = "Version";
|
|
2003
2096
|
const SERVICE = "Service";
|
|
2004
2097
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -2536,6 +2629,8 @@ class EntityService extends BaseService {
|
|
|
2536
2629
|
/**
|
|
2537
2630
|
* Deletes data from an entity by entity ID
|
|
2538
2631
|
*
|
|
2632
|
+
* Note: Records deleted using deleteRecordsById will not trigger Data Fabric trigger events. Use {@link deleteRecordById} if you need trigger events to fire for the deleted record.
|
|
2633
|
+
*
|
|
2539
2634
|
* @param entityId - UUID of the entity
|
|
2540
2635
|
* @param recordIds - Array of record UUIDs to delete
|
|
2541
2636
|
* @param options - Delete options
|
|
@@ -2563,6 +2658,27 @@ class EntityService extends BaseService {
|
|
|
2563
2658
|
});
|
|
2564
2659
|
return response.data;
|
|
2565
2660
|
}
|
|
2661
|
+
/**
|
|
2662
|
+
* Deletes a single record from an entity by entity ID and record ID
|
|
2663
|
+
*
|
|
2664
|
+
* Note: Data Fabric supports trigger events only on individual deletes, not on deleting multiple records.
|
|
2665
|
+
* Use this method if you need trigger events to fire for the deleted record.
|
|
2666
|
+
*
|
|
2667
|
+
* @param entityId - UUID of the entity
|
|
2668
|
+
* @param recordId - UUID of the record to delete
|
|
2669
|
+
* @returns Promise resolving to void on success
|
|
2670
|
+
* @example
|
|
2671
|
+
* ```typescript
|
|
2672
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
2673
|
+
*
|
|
2674
|
+
* const entities = new Entities(sdk);
|
|
2675
|
+
*
|
|
2676
|
+
* await entities.deleteRecordById("<entityId>", "<recordId>");
|
|
2677
|
+
* ```
|
|
2678
|
+
*/
|
|
2679
|
+
async deleteRecordById(entityId, recordId) {
|
|
2680
|
+
await this.delete(DATA_FABRIC_ENDPOINTS.ENTITY.DELETE_RECORD_BY_ID(entityId, recordId));
|
|
2681
|
+
}
|
|
2566
2682
|
/**
|
|
2567
2683
|
* Gets all entities in the system
|
|
2568
2684
|
*
|
|
@@ -2824,6 +2940,13 @@ class EntityService extends BaseService {
|
|
|
2824
2940
|
* { fieldName: "product_name", type: EntityFieldDataType.STRING, isRequired: true, isUnique: true },
|
|
2825
2941
|
* { fieldName: "price", type: EntityFieldDataType.INTEGER, defaultValue: "0" },
|
|
2826
2942
|
* ], { displayName: "Product Catalog", description: "Our product catalog", isRbacEnabled: true });
|
|
2943
|
+
*
|
|
2944
|
+
* // With advanced sqlType constraints (lengthLimit, decimalPrecision, maxValue, minValue) and defaultValue
|
|
2945
|
+
* const ordersId = await entities.create("orders", [
|
|
2946
|
+
* { fieldName: "product_name", type: EntityFieldDataType.STRING, isRequired: true, isUnique: true, lengthLimit: 500 },
|
|
2947
|
+
* { fieldName: "price", type: EntityFieldDataType.DECIMAL, decimalPrecision: 4, maxValue: 999999, minValue: 0 },
|
|
2948
|
+
* { fieldName: "quantity", type: EntityFieldDataType.INTEGER, maxValue: 10000, minValue: 1, defaultValue: "0" },
|
|
2949
|
+
* ]);
|
|
2827
2950
|
* ```
|
|
2828
2951
|
* @internal
|
|
2829
2952
|
*/
|
|
@@ -2897,6 +3020,17 @@ class EntityService extends BaseService {
|
|
|
2897
3020
|
* updateFields: [{ id: "<fieldId>", displayName: "Unit Price", isRequired: true }],
|
|
2898
3021
|
* displayName: "Price Catalog",
|
|
2899
3022
|
* });
|
|
3023
|
+
*
|
|
3024
|
+
* // Add a STRING/DECIMAL field with explicit advanced sqlType constraints and defaultValue
|
|
3025
|
+
* await entities.updateById("<entityId>", {
|
|
3026
|
+
* addFields: [
|
|
3027
|
+
* { fieldName: "summary", type: EntityFieldDataType.STRING, lengthLimit: 500, defaultValue: "summary" },
|
|
3028
|
+
* { fieldName: "amount", type: EntityFieldDataType.DECIMAL, decimalPrecision: 4, maxValue: 999999, minValue: 0 },
|
|
3029
|
+
* ],
|
|
3030
|
+
* updateFields: [
|
|
3031
|
+
* { id: "<fieldId>", lengthLimit: 1000 },
|
|
3032
|
+
* ],
|
|
3033
|
+
* });
|
|
2900
3034
|
* ```
|
|
2901
3035
|
* @internal
|
|
2902
3036
|
*/
|
|
@@ -2940,6 +3074,21 @@ class EntityService extends BaseService {
|
|
|
2940
3074
|
const update = updateMap.get(f.id ?? '');
|
|
2941
3075
|
if (!update)
|
|
2942
3076
|
return f;
|
|
3077
|
+
const constraintUpdate = {
|
|
3078
|
+
...(update.lengthLimit !== undefined && { lengthLimit: update.lengthLimit }),
|
|
3079
|
+
...(update.maxValue !== undefined && { maxValue: update.maxValue }),
|
|
3080
|
+
...(update.minValue !== undefined && { minValue: update.minValue }),
|
|
3081
|
+
...(update.decimalPrecision !== undefined && { decimalPrecision: update.decimalPrecision }),
|
|
3082
|
+
};
|
|
3083
|
+
const hasConstraintUpdate = Object.keys(constraintUpdate).length > 0;
|
|
3084
|
+
if (hasConstraintUpdate) {
|
|
3085
|
+
if (!f.sqlType) {
|
|
3086
|
+
throw new ValidationError({
|
|
3087
|
+
message: `Cannot update constraints on field '${f.name}' (id: ${f.id}) — the field is missing sqlType metadata in the entity definition.`,
|
|
3088
|
+
});
|
|
3089
|
+
}
|
|
3090
|
+
this.validateFieldConstraints(this.resolveFieldDataType(f), update, f.name);
|
|
3091
|
+
}
|
|
2943
3092
|
return {
|
|
2944
3093
|
...f,
|
|
2945
3094
|
...(update.displayName !== undefined && { displayName: update.displayName }),
|
|
@@ -2949,6 +3098,7 @@ class EntityService extends BaseService {
|
|
|
2949
3098
|
...(update.isRbacEnabled !== undefined && { isRbacEnabled: update.isRbacEnabled }),
|
|
2950
3099
|
...(update.isEncrypted !== undefined && { isEncrypted: update.isEncrypted }),
|
|
2951
3100
|
...(update.defaultValue !== undefined && { defaultValue: update.defaultValue }),
|
|
3101
|
+
...(hasConstraintUpdate && f.sqlType && { sqlType: { ...f.sqlType, ...constraintUpdate } }),
|
|
2952
3102
|
};
|
|
2953
3103
|
});
|
|
2954
3104
|
}
|
|
@@ -2998,24 +3148,27 @@ class EntityService extends BaseService {
|
|
|
2998
3148
|
let transformedField = transformData(field, EntityMap);
|
|
2999
3149
|
// Map field type: prefer fieldDisplayType for types that share SQL types (File, ChoiceSet, AutoNumber)
|
|
3000
3150
|
if (transformedField.fieldDataType?.name) {
|
|
3001
|
-
const
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
if (displayTypeMapped) {
|
|
3005
|
-
transformedField.fieldDataType.name = displayTypeMapped;
|
|
3006
|
-
}
|
|
3007
|
-
else {
|
|
3008
|
-
const rawSqlTypeName = field.sqlType?.name;
|
|
3009
|
-
const mapped = rawSqlTypeName ? EntityFieldTypeMap[rawSqlTypeName] : undefined;
|
|
3010
|
-
if (mapped) {
|
|
3011
|
-
transformedField.fieldDataType.name = mapped;
|
|
3012
|
-
}
|
|
3151
|
+
const mapped = this.tryResolveFieldDataType(transformedField.fieldDisplayType, field.sqlType?.name);
|
|
3152
|
+
if (mapped) {
|
|
3153
|
+
transformedField.fieldDataType.name = mapped;
|
|
3013
3154
|
}
|
|
3014
3155
|
}
|
|
3015
3156
|
this.transformNestedReferences(transformedField);
|
|
3016
3157
|
return transformedField;
|
|
3017
3158
|
});
|
|
3018
3159
|
}
|
|
3160
|
+
/**
|
|
3161
|
+
* Resolves an {@link EntityFieldDataType} from a field's `fieldDisplayType` and
|
|
3162
|
+
* raw SQL type name. Prefers `fieldDisplayType` to disambiguate types that
|
|
3163
|
+
* share a SQL type (FILE, CHOICE_SET_*, AUTO_NUMBER, RELATIONSHIP); falls back
|
|
3164
|
+
* to the SQL-type-name mapping. Returns `undefined` if neither resolves.
|
|
3165
|
+
*/
|
|
3166
|
+
tryResolveFieldDataType(fieldDisplayType, sqlTypeName) {
|
|
3167
|
+
const displayMapped = fieldDisplayType ? FieldDisplayTypeToDataType[fieldDisplayType] : undefined;
|
|
3168
|
+
if (displayMapped)
|
|
3169
|
+
return displayMapped;
|
|
3170
|
+
return sqlTypeName ? EntityFieldTypeMap[sqlTypeName] : undefined;
|
|
3171
|
+
}
|
|
3019
3172
|
/**
|
|
3020
3173
|
* Transforms nested reference objects in field metadata
|
|
3021
3174
|
*/
|
|
@@ -3056,11 +3209,16 @@ class EntityService extends BaseService {
|
|
|
3056
3209
|
/** Converts a user-facing EntityCreateFieldOptions to the raw API field payload */
|
|
3057
3210
|
buildSchemaFieldPayload(field) {
|
|
3058
3211
|
this.validateName(field.fieldName, 'field');
|
|
3059
|
-
const
|
|
3212
|
+
const fieldType = field.type ?? EntityFieldDataType.STRING;
|
|
3213
|
+
this.validateFieldConstraints(fieldType, field, field.fieldName);
|
|
3214
|
+
const mapping = EntitySchemaFieldTypeMap[fieldType];
|
|
3060
3215
|
return {
|
|
3061
3216
|
name: field.fieldName,
|
|
3062
3217
|
displayName: field.displayName ?? field.fieldName,
|
|
3063
|
-
sqlType: {
|
|
3218
|
+
sqlType: {
|
|
3219
|
+
name: mapping.sqlTypeName,
|
|
3220
|
+
...this.buildSqlTypeConstraints(fieldType, field),
|
|
3221
|
+
},
|
|
3064
3222
|
fieldDisplayType: mapping.fieldDisplayType,
|
|
3065
3223
|
description: field.description ?? '',
|
|
3066
3224
|
isRequired: field.isRequired ?? false,
|
|
@@ -3073,6 +3231,107 @@ class EntityService extends BaseService {
|
|
|
3073
3231
|
...(field.referenceFieldName !== undefined && { referenceFieldName: field.referenceFieldName }),
|
|
3074
3232
|
};
|
|
3075
3233
|
}
|
|
3234
|
+
/**
|
|
3235
|
+
* Derives the user-facing {@link EntityFieldDataType} for a field on the raw
|
|
3236
|
+
* API response. Throws if the field's `fieldDisplayType` and `sqlType.name`
|
|
3237
|
+
* are both unmappable.
|
|
3238
|
+
*/
|
|
3239
|
+
resolveFieldDataType(f) {
|
|
3240
|
+
const mapped = this.tryResolveFieldDataType(f.fieldDisplayType, f.sqlType?.name);
|
|
3241
|
+
if (!mapped) {
|
|
3242
|
+
throw new ValidationError({
|
|
3243
|
+
message: `Cannot determine field type for '${f.name}' (id: ${f.id}) — sqlType '${f.sqlType?.name ?? '(missing)'}' and fieldDisplayType '${f.fieldDisplayType ?? '(missing)'}' are both unrecognized.`,
|
|
3244
|
+
});
|
|
3245
|
+
}
|
|
3246
|
+
return mapped;
|
|
3247
|
+
}
|
|
3248
|
+
/**
|
|
3249
|
+
* Validates that the user-supplied constraint properties on a field are
|
|
3250
|
+
* supported by the field's data type. Throws a `ValidationError` listing
|
|
3251
|
+
* any unsupported properties.
|
|
3252
|
+
*/
|
|
3253
|
+
validateFieldConstraints(type, field, fieldName) {
|
|
3254
|
+
const spec = ENTITY_FIELD_CONSTRAINT_SPEC[type] ?? {};
|
|
3255
|
+
const supported = Object.keys(spec);
|
|
3256
|
+
const provided = Object.values(EntityFieldConstraint).filter(name => field[name] !== undefined);
|
|
3257
|
+
const unsupported = provided.filter(p => !(p in spec));
|
|
3258
|
+
if (unsupported.length > 0) {
|
|
3259
|
+
const allowedDesc = supported.length > 0 ? supported.join(', ') : 'none';
|
|
3260
|
+
throw new ValidationError({
|
|
3261
|
+
message: `Field '${fieldName}' of type ${type} does not accept ${unsupported.join(', ')}. Allowed constraints for this type: ${allowedDesc}.`,
|
|
3262
|
+
});
|
|
3263
|
+
}
|
|
3264
|
+
// Range check: each user-supplied constraint must be within its allowed bounds.
|
|
3265
|
+
for (const name of provided) {
|
|
3266
|
+
const range = spec[name];
|
|
3267
|
+
const value = field[name];
|
|
3268
|
+
if (range && value !== undefined && (value < range.min || value > range.max)) {
|
|
3269
|
+
throw new ValidationError({
|
|
3270
|
+
message: `Field '${fieldName}' of type ${type} has ${name} ${value} out of range [${range.min}, ${range.max}].`,
|
|
3271
|
+
});
|
|
3272
|
+
}
|
|
3273
|
+
}
|
|
3274
|
+
// Cross-field check: when both bounds are user-supplied in the same call,
|
|
3275
|
+
// minValue must be strictly less than maxValue.
|
|
3276
|
+
if (field.minValue !== undefined && field.maxValue !== undefined && field.minValue >= field.maxValue) {
|
|
3277
|
+
throw new ValidationError({
|
|
3278
|
+
message: `Field '${fieldName}' of type ${type} has minValue ${field.minValue} >= maxValue ${field.maxValue}. minValue must be strictly less than maxValue.`,
|
|
3279
|
+
});
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
/**
|
|
3283
|
+
* Returns the sqlType constraint fields for a given field type.
|
|
3284
|
+
*
|
|
3285
|
+
* The API requires specific constraint properties to be set per SQL type;
|
|
3286
|
+
* without them the field is stored in an incomplete state, causing
|
|
3287
|
+
* "Field type cannot be changed" errors when the UI later tries to edit
|
|
3288
|
+
* advanced options. User-supplied values from `EntityCreateFieldOptions`
|
|
3289
|
+
* override the defaults where the type accepts overrides.
|
|
3290
|
+
*/
|
|
3291
|
+
buildSqlTypeConstraints(type, field) {
|
|
3292
|
+
const defaults = ENTITY_FIELD_CONSTRAINT_DEFAULTS;
|
|
3293
|
+
switch (type) {
|
|
3294
|
+
case EntityFieldDataType.STRING:
|
|
3295
|
+
return { lengthLimit: field.lengthLimit ?? defaults.STRING_LENGTH_LIMIT };
|
|
3296
|
+
case EntityFieldDataType.MULTILINE_TEXT:
|
|
3297
|
+
return { lengthLimit: field.lengthLimit ?? defaults.MULTILINE_TEXT_LENGTH_LIMIT };
|
|
3298
|
+
case EntityFieldDataType.DECIMAL:
|
|
3299
|
+
return {
|
|
3300
|
+
lengthLimit: defaults.DECIMAL_LENGTH_LIMIT,
|
|
3301
|
+
decimalPrecision: field.decimalPrecision ?? defaults.DECIMAL_PRECISION,
|
|
3302
|
+
maxValue: field.maxValue ?? defaults.NUMERIC_MAX_VALUE,
|
|
3303
|
+
minValue: field.minValue ?? defaults.NUMERIC_MIN_VALUE,
|
|
3304
|
+
};
|
|
3305
|
+
case EntityFieldDataType.BOOLEAN:
|
|
3306
|
+
return { lengthLimit: defaults.BOOLEAN_LENGTH_LIMIT };
|
|
3307
|
+
case EntityFieldDataType.DATE:
|
|
3308
|
+
case EntityFieldDataType.DATETIME_WITH_TZ:
|
|
3309
|
+
return { lengthLimit: defaults.DATE_LENGTH_LIMIT };
|
|
3310
|
+
case EntityFieldDataType.INTEGER:
|
|
3311
|
+
case EntityFieldDataType.BIG_INTEGER:
|
|
3312
|
+
return {
|
|
3313
|
+
maxValue: field.maxValue ?? defaults.NUMERIC_MAX_VALUE,
|
|
3314
|
+
minValue: field.minValue ?? defaults.NUMERIC_MIN_VALUE,
|
|
3315
|
+
};
|
|
3316
|
+
case EntityFieldDataType.FLOAT:
|
|
3317
|
+
case EntityFieldDataType.DOUBLE:
|
|
3318
|
+
return {
|
|
3319
|
+
decimalPrecision: field.decimalPrecision ?? defaults.DECIMAL_PRECISION,
|
|
3320
|
+
maxValue: field.maxValue ?? defaults.NUMERIC_MAX_VALUE,
|
|
3321
|
+
minValue: field.minValue ?? defaults.NUMERIC_MIN_VALUE,
|
|
3322
|
+
};
|
|
3323
|
+
case EntityFieldDataType.FILE:
|
|
3324
|
+
case EntityFieldDataType.RELATIONSHIP:
|
|
3325
|
+
// UNIQUEIDENTIFIER fixed lengthLimit (300)
|
|
3326
|
+
return { lengthLimit: defaults.UNIQUEIDENTIFIER_LENGTH_LIMIT };
|
|
3327
|
+
case EntityFieldDataType.CHOICE_SET_MULTIPLE:
|
|
3328
|
+
// CHOICE_SET_MULTIPLE fixed lengthLimit (4000)
|
|
3329
|
+
return { lengthLimit: defaults.CHOICE_SET_MULTIPLE_LENGTH_LIMIT };
|
|
3330
|
+
default:
|
|
3331
|
+
// UUID, CHOICE_SET_SINGLE, AUTO_NUMBER, DATETIME — (sqlType: { name })
|
|
3332
|
+
return {};
|
|
3333
|
+
}
|
|
3334
|
+
}
|
|
3076
3335
|
validateName(name, context) {
|
|
3077
3336
|
if (name.length < 3 || name.length > 100 || !/^[a-zA-Z]\w*$/.test(name)) {
|
|
3078
3337
|
const suggestion = name.replace(/\W/g, '').replace(/^[0-9_]+/, '');
|
|
@@ -3115,6 +3374,9 @@ __decorate([
|
|
|
3115
3374
|
__decorate([
|
|
3116
3375
|
track('Entities.DeleteRecordsById')
|
|
3117
3376
|
], EntityService.prototype, "deleteRecordsById", null);
|
|
3377
|
+
__decorate([
|
|
3378
|
+
track('Entities.DeleteRecordById')
|
|
3379
|
+
], EntityService.prototype, "deleteRecordById", null);
|
|
3118
3380
|
__decorate([
|
|
3119
3381
|
track('Entities.GetAll')
|
|
3120
3382
|
], EntityService.prototype, "getAll", null);
|
package/dist/feedback/index.cjs
CHANGED
|
@@ -506,6 +506,8 @@ class ErrorFactory {
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
const FOLDER_ID = 'X-UIPATH-OrganizationUnitId';
|
|
509
|
+
const TRACEPARENT = 'traceparent';
|
|
510
|
+
const UIPATH_TRACEPARENT_ID = 'x-uipath-traceparent-id';
|
|
509
511
|
/**
|
|
510
512
|
* Content type constants for HTTP requests/responses
|
|
511
513
|
*/
|
|
@@ -559,8 +561,13 @@ class ApiClient {
|
|
|
559
561
|
if (isFormData) {
|
|
560
562
|
delete defaultHeaders['Content-Type'];
|
|
561
563
|
}
|
|
564
|
+
const traceId = crypto.randomUUID().replace(/-/g, '');
|
|
565
|
+
const spanId = crypto.randomUUID().replace(/-/g, '').slice(0, 16);
|
|
566
|
+
const traceparentValue = `00-${traceId}-${spanId}-01`;
|
|
562
567
|
const headers = {
|
|
563
568
|
...defaultHeaders,
|
|
569
|
+
[TRACEPARENT]: traceparentValue,
|
|
570
|
+
[UIPATH_TRACEPARENT_ID]: traceparentValue,
|
|
564
571
|
...options.headers
|
|
565
572
|
};
|
|
566
573
|
// Convert params to URLSearchParams
|
|
@@ -1558,7 +1565,7 @@ const FEEDBACK_ENDPOINTS = {
|
|
|
1558
1565
|
// Connection string placeholder that will be replaced during build
|
|
1559
1566
|
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";
|
|
1560
1567
|
// SDK Version placeholder
|
|
1561
|
-
const SDK_VERSION = "1.3.
|
|
1568
|
+
const SDK_VERSION = "1.3.5";
|
|
1562
1569
|
const VERSION = "Version";
|
|
1563
1570
|
const SERVICE = "Service";
|
|
1564
1571
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|