@cellaware/utils 4.1.4 → 4.2.0
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/azure/cosmos.js
CHANGED
|
@@ -4,6 +4,7 @@ const COSMOS_CURRENT_DATETIME = `GetCurrentDateTime()`;
|
|
|
4
4
|
const COSMOS_TIMESTAMP_DATETIME = `TimestampToDateTime(c._ts*1000)`;
|
|
5
5
|
/**
|
|
6
6
|
* All Cosmos timestamps are UTC.
|
|
7
|
+
* https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
7
8
|
*/
|
|
8
9
|
function getCosmosTimeZoneHourDiff(timeZone) {
|
|
9
10
|
let diff = 0;
|
|
@@ -19,6 +20,9 @@ function getCosmosTimeZoneHourDiff(timeZone) {
|
|
|
19
20
|
case 'America/Denver':
|
|
20
21
|
diff = dst ? -6 : -7;
|
|
21
22
|
break;
|
|
23
|
+
case 'America/Phoenix':
|
|
24
|
+
diff = -7;
|
|
25
|
+
break;
|
|
22
26
|
case 'America/Los_Angeles':
|
|
23
27
|
diff = dst ? -7 : -8;
|
|
24
28
|
break;
|
package/dist/azure/function.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Readable } from "stream";
|
|
|
2
2
|
export declare const AZURE_HEADER_FUNCTION_KEY = "x-functions-key";
|
|
3
3
|
export declare const AZURE_HEADER_PRINCIPAL = "x-ms-client-principal";
|
|
4
4
|
export declare function functionFetchJson(url: string, method: string, key: string, principal: string, body?: any): Promise<any>;
|
|
5
|
-
export declare function functionFetchText(url: string, method: string, key: string, principal: string,
|
|
5
|
+
export declare function functionFetchText(url: string, method: string, key: string, principal: string, body?: any): Promise<any>;
|
|
6
6
|
export declare function functionStreamJson(url: string, method: string, key: string, principal: string, body: any, errorBody: any): Promise<{
|
|
7
7
|
headers: {
|
|
8
8
|
"Content-Type": string;
|
package/dist/azure/function.js
CHANGED
|
@@ -78,18 +78,20 @@ export async function functionFetchJson(url, method, key, principal, body) {
|
|
|
78
78
|
}
|
|
79
79
|
return functionFetch(url, req);
|
|
80
80
|
}
|
|
81
|
-
export async function functionFetchText(url, method, key, principal,
|
|
81
|
+
export async function functionFetchText(url, method, key, principal, body) {
|
|
82
82
|
const headers = {
|
|
83
|
-
'Content-Type': 'application/
|
|
84
|
-
'Accept': 'application/
|
|
83
|
+
'Content-Type': 'application/json',
|
|
84
|
+
'Accept': 'application/text',
|
|
85
85
|
'x-functions-key': key,
|
|
86
86
|
'x-ms-client-principal': principal
|
|
87
87
|
};
|
|
88
88
|
let req = {
|
|
89
89
|
method,
|
|
90
|
-
headers
|
|
91
|
-
body: text
|
|
90
|
+
headers
|
|
92
91
|
};
|
|
92
|
+
if (body != null) {
|
|
93
|
+
req.body = JSON.stringify(body);
|
|
94
|
+
}
|
|
93
95
|
return functionFetch(url, req);
|
|
94
96
|
}
|
|
95
97
|
export async function functionStreamJson(url, method, key, principal, body, errorBody) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function chatwmsFunctionFetch(path: string, method: string, principal: string, body?: any): Promise<any>;
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function chatwmsFunctionFetchText(path: string, method: string, principal: string, body?: any): Promise<any>;
|
|
3
3
|
export declare function chatwmsFunctionStream(path: string, method: string, principal: string, body?: any): Promise<{
|
|
4
4
|
headers: {
|
|
5
5
|
"Content-Type": string;
|
|
@@ -3,9 +3,9 @@ export function chatwmsFunctionFetch(path, method, principal, body) {
|
|
|
3
3
|
const url = `${process.env['CHATWMS_URL']}/${path}`;
|
|
4
4
|
return functionFetchJson(url, method, process.env['CHATWMS_KEY'] ?? '', principal, body);
|
|
5
5
|
}
|
|
6
|
-
export function
|
|
6
|
+
export function chatwmsFunctionFetchText(path, method, principal, body) {
|
|
7
7
|
const url = `${process.env['CHATWMS_URL']}/${path}`;
|
|
8
|
-
return functionFetchText(url, method, process.env['CHATWMS_KEY'] ?? '', principal,
|
|
8
|
+
return functionFetchText(url, method, process.env['CHATWMS_KEY'] ?? '', principal, body);
|
|
9
9
|
}
|
|
10
10
|
export function chatwmsFunctionStream(path, method, principal, body) {
|
|
11
11
|
const url = `${process.env['CHATWMS_URL']}/${path}`;
|