@kwiz/common 1.0.61 → 1.0.62
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/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type IMeetingLocationEntityType = "Default" | "ConferenceRoom" | "HomeAddress" | "BusinessAddress"
|
|
1
|
+
export type IMeetingLocationEntityType = "Custom" | "Default" | "ConferenceRoom" | "HomeAddress" | "BusinessAddress"
|
|
2
2
|
| "GeoCoordinates" | "StreetAddress" | "Hotel" | "Restaurant" | "LocalBusiness" | "PostalAddress";
|
|
3
3
|
|
|
4
4
|
export interface IMeetingLocationAddress {
|
|
@@ -1018,7 +1018,10 @@ export type FieldTypeAsString = "Text" | "Note" | "Choice" | "MultiChoice" |
|
|
|
1018
1018
|
/** OutcomeChoice from workflow task outcome modified PercentComplete and Stauts fields */
|
|
1019
1019
|
"OutcomeChoice" |
|
|
1020
1020
|
/** Thumbnail is an image field, see issue 7553 */
|
|
1021
|
-
"Thumbnail"
|
|
1021
|
+
"Thumbnail"
|
|
1022
|
+
|
|
|
1023
|
+
/** Location field */
|
|
1024
|
+
"Location";
|
|
1022
1025
|
export interface IFieldInfoEX extends IFieldInfo {
|
|
1023
1026
|
TypeAsString: FieldTypeAsString;
|
|
1024
1027
|
SchemaJson: IFieldJsonSchema;
|
package/src/utils/auth/common.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isNullOrEmptyString, isNullOrUndefined } from "../../helpers/typecheckers";
|
|
2
2
|
import { SPFxAuthTokenType } from "../../types/auth";
|
|
3
|
-
import { GetJson } from "../rest";
|
|
3
|
+
import { GetJson, shortLocalCache } from "../rest";
|
|
4
4
|
import { GetRestBaseUrl } from "../sharepoint.rest/common";
|
|
5
5
|
|
|
6
6
|
export function GetTokenAudiencePrefix(appId: string) {
|
|
@@ -45,7 +45,7 @@ export async function GetSPFxClientAuthToken(siteUrl: string, spfxTokenType: SPF
|
|
|
45
45
|
let data = {
|
|
46
46
|
resource: resource,
|
|
47
47
|
tokenType: isSPOToken ? "SPO" : undefined
|
|
48
|
-
};
|
|
48
|
+
};
|
|
49
49
|
|
|
50
50
|
let result = await GetJson<{
|
|
51
51
|
access_token: string;
|
|
@@ -55,15 +55,17 @@ export async function GetSPFxClientAuthToken(siteUrl: string, spfxTokenType: SPF
|
|
|
55
55
|
token_type: string;
|
|
56
56
|
}>(
|
|
57
57
|
acquireURL,
|
|
58
|
-
JSON.stringify(data),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
JSON.stringify(data),
|
|
59
|
+
{
|
|
60
|
+
...shortLocalCache,
|
|
61
|
+
postCacheKey: `${spfxTokenType}_${_spPageContextInfo.webId}`,
|
|
62
|
+
includeDigestInPost: true,
|
|
63
|
+
headers: {
|
|
64
|
+
"Accept": "application/json;odata.metadata=minimal",
|
|
65
|
+
"content-type": "application/json; charset=UTF-8",
|
|
66
|
+
"odata-version": "4.0",
|
|
67
|
+
}
|
|
68
|
+
});
|
|
67
69
|
|
|
68
70
|
return !isNullOrUndefined(result) && !isNullOrEmptyString(result.access_token) ? result.access_token : null;
|
|
69
71
|
} catch {
|
|
@@ -4,7 +4,7 @@ import { SPFxAuthTokenType } from "../../types/auth";
|
|
|
4
4
|
import { IMeetingLocation, IMeetingLocationEntityType } from "../../types/location.types";
|
|
5
5
|
import { jsonTypes } from "../_dependencies";
|
|
6
6
|
import { GetSPFxClientAuthToken } from "../auth/common";
|
|
7
|
-
import { GetJson,
|
|
7
|
+
import { GetJson, shortLocalCache } from "../rest";
|
|
8
8
|
|
|
9
9
|
interface IMeetingLocationsQuery {
|
|
10
10
|
QueryConstraint: {
|
|
@@ -66,7 +66,8 @@ async function _findMeetingLocations(options: { bingUri: string; query: string }
|
|
|
66
66
|
url,
|
|
67
67
|
JSON.stringify(queryData),
|
|
68
68
|
{
|
|
69
|
-
...
|
|
69
|
+
...shortLocalCache,
|
|
70
|
+
postCacheKey: `${queryData.BingMarket}|${queryData.LocationProvider}|${useBingUri ? queryData.QueryConstraint.Id : queryData.QueryConstraint.Query}`,
|
|
70
71
|
includeDigestInPost: false,
|
|
71
72
|
headers: {
|
|
72
73
|
"Accept": jsonTypes.verbose,
|