gd-sprest-def 1.5.2 → 1.5.4
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/base.d.ts +3 -0
- package/custom.js +19 -0
- package/lib/SP/WebParts/entitytypes.d.ts +1 -1
- package/lib/SP/entitytypes.d.ts +14 -6
- package/lib/base.d.ts +3 -0
- package/lib/mapper.d.ts +14 -0
- package/lib/mapper.ts +13 -0
- package/package.json +1 -1
package/base.d.ts
CHANGED
|
@@ -85,6 +85,9 @@ export interface IBaseQuery<Type = any, Result = Type> extends IBaseExecution<Ty
|
|
|
85
85
|
* Base Result
|
|
86
86
|
*/
|
|
87
87
|
export interface IBaseResult {
|
|
88
|
+
/** The etag value from the object's metadata. */
|
|
89
|
+
etag?: string;
|
|
90
|
+
|
|
88
91
|
/** True, if the object exists, false otherwise. */
|
|
89
92
|
existsFl: boolean;
|
|
90
93
|
|
package/custom.js
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
* Custom Methods
|
|
3
3
|
*/
|
|
4
4
|
module.exports = {
|
|
5
|
+
// All Properties (Property Bag)
|
|
6
|
+
"Collection(SP.PropertyValues)": [
|
|
7
|
+
{
|
|
8
|
+
name: "add",
|
|
9
|
+
returnType: "any",
|
|
10
|
+
params: [
|
|
11
|
+
{ $: { Name: "key", Type: "string" }, },
|
|
12
|
+
{ $: { Name: "value", Type: "string" }, }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: "remove",
|
|
17
|
+
returnType: "any",
|
|
18
|
+
params: [
|
|
19
|
+
{ $: { Name: "key", Type: "string" }, }
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
|
|
5
24
|
// Attachments
|
|
6
25
|
"Collection(SP.Attachment)": [
|
|
7
26
|
{
|
|
@@ -25,7 +25,7 @@ export interface WebPartCollections {
|
|
|
25
25
|
* WebPartOData
|
|
26
26
|
**********************************************/
|
|
27
27
|
export interface WebPartOData extends Base.IBaseResult, WebPart {
|
|
28
|
-
Properties: SP.PropertyValues & SP.PropertyValuesCollections;
|
|
28
|
+
Properties: SP.PropertyValues & SP.PropertyValuesCollections & SP.PropertyValuesCollectionMethods;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/*********************************************
|
package/lib/SP/entitytypes.d.ts
CHANGED
|
@@ -875,7 +875,7 @@ export interface AlertCollectionMethods {
|
|
|
875
875
|
* AlertOData
|
|
876
876
|
**********************************************/
|
|
877
877
|
export interface AlertOData extends Base.IBaseResult, AlertProps, AlertMethods {
|
|
878
|
-
AllProperties: SP.PropertyValues & SP.PropertyValuesCollections;
|
|
878
|
+
AllProperties: SP.PropertyValues & SP.PropertyValuesCollections & SP.PropertyValuesCollectionMethods;
|
|
879
879
|
Item: SP.ListItem & SP.ListItemCollections & SP.ListItemCollectionMethods;
|
|
880
880
|
List: SP.List & SP.ListCollections & SP.ListCollectionMethods;
|
|
881
881
|
User: SP.User & SP.UserCollections & SP.UserCollectionMethods;
|
|
@@ -898,10 +898,18 @@ export interface PropertyValues {
|
|
|
898
898
|
/*********************************************
|
|
899
899
|
* PropertyValuesCollections
|
|
900
900
|
**********************************************/
|
|
901
|
-
export interface PropertyValuesCollections {
|
|
901
|
+
export interface PropertyValuesCollections extends PropertyValuesCollectionMethods {
|
|
902
902
|
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
+
/*********************************************
|
|
906
|
+
* PropertyValuesCollectionMethods
|
|
907
|
+
**********************************************/
|
|
908
|
+
export interface PropertyValuesCollectionMethods {
|
|
909
|
+
add(key?: string, value?: string): Base.IBaseExecution<any>;
|
|
910
|
+
remove(key?: string): Base.IBaseExecution<any>;
|
|
911
|
+
}
|
|
912
|
+
|
|
905
913
|
/*********************************************
|
|
906
914
|
* ISecurableObject
|
|
907
915
|
**********************************************/
|
|
@@ -1253,7 +1261,7 @@ export interface ListItemOData extends SP.SecurableObjectOData, Base.IBaseResult
|
|
|
1253
1261
|
Folder: SP.Folder & SP.FolderCollections & SP.FolderCollectionMethods;
|
|
1254
1262
|
LikedByInformation: Microsoft.SharePoint.Likes.likedByInformation & Microsoft.SharePoint.Likes.likedByInformationCollections;
|
|
1255
1263
|
ParentList: SP.List & SP.ListCollections & SP.ListCollectionMethods;
|
|
1256
|
-
Properties: SP.PropertyValues & SP.PropertyValuesCollections;
|
|
1264
|
+
Properties: SP.PropertyValues & SP.PropertyValuesCollections & SP.PropertyValuesCollectionMethods;
|
|
1257
1265
|
Versions: Base.IBaseResults<SP.ListItemVersion> & SP.ListItemVersionCollectionMethods;
|
|
1258
1266
|
}
|
|
1259
1267
|
|
|
@@ -1966,7 +1974,7 @@ export interface FileOData extends Base.IBaseResult, FileProps, FileMethods {
|
|
|
1966
1974
|
ListItemAllFields: SP.ListItem & SP.ListItemCollections & SP.ListItemCollectionMethods;
|
|
1967
1975
|
LockedByUser: SP.User & SP.UserCollections & SP.UserCollectionMethods;
|
|
1968
1976
|
ModifiedBy: SP.User & SP.UserCollections & SP.UserCollectionMethods;
|
|
1969
|
-
Properties: SP.PropertyValues & SP.PropertyValuesCollections;
|
|
1977
|
+
Properties: SP.PropertyValues & SP.PropertyValuesCollections & SP.PropertyValuesCollectionMethods;
|
|
1970
1978
|
VersionEvents: Base.IBaseResults<SP.FileVersionEvent>;
|
|
1971
1979
|
VersionExpirationReport: Base.IBaseResults<SP.FileVersion> & SP.FileVersionCollectionMethods;
|
|
1972
1980
|
Versions: Base.IBaseResults<SP.FileVersion> & SP.FileVersionCollectionMethods;
|
|
@@ -2349,7 +2357,7 @@ export interface FolderOData extends Base.IBaseResult, FolderProps, FolderMethod
|
|
|
2349
2357
|
Files: Base.IBaseResults<SP.File> & SP.FileCollectionMethods;
|
|
2350
2358
|
ListItemAllFields: SP.ListItem & SP.ListItemCollections & SP.ListItemCollectionMethods;
|
|
2351
2359
|
ParentFolder: SP.Folder & SP.FolderCollections & SP.FolderCollectionMethods;
|
|
2352
|
-
Properties: SP.PropertyValues & SP.PropertyValuesCollections;
|
|
2360
|
+
Properties: SP.PropertyValues & SP.PropertyValuesCollections & SP.PropertyValuesCollectionMethods;
|
|
2353
2361
|
StorageMetrics: SP.StorageMetrics & SP.StorageMetricsCollections;
|
|
2354
2362
|
Folders: Base.IBaseResults<SP.Folder> & SP.FolderCollectionMethods;
|
|
2355
2363
|
}
|
|
@@ -3285,7 +3293,7 @@ export interface WebOData extends SP.SecurableObjectOData, Base.IBaseResult, Web
|
|
|
3285
3293
|
Activities: Base.IBaseResults<Microsoft.SharePoint.Activities.SPActivityEntity>;
|
|
3286
3294
|
ActivityLogger: Microsoft.SharePoint.Internal.ActivityLogger & Microsoft.SharePoint.Internal.ActivityLoggerCollections;
|
|
3287
3295
|
Alerts: Base.IBaseResults<SP.Alert> & SP.AlertCollectionMethods;
|
|
3288
|
-
AllProperties: SP.PropertyValues & SP.PropertyValuesCollections;
|
|
3296
|
+
AllProperties: SP.PropertyValues & SP.PropertyValuesCollections & SP.PropertyValuesCollectionMethods;
|
|
3289
3297
|
AppTiles: Base.IBaseResults<SP.AppTile>;
|
|
3290
3298
|
AssociatedMemberGroup: SP.Group & SP.GroupCollections & SP.GroupCollectionMethods;
|
|
3291
3299
|
AssociatedOwnerGroup: SP.Group & SP.GroupCollections & SP.GroupCollectionMethods;
|
package/lib/base.d.ts
CHANGED
|
@@ -85,6 +85,9 @@ export interface IBaseQuery<Type = any, Result = Type> extends IBaseExecution<Ty
|
|
|
85
85
|
* Base Result
|
|
86
86
|
*/
|
|
87
87
|
export interface IBaseResult {
|
|
88
|
+
/** The etag value from the object's metadata. */
|
|
89
|
+
etag?: string;
|
|
90
|
+
|
|
88
91
|
/** True, if the object exists, false otherwise. */
|
|
89
92
|
existsFl: boolean;
|
|
90
93
|
|
package/lib/mapper.d.ts
CHANGED
|
@@ -7337,6 +7337,20 @@ export interface IMapper {
|
|
|
7337
7337
|
|
|
7338
7338
|
}
|
|
7339
7339
|
|
|
7340
|
+
"SP.PropertyValues.Collection": {
|
|
7341
|
+
properties?: Array<string>;
|
|
7342
|
+
add: IMapperMethod & {
|
|
7343
|
+
argNames: [ "key", "value" ],
|
|
7344
|
+
},
|
|
7345
|
+
|
|
7346
|
+
query: IMapperMethod & { argNames: ["oData"] },
|
|
7347
|
+
|
|
7348
|
+
remove: IMapperMethod & {
|
|
7349
|
+
argNames: [ "key" ],
|
|
7350
|
+
},
|
|
7351
|
+
|
|
7352
|
+
}
|
|
7353
|
+
|
|
7340
7354
|
"SP.Publishing.AnnouncementsController": {
|
|
7341
7355
|
properties?: Array<string>;
|
|
7342
7356
|
active: IMapperMethod & {
|
package/lib/mapper.ts
CHANGED
|
@@ -7097,6 +7097,19 @@ export const Mapper: IMapper = {
|
|
|
7097
7097
|
|
|
7098
7098
|
},
|
|
7099
7099
|
|
|
7100
|
+
"SP.PropertyValues.Collection": {
|
|
7101
|
+
add: {
|
|
7102
|
+
argNames: [ "key", "value" ],
|
|
7103
|
+
},
|
|
7104
|
+
|
|
7105
|
+
query: { argNames: ["oData"], requestType: RequestType.OData },
|
|
7106
|
+
|
|
7107
|
+
remove: {
|
|
7108
|
+
argNames: [ "key" ],
|
|
7109
|
+
},
|
|
7110
|
+
|
|
7111
|
+
},
|
|
7112
|
+
|
|
7100
7113
|
"SP.Publishing.AnnouncementsController": {
|
|
7101
7114
|
active: {
|
|
7102
7115
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gd-sprest-def",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
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",
|