@uipath/data-fabric-tool 1.198.0 → 1.199.0-preview.104
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.104",
|
|
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 {
|
|
@@ -34368,6 +34449,7 @@ var SKILL_ATTRIBUTION = attributionRecord([
|
|
|
34368
34449
|
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
34369
34450
|
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
34370
34451
|
["cli", "troubleshoot", ["uip.feedback"]],
|
|
34452
|
+
["llm-gateway", "operate", ["uip.llm-gateway"]],
|
|
34371
34453
|
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
34372
34454
|
["context-grounding", "build", ["uip.context-grounding"]],
|
|
34373
34455
|
["api-workflow", "build", ["uip.api-workflow"]],
|
|
@@ -34784,6 +34866,7 @@ var resolveConfigAsync = async ({
|
|
|
34784
34866
|
customAuthority,
|
|
34785
34867
|
customClientId,
|
|
34786
34868
|
customClientSecret,
|
|
34869
|
+
customClientAssertion,
|
|
34787
34870
|
customScopes
|
|
34788
34871
|
} = {}) => {
|
|
34789
34872
|
const fileAuth = getAuthFileConfig();
|
|
@@ -34809,7 +34892,7 @@ var resolveConfigAsync = async ({
|
|
|
34809
34892
|
if (!clientSecret && fileAuth.clientSecret) {
|
|
34810
34893
|
clientSecret = fileAuth.clientSecret;
|
|
34811
34894
|
}
|
|
34812
|
-
const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && Boolean(clientSecret);
|
|
34895
|
+
const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && (Boolean(clientSecret) || Boolean(customClientAssertion));
|
|
34813
34896
|
const scopes = resolveScopes(isExternalAppAuth, customScopes, fileAuth.scopes);
|
|
34814
34897
|
return {
|
|
34815
34898
|
clientId,
|
|
@@ -35895,7 +35978,6 @@ function normalizeTokenRefreshUnavailableFailure() {
|
|
|
35895
35978
|
function errorMessage(error) {
|
|
35896
35979
|
return error instanceof Error ? error.message : String(error);
|
|
35897
35980
|
}
|
|
35898
|
-
|
|
35899
35981
|
// ../auth/src/index.ts
|
|
35900
35982
|
init_constants();
|
|
35901
35983
|
|
|
@@ -37101,7 +37183,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
37101
37183
|
inst._zod.run = inst._zod.parse;
|
|
37102
37184
|
});
|
|
37103
37185
|
} else {
|
|
37104
|
-
const
|
|
37186
|
+
const runChecks2 = (payload, checks2, ctx) => {
|
|
37105
37187
|
let isAborted = aborted(payload);
|
|
37106
37188
|
let asyncResult;
|
|
37107
37189
|
for (const ch of checks2) {
|
|
@@ -37146,7 +37228,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
37146
37228
|
canary.aborted = true;
|
|
37147
37229
|
return canary;
|
|
37148
37230
|
}
|
|
37149
|
-
const checkResult =
|
|
37231
|
+
const checkResult = runChecks2(payload, checks, ctx);
|
|
37150
37232
|
if (checkResult instanceof Promise) {
|
|
37151
37233
|
if (ctx.async === false)
|
|
37152
37234
|
throw new $ZodAsyncError;
|
|
@@ -37171,9 +37253,9 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
37171
37253
|
if (result instanceof Promise) {
|
|
37172
37254
|
if (ctx.async === false)
|
|
37173
37255
|
throw new $ZodAsyncError;
|
|
37174
|
-
return result.then((result2) =>
|
|
37256
|
+
return result.then((result2) => runChecks2(result2, checks, ctx));
|
|
37175
37257
|
}
|
|
37176
|
-
return
|
|
37258
|
+
return runChecks2(result, checks, ctx);
|
|
37177
37259
|
};
|
|
37178
37260
|
}
|
|
37179
37261
|
defineLazy(inst, "~standard", () => ({
|
|
@@ -40422,7 +40504,7 @@ class EmbeddedTokenManager {
|
|
|
40422
40504
|
this.cancelRefresh?.();
|
|
40423
40505
|
}
|
|
40424
40506
|
}
|
|
40425
|
-
var SDK_VERSION = "1.5.
|
|
40507
|
+
var SDK_VERSION = "1.5.5";
|
|
40426
40508
|
var CLOUD_ROLE_NAME = "uipath-ts-sdk";
|
|
40427
40509
|
var SDK_SERVICE_NAME = "UiPath.TypeScript.Sdk";
|
|
40428
40510
|
var SDK_LOGGER_NAME = "uipath-ts-sdk-telemetry";
|
|
@@ -41438,7 +41520,11 @@ class ApiClient {
|
|
|
41438
41520
|
const searchParams = new URLSearchParams;
|
|
41439
41521
|
if (options.params) {
|
|
41440
41522
|
Object.entries(options.params).forEach(([key, value]) => {
|
|
41441
|
-
|
|
41523
|
+
if (Array.isArray(value)) {
|
|
41524
|
+
value.forEach((item) => searchParams.append(key, String(item)));
|
|
41525
|
+
} else {
|
|
41526
|
+
searchParams.append(key, String(value));
|
|
41527
|
+
}
|
|
41442
41528
|
});
|
|
41443
41529
|
}
|
|
41444
41530
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
@@ -44032,8 +44118,14 @@ class MaestroProcessesService extends BaseService {
|
|
|
44032
44118
|
super(instance);
|
|
44033
44119
|
this.processInstancesService = new ProcessInstancesService(instance);
|
|
44034
44120
|
}
|
|
44035
|
-
async getAll() {
|
|
44036
|
-
const
|
|
44121
|
+
async getAll(options) {
|
|
44122
|
+
const params = createParams({
|
|
44123
|
+
processKey: options?.processKey,
|
|
44124
|
+
packageId: options?.packageId,
|
|
44125
|
+
startedTimeUtcStart: options?.startTime?.toISOString(),
|
|
44126
|
+
startedTimeUtcEnd: options?.endTime?.toISOString()
|
|
44127
|
+
});
|
|
44128
|
+
const response = await this.get(MAESTRO_ENDPOINTS.PROCESSES.GET_ALL, { params });
|
|
44037
44129
|
const processes = response.data?.processes || [];
|
|
44038
44130
|
const processesWithName = processes.map((process10) => ({
|
|
44039
44131
|
...process10,
|
|
@@ -44137,9 +44229,13 @@ var ProcessType;
|
|
|
44137
44229
|
})(ProcessType || (ProcessType = {}));
|
|
44138
44230
|
|
|
44139
44231
|
class CasesService extends BaseService {
|
|
44140
|
-
async getAll() {
|
|
44232
|
+
async getAll(options) {
|
|
44141
44233
|
const params = createParams({
|
|
44142
|
-
processType: ProcessType.CaseManagement
|
|
44234
|
+
processType: ProcessType.CaseManagement,
|
|
44235
|
+
processKey: options?.processKey,
|
|
44236
|
+
packageId: options?.packageId,
|
|
44237
|
+
startedTimeUtcStart: options?.startTime?.toISOString(),
|
|
44238
|
+
startedTimeUtcEnd: options?.endTime?.toISOString()
|
|
44143
44239
|
});
|
|
44144
44240
|
const response = await this.get(MAESTRO_ENDPOINTS.PROCESSES.GET_ALL, { params });
|
|
44145
44241
|
const cases = response.data?.processes || [];
|
|
@@ -46370,6 +46466,409 @@ var connectOrFail = async (tenantOverride) => {
|
|
|
46370
46466
|
return sdk;
|
|
46371
46467
|
};
|
|
46372
46468
|
|
|
46469
|
+
// src/utils/validate.ts
|
|
46470
|
+
var UI_BROKEN_FIELD_TYPES = new Set([
|
|
46471
|
+
"INTEGER",
|
|
46472
|
+
"BIG_INTEGER",
|
|
46473
|
+
"FLOAT",
|
|
46474
|
+
"DOUBLE",
|
|
46475
|
+
"UUID",
|
|
46476
|
+
"DATETIME"
|
|
46477
|
+
]);
|
|
46478
|
+
var UI_BROKEN_SUBSTITUTIONS = {
|
|
46479
|
+
INTEGER: "DECIMAL with decimalPrecision: 0",
|
|
46480
|
+
BIG_INTEGER: "DECIMAL with decimalPrecision: 0",
|
|
46481
|
+
FLOAT: "DECIMAL with a required decimalPrecision",
|
|
46482
|
+
DOUBLE: "DECIMAL with a required decimalPrecision",
|
|
46483
|
+
UUID: "RELATIONSHIP (if it's a foreign key) or STRING",
|
|
46484
|
+
DATETIME: "DATETIME_WITH_TZ"
|
|
46485
|
+
};
|
|
46486
|
+
var RESERVED_FIELD_NAMES = new Set([
|
|
46487
|
+
"Id",
|
|
46488
|
+
"CreatedBy",
|
|
46489
|
+
"CreateTime",
|
|
46490
|
+
"UpdatedBy",
|
|
46491
|
+
"UpdateTime"
|
|
46492
|
+
]);
|
|
46493
|
+
var RESERVED_KEYWORDS_LOWER = new Set([
|
|
46494
|
+
"case",
|
|
46495
|
+
"class",
|
|
46496
|
+
"if",
|
|
46497
|
+
"then",
|
|
46498
|
+
"else",
|
|
46499
|
+
"new",
|
|
46500
|
+
"object",
|
|
46501
|
+
"public",
|
|
46502
|
+
"return",
|
|
46503
|
+
"select",
|
|
46504
|
+
"internal",
|
|
46505
|
+
"private",
|
|
46506
|
+
"static"
|
|
46507
|
+
]);
|
|
46508
|
+
var NAME_PATTERN = /^[a-zA-Z][a-zA-Z0-9_]{2,99}$/;
|
|
46509
|
+
function validateName2(name, kind) {
|
|
46510
|
+
if (kind === "field" && RESERVED_FIELD_NAMES.has(name)) {
|
|
46511
|
+
return {
|
|
46512
|
+
message: `Field name '${name}' is reserved`,
|
|
46513
|
+
instructions: `The following field names are reserved by the platform: ${[...RESERVED_FIELD_NAMES].join(", ")}. Pick a different name.`
|
|
46514
|
+
};
|
|
46515
|
+
}
|
|
46516
|
+
if (RESERVED_KEYWORDS_LOWER.has(name.toLowerCase())) {
|
|
46517
|
+
return {
|
|
46518
|
+
message: `${kind === "entity" ? "Entity" : kind === "field" ? "Field" : "Choice set"} name '${name}' is a reserved C# or VB keyword`,
|
|
46519
|
+
instructions: "Reserved keywords are rejected with RESERVED_LANGUAGE_KEYWORDS. Pick a domain-specific rename, for example 'Case' -> 'WorkItem', 'Class' -> 'Category', 'New' -> 'IsNew'."
|
|
46520
|
+
};
|
|
46521
|
+
}
|
|
46522
|
+
if (!NAME_PATTERN.test(name)) {
|
|
46523
|
+
return {
|
|
46524
|
+
message: `Invalid ${kind} name '${name}'`,
|
|
46525
|
+
instructions: "Names must start with a letter, contain only letters, digits, and underscores, and be 3-100 characters long."
|
|
46526
|
+
};
|
|
46527
|
+
}
|
|
46528
|
+
return null;
|
|
46529
|
+
}
|
|
46530
|
+
function findInvalidFieldName(fields) {
|
|
46531
|
+
for (const f of fields) {
|
|
46532
|
+
if (typeof f !== "object" || f === null)
|
|
46533
|
+
continue;
|
|
46534
|
+
const fieldName = f.fieldName;
|
|
46535
|
+
if (typeof fieldName !== "string")
|
|
46536
|
+
continue;
|
|
46537
|
+
const err = validateName2(fieldName, "field");
|
|
46538
|
+
if (err)
|
|
46539
|
+
return err;
|
|
46540
|
+
}
|
|
46541
|
+
return null;
|
|
46542
|
+
}
|
|
46543
|
+
function findUiBrokenFieldType(fields) {
|
|
46544
|
+
for (const f of fields) {
|
|
46545
|
+
if (typeof f !== "object" || f === null)
|
|
46546
|
+
continue;
|
|
46547
|
+
const rec = f;
|
|
46548
|
+
const type2 = rec.type;
|
|
46549
|
+
if (typeof type2 !== "string")
|
|
46550
|
+
continue;
|
|
46551
|
+
if (UI_BROKEN_FIELD_TYPES.has(type2)) {
|
|
46552
|
+
const fieldName = typeof rec.fieldName === "string" ? rec.fieldName : "<field>";
|
|
46553
|
+
const substitute = UI_BROKEN_SUBSTITUTIONS[type2];
|
|
46554
|
+
return {
|
|
46555
|
+
message: `Field '${fieldName}' uses type '${type2}' which the Data Fabric UI cannot render`,
|
|
46556
|
+
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(", ")}.`
|
|
46557
|
+
};
|
|
46558
|
+
}
|
|
46559
|
+
}
|
|
46560
|
+
return null;
|
|
46561
|
+
}
|
|
46562
|
+
function findReferenceFolderKeyOnChoiceSet(fields) {
|
|
46563
|
+
for (const f of fields) {
|
|
46564
|
+
if (typeof f !== "object" || f === null)
|
|
46565
|
+
continue;
|
|
46566
|
+
const rec = f;
|
|
46567
|
+
const type2 = rec.type;
|
|
46568
|
+
if ((type2 === "CHOICE_SET_SINGLE" || type2 === "CHOICE_SET_MULTIPLE") && rec.referenceFolderKey !== undefined) {
|
|
46569
|
+
const fieldName = typeof rec.fieldName === "string" ? rec.fieldName : "<field>";
|
|
46570
|
+
return {
|
|
46571
|
+
message: `CHOICE_SET_* field '${fieldName}' must not pass 'referenceFolderKey'`,
|
|
46572
|
+
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."
|
|
46573
|
+
};
|
|
46574
|
+
}
|
|
46575
|
+
}
|
|
46576
|
+
return null;
|
|
46577
|
+
}
|
|
46578
|
+
function findMissingComplexFieldExtras(fields) {
|
|
46579
|
+
for (const f of fields) {
|
|
46580
|
+
if (typeof f !== "object" || f === null)
|
|
46581
|
+
continue;
|
|
46582
|
+
const rec = f;
|
|
46583
|
+
const type2 = rec.type;
|
|
46584
|
+
if (typeof type2 !== "string")
|
|
46585
|
+
continue;
|
|
46586
|
+
const fieldName = typeof rec.fieldName === "string" ? rec.fieldName : "<field>";
|
|
46587
|
+
if (type2 === "CHOICE_SET_SINGLE" || type2 === "CHOICE_SET_MULTIPLE") {
|
|
46588
|
+
if (typeof rec.choiceSetId !== "string" || rec.choiceSetId.trim() === "") {
|
|
46589
|
+
return {
|
|
46590
|
+
message: `Field '${fieldName}' (type '${type2}') requires 'choiceSetId'`,
|
|
46591
|
+
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."
|
|
46592
|
+
};
|
|
46593
|
+
}
|
|
46594
|
+
} else if (type2 === "RELATIONSHIP") {
|
|
46595
|
+
if (typeof rec.referenceEntityId !== "string" || rec.referenceEntityId.trim() === "") {
|
|
46596
|
+
return {
|
|
46597
|
+
message: `Field '${fieldName}' (type 'RELATIONSHIP') requires 'referenceEntityId'`,
|
|
46598
|
+
instructions: "Set 'referenceEntityId' to the UUID of the target entity from 'uip df entities list --native-only'."
|
|
46599
|
+
};
|
|
46600
|
+
}
|
|
46601
|
+
if (typeof rec.referenceFieldId !== "string" || rec.referenceFieldId.trim() === "") {
|
|
46602
|
+
return {
|
|
46603
|
+
message: `Field '${fieldName}' (type 'RELATIONSHIP') requires 'referenceFieldId'`,
|
|
46604
|
+
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."
|
|
46605
|
+
};
|
|
46606
|
+
}
|
|
46607
|
+
}
|
|
46608
|
+
}
|
|
46609
|
+
return null;
|
|
46610
|
+
}
|
|
46611
|
+
var LENGTH_LIMIT_RANGES = {
|
|
46612
|
+
STRING: [1, 4000],
|
|
46613
|
+
MULTILINE_TEXT: [1, 1e4],
|
|
46614
|
+
MULTILINE_MAX: [1, 131072]
|
|
46615
|
+
};
|
|
46616
|
+
function isNumber(v) {
|
|
46617
|
+
return typeof v === "number" && Number.isFinite(v);
|
|
46618
|
+
}
|
|
46619
|
+
function findInvalidFieldConstraints(fields) {
|
|
46620
|
+
for (const f of fields) {
|
|
46621
|
+
if (typeof f !== "object" || f === null)
|
|
46622
|
+
continue;
|
|
46623
|
+
const rec = f;
|
|
46624
|
+
const type2 = rec.type;
|
|
46625
|
+
if (typeof type2 !== "string")
|
|
46626
|
+
continue;
|
|
46627
|
+
const fieldName = typeof rec.fieldName === "string" ? rec.fieldName : "<field>";
|
|
46628
|
+
if (rec.lengthLimit !== undefined) {
|
|
46629
|
+
if (!isNumber(rec.lengthLimit)) {
|
|
46630
|
+
return {
|
|
46631
|
+
message: `Field '${fieldName}' 'lengthLimit' must be a number`,
|
|
46632
|
+
instructions: "Pass a positive integer within the type's range (STRING 1-4000, MULTILINE_TEXT 1-10000, MULTILINE_MAX 1-131072 UTF-16 bytes)."
|
|
46633
|
+
};
|
|
46634
|
+
}
|
|
46635
|
+
const range = LENGTH_LIMIT_RANGES[type2];
|
|
46636
|
+
if (range === undefined) {
|
|
46637
|
+
return {
|
|
46638
|
+
message: `Field '${fieldName}' of type '${type2}' does not accept 'lengthLimit'`,
|
|
46639
|
+
instructions: "'lengthLimit' applies only to STRING, MULTILINE_TEXT, and MULTILINE_MAX. Remove it or change the field type."
|
|
46640
|
+
};
|
|
46641
|
+
}
|
|
46642
|
+
const [min, max] = range;
|
|
46643
|
+
if (rec.lengthLimit < min || rec.lengthLimit > max) {
|
|
46644
|
+
return {
|
|
46645
|
+
message: `Field '${fieldName}' 'lengthLimit' ${rec.lengthLimit} is outside the allowed range for type '${type2}'`,
|
|
46646
|
+
instructions: `'lengthLimit' on '${type2}' must be between ${min} and ${max}. MULTILINE_MAX 'lengthLimit' is a UTF-16 byte budget (≈2 per char).`
|
|
46647
|
+
};
|
|
46648
|
+
}
|
|
46649
|
+
}
|
|
46650
|
+
if (rec.maxValue !== undefined || rec.minValue !== undefined) {
|
|
46651
|
+
if (type2 !== "DECIMAL") {
|
|
46652
|
+
const which = rec.maxValue !== undefined ? "maxValue" : "minValue";
|
|
46653
|
+
return {
|
|
46654
|
+
message: `Field '${fieldName}' of type '${type2}' does not accept '${which}'`,
|
|
46655
|
+
instructions: "'minValue' and 'maxValue' apply only to DECIMAL. Remove them or change the field type."
|
|
46656
|
+
};
|
|
46657
|
+
}
|
|
46658
|
+
if (rec.maxValue !== undefined && !isNumber(rec.maxValue)) {
|
|
46659
|
+
return {
|
|
46660
|
+
message: `Field '${fieldName}' 'maxValue' must be a number`,
|
|
46661
|
+
instructions: "Pass a numeric value."
|
|
46662
|
+
};
|
|
46663
|
+
}
|
|
46664
|
+
if (rec.minValue !== undefined && !isNumber(rec.minValue)) {
|
|
46665
|
+
return {
|
|
46666
|
+
message: `Field '${fieldName}' 'minValue' must be a number`,
|
|
46667
|
+
instructions: "Pass a numeric value."
|
|
46668
|
+
};
|
|
46669
|
+
}
|
|
46670
|
+
if (rec.maxValue !== undefined && rec.minValue !== undefined && rec.minValue >= rec.maxValue) {
|
|
46671
|
+
return {
|
|
46672
|
+
message: `Field '${fieldName}' 'minValue' (${rec.minValue}) must be strictly less than 'maxValue' (${rec.maxValue})`,
|
|
46673
|
+
instructions: "Adjust the bounds so 'minValue < maxValue', or drop one of the two."
|
|
46674
|
+
};
|
|
46675
|
+
}
|
|
46676
|
+
}
|
|
46677
|
+
if (rec.decimalPrecision !== undefined) {
|
|
46678
|
+
if (type2 !== "DECIMAL") {
|
|
46679
|
+
return {
|
|
46680
|
+
message: `Field '${fieldName}' of type '${type2}' does not accept 'decimalPrecision'`,
|
|
46681
|
+
instructions: "'decimalPrecision' applies only to DECIMAL. Remove it or change the field type."
|
|
46682
|
+
};
|
|
46683
|
+
}
|
|
46684
|
+
if (!isNumber(rec.decimalPrecision) || !Number.isInteger(rec.decimalPrecision) || rec.decimalPrecision < 0 || rec.decimalPrecision > 10) {
|
|
46685
|
+
return {
|
|
46686
|
+
message: `Field '${fieldName}' 'decimalPrecision' ${rec.decimalPrecision} is invalid`,
|
|
46687
|
+
instructions: "'decimalPrecision' must be an integer between 0 and 10 (0 for whole numbers, 2 for money)."
|
|
46688
|
+
};
|
|
46689
|
+
}
|
|
46690
|
+
}
|
|
46691
|
+
}
|
|
46692
|
+
return null;
|
|
46693
|
+
}
|
|
46694
|
+
var CHOICE_VALUE_KEYWORDS = new Set([
|
|
46695
|
+
"internal",
|
|
46696
|
+
"public",
|
|
46697
|
+
"private",
|
|
46698
|
+
"class",
|
|
46699
|
+
"case",
|
|
46700
|
+
"new",
|
|
46701
|
+
"default",
|
|
46702
|
+
"static",
|
|
46703
|
+
"void",
|
|
46704
|
+
"event",
|
|
46705
|
+
"lock",
|
|
46706
|
+
"object",
|
|
46707
|
+
"string",
|
|
46708
|
+
"int"
|
|
46709
|
+
]);
|
|
46710
|
+
var CHOICE_VALUE_NAME_PATTERN = /^[a-zA-Z][a-zA-Z0-9_]{2,99}$/;
|
|
46711
|
+
function validateChoiceValueName(name) {
|
|
46712
|
+
if (!CHOICE_VALUE_NAME_PATTERN.test(name)) {
|
|
46713
|
+
return {
|
|
46714
|
+
message: `Invalid choice-set value name '${name}'`,
|
|
46715
|
+
instructions: "Choice-set value names must start with a letter, contain only letters, digits, and underscores, and be 3-100 characters long."
|
|
46716
|
+
};
|
|
46717
|
+
}
|
|
46718
|
+
if (CHOICE_VALUE_KEYWORDS.has(name)) {
|
|
46719
|
+
return {
|
|
46720
|
+
message: `Choice-set value name '${name}' is a reserved C# keyword`,
|
|
46721
|
+
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'.`
|
|
46722
|
+
};
|
|
46723
|
+
}
|
|
46724
|
+
return null;
|
|
46725
|
+
}
|
|
46726
|
+
var FILTER_OPERATORS = new Set([
|
|
46727
|
+
"=",
|
|
46728
|
+
"!=",
|
|
46729
|
+
">",
|
|
46730
|
+
"<",
|
|
46731
|
+
">=",
|
|
46732
|
+
"<=",
|
|
46733
|
+
"contains",
|
|
46734
|
+
"not contains",
|
|
46735
|
+
"startswith",
|
|
46736
|
+
"endswith",
|
|
46737
|
+
"in",
|
|
46738
|
+
"not in"
|
|
46739
|
+
]);
|
|
46740
|
+
var VALUELIST_OPERATORS = new Set(["in", "not in"]);
|
|
46741
|
+
var FILTER_OPERATORS_LIST = [...FILTER_OPERATORS].map((o) => `'${o}'`).join(", ");
|
|
46742
|
+
function validateFilterLeaf(leaf, path3) {
|
|
46743
|
+
if (typeof leaf !== "object" || leaf === null) {
|
|
46744
|
+
return {
|
|
46745
|
+
message: `${path3} must be a filter object`,
|
|
46746
|
+
instructions: "Each queryFilters entry must be an object with fieldName, operator, and value (or valueList for 'in' / 'not in')."
|
|
46747
|
+
};
|
|
46748
|
+
}
|
|
46749
|
+
const rec = leaf;
|
|
46750
|
+
if (typeof rec.fieldName !== "string" || rec.fieldName.trim() === "") {
|
|
46751
|
+
return {
|
|
46752
|
+
message: `${path3}.fieldName must be a non-empty string`,
|
|
46753
|
+
instructions: 'Set fieldName to the column you want to filter, for example {"fieldName":"Status","operator":"=","value":"Active"}.'
|
|
46754
|
+
};
|
|
46755
|
+
}
|
|
46756
|
+
if (typeof rec.operator !== "string") {
|
|
46757
|
+
return {
|
|
46758
|
+
message: `${path3}.operator must be a string`,
|
|
46759
|
+
instructions: `Supported operators: ${FILTER_OPERATORS_LIST}.`
|
|
46760
|
+
};
|
|
46761
|
+
}
|
|
46762
|
+
if (!FILTER_OPERATORS.has(rec.operator)) {
|
|
46763
|
+
return {
|
|
46764
|
+
message: `${path3} uses unsupported operator '${rec.operator}'`,
|
|
46765
|
+
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.`
|
|
46766
|
+
};
|
|
46767
|
+
}
|
|
46768
|
+
const needsValueList = VALUELIST_OPERATORS.has(rec.operator);
|
|
46769
|
+
if (needsValueList) {
|
|
46770
|
+
if (!Array.isArray(rec.valueList)) {
|
|
46771
|
+
return {
|
|
46772
|
+
message: `${path3} operator '${rec.operator}' requires 'valueList' array`,
|
|
46773
|
+
instructions: `'in' and 'not in' take a JSON array of values under 'valueList', for example {"fieldName":"Status","operator":"in","valueList":["A","B"]}.`
|
|
46774
|
+
};
|
|
46775
|
+
}
|
|
46776
|
+
} else {
|
|
46777
|
+
if (!("value" in rec)) {
|
|
46778
|
+
return {
|
|
46779
|
+
message: `${path3} operator '${rec.operator}' requires 'value'`,
|
|
46780
|
+
instructions: "Set 'value' to the JSON-string form of the compared value. Use null for is-empty ('=' with null) / is-not-empty ('!=' with null)."
|
|
46781
|
+
};
|
|
46782
|
+
}
|
|
46783
|
+
}
|
|
46784
|
+
return null;
|
|
46785
|
+
}
|
|
46786
|
+
function validateFilterGroup(group, path3) {
|
|
46787
|
+
if (typeof group !== "object" || group === null || Array.isArray(group)) {
|
|
46788
|
+
return {
|
|
46789
|
+
message: `${path3} must be an object`,
|
|
46790
|
+
instructions: "A filter group is {logicalOperator, queryFilters, filterGroups?}."
|
|
46791
|
+
};
|
|
46792
|
+
}
|
|
46793
|
+
const rec = group;
|
|
46794
|
+
if (rec.logicalOperator !== undefined) {
|
|
46795
|
+
const op = rec.logicalOperator;
|
|
46796
|
+
const okString = typeof op === "string" && /^(and|or)$/i.test(op.trim());
|
|
46797
|
+
const okNumber = op === 0 || op === 1;
|
|
46798
|
+
if (!okString && !okNumber) {
|
|
46799
|
+
return {
|
|
46800
|
+
message: `${path3}.logicalOperator must be 'AND' / 'OR' / 0 / 1`,
|
|
46801
|
+
instructions: "Use the integer form (0 for AND, 1 for OR) or the string form ('AND' / 'OR', case-insensitive)."
|
|
46802
|
+
};
|
|
46803
|
+
}
|
|
46804
|
+
}
|
|
46805
|
+
if (rec.queryFilters !== undefined) {
|
|
46806
|
+
if (!Array.isArray(rec.queryFilters)) {
|
|
46807
|
+
return {
|
|
46808
|
+
message: `${path3}.queryFilters must be an array`,
|
|
46809
|
+
instructions: "queryFilters is an array of {fieldName, operator, value|valueList} clauses."
|
|
46810
|
+
};
|
|
46811
|
+
}
|
|
46812
|
+
for (let i = 0;i < rec.queryFilters.length; i++) {
|
|
46813
|
+
const err = validateFilterLeaf(rec.queryFilters[i], `${path3}.queryFilters[${i}]`);
|
|
46814
|
+
if (err)
|
|
46815
|
+
return err;
|
|
46816
|
+
}
|
|
46817
|
+
}
|
|
46818
|
+
if (rec.filterGroups !== undefined) {
|
|
46819
|
+
if (!Array.isArray(rec.filterGroups)) {
|
|
46820
|
+
return {
|
|
46821
|
+
message: `${path3}.filterGroups must be an array`,
|
|
46822
|
+
instructions: "filterGroups is an array of nested groups, each with the same shape as the parent."
|
|
46823
|
+
};
|
|
46824
|
+
}
|
|
46825
|
+
for (let i = 0;i < rec.filterGroups.length; i++) {
|
|
46826
|
+
const err = validateFilterGroup(rec.filterGroups[i], `${path3}.filterGroups[${i}]`);
|
|
46827
|
+
if (err)
|
|
46828
|
+
return err;
|
|
46829
|
+
}
|
|
46830
|
+
}
|
|
46831
|
+
return null;
|
|
46832
|
+
}
|
|
46833
|
+
function validateQueryFilter(filterGroup) {
|
|
46834
|
+
if (filterGroup === undefined)
|
|
46835
|
+
return null;
|
|
46836
|
+
return validateFilterGroup(filterGroup, "filterGroup");
|
|
46837
|
+
}
|
|
46838
|
+
function findFilePayloadKeys(records, fileFieldNames) {
|
|
46839
|
+
if (fileFieldNames.size === 0)
|
|
46840
|
+
return null;
|
|
46841
|
+
for (let i = 0;i < records.length; i++) {
|
|
46842
|
+
const rec = records[i];
|
|
46843
|
+
if (typeof rec !== "object" || rec === null)
|
|
46844
|
+
continue;
|
|
46845
|
+
for (const key of Object.keys(rec)) {
|
|
46846
|
+
if (fileFieldNames.has(key)) {
|
|
46847
|
+
return {
|
|
46848
|
+
message: `Record #${i} includes FILE-typed field '${key}'`,
|
|
46849
|
+
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'.`
|
|
46850
|
+
};
|
|
46851
|
+
}
|
|
46852
|
+
}
|
|
46853
|
+
}
|
|
46854
|
+
return null;
|
|
46855
|
+
}
|
|
46856
|
+
function findIsUniqueInUpdateFields(updateFields) {
|
|
46857
|
+
for (const f of updateFields) {
|
|
46858
|
+
if (typeof f !== "object" || f === null)
|
|
46859
|
+
continue;
|
|
46860
|
+
const rec = f;
|
|
46861
|
+
if (rec.isUnique === undefined)
|
|
46862
|
+
continue;
|
|
46863
|
+
const fieldId = typeof rec.id === "string" ? rec.id : "<unknown>";
|
|
46864
|
+
return {
|
|
46865
|
+
message: `Cannot change 'isUnique' on field '${fieldId}' via updateFields`,
|
|
46866
|
+
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)."
|
|
46867
|
+
};
|
|
46868
|
+
}
|
|
46869
|
+
return null;
|
|
46870
|
+
}
|
|
46871
|
+
|
|
46373
46872
|
// src/commands/choice-sets.ts
|
|
46374
46873
|
var OUTPUT_CODES = {
|
|
46375
46874
|
ChoiceSetList: "ChoiceSetList",
|
|
@@ -46524,6 +47023,9 @@ var registerChoiceSetsCommand = (program2) => {
|
|
|
46524
47023
|
});
|
|
46525
47024
|
});
|
|
46526
47025
|
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) => {
|
|
47026
|
+
const nameErr = validateName2(name, "choice set");
|
|
47027
|
+
if (nameErr)
|
|
47028
|
+
return fail(nameErr.message, nameErr.instructions);
|
|
46527
47029
|
const sdk = await connectOrFail(options.tenant);
|
|
46528
47030
|
if (!sdk)
|
|
46529
47031
|
return;
|
|
@@ -46550,8 +47052,8 @@ var registerChoiceSetsCommand = (program2) => {
|
|
|
46550
47052
|
});
|
|
46551
47053
|
});
|
|
46552
47054
|
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) => {
|
|
46553
|
-
if (options.displayName === undefined
|
|
46554
|
-
return fail("
|
|
47055
|
+
if (options.displayName === undefined || options.description === undefined) {
|
|
47056
|
+
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.");
|
|
46555
47057
|
}
|
|
46556
47058
|
const sdk = await connectOrFail(options.tenant);
|
|
46557
47059
|
if (!sdk)
|
|
@@ -46652,6 +47154,9 @@ var CHOICE_SET_VALUES_DELETE_EXAMPLES = [
|
|
|
46652
47154
|
var registerChoiceSetValuesCommand = (program2) => {
|
|
46653
47155
|
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.");
|
|
46654
47156
|
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) => {
|
|
47157
|
+
const nameErr = validateChoiceValueName(name);
|
|
47158
|
+
if (nameErr)
|
|
47159
|
+
return fail(nameErr.message, nameErr.instructions);
|
|
46655
47160
|
const sdk = await connectOrFail(options.tenant);
|
|
46656
47161
|
if (!sdk)
|
|
46657
47162
|
return;
|
|
@@ -46727,6 +47232,150 @@ var registerChoiceSetValuesCommand = (program2) => {
|
|
|
46727
47232
|
});
|
|
46728
47233
|
};
|
|
46729
47234
|
|
|
47235
|
+
// src/commands/directory.ts
|
|
47236
|
+
var PRINCIPAL_TYPES = ["User", "Group", "Application"];
|
|
47237
|
+
var DIRECTORY_LIST_EXAMPLES = [
|
|
47238
|
+
{
|
|
47239
|
+
Description: "List Data Fabric directory principals and their assigned roles.",
|
|
47240
|
+
Command: "uip df directory list --limit 50",
|
|
47241
|
+
Output: {
|
|
47242
|
+
Code: "DirectoryList",
|
|
47243
|
+
Data: {
|
|
47244
|
+
TotalCount: 1,
|
|
47245
|
+
Results: [
|
|
47246
|
+
{
|
|
47247
|
+
ExternalId: "d1e2f3a4-0000-0000-0000-000000000001",
|
|
47248
|
+
Name: "Automation Users",
|
|
47249
|
+
Type: "Group",
|
|
47250
|
+
Roles: [
|
|
47251
|
+
{
|
|
47252
|
+
Id: "c1d2e3f4-0000-0000-0000-000000000001",
|
|
47253
|
+
Name: "DataWriter"
|
|
47254
|
+
}
|
|
47255
|
+
],
|
|
47256
|
+
IsUIEnabled: true
|
|
47257
|
+
}
|
|
47258
|
+
]
|
|
47259
|
+
}
|
|
47260
|
+
}
|
|
47261
|
+
}
|
|
47262
|
+
];
|
|
47263
|
+
var DIRECTORY_ASSIGN_ROLES_EXAMPLES = [
|
|
47264
|
+
{
|
|
47265
|
+
Description: "Assign a Data Fabric role to an identity group.",
|
|
47266
|
+
Command: "uip df directory assign-roles d1e2f3a4-0000-0000-0000-000000000001 --type Group --role-ids c1d2e3f4-0000-0000-0000-000000000001",
|
|
47267
|
+
Output: {
|
|
47268
|
+
Code: "DirectoryRolesAssigned",
|
|
47269
|
+
Data: [
|
|
47270
|
+
{
|
|
47271
|
+
PrincipalId: "d1e2f3a4-0000-0000-0000-000000000001",
|
|
47272
|
+
RoleIds: ["c1d2e3f4-0000-0000-0000-000000000001"]
|
|
47273
|
+
}
|
|
47274
|
+
]
|
|
47275
|
+
}
|
|
47276
|
+
}
|
|
47277
|
+
];
|
|
47278
|
+
var DIRECTORY_REVOKE_ROLES_EXAMPLES = [
|
|
47279
|
+
{
|
|
47280
|
+
Description: "Revoke all direct Data Fabric roles from a principal.",
|
|
47281
|
+
Command: 'uip df directory revoke-roles d1e2f3a4-0000-0000-0000-000000000001 --yes --reason "Offboarding"',
|
|
47282
|
+
Output: {
|
|
47283
|
+
Code: "DirectoryRolesRevoked",
|
|
47284
|
+
Data: {
|
|
47285
|
+
PrincipalIds: ["d1e2f3a4-0000-0000-0000-000000000001"],
|
|
47286
|
+
Reason: "Offboarding"
|
|
47287
|
+
}
|
|
47288
|
+
}
|
|
47289
|
+
}
|
|
47290
|
+
];
|
|
47291
|
+
var parsePrincipalType = (value) => {
|
|
47292
|
+
const match = PRINCIPAL_TYPES.find((t) => t.toLowerCase() === value.toLowerCase());
|
|
47293
|
+
return match !== undefined ? match : null;
|
|
47294
|
+
};
|
|
47295
|
+
var parseRoleIds = (value) => value.split(",").map((id) => id.trim()).filter((id) => id !== "");
|
|
47296
|
+
var parseIntegerOption = (value) => {
|
|
47297
|
+
const trimmed = value.trim();
|
|
47298
|
+
if (!/^-?\d+$/.test(trimmed)) {
|
|
47299
|
+
return null;
|
|
47300
|
+
}
|
|
47301
|
+
const parsed = Number(trimmed);
|
|
47302
|
+
return Number.isSafeInteger(parsed) ? parsed : null;
|
|
47303
|
+
};
|
|
47304
|
+
var registerDirectoryCommand = (program2) => {
|
|
47305
|
+
const directory = program2.command("directory", { hidden: true }).description("Manage Data Fabric directory principals and their role assignments");
|
|
47306
|
+
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) => {
|
|
47307
|
+
const top = parseIntegerOption(options.limit);
|
|
47308
|
+
if (top === null || top <= 0) {
|
|
47309
|
+
return fail(`Invalid --limit value '${options.limit}'`, "Provide a positive integer for --limit.");
|
|
47310
|
+
}
|
|
47311
|
+
const skip = parseIntegerOption(options.offset);
|
|
47312
|
+
if (skip === null || skip < 0) {
|
|
47313
|
+
return fail(`Invalid --offset value '${options.offset}'`, "Provide a non-negative integer for --offset.");
|
|
47314
|
+
}
|
|
47315
|
+
const sdk = await connectOrFail(options.tenant);
|
|
47316
|
+
if (!sdk)
|
|
47317
|
+
return;
|
|
47318
|
+
const [listError, result] = await catchError(sdk.entities.directory.list({ skip, top }));
|
|
47319
|
+
if (listError) {
|
|
47320
|
+
return fail("Error listing directory principals", await extractErrorMessage(listError));
|
|
47321
|
+
}
|
|
47322
|
+
OutputFormatter.success({
|
|
47323
|
+
Result: RESULTS.Success,
|
|
47324
|
+
Code: "DirectoryList",
|
|
47325
|
+
Data: result
|
|
47326
|
+
});
|
|
47327
|
+
});
|
|
47328
|
+
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) => {
|
|
47329
|
+
const principalType = parsePrincipalType(options.type);
|
|
47330
|
+
if (principalType === null) {
|
|
47331
|
+
return fail(`Invalid --type value '${options.type}'`, `Provide one of: ${PRINCIPAL_TYPES.join(", ")}.`);
|
|
47332
|
+
}
|
|
47333
|
+
const roleIds = parseRoleIds(options.roleIds);
|
|
47334
|
+
if (roleIds.length === 0) {
|
|
47335
|
+
return fail("No role IDs provided", "Provide at least one role ID via --role-ids. Use 'df roles list' to see available roles.");
|
|
47336
|
+
}
|
|
47337
|
+
const sdk = await connectOrFail(options.tenant);
|
|
47338
|
+
if (!sdk)
|
|
47339
|
+
return;
|
|
47340
|
+
const [assignError, result] = await catchError(sdk.entities.directory.assignRoles(principalIds, principalType, roleIds, {
|
|
47341
|
+
...options.replace === true && {
|
|
47342
|
+
preserveExisting: false
|
|
47343
|
+
},
|
|
47344
|
+
...options.uiAccess === false && {
|
|
47345
|
+
uiEnabled: false
|
|
47346
|
+
}
|
|
47347
|
+
}));
|
|
47348
|
+
if (assignError) {
|
|
47349
|
+
return fail("Error assigning roles", await extractErrorMessage(assignError));
|
|
47350
|
+
}
|
|
47351
|
+
OutputFormatter.success({
|
|
47352
|
+
Result: RESULTS.Success,
|
|
47353
|
+
Code: "DirectoryRolesAssigned",
|
|
47354
|
+
Data: result ?? []
|
|
47355
|
+
});
|
|
47356
|
+
});
|
|
47357
|
+
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) => {
|
|
47358
|
+
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.');
|
|
47359
|
+
if (reason === null)
|
|
47360
|
+
return;
|
|
47361
|
+
const sdk = await connectOrFail(options.tenant);
|
|
47362
|
+
if (!sdk)
|
|
47363
|
+
return;
|
|
47364
|
+
const [revokeError] = await catchError(sdk.entities.directory.revokeRoles(principalIds));
|
|
47365
|
+
if (revokeError) {
|
|
47366
|
+
return fail("Error revoking roles", await extractErrorMessage(revokeError));
|
|
47367
|
+
}
|
|
47368
|
+
OutputFormatter.success({
|
|
47369
|
+
Result: RESULTS.Success,
|
|
47370
|
+
Code: "DirectoryRolesRevoked",
|
|
47371
|
+
Data: {
|
|
47372
|
+
PrincipalIds: principalIds,
|
|
47373
|
+
Reason: reason
|
|
47374
|
+
}
|
|
47375
|
+
});
|
|
47376
|
+
});
|
|
47377
|
+
};
|
|
47378
|
+
|
|
46730
47379
|
// src/utils/input.ts
|
|
46731
47380
|
init_src();
|
|
46732
47381
|
var STDIN_SENTINEL = "-";
|
|
@@ -46852,8 +47501,8 @@ var ENTITIES_DELETE_EXAMPLES = [
|
|
|
46852
47501
|
];
|
|
46853
47502
|
var ENTITIES_CREATE_EXAMPLES = [
|
|
46854
47503
|
{
|
|
46855
|
-
Description: "Create an entity with choice-set, relationship, and
|
|
46856
|
-
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"}]}'`,
|
|
47504
|
+
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.",
|
|
47505
|
+
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"}]}'`,
|
|
46857
47506
|
Output: {
|
|
46858
47507
|
Code: "EntityCreated",
|
|
46859
47508
|
Data: { ID: "a1b2c3d4-0000-0000-0000-000000000004" }
|
|
@@ -46892,6 +47541,15 @@ function pickKnownUpdateKeys(input) {
|
|
|
46892
47541
|
}
|
|
46893
47542
|
return out;
|
|
46894
47543
|
}
|
|
47544
|
+
function validateFieldsPayload(fields) {
|
|
47545
|
+
return runChecks([
|
|
47546
|
+
() => findInvalidFieldName(fields),
|
|
47547
|
+
() => findUiBrokenFieldType(fields),
|
|
47548
|
+
() => findReferenceFolderKeyOnChoiceSet(fields),
|
|
47549
|
+
() => findMissingComplexFieldExtras(fields),
|
|
47550
|
+
() => findInvalidFieldConstraints(fields)
|
|
47551
|
+
]);
|
|
47552
|
+
}
|
|
46895
47553
|
var registerEntitiesCommand = (program2) => {
|
|
46896
47554
|
const entities = program2.command("entities").description("Browse Data Fabric entity schemas");
|
|
46897
47555
|
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) => {
|
|
@@ -46963,6 +47621,12 @@ var registerEntitiesCommand = (program2) => {
|
|
|
46963
47621
|
if (hasInvalidFieldType(definition.fields)) {
|
|
46964
47622
|
return fail("Invalid field type in fields", `Valid types: ${VALID_FIELD_TYPES_LIST}`);
|
|
46965
47623
|
}
|
|
47624
|
+
const err = runChecks([
|
|
47625
|
+
() => validateName2(name, "entity"),
|
|
47626
|
+
() => validateFieldsPayload(definition.fields)
|
|
47627
|
+
]);
|
|
47628
|
+
if (err)
|
|
47629
|
+
return fail(err.message, err.instructions);
|
|
46966
47630
|
const sdk = await connectOrFail(options.tenant);
|
|
46967
47631
|
if (!sdk)
|
|
46968
47632
|
return;
|
|
@@ -47042,6 +47706,9 @@ var registerEntitiesCommand = (program2) => {
|
|
|
47042
47706
|
if (hasInvalidFieldType(input.addFields)) {
|
|
47043
47707
|
return fail("Invalid field type in addFields", `Valid types: ${VALID_FIELD_TYPES_LIST}`);
|
|
47044
47708
|
}
|
|
47709
|
+
const addErr = validateFieldsPayload(input.addFields);
|
|
47710
|
+
if (addErr)
|
|
47711
|
+
return fail(addErr.message, addErr.instructions);
|
|
47045
47712
|
const addNames = input.addFields.map((f) => f.fieldName);
|
|
47046
47713
|
const duplicateAdd = addNames.find((name, i) => addNames.indexOf(name) !== i);
|
|
47047
47714
|
if (duplicateAdd !== undefined) {
|
|
@@ -47064,6 +47731,9 @@ var registerEntitiesCommand = (program2) => {
|
|
|
47064
47731
|
if (hasInvalidField) {
|
|
47065
47732
|
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}`);
|
|
47066
47733
|
}
|
|
47734
|
+
const updateErr = findIsUniqueInUpdateFields(input.updateFields);
|
|
47735
|
+
if (updateErr)
|
|
47736
|
+
return fail(updateErr.message, updateErr.instructions);
|
|
47067
47737
|
}
|
|
47068
47738
|
const sdk = await connectOrFail(options.tenant);
|
|
47069
47739
|
if (!sdk)
|
|
@@ -47245,9 +47915,28 @@ async function writeFileBinary(filePath, data) {
|
|
|
47245
47915
|
|
|
47246
47916
|
// src/commands/records.ts
|
|
47247
47917
|
init_src();
|
|
47918
|
+
async function loadFileFieldNames(sdk, entityId, folderKey) {
|
|
47919
|
+
const names = new Set;
|
|
47920
|
+
if (!sdk)
|
|
47921
|
+
return names;
|
|
47922
|
+
const [schemaErr, entity] = await catchError(sdk.entities.getById(entityId, folderKey !== undefined ? { folderKey } : undefined));
|
|
47923
|
+
if (schemaErr)
|
|
47924
|
+
return names;
|
|
47925
|
+
const rec = entity;
|
|
47926
|
+
const fieldList = rec.fields ?? rec.Fields ?? [];
|
|
47927
|
+
for (const f of fieldList) {
|
|
47928
|
+
const dataType = f.fieldDataType ?? f.FieldDataType;
|
|
47929
|
+
const typeName = dataType?.name ?? dataType?.Name;
|
|
47930
|
+
const fieldName = typeof f.name === "string" ? f.name : typeof f.Name === "string" ? f.Name : undefined;
|
|
47931
|
+
if (typeName === "FILE" && fieldName !== undefined) {
|
|
47932
|
+
names.add(fieldName);
|
|
47933
|
+
}
|
|
47934
|
+
}
|
|
47935
|
+
return names;
|
|
47936
|
+
}
|
|
47248
47937
|
var RECORDS_LIST_EXAMPLES = [
|
|
47249
47938
|
{
|
|
47250
|
-
Description: "List records in an entity.",
|
|
47939
|
+
Description: "List records in an entity. MULTILINE_MAX fields return a size marker (see 'notes' below) — full value via 'records get'.",
|
|
47251
47940
|
Command: "uip df records list a1b2c3d4-0000-0000-0000-000000000001 --limit 2",
|
|
47252
47941
|
Output: {
|
|
47253
47942
|
Code: "RecordList",
|
|
@@ -47255,11 +47944,13 @@ var RECORDS_LIST_EXAMPLES = [
|
|
|
47255
47944
|
items: [
|
|
47256
47945
|
{
|
|
47257
47946
|
Id: "b2c3d4e5-0000-0000-0000-000000000001",
|
|
47258
|
-
amount: 1500
|
|
47947
|
+
amount: 1500,
|
|
47948
|
+
notes: "HasValue=true Length=20000"
|
|
47259
47949
|
},
|
|
47260
47950
|
{
|
|
47261
47951
|
Id: "b2c3d4e5-0000-0000-0000-000000000002",
|
|
47262
|
-
amount: 2750
|
|
47952
|
+
amount: 2750,
|
|
47953
|
+
notes: null
|
|
47263
47954
|
}
|
|
47264
47955
|
],
|
|
47265
47956
|
totalCount: 2,
|
|
@@ -47270,14 +47961,15 @@ var RECORDS_LIST_EXAMPLES = [
|
|
|
47270
47961
|
];
|
|
47271
47962
|
var RECORDS_GET_EXAMPLES = [
|
|
47272
47963
|
{
|
|
47273
|
-
Description: "Get a record by ID",
|
|
47964
|
+
Description: "Get a record by ID. Returns MULTILINE_MAX fields in full (see 'notes' below).",
|
|
47274
47965
|
Command: "uip df records get a1b2c3d4-0000-0000-0000-000000000001 b2c3d4e5-0000-0000-0000-000000000001",
|
|
47275
47966
|
Output: {
|
|
47276
47967
|
Code: "RecordDetails",
|
|
47277
47968
|
Data: {
|
|
47278
47969
|
Id: "b2c3d4e5-0000-0000-0000-000000000001",
|
|
47279
47970
|
amount: 1500,
|
|
47280
|
-
status: "Paid"
|
|
47971
|
+
status: "Paid",
|
|
47972
|
+
notes: "Customer disputed the Q1 late fee. Timeline of the case: … (the complete 20,000-character text, returned in full)"
|
|
47281
47973
|
}
|
|
47282
47974
|
}
|
|
47283
47975
|
}
|
|
@@ -47437,6 +48129,10 @@ var registerRecordsCommand = (program2) => {
|
|
|
47437
48129
|
const data = rawData;
|
|
47438
48130
|
const recordsList = Array.isArray(data) ? data : [data];
|
|
47439
48131
|
const folderOptions = options.folderKey !== undefined ? { folderKey: options.folderKey } : undefined;
|
|
48132
|
+
const fileNames = await loadFileFieldNames(sdk, entityId, options.folderKey);
|
|
48133
|
+
const fileErr = findFilePayloadKeys(recordsList, fileNames);
|
|
48134
|
+
if (fileErr)
|
|
48135
|
+
return fail(fileErr.message, fileErr.instructions);
|
|
47440
48136
|
if (recordsList.length === 1) {
|
|
47441
48137
|
const [insertError, result] = await catchError(sdk.entities.insertRecordById(entityId, recordsList[0], folderOptions));
|
|
47442
48138
|
if (insertError) {
|
|
@@ -47480,6 +48176,10 @@ var registerRecordsCommand = (program2) => {
|
|
|
47480
48176
|
const data = rawData;
|
|
47481
48177
|
const recordsList = Array.isArray(data) ? data : [data];
|
|
47482
48178
|
const folderOptions = options.folderKey !== undefined ? { folderKey: options.folderKey } : undefined;
|
|
48179
|
+
const fileNames = await loadFileFieldNames(sdk, entityId, options.folderKey);
|
|
48180
|
+
const fileErr = findFilePayloadKeys(recordsList, fileNames);
|
|
48181
|
+
if (fileErr)
|
|
48182
|
+
return fail(fileErr.message, fileErr.instructions);
|
|
47483
48183
|
if (recordsList.length === 1) {
|
|
47484
48184
|
const record = recordsList[0];
|
|
47485
48185
|
const recordId = record.Id !== undefined ? record.Id : record.id;
|
|
@@ -47547,6 +48247,9 @@ var registerRecordsCommand = (program2) => {
|
|
|
47547
48247
|
return fail("Query options must be a JSON object", "Provide a JSON object (not an array) with filterGroup, selectedFields, sortOptions, aggregates, or groupBy.");
|
|
47548
48248
|
}
|
|
47549
48249
|
queryBody = parsed;
|
|
48250
|
+
const filterErr = validateQueryFilter(queryBody.filterGroup);
|
|
48251
|
+
if (filterErr)
|
|
48252
|
+
return fail(filterErr.message, filterErr.instructions);
|
|
47550
48253
|
}
|
|
47551
48254
|
const sdk = await connectOrFail(options.tenant);
|
|
47552
48255
|
if (!sdk)
|
|
@@ -47637,6 +48340,47 @@ async function resolveJsonInput(filePath, inlineBody) {
|
|
|
47637
48340
|
return parsed;
|
|
47638
48341
|
}
|
|
47639
48342
|
|
|
48343
|
+
// src/commands/roles.ts
|
|
48344
|
+
var ROLES_LIST_EXAMPLES = [
|
|
48345
|
+
{
|
|
48346
|
+
Description: "List Data Fabric access roles.",
|
|
48347
|
+
Command: "uip df roles list",
|
|
48348
|
+
Output: {
|
|
48349
|
+
Code: "RoleList",
|
|
48350
|
+
Data: [
|
|
48351
|
+
{
|
|
48352
|
+
Id: "c1d2e3f4-0000-0000-0000-000000000001",
|
|
48353
|
+
Name: "DataWriter",
|
|
48354
|
+
Type: "System",
|
|
48355
|
+
DirectoryEntityCount: 3
|
|
48356
|
+
}
|
|
48357
|
+
]
|
|
48358
|
+
}
|
|
48359
|
+
}
|
|
48360
|
+
];
|
|
48361
|
+
var registerRolesCommand = (program2) => {
|
|
48362
|
+
const roles = program2.command("roles", { hidden: true }).description("Manage Data Fabric access roles");
|
|
48363
|
+
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) => {
|
|
48364
|
+
const sdk = await connectOrFail(options.tenant);
|
|
48365
|
+
if (!sdk)
|
|
48366
|
+
return;
|
|
48367
|
+
const [listError, result] = await catchError(sdk.entities.roles.getAll({
|
|
48368
|
+
stats: options.stats,
|
|
48369
|
+
...options.folderKey !== undefined && {
|
|
48370
|
+
folderKey: options.folderKey
|
|
48371
|
+
}
|
|
48372
|
+
}));
|
|
48373
|
+
if (listError) {
|
|
48374
|
+
return fail("Error listing roles", await extractErrorMessage(listError));
|
|
48375
|
+
}
|
|
48376
|
+
OutputFormatter.success({
|
|
48377
|
+
Result: RESULTS.Success,
|
|
48378
|
+
Code: "RoleList",
|
|
48379
|
+
Data: result ?? []
|
|
48380
|
+
});
|
|
48381
|
+
});
|
|
48382
|
+
};
|
|
48383
|
+
|
|
47640
48384
|
// src/tool.ts
|
|
47641
48385
|
var metadata = {
|
|
47642
48386
|
name: "data-fabric-tool",
|
|
@@ -47650,10 +48394,12 @@ var registerCommands = async (program2) => {
|
|
|
47650
48394
|
registerFilesCommand(program2);
|
|
47651
48395
|
registerChoiceSetsCommand(program2);
|
|
47652
48396
|
registerChoiceSetValuesCommand(program2);
|
|
48397
|
+
registerRolesCommand(program2);
|
|
48398
|
+
registerDirectoryCommand(program2);
|
|
47653
48399
|
};
|
|
47654
48400
|
export {
|
|
47655
48401
|
registerCommands,
|
|
47656
48402
|
metadata
|
|
47657
48403
|
};
|
|
47658
48404
|
|
|
47659
|
-
//# debugId=
|
|
48405
|
+
//# debugId=6B8EB9441584971764756E2164756E21
|