gd-sprest-def 1.8.5 → 1.8.7

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/customV2.js CHANGED
@@ -3,30 +3,59 @@
3
3
  */
4
4
  module.exports = {
5
5
  columnDefinition: [
6
+ {
7
+ name: "delete"
8
+ },
6
9
  {
7
10
  name: "update",
8
11
  argNames: [{ name: "values", type: "any" }]
9
12
  }
10
13
  ],
11
14
  contentType: [
15
+ {
16
+ name: "delete"
17
+ },
12
18
  {
13
19
  name: "update",
14
20
  argNames: [{ name: "values", type: "any" }]
15
21
  }
16
22
  ],
23
+ driveItem: [
24
+ {
25
+ name: "delete"
26
+ },
27
+ {
28
+ name: "setSensitivityLabel",
29
+ argNames: [
30
+ { name: "actionSource", type: "string" },
31
+ { name: "assignmentMethod", type: "string" },
32
+ { name: "id", type: "string" },
33
+ { name: "justificationText", type: "string" }
34
+ ]
35
+ }
36
+ ],
17
37
  list: [
38
+ {
39
+ name: "delete"
40
+ },
18
41
  {
19
42
  name: "update",
20
43
  argNames: [{ name: "values", type: "any" }]
21
44
  }
22
45
  ],
23
46
  permission: [
47
+ {
48
+ name: "delete"
49
+ },
24
50
  {
25
51
  name: "update",
26
52
  argNames: [{ name: "values", type: "any" }]
27
53
  }
28
54
  ],
29
55
  listItem: [
56
+ {
57
+ name: "delete"
58
+ },
30
59
  {
31
60
  name: "update",
32
61
  argNames: [{ name: "values", type: "any" }]
@@ -3761,11 +3761,13 @@ export interface columnDefinitionProps extends entityProps {
3761
3761
  }
3762
3762
  export interface columnDefinitionMethods extends entityMethods {
3763
3763
  sourceColumn(): IBaseQuery<columnDefinition> & columnDefinitionMethods;
3764
- update(values: any): IBaseQuery<void>;
3764
+ delete(): IBaseExecution<void>;
3765
+ update(values: any): IBaseExecution<void>;
3765
3766
  }
3766
3767
  export interface columnDefinitionOData extends entityOData {
3767
3768
  sourceColumn: columnDefinition;
3768
- update(values: any): IBaseQuery<void>;
3769
+ delete: void;
3770
+ update(values: any): IBaseExecution<void>;
3769
3771
  }
3770
3772
  export interface columnDefinitionCollection extends IBaseCollection<columnDefinition, columnDefinitionOData & columnDefinitionProps> {
3771
3773
  add(values?: any): IBaseExecution<columnDefinition>;
@@ -4127,7 +4129,8 @@ export interface contentTypeMethods extends entityMethods {
4127
4129
  columnPositions(id: string | number): IBaseQuery<columnDefinition> & columnDefinitionMethods;
4128
4130
  columns(): columnDefinitionCollection;
4129
4131
  columns(id: string | number): IBaseQuery<columnDefinition> & columnDefinitionMethods;
4130
- update(values: any): IBaseQuery<void>;
4132
+ delete(): IBaseExecution<void>;
4133
+ update(values: any): IBaseExecution<void>;
4131
4134
  publish(): IBaseExecution<void>;
4132
4135
  unpublish(): IBaseExecution<void>;
4133
4136
  associateWithHubSites(hubSiteUrls, propagateToExistingLists): IBaseExecution<void>;
@@ -4140,7 +4143,8 @@ export interface contentTypeOData extends entityOData {
4140
4143
  columnLinks: IBaseResults<columnLink>;
4141
4144
  columnPositions: IBaseResults<columnDefinition>;
4142
4145
  columns: IBaseResults<columnDefinition>;
4143
- update(values: any): IBaseQuery<void>;
4146
+ delete: void;
4147
+ update(values: any): IBaseExecution<void>;
4144
4148
  publish(): IBaseExecution<void>;
4145
4149
  unpublish(): IBaseExecution<void>;
4146
4150
  associateWithHubSites(hubSiteUrls, propagateToExistingLists): IBaseExecution<void>;
@@ -6265,6 +6269,8 @@ export interface driveItemMethods extends baseItemMethods {
6265
6269
  thumbnails(id: string | number): IBaseQuery<thumbnailSet> & thumbnailSetMethods;
6266
6270
  versions(): driveItemVersionCollection;
6267
6271
  versions(id: string | number): IBaseQuery<driveItemVersion> & driveItemVersionMethods;
6272
+ delete(): IBaseExecution<void>;
6273
+ setSensitivityLabel(actionSource: string, assignmentMethod: string, id: string, justificationText: string): IBaseExecution<void>;
6268
6274
  restore(parentReference, name): IBaseExecution<driveItem>;
6269
6275
  copy(name, parentReference): IBaseExecution<driveItem>;
6270
6276
  createUploadSession(item, deferCommit): IBaseExecution<ComplexTypes.uploadSession>;
@@ -6294,6 +6300,8 @@ export interface driveItemOData extends baseItemOData {
6294
6300
  subscriptions: IBaseResults<subscription>;
6295
6301
  thumbnails: IBaseResults<thumbnailSet>;
6296
6302
  versions: IBaseResults<driveItemVersion>;
6303
+ delete: void;
6304
+ setSensitivityLabel(actionSource: string, assignmentMethod: string, id: string, justificationText: string): IBaseExecution<void>;
6297
6305
  restore(parentReference, name): IBaseExecution<driveItem>;
6298
6306
  copy(name, parentReference): IBaseExecution<driveItem>;
6299
6307
  createUploadSession(item, deferCommit): IBaseExecution<ComplexTypes.uploadSession>;
@@ -9863,7 +9871,8 @@ export interface listMethods extends baseItemMethods {
9863
9871
  operations(id: string | number): IBaseQuery<richLongRunningOperation> & richLongRunningOperationMethods;
9864
9872
  subscriptions(): subscriptionCollection;
9865
9873
  subscriptions(id: string | number): IBaseQuery<subscription> & subscriptionMethods;
9866
- update(values: any): IBaseQuery<void>;
9874
+ delete(): IBaseExecution<void>;
9875
+ update(values: any): IBaseExecution<void>;
9867
9876
  }
9868
9877
  export interface listOData extends baseItemOData {
9869
9878
  columns: IBaseResults<columnDefinition>;
@@ -9872,7 +9881,8 @@ export interface listOData extends baseItemOData {
9872
9881
  items: IBaseResults<listItem>;
9873
9882
  operations: IBaseResults<richLongRunningOperation>;
9874
9883
  subscriptions: IBaseResults<subscription>;
9875
- update(values: any): IBaseQuery<void>;
9884
+ delete: void;
9885
+ update(values: any): IBaseExecution<void>;
9876
9886
  }
9877
9887
  export interface listCollection extends IBaseCollection<list, listOData & listProps> {
9878
9888
  add(values?: any): IBaseExecution<list>;
@@ -9893,7 +9903,8 @@ export interface listItemMethods extends baseItemMethods {
9893
9903
  fields(): IBaseQuery<fieldValueSet> & fieldValueSetMethods;
9894
9904
  versions(): listItemVersionCollection;
9895
9905
  versions(id: string | number): IBaseQuery<listItemVersion> & listItemVersionMethods;
9896
- update(values: any): IBaseQuery<void>;
9906
+ delete(): IBaseExecution<void>;
9907
+ update(values: any): IBaseExecution<void>;
9897
9908
  createLink(type, scope, expirationDateTime, password, message, recipients, retainInheritedPermissions, sendNotification): IBaseExecution<permission>;
9898
9909
  getActivitiesByInterval(): itemActivityStat[];
9899
9910
  getActivitiesByInterval(startDateTime, endDateTime, interval): itemActivityStat[];
@@ -9904,7 +9915,8 @@ export interface listItemOData extends baseItemOData {
9904
9915
  driveItem: driveItem;
9905
9916
  fields: fieldValueSet;
9906
9917
  versions: IBaseResults<listItemVersion>;
9907
- update(values: any): IBaseQuery<void>;
9918
+ delete: void;
9919
+ update(values: any): IBaseExecution<void>;
9908
9920
  createLink(type, scope, expirationDateTime, password, message, recipients, retainInheritedPermissions, sendNotification): IBaseExecution<permission>;
9909
9921
  getActivitiesByInterval(): itemActivityStat[];
9910
9922
  getActivitiesByInterval(startDateTime, endDateTime, interval): itemActivityStat[];
@@ -12452,11 +12464,13 @@ export interface permissionProps extends entityProps {
12452
12464
  shareId: string;
12453
12465
  }
12454
12466
  export interface permissionMethods extends entityMethods {
12455
- update(values: any): IBaseQuery<void>;
12467
+ delete(): IBaseExecution<void>;
12468
+ update(values: any): IBaseExecution<void>;
12456
12469
  grant(roles, recipients): IBaseExecution<permission[]>;
12457
12470
  }
12458
12471
  export interface permissionOData extends entityOData {
12459
- update(values: any): IBaseQuery<void>;
12472
+ delete: void;
12473
+ update(values: any): IBaseExecution<void>;
12460
12474
  grant(roles, recipients): IBaseExecution<permission[]>;
12461
12475
  }
12462
12476
  export interface permissionCollection extends IBaseCollection<permission, permissionOData & permissionProps> {
package/lib/mapperv2.d.ts CHANGED
@@ -1459,6 +1459,7 @@ export interface IMapper {
1459
1459
  properties?: Array<string>;
1460
1460
  query: IMapperMethod & { argNames: ["oData"] };
1461
1461
  sourceColumn: IMapperMethod;
1462
+ delete: IMapperMethod;
1462
1463
  update: IMapperMethod & {
1463
1464
  argNames: ["values"]
1464
1465
  };
@@ -1601,6 +1602,7 @@ export interface IMapper {
1601
1602
  columnLinks: IMapperMethod;
1602
1603
  columnPositions: IMapperMethod;
1603
1604
  columns: IMapperMethod;
1605
+ delete: IMapperMethod;
1604
1606
  update: IMapperMethod & {
1605
1607
  argNames: ["values"]
1606
1608
  };
@@ -2489,6 +2491,10 @@ export interface IMapper {
2489
2491
  subscriptions: IMapperMethod;
2490
2492
  thumbnails: IMapperMethod;
2491
2493
  versions: IMapperMethod;
2494
+ delete: IMapperMethod;
2495
+ setSensitivityLabel: IMapperMethod & {
2496
+ argNames: ["actionSource", "assignmentMethod", "id", "justificationText"]
2497
+ };
2492
2498
  restore: IMapperMethod & {
2493
2499
  argNames: ["parentReference", "name"]
2494
2500
  };
@@ -3825,6 +3831,7 @@ export interface IMapper {
3825
3831
  items: IMapperMethod;
3826
3832
  operations: IMapperMethod;
3827
3833
  subscriptions: IMapperMethod;
3834
+ delete: IMapperMethod;
3828
3835
  update: IMapperMethod & {
3829
3836
  argNames: ["values"]
3830
3837
  };
@@ -3841,6 +3848,7 @@ export interface IMapper {
3841
3848
  driveItem: IMapperMethod;
3842
3849
  fields: IMapperMethod;
3843
3850
  versions: IMapperMethod;
3851
+ delete: IMapperMethod;
3844
3852
  update: IMapperMethod & {
3845
3853
  argNames: ["values"]
3846
3854
  };
@@ -4853,6 +4861,7 @@ export interface IMapper {
4853
4861
  permission: {
4854
4862
  properties?: Array<string>;
4855
4863
  query: IMapperMethod & { argNames: ["oData"] };
4864
+ delete: IMapperMethod;
4856
4865
  update: IMapperMethod & {
4857
4866
  argNames: ["values"]
4858
4867
  };
package/lib/mapperv2.ts CHANGED
@@ -2323,6 +2323,8 @@ export const Mapper: IMapper = {
2323
2323
  sourceColumn: {
2324
2324
  returnType: "columnDefinition"
2325
2325
  },
2326
+ delete: {
2327
+ },
2326
2328
  update: {
2327
2329
  argNames: ["values"],
2328
2330
  },
@@ -2545,6 +2547,8 @@ export const Mapper: IMapper = {
2545
2547
  requestType: RequestType.Get,
2546
2548
  returnType: "columnDefinitions"
2547
2549
  },
2550
+ delete: {
2551
+ },
2548
2552
  update: {
2549
2553
  argNames: ["values"],
2550
2554
  },
@@ -4075,6 +4079,11 @@ export const Mapper: IMapper = {
4075
4079
  requestType: RequestType.Get,
4076
4080
  returnType: "driveItemVersions"
4077
4081
  },
4082
+ delete: {
4083
+ },
4084
+ setSensitivityLabel: {
4085
+ argNames: ["actionSource", "assignmentMethod", "id", "justificationText"],
4086
+ },
4078
4087
  restore: {
4079
4088
  argNames: ["parentReference", "name"],
4080
4089
  requestType: RequestType.PostWithArgsInBody,
@@ -6312,6 +6321,8 @@ export const Mapper: IMapper = {
6312
6321
  requestType: RequestType.Get,
6313
6322
  returnType: "subscriptions"
6314
6323
  },
6324
+ delete: {
6325
+ },
6315
6326
  update: {
6316
6327
  argNames: ["values"],
6317
6328
  },
@@ -6341,6 +6352,8 @@ export const Mapper: IMapper = {
6341
6352
  requestType: RequestType.Get,
6342
6353
  returnType: "listItemVersions"
6343
6354
  },
6355
+ delete: {
6356
+ },
6344
6357
  update: {
6345
6358
  argNames: ["values"],
6346
6359
  },
@@ -7860,6 +7873,8 @@ export const Mapper: IMapper = {
7860
7873
 
7861
7874
  ],
7862
7875
  query: { argNames: ["oData"], requestType: RequestType.OData },
7876
+ delete: {
7877
+ },
7863
7878
  update: {
7864
7879
  argNames: ["values"],
7865
7880
  },
package/main.js CHANGED
@@ -107,7 +107,7 @@ function createDirectories(path, namespace) {
107
107
  // See if the directory doesn't exists
108
108
  if (!fs.existsSync(path)) {
109
109
  // Create the directory
110
- fs.mkdir(path, function (err) { });
110
+ fs.mkdirSync(path, function (err) { });
111
111
  }
112
112
  });
113
113
  } else {
@@ -117,7 +117,7 @@ function createDirectories(path, namespace) {
117
117
  // See if the directory doesn't exist
118
118
  if (!fs.existsSync(path)) {
119
119
  // Create the directory
120
- fs.mkdir(path, function (err) { });
120
+ fs.mkdirSync(path, function (err) { });
121
121
  }
122
122
  }
123
123
 
@@ -834,7 +834,7 @@ export interface ${name}Collection extends IBaseCollection<${name}, ${name}OData
834
834
  methodString += `IBaseCollection<${returnTypeName}${!isComplexType ? ", " + baseType + returnTypeName + "OData & " + returnTypeName + "Props" : ""}>${methodsType}${method.returnType2 && getGraphType(method.returnType2, true) ? " & " + getGraphType(method.returnType2, true) : ""};`
835
835
  }
836
836
  } else {
837
- methodString += `IBaseQuery<${returnTypeName}>${methodsType}${method.returnType2 && getGraphType(method.returnType2, true) ? " & " + getGraphType(method.returnType2, true) : ""};`
837
+ methodString += `${returnTypeName == "void" ? "IBaseExecution" : "IBaseQuery"}<${returnTypeName}>${methodsType}${method.returnType2 && getGraphType(method.returnType2, true) ? " & " + getGraphType(method.returnType2, true) : ""};`
838
838
  };
839
839
  methods.push(methodString);
840
840
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-sprest-def",
3
- "version": "1.8.5",
3
+ "version": "1.8.7",
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",