@uipath/conversational-tool 1.204.0-preview.254 → 1.205.0-preview.256
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/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/{cas-client-d8d4c2bj.js → cas-client-x6tjfhak.js} +1 -1
- package/dist/{index-a3nybs0a.js → index-nr509xjn.js} +266 -50
- package/dist/index.js +2 -2
- package/dist/{tool-wcc6v32y.js → tool-bhzct5mh.js} +1289 -529
- package/dist/{tool-zvj2kzp0.js → tool-p67st6tv.js} +142 -30
- package/dist/tool.js +2 -2
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ those licences require.
|
|
|
15
15
|
- @opentelemetry/semantic-conventions@1.43.0 — Apache-2.0
|
|
16
16
|
- @socket.io/component-emitter@3.1.2 — MIT
|
|
17
17
|
- @uipath/core-telemetry@1.0.0-beta.3 — MIT
|
|
18
|
-
- @uipath/uipath-typescript@1.
|
|
18
|
+
- @uipath/uipath-typescript@1.8.0 — MIT
|
|
19
19
|
- bundle-name@4.1.0 — MIT
|
|
20
20
|
- commander@14.0.3 — MIT
|
|
21
21
|
- debug@4.4.3 — MIT
|
|
@@ -1347,7 +1347,7 @@ applies, with copyright held by the package's authors.
|
|
|
1347
1347
|
|
|
1348
1348
|
---
|
|
1349
1349
|
|
|
1350
|
-
## @uipath/uipath-typescript@1.
|
|
1350
|
+
## @uipath/uipath-typescript@1.8.0
|
|
1351
1351
|
|
|
1352
1352
|
Copyright notices from the source file headers, which the
|
|
1353
1353
|
bundle does not keep:
|
|
@@ -7833,48 +7833,283 @@ class PaginationHelpers {
|
|
|
7833
7833
|
});
|
|
7834
7834
|
}
|
|
7835
7835
|
}
|
|
7836
|
-
|
|
7836
|
+
var UiPathMetaTags;
|
|
7837
|
+
(function(UiPathMetaTags2) {
|
|
7838
|
+
UiPathMetaTags2["CLIENT_ID"] = "uipath:client-id";
|
|
7839
|
+
UiPathMetaTags2["SCOPE"] = "uipath:scope";
|
|
7840
|
+
UiPathMetaTags2["ORG_NAME"] = "uipath:org-name";
|
|
7841
|
+
UiPathMetaTags2["ORG_ID"] = "uipath:org-id";
|
|
7842
|
+
UiPathMetaTags2["TENANT_NAME"] = "uipath:tenant-name";
|
|
7843
|
+
UiPathMetaTags2["BASE_URL"] = "uipath:base-url";
|
|
7844
|
+
UiPathMetaTags2["REDIRECT_URI"] = "uipath:redirect-uri";
|
|
7845
|
+
UiPathMetaTags2["CDN_BASE"] = "uipath:cdn-base";
|
|
7846
|
+
UiPathMetaTags2["APP_BASE"] = "uipath:app-base";
|
|
7847
|
+
UiPathMetaTags2["FOLDER_KEY"] = "uipath:folder-key";
|
|
7848
|
+
})(UiPathMetaTags || (UiPathMetaTags = {}));
|
|
7849
|
+
var UiPathElementIds;
|
|
7850
|
+
(function(UiPathElementIds2) {
|
|
7851
|
+
UiPathElementIds2["RESOURCE_OVERRIDES"] = "uipath-overrides";
|
|
7852
|
+
})(UiPathElementIds || (UiPathElementIds = {}));
|
|
7853
|
+
function missingConfigMessage(found, context) {
|
|
7837
7854
|
if (isBrowser) {
|
|
7838
7855
|
return "UiPath SDK configuration not found. " + "Ensure @uipath/coded-apps plugin is set up in your bundler to inject configuration during development and build.";
|
|
7839
7856
|
}
|
|
7840
|
-
|
|
7857
|
+
const guidance = "In a UiPath coded function, pass the handler context: new UiPath(ctx). " + "Otherwise pass { baseUrl, orgName, tenantName, secret }, " + "or set UIPATH_BASE_URL, UIPATH_ORG_NAME, UIPATH_TENANT_NAME and UIPATH_ACCESS_TOKEN.";
|
|
7858
|
+
return `UiPath SDK configuration not found. ${guidance}`;
|
|
7841
7859
|
}
|
|
7860
|
+
UiPathMetaTags.CLIENT_ID, UiPathMetaTags.REDIRECT_URI, UiPathMetaTags.SCOPE;
|
|
7861
|
+
var BASE64URL_DASH_RE = /-/g;
|
|
7862
|
+
var BASE64URL_UNDERSCORE_RE = /_/g;
|
|
7863
|
+
function base64UrlToBase64(value2) {
|
|
7864
|
+
const base64 = value2.replace(BASE64URL_DASH_RE, "+").replace(BASE64URL_UNDERSCORE_RE, "/");
|
|
7865
|
+
return base64.padEnd(base64.length + (4 - base64.length % 4) % 4, "=");
|
|
7866
|
+
}
|
|
7867
|
+
function decodeJwtClaims(token) {
|
|
7868
|
+
try {
|
|
7869
|
+
const payload = token?.split(".")[1];
|
|
7870
|
+
if (!payload) {
|
|
7871
|
+
return;
|
|
7872
|
+
}
|
|
7873
|
+
return JSON.parse(decodeBase64(base64UrlToBase64(payload)));
|
|
7874
|
+
} catch {
|
|
7875
|
+
return;
|
|
7876
|
+
}
|
|
7877
|
+
}
|
|
7878
|
+
var IDENTITY_BASE = "identity_";
|
|
7879
|
+
var AUTOPILOT_BASE = "autopilotforeveryone_";
|
|
7880
|
+
var API_VERSION = "v1";
|
|
7881
|
+
var CONVERSATION_ENDPOINTS = {
|
|
7882
|
+
LIST: `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation`,
|
|
7883
|
+
CREATE: `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation`,
|
|
7884
|
+
GET: (id) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${id}`,
|
|
7885
|
+
UPDATE: (id) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${id}`,
|
|
7886
|
+
DELETE: (id) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${id}`
|
|
7887
|
+
};
|
|
7888
|
+
var EXCHANGE_ENDPOINTS = {
|
|
7889
|
+
LIST: (conversationId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange`,
|
|
7890
|
+
GET: (conversationId, exchangeId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange/${exchangeId}`,
|
|
7891
|
+
CREATE_FEEDBACK: (conversationId, exchangeId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange/${exchangeId}/feedback`
|
|
7892
|
+
};
|
|
7893
|
+
var MESSAGE_ENDPOINTS = {
|
|
7894
|
+
GET: (conversationId, exchangeId, messageId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange/${exchangeId}/message/${messageId}`,
|
|
7895
|
+
GET_CONTENT_PART: (conversationId, exchangeId, messageId, contentPartId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange/${exchangeId}/message/${messageId}/contentPart/${contentPartId}`
|
|
7896
|
+
};
|
|
7897
|
+
var ATTACHMENT_ENDPOINTS = {
|
|
7898
|
+
CREATE: (conversationId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/attachment`
|
|
7899
|
+
};
|
|
7900
|
+
var AGENT_ENDPOINTS = {
|
|
7901
|
+
LIST: `${AUTOPILOT_BASE}/api/${API_VERSION}/agent`,
|
|
7902
|
+
GET: (folderId, agentId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/agent/${folderId}/${agentId}`,
|
|
7903
|
+
CONNECTIONS: (folderId, agentId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/agent/${folderId}/${agentId}/connections`,
|
|
7904
|
+
CONNECTION_AUTH: `${AUTOPILOT_BASE}/api/${API_VERSION}/agent/connections/auth`
|
|
7905
|
+
};
|
|
7906
|
+
var USER_ENDPOINTS = {
|
|
7907
|
+
SETTINGS: `${AUTOPILOT_BASE}/api/${API_VERSION}/user/settings`
|
|
7908
|
+
};
|
|
7909
|
+
var FEATURE_ENDPOINTS = {
|
|
7910
|
+
FEATURE_FLAGS: `${AUTOPILOT_BASE}/api/utility/feature-flags`
|
|
7911
|
+
};
|
|
7912
|
+
var IDENTITY_ENDPOINTS = {
|
|
7913
|
+
AUTHORIZE: `${IDENTITY_BASE}/connect/authorize`
|
|
7914
|
+
};
|
|
7915
|
+
var _OrganizationIdResolver_instances;
|
|
7916
|
+
var _OrganizationIdResolver_organizationId;
|
|
7917
|
+
var _OrganizationIdResolver_resolve;
|
|
7918
|
+
var GUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
7919
|
+
var DASH_REGEX = /-/g;
|
|
7920
|
+
var UNDERSCORE_REGEX = /_/g;
|
|
7921
|
+
var WHITESPACE_REGEX = /\s+/g;
|
|
7922
|
+
var ORGANIZATION_LOOKUP_CLIENT_ID = "1119a927-10ab-4543-bd1a-ad6bfbbc27f4";
|
|
7923
|
+
var ORGANIZATION_LOOKUP_REDIRECT_PATH = "portal_/api/tokenFactory/callback";
|
|
7924
|
+
var UNREGISTERED_ORGANIZATION_PATH = "/portal_/unregistered";
|
|
7925
|
+
var TENANT_ACR_PREFIX = "tenant:";
|
|
7926
|
+
var MAX_REDIRECT_HOPS = 3;
|
|
7927
|
+
var IDENTITY_ERROR_ID_PARAM = "errorId";
|
|
7928
|
+
var IDENTITY_ERROR_CODE_PARAM = "errorCode";
|
|
7929
|
+
var BODY_SNIPPET_LENGTH = 160;
|
|
7930
|
+
var CONFIG_HINT = "Set `organizationId` in the SDK configuration.";
|
|
7931
|
+
function isAuthorizeRequest(url2) {
|
|
7932
|
+
return url2.pathname.endsWith(`/${IDENTITY_ENDPOINTS.AUTHORIZE}`);
|
|
7933
|
+
}
|
|
7934
|
+
function withoutQuery(url2) {
|
|
7935
|
+
const parsed = new URL(url2);
|
|
7936
|
+
return `${parsed.origin}${parsed.pathname}`;
|
|
7937
|
+
}
|
|
7938
|
+
function readIdentityError(url2) {
|
|
7939
|
+
const errorId = url2.searchParams.get(IDENTITY_ERROR_ID_PARAM);
|
|
7940
|
+
if (errorId) {
|
|
7941
|
+
try {
|
|
7942
|
+
const base64 = errorId.replace(DASH_REGEX, "+").replace(UNDERSCORE_REGEX, "/");
|
|
7943
|
+
const json = decodeBase64(base64.padEnd(base64.length + (4 - base64.length % 4) % 4, "="));
|
|
7944
|
+
const data = JSON.parse(json).Data;
|
|
7945
|
+
const error = typeof data?.Error === "string" ? data.Error : undefined;
|
|
7946
|
+
const description = typeof data?.ErrorDescription === "string" ? data.ErrorDescription : undefined;
|
|
7947
|
+
if (error) {
|
|
7948
|
+
return description ? `${error} (${description})` : error;
|
|
7949
|
+
}
|
|
7950
|
+
} catch {
|
|
7951
|
+
return url2.searchParams.get(IDENTITY_ERROR_CODE_PARAM) ?? undefined;
|
|
7952
|
+
}
|
|
7953
|
+
}
|
|
7954
|
+
return url2.searchParams.get(IDENTITY_ERROR_CODE_PARAM) ?? undefined;
|
|
7955
|
+
}
|
|
7956
|
+
async function describeResponse(response) {
|
|
7957
|
+
const body = (await response.text().catch(() => "")).replace(WHITESPACE_REGEX, " ").trim();
|
|
7958
|
+
return body ? `HTTP ${response.status}: ${body.slice(0, BODY_SNIPPET_LENGTH)}` : `HTTP ${response.status}`;
|
|
7959
|
+
}
|
|
7960
|
+
function randomUrlSafeToken() {
|
|
7961
|
+
return `${crypto.randomUUID()}${crypto.randomUUID()}`.replace(DASH_REGEX, "");
|
|
7962
|
+
}
|
|
7963
|
+
function tracingHeaders() {
|
|
7964
|
+
const traceId = crypto.randomUUID().replace(DASH_REGEX, "");
|
|
7965
|
+
const spanId = crypto.randomUUID().replace(DASH_REGEX, "").slice(0, 16);
|
|
7966
|
+
const traceparent = `00-${traceId}-${spanId}-01`;
|
|
7967
|
+
return { [TRACEPARENT]: traceparent, [UIPATH_TRACEPARENT_ID]: traceparent };
|
|
7968
|
+
}
|
|
7969
|
+
function buildAuthorizeUrl(baseUrl, orgName) {
|
|
7970
|
+
const params = new URLSearchParams({
|
|
7971
|
+
response_type: "code",
|
|
7972
|
+
client_id: ORGANIZATION_LOOKUP_CLIENT_ID,
|
|
7973
|
+
redirect_uri: `${baseUrl}/${ORGANIZATION_LOOKUP_REDIRECT_PATH}`,
|
|
7974
|
+
scope: "openid",
|
|
7975
|
+
code_challenge: randomUrlSafeToken(),
|
|
7976
|
+
code_challenge_method: "S256",
|
|
7977
|
+
state: randomUrlSafeToken(),
|
|
7978
|
+
acr_values: `tenantName:${orgName}`
|
|
7979
|
+
});
|
|
7980
|
+
return `${baseUrl}/${IDENTITY_ENDPOINTS.AUTHORIZE}?${params.toString()}`;
|
|
7981
|
+
}
|
|
7982
|
+
function extractOrganizationId(location2) {
|
|
7983
|
+
const acrValues = [location2.searchParams.get("acr_values")];
|
|
7984
|
+
const returnUrl = location2.searchParams.get("returnUrl");
|
|
7985
|
+
if (returnUrl) {
|
|
7986
|
+
acrValues.push(new URL(returnUrl, location2.origin).searchParams.get("acr_values"));
|
|
7987
|
+
}
|
|
7988
|
+
for (const acr of acrValues) {
|
|
7989
|
+
for (const token of acr?.split(" ") ?? []) {
|
|
7990
|
+
if (token.startsWith(TENANT_ACR_PREFIX)) {
|
|
7991
|
+
const candidate = token.slice(TENANT_ACR_PREFIX.length);
|
|
7992
|
+
if (GUID_REGEX.test(candidate)) {
|
|
7993
|
+
return candidate;
|
|
7994
|
+
}
|
|
7995
|
+
}
|
|
7996
|
+
}
|
|
7997
|
+
}
|
|
7998
|
+
return;
|
|
7999
|
+
}
|
|
8000
|
+
async function lookupOrganizationIdForPat(baseUrl, orgName) {
|
|
8001
|
+
let url2 = buildAuthorizeUrl(baseUrl, orgName);
|
|
8002
|
+
for (let hop = 0;hop < MAX_REDIRECT_HOPS; hop++) {
|
|
8003
|
+
const response = await fetchWithRetry(url2, { redirect: "manual", headers: tracingHeaders() }, { retry: DEFAULT_RETRY_OPTIONS });
|
|
8004
|
+
const location2 = response.headers.get("location");
|
|
8005
|
+
if (!location2) {
|
|
8006
|
+
throw new ValidationError({
|
|
8007
|
+
message: `Could not resolve the organization id for '${orgName}': Identity answered ` + `${await describeResponse(response)} instead of redirecting. ${CONFIG_HINT}`
|
|
8008
|
+
});
|
|
8009
|
+
}
|
|
8010
|
+
const target = new URL(location2, url2);
|
|
8011
|
+
const organizationId = extractOrganizationId(target);
|
|
8012
|
+
if (organizationId) {
|
|
8013
|
+
return organizationId;
|
|
8014
|
+
}
|
|
8015
|
+
if (target.pathname.startsWith(UNREGISTERED_ORGANIZATION_PATH)) {
|
|
8016
|
+
throw new ValidationError({ message: `Organization '${orgName}' was not found at ${baseUrl}.` });
|
|
8017
|
+
}
|
|
8018
|
+
const identityError = readIdentityError(target);
|
|
8019
|
+
if (identityError) {
|
|
8020
|
+
throw new ValidationError({
|
|
8021
|
+
message: `Could not resolve the organization id for '${orgName}': Identity rejected the lookup ` + `with ${identityError}. ${CONFIG_HINT}`
|
|
8022
|
+
});
|
|
8023
|
+
}
|
|
8024
|
+
url2 = isAuthorizeRequest(target) ? buildAuthorizeUrl(target.origin, orgName) : target.toString();
|
|
8025
|
+
}
|
|
8026
|
+
throw new ValidationError({
|
|
8027
|
+
message: `Could not resolve the organization id for '${orgName}': gave up after ${MAX_REDIRECT_HOPS} ` + `redirects (last: ${withoutQuery(url2)}). ${CONFIG_HINT}`
|
|
8028
|
+
});
|
|
8029
|
+
}
|
|
8030
|
+
|
|
8031
|
+
class OrganizationIdResolver {
|
|
8032
|
+
constructor(config, tokenManager) {
|
|
8033
|
+
_OrganizationIdResolver_instances.add(this);
|
|
8034
|
+
this.config = config;
|
|
8035
|
+
this.tokenManager = tokenManager;
|
|
8036
|
+
_OrganizationIdResolver_organizationId.set(this, undefined);
|
|
8037
|
+
}
|
|
8038
|
+
resolve() {
|
|
8039
|
+
if (!__classPrivateFieldGet(this, _OrganizationIdResolver_organizationId, "f")) {
|
|
8040
|
+
__classPrivateFieldSet(this, _OrganizationIdResolver_organizationId, __classPrivateFieldGet(this, _OrganizationIdResolver_instances, "m", _OrganizationIdResolver_resolve).call(this).catch((error) => {
|
|
8041
|
+
__classPrivateFieldSet(this, _OrganizationIdResolver_organizationId, undefined, "f");
|
|
8042
|
+
throw error;
|
|
8043
|
+
}), "f");
|
|
8044
|
+
}
|
|
8045
|
+
return __classPrivateFieldGet(this, _OrganizationIdResolver_organizationId, "f");
|
|
8046
|
+
}
|
|
8047
|
+
}
|
|
8048
|
+
_OrganizationIdResolver_organizationId = new WeakMap, _OrganizationIdResolver_instances = new WeakSet, _OrganizationIdResolver_resolve = async function _OrganizationIdResolver_resolve2() {
|
|
8049
|
+
const { organizationId, orgName, baseUrl } = this.config;
|
|
8050
|
+
if (organizationId) {
|
|
8051
|
+
return organizationId;
|
|
8052
|
+
}
|
|
8053
|
+
if (GUID_REGEX.test(orgName)) {
|
|
8054
|
+
return orgName;
|
|
8055
|
+
}
|
|
8056
|
+
const claimed = decodeJwtClaims(this.tokenManager.getToken())?.prt_id;
|
|
8057
|
+
if (typeof claimed === "string" && GUID_REGEX.test(claimed)) {
|
|
8058
|
+
return claimed;
|
|
8059
|
+
}
|
|
8060
|
+
return lookupOrganizationIdForPat(baseUrl, orgName);
|
|
8061
|
+
};
|
|
7842
8062
|
var REGISTRY_KEY = Symbol.for("@uipath/sdk-internals-registry");
|
|
8063
|
+
var UNCONFIGURED_KEY = Symbol.for("@uipath/sdk-unconfigured-reason");
|
|
8064
|
+
var globalStores = () => globalThis;
|
|
7843
8065
|
var getGlobalStore = () => {
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
8066
|
+
var _a;
|
|
8067
|
+
return (_a = globalStores())[REGISTRY_KEY] ?? (_a[REGISTRY_KEY] = new WeakMap);
|
|
8068
|
+
};
|
|
8069
|
+
var getUnconfiguredStore = () => {
|
|
8070
|
+
var _a;
|
|
8071
|
+
return (_a = globalStores())[UNCONFIGURED_KEY] ?? (_a[UNCONFIGURED_KEY] = new WeakMap);
|
|
7849
8072
|
};
|
|
7850
8073
|
var looksLikeUiPath = (instance) => typeof instance.initialize === "function";
|
|
7851
8074
|
|
|
7852
8075
|
class SDKInternalsRegistry {
|
|
7853
|
-
static get store() {
|
|
7854
|
-
return getGlobalStore();
|
|
7855
|
-
}
|
|
7856
8076
|
static set(instance, internals) {
|
|
7857
8077
|
this.store.set(instance, internals);
|
|
7858
8078
|
}
|
|
8079
|
+
static setUnconfigured(instance, reason) {
|
|
8080
|
+
this.unconfigured.set(instance, reason);
|
|
8081
|
+
}
|
|
7859
8082
|
static get(instance) {
|
|
7860
8083
|
const internals = this.store.get(instance);
|
|
7861
8084
|
if (!internals) {
|
|
7862
|
-
|
|
7863
|
-
|
|
8085
|
+
const reason = this.unconfigured.get(instance);
|
|
8086
|
+
if (reason !== undefined || looksLikeUiPath(instance)) {
|
|
8087
|
+
throw new Error("Cannot create a service: the UiPath instance was never configured. " + (reason ?? missingConfigMessage()));
|
|
7864
8088
|
}
|
|
7865
8089
|
throw new Error("Invalid SDK instance. Make sure to pass a valid UiPath instance to the service constructor.");
|
|
7866
8090
|
}
|
|
7867
8091
|
return internals;
|
|
7868
8092
|
}
|
|
8093
|
+
static getOrganizationIdResolver(instance) {
|
|
8094
|
+
const internals = this.get(instance);
|
|
8095
|
+
internals.organizationIdResolver ?? (internals.organizationIdResolver = new OrganizationIdResolver(internals.config, internals.tokenManager));
|
|
8096
|
+
return internals.organizationIdResolver;
|
|
8097
|
+
}
|
|
8098
|
+
static get store() {
|
|
8099
|
+
return getGlobalStore();
|
|
8100
|
+
}
|
|
8101
|
+
static get unconfigured() {
|
|
8102
|
+
return getUnconfiguredStore();
|
|
8103
|
+
}
|
|
7869
8104
|
}
|
|
7870
8105
|
var _BaseService_apiClient;
|
|
7871
8106
|
|
|
7872
8107
|
class BaseService {
|
|
7873
8108
|
constructor(instance, headers) {
|
|
7874
8109
|
_BaseService_apiClient.set(this, undefined);
|
|
7875
|
-
const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
|
|
8110
|
+
const { config, context, tokenManager, folderKey, metaFolderKey } = SDKInternalsRegistry.get(instance);
|
|
7876
8111
|
__classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
|
|
7877
|
-
this.config = { folderKey };
|
|
8112
|
+
this.config = { folderKey, metaFolderKey };
|
|
7878
8113
|
}
|
|
7879
8114
|
async getValidAuthToken() {
|
|
7880
8115
|
return __classPrivateFieldGet(this, _BaseService_apiClient, "f").getValidToken();
|
|
@@ -7963,7 +8198,7 @@ class BaseService {
|
|
|
7963
8198
|
limitedPageSize = getLimitedPageSize(params.pageSize);
|
|
7964
8199
|
const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
|
|
7965
8200
|
const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
|
|
7966
|
-
const countParam = paginationParams
|
|
8201
|
+
const countParam = paginationParams && "countParam" in paginationParams ? paginationParams.countParam : ODATA_OFFSET_PARAMS.COUNT_PARAM;
|
|
7967
8202
|
const convertToSkip = paginationParams?.convertToSkip ?? true;
|
|
7968
8203
|
const zeroBased = paginationParams?.zeroBased ?? false;
|
|
7969
8204
|
requestParams[pageSizeParam] = limitedPageSize;
|
|
@@ -7975,7 +8210,7 @@ class BaseService {
|
|
|
7975
8210
|
const sdkPageNumber = params.pageNumber || 1;
|
|
7976
8211
|
requestParams[offsetParam] = zeroBased ? sdkPageNumber - 1 : sdkPageNumber;
|
|
7977
8212
|
}
|
|
7978
|
-
{
|
|
8213
|
+
if (countParam) {
|
|
7979
8214
|
requestParams[countParam] = true;
|
|
7980
8215
|
}
|
|
7981
8216
|
break;
|
|
@@ -8185,6 +8420,20 @@ var AgentMap = {
|
|
|
8185
8420
|
var UserSettingsMap = {
|
|
8186
8421
|
...CommonFieldMap
|
|
8187
8422
|
};
|
|
8423
|
+
var JobState;
|
|
8424
|
+
(function(JobState2) {
|
|
8425
|
+
JobState2["Pending"] = "Pending";
|
|
8426
|
+
JobState2["Running"] = "Running";
|
|
8427
|
+
JobState2["Stopping"] = "Stopping";
|
|
8428
|
+
JobState2["Terminating"] = "Terminating";
|
|
8429
|
+
JobState2["Faulted"] = "Faulted";
|
|
8430
|
+
JobState2["Successful"] = "Successful";
|
|
8431
|
+
JobState2["Stopped"] = "Stopped";
|
|
8432
|
+
JobState2["Suspended"] = "Suspended";
|
|
8433
|
+
JobState2["Resumed"] = "Resumed";
|
|
8434
|
+
JobState2["Cancelled"] = "Cancelled";
|
|
8435
|
+
JobState2["Unknown"] = "Unknown";
|
|
8436
|
+
})(JobState || (JobState = {}));
|
|
8188
8437
|
var ConnectionState;
|
|
8189
8438
|
(function(ConnectionState2) {
|
|
8190
8439
|
ConnectionState2["Enabled"] = "Enabled";
|
|
@@ -8195,39 +8444,6 @@ var ConnectionState;
|
|
|
8195
8444
|
var ConnectionAuthMap = {
|
|
8196
8445
|
expiresAt: "expiresTime"
|
|
8197
8446
|
};
|
|
8198
|
-
var AUTOPILOT_BASE = "autopilotforeveryone_";
|
|
8199
|
-
var API_VERSION = "v1";
|
|
8200
|
-
var CONVERSATION_ENDPOINTS = {
|
|
8201
|
-
LIST: `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation`,
|
|
8202
|
-
CREATE: `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation`,
|
|
8203
|
-
GET: (id) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${id}`,
|
|
8204
|
-
UPDATE: (id) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${id}`,
|
|
8205
|
-
DELETE: (id) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${id}`
|
|
8206
|
-
};
|
|
8207
|
-
var EXCHANGE_ENDPOINTS = {
|
|
8208
|
-
LIST: (conversationId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange`,
|
|
8209
|
-
GET: (conversationId, exchangeId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange/${exchangeId}`,
|
|
8210
|
-
CREATE_FEEDBACK: (conversationId, exchangeId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange/${exchangeId}/feedback`
|
|
8211
|
-
};
|
|
8212
|
-
var MESSAGE_ENDPOINTS = {
|
|
8213
|
-
GET: (conversationId, exchangeId, messageId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange/${exchangeId}/message/${messageId}`,
|
|
8214
|
-
GET_CONTENT_PART: (conversationId, exchangeId, messageId, contentPartId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/exchange/${exchangeId}/message/${messageId}/contentPart/${contentPartId}`
|
|
8215
|
-
};
|
|
8216
|
-
var ATTACHMENT_ENDPOINTS = {
|
|
8217
|
-
CREATE: (conversationId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/conversation/${conversationId}/attachment`
|
|
8218
|
-
};
|
|
8219
|
-
var AGENT_ENDPOINTS = {
|
|
8220
|
-
LIST: `${AUTOPILOT_BASE}/api/${API_VERSION}/agent`,
|
|
8221
|
-
GET: (folderId, agentId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/agent/${folderId}/${agentId}`,
|
|
8222
|
-
CONNECTIONS: (folderId, agentId) => `${AUTOPILOT_BASE}/api/${API_VERSION}/agent/${folderId}/${agentId}/connections`,
|
|
8223
|
-
CONNECTION_AUTH: `${AUTOPILOT_BASE}/api/${API_VERSION}/agent/connections/auth`
|
|
8224
|
-
};
|
|
8225
|
-
var USER_ENDPOINTS = {
|
|
8226
|
-
SETTINGS: `${AUTOPILOT_BASE}/api/${API_VERSION}/user/settings`
|
|
8227
|
-
};
|
|
8228
|
-
var FEATURE_ENDPOINTS = {
|
|
8229
|
-
FEATURE_FLAGS: `${AUTOPILOT_BASE}/api/utility/feature-flags`
|
|
8230
|
-
};
|
|
8231
8447
|
|
|
8232
8448
|
class ConversationEventValidationError extends Error {
|
|
8233
8449
|
}
|
|
@@ -11051,4 +11267,4 @@ export {
|
|
|
11051
11267
|
transformMessage
|
|
11052
11268
|
};
|
|
11053
11269
|
|
|
11054
|
-
//# debugId=
|
|
11270
|
+
//# debugId=82FA92620D258D7364756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
metadata,
|
|
4
4
|
registerCommands
|
|
5
|
-
} from "./tool-
|
|
5
|
+
} from "./tool-bhzct5mh.js";
|
|
6
6
|
import"./tool-nkyhbf79.js";
|
|
7
7
|
import {
|
|
8
8
|
Command
|
|
9
|
-
} from "./tool-
|
|
9
|
+
} from "./tool-p67st6tv.js";
|
|
10
10
|
import"./tool-mpvp5rqs.js";
|
|
11
11
|
import"./tool-1yh8g550.js";
|
|
12
12
|
|