@@ -9,12 +9,12 @@ declare class DynamicsWebApi {
99 */
1010 constructor ( config ?: DynamicsWebApi . Config ) ;
1111 /**
12- * Sets DynamicsWebApi configuration parameters.
13- *
14- * @param config - configuration object
15- * @example
16- dynamicsWebApi.setConfig({ webApiVersion: '9.1' });
17- */
12+ * Sets DynamicsWebApi configuration parameters.
13+ *
14+ * @param config - configuration object
15+ * @example
16+ dynamicsWebApi.setConfig({ webApiVersion: '9.1' });
17+ */
1818 setConfig ( config : DynamicsWebApi . Config ) : void ;
1919 /**
2020 * Sends an asynchronous request to create a new record.
@@ -38,7 +38,7 @@ declare class DynamicsWebApi {
3838 *}.catch(function (error) {
3939 *});
4040 */
41- createRequest < T = any > ( request : DynamicsWebApi . CreateRequest ) : Promise < T > ;
41+ createRequest < T = any > ( request : DynamicsWebApi . CreateRequest < T > ) : Promise < T > ;
4242 /**
4343 * Sends an asynchronous request to create a new record.
4444 *
@@ -58,13 +58,13 @@ declare class DynamicsWebApi {
5858 *}.catch(function (error) {
5959 *});
6060 */
61- create < T = any > ( object : Object , collection : string , prefer ?: string | string [ ] , select ?: string [ ] ) : Promise < T > ;
61+ create < T = any > ( object : T , collection : string , prefer ?: string | string [ ] , select ?: string [ ] ) : Promise < T > ;
6262 /**
6363 * Sends an asynchronous request to update a record.
6464 *
6565 * @param request - An object that represents all possible options for a current request.
6666 */
67- updateRequest < T = any > ( request : DynamicsWebApi . UpdateRequest ) : Promise < T > ;
67+ updateRequest < T = any > ( request : DynamicsWebApi . UpdateRequest < T > ) : Promise < T > ;
6868 /**
6969 * Sends an asynchronous request to update a record.
7070 *
@@ -74,7 +74,7 @@ declare class DynamicsWebApi {
7474 * @param prefer - If set to "return=representation" the function will return an updated object
7575 * @param select - An Array representing the $select Query Option to control which attributes will be returned.
7676 */
77- update < T = any > ( key : string , collection : string , object : Object , prefer ?: string | string [ ] , select ?: string [ ] ) : Promise < T > ;
77+ update < T = any > ( key : string , collection : string , object : T , prefer ?: string | string [ ] , select ?: string [ ] ) : Promise < T > ;
7878 /**
7979 * Sends an asynchronous request to update a single value in the record.
8080 *
@@ -84,7 +84,13 @@ declare class DynamicsWebApi {
8484 * @param prefer - If set to "return=representation" the function will return an updated object
8585 * @param select - An Array representing the $select Query Option to control which attributes will be returned.
8686 */
87- updateSingleProperty < T = any > ( key : string , collection : string , keyValuePair : Object , prefer ?: string | string [ ] , select ?: string [ ] ) : Promise < T > ;
87+ updateSingleProperty < T = any > (
88+ key : string ,
89+ collection : string ,
90+ keyValuePair : { [ key : string ] : any } ,
91+ prefer ?: string | string [ ] ,
92+ select ?: string [ ]
93+ ) : Promise < T > ;
8894 /**
8995 * Sends an asynchronous request to delete a record.
9096 *
@@ -119,7 +125,7 @@ declare class DynamicsWebApi {
119125 *
120126 * @param request - An object that represents all possible options for a current request.
121127 */
122- upsertRequest < T = any > ( request : DynamicsWebApi . UpsertRequest ) : Promise < T > ;
128+ upsertRequest < T = any > ( request : DynamicsWebApi . UpsertRequest < T > ) : Promise < T > ;
123129 /**
124130 * Sends an asynchronous request to upsert a record.
125131 *
@@ -129,7 +135,7 @@ declare class DynamicsWebApi {
129135 * @param prefer - If set to "return=representation" the function will return an updated object
130136 * @param select - An Array representing the $select Query Option to control which attributes will be returned.
131137 */
132- upsert < T = any > ( key : string , collection : string , object : Object , prefer ?: string | string [ ] , select ?: string [ ] ) : Promise < T > ;
138+ upsert < T = any > ( key : string , collection : string , object : T , prefer ?: string | string [ ] , select ?: string [ ] ) : Promise < T > ;
133139 /**
134140 * Sends an asynchronous request to count records. IMPORTANT! The count value does not represent the total number of entities in the system. It is limited by the maximum number of entities that can be returned. Returns: Number
135141 *
@@ -765,7 +771,7 @@ declare namespace DynamicsWebApi {
765771
766772 interface MultipleResponse < T = any > {
767773 /**Multiple respone entities */
768- value ? : T [ ] ;
774+ value : T [ ] ;
769775 oDataCount ?: number ;
770776 oDataContext ?: string ;
771777 }
0 commit comments