gd-sprest 7.3.9 → 7.4.1

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.
@@ -9,4 +9,5 @@ export * from "./loadSPCore";
9
9
  export * from "./parse";
10
10
  export * from "./request";
11
11
  export * from "./setContentTypeFields";
12
- export * from "./setGroupOwner";
12
+ export * from "./setGroupOwner";
13
+ export * from "./stringify";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Convert an object to a string
3
+ * @category Helper
4
+ */
5
+ export const stringify: IStringify;
6
+ export interface IStringify {
7
+ (obj: any): string;
8
+ }
@@ -157,12 +157,19 @@ export type ICloudEnvironment = {
157
157
  Default: string;
158
158
  China: string;
159
159
  Flow: string;
160
+ FlowAPI: string;
160
161
  FlowChina: string;
162
+ FlowChinaAPI: string;
161
163
  FlowDoD: string;
164
+ FlowDoDAPI: string;
162
165
  FlowGov: string;
166
+ FlowGovAPI: string;
163
167
  FlowHigh: string;
168
+ FlowHighAPI: string;
164
169
  FlowUSNat: string;
170
+ FlowUSNatAPI: string;
165
171
  FlowUSSec: string;
172
+ FlowUSSecAPI: string;
166
173
  Office: string;
167
174
  USL4: string;
168
175
  USL5: string;
@@ -22,3 +22,4 @@ __exportStar(require("./parse"), exports);
22
22
  __exportStar(require("./request"), exports);
23
23
  __exportStar(require("./setContentTypeFields"), exports);
24
24
  __exportStar(require("./setGroupOwner"), exports);
25
+ __exportStar(require("./stringify"), exports);
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stringify = void 0;
4
+ /**
5
+ * Convert an object to a string
6
+ */
7
+ exports.stringify = function (obj) {
8
+ // Return the string
9
+ return JSON.stringify(obj, function (key, value) {
10
+ // Ensure a key exists
11
+ if (key) {
12
+ // See if this is a string or number, and return it
13
+ var valueType = typeof (value);
14
+ if (valueType === "string" || valueType === "number") {
15
+ return value;
16
+ }
17
+ try {
18
+ // Try to parse it
19
+ JSON.parse(value);
20
+ // Return the value
21
+ return value;
22
+ }
23
+ catch (_a) {
24
+ // Don't include this key/value pair
25
+ return undefined;
26
+ }
27
+ }
28
+ // Return the value
29
+ return value;
30
+ });
31
+ };
package/build/rest.js CHANGED
@@ -8,7 +8,7 @@ var sptypes_1 = require("./sptypes");
8
8
  * SharePoint REST Library
9
9
  */
10
10
  exports.$REST = {
11
- __ver: 7.39,
11
+ __ver: 7.41,
12
12
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
13
13
  Apps: Lib.Apps,
14
14
  ContextInfo: Lib.ContextInfo,
@@ -97,12 +97,19 @@ exports.CloudEnvironment = {
97
97
  China: "https://microsoftgraph.chinacloudapi.cn",
98
98
  Default: "https://graph.microsoft.com",
99
99
  Flow: "https://service.flow.microsoft.com/",
100
+ FlowAPI: "https://api.flow.microsoft.com/",
100
101
  FlowChina: "https://service.powerautomate.cn/",
102
+ FlowChinaAPI: "https://api.powerautomate.cn/",
101
103
  FlowDoD: "https://service.flow.appsplatform.us/",
104
+ FlowDoDAPI: "https://api.flow.appsplatform.us/",
102
105
  FlowGov: "https://gov.service.flow.microsoft.us/",
106
+ FlowGovAPI: "https://gov.api.flow.microsoft.us/",
103
107
  FlowHigh: "https://high.service.flow.microsoft.us/",
108
+ FlowHighAPI: "https://high.api.flow.microsoft.us/",
104
109
  FlowUSNat: "https://service.flow.eaglex.ic.gov/",
110
+ FlowUSNatAPI: "https://api.flow.eaglex.ic.gov/",
105
111
  FlowUSSec: "https://service.flow.microsoft.scloud/",
112
+ FlowUSSecAPI: "https://api.flow.microsoft.scloud/",
106
113
  Office: "https://substrate.office.com",
107
114
  USL4: "https://graph.microsoft.us",
108
115
  USL5: "https://dod-graph.microsoft.us"
@@ -4045,6 +4045,7 @@ declare module 'gd-sprest/helper/methods' {
4045
4045
  export * from "gd-sprest/helper/methods/request";
4046
4046
  export * from "gd-sprest/helper/methods/setContentTypeFields";
4047
4047
  export * from "gd-sprest/helper/methods/setGroupOwner";
4048
+ export * from "gd-sprest/helper/methods/stringify";
4048
4049
  }
4049
4050
 
4050
4051
  declare module 'gd-sprest/sptypes/sptypes' {
@@ -4207,12 +4208,19 @@ declare module 'gd-sprest/sptypes/sptypes' {
4207
4208
  Default: string;
4208
4209
  China: string;
4209
4210
  Flow: string;
4211
+ FlowAPI: string;
4210
4212
  FlowChina: string;
4213
+ FlowChinaAPI: string;
4211
4214
  FlowDoD: string;
4215
+ FlowDoDAPI: string;
4212
4216
  FlowGov: string;
4217
+ FlowGovAPI: string;
4213
4218
  FlowHigh: string;
4219
+ FlowHighAPI: string;
4214
4220
  FlowUSNat: string;
4221
+ FlowUSNatAPI: string;
4215
4222
  FlowUSSec: string;
4223
+ FlowUSSecAPI: string;
4216
4224
  Office: string;
4217
4225
  USL4: string;
4218
4226
  USL5: string;
@@ -6472,6 +6480,17 @@ declare module 'gd-sprest/helper/methods/setGroupOwner' {
6472
6480
  }
6473
6481
  }
6474
6482
 
6483
+ declare module 'gd-sprest/helper/methods/stringify' {
6484
+ /**
6485
+ * Convert an object to a string
6486
+ * @category Helper
6487
+ */
6488
+ export const stringify: IStringify;
6489
+ export interface IStringify {
6490
+ (obj: any): string;
6491
+ }
6492
+ }
6493
+
6475
6494
  declare module 'gd-sprest/utils/base' {
6476
6495
  import { IBaseExecution, IBaseResult } from "gd-sprest-def/lib/base";
6477
6496
  import { ITargetInfo, ITargetInfoProps } from "gd-sprest/utils/targetInfo";