@uipath/data-fabric-tool 1.198.0-preview.94 → 1.199.0-preview.92
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/tool.js +774 -28
- package/package.json +2 -2
- package/src/commands/choice-sets.spec.ts +107 -4
- package/src/commands/choice-sets.ts +15 -3
- package/src/commands/directory.spec.ts +544 -0
- package/src/commands/directory.ts +325 -0
- package/src/commands/entities.spec.ts +239 -2
- package/src/commands/entities.ts +47 -3
- package/src/commands/records.spec.ts +119 -3
- package/src/commands/records.ts +83 -2
- package/src/commands/roles.spec.ts +153 -0
- package/src/commands/roles.ts +88 -0
- package/src/tool.ts +4 -0
- package/src/utils/validate.spec.ts +555 -0
- package/src/utils/validate.ts +611 -0
- package/tests/access-management.e2e.test.ts +347 -0
- package/tests/choice-sets-lifecycle.e2e.test.ts +741 -0
- package/tests/entities-lifecycle.e2e.test.ts +614 -0
- package/tests/files-management.e2e.test.ts +518 -0
- package/tests/records-management.e2e.test.ts +646 -0
package/dist/tool.js
CHANGED
|
@@ -23326,7 +23326,7 @@ var require_globalThis2 = __commonJS((exports) => {
|
|
|
23326
23326
|
var require_version2 = __commonJS((exports) => {
|
|
23327
23327
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23328
23328
|
exports.VERSION = undefined;
|
|
23329
|
-
exports.VERSION = "2.
|
|
23329
|
+
exports.VERSION = "2.9.0";
|
|
23330
23330
|
});
|
|
23331
23331
|
|
|
23332
23332
|
// ../../node_modules/@opentelemetry/semantic-conventions/build/src/internal/utils.js
|
|
@@ -24638,9 +24638,10 @@ var require_resource = __commonJS((exports) => {
|
|
|
24638
24638
|
// ../../node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js
|
|
24639
24639
|
var require_stable_attributes = __commonJS((exports) => {
|
|
24640
24640
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24641
|
-
exports.
|
|
24642
|
-
exports.
|
|
24643
|
-
exports.
|
|
24641
|
+
exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN1 = exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN0 = exports.ATTR_DOTNET_GC_HEAP_GENERATION = exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_TEST = exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_STAGING = exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_PRODUCTION = exports.DEPLOYMENT_ENVIRONMENT_NAME_VALUE_DEVELOPMENT = exports.ATTR_DEPLOYMENT_ENVIRONMENT_NAME = exports.DB_SYSTEM_NAME_VALUE_POSTGRESQL = exports.DB_SYSTEM_NAME_VALUE_MYSQL = exports.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER = exports.DB_SYSTEM_NAME_VALUE_MARIADB = exports.ATTR_DB_SYSTEM_NAME = exports.ATTR_DB_STORED_PROCEDURE_NAME = exports.ATTR_DB_RESPONSE_STATUS_CODE = exports.ATTR_DB_QUERY_TEXT = exports.ATTR_DB_QUERY_SUMMARY = exports.ATTR_DB_OPERATION_NAME = exports.ATTR_DB_OPERATION_BATCH_SIZE = exports.ATTR_DB_NAMESPACE = exports.ATTR_DB_COLLECTION_NAME = exports.ATTR_CONTAINER_IMAGE_TAGS = exports.ATTR_CONTAINER_IMAGE_REPO_DIGESTS = exports.ATTR_CONTAINER_IMAGE_NAME = exports.ATTR_CONTAINER_ID = exports.ATTR_CODE_STACKTRACE = exports.ATTR_CODE_LINE_NUMBER = exports.ATTR_CODE_FUNCTION_NAME = exports.ATTR_CODE_FILE_PATH = exports.ATTR_CODE_COLUMN_NUMBER = exports.ATTR_CLIENT_PORT = exports.ATTR_CLIENT_ADDRESS = exports.ATTR_ASPNETCORE_USER_IS_AUTHENTICATED = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = exports.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = exports.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = exports.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = exports.ATTR_ASPNETCORE_RATE_LIMITING_RESULT = exports.ATTR_ASPNETCORE_RATE_LIMITING_POLICY = exports.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = exports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = undefined;
|
|
24642
|
+
exports.ATTR_K8S_DAEMONSET_LABEL = exports.ATTR_K8S_DAEMONSET_ANNOTATION = exports.ATTR_K8S_CRONJOB_UID = exports.ATTR_K8S_CRONJOB_NAME = exports.ATTR_K8S_CRONJOB_LABEL = exports.ATTR_K8S_CRONJOB_ANNOTATION = exports.ATTR_K8S_CONTAINER_RESTART_COUNT = exports.ATTR_K8S_CONTAINER_NAME = exports.ATTR_K8S_CLUSTER_UID = exports.ATTR_K8S_CLUSTER_NAME = exports.JVM_THREAD_STATE_VALUE_WAITING = exports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = exports.JVM_THREAD_STATE_VALUE_TERMINATED = exports.JVM_THREAD_STATE_VALUE_RUNNABLE = exports.JVM_THREAD_STATE_VALUE_NEW = exports.JVM_THREAD_STATE_VALUE_BLOCKED = exports.ATTR_JVM_THREAD_STATE = exports.ATTR_JVM_THREAD_DAEMON = exports.JVM_MEMORY_TYPE_VALUE_NON_HEAP = exports.JVM_MEMORY_TYPE_VALUE_HEAP = exports.ATTR_JVM_MEMORY_TYPE = exports.ATTR_JVM_MEMORY_POOL_NAME = exports.ATTR_JVM_GC_NAME = exports.ATTR_JVM_GC_ACTION = exports.ATTR_HTTP_ROUTE = exports.ATTR_HTTP_RESPONSE_STATUS_CODE = exports.ATTR_HTTP_RESPONSE_HEADER = exports.ATTR_HTTP_REQUEST_RESEND_COUNT = exports.ATTR_HTTP_REQUEST_METHOD_ORIGINAL = exports.HTTP_REQUEST_METHOD_VALUE_TRACE = exports.HTTP_REQUEST_METHOD_VALUE_PUT = exports.HTTP_REQUEST_METHOD_VALUE_POST = exports.HTTP_REQUEST_METHOD_VALUE_PATCH = exports.HTTP_REQUEST_METHOD_VALUE_OPTIONS = exports.HTTP_REQUEST_METHOD_VALUE_HEAD = exports.HTTP_REQUEST_METHOD_VALUE_GET = exports.HTTP_REQUEST_METHOD_VALUE_DELETE = exports.HTTP_REQUEST_METHOD_VALUE_CONNECT = exports.HTTP_REQUEST_METHOD_VALUE_OTHER = exports.ATTR_HTTP_REQUEST_METHOD = exports.ATTR_HTTP_REQUEST_HEADER = exports.ATTR_EXCEPTION_TYPE = exports.ATTR_EXCEPTION_STACKTRACE = exports.ATTR_EXCEPTION_MESSAGE = exports.ATTR_EXCEPTION_ESCAPED = exports.ERROR_TYPE_VALUE_OTHER = exports.ATTR_ERROR_TYPE = exports.DOTNET_GC_HEAP_GENERATION_VALUE_POH = exports.DOTNET_GC_HEAP_GENERATION_VALUE_LOH = exports.DOTNET_GC_HEAP_GENERATION_VALUE_GEN2 = undefined;
|
|
24643
|
+
exports.ATTR_OTEL_SCOPE_VERSION = exports.ATTR_OTEL_SCOPE_NAME = exports.ATTR_OTEL_EVENT_NAME = exports.NETWORK_TYPE_VALUE_IPV6 = exports.NETWORK_TYPE_VALUE_IPV4 = exports.ATTR_NETWORK_TYPE = exports.NETWORK_TRANSPORT_VALUE_UNIX = exports.NETWORK_TRANSPORT_VALUE_UDP = exports.NETWORK_TRANSPORT_VALUE_TCP = exports.NETWORK_TRANSPORT_VALUE_QUIC = exports.NETWORK_TRANSPORT_VALUE_PIPE = exports.ATTR_NETWORK_TRANSPORT = exports.ATTR_NETWORK_PROTOCOL_VERSION = exports.ATTR_NETWORK_PROTOCOL_NAME = exports.ATTR_NETWORK_PEER_PORT = exports.ATTR_NETWORK_PEER_ADDRESS = exports.ATTR_NETWORK_LOCAL_PORT = exports.ATTR_NETWORK_LOCAL_ADDRESS = exports.ATTR_K8S_STATEFULSET_UID = exports.ATTR_K8S_STATEFULSET_NAME = exports.ATTR_K8S_STATEFULSET_LABEL = exports.ATTR_K8S_STATEFULSET_ANNOTATION = exports.ATTR_K8S_REPLICASET_UID = exports.ATTR_K8S_REPLICASET_NAME = exports.ATTR_K8S_REPLICASET_LABEL = exports.ATTR_K8S_REPLICASET_ANNOTATION = exports.ATTR_K8S_POD_UID = exports.ATTR_K8S_POD_START_TIME = exports.ATTR_K8S_POD_NAME = exports.ATTR_K8S_POD_LABEL = exports.ATTR_K8S_POD_IP = exports.ATTR_K8S_POD_HOSTNAME = exports.ATTR_K8S_POD_ANNOTATION = exports.ATTR_K8S_NODE_UID = exports.ATTR_K8S_NODE_NAME = exports.ATTR_K8S_NODE_LABEL = exports.ATTR_K8S_NODE_ANNOTATION = exports.ATTR_K8S_NAMESPACE_NAME = exports.ATTR_K8S_NAMESPACE_LABEL = exports.ATTR_K8S_NAMESPACE_ANNOTATION = exports.ATTR_K8S_JOB_UID = exports.ATTR_K8S_JOB_NAME = exports.ATTR_K8S_JOB_LABEL = exports.ATTR_K8S_JOB_ANNOTATION = exports.ATTR_K8S_DEPLOYMENT_UID = exports.ATTR_K8S_DEPLOYMENT_NAME = exports.ATTR_K8S_DEPLOYMENT_LABEL = exports.ATTR_K8S_DEPLOYMENT_ANNOTATION = exports.ATTR_K8S_DAEMONSET_UID = exports.ATTR_K8S_DAEMONSET_NAME = undefined;
|
|
24644
|
+
exports.ATTR_USER_AGENT_ORIGINAL = exports.ATTR_URL_SCHEME = exports.ATTR_URL_QUERY = exports.ATTR_URL_PATH = exports.ATTR_URL_FULL = exports.ATTR_URL_FRAGMENT = exports.ATTR_TELEMETRY_SDK_VERSION = exports.ATTR_TELEMETRY_SDK_NAME = exports.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUST = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = exports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_KOTLIN = exports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = exports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = exports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = exports.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = exports.TELEMETRY_SDK_LANGUAGE_VALUE_CPP = exports.ATTR_TELEMETRY_SDK_LANGUAGE = exports.ATTR_TELEMETRY_DISTRO_VERSION = exports.ATTR_TELEMETRY_DISTRO_NAME = exports.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = exports.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = exports.SIGNALR_TRANSPORT_VALUE_LONG_POLLING = exports.ATTR_SIGNALR_TRANSPORT = exports.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = exports.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = exports.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = exports.ATTR_SIGNALR_CONNECTION_STATUS = exports.ATTR_SERVICE_VERSION = exports.ATTR_SERVICE_NAMESPACE = exports.ATTR_SERVICE_NAME = exports.ATTR_SERVICE_INSTANCE_ID = exports.ATTR_SERVER_PORT = exports.ATTR_SERVER_ADDRESS = exports.ATTR_OTEL_STATUS_DESCRIPTION = exports.OTEL_STATUS_CODE_VALUE_OK = exports.OTEL_STATUS_CODE_VALUE_ERROR = exports.ATTR_OTEL_STATUS_CODE = undefined;
|
|
24644
24645
|
exports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = "aspnetcore.diagnostics.exception.result";
|
|
24645
24646
|
exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = "aborted";
|
|
24646
24647
|
exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = "handled";
|
|
@@ -24666,6 +24667,10 @@ var require_stable_attributes = __commonJS((exports) => {
|
|
|
24666
24667
|
exports.ATTR_CODE_FUNCTION_NAME = "code.function.name";
|
|
24667
24668
|
exports.ATTR_CODE_LINE_NUMBER = "code.line.number";
|
|
24668
24669
|
exports.ATTR_CODE_STACKTRACE = "code.stacktrace";
|
|
24670
|
+
exports.ATTR_CONTAINER_ID = "container.id";
|
|
24671
|
+
exports.ATTR_CONTAINER_IMAGE_NAME = "container.image.name";
|
|
24672
|
+
exports.ATTR_CONTAINER_IMAGE_REPO_DIGESTS = "container.image.repo_digests";
|
|
24673
|
+
exports.ATTR_CONTAINER_IMAGE_TAGS = "container.image.tags";
|
|
24669
24674
|
exports.ATTR_DB_COLLECTION_NAME = "db.collection.name";
|
|
24670
24675
|
exports.ATTR_DB_NAMESPACE = "db.namespace";
|
|
24671
24676
|
exports.ATTR_DB_OPERATION_BATCH_SIZE = "db.operation.batch.size";
|
|
@@ -24729,6 +24734,66 @@ var require_stable_attributes = __commonJS((exports) => {
|
|
|
24729
24734
|
exports.JVM_THREAD_STATE_VALUE_TERMINATED = "terminated";
|
|
24730
24735
|
exports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = "timed_waiting";
|
|
24731
24736
|
exports.JVM_THREAD_STATE_VALUE_WAITING = "waiting";
|
|
24737
|
+
exports.ATTR_K8S_CLUSTER_NAME = "k8s.cluster.name";
|
|
24738
|
+
exports.ATTR_K8S_CLUSTER_UID = "k8s.cluster.uid";
|
|
24739
|
+
exports.ATTR_K8S_CONTAINER_NAME = "k8s.container.name";
|
|
24740
|
+
exports.ATTR_K8S_CONTAINER_RESTART_COUNT = "k8s.container.restart_count";
|
|
24741
|
+
var ATTR_K8S_CRONJOB_ANNOTATION = (key) => `k8s.cronjob.annotation.${key}`;
|
|
24742
|
+
exports.ATTR_K8S_CRONJOB_ANNOTATION = ATTR_K8S_CRONJOB_ANNOTATION;
|
|
24743
|
+
var ATTR_K8S_CRONJOB_LABEL = (key) => `k8s.cronjob.label.${key}`;
|
|
24744
|
+
exports.ATTR_K8S_CRONJOB_LABEL = ATTR_K8S_CRONJOB_LABEL;
|
|
24745
|
+
exports.ATTR_K8S_CRONJOB_NAME = "k8s.cronjob.name";
|
|
24746
|
+
exports.ATTR_K8S_CRONJOB_UID = "k8s.cronjob.uid";
|
|
24747
|
+
var ATTR_K8S_DAEMONSET_ANNOTATION = (key) => `k8s.daemonset.annotation.${key}`;
|
|
24748
|
+
exports.ATTR_K8S_DAEMONSET_ANNOTATION = ATTR_K8S_DAEMONSET_ANNOTATION;
|
|
24749
|
+
var ATTR_K8S_DAEMONSET_LABEL = (key) => `k8s.daemonset.label.${key}`;
|
|
24750
|
+
exports.ATTR_K8S_DAEMONSET_LABEL = ATTR_K8S_DAEMONSET_LABEL;
|
|
24751
|
+
exports.ATTR_K8S_DAEMONSET_NAME = "k8s.daemonset.name";
|
|
24752
|
+
exports.ATTR_K8S_DAEMONSET_UID = "k8s.daemonset.uid";
|
|
24753
|
+
var ATTR_K8S_DEPLOYMENT_ANNOTATION = (key) => `k8s.deployment.annotation.${key}`;
|
|
24754
|
+
exports.ATTR_K8S_DEPLOYMENT_ANNOTATION = ATTR_K8S_DEPLOYMENT_ANNOTATION;
|
|
24755
|
+
var ATTR_K8S_DEPLOYMENT_LABEL = (key) => `k8s.deployment.label.${key}`;
|
|
24756
|
+
exports.ATTR_K8S_DEPLOYMENT_LABEL = ATTR_K8S_DEPLOYMENT_LABEL;
|
|
24757
|
+
exports.ATTR_K8S_DEPLOYMENT_NAME = "k8s.deployment.name";
|
|
24758
|
+
exports.ATTR_K8S_DEPLOYMENT_UID = "k8s.deployment.uid";
|
|
24759
|
+
var ATTR_K8S_JOB_ANNOTATION = (key) => `k8s.job.annotation.${key}`;
|
|
24760
|
+
exports.ATTR_K8S_JOB_ANNOTATION = ATTR_K8S_JOB_ANNOTATION;
|
|
24761
|
+
var ATTR_K8S_JOB_LABEL = (key) => `k8s.job.label.${key}`;
|
|
24762
|
+
exports.ATTR_K8S_JOB_LABEL = ATTR_K8S_JOB_LABEL;
|
|
24763
|
+
exports.ATTR_K8S_JOB_NAME = "k8s.job.name";
|
|
24764
|
+
exports.ATTR_K8S_JOB_UID = "k8s.job.uid";
|
|
24765
|
+
var ATTR_K8S_NAMESPACE_ANNOTATION = (key) => `k8s.namespace.annotation.${key}`;
|
|
24766
|
+
exports.ATTR_K8S_NAMESPACE_ANNOTATION = ATTR_K8S_NAMESPACE_ANNOTATION;
|
|
24767
|
+
var ATTR_K8S_NAMESPACE_LABEL = (key) => `k8s.namespace.label.${key}`;
|
|
24768
|
+
exports.ATTR_K8S_NAMESPACE_LABEL = ATTR_K8S_NAMESPACE_LABEL;
|
|
24769
|
+
exports.ATTR_K8S_NAMESPACE_NAME = "k8s.namespace.name";
|
|
24770
|
+
var ATTR_K8S_NODE_ANNOTATION = (key) => `k8s.node.annotation.${key}`;
|
|
24771
|
+
exports.ATTR_K8S_NODE_ANNOTATION = ATTR_K8S_NODE_ANNOTATION;
|
|
24772
|
+
var ATTR_K8S_NODE_LABEL = (key) => `k8s.node.label.${key}`;
|
|
24773
|
+
exports.ATTR_K8S_NODE_LABEL = ATTR_K8S_NODE_LABEL;
|
|
24774
|
+
exports.ATTR_K8S_NODE_NAME = "k8s.node.name";
|
|
24775
|
+
exports.ATTR_K8S_NODE_UID = "k8s.node.uid";
|
|
24776
|
+
var ATTR_K8S_POD_ANNOTATION = (key) => `k8s.pod.annotation.${key}`;
|
|
24777
|
+
exports.ATTR_K8S_POD_ANNOTATION = ATTR_K8S_POD_ANNOTATION;
|
|
24778
|
+
exports.ATTR_K8S_POD_HOSTNAME = "k8s.pod.hostname";
|
|
24779
|
+
exports.ATTR_K8S_POD_IP = "k8s.pod.ip";
|
|
24780
|
+
var ATTR_K8S_POD_LABEL = (key) => `k8s.pod.label.${key}`;
|
|
24781
|
+
exports.ATTR_K8S_POD_LABEL = ATTR_K8S_POD_LABEL;
|
|
24782
|
+
exports.ATTR_K8S_POD_NAME = "k8s.pod.name";
|
|
24783
|
+
exports.ATTR_K8S_POD_START_TIME = "k8s.pod.start_time";
|
|
24784
|
+
exports.ATTR_K8S_POD_UID = "k8s.pod.uid";
|
|
24785
|
+
var ATTR_K8S_REPLICASET_ANNOTATION = (key) => `k8s.replicaset.annotation.${key}`;
|
|
24786
|
+
exports.ATTR_K8S_REPLICASET_ANNOTATION = ATTR_K8S_REPLICASET_ANNOTATION;
|
|
24787
|
+
var ATTR_K8S_REPLICASET_LABEL = (key) => `k8s.replicaset.label.${key}`;
|
|
24788
|
+
exports.ATTR_K8S_REPLICASET_LABEL = ATTR_K8S_REPLICASET_LABEL;
|
|
24789
|
+
exports.ATTR_K8S_REPLICASET_NAME = "k8s.replicaset.name";
|
|
24790
|
+
exports.ATTR_K8S_REPLICASET_UID = "k8s.replicaset.uid";
|
|
24791
|
+
var ATTR_K8S_STATEFULSET_ANNOTATION = (key) => `k8s.statefulset.annotation.${key}`;
|
|
24792
|
+
exports.ATTR_K8S_STATEFULSET_ANNOTATION = ATTR_K8S_STATEFULSET_ANNOTATION;
|
|
24793
|
+
var ATTR_K8S_STATEFULSET_LABEL = (key) => `k8s.statefulset.label.${key}`;
|
|
24794
|
+
exports.ATTR_K8S_STATEFULSET_LABEL = ATTR_K8S_STATEFULSET_LABEL;
|
|
24795
|
+
exports.ATTR_K8S_STATEFULSET_NAME = "k8s.statefulset.name";
|
|
24796
|
+
exports.ATTR_K8S_STATEFULSET_UID = "k8s.statefulset.uid";
|
|
24732
24797
|
exports.ATTR_NETWORK_LOCAL_ADDRESS = "network.local.address";
|
|
24733
24798
|
exports.ATTR_NETWORK_LOCAL_PORT = "network.local.port";
|
|
24734
24799
|
exports.ATTR_NETWORK_PEER_ADDRESS = "network.peer.address";
|
|
@@ -24773,6 +24838,7 @@ var require_stable_attributes = __commonJS((exports) => {
|
|
|
24773
24838
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = "erlang";
|
|
24774
24839
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = "go";
|
|
24775
24840
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = "java";
|
|
24841
|
+
exports.TELEMETRY_SDK_LANGUAGE_VALUE_KOTLIN = "kotlin";
|
|
24776
24842
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = "nodejs";
|
|
24777
24843
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = "php";
|
|
24778
24844
|
exports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = "python";
|
|
@@ -24993,7 +25059,7 @@ var require_time = __commonJS((exports) => {
|
|
|
24993
25059
|
if (isTimeInputHrTime(time)) {
|
|
24994
25060
|
return time;
|
|
24995
25061
|
} else if (typeof time === "number") {
|
|
24996
|
-
if (time < platform_1.otperformance.timeOrigin) {
|
|
25062
|
+
if (time < platform_1.otperformance.timeOrigin / 2) {
|
|
24997
25063
|
return hrTime(time);
|
|
24998
25064
|
} else {
|
|
24999
25065
|
return millisToHrTime(time);
|
|
@@ -27244,7 +27310,7 @@ var require_src6 = __commonJS((exports) => {
|
|
|
27244
27310
|
var package_default = {
|
|
27245
27311
|
name: "@uipath/data-fabric-tool",
|
|
27246
27312
|
license: "MIT",
|
|
27247
|
-
version: "1.
|
|
27313
|
+
version: "1.199.0-preview.92",
|
|
27248
27314
|
description: "Manage Data Fabric entities and records.",
|
|
27249
27315
|
type: "module",
|
|
27250
27316
|
main: "./dist/tool.js",
|
|
@@ -27308,6 +27374,7 @@ function settlePromiseLike(thenable) {
|
|
|
27308
27374
|
var DEFAULT_401 = "Unauthorized (401). Run `uip login` to authenticate.";
|
|
27309
27375
|
var DEFAULT_403 = "Forbidden (403). Ensure the account has the required permissions.";
|
|
27310
27376
|
var DEFAULT_405 = "Method Not Allowed (405). The endpoint may not exist or the base URL may be incorrect.";
|
|
27377
|
+
var DEFAULT_413 = "Payload too large (413). The upload exceeded the server or CDN size limit. Reduce the package size — for example, exclude unused dependencies or remove large files from the project — and try again.";
|
|
27311
27378
|
var HTML_RESPONSE_MESSAGE = "Received HTML instead of the expected JSON response.";
|
|
27312
27379
|
var NETWORK_ERROR_CODES = new Set([
|
|
27313
27380
|
"ECONNREFUSED",
|
|
@@ -27409,6 +27476,9 @@ function classifyError(status, error) {
|
|
|
27409
27476
|
if (status === 405) {
|
|
27410
27477
|
return { errorCode: "method_not_allowed", retry: "RetryWillNotFix" };
|
|
27411
27478
|
}
|
|
27479
|
+
if (status === 413) {
|
|
27480
|
+
return { errorCode: "invalid_argument", retry: "RetryWillNotFix" };
|
|
27481
|
+
}
|
|
27412
27482
|
if (status === 408) {
|
|
27413
27483
|
return { errorCode: "timeout", retry: "RetryLater" };
|
|
27414
27484
|
}
|
|
@@ -27486,6 +27556,8 @@ async function extractErrorDetails(error, options) {
|
|
|
27486
27556
|
result = "AuthenticationError";
|
|
27487
27557
|
} else if (status === 405) {
|
|
27488
27558
|
message = DEFAULT_405;
|
|
27559
|
+
} else if (status === 413) {
|
|
27560
|
+
message = DEFAULT_413;
|
|
27489
27561
|
} else if (status === 400 || status === 422) {
|
|
27490
27562
|
message = formatHttpStatusMessage(status, rawMessage, extractedMessage, inferredStatus);
|
|
27491
27563
|
result = "ValidationError";
|
|
@@ -27608,6 +27680,15 @@ async function extractErrorMessage(error, options) {
|
|
|
27608
27680
|
const { message } = await extractErrorDetails(error, options);
|
|
27609
27681
|
return message;
|
|
27610
27682
|
}
|
|
27683
|
+
// ../common/src/body-validators.ts
|
|
27684
|
+
function runChecks(checks) {
|
|
27685
|
+
for (const check of checks) {
|
|
27686
|
+
const err = check();
|
|
27687
|
+
if (err !== null)
|
|
27688
|
+
return err;
|
|
27689
|
+
}
|
|
27690
|
+
return null;
|
|
27691
|
+
}
|
|
27611
27692
|
// ../../node_modules/commander/esm.mjs
|
|
27612
27693
|
var import__ = __toESM(require_commander(), 1);
|
|
27613
27694
|
var {
|
|
@@ -34140,6 +34221,7 @@ var SKILL_ATTRIBUTION = attributionRecord([
|
|
|
34140
34221
|
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
34141
34222
|
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
34142
34223
|
["cli", "troubleshoot", ["uip.feedback"]],
|
|
34224
|
+
["llm-gateway", "operate", ["uip.llm-gateway"]],
|
|
34143
34225
|
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
34144
34226
|
["context-grounding", "build", ["uip.context-grounding"]],
|
|
34145
34227
|
["api-workflow", "build", ["uip.api-workflow"]],
|
|
@@ -34677,6 +34759,7 @@ var resolveConfigAsync = async ({
|
|
|
34677
34759
|
customAuthority,
|
|
34678
34760
|
customClientId,
|
|
34679
34761
|
customClientSecret,
|
|
34762
|
+
customClientAssertion,
|
|
34680
34763
|
customScopes
|
|
34681
34764
|
} = {}) => {
|
|
34682
34765
|
const fileAuth = getAuthFileConfig();
|
|
@@ -34702,7 +34785,7 @@ var resolveConfigAsync = async ({
|
|
|
34702
34785
|
if (!clientSecret && fileAuth.clientSecret) {
|
|
34703
34786
|
clientSecret = fileAuth.clientSecret;
|
|
34704
34787
|
}
|
|
34705
|
-
const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && Boolean(clientSecret);
|
|
34788
|
+
const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && (Boolean(clientSecret) || Boolean(customClientAssertion));
|
|
34706
34789
|
const scopes = resolveScopes(isExternalAppAuth, customScopes, fileAuth.scopes);
|
|
34707
34790
|
return {
|
|
34708
34791
|
clientId,
|
|
@@ -35788,7 +35871,6 @@ function normalizeTokenRefreshUnavailableFailure() {
|
|
|
35788
35871
|
function errorMessage(error) {
|
|
35789
35872
|
return error instanceof Error ? error.message : String(error);
|
|
35790
35873
|
}
|
|
35791
|
-
|
|
35792
35874
|
// ../auth/src/index.ts
|
|
35793
35875
|
init_constants();
|
|
35794
35876
|
|
|
@@ -36994,7 +37076,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
36994
37076
|
inst._zod.run = inst._zod.parse;
|
|
36995
37077
|
});
|
|
36996
37078
|
} else {
|
|
36997
|
-
const
|
|
37079
|
+
const runChecks2 = (payload, checks2, ctx) => {
|
|
36998
37080
|
let isAborted = aborted(payload);
|
|
36999
37081
|
let asyncResult;
|
|
37000
37082
|
for (const ch of checks2) {
|
|
@@ -37039,7 +37121,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
37039
37121
|
canary.aborted = true;
|
|
37040
37122
|
return canary;
|
|
37041
37123
|
}
|
|
37042
|
-
const checkResult =
|
|
37124
|
+
const checkResult = runChecks2(payload, checks, ctx);
|
|
37043
37125
|
if (checkResult instanceof Promise) {
|
|
37044
37126
|
if (ctx.async === false)
|
|
37045
37127
|
throw new $ZodAsyncError;
|
|
@@ -37064,9 +37146,9 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
37064
37146
|
if (result instanceof Promise) {
|
|
37065
37147
|
if (ctx.async === false)
|
|
37066
37148
|
throw new $ZodAsyncError;
|
|
37067
|
-
return result.then((result2) =>
|
|
37149
|
+
return result.then((result2) => runChecks2(result2, checks, ctx));
|
|
37068
37150
|
}
|
|
37069
|
-
return
|
|
37151
|
+
return runChecks2(result, checks, ctx);
|
|
37070
37152
|
};
|
|
37071
37153
|
}
|
|
37072
37154
|
defineLazy(inst, "~standard", () => ({
|
|
@@ -40315,7 +40397,7 @@ class EmbeddedTokenManager {
|
|
|
40315
40397
|
this.cancelRefresh?.();
|
|
40316
40398
|
}
|
|
40317
40399
|
}
|
|
40318
|
-
var SDK_VERSION = "1.5.
|
|
40400
|
+
var SDK_VERSION = "1.5.5";
|
|
40319
40401
|
var CLOUD_ROLE_NAME = "uipath-ts-sdk";
|
|
40320
40402
|
var SDK_SERVICE_NAME = "UiPath.TypeScript.Sdk";
|
|
40321
40403
|
var SDK_LOGGER_NAME = "uipath-ts-sdk-telemetry";
|
|
@@ -41331,7 +41413,11 @@ class ApiClient {
|
|
|
41331
41413
|
const searchParams = new URLSearchParams;
|
|
41332
41414
|
if (options.params) {
|
|
41333
41415
|
Object.entries(options.params).forEach(([key, value]) => {
|
|
41334
|
-
|
|
41416
|
+
if (Array.isArray(value)) {
|
|
41417
|
+
value.forEach((item) => searchParams.append(key, String(item)));
|
|
41418
|
+
} else {
|
|
41419
|
+
searchParams.append(key, String(value));
|
|
41420
|
+
}
|
|
41335
41421
|
});
|
|
41336
41422
|
}
|
|
41337
41423
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
@@ -43925,8 +44011,14 @@ class MaestroProcessesService extends BaseService {
|
|
|
43925
44011
|
super(instance);
|
|
43926
44012
|
this.processInstancesService = new ProcessInstancesService(instance);
|
|
43927
44013
|
}
|
|
43928
|
-
async getAll() {
|
|
43929
|
-
const
|
|
44014
|
+
async getAll(options) {
|
|
44015
|
+
const params = createParams({
|
|
44016
|
+
processKey: options?.processKey,
|
|
44017
|
+
packageId: options?.packageId,
|
|
44018
|
+
startedTimeUtcStart: options?.startTime?.toISOString(),
|
|
44019
|
+
startedTimeUtcEnd: options?.endTime?.toISOString()
|
|
44020
|
+
});
|
|
44021
|
+
const response = await this.get(MAESTRO_ENDPOINTS.PROCESSES.GET_ALL, { params });
|
|
43930
44022
|
const processes = response.data?.processes || [];
|
|
43931
44023
|
const processesWithName = processes.map((process10) => ({
|
|
43932
44024
|
...process10,
|
|
@@ -44030,9 +44122,13 @@ var ProcessType;
|
|
|
44030
44122
|
})(ProcessType || (ProcessType = {}));
|
|
44031
44123
|
|
|
44032
44124
|
class CasesService extends BaseService {
|
|
44033
|
-
async getAll() {
|
|
44125
|
+
async getAll(options) {
|
|
44034
44126
|
const params = createParams({
|
|
44035
|
-
processType: ProcessType.CaseManagement
|
|
44127
|
+
processType: ProcessType.CaseManagement,
|
|
44128
|
+
processKey: options?.processKey,
|
|
44129
|
+
packageId: options?.packageId,
|
|
44130
|
+
startedTimeUtcStart: options?.startTime?.toISOString(),
|
|
44131
|
+
startedTimeUtcEnd: options?.endTime?.toISOString()
|
|
44036
44132
|
});
|
|
44037
44133
|
const response = await this.get(MAESTRO_ENDPOINTS.PROCESSES.GET_ALL, { params });
|
|
44038
44134
|
const cases = response.data?.processes || [];
|
|
@@ -46263,6 +46359,409 @@ var connectOrFail = async (tenantOverride) => {
|
|
|
46263
46359
|
return sdk;
|
|
46264
46360
|
};
|
|
46265
46361
|
|
|
46362
|
+
// src/utils/validate.ts
|
|
46363
|
+
var UI_BROKEN_FIELD_TYPES = new Set([
|
|
46364
|
+
"INTEGER",
|
|
46365
|
+
"BIG_INTEGER",
|
|
46366
|
+
"FLOAT",
|
|
46367
|
+
"DOUBLE",
|
|
46368
|
+
"UUID",
|
|
46369
|
+
"DATETIME"
|
|
46370
|
+
]);
|
|
46371
|
+
var UI_BROKEN_SUBSTITUTIONS = {
|
|
46372
|
+
INTEGER: "DECIMAL with decimalPrecision: 0",
|
|
46373
|
+
BIG_INTEGER: "DECIMAL with decimalPrecision: 0",
|
|
46374
|
+
FLOAT: "DECIMAL with a required decimalPrecision",
|
|
46375
|
+
DOUBLE: "DECIMAL with a required decimalPrecision",
|
|
46376
|
+
UUID: "RELATIONSHIP (if it's a foreign key) or STRING",
|
|
46377
|
+
DATETIME: "DATETIME_WITH_TZ"
|
|
46378
|
+
};
|
|
46379
|
+
var RESERVED_FIELD_NAMES = new Set([
|
|
46380
|
+
"Id",
|
|
46381
|
+
"CreatedBy",
|
|
46382
|
+
"CreateTime",
|
|
46383
|
+
"UpdatedBy",
|
|
46384
|
+
"UpdateTime"
|
|
46385
|
+
]);
|
|
46386
|
+
var RESERVED_KEYWORDS_LOWER = new Set([
|
|
46387
|
+
"case",
|
|
46388
|
+
"class",
|
|
46389
|
+
"if",
|
|
46390
|
+
"then",
|
|
46391
|
+
"else",
|
|
46392
|
+
"new",
|
|
46393
|
+
"object",
|
|
46394
|
+
"public",
|
|
46395
|
+
"return",
|
|
46396
|
+
"select",
|
|
46397
|
+
"internal",
|
|
46398
|
+
"private",
|
|
46399
|
+
"static"
|
|
46400
|
+
]);
|
|
46401
|
+
var NAME_PATTERN = /^[a-zA-Z][a-zA-Z0-9_]{2,99}$/;
|
|
46402
|
+
function validateName2(name, kind) {
|
|
46403
|
+
if (kind === "field" && RESERVED_FIELD_NAMES.has(name)) {
|
|
46404
|
+
return {
|
|
46405
|
+
message: `Field name '${name}' is reserved`,
|
|
46406
|
+
instructions: `The following field names are reserved by the platform: ${[...RESERVED_FIELD_NAMES].join(", ")}. Pick a different name.`
|
|
46407
|
+
};
|
|
46408
|
+
}
|
|
46409
|
+
if (RESERVED_KEYWORDS_LOWER.has(name.toLowerCase())) {
|
|
46410
|
+
return {
|
|
46411
|
+
message: `${kind === "entity" ? "Entity" : kind === "field" ? "Field" : "Choice set"} name '${name}' is a reserved C# or VB keyword`,
|
|
46412
|
+
instructions: "Reserved keywords are rejected with RESERVED_LANGUAGE_KEYWORDS. Pick a domain-specific rename, for example 'Case' -> 'WorkItem', 'Class' -> 'Category', 'New' -> 'IsNew'."
|
|
46413
|
+
};
|
|
46414
|
+
}
|
|
46415
|
+
if (!NAME_PATTERN.test(name)) {
|
|
46416
|
+
return {
|
|
46417
|
+
message: `Invalid ${kind} name '${name}'`,
|
|
46418
|
+
instructions: "Names must start with a letter, contain only letters, digits, and underscores, and be 3-100 characters long."
|
|
46419
|
+
};
|
|
46420
|
+
}
|
|
46421
|
+
return null;
|
|
46422
|
+
}
|
|
46423
|
+
function findInvalidFieldName(fields) {
|
|
46424
|
+
for (const f of fields) {
|
|
46425
|
+
if (typeof f !== "object" || f === null)
|
|
46426
|
+
continue;
|
|
46427
|
+
const fieldName = f.fieldName;
|
|
46428
|
+
if (typeof fieldName !== "string")
|
|
46429
|
+
continue;
|
|
46430
|
+
const err = validateName2(fieldName, "field");
|
|
46431
|
+
if (err)
|
|
46432
|
+
return err;
|
|
46433
|
+
}
|
|
46434
|
+
return null;
|
|
46435
|
+
}
|
|
46436
|
+
function findUiBrokenFieldType(fields) {
|
|
46437
|
+
for (const f of fields) {
|
|
46438
|
+
if (typeof f !== "object" || f === null)
|
|
46439
|
+
continue;
|
|
46440
|
+
const rec = f;
|
|
46441
|
+
const type2 = rec.type;
|
|
46442
|
+
if (typeof type2 !== "string")
|
|
46443
|
+
continue;
|
|
46444
|
+
if (UI_BROKEN_FIELD_TYPES.has(type2)) {
|
|
46445
|
+
const fieldName = typeof rec.fieldName === "string" ? rec.fieldName : "<field>";
|
|
46446
|
+
const substitute = UI_BROKEN_SUBSTITUTIONS[type2];
|
|
46447
|
+
return {
|
|
46448
|
+
message: `Field '${fieldName}' uses type '${type2}' which the Data Fabric UI cannot render`,
|
|
46449
|
+
instructions: `The server accepts '${type2}' but the UI cannot render, filter, or edit the column. Use ${substitute} instead. UI-broken types: ${[...UI_BROKEN_FIELD_TYPES].join(", ")}.`
|
|
46450
|
+
};
|
|
46451
|
+
}
|
|
46452
|
+
}
|
|
46453
|
+
return null;
|
|
46454
|
+
}
|
|
46455
|
+
function findReferenceFolderKeyOnChoiceSet(fields) {
|
|
46456
|
+
for (const f of fields) {
|
|
46457
|
+
if (typeof f !== "object" || f === null)
|
|
46458
|
+
continue;
|
|
46459
|
+
const rec = f;
|
|
46460
|
+
const type2 = rec.type;
|
|
46461
|
+
if ((type2 === "CHOICE_SET_SINGLE" || type2 === "CHOICE_SET_MULTIPLE") && rec.referenceFolderKey !== undefined) {
|
|
46462
|
+
const fieldName = typeof rec.fieldName === "string" ? rec.fieldName : "<field>";
|
|
46463
|
+
return {
|
|
46464
|
+
message: `CHOICE_SET_* field '${fieldName}' must not pass 'referenceFolderKey'`,
|
|
46465
|
+
instructions: "The server resolves a choice set's folder from 'choiceSetId' alone. Passing 'referenceFolderKey' here is rejected by the platform with a misleading cross-scope error. Drop 'referenceFolderKey' from CHOICE_SET_SINGLE / CHOICE_SET_MULTIPLE field definitions."
|
|
46466
|
+
};
|
|
46467
|
+
}
|
|
46468
|
+
}
|
|
46469
|
+
return null;
|
|
46470
|
+
}
|
|
46471
|
+
function findMissingComplexFieldExtras(fields) {
|
|
46472
|
+
for (const f of fields) {
|
|
46473
|
+
if (typeof f !== "object" || f === null)
|
|
46474
|
+
continue;
|
|
46475
|
+
const rec = f;
|
|
46476
|
+
const type2 = rec.type;
|
|
46477
|
+
if (typeof type2 !== "string")
|
|
46478
|
+
continue;
|
|
46479
|
+
const fieldName = typeof rec.fieldName === "string" ? rec.fieldName : "<field>";
|
|
46480
|
+
if (type2 === "CHOICE_SET_SINGLE" || type2 === "CHOICE_SET_MULTIPLE") {
|
|
46481
|
+
if (typeof rec.choiceSetId !== "string" || rec.choiceSetId.trim() === "") {
|
|
46482
|
+
return {
|
|
46483
|
+
message: `Field '${fieldName}' (type '${type2}') requires 'choiceSetId'`,
|
|
46484
|
+
instructions: "Set 'choiceSetId' to the UUID from 'uip df choice-sets list'. If the target choice set doesn't exist, create it with 'uip df choice-sets create' first."
|
|
46485
|
+
};
|
|
46486
|
+
}
|
|
46487
|
+
} else if (type2 === "RELATIONSHIP") {
|
|
46488
|
+
if (typeof rec.referenceEntityId !== "string" || rec.referenceEntityId.trim() === "") {
|
|
46489
|
+
return {
|
|
46490
|
+
message: `Field '${fieldName}' (type 'RELATIONSHIP') requires 'referenceEntityId'`,
|
|
46491
|
+
instructions: "Set 'referenceEntityId' to the UUID of the target entity from 'uip df entities list --native-only'."
|
|
46492
|
+
};
|
|
46493
|
+
}
|
|
46494
|
+
if (typeof rec.referenceFieldId !== "string" || rec.referenceFieldId.trim() === "") {
|
|
46495
|
+
return {
|
|
46496
|
+
message: `Field '${fieldName}' (type 'RELATIONSHIP') requires 'referenceFieldId'`,
|
|
46497
|
+
instructions: "Set 'referenceFieldId' to the UUID of the display field on the target entity — get it from 'uip df entities get <target-entity-id>' (Fields[].Id). This controls which target field renders in the UI; the stored value is always the target record's Id UUID."
|
|
46498
|
+
};
|
|
46499
|
+
}
|
|
46500
|
+
}
|
|
46501
|
+
}
|
|
46502
|
+
return null;
|
|
46503
|
+
}
|
|
46504
|
+
var LENGTH_LIMIT_RANGES = {
|
|
46505
|
+
STRING: [1, 4000],
|
|
46506
|
+
MULTILINE_TEXT: [1, 1e4],
|
|
46507
|
+
MULTILINE_MAX: [1, 131072]
|
|
46508
|
+
};
|
|
46509
|
+
function isNumber(v) {
|
|
46510
|
+
return typeof v === "number" && Number.isFinite(v);
|
|
46511
|
+
}
|
|
46512
|
+
function findInvalidFieldConstraints(fields) {
|
|
46513
|
+
for (const f of fields) {
|
|
46514
|
+
if (typeof f !== "object" || f === null)
|
|
46515
|
+
continue;
|
|
46516
|
+
const rec = f;
|
|
46517
|
+
const type2 = rec.type;
|
|
46518
|
+
if (typeof type2 !== "string")
|
|
46519
|
+
continue;
|
|
46520
|
+
const fieldName = typeof rec.fieldName === "string" ? rec.fieldName : "<field>";
|
|
46521
|
+
if (rec.lengthLimit !== undefined) {
|
|
46522
|
+
if (!isNumber(rec.lengthLimit)) {
|
|
46523
|
+
return {
|
|
46524
|
+
message: `Field '${fieldName}' 'lengthLimit' must be a number`,
|
|
46525
|
+
instructions: "Pass a positive integer within the type's range (STRING 1-4000, MULTILINE_TEXT 1-10000, MULTILINE_MAX 1-131072 UTF-16 bytes)."
|
|
46526
|
+
};
|
|
46527
|
+
}
|
|
46528
|
+
const range = LENGTH_LIMIT_RANGES[type2];
|
|
46529
|
+
if (range === undefined) {
|
|
46530
|
+
return {
|
|
46531
|
+
message: `Field '${fieldName}' of type '${type2}' does not accept 'lengthLimit'`,
|
|
46532
|
+
instructions: "'lengthLimit' applies only to STRING, MULTILINE_TEXT, and MULTILINE_MAX. Remove it or change the field type."
|
|
46533
|
+
};
|
|
46534
|
+
}
|
|
46535
|
+
const [min, max] = range;
|
|
46536
|
+
if (rec.lengthLimit < min || rec.lengthLimit > max) {
|
|
46537
|
+
return {
|
|
46538
|
+
message: `Field '${fieldName}' 'lengthLimit' ${rec.lengthLimit} is outside the allowed range for type '${type2}'`,
|
|
46539
|
+
instructions: `'lengthLimit' on '${type2}' must be between ${min} and ${max}. MULTILINE_MAX 'lengthLimit' is a UTF-16 byte budget (≈2 per char).`
|
|
46540
|
+
};
|
|
46541
|
+
}
|
|
46542
|
+
}
|
|
46543
|
+
if (rec.maxValue !== undefined || rec.minValue !== undefined) {
|
|
46544
|
+
if (type2 !== "DECIMAL") {
|
|
46545
|
+
const which = rec.maxValue !== undefined ? "maxValue" : "minValue";
|
|
46546
|
+
return {
|
|
46547
|
+
message: `Field '${fieldName}' of type '${type2}' does not accept '${which}'`,
|
|
46548
|
+
instructions: "'minValue' and 'maxValue' apply only to DECIMAL. Remove them or change the field type."
|
|
46549
|
+
};
|
|
46550
|
+
}
|
|
46551
|
+
if (rec.maxValue !== undefined && !isNumber(rec.maxValue)) {
|
|
46552
|
+
return {
|
|
46553
|
+
message: `Field '${fieldName}' 'maxValue' must be a number`,
|
|
46554
|
+
instructions: "Pass a numeric value."
|
|
46555
|
+
};
|
|
46556
|
+
}
|
|
46557
|
+
if (rec.minValue !== undefined && !isNumber(rec.minValue)) {
|
|
46558
|
+
return {
|
|
46559
|
+
message: `Field '${fieldName}' 'minValue' must be a number`,
|
|
46560
|
+
instructions: "Pass a numeric value."
|
|
46561
|
+
};
|
|
46562
|
+
}
|
|
46563
|
+
if (rec.maxValue !== undefined && rec.minValue !== undefined && rec.minValue >= rec.maxValue) {
|
|
46564
|
+
return {
|
|
46565
|
+
message: `Field '${fieldName}' 'minValue' (${rec.minValue}) must be strictly less than 'maxValue' (${rec.maxValue})`,
|
|
46566
|
+
instructions: "Adjust the bounds so 'minValue < maxValue', or drop one of the two."
|
|
46567
|
+
};
|
|
46568
|
+
}
|
|
46569
|
+
}
|
|
46570
|
+
if (rec.decimalPrecision !== undefined) {
|
|
46571
|
+
if (type2 !== "DECIMAL") {
|
|
46572
|
+
return {
|
|
46573
|
+
message: `Field '${fieldName}' of type '${type2}' does not accept 'decimalPrecision'`,
|
|
46574
|
+
instructions: "'decimalPrecision' applies only to DECIMAL. Remove it or change the field type."
|
|
46575
|
+
};
|
|
46576
|
+
}
|
|
46577
|
+
if (!isNumber(rec.decimalPrecision) || !Number.isInteger(rec.decimalPrecision) || rec.decimalPrecision < 0 || rec.decimalPrecision > 10) {
|
|
46578
|
+
return {
|
|
46579
|
+
message: `Field '${fieldName}' 'decimalPrecision' ${rec.decimalPrecision} is invalid`,
|
|
46580
|
+
instructions: "'decimalPrecision' must be an integer between 0 and 10 (0 for whole numbers, 2 for money)."
|
|
46581
|
+
};
|
|
46582
|
+
}
|
|
46583
|
+
}
|
|
46584
|
+
}
|
|
46585
|
+
return null;
|
|
46586
|
+
}
|
|
46587
|
+
var CHOICE_VALUE_KEYWORDS = new Set([
|
|
46588
|
+
"internal",
|
|
46589
|
+
"public",
|
|
46590
|
+
"private",
|
|
46591
|
+
"class",
|
|
46592
|
+
"case",
|
|
46593
|
+
"new",
|
|
46594
|
+
"default",
|
|
46595
|
+
"static",
|
|
46596
|
+
"void",
|
|
46597
|
+
"event",
|
|
46598
|
+
"lock",
|
|
46599
|
+
"object",
|
|
46600
|
+
"string",
|
|
46601
|
+
"int"
|
|
46602
|
+
]);
|
|
46603
|
+
var CHOICE_VALUE_NAME_PATTERN = /^[a-zA-Z][a-zA-Z0-9_]{2,99}$/;
|
|
46604
|
+
function validateChoiceValueName(name) {
|
|
46605
|
+
if (!CHOICE_VALUE_NAME_PATTERN.test(name)) {
|
|
46606
|
+
return {
|
|
46607
|
+
message: `Invalid choice-set value name '${name}'`,
|
|
46608
|
+
instructions: "Choice-set value names must start with a letter, contain only letters, digits, and underscores, and be 3-100 characters long."
|
|
46609
|
+
};
|
|
46610
|
+
}
|
|
46611
|
+
if (CHOICE_VALUE_KEYWORDS.has(name)) {
|
|
46612
|
+
return {
|
|
46613
|
+
message: `Choice-set value name '${name}' is a reserved C# keyword`,
|
|
46614
|
+
instructions: `The server's choice-set-value validator is case-sensitive and rejects known reserved keywords. Use lowercase snake_case with a suffix so the token no longer matches, and move the label to --display-name. Example: --display-name "Internal" with a name of 'internal_audit'.`
|
|
46615
|
+
};
|
|
46616
|
+
}
|
|
46617
|
+
return null;
|
|
46618
|
+
}
|
|
46619
|
+
var FILTER_OPERATORS = new Set([
|
|
46620
|
+
"=",
|
|
46621
|
+
"!=",
|
|
46622
|
+
">",
|
|
46623
|
+
"<",
|
|
46624
|
+
">=",
|
|
46625
|
+
"<=",
|
|
46626
|
+
"contains",
|
|
46627
|
+
"not contains",
|
|
46628
|
+
"startswith",
|
|
46629
|
+
"endswith",
|
|
46630
|
+
"in",
|
|
46631
|
+
"not in"
|
|
46632
|
+
]);
|
|
46633
|
+
var VALUELIST_OPERATORS = new Set(["in", "not in"]);
|
|
46634
|
+
var FILTER_OPERATORS_LIST = [...FILTER_OPERATORS].map((o) => `'${o}'`).join(", ");
|
|
46635
|
+
function validateFilterLeaf(leaf, path3) {
|
|
46636
|
+
if (typeof leaf !== "object" || leaf === null) {
|
|
46637
|
+
return {
|
|
46638
|
+
message: `${path3} must be a filter object`,
|
|
46639
|
+
instructions: "Each queryFilters entry must be an object with fieldName, operator, and value (or valueList for 'in' / 'not in')."
|
|
46640
|
+
};
|
|
46641
|
+
}
|
|
46642
|
+
const rec = leaf;
|
|
46643
|
+
if (typeof rec.fieldName !== "string" || rec.fieldName.trim() === "") {
|
|
46644
|
+
return {
|
|
46645
|
+
message: `${path3}.fieldName must be a non-empty string`,
|
|
46646
|
+
instructions: 'Set fieldName to the column you want to filter, for example {"fieldName":"Status","operator":"=","value":"Active"}.'
|
|
46647
|
+
};
|
|
46648
|
+
}
|
|
46649
|
+
if (typeof rec.operator !== "string") {
|
|
46650
|
+
return {
|
|
46651
|
+
message: `${path3}.operator must be a string`,
|
|
46652
|
+
instructions: `Supported operators: ${FILTER_OPERATORS_LIST}.`
|
|
46653
|
+
};
|
|
46654
|
+
}
|
|
46655
|
+
if (!FILTER_OPERATORS.has(rec.operator)) {
|
|
46656
|
+
return {
|
|
46657
|
+
message: `${path3} uses unsupported operator '${rec.operator}'`,
|
|
46658
|
+
instructions: `The server rejects operators outside the supported set. Supported: ${FILTER_OPERATORS_LIST}. Compose BETWEEN as '>=' + '<=' in one queryFilters group; use 'contains' / 'startswith' / 'endswith' in place of regex.`
|
|
46659
|
+
};
|
|
46660
|
+
}
|
|
46661
|
+
const needsValueList = VALUELIST_OPERATORS.has(rec.operator);
|
|
46662
|
+
if (needsValueList) {
|
|
46663
|
+
if (!Array.isArray(rec.valueList)) {
|
|
46664
|
+
return {
|
|
46665
|
+
message: `${path3} operator '${rec.operator}' requires 'valueList' array`,
|
|
46666
|
+
instructions: `'in' and 'not in' take a JSON array of values under 'valueList', for example {"fieldName":"Status","operator":"in","valueList":["A","B"]}.`
|
|
46667
|
+
};
|
|
46668
|
+
}
|
|
46669
|
+
} else {
|
|
46670
|
+
if (!("value" in rec)) {
|
|
46671
|
+
return {
|
|
46672
|
+
message: `${path3} operator '${rec.operator}' requires 'value'`,
|
|
46673
|
+
instructions: "Set 'value' to the JSON-string form of the compared value. Use null for is-empty ('=' with null) / is-not-empty ('!=' with null)."
|
|
46674
|
+
};
|
|
46675
|
+
}
|
|
46676
|
+
}
|
|
46677
|
+
return null;
|
|
46678
|
+
}
|
|
46679
|
+
function validateFilterGroup(group, path3) {
|
|
46680
|
+
if (typeof group !== "object" || group === null || Array.isArray(group)) {
|
|
46681
|
+
return {
|
|
46682
|
+
message: `${path3} must be an object`,
|
|
46683
|
+
instructions: "A filter group is {logicalOperator, queryFilters, filterGroups?}."
|
|
46684
|
+
};
|
|
46685
|
+
}
|
|
46686
|
+
const rec = group;
|
|
46687
|
+
if (rec.logicalOperator !== undefined) {
|
|
46688
|
+
const op = rec.logicalOperator;
|
|
46689
|
+
const okString = typeof op === "string" && /^(and|or)$/i.test(op.trim());
|
|
46690
|
+
const okNumber = op === 0 || op === 1;
|
|
46691
|
+
if (!okString && !okNumber) {
|
|
46692
|
+
return {
|
|
46693
|
+
message: `${path3}.logicalOperator must be 'AND' / 'OR' / 0 / 1`,
|
|
46694
|
+
instructions: "Use the integer form (0 for AND, 1 for OR) or the string form ('AND' / 'OR', case-insensitive)."
|
|
46695
|
+
};
|
|
46696
|
+
}
|
|
46697
|
+
}
|
|
46698
|
+
if (rec.queryFilters !== undefined) {
|
|
46699
|
+
if (!Array.isArray(rec.queryFilters)) {
|
|
46700
|
+
return {
|
|
46701
|
+
message: `${path3}.queryFilters must be an array`,
|
|
46702
|
+
instructions: "queryFilters is an array of {fieldName, operator, value|valueList} clauses."
|
|
46703
|
+
};
|
|
46704
|
+
}
|
|
46705
|
+
for (let i = 0;i < rec.queryFilters.length; i++) {
|
|
46706
|
+
const err = validateFilterLeaf(rec.queryFilters[i], `${path3}.queryFilters[${i}]`);
|
|
46707
|
+
if (err)
|
|
46708
|
+
return err;
|
|
46709
|
+
}
|
|
46710
|
+
}
|
|
46711
|
+
if (rec.filterGroups !== undefined) {
|
|
46712
|
+
if (!Array.isArray(rec.filterGroups)) {
|
|
46713
|
+
return {
|
|
46714
|
+
message: `${path3}.filterGroups must be an array`,
|
|
46715
|
+
instructions: "filterGroups is an array of nested groups, each with the same shape as the parent."
|
|
46716
|
+
};
|
|
46717
|
+
}
|
|
46718
|
+
for (let i = 0;i < rec.filterGroups.length; i++) {
|
|
46719
|
+
const err = validateFilterGroup(rec.filterGroups[i], `${path3}.filterGroups[${i}]`);
|
|
46720
|
+
if (err)
|
|
46721
|
+
return err;
|
|
46722
|
+
}
|
|
46723
|
+
}
|
|
46724
|
+
return null;
|
|
46725
|
+
}
|
|
46726
|
+
function validateQueryFilter(filterGroup) {
|
|
46727
|
+
if (filterGroup === undefined)
|
|
46728
|
+
return null;
|
|
46729
|
+
return validateFilterGroup(filterGroup, "filterGroup");
|
|
46730
|
+
}
|
|
46731
|
+
function findFilePayloadKeys(records, fileFieldNames) {
|
|
46732
|
+
if (fileFieldNames.size === 0)
|
|
46733
|
+
return null;
|
|
46734
|
+
for (let i = 0;i < records.length; i++) {
|
|
46735
|
+
const rec = records[i];
|
|
46736
|
+
if (typeof rec !== "object" || rec === null)
|
|
46737
|
+
continue;
|
|
46738
|
+
for (const key of Object.keys(rec)) {
|
|
46739
|
+
if (fileFieldNames.has(key)) {
|
|
46740
|
+
return {
|
|
46741
|
+
message: `Record #${i} includes FILE-typed field '${key}'`,
|
|
46742
|
+
instructions: `The server silently drops FILE values from records insert / update payloads and returns Success unchanged. Omit '${key}' from the body, then attach the file with 'uip df files upload <entity-id> <record-id> ${key} --file <path>'. To clear, use 'uip df files delete'.`
|
|
46743
|
+
};
|
|
46744
|
+
}
|
|
46745
|
+
}
|
|
46746
|
+
}
|
|
46747
|
+
return null;
|
|
46748
|
+
}
|
|
46749
|
+
function findIsUniqueInUpdateFields(updateFields) {
|
|
46750
|
+
for (const f of updateFields) {
|
|
46751
|
+
if (typeof f !== "object" || f === null)
|
|
46752
|
+
continue;
|
|
46753
|
+
const rec = f;
|
|
46754
|
+
if (rec.isUnique === undefined)
|
|
46755
|
+
continue;
|
|
46756
|
+
const fieldId = typeof rec.id === "string" ? rec.id : "<unknown>";
|
|
46757
|
+
return {
|
|
46758
|
+
message: `Cannot change 'isUnique' on field '${fieldId}' via updateFields`,
|
|
46759
|
+
instructions: "'isUnique' is fixed at field creation. The server silently ignores it on updateFields while still returning Success. To change uniqueness, drop the field with removeFields and re-add it with addFields (this drops every existing value in the column)."
|
|
46760
|
+
};
|
|
46761
|
+
}
|
|
46762
|
+
return null;
|
|
46763
|
+
}
|
|
46764
|
+
|
|
46266
46765
|
// src/commands/choice-sets.ts
|
|
46267
46766
|
var OUTPUT_CODES = {
|
|
46268
46767
|
ChoiceSetList: "ChoiceSetList",
|
|
@@ -46417,6 +46916,9 @@ var registerChoiceSetsCommand = (program2) => {
|
|
|
46417
46916
|
});
|
|
46418
46917
|
});
|
|
46419
46918
|
choiceSets.command("create").description("Create a new Data Fabric choice set").argument("<name>", "Choice set name (must start with a letter; letters, numbers, and underscores only)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--display-name <name>", "Human-readable display name").option("--description <text>", "Choice set description").option("--folder-key <uuid>", "UUID of the folder to place the choice set in (defaults to the tenant-level folder)").examples(CHOICE_SETS_CREATE_EXAMPLES).trackedAction(processContext, async (name, options) => {
|
|
46919
|
+
const nameErr = validateName2(name, "choice set");
|
|
46920
|
+
if (nameErr)
|
|
46921
|
+
return fail(nameErr.message, nameErr.instructions);
|
|
46420
46922
|
const sdk = await connectOrFail(options.tenant);
|
|
46421
46923
|
if (!sdk)
|
|
46422
46924
|
return;
|
|
@@ -46443,8 +46945,8 @@ var registerChoiceSetsCommand = (program2) => {
|
|
|
46443
46945
|
});
|
|
46444
46946
|
});
|
|
46445
46947
|
choiceSets.command("update").description("Update the metadata of a Data Fabric choice set").argument("<choice-set-id>", "Choice set ID").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--display-name <name>", "New display name").option("--description <text>", "New description").option("--folder-key <key>", "Folder key (GUID) of the folder containing the choice set (for folder-scoped choice sets)").examples(CHOICE_SETS_UPDATE_EXAMPLES).trackedAction(processContext, async (choiceSetId, options) => {
|
|
46446
|
-
if (options.displayName === undefined
|
|
46447
|
-
return fail("
|
|
46948
|
+
if (options.displayName === undefined || options.description === undefined) {
|
|
46949
|
+
return fail("choice-sets update requires both --display-name and --description", "The server rejects a partial update with 'DisplayName is required.' or Internal Server Error. To change one field, run 'uip df choice-sets list' first to read the current value of the other, then re-send both with --display-name and --description.");
|
|
46448
46950
|
}
|
|
46449
46951
|
const sdk = await connectOrFail(options.tenant);
|
|
46450
46952
|
if (!sdk)
|
|
@@ -46545,6 +47047,9 @@ var CHOICE_SET_VALUES_DELETE_EXAMPLES = [
|
|
|
46545
47047
|
var registerChoiceSetValuesCommand = (program2) => {
|
|
46546
47048
|
const values = program2.command("choice-set-values").description("Manage the individual values of a Data Fabric choice set. " + "Use 'df choice-sets list-values <choice-set-id>' to list existing values and their IDs.");
|
|
46547
47049
|
values.command("create").description("Add a value to a Data Fabric choice set").argument("<choice-set-id>", "Choice set ID").argument("<name>", "Value name (must start with a letter; letters, numbers, and underscores only)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--display-name <name>", "Human-readable display name").option("--folder-key <key>", "Folder key (GUID) of the folder containing the choice set (required for folder-scoped choice sets)").examples(CHOICE_SET_VALUES_CREATE_EXAMPLES).trackedAction(processContext, async (choiceSetId, name, options) => {
|
|
47050
|
+
const nameErr = validateChoiceValueName(name);
|
|
47051
|
+
if (nameErr)
|
|
47052
|
+
return fail(nameErr.message, nameErr.instructions);
|
|
46548
47053
|
const sdk = await connectOrFail(options.tenant);
|
|
46549
47054
|
if (!sdk)
|
|
46550
47055
|
return;
|
|
@@ -46620,6 +47125,150 @@ var registerChoiceSetValuesCommand = (program2) => {
|
|
|
46620
47125
|
});
|
|
46621
47126
|
};
|
|
46622
47127
|
|
|
47128
|
+
// src/commands/directory.ts
|
|
47129
|
+
var PRINCIPAL_TYPES = ["User", "Group", "Application"];
|
|
47130
|
+
var DIRECTORY_LIST_EXAMPLES = [
|
|
47131
|
+
{
|
|
47132
|
+
Description: "List Data Fabric directory principals and their assigned roles.",
|
|
47133
|
+
Command: "uip df directory list --limit 50",
|
|
47134
|
+
Output: {
|
|
47135
|
+
Code: "DirectoryList",
|
|
47136
|
+
Data: {
|
|
47137
|
+
TotalCount: 1,
|
|
47138
|
+
Results: [
|
|
47139
|
+
{
|
|
47140
|
+
ExternalId: "d1e2f3a4-0000-0000-0000-000000000001",
|
|
47141
|
+
Name: "Automation Users",
|
|
47142
|
+
Type: "Group",
|
|
47143
|
+
Roles: [
|
|
47144
|
+
{
|
|
47145
|
+
Id: "c1d2e3f4-0000-0000-0000-000000000001",
|
|
47146
|
+
Name: "DataWriter"
|
|
47147
|
+
}
|
|
47148
|
+
],
|
|
47149
|
+
IsUIEnabled: true
|
|
47150
|
+
}
|
|
47151
|
+
]
|
|
47152
|
+
}
|
|
47153
|
+
}
|
|
47154
|
+
}
|
|
47155
|
+
];
|
|
47156
|
+
var DIRECTORY_ASSIGN_ROLES_EXAMPLES = [
|
|
47157
|
+
{
|
|
47158
|
+
Description: "Assign a Data Fabric role to an identity group.",
|
|
47159
|
+
Command: "uip df directory assign-roles d1e2f3a4-0000-0000-0000-000000000001 --type Group --role-ids c1d2e3f4-0000-0000-0000-000000000001",
|
|
47160
|
+
Output: {
|
|
47161
|
+
Code: "DirectoryRolesAssigned",
|
|
47162
|
+
Data: [
|
|
47163
|
+
{
|
|
47164
|
+
PrincipalId: "d1e2f3a4-0000-0000-0000-000000000001",
|
|
47165
|
+
RoleIds: ["c1d2e3f4-0000-0000-0000-000000000001"]
|
|
47166
|
+
}
|
|
47167
|
+
]
|
|
47168
|
+
}
|
|
47169
|
+
}
|
|
47170
|
+
];
|
|
47171
|
+
var DIRECTORY_REVOKE_ROLES_EXAMPLES = [
|
|
47172
|
+
{
|
|
47173
|
+
Description: "Revoke all direct Data Fabric roles from a principal.",
|
|
47174
|
+
Command: 'uip df directory revoke-roles d1e2f3a4-0000-0000-0000-000000000001 --yes --reason "Offboarding"',
|
|
47175
|
+
Output: {
|
|
47176
|
+
Code: "DirectoryRolesRevoked",
|
|
47177
|
+
Data: {
|
|
47178
|
+
PrincipalIds: ["d1e2f3a4-0000-0000-0000-000000000001"],
|
|
47179
|
+
Reason: "Offboarding"
|
|
47180
|
+
}
|
|
47181
|
+
}
|
|
47182
|
+
}
|
|
47183
|
+
];
|
|
47184
|
+
var parsePrincipalType = (value) => {
|
|
47185
|
+
const match = PRINCIPAL_TYPES.find((t) => t.toLowerCase() === value.toLowerCase());
|
|
47186
|
+
return match !== undefined ? match : null;
|
|
47187
|
+
};
|
|
47188
|
+
var parseRoleIds = (value) => value.split(",").map((id) => id.trim()).filter((id) => id !== "");
|
|
47189
|
+
var parseIntegerOption = (value) => {
|
|
47190
|
+
const trimmed = value.trim();
|
|
47191
|
+
if (!/^-?\d+$/.test(trimmed)) {
|
|
47192
|
+
return null;
|
|
47193
|
+
}
|
|
47194
|
+
const parsed = Number(trimmed);
|
|
47195
|
+
return Number.isSafeInteger(parsed) ? parsed : null;
|
|
47196
|
+
};
|
|
47197
|
+
var registerDirectoryCommand = (program2) => {
|
|
47198
|
+
const directory = program2.command("directory", { hidden: true }).description("Manage Data Fabric directory principals and their role assignments");
|
|
47199
|
+
directory.command("list").description("List Data Fabric directory principals and their assigned roles").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--limit <count>", "Maximum number of principals to return", "50").option("--offset <count>", "Number of principals to skip", "0").examples(DIRECTORY_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
47200
|
+
const top = parseIntegerOption(options.limit);
|
|
47201
|
+
if (top === null || top <= 0) {
|
|
47202
|
+
return fail(`Invalid --limit value '${options.limit}'`, "Provide a positive integer for --limit.");
|
|
47203
|
+
}
|
|
47204
|
+
const skip = parseIntegerOption(options.offset);
|
|
47205
|
+
if (skip === null || skip < 0) {
|
|
47206
|
+
return fail(`Invalid --offset value '${options.offset}'`, "Provide a non-negative integer for --offset.");
|
|
47207
|
+
}
|
|
47208
|
+
const sdk = await connectOrFail(options.tenant);
|
|
47209
|
+
if (!sdk)
|
|
47210
|
+
return;
|
|
47211
|
+
const [listError, result] = await catchError(sdk.entities.directory.list({ skip, top }));
|
|
47212
|
+
if (listError) {
|
|
47213
|
+
return fail("Error listing directory principals", await extractErrorMessage(listError));
|
|
47214
|
+
}
|
|
47215
|
+
OutputFormatter.success({
|
|
47216
|
+
Result: RESULTS.Success,
|
|
47217
|
+
Code: "DirectoryList",
|
|
47218
|
+
Data: result
|
|
47219
|
+
});
|
|
47220
|
+
});
|
|
47221
|
+
directory.command("assign-roles").description("Assign Data Fabric roles to one or more principals").argument("<principal-ids...>", "Principal external ID(s)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).requiredOption("--type <type>", "Principal type: User, Group, or Application").requiredOption("--role-ids <ids>", "Comma-separated Data Fabric role IDs to assign (see 'df roles list')").option("--replace", "Replace the principals' existing Data Fabric roles instead of preserving them").option("--no-ui-access", "Do not enable Data Fabric UI access for the assigned principals").examples(DIRECTORY_ASSIGN_ROLES_EXAMPLES).trackedAction(processContext, async (principalIds, options) => {
|
|
47222
|
+
const principalType = parsePrincipalType(options.type);
|
|
47223
|
+
if (principalType === null) {
|
|
47224
|
+
return fail(`Invalid --type value '${options.type}'`, `Provide one of: ${PRINCIPAL_TYPES.join(", ")}.`);
|
|
47225
|
+
}
|
|
47226
|
+
const roleIds = parseRoleIds(options.roleIds);
|
|
47227
|
+
if (roleIds.length === 0) {
|
|
47228
|
+
return fail("No role IDs provided", "Provide at least one role ID via --role-ids. Use 'df roles list' to see available roles.");
|
|
47229
|
+
}
|
|
47230
|
+
const sdk = await connectOrFail(options.tenant);
|
|
47231
|
+
if (!sdk)
|
|
47232
|
+
return;
|
|
47233
|
+
const [assignError, result] = await catchError(sdk.entities.directory.assignRoles(principalIds, principalType, roleIds, {
|
|
47234
|
+
...options.replace === true && {
|
|
47235
|
+
preserveExisting: false
|
|
47236
|
+
},
|
|
47237
|
+
...options.uiAccess === false && {
|
|
47238
|
+
uiEnabled: false
|
|
47239
|
+
}
|
|
47240
|
+
}));
|
|
47241
|
+
if (assignError) {
|
|
47242
|
+
return fail("Error assigning roles", await extractErrorMessage(assignError));
|
|
47243
|
+
}
|
|
47244
|
+
OutputFormatter.success({
|
|
47245
|
+
Result: RESULTS.Success,
|
|
47246
|
+
Code: "DirectoryRolesAssigned",
|
|
47247
|
+
Data: result ?? []
|
|
47248
|
+
});
|
|
47249
|
+
});
|
|
47250
|
+
directory.command("revoke-roles").description("Revoke all direct Data Fabric roles from one or more principals").argument("<principal-ids...>", "Principal external ID(s)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-y, --yes", "Acknowledge this is an irreversible operation").addOption(new Option("--confirm", "Deprecated alias for --yes").hideHelp()).option("--reason <reason>", "Reason for the revocation — echoed back in the response so the caller can log it").examples(DIRECTORY_REVOKE_ROLES_EXAMPLES).trackedAction(processContext, async (principalIds, options) => {
|
|
47251
|
+
const reason = requireDestructiveConfirmation(options, `revoke all Data Fabric roles from ${principalIds.length} principal(s)`, 'Pass --reason "<text>" to record why the roles are being revoked.');
|
|
47252
|
+
if (reason === null)
|
|
47253
|
+
return;
|
|
47254
|
+
const sdk = await connectOrFail(options.tenant);
|
|
47255
|
+
if (!sdk)
|
|
47256
|
+
return;
|
|
47257
|
+
const [revokeError] = await catchError(sdk.entities.directory.revokeRoles(principalIds));
|
|
47258
|
+
if (revokeError) {
|
|
47259
|
+
return fail("Error revoking roles", await extractErrorMessage(revokeError));
|
|
47260
|
+
}
|
|
47261
|
+
OutputFormatter.success({
|
|
47262
|
+
Result: RESULTS.Success,
|
|
47263
|
+
Code: "DirectoryRolesRevoked",
|
|
47264
|
+
Data: {
|
|
47265
|
+
PrincipalIds: principalIds,
|
|
47266
|
+
Reason: reason
|
|
47267
|
+
}
|
|
47268
|
+
});
|
|
47269
|
+
});
|
|
47270
|
+
};
|
|
47271
|
+
|
|
46623
47272
|
// src/utils/input.ts
|
|
46624
47273
|
init_src();
|
|
46625
47274
|
var STDIN_SENTINEL = "-";
|
|
@@ -46745,8 +47394,8 @@ var ENTITIES_DELETE_EXAMPLES = [
|
|
|
46745
47394
|
];
|
|
46746
47395
|
var ENTITIES_CREATE_EXAMPLES = [
|
|
46747
47396
|
{
|
|
46748
|
-
Description: "Create an entity with choice-set, relationship, and
|
|
46749
|
-
Command: `uip df entities create Expense --body '{"displayName":"Expense","fields":[{"fieldName":"category","type":"CHOICE_SET_SINGLE","choiceSetId":"c1d2e3f4-0000-0000-0000-000000000001","isRequired":true},{"fieldName":"tags","type":"CHOICE_SET_MULTIPLE","choiceSetId":"c1d2e3f4-0000-0000-0000-000000000002"},{"fieldName":"submitter","type":"RELATIONSHIP","referenceEntityId":"a1b2c3d4-0000-0000-0000-000000000010","referenceFieldId":"f1000000-0000-0000-0000-000000000100","isRequired":true},{"fieldName":"receipt","type":"FILE"}]}'`,
|
|
47397
|
+
Description: "Create an entity with choice-set, relationship, file, and large-text fields. " + "CHOICE_SET_SINGLE/CHOICE_SET_MULTIPLE require 'choiceSetId' (from 'df choice-sets list'). " + "RELATIONSHIP requires 'referenceEntityId' (UUID of the target entity, from 'df entities list') and 'referenceFieldId' (UUID of the field on the target entity, from 'df entities get <target-id>'). " + "Note: a RELATIONSHIP column on a record always stores the target record's UUID 'Id' (regardless of which 'referenceFieldId' configured the join) — see 'df records insert' for how to write the value. " + "FILE fields take only 'fieldName' and 'type' — the server auto-wires the internal attachment reference; populate them later with 'uip df files upload <entity-id> <record-id> <field-name> --file <path>'. " + "MULTILINE_MAX holds very large text ('lengthLimit' = UTF-16 byte budget, 1-131072; default max ~65,536 chars). Not filterable/sortable; 'records list'/'query' return a size marker — full content via 'records get'. Tenant-gated by the 'MultilineMax' feature flag.",
|
|
47398
|
+
Command: `uip df entities create Expense --body '{"displayName":"Expense","fields":[{"fieldName":"category","type":"CHOICE_SET_SINGLE","choiceSetId":"c1d2e3f4-0000-0000-0000-000000000001","isRequired":true},{"fieldName":"tags","type":"CHOICE_SET_MULTIPLE","choiceSetId":"c1d2e3f4-0000-0000-0000-000000000002"},{"fieldName":"submitter","type":"RELATIONSHIP","referenceEntityId":"a1b2c3d4-0000-0000-0000-000000000010","referenceFieldId":"f1000000-0000-0000-0000-000000000100","isRequired":true},{"fieldName":"receipt","type":"FILE"},{"fieldName":"notes","type":"MULTILINE_MAX"}]}'`,
|
|
46750
47399
|
Output: {
|
|
46751
47400
|
Code: "EntityCreated",
|
|
46752
47401
|
Data: { ID: "a1b2c3d4-0000-0000-0000-000000000004" }
|
|
@@ -46785,6 +47434,15 @@ function pickKnownUpdateKeys(input) {
|
|
|
46785
47434
|
}
|
|
46786
47435
|
return out;
|
|
46787
47436
|
}
|
|
47437
|
+
function validateFieldsPayload(fields) {
|
|
47438
|
+
return runChecks([
|
|
47439
|
+
() => findInvalidFieldName(fields),
|
|
47440
|
+
() => findUiBrokenFieldType(fields),
|
|
47441
|
+
() => findReferenceFolderKeyOnChoiceSet(fields),
|
|
47442
|
+
() => findMissingComplexFieldExtras(fields),
|
|
47443
|
+
() => findInvalidFieldConstraints(fields)
|
|
47444
|
+
]);
|
|
47445
|
+
}
|
|
46788
47446
|
var registerEntitiesCommand = (program2) => {
|
|
46789
47447
|
const entities = program2.command("entities").description("Browse Data Fabric entity schemas");
|
|
46790
47448
|
entities.command("list").description("List all Data Fabric entities").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--native-only", "Show only native entities (exclude federated entities with external connections)").option("--folder-key <key>", "Folder key (GUID) to scope the listing to a specific folder").option("--include-folders", "List tenant-level entities together with entities from every folder you can see. Mutually exclusive with --folder-key.").examples(ENTITIES_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
@@ -46856,6 +47514,12 @@ var registerEntitiesCommand = (program2) => {
|
|
|
46856
47514
|
if (hasInvalidFieldType(definition.fields)) {
|
|
46857
47515
|
return fail("Invalid field type in fields", `Valid types: ${VALID_FIELD_TYPES_LIST}`);
|
|
46858
47516
|
}
|
|
47517
|
+
const err = runChecks([
|
|
47518
|
+
() => validateName2(name, "entity"),
|
|
47519
|
+
() => validateFieldsPayload(definition.fields)
|
|
47520
|
+
]);
|
|
47521
|
+
if (err)
|
|
47522
|
+
return fail(err.message, err.instructions);
|
|
46859
47523
|
const sdk = await connectOrFail(options.tenant);
|
|
46860
47524
|
if (!sdk)
|
|
46861
47525
|
return;
|
|
@@ -46935,6 +47599,9 @@ var registerEntitiesCommand = (program2) => {
|
|
|
46935
47599
|
if (hasInvalidFieldType(input.addFields)) {
|
|
46936
47600
|
return fail("Invalid field type in addFields", `Valid types: ${VALID_FIELD_TYPES_LIST}`);
|
|
46937
47601
|
}
|
|
47602
|
+
const addErr = validateFieldsPayload(input.addFields);
|
|
47603
|
+
if (addErr)
|
|
47604
|
+
return fail(addErr.message, addErr.instructions);
|
|
46938
47605
|
const addNames = input.addFields.map((f) => f.fieldName);
|
|
46939
47606
|
const duplicateAdd = addNames.find((name, i) => addNames.indexOf(name) !== i);
|
|
46940
47607
|
if (duplicateAdd !== undefined) {
|
|
@@ -46957,6 +47624,9 @@ var registerEntitiesCommand = (program2) => {
|
|
|
46957
47624
|
if (hasInvalidField) {
|
|
46958
47625
|
return fail("Each field in updateFields must include a non-empty 'id' string", `Use 'df entities get <entityId>' to find field IDs. Example: {"id":"<fieldId>","displayName":"Total Amount","isRequired":true}`);
|
|
46959
47626
|
}
|
|
47627
|
+
const updateErr = findIsUniqueInUpdateFields(input.updateFields);
|
|
47628
|
+
if (updateErr)
|
|
47629
|
+
return fail(updateErr.message, updateErr.instructions);
|
|
46960
47630
|
}
|
|
46961
47631
|
const sdk = await connectOrFail(options.tenant);
|
|
46962
47632
|
if (!sdk)
|
|
@@ -47138,9 +47808,28 @@ async function writeFileBinary(filePath, data) {
|
|
|
47138
47808
|
|
|
47139
47809
|
// src/commands/records.ts
|
|
47140
47810
|
init_src();
|
|
47811
|
+
async function loadFileFieldNames(sdk, entityId, folderKey) {
|
|
47812
|
+
const names = new Set;
|
|
47813
|
+
if (!sdk)
|
|
47814
|
+
return names;
|
|
47815
|
+
const [schemaErr, entity] = await catchError(sdk.entities.getById(entityId, folderKey !== undefined ? { folderKey } : undefined));
|
|
47816
|
+
if (schemaErr)
|
|
47817
|
+
return names;
|
|
47818
|
+
const rec = entity;
|
|
47819
|
+
const fieldList = rec.fields ?? rec.Fields ?? [];
|
|
47820
|
+
for (const f of fieldList) {
|
|
47821
|
+
const dataType = f.fieldDataType ?? f.FieldDataType;
|
|
47822
|
+
const typeName = dataType?.name ?? dataType?.Name;
|
|
47823
|
+
const fieldName = typeof f.name === "string" ? f.name : typeof f.Name === "string" ? f.Name : undefined;
|
|
47824
|
+
if (typeName === "FILE" && fieldName !== undefined) {
|
|
47825
|
+
names.add(fieldName);
|
|
47826
|
+
}
|
|
47827
|
+
}
|
|
47828
|
+
return names;
|
|
47829
|
+
}
|
|
47141
47830
|
var RECORDS_LIST_EXAMPLES = [
|
|
47142
47831
|
{
|
|
47143
|
-
Description: "List records in an entity.",
|
|
47832
|
+
Description: "List records in an entity. MULTILINE_MAX fields return a size marker (see 'notes' below) — full value via 'records get'.",
|
|
47144
47833
|
Command: "uip df records list a1b2c3d4-0000-0000-0000-000000000001 --limit 2",
|
|
47145
47834
|
Output: {
|
|
47146
47835
|
Code: "RecordList",
|
|
@@ -47148,11 +47837,13 @@ var RECORDS_LIST_EXAMPLES = [
|
|
|
47148
47837
|
items: [
|
|
47149
47838
|
{
|
|
47150
47839
|
Id: "b2c3d4e5-0000-0000-0000-000000000001",
|
|
47151
|
-
amount: 1500
|
|
47840
|
+
amount: 1500,
|
|
47841
|
+
notes: "HasValue=true Length=20000"
|
|
47152
47842
|
},
|
|
47153
47843
|
{
|
|
47154
47844
|
Id: "b2c3d4e5-0000-0000-0000-000000000002",
|
|
47155
|
-
amount: 2750
|
|
47845
|
+
amount: 2750,
|
|
47846
|
+
notes: null
|
|
47156
47847
|
}
|
|
47157
47848
|
],
|
|
47158
47849
|
totalCount: 2,
|
|
@@ -47163,14 +47854,15 @@ var RECORDS_LIST_EXAMPLES = [
|
|
|
47163
47854
|
];
|
|
47164
47855
|
var RECORDS_GET_EXAMPLES = [
|
|
47165
47856
|
{
|
|
47166
|
-
Description: "Get a record by ID",
|
|
47857
|
+
Description: "Get a record by ID. Returns MULTILINE_MAX fields in full (see 'notes' below).",
|
|
47167
47858
|
Command: "uip df records get a1b2c3d4-0000-0000-0000-000000000001 b2c3d4e5-0000-0000-0000-000000000001",
|
|
47168
47859
|
Output: {
|
|
47169
47860
|
Code: "RecordDetails",
|
|
47170
47861
|
Data: {
|
|
47171
47862
|
Id: "b2c3d4e5-0000-0000-0000-000000000001",
|
|
47172
47863
|
amount: 1500,
|
|
47173
|
-
status: "Paid"
|
|
47864
|
+
status: "Paid",
|
|
47865
|
+
notes: "Customer disputed the Q1 late fee. Timeline of the case: … (the complete 20,000-character text, returned in full)"
|
|
47174
47866
|
}
|
|
47175
47867
|
}
|
|
47176
47868
|
}
|
|
@@ -47330,6 +48022,10 @@ var registerRecordsCommand = (program2) => {
|
|
|
47330
48022
|
const data = rawData;
|
|
47331
48023
|
const recordsList = Array.isArray(data) ? data : [data];
|
|
47332
48024
|
const folderOptions = options.folderKey !== undefined ? { folderKey: options.folderKey } : undefined;
|
|
48025
|
+
const fileNames = await loadFileFieldNames(sdk, entityId, options.folderKey);
|
|
48026
|
+
const fileErr = findFilePayloadKeys(recordsList, fileNames);
|
|
48027
|
+
if (fileErr)
|
|
48028
|
+
return fail(fileErr.message, fileErr.instructions);
|
|
47333
48029
|
if (recordsList.length === 1) {
|
|
47334
48030
|
const [insertError, result] = await catchError(sdk.entities.insertRecordById(entityId, recordsList[0], folderOptions));
|
|
47335
48031
|
if (insertError) {
|
|
@@ -47373,6 +48069,10 @@ var registerRecordsCommand = (program2) => {
|
|
|
47373
48069
|
const data = rawData;
|
|
47374
48070
|
const recordsList = Array.isArray(data) ? data : [data];
|
|
47375
48071
|
const folderOptions = options.folderKey !== undefined ? { folderKey: options.folderKey } : undefined;
|
|
48072
|
+
const fileNames = await loadFileFieldNames(sdk, entityId, options.folderKey);
|
|
48073
|
+
const fileErr = findFilePayloadKeys(recordsList, fileNames);
|
|
48074
|
+
if (fileErr)
|
|
48075
|
+
return fail(fileErr.message, fileErr.instructions);
|
|
47376
48076
|
if (recordsList.length === 1) {
|
|
47377
48077
|
const record = recordsList[0];
|
|
47378
48078
|
const recordId = record.Id !== undefined ? record.Id : record.id;
|
|
@@ -47440,6 +48140,9 @@ var registerRecordsCommand = (program2) => {
|
|
|
47440
48140
|
return fail("Query options must be a JSON object", "Provide a JSON object (not an array) with filterGroup, selectedFields, sortOptions, aggregates, or groupBy.");
|
|
47441
48141
|
}
|
|
47442
48142
|
queryBody = parsed;
|
|
48143
|
+
const filterErr = validateQueryFilter(queryBody.filterGroup);
|
|
48144
|
+
if (filterErr)
|
|
48145
|
+
return fail(filterErr.message, filterErr.instructions);
|
|
47443
48146
|
}
|
|
47444
48147
|
const sdk = await connectOrFail(options.tenant);
|
|
47445
48148
|
if (!sdk)
|
|
@@ -47530,6 +48233,47 @@ async function resolveJsonInput(filePath, inlineBody) {
|
|
|
47530
48233
|
return parsed;
|
|
47531
48234
|
}
|
|
47532
48235
|
|
|
48236
|
+
// src/commands/roles.ts
|
|
48237
|
+
var ROLES_LIST_EXAMPLES = [
|
|
48238
|
+
{
|
|
48239
|
+
Description: "List Data Fabric access roles.",
|
|
48240
|
+
Command: "uip df roles list",
|
|
48241
|
+
Output: {
|
|
48242
|
+
Code: "RoleList",
|
|
48243
|
+
Data: [
|
|
48244
|
+
{
|
|
48245
|
+
Id: "c1d2e3f4-0000-0000-0000-000000000001",
|
|
48246
|
+
Name: "DataWriter",
|
|
48247
|
+
Type: "System",
|
|
48248
|
+
DirectoryEntityCount: 3
|
|
48249
|
+
}
|
|
48250
|
+
]
|
|
48251
|
+
}
|
|
48252
|
+
}
|
|
48253
|
+
];
|
|
48254
|
+
var registerRolesCommand = (program2) => {
|
|
48255
|
+
const roles = program2.command("roles", { hidden: true }).description("Manage Data Fabric access roles");
|
|
48256
|
+
roles.command("list").description("List Data Fabric access roles").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--no-stats", "Skip role statistics (directory entity counts) in the response").option("--folder-key <key>", "Folder key (GUID) for folder-scoped role requests").examples(ROLES_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
48257
|
+
const sdk = await connectOrFail(options.tenant);
|
|
48258
|
+
if (!sdk)
|
|
48259
|
+
return;
|
|
48260
|
+
const [listError, result] = await catchError(sdk.entities.roles.getAll({
|
|
48261
|
+
stats: options.stats,
|
|
48262
|
+
...options.folderKey !== undefined && {
|
|
48263
|
+
folderKey: options.folderKey
|
|
48264
|
+
}
|
|
48265
|
+
}));
|
|
48266
|
+
if (listError) {
|
|
48267
|
+
return fail("Error listing roles", await extractErrorMessage(listError));
|
|
48268
|
+
}
|
|
48269
|
+
OutputFormatter.success({
|
|
48270
|
+
Result: RESULTS.Success,
|
|
48271
|
+
Code: "RoleList",
|
|
48272
|
+
Data: result ?? []
|
|
48273
|
+
});
|
|
48274
|
+
});
|
|
48275
|
+
};
|
|
48276
|
+
|
|
47533
48277
|
// src/tool.ts
|
|
47534
48278
|
var metadata = {
|
|
47535
48279
|
name: "data-fabric-tool",
|
|
@@ -47543,10 +48287,12 @@ var registerCommands = async (program2) => {
|
|
|
47543
48287
|
registerFilesCommand(program2);
|
|
47544
48288
|
registerChoiceSetsCommand(program2);
|
|
47545
48289
|
registerChoiceSetValuesCommand(program2);
|
|
48290
|
+
registerRolesCommand(program2);
|
|
48291
|
+
registerDirectoryCommand(program2);
|
|
47546
48292
|
};
|
|
47547
48293
|
export {
|
|
47548
48294
|
registerCommands,
|
|
47549
48295
|
metadata
|
|
47550
48296
|
};
|
|
47551
48297
|
|
|
47552
|
-
//# debugId=
|
|
48298
|
+
//# debugId=7E8DFF475EA1F36F64756E2164756E21
|