@superoffice/webapi 11.3.1349 → 11.4.1157

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.
Files changed (69) hide show
  1. package/dist/cjs/AppointmentAgent.d.ts +7 -0
  2. package/dist/cjs/AppointmentAgent.d.ts.map +1 -1
  3. package/dist/cjs/AppointmentAgent.js +24 -0
  4. package/dist/cjs/AppointmentAgent.js.map +1 -1
  5. package/dist/cjs/Carriers.d.ts +166 -40
  6. package/dist/cjs/Carriers.d.ts.map +1 -1
  7. package/dist/cjs/Converters.d.ts +6 -3
  8. package/dist/cjs/Converters.d.ts.map +1 -1
  9. package/dist/cjs/Converters.js +100 -61
  10. package/dist/cjs/Converters.js.map +1 -1
  11. package/dist/cjs/DiagnosticsAgent.d.ts +15 -0
  12. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
  13. package/dist/cjs/DiagnosticsAgent.js +33 -0
  14. package/dist/cjs/DiagnosticsAgent.js.map +1 -1
  15. package/dist/cjs/PersonAgent.d.ts +20 -3
  16. package/dist/cjs/PersonAgent.d.ts.map +1 -1
  17. package/dist/cjs/PersonAgent.js +35 -0
  18. package/dist/cjs/PersonAgent.js.map +1 -1
  19. package/dist/cjs/SelectionAgent.d.ts +19 -2
  20. package/dist/cjs/SelectionAgent.d.ts.map +1 -1
  21. package/dist/cjs/SelectionAgent.js +35 -0
  22. package/dist/cjs/SelectionAgent.js.map +1 -1
  23. package/dist/cjs/TicketAgent.d.ts +15 -0
  24. package/dist/cjs/TicketAgent.d.ts.map +1 -1
  25. package/dist/cjs/TicketAgent.js +33 -0
  26. package/dist/cjs/TicketAgent.js.map +1 -1
  27. package/dist/cjs/UserAgent.d.ts +16 -0
  28. package/dist/cjs/UserAgent.d.ts.map +1 -1
  29. package/dist/cjs/UserAgent.js +34 -0
  30. package/dist/cjs/UserAgent.js.map +1 -1
  31. package/dist/esm/AppointmentAgent.d.ts +7 -0
  32. package/dist/esm/AppointmentAgent.d.ts.map +1 -1
  33. package/dist/esm/AppointmentAgent.js +24 -0
  34. package/dist/esm/AppointmentAgent.js.map +1 -1
  35. package/dist/esm/Carriers.d.ts +166 -40
  36. package/dist/esm/Carriers.d.ts.map +1 -1
  37. package/dist/esm/Converters.d.ts +6 -3
  38. package/dist/esm/Converters.d.ts.map +1 -1
  39. package/dist/esm/Converters.js +70 -34
  40. package/dist/esm/Converters.js.map +1 -1
  41. package/dist/esm/DiagnosticsAgent.d.ts +15 -0
  42. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
  43. package/dist/esm/DiagnosticsAgent.js +33 -0
  44. package/dist/esm/DiagnosticsAgent.js.map +1 -1
  45. package/dist/esm/PersonAgent.d.ts +20 -3
  46. package/dist/esm/PersonAgent.d.ts.map +1 -1
  47. package/dist/esm/PersonAgent.js +35 -0
  48. package/dist/esm/PersonAgent.js.map +1 -1
  49. package/dist/esm/SelectionAgent.d.ts +19 -2
  50. package/dist/esm/SelectionAgent.d.ts.map +1 -1
  51. package/dist/esm/SelectionAgent.js +35 -0
  52. package/dist/esm/SelectionAgent.js.map +1 -1
  53. package/dist/esm/TicketAgent.d.ts +15 -0
  54. package/dist/esm/TicketAgent.d.ts.map +1 -1
  55. package/dist/esm/TicketAgent.js +33 -0
  56. package/dist/esm/TicketAgent.js.map +1 -1
  57. package/dist/esm/UserAgent.d.ts +16 -0
  58. package/dist/esm/UserAgent.d.ts.map +1 -1
  59. package/dist/esm/UserAgent.js +34 -0
  60. package/dist/esm/UserAgent.js.map +1 -1
  61. package/package.json +3 -3
  62. package/src/AppointmentAgent.ts +30 -0
  63. package/src/Carriers.ts +221 -56
  64. package/src/Converters.ts +84 -41
  65. package/src/DiagnosticsAgent.ts +56 -0
  66. package/src/PersonAgent.ts +63 -3
  67. package/src/SelectionAgent.ts +62 -2
  68. package/src/TicketAgent.ts +56 -0
  69. package/src/UserAgent.ts +58 -0
@@ -117,6 +117,8 @@ export interface IPersonAgent {
117
117
  sendEmailWithEventNameAsync(from: string, to: string, subject: string, plainBody: string, htmlBody: string, attachmentIds: number[], eventName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
118
118
  getUtmParametersAsync(request: carriers.Person_GetUtmParametersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UtmParameters >;
119
119
  getUtmParametersAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UtmParameters >;
120
+ setUtmCreatedPersonContactForFormSubmissionAsync(request: carriers.Person_SetUtmCreatedPersonContactForFormSubmissionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
121
+ setUtmCreatedPersonContactForFormSubmissionAsync(formSubmissionId: number, personId: number, contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
120
122
  getPersonListAsync(personIds: number[]) : Promise< carriers.Person[] >;
121
123
  getPersonsFromContactAsync(request: carriers.Person_GetPersonsFromContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
122
124
  getPersonsFromContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
@@ -853,14 +855,14 @@ export class PersonAgent extends base.WebApiBase implements IPersonAgent {
853
855
  /**
854
856
  * Returns the person image that is displayed in the CRM application.
855
857
  * @param request - PersonId
856
- * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
858
+ * @returns The person image.
857
859
  */
858
860
  public async getPersonImageAsync(request: carriers.Person_GetPersonImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
859
861
 
860
862
  /**
861
863
  * Returns the person image that is displayed in the CRM application.
862
864
  * @param personId - The person id of the person the image belongs to.
863
- * @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
865
+ * @returns The person image.
864
866
  */
865
867
  public async getPersonImageAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
866
868
 
@@ -914,7 +916,7 @@ export class PersonAgent extends base.WebApiBase implements IPersonAgent {
914
916
  /**
915
917
  * Stores the person image that is displayed in the CRM application.
916
918
  * @param personId - The person id of the person the image belongs to.
917
- * @param image - The image that is stored on the person (System.Drawing.Image)
919
+ * @param image - The person image.
918
920
  * @returns
919
921
  */
920
922
  public async setPersonImageAsync(personId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
@@ -2703,6 +2705,64 @@ export class PersonAgent extends base.WebApiBase implements IPersonAgent {
2703
2705
  return this._getUtmParametersAsync( _request, _options );
2704
2706
  }
2705
2707
 
2708
+
2709
+ private async _setUtmCreatedPersonContactForFormSubmissionAsync(request: carriers.Person_SetUtmCreatedPersonContactForFormSubmissionRequest, options?:base.WebApiRequestOptions) : Promise< void > {
2710
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2711
+ base.WebApiBase.SetPending(options);
2712
+ return new Promise< void >(async (resolve, reject) => {
2713
+ try {
2714
+ config.baseURL = this._options.baseUrl;
2715
+ const response = await this._axios.post("SetUtmCreatedPersonContactForFormSubmission", request , config);
2716
+ base.WebApiBase.SetCompleted(options);
2717
+ const res = response.data;
2718
+ resolve(res);
2719
+ }
2720
+ catch( err ) {
2721
+ base.WebApiBase.HandleError(options, config, err);
2722
+ reject(err);
2723
+ }
2724
+ });
2725
+ }
2726
+
2727
+
2728
+
2729
+ /**
2730
+ * Set created person and optinally contact on an UTM Parameters row related to a form submission.
2731
+ * @param request - FormSubmissionId, PersonId, ContactId
2732
+ * @returns This method has no return value
2733
+ */
2734
+ public async setUtmCreatedPersonContactForFormSubmissionAsync(request: carriers.Person_SetUtmCreatedPersonContactForFormSubmissionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
2735
+
2736
+ /**
2737
+ * Set created person and optinally contact on an UTM Parameters row related to a form submission.
2738
+ * @param formSubmissionId - Id of Form submission row related to UTM Parameters row
2739
+ * @param personId - Person id to set
2740
+ * @param contactId - Contact id to set. Can be 0.
2741
+ * @returns This method has no return value
2742
+ */
2743
+ public async setUtmCreatedPersonContactForFormSubmissionAsync(formSubmissionId: number, personId: number, contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
2744
+
2745
+ public async setUtmCreatedPersonContactForFormSubmissionAsync(formSubmissionId:number|carriers.Person_SetUtmCreatedPersonContactForFormSubmissionRequest, personId?:number|base.WebApiRequestOptions, contactId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
2746
+ let _request : carriers.Person_SetUtmCreatedPersonContactForFormSubmissionRequest = null;
2747
+ let _options : base.WebApiRequestOptions = null;
2748
+ const first : any = formSubmissionId;
2749
+ if( typeof( first ) === "object" && first && ( typeof(first.formSubmissionId)!='undefined' || typeof(first.personId)!='undefined' || typeof(first.contactId)!='undefined' ) )
2750
+ {
2751
+ _request = formSubmissionId as carriers.Person_SetUtmCreatedPersonContactForFormSubmissionRequest;
2752
+ _options = personId as base.WebApiRequestOptions;
2753
+ }
2754
+ else
2755
+ {
2756
+ _request = {
2757
+ formSubmissionId: formSubmissionId as number,
2758
+ personId: personId as number,
2759
+ contactId: contactId as number,
2760
+ };
2761
+ _options = webapi_options;
2762
+ }
2763
+ return this._setUtmCreatedPersonContactForFormSubmissionAsync( _request, _options );
2764
+ }
2765
+
2706
2766
  /**
2707
2767
  * Gets an array of Person objects.
2708
2768
  * @param personIds - The primary keys.
@@ -37,6 +37,8 @@ export interface ISelectionAgent {
37
37
  getBoardViewSettingsForSelectionAsync(associateId: number, selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase >;
38
38
  saveBoardViewSettingsAsync(request: carriers.Selection_SaveBoardViewSettingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase >;
39
39
  saveBoardViewSettingsAsync(boardViewSettings: carriers.BoardViewSettingsBase, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase >;
40
+ saveBoardViewSettingsForSelectionAndAssociateAsync(request: carriers.Selection_SaveBoardViewSettingsForSelectionAndAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase >;
41
+ saveBoardViewSettingsForSelectionAndAssociateAsync(boardViewSettings: carriers.BoardViewSettingsBase, associateId: number, selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase >;
40
42
  deleteBoardViewSettingsAsync(request: carriers.Selection_DeleteBoardViewSettingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
41
43
  deleteBoardViewSettingsAsync(boardViewSettingsId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
42
44
  getSelectionEntityAsync(selectionEntityId: number) : Promise< carriers.SelectionEntity >;
@@ -337,14 +339,14 @@ export class SelectionAgent extends base.WebApiBase implements ISelectionAgent {
337
339
 
338
340
 
339
341
  /**
340
- * Get BoardViewSettings by selection id, associate id, and settings type
342
+ * Get BoardViewSettings by associate id and selection id
341
343
  * @param request - AssociateId, SelectionId
342
344
  * @returns The settings, of appropriate sub type
343
345
  */
344
346
  public async getBoardViewSettingsForSelectionAsync(request: carriers.Selection_GetBoardViewSettingsForSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase >;
345
347
 
346
348
  /**
347
- * Get BoardViewSettings by selection id, associate id, and settings type
349
+ * Get BoardViewSettings by associate id and selection id
348
350
  * @param associateId - Id of associate
349
351
  * @param selectionId - Id of selection
350
352
  * @returns The settings, of appropriate sub type
@@ -426,6 +428,64 @@ export class SelectionAgent extends base.WebApiBase implements ISelectionAgent {
426
428
  }
427
429
 
428
430
 
431
+ private async _saveBoardViewSettingsForSelectionAndAssociateAsync(request: carriers.Selection_SaveBoardViewSettingsForSelectionAndAssociateRequest, options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase > {
432
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
433
+ base.WebApiBase.SetPending(options);
434
+ return new Promise< carriers.BoardViewSettingsBase >(async (resolve, reject) => {
435
+ try {
436
+ config.baseURL = this._options.baseUrl;
437
+ const response = await this._axios.post("SaveBoardViewSettingsForSelectionAndAssociate", request , config);
438
+ base.WebApiBase.SetCompleted(options);
439
+ const res : carriers.BoardViewSettingsBase = converters.Create_BoardViewSettingsBase_From( response.data );
440
+ resolve(res);
441
+ }
442
+ catch( err ) {
443
+ base.WebApiBase.HandleError(options, config, err);
444
+ reject(err);
445
+ }
446
+ });
447
+ }
448
+
449
+
450
+
451
+ /**
452
+ * Save BoardViewSettings on the given selection/associate
453
+ * @param request - BoardViewSettings, AssociateId, SelectionId
454
+ * @returns The settings, of appropriate sub type
455
+ */
456
+ public async saveBoardViewSettingsForSelectionAndAssociateAsync(request: carriers.Selection_SaveBoardViewSettingsForSelectionAndAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase >;
457
+
458
+ /**
459
+ * Save BoardViewSettings on the given selection/associate
460
+ * @param boardViewSettings - Typed BoardViewSettings carrier object
461
+ * @param associateId - Id of associate
462
+ * @param selectionId - Id of selection
463
+ * @returns The settings, of appropriate sub type
464
+ */
465
+ public async saveBoardViewSettingsForSelectionAndAssociateAsync(boardViewSettings: carriers.BoardViewSettingsBase, associateId: number, selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase >;
466
+
467
+ public async saveBoardViewSettingsForSelectionAndAssociateAsync(boardViewSettings:carriers.BoardViewSettingsBase|carriers.Selection_SaveBoardViewSettingsForSelectionAndAssociateRequest, associateId?:number|base.WebApiRequestOptions, selectionId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.BoardViewSettingsBase > {
468
+ let _request : carriers.Selection_SaveBoardViewSettingsForSelectionAndAssociateRequest = null;
469
+ let _options : base.WebApiRequestOptions = null;
470
+ const first : any = boardViewSettings;
471
+ if( typeof( first ) === "object" && first && ( typeof(first.boardViewSettings)!='undefined' || typeof(first.associateId)!='undefined' || typeof(first.selectionId)!='undefined' ) )
472
+ {
473
+ _request = boardViewSettings as carriers.Selection_SaveBoardViewSettingsForSelectionAndAssociateRequest;
474
+ _options = associateId as base.WebApiRequestOptions;
475
+ }
476
+ else
477
+ {
478
+ _request = {
479
+ boardViewSettings: boardViewSettings as carriers.BoardViewSettingsBase,
480
+ associateId: associateId as number,
481
+ selectionId: selectionId as number,
482
+ };
483
+ _options = webapi_options;
484
+ }
485
+ return this._saveBoardViewSettingsForSelectionAndAssociateAsync( _request, _options );
486
+ }
487
+
488
+
429
489
  private async _deleteBoardViewSettingsAsync(request: carriers.Selection_DeleteBoardViewSettingsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
430
490
  const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
431
491
  base.WebApiBase.SetPending(options);
@@ -97,6 +97,8 @@ export interface ITicketAgent {
97
97
  doEscalatingAsync(ticketId: number, action: enums.TicketPriorityEscalateAction, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
98
98
  getHotlistEjUsersAsync(request: carriers.Ticket_GetHotlistEjUsersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
99
99
  getHotlistEjUsersAsync(ticketId: number, skipAssociateIds: number[], notifyType: enums.NotifyType, channel: enums.NotifyChannel, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
100
+ acceptTicketsAsync(request: carriers.Ticket_AcceptTicketsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
101
+ acceptTicketsAsync(ticketIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
100
102
  getTicketMessageAsync(ticketMessageId: number) : Promise< carriers.TicketMessage >;
101
103
  getTicketMessageEntityAsync(ticketMessageEntityId: number) : Promise< carriers.TicketMessageEntity >;
102
104
  deleteTicketMessageEntityAsync(request: carriers.Ticket_DeleteTicketMessageEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
@@ -2103,6 +2105,60 @@ export class TicketAgent extends base.WebApiBase implements ITicketAgent {
2103
2105
  return this._getHotlistEjUsersAsync( _request, _options );
2104
2106
  }
2105
2107
 
2108
+
2109
+ private async _acceptTicketsAsync(request: carriers.Ticket_AcceptTicketsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
2110
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2111
+ base.WebApiBase.SetPending(options);
2112
+ return new Promise< void >(async (resolve, reject) => {
2113
+ try {
2114
+ config.baseURL = this._options.baseUrl;
2115
+ const response = await this._axios.post("AcceptTickets", request , config);
2116
+ base.WebApiBase.SetCompleted(options);
2117
+ const res = response.data;
2118
+ resolve(res);
2119
+ }
2120
+ catch( err ) {
2121
+ base.WebApiBase.HandleError(options, config, err);
2122
+ reject(err);
2123
+ }
2124
+ });
2125
+ }
2126
+
2127
+
2128
+
2129
+ /**
2130
+ * Accepts tickets by their ids. Sets owner to current user
2131
+ * @param request - TicketIds
2132
+ * @returns This method has no return value
2133
+ */
2134
+ public async acceptTicketsAsync(request: carriers.Ticket_AcceptTicketsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
2135
+
2136
+ /**
2137
+ * Accepts tickets by their ids. Sets owner to current user
2138
+ * @param ticketIds - Ids of tickets to be accepted.
2139
+ * @returns This method has no return value
2140
+ */
2141
+ public async acceptTicketsAsync(ticketIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
2142
+
2143
+ public async acceptTicketsAsync(ticketIds:number[]|carriers.Ticket_AcceptTicketsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
2144
+ let _request : carriers.Ticket_AcceptTicketsRequest = null;
2145
+ let _options : base.WebApiRequestOptions = null;
2146
+ const first : any = ticketIds;
2147
+ if( typeof( first ) === "object" && first && ( typeof(first.ticketIds)!='undefined' ) )
2148
+ {
2149
+ _request = ticketIds as carriers.Ticket_AcceptTicketsRequest;
2150
+ _options = webapi_options as base.WebApiRequestOptions;
2151
+ }
2152
+ else
2153
+ {
2154
+ _request = {
2155
+ ticketIds: ticketIds as number[],
2156
+ };
2157
+ _options = webapi_options;
2158
+ }
2159
+ return this._acceptTicketsAsync( _request, _options );
2160
+ }
2161
+
2106
2162
  /**
2107
2163
  * Gets a TicketMessage object.
2108
2164
  * @param ticketMessageId - The primary key.
package/src/UserAgent.ts CHANGED
@@ -62,6 +62,8 @@ export interface IUserAgent {
62
62
  getAllRolesAsync(roleType: enums.RoleType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
63
63
  getAllFunctionalRightsAsync(request: carriers.User_GetAllFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
64
64
  getAllFunctionalRightsAsync(roleType: enums.RoleType, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
65
+ getAllDataRightsAsync(request: carriers.User_GetAllDataRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
66
+ getAllDataRightsAsync(roleId: number, relationToOwner: enums.RoleRelationToOwner, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
65
67
  getFunctionalRightsAsync(request: carriers.User_GetFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
66
68
  getFunctionalRightsAsync(roleId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] >;
67
69
  setFunctionalRightsAsync(request: carriers.User_SetFunctionalRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
@@ -1126,6 +1128,62 @@ export class UserAgent extends base.WebApiBase implements IUserAgent {
1126
1128
  }
1127
1129
 
1128
1130
 
1131
+ private async _getAllDataRightsAsync(request: carriers.User_GetAllDataRightsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
1132
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1133
+ base.WebApiBase.SetPending(options);
1134
+ return new Promise< carriers.StringDictionary >(async (resolve, reject) => {
1135
+ try {
1136
+ config.baseURL = this._options.baseUrl;
1137
+ const response = await this._axios.post("GetAllDataRights", request , config);
1138
+ base.WebApiBase.SetCompleted(options);
1139
+ const res : carriers.StringDictionary = converters.Create_StringDictionary_From( response.data );
1140
+ resolve(res);
1141
+ }
1142
+ catch( err ) {
1143
+ base.WebApiBase.HandleError(options, config, err);
1144
+ reject(err);
1145
+ }
1146
+ });
1147
+ }
1148
+
1149
+
1150
+
1151
+ /**
1152
+ * Get a list of all data rights for the given role, filtered by relation to owner. MDO List name = &apos;DataRights&apos;, extra=&apos;roleType=0&apos;.
1153
+ * @param request - RoleId, RelationToOwner
1154
+ * @returns The CRUD rights (C, CR, CRU, or CRUD) for each table related to the given role and relation to owner.
1155
+ */
1156
+ public async getAllDataRightsAsync(request: carriers.User_GetAllDataRightsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
1157
+
1158
+ /**
1159
+ * Get a list of all data rights for the given role, filtered by relation to owner. MDO List name = &apos;DataRights&apos;, extra=&apos;roleType=0&apos;.
1160
+ * @param roleId - The role id to set the functional rights for
1161
+ * @param relationToOwner - The id of the relation to owner
1162
+ * @returns The CRUD rights (C, CR, CRU, or CRUD) for each table related to the given role and relation to owner.
1163
+ */
1164
+ public async getAllDataRightsAsync(roleId: number, relationToOwner: enums.RoleRelationToOwner, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
1165
+
1166
+ public async getAllDataRightsAsync(roleId:number|carriers.User_GetAllDataRightsRequest, relationToOwner?:enums.RoleRelationToOwner|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
1167
+ let _request : carriers.User_GetAllDataRightsRequest = null;
1168
+ let _options : base.WebApiRequestOptions = null;
1169
+ const first : any = roleId;
1170
+ if( typeof( first ) === "object" && first && ( typeof(first.roleId)!='undefined' || typeof(first.relationToOwner)!='undefined' ) )
1171
+ {
1172
+ _request = roleId as carriers.User_GetAllDataRightsRequest;
1173
+ _options = relationToOwner as base.WebApiRequestOptions;
1174
+ }
1175
+ else
1176
+ {
1177
+ _request = {
1178
+ roleId: roleId as number,
1179
+ relationToOwner: relationToOwner as enums.RoleRelationToOwner,
1180
+ };
1181
+ _options = webapi_options;
1182
+ }
1183
+ return this._getAllDataRightsAsync( _request, _options );
1184
+ }
1185
+
1186
+
1129
1187
  private async _getFunctionalRightsAsync(request: carriers.User_GetFunctionalRightsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.SelectableMDOListItem[] > {
1130
1188
  const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1131
1189
  base.WebApiBase.SetPending(options);