gd-sprest-def 1.9.3 → 1.9.5

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
@@ -49,13 +49,13 @@ module.exports = {
49
49
  },
50
50
  {
51
51
  name: "update",
52
- argNames: [{ name: "values", type: "{ roles: string[] }" }]
52
+ argNames: [{ name: "values", type: "{ roles: string[], grantedToIdentities?: [{ application: { id: string, displayName?: string } }] }" }]
53
53
  }
54
54
  ],
55
55
  permissionCollection: [
56
56
  {
57
57
  name: "add",
58
- argNames: [{ name: "values", type: "{ roles: string[], grantedToIdentities: { application: { id: string, displayName?: string } } }" }]
58
+ argNames: [{ name: "values", type: "{ roles: string[], grantedToIdentities: [{ application: { id: string, displayName?: string } }] }" }]
59
59
  }
60
60
  ],
61
61
  listItem: [
@@ -12465,16 +12465,16 @@ export interface permissionProps extends entityProps {
12465
12465
  }
12466
12466
  export interface permissionMethods extends entityMethods {
12467
12467
  delete(): IBaseExecution<void>;
12468
- update(values: { roles: string[] }): IBaseExecution<void>;
12468
+ update(values: { roles: string[], grantedToIdentities?: [{ application: { id: string, displayName?: string } }] }): IBaseExecution<void>;
12469
12469
  grant(roles, recipients): IBaseExecution<permission[]>;
12470
12470
  }
12471
12471
  export interface permissionOData extends entityOData {
12472
12472
  delete: void;
12473
- update(values: { roles: string[] }): IBaseExecution<void>;
12473
+ update(values: { roles: string[], grantedToIdentities?: [{ application: { id: string, displayName?: string } }] }): IBaseExecution<void>;
12474
12474
  grant(roles, recipients): IBaseExecution<permission[]>;
12475
12475
  }
12476
12476
  export interface permissionCollection extends IBaseCollection<permission, permissionOData & permissionProps> {
12477
- add(values: { roles: string[], grantedToIdentities: { application: { id: string, displayName?: string } } }):IBaseExecution<void>
12477
+ add(values: { roles: string[], grantedToIdentities: [{ application: { id: string, displayName?: string } }] }):IBaseExecution<void>
12478
12478
  }
12479
12479
  /*********************************************
12480
12480
  * permissionGrantConditionSet
package/lib/mapperv2.ts CHANGED
@@ -7886,7 +7886,7 @@ export const Mapper: IMapper = {
7886
7886
  },
7887
7887
  permissions: {
7888
7888
  query: { argNames: ["oData"], requestType: RequestType.OData },
7889
- add: { argNames: ["values"], requestType: RequestType.PostWithArgsInBody },
7889
+ add: { argNames: ["values"], requestType: RequestType.PostBodyNoArgs },
7890
7890
  },
7891
7891
  permissionGrantConditionSet: {
7892
7892
  properties: [
package/main.js CHANGED
@@ -808,7 +808,7 @@ export interface ${name}Collection extends IBaseCollection<${name}, ${name}OData
808
808
  collectionInterface += `\n\t${collectionMethod.name}(${collectionMethodArgs.join(', ')}):IBaseExecution<${collectionMethod.returnType || "void"}>`;
809
809
 
810
810
  // Add the mapper information
811
- collectionMapper += `${collectionMapper ? "\n" : ""}\t\t${collectionMethod.name}: { argNames: ["${collectionMethodArgNames.join('", "')}"], requestType: RequestType.PostWithArgsInBody ${collectionMethod.returnType ? ", returnType: " + collectionMethod.returnType : ""} },`;
811
+ collectionMapper += `${collectionMapper ? "\n" : ""}\t\t${collectionMethod.name}: { argNames: ["${collectionMethodArgNames.join('", "')}"], requestType: RequestType.PostBodyNoArgs ${collectionMethod.returnType ? ", returnType: " + collectionMethod.returnType : ""} },`;
812
812
  collectionMapperDef += `${collectionMapperDef ? "\n" : ""}\t\t${collectionMethod.name}: IMapperMethod${collectionMethodArgs ? " & { argNames: [\"" + collectionMethodArgNames.join('", "') + "\"]" : ""} }`;
813
813
  }
814
814
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-sprest-def",
3
- "version": "1.9.3",
3
+ "version": "1.9.5",
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",