@uipath/uipath-typescript 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.cjs +13 -12
- package/dist/assets/index.mjs +13 -12
- package/dist/buckets/index.cjs +13 -12
- package/dist/buckets/index.mjs +13 -12
- package/dist/cases/index.cjs +13 -12
- package/dist/cases/index.mjs +13 -12
- package/dist/conversational-agent/index.cjs +13 -12
- package/dist/conversational-agent/index.mjs +13 -12
- package/dist/core/index.cjs +309 -69
- package/dist/core/index.d.ts +17 -9
- package/dist/core/index.mjs +309 -69
- package/dist/entities/index.cjs +64 -12
- package/dist/entities/index.d.ts +94 -1
- package/dist/entities/index.mjs +64 -12
- package/dist/index.cjs +449 -80
- package/dist/index.d.ts +192 -11
- package/dist/index.mjs +447 -81
- package/dist/index.umd.js +449 -80
- package/dist/maestro-processes/index.cjs +13 -12
- package/dist/maestro-processes/index.mjs +13 -12
- package/dist/processes/index.cjs +13 -12
- package/dist/processes/index.mjs +13 -12
- package/dist/queues/index.cjs +13 -12
- package/dist/queues/index.mjs +13 -12
- package/dist/tasks/index.cjs +13 -12
- package/dist/tasks/index.mjs +13 -12
- package/package.json +1 -1
package/dist/assets/index.cjs
CHANGED
|
@@ -548,15 +548,6 @@ class ApiClient {
|
|
|
548
548
|
async getDefaultHeaders() {
|
|
549
549
|
// Get headers from execution context first
|
|
550
550
|
const contextHeaders = this.executionContext.getHeaders();
|
|
551
|
-
// If Authorization header is already set in context, use that
|
|
552
|
-
if (contextHeaders['Authorization']) {
|
|
553
|
-
return {
|
|
554
|
-
...contextHeaders,
|
|
555
|
-
'Content-Type': CONTENT_TYPES.JSON,
|
|
556
|
-
...this.defaultHeaders,
|
|
557
|
-
...this.clientConfig.headers
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
551
|
const token = await this.getValidToken();
|
|
561
552
|
return {
|
|
562
553
|
...contextHeaders,
|
|
@@ -571,8 +562,13 @@ class ApiClient {
|
|
|
571
562
|
const normalizedPath = path.startsWith('/') ? path.substring(1) : path;
|
|
572
563
|
// Construct URL with org and tenant names
|
|
573
564
|
const url = new URL(`${this.config.orgName}/${this.config.tenantName}/${normalizedPath}`, this.config.baseUrl).toString();
|
|
565
|
+
const isFormData = options.body instanceof FormData;
|
|
566
|
+
const defaultHeaders = await this.getDefaultHeaders();
|
|
567
|
+
if (isFormData) {
|
|
568
|
+
delete defaultHeaders['Content-Type'];
|
|
569
|
+
}
|
|
574
570
|
const headers = {
|
|
575
|
-
...
|
|
571
|
+
...defaultHeaders,
|
|
576
572
|
...options.headers
|
|
577
573
|
};
|
|
578
574
|
// Convert params to URLSearchParams
|
|
@@ -583,11 +579,15 @@ class ApiClient {
|
|
|
583
579
|
});
|
|
584
580
|
}
|
|
585
581
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
582
|
+
let body = undefined;
|
|
583
|
+
if (options.body) {
|
|
584
|
+
body = isFormData ? options.body : JSON.stringify(options.body);
|
|
585
|
+
}
|
|
586
586
|
try {
|
|
587
587
|
const response = await fetch(fullUrl, {
|
|
588
588
|
method,
|
|
589
589
|
headers,
|
|
590
|
-
body
|
|
590
|
+
body,
|
|
591
591
|
signal: options.signal
|
|
592
592
|
});
|
|
593
593
|
if (!response.ok) {
|
|
@@ -683,6 +683,7 @@ function filterUndefined(obj) {
|
|
|
683
683
|
* Checks if code is running in a browser environment
|
|
684
684
|
*/
|
|
685
685
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
686
|
+
isBrowser && window.self != window.top && window.location.href.includes('source=ActionCenter');
|
|
686
687
|
|
|
687
688
|
/**
|
|
688
689
|
* Base64 encoding/decoding
|
|
@@ -1677,7 +1678,7 @@ const AssetMap = {
|
|
|
1677
1678
|
// Connection string placeholder that will be replaced during build
|
|
1678
1679
|
const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
|
|
1679
1680
|
// SDK Version placeholder
|
|
1680
|
-
const SDK_VERSION = "1.1.
|
|
1681
|
+
const SDK_VERSION = "1.1.3";
|
|
1681
1682
|
const VERSION = "Version";
|
|
1682
1683
|
const SERVICE = "Service";
|
|
1683
1684
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
package/dist/assets/index.mjs
CHANGED
|
@@ -546,15 +546,6 @@ class ApiClient {
|
|
|
546
546
|
async getDefaultHeaders() {
|
|
547
547
|
// Get headers from execution context first
|
|
548
548
|
const contextHeaders = this.executionContext.getHeaders();
|
|
549
|
-
// If Authorization header is already set in context, use that
|
|
550
|
-
if (contextHeaders['Authorization']) {
|
|
551
|
-
return {
|
|
552
|
-
...contextHeaders,
|
|
553
|
-
'Content-Type': CONTENT_TYPES.JSON,
|
|
554
|
-
...this.defaultHeaders,
|
|
555
|
-
...this.clientConfig.headers
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
549
|
const token = await this.getValidToken();
|
|
559
550
|
return {
|
|
560
551
|
...contextHeaders,
|
|
@@ -569,8 +560,13 @@ class ApiClient {
|
|
|
569
560
|
const normalizedPath = path.startsWith('/') ? path.substring(1) : path;
|
|
570
561
|
// Construct URL with org and tenant names
|
|
571
562
|
const url = new URL(`${this.config.orgName}/${this.config.tenantName}/${normalizedPath}`, this.config.baseUrl).toString();
|
|
563
|
+
const isFormData = options.body instanceof FormData;
|
|
564
|
+
const defaultHeaders = await this.getDefaultHeaders();
|
|
565
|
+
if (isFormData) {
|
|
566
|
+
delete defaultHeaders['Content-Type'];
|
|
567
|
+
}
|
|
572
568
|
const headers = {
|
|
573
|
-
...
|
|
569
|
+
...defaultHeaders,
|
|
574
570
|
...options.headers
|
|
575
571
|
};
|
|
576
572
|
// Convert params to URLSearchParams
|
|
@@ -581,11 +577,15 @@ class ApiClient {
|
|
|
581
577
|
});
|
|
582
578
|
}
|
|
583
579
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
580
|
+
let body = undefined;
|
|
581
|
+
if (options.body) {
|
|
582
|
+
body = isFormData ? options.body : JSON.stringify(options.body);
|
|
583
|
+
}
|
|
584
584
|
try {
|
|
585
585
|
const response = await fetch(fullUrl, {
|
|
586
586
|
method,
|
|
587
587
|
headers,
|
|
588
|
-
body
|
|
588
|
+
body,
|
|
589
589
|
signal: options.signal
|
|
590
590
|
});
|
|
591
591
|
if (!response.ok) {
|
|
@@ -681,6 +681,7 @@ function filterUndefined(obj) {
|
|
|
681
681
|
* Checks if code is running in a browser environment
|
|
682
682
|
*/
|
|
683
683
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
684
|
+
isBrowser && window.self != window.top && window.location.href.includes('source=ActionCenter');
|
|
684
685
|
|
|
685
686
|
/**
|
|
686
687
|
* Base64 encoding/decoding
|
|
@@ -1675,7 +1676,7 @@ const AssetMap = {
|
|
|
1675
1676
|
// Connection string placeholder that will be replaced during build
|
|
1676
1677
|
const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
|
|
1677
1678
|
// SDK Version placeholder
|
|
1678
|
-
const SDK_VERSION = "1.1.
|
|
1679
|
+
const SDK_VERSION = "1.1.3";
|
|
1679
1680
|
const VERSION = "Version";
|
|
1680
1681
|
const SERVICE = "Service";
|
|
1681
1682
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
package/dist/buckets/index.cjs
CHANGED
|
@@ -548,15 +548,6 @@ class ApiClient {
|
|
|
548
548
|
async getDefaultHeaders() {
|
|
549
549
|
// Get headers from execution context first
|
|
550
550
|
const contextHeaders = this.executionContext.getHeaders();
|
|
551
|
-
// If Authorization header is already set in context, use that
|
|
552
|
-
if (contextHeaders['Authorization']) {
|
|
553
|
-
return {
|
|
554
|
-
...contextHeaders,
|
|
555
|
-
'Content-Type': CONTENT_TYPES.JSON,
|
|
556
|
-
...this.defaultHeaders,
|
|
557
|
-
...this.clientConfig.headers
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
551
|
const token = await this.getValidToken();
|
|
561
552
|
return {
|
|
562
553
|
...contextHeaders,
|
|
@@ -571,8 +562,13 @@ class ApiClient {
|
|
|
571
562
|
const normalizedPath = path.startsWith('/') ? path.substring(1) : path;
|
|
572
563
|
// Construct URL with org and tenant names
|
|
573
564
|
const url = new URL(`${this.config.orgName}/${this.config.tenantName}/${normalizedPath}`, this.config.baseUrl).toString();
|
|
565
|
+
const isFormData = options.body instanceof FormData;
|
|
566
|
+
const defaultHeaders = await this.getDefaultHeaders();
|
|
567
|
+
if (isFormData) {
|
|
568
|
+
delete defaultHeaders['Content-Type'];
|
|
569
|
+
}
|
|
574
570
|
const headers = {
|
|
575
|
-
...
|
|
571
|
+
...defaultHeaders,
|
|
576
572
|
...options.headers
|
|
577
573
|
};
|
|
578
574
|
// Convert params to URLSearchParams
|
|
@@ -583,11 +579,15 @@ class ApiClient {
|
|
|
583
579
|
});
|
|
584
580
|
}
|
|
585
581
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
582
|
+
let body = undefined;
|
|
583
|
+
if (options.body) {
|
|
584
|
+
body = isFormData ? options.body : JSON.stringify(options.body);
|
|
585
|
+
}
|
|
586
586
|
try {
|
|
587
587
|
const response = await fetch(fullUrl, {
|
|
588
588
|
method,
|
|
589
589
|
headers,
|
|
590
|
-
body
|
|
590
|
+
body,
|
|
591
591
|
signal: options.signal
|
|
592
592
|
});
|
|
593
593
|
if (!response.ok) {
|
|
@@ -683,6 +683,7 @@ function filterUndefined(obj) {
|
|
|
683
683
|
* Checks if code is running in a browser environment
|
|
684
684
|
*/
|
|
685
685
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
686
|
+
isBrowser && window.self != window.top && window.location.href.includes('source=ActionCenter');
|
|
686
687
|
|
|
687
688
|
/**
|
|
688
689
|
* Base64 encoding/decoding
|
|
@@ -1724,7 +1725,7 @@ const BucketMap = {
|
|
|
1724
1725
|
// Connection string placeholder that will be replaced during build
|
|
1725
1726
|
const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
|
|
1726
1727
|
// SDK Version placeholder
|
|
1727
|
-
const SDK_VERSION = "1.1.
|
|
1728
|
+
const SDK_VERSION = "1.1.3";
|
|
1728
1729
|
const VERSION = "Version";
|
|
1729
1730
|
const SERVICE = "Service";
|
|
1730
1731
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
package/dist/buckets/index.mjs
CHANGED
|
@@ -546,15 +546,6 @@ class ApiClient {
|
|
|
546
546
|
async getDefaultHeaders() {
|
|
547
547
|
// Get headers from execution context first
|
|
548
548
|
const contextHeaders = this.executionContext.getHeaders();
|
|
549
|
-
// If Authorization header is already set in context, use that
|
|
550
|
-
if (contextHeaders['Authorization']) {
|
|
551
|
-
return {
|
|
552
|
-
...contextHeaders,
|
|
553
|
-
'Content-Type': CONTENT_TYPES.JSON,
|
|
554
|
-
...this.defaultHeaders,
|
|
555
|
-
...this.clientConfig.headers
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
549
|
const token = await this.getValidToken();
|
|
559
550
|
return {
|
|
560
551
|
...contextHeaders,
|
|
@@ -569,8 +560,13 @@ class ApiClient {
|
|
|
569
560
|
const normalizedPath = path.startsWith('/') ? path.substring(1) : path;
|
|
570
561
|
// Construct URL with org and tenant names
|
|
571
562
|
const url = new URL(`${this.config.orgName}/${this.config.tenantName}/${normalizedPath}`, this.config.baseUrl).toString();
|
|
563
|
+
const isFormData = options.body instanceof FormData;
|
|
564
|
+
const defaultHeaders = await this.getDefaultHeaders();
|
|
565
|
+
if (isFormData) {
|
|
566
|
+
delete defaultHeaders['Content-Type'];
|
|
567
|
+
}
|
|
572
568
|
const headers = {
|
|
573
|
-
...
|
|
569
|
+
...defaultHeaders,
|
|
574
570
|
...options.headers
|
|
575
571
|
};
|
|
576
572
|
// Convert params to URLSearchParams
|
|
@@ -581,11 +577,15 @@ class ApiClient {
|
|
|
581
577
|
});
|
|
582
578
|
}
|
|
583
579
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
580
|
+
let body = undefined;
|
|
581
|
+
if (options.body) {
|
|
582
|
+
body = isFormData ? options.body : JSON.stringify(options.body);
|
|
583
|
+
}
|
|
584
584
|
try {
|
|
585
585
|
const response = await fetch(fullUrl, {
|
|
586
586
|
method,
|
|
587
587
|
headers,
|
|
588
|
-
body
|
|
588
|
+
body,
|
|
589
589
|
signal: options.signal
|
|
590
590
|
});
|
|
591
591
|
if (!response.ok) {
|
|
@@ -681,6 +681,7 @@ function filterUndefined(obj) {
|
|
|
681
681
|
* Checks if code is running in a browser environment
|
|
682
682
|
*/
|
|
683
683
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
684
|
+
isBrowser && window.self != window.top && window.location.href.includes('source=ActionCenter');
|
|
684
685
|
|
|
685
686
|
/**
|
|
686
687
|
* Base64 encoding/decoding
|
|
@@ -1722,7 +1723,7 @@ const BucketMap = {
|
|
|
1722
1723
|
// Connection string placeholder that will be replaced during build
|
|
1723
1724
|
const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
|
|
1724
1725
|
// SDK Version placeholder
|
|
1725
|
-
const SDK_VERSION = "1.1.
|
|
1726
|
+
const SDK_VERSION = "1.1.3";
|
|
1726
1727
|
const VERSION = "Version";
|
|
1727
1728
|
const SERVICE = "Service";
|
|
1728
1729
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
package/dist/cases/index.cjs
CHANGED
|
@@ -561,15 +561,6 @@ class ApiClient {
|
|
|
561
561
|
async getDefaultHeaders() {
|
|
562
562
|
// Get headers from execution context first
|
|
563
563
|
const contextHeaders = this.executionContext.getHeaders();
|
|
564
|
-
// If Authorization header is already set in context, use that
|
|
565
|
-
if (contextHeaders['Authorization']) {
|
|
566
|
-
return {
|
|
567
|
-
...contextHeaders,
|
|
568
|
-
'Content-Type': CONTENT_TYPES.JSON,
|
|
569
|
-
...this.defaultHeaders,
|
|
570
|
-
...this.clientConfig.headers
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
564
|
const token = await this.getValidToken();
|
|
574
565
|
return {
|
|
575
566
|
...contextHeaders,
|
|
@@ -584,8 +575,13 @@ class ApiClient {
|
|
|
584
575
|
const normalizedPath = path.startsWith('/') ? path.substring(1) : path;
|
|
585
576
|
// Construct URL with org and tenant names
|
|
586
577
|
const url = new URL(`${this.config.orgName}/${this.config.tenantName}/${normalizedPath}`, this.config.baseUrl).toString();
|
|
578
|
+
const isFormData = options.body instanceof FormData;
|
|
579
|
+
const defaultHeaders = await this.getDefaultHeaders();
|
|
580
|
+
if (isFormData) {
|
|
581
|
+
delete defaultHeaders['Content-Type'];
|
|
582
|
+
}
|
|
587
583
|
const headers = {
|
|
588
|
-
...
|
|
584
|
+
...defaultHeaders,
|
|
589
585
|
...options.headers
|
|
590
586
|
};
|
|
591
587
|
// Convert params to URLSearchParams
|
|
@@ -596,11 +592,15 @@ class ApiClient {
|
|
|
596
592
|
});
|
|
597
593
|
}
|
|
598
594
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
595
|
+
let body = undefined;
|
|
596
|
+
if (options.body) {
|
|
597
|
+
body = isFormData ? options.body : JSON.stringify(options.body);
|
|
598
|
+
}
|
|
599
599
|
try {
|
|
600
600
|
const response = await fetch(fullUrl, {
|
|
601
601
|
method,
|
|
602
602
|
headers,
|
|
603
|
-
body
|
|
603
|
+
body,
|
|
604
604
|
signal: options.signal
|
|
605
605
|
});
|
|
606
606
|
if (!response.ok) {
|
|
@@ -715,6 +715,7 @@ function processODataArrayResponse(oDataResponse, successData) {
|
|
|
715
715
|
* Checks if code is running in a browser environment
|
|
716
716
|
*/
|
|
717
717
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
718
|
+
isBrowser && window.self != window.top && window.location.href.includes('source=ActionCenter');
|
|
718
719
|
|
|
719
720
|
/**
|
|
720
721
|
* Base64 encoding/decoding
|
|
@@ -1832,7 +1833,7 @@ const MAESTRO_ENDPOINTS = {
|
|
|
1832
1833
|
// Connection string placeholder that will be replaced during build
|
|
1833
1834
|
const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
|
|
1834
1835
|
// SDK Version placeholder
|
|
1835
|
-
const SDK_VERSION = "1.1.
|
|
1836
|
+
const SDK_VERSION = "1.1.3";
|
|
1836
1837
|
const VERSION = "Version";
|
|
1837
1838
|
const SERVICE = "Service";
|
|
1838
1839
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
package/dist/cases/index.mjs
CHANGED
|
@@ -559,15 +559,6 @@ class ApiClient {
|
|
|
559
559
|
async getDefaultHeaders() {
|
|
560
560
|
// Get headers from execution context first
|
|
561
561
|
const contextHeaders = this.executionContext.getHeaders();
|
|
562
|
-
// If Authorization header is already set in context, use that
|
|
563
|
-
if (contextHeaders['Authorization']) {
|
|
564
|
-
return {
|
|
565
|
-
...contextHeaders,
|
|
566
|
-
'Content-Type': CONTENT_TYPES.JSON,
|
|
567
|
-
...this.defaultHeaders,
|
|
568
|
-
...this.clientConfig.headers
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
562
|
const token = await this.getValidToken();
|
|
572
563
|
return {
|
|
573
564
|
...contextHeaders,
|
|
@@ -582,8 +573,13 @@ class ApiClient {
|
|
|
582
573
|
const normalizedPath = path.startsWith('/') ? path.substring(1) : path;
|
|
583
574
|
// Construct URL with org and tenant names
|
|
584
575
|
const url = new URL(`${this.config.orgName}/${this.config.tenantName}/${normalizedPath}`, this.config.baseUrl).toString();
|
|
576
|
+
const isFormData = options.body instanceof FormData;
|
|
577
|
+
const defaultHeaders = await this.getDefaultHeaders();
|
|
578
|
+
if (isFormData) {
|
|
579
|
+
delete defaultHeaders['Content-Type'];
|
|
580
|
+
}
|
|
585
581
|
const headers = {
|
|
586
|
-
...
|
|
582
|
+
...defaultHeaders,
|
|
587
583
|
...options.headers
|
|
588
584
|
};
|
|
589
585
|
// Convert params to URLSearchParams
|
|
@@ -594,11 +590,15 @@ class ApiClient {
|
|
|
594
590
|
});
|
|
595
591
|
}
|
|
596
592
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
593
|
+
let body = undefined;
|
|
594
|
+
if (options.body) {
|
|
595
|
+
body = isFormData ? options.body : JSON.stringify(options.body);
|
|
596
|
+
}
|
|
597
597
|
try {
|
|
598
598
|
const response = await fetch(fullUrl, {
|
|
599
599
|
method,
|
|
600
600
|
headers,
|
|
601
|
-
body
|
|
601
|
+
body,
|
|
602
602
|
signal: options.signal
|
|
603
603
|
});
|
|
604
604
|
if (!response.ok) {
|
|
@@ -713,6 +713,7 @@ function processODataArrayResponse(oDataResponse, successData) {
|
|
|
713
713
|
* Checks if code is running in a browser environment
|
|
714
714
|
*/
|
|
715
715
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
716
|
+
isBrowser && window.self != window.top && window.location.href.includes('source=ActionCenter');
|
|
716
717
|
|
|
717
718
|
/**
|
|
718
719
|
* Base64 encoding/decoding
|
|
@@ -1830,7 +1831,7 @@ const MAESTRO_ENDPOINTS = {
|
|
|
1830
1831
|
// Connection string placeholder that will be replaced during build
|
|
1831
1832
|
const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
|
|
1832
1833
|
// SDK Version placeholder
|
|
1833
|
-
const SDK_VERSION = "1.1.
|
|
1834
|
+
const SDK_VERSION = "1.1.3";
|
|
1834
1835
|
const VERSION = "Version";
|
|
1835
1836
|
const SERVICE = "Service";
|
|
1836
1837
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -51,7 +51,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
51
51
|
// Connection string placeholder that will be replaced during build
|
|
52
52
|
const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
|
|
53
53
|
// SDK Version placeholder
|
|
54
|
-
const SDK_VERSION = "1.1.
|
|
54
|
+
const SDK_VERSION = "1.1.3";
|
|
55
55
|
const VERSION = "Version";
|
|
56
56
|
const SERVICE = "Service";
|
|
57
57
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -831,15 +831,6 @@ class ApiClient {
|
|
|
831
831
|
async getDefaultHeaders() {
|
|
832
832
|
// Get headers from execution context first
|
|
833
833
|
const contextHeaders = this.executionContext.getHeaders();
|
|
834
|
-
// If Authorization header is already set in context, use that
|
|
835
|
-
if (contextHeaders['Authorization']) {
|
|
836
|
-
return {
|
|
837
|
-
...contextHeaders,
|
|
838
|
-
'Content-Type': CONTENT_TYPES.JSON,
|
|
839
|
-
...this.defaultHeaders,
|
|
840
|
-
...this.clientConfig.headers
|
|
841
|
-
};
|
|
842
|
-
}
|
|
843
834
|
const token = await this.getValidToken();
|
|
844
835
|
return {
|
|
845
836
|
...contextHeaders,
|
|
@@ -854,8 +845,13 @@ class ApiClient {
|
|
|
854
845
|
const normalizedPath = path.startsWith('/') ? path.substring(1) : path;
|
|
855
846
|
// Construct URL with org and tenant names
|
|
856
847
|
const url = new URL(`${this.config.orgName}/${this.config.tenantName}/${normalizedPath}`, this.config.baseUrl).toString();
|
|
848
|
+
const isFormData = options.body instanceof FormData;
|
|
849
|
+
const defaultHeaders = await this.getDefaultHeaders();
|
|
850
|
+
if (isFormData) {
|
|
851
|
+
delete defaultHeaders['Content-Type'];
|
|
852
|
+
}
|
|
857
853
|
const headers = {
|
|
858
|
-
...
|
|
854
|
+
...defaultHeaders,
|
|
859
855
|
...options.headers
|
|
860
856
|
};
|
|
861
857
|
// Convert params to URLSearchParams
|
|
@@ -866,11 +862,15 @@ class ApiClient {
|
|
|
866
862
|
});
|
|
867
863
|
}
|
|
868
864
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
865
|
+
let body = undefined;
|
|
866
|
+
if (options.body) {
|
|
867
|
+
body = isFormData ? options.body : JSON.stringify(options.body);
|
|
868
|
+
}
|
|
869
869
|
try {
|
|
870
870
|
const response = await fetch(fullUrl, {
|
|
871
871
|
method,
|
|
872
872
|
headers,
|
|
873
|
-
body
|
|
873
|
+
body,
|
|
874
874
|
signal: options.signal
|
|
875
875
|
});
|
|
876
876
|
if (!response.ok) {
|
|
@@ -966,6 +966,7 @@ function filterUndefined(obj) {
|
|
|
966
966
|
* Checks if code is running in a browser environment
|
|
967
967
|
*/
|
|
968
968
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
969
|
+
isBrowser && window.self != window.top && window.location.href.includes('source=ActionCenter');
|
|
969
970
|
|
|
970
971
|
/**
|
|
971
972
|
* Base64 encoding/decoding
|
|
@@ -49,7 +49,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
49
49
|
// Connection string placeholder that will be replaced during build
|
|
50
50
|
const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
|
|
51
51
|
// SDK Version placeholder
|
|
52
|
-
const SDK_VERSION = "1.1.
|
|
52
|
+
const SDK_VERSION = "1.1.3";
|
|
53
53
|
const VERSION = "Version";
|
|
54
54
|
const SERVICE = "Service";
|
|
55
55
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -829,15 +829,6 @@ class ApiClient {
|
|
|
829
829
|
async getDefaultHeaders() {
|
|
830
830
|
// Get headers from execution context first
|
|
831
831
|
const contextHeaders = this.executionContext.getHeaders();
|
|
832
|
-
// If Authorization header is already set in context, use that
|
|
833
|
-
if (contextHeaders['Authorization']) {
|
|
834
|
-
return {
|
|
835
|
-
...contextHeaders,
|
|
836
|
-
'Content-Type': CONTENT_TYPES.JSON,
|
|
837
|
-
...this.defaultHeaders,
|
|
838
|
-
...this.clientConfig.headers
|
|
839
|
-
};
|
|
840
|
-
}
|
|
841
832
|
const token = await this.getValidToken();
|
|
842
833
|
return {
|
|
843
834
|
...contextHeaders,
|
|
@@ -852,8 +843,13 @@ class ApiClient {
|
|
|
852
843
|
const normalizedPath = path.startsWith('/') ? path.substring(1) : path;
|
|
853
844
|
// Construct URL with org and tenant names
|
|
854
845
|
const url = new URL(`${this.config.orgName}/${this.config.tenantName}/${normalizedPath}`, this.config.baseUrl).toString();
|
|
846
|
+
const isFormData = options.body instanceof FormData;
|
|
847
|
+
const defaultHeaders = await this.getDefaultHeaders();
|
|
848
|
+
if (isFormData) {
|
|
849
|
+
delete defaultHeaders['Content-Type'];
|
|
850
|
+
}
|
|
855
851
|
const headers = {
|
|
856
|
-
...
|
|
852
|
+
...defaultHeaders,
|
|
857
853
|
...options.headers
|
|
858
854
|
};
|
|
859
855
|
// Convert params to URLSearchParams
|
|
@@ -864,11 +860,15 @@ class ApiClient {
|
|
|
864
860
|
});
|
|
865
861
|
}
|
|
866
862
|
const fullUrl = searchParams.toString() ? `${url}?${searchParams.toString()}` : url;
|
|
863
|
+
let body = undefined;
|
|
864
|
+
if (options.body) {
|
|
865
|
+
body = isFormData ? options.body : JSON.stringify(options.body);
|
|
866
|
+
}
|
|
867
867
|
try {
|
|
868
868
|
const response = await fetch(fullUrl, {
|
|
869
869
|
method,
|
|
870
870
|
headers,
|
|
871
|
-
body
|
|
871
|
+
body,
|
|
872
872
|
signal: options.signal
|
|
873
873
|
});
|
|
874
874
|
if (!response.ok) {
|
|
@@ -964,6 +964,7 @@ function filterUndefined(obj) {
|
|
|
964
964
|
* Checks if code is running in a browser environment
|
|
965
965
|
*/
|
|
966
966
|
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
967
|
+
isBrowser && window.self != window.top && window.location.href.includes('source=ActionCenter');
|
|
967
968
|
|
|
968
969
|
/**
|
|
969
970
|
* Base64 encoding/decoding
|