gd-sprest-def 1.2.9 → 1.3.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.
package/custom.js
CHANGED
|
@@ -2,17 +2,6 @@
|
|
|
2
2
|
* Custom Methods
|
|
3
3
|
*/
|
|
4
4
|
module.exports = {
|
|
5
|
-
// Search
|
|
6
|
-
"Microsoft.Office.Server.Search.REST.SearchService": [
|
|
7
|
-
{
|
|
8
|
-
name: "searchquery",
|
|
9
|
-
returnType: "Microsoft.Office.Server.Search.REST.SearchResult",
|
|
10
|
-
params: [
|
|
11
|
-
{ $: { Name: "request", Type: "Microsoft.Office.Server.Search.REST.SearchRequest" } }
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
|
|
16
5
|
// Attachments
|
|
17
6
|
"Collection(SP.Attachment)": [
|
|
18
7
|
{
|
|
@@ -392,6 +381,24 @@ module.exports = {
|
|
|
392
381
|
}
|
|
393
382
|
],
|
|
394
383
|
|
|
384
|
+
// Search
|
|
385
|
+
"Microsoft.Office.Server.Search.REST.SearchService": [
|
|
386
|
+
{
|
|
387
|
+
name: "searchquery",
|
|
388
|
+
returnType: "{ query: Microsoft.Office.Server.Search.REST.SearchResult }",
|
|
389
|
+
params: [
|
|
390
|
+
{ $: { Name: "request", Type: "Microsoft.Office.Server.Search.REST.SearchRequest" } }
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: "postquery",
|
|
395
|
+
returnType: "{ postquery: Microsoft.Office.Server.Search.REST.SearchResult }",
|
|
396
|
+
params: [
|
|
397
|
+
{ $: { Name: "request", Type: "Microsoft.Office.Server.Search.REST.SearchRequest" } }
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
],
|
|
401
|
+
|
|
395
402
|
// Site
|
|
396
403
|
"SP.Site": [
|
|
397
404
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IBaseExecution } from "../../base";
|
|
2
|
-
import * as EntityTypes from "./entityTypes.d"
|
|
2
|
+
import * as EntityTypes from "./entityTypes.d";
|
|
3
3
|
|
|
4
4
|
/*********************************************
|
|
5
5
|
* invitations
|
|
@@ -198,8 +198,8 @@ export interface shares extends IBaseExecution<EntityTypes.sharedDriveItem> {
|
|
|
198
198
|
export interface sites extends IBaseExecution<EntityTypes.site> {
|
|
199
199
|
parentTerm: () => IBaseExecution<EntityTypes.term[]>;
|
|
200
200
|
termSet: () => IBaseExecution<EntityTypes.set[]>;
|
|
201
|
-
sharedColumns: () => IBaseExecution<
|
|
202
|
-
welcomePageColumns: () => IBaseExecution<
|
|
201
|
+
sharedColumns: () => IBaseExecution<ComplexTypes.columnDefinition[]>;
|
|
202
|
+
welcomePageColumns: () => IBaseExecution<ComplexTypes.columnDefinition[]>;
|
|
203
203
|
}
|
|
204
204
|
/*********************************************
|
|
205
205
|
* schemaExtensions
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
1
|
+
import * as API from "./api";
|
|
2
|
+
import * as ComplexTypes from "./complexTypes";
|
|
3
|
+
import * as Enums from "./enumTypes";
|
|
4
|
+
export { API, ComplexTypes, Enums }
|
|
5
|
+
export * from "./entityTypes";
|
|
@@ -72,13 +72,14 @@ export interface SearchServiceMethods {
|
|
|
72
72
|
export(userName?: string, startTime?: any): Base.IBaseExecution<string>;
|
|
73
73
|
exportmanualsuggestions(): Base.IBaseExecution<Microsoft.SharePoint.Client.Search.Query.TenantCustomQuerySuggestions>;
|
|
74
74
|
exportpopulartenantqueries(count?: number): Base.IBaseCollection<Microsoft.SharePoint.Client.Search.Query.PopularTenantQuery>;
|
|
75
|
-
postquery(request?: Microsoft.Office.Server.Search.REST.SearchRequest): Base.IBaseExecution<Microsoft.Office.Server.Search.REST.SearchResult>;
|
|
75
|
+
// postquery(request?: Microsoft.Office.Server.Search.REST.SearchRequest): Base.IBaseExecution<Microsoft.Office.Server.Search.REST.SearchResult>;
|
|
76
76
|
query(querytext?: string, queryTemplate?: string, enableInterleaving?: boolean, sourceId?: any, rankingModelId?: string, startRow?: number, rowLimit?: number, rowsPerPage?: number, selectProperties?: string, culture?: number, refinementFilters?: string, refiners?: string, hiddenConstraints?: string, sortList?: string, enableStemming?: boolean, trimDuplicates?: boolean, timeout?: number, enableNicknames?: boolean, enablePhonetic?: boolean, enableFQL?: boolean, hitHighlightedProperties?: string, propertiesToGenerateAcronyms?: string, bypassResultTypes?: boolean, processBestBets?: boolean, clientType?: string, personalizationData?: any, resultsUrl?: string, queryTag?: string, trimDuplicatesIncludeId?: number, totalRowsExactMinimum?: number, impressionId?: string, properties?: string, enableQueryRules?: boolean, summaryLength?: number, maxSnippetLength?: number, desiredSnippetLength?: number, uiLanguage?: number, blockDedupeMode?: number, generateBlockRankLog?: boolean, enableSorting?: boolean, collapseSpecification?: string, processPersonalFavorites?: boolean, enableOrderingHitHighlightedProperty?: boolean, hitHighlightedMultivaluePropertyLimit?: number, queryTemplatePropertiesUrl?: string, timeZoneId?: number, useOLSQuery?: number, OLSQuerySession?: string): Base.IBaseExecution<Microsoft.Office.Server.Search.REST.SearchResult>;
|
|
77
77
|
recordPageClick(pageInfo?: string, clickType?: string, blockType?: number, clickedResultId?: string, subResultIndex?: number, immediacySourceId?: string, immediacyQueryString?: string, immediacyTitle?: string, immediacyUrl?: string): Base.IBaseExecution<any>;
|
|
78
78
|
resultspageaddress(): Base.IBaseExecution<string>;
|
|
79
79
|
searchcenterurl(): Base.IBaseExecution<string>;
|
|
80
80
|
suggest(querytext?: string, iNumberOfQuerySuggestions?: number, iNumberOfResultSuggestions?: number, iNumberOfPopularResultSuggestions?: number, fPreQuerySuggestions?: boolean, fHitHighlighting?: boolean, fCapitalizeFirstLetters?: boolean, culture?: number, enableStemming?: boolean, showPeopleNameSuggestions?: boolean, enableQueryRules?: boolean, fPrefixMatchAllTerms?: boolean, sourceId?: string, clientType?: string, useOLSQuery?: number, OLSQuerySession?: string, zeroTermSuggestions?: boolean): Base.IBaseExecution<Microsoft.SharePoint.Client.Search.Query.QuerySuggestionResults>;
|
|
81
|
-
searchquery(request?: Microsoft.Office.Server.Search.REST.SearchRequest): Base.IBaseExecution<Microsoft.Office.Server.Search.REST.SearchResult>;
|
|
81
|
+
searchquery(request?: Microsoft.Office.Server.Search.REST.SearchRequest): Base.IBaseExecution<{ query: Microsoft.Office.Server.Search.REST.SearchResult }>;
|
|
82
|
+
postquery(request?: Microsoft.Office.Server.Search.REST.SearchRequest): Base.IBaseExecution<{ postquery: Microsoft.Office.Server.Search.REST.SearchResult }>;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
/*********************************************
|
package/main.js
CHANGED
|
@@ -264,7 +264,7 @@ function getType(type = "any", enumInterfaces) {
|
|
|
264
264
|
// Method to update the references
|
|
265
265
|
function updateReferences(fileImports, dirName, type) {
|
|
266
266
|
// See if the type requires an import
|
|
267
|
-
if (type && type.indexOf('.') > 0) {
|
|
267
|
+
if (!type.startsWith('{') && type && type.indexOf('.') > 0) {
|
|
268
268
|
// Get the last index of it
|
|
269
269
|
let refType = type.replace(/^Array\<|\>$/g, '');
|
|
270
270
|
refType = refType.substring(0, refType.lastIndexOf('.'));
|
|
@@ -541,6 +541,14 @@ function processGraph(schemas) {
|
|
|
541
541
|
else if (info[0] == "Edm") {
|
|
542
542
|
returnType = getType(returnType);
|
|
543
543
|
}
|
|
544
|
+
// Else, see if this is a column
|
|
545
|
+
else if (name == "column") {
|
|
546
|
+
returnType = "ComplexTypes.columnDefinition";
|
|
547
|
+
}
|
|
548
|
+
// Else, see if this is a column array
|
|
549
|
+
else if (name == "columns") {
|
|
550
|
+
returnType = "ComplexTypes.columnDefinition[]";
|
|
551
|
+
}
|
|
544
552
|
|
|
545
553
|
// Update the collection
|
|
546
554
|
isCollection ? returnType += "[]" : null;
|
|
@@ -556,7 +564,7 @@ function processGraph(schemas) {
|
|
|
556
564
|
// Create the endpoints
|
|
557
565
|
let content = [
|
|
558
566
|
"import { IBaseExecution } from \"../../base\";",
|
|
559
|
-
"import * as EntityTypes from \"./entityTypes.d\"
|
|
567
|
+
"import * as EntityTypes from \"./entityTypes.d\";\n"
|
|
560
568
|
];
|
|
561
569
|
for (let name in endPoints) {
|
|
562
570
|
let endPoint = endPoints[name];
|
|
@@ -585,10 +593,11 @@ ${methods.join('\n')}
|
|
|
585
593
|
|
|
586
594
|
// Append the export of the enums
|
|
587
595
|
fs.appendFileSync("lib/microsoft/graph/index.d.ts", [
|
|
588
|
-
'
|
|
589
|
-
'
|
|
596
|
+
'import * as API from "./api";',
|
|
597
|
+
'import * as ComplexTypes from "./complexTypes";',
|
|
598
|
+
'import * as Enums from "./enumTypes";',
|
|
599
|
+
'export { API, ComplexTypes, Enums }',
|
|
590
600
|
'export * from "./entityTypes";',
|
|
591
|
-
'export * as Enums from "./enumTypes";'
|
|
592
601
|
].join('\n'));
|
|
593
602
|
|
|
594
603
|
// Append the graph endpoint
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gd-sprest-def",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "TypeScript definition files generated from the $metadata REST endpoint in SharePoint.",
|
|
5
5
|
"author": "Gunjan Datta <me@dattabase.com> (https://gunjandatta.github.io)",
|
|
6
6
|
"license": "MIT",
|
package/pnpm-lock.yaml
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
devDependencies:
|
|
2
|
+
rimraf: 2.7.1
|
|
3
|
+
xml2js: 0.4.23
|
|
4
|
+
lockfileVersion: 5.2
|
|
5
|
+
packages:
|
|
6
|
+
/balanced-match/1.0.2:
|
|
7
|
+
dev: true
|
|
8
|
+
resolution:
|
|
9
|
+
integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
|
10
|
+
/brace-expansion/1.1.11:
|
|
11
|
+
dependencies:
|
|
12
|
+
balanced-match: 1.0.2
|
|
13
|
+
concat-map: 0.0.1
|
|
14
|
+
dev: true
|
|
15
|
+
resolution:
|
|
16
|
+
integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
|
17
|
+
/concat-map/0.0.1:
|
|
18
|
+
dev: true
|
|
19
|
+
resolution:
|
|
20
|
+
integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
|
21
|
+
/fs.realpath/1.0.0:
|
|
22
|
+
dev: true
|
|
23
|
+
resolution:
|
|
24
|
+
integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
|
25
|
+
/glob/7.2.3:
|
|
26
|
+
dependencies:
|
|
27
|
+
fs.realpath: 1.0.0
|
|
28
|
+
inflight: 1.0.6
|
|
29
|
+
inherits: 2.0.4
|
|
30
|
+
minimatch: 3.1.2
|
|
31
|
+
once: 1.4.0
|
|
32
|
+
path-is-absolute: 1.0.1
|
|
33
|
+
dev: true
|
|
34
|
+
resolution:
|
|
35
|
+
integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
|
36
|
+
/inflight/1.0.6:
|
|
37
|
+
dependencies:
|
|
38
|
+
once: 1.4.0
|
|
39
|
+
wrappy: 1.0.2
|
|
40
|
+
dev: true
|
|
41
|
+
resolution:
|
|
42
|
+
integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
|
|
43
|
+
/inherits/2.0.4:
|
|
44
|
+
dev: true
|
|
45
|
+
resolution:
|
|
46
|
+
integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
|
47
|
+
/minimatch/3.1.2:
|
|
48
|
+
dependencies:
|
|
49
|
+
brace-expansion: 1.1.11
|
|
50
|
+
dev: true
|
|
51
|
+
resolution:
|
|
52
|
+
integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
|
|
53
|
+
/once/1.4.0:
|
|
54
|
+
dependencies:
|
|
55
|
+
wrappy: 1.0.2
|
|
56
|
+
dev: true
|
|
57
|
+
resolution:
|
|
58
|
+
integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
|
|
59
|
+
/path-is-absolute/1.0.1:
|
|
60
|
+
dev: true
|
|
61
|
+
engines:
|
|
62
|
+
node: '>=0.10.0'
|
|
63
|
+
resolution:
|
|
64
|
+
integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
|
|
65
|
+
/rimraf/2.7.1:
|
|
66
|
+
dependencies:
|
|
67
|
+
glob: 7.2.3
|
|
68
|
+
dev: true
|
|
69
|
+
hasBin: true
|
|
70
|
+
resolution:
|
|
71
|
+
integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
|
|
72
|
+
/sax/1.2.4:
|
|
73
|
+
dev: true
|
|
74
|
+
resolution:
|
|
75
|
+
integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
|
|
76
|
+
/wrappy/1.0.2:
|
|
77
|
+
dev: true
|
|
78
|
+
resolution:
|
|
79
|
+
integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
|
80
|
+
/xml2js/0.4.23:
|
|
81
|
+
dependencies:
|
|
82
|
+
sax: 1.2.4
|
|
83
|
+
xmlbuilder: 11.0.1
|
|
84
|
+
dev: true
|
|
85
|
+
engines:
|
|
86
|
+
node: '>=4.0.0'
|
|
87
|
+
resolution:
|
|
88
|
+
integrity: sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==
|
|
89
|
+
/xmlbuilder/11.0.1:
|
|
90
|
+
dev: true
|
|
91
|
+
engines:
|
|
92
|
+
node: '>=4.0'
|
|
93
|
+
resolution:
|
|
94
|
+
integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==
|
|
95
|
+
specifiers:
|
|
96
|
+
rimraf: ^2.6.2
|
|
97
|
+
xml2js: ^0.4.19
|