gd-sprest-def 1.2.9 → 1.3.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.
@@ -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<columns>;
202
- welcomePageColumns: () => IBaseExecution<columns>;
201
+ sharedColumns: () => IBaseExecution<ComplexTypes.columnDefinition[]>;
202
+ welcomePageColumns: () => IBaseExecution<ComplexTypes.columnDefinition[]>;
203
203
  }
204
204
  /*********************************************
205
205
  * schemaExtensions
@@ -1,4 +1,5 @@
1
- export * as API from "./api";
2
- export * as ComplexTypes from "./complexTypes";
3
- export * from "./entityTypes";
4
- export * as Enums from "./enumTypes";
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";
package/main.js CHANGED
@@ -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\"\n"
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
- 'export * as API from "./api";',
589
- 'export * as ComplexTypes from "./complexTypes";',
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.2.9",
3
+ "version": "1.3.0",
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",