@superoffice/webapi 10.5.3 → 10.5.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.
Files changed (198) hide show
  1. package/dist/cjs/AIAgent.d.ts +16 -0
  2. package/dist/cjs/AIAgent.d.ts.map +1 -1
  3. package/dist/cjs/AIAgent.js +34 -0
  4. package/dist/cjs/AIAgent.js.map +1 -1
  5. package/dist/cjs/AppointmentAgent.d.ts +117 -0
  6. package/dist/cjs/AppointmentAgent.d.ts.map +1 -1
  7. package/dist/cjs/AppointmentAgent.js +242 -0
  8. package/dist/cjs/AppointmentAgent.js.map +1 -1
  9. package/dist/cjs/CRMScriptAgent.d.ts +31 -0
  10. package/dist/cjs/CRMScriptAgent.d.ts.map +1 -1
  11. package/dist/cjs/CRMScriptAgent.js +67 -0
  12. package/dist/cjs/CRMScriptAgent.js.map +1 -1
  13. package/dist/cjs/Carriers.d.ts +1289 -31
  14. package/dist/cjs/Carriers.d.ts.map +1 -1
  15. package/dist/cjs/Converters.d.ts +30 -0
  16. package/dist/cjs/Converters.d.ts.map +1 -1
  17. package/dist/cjs/Converters.js +635 -30
  18. package/dist/cjs/Converters.js.map +1 -1
  19. package/dist/cjs/CustomerServiceAgent.d.ts +30 -0
  20. package/dist/cjs/CustomerServiceAgent.d.ts.map +1 -1
  21. package/dist/cjs/CustomerServiceAgent.js +66 -0
  22. package/dist/cjs/CustomerServiceAgent.js.map +1 -1
  23. package/dist/cjs/DiagnosticsAgent.d.ts +105 -0
  24. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
  25. package/dist/cjs/DiagnosticsAgent.js +229 -0
  26. package/dist/cjs/DiagnosticsAgent.js.map +1 -1
  27. package/dist/cjs/DocumentAgent.d.ts +17 -0
  28. package/dist/cjs/DocumentAgent.d.ts.map +1 -1
  29. package/dist/cjs/DocumentAgent.js +36 -0
  30. package/dist/cjs/DocumentAgent.js.map +1 -1
  31. package/dist/cjs/DocumentMigrationAgent.d.ts +7 -0
  32. package/dist/cjs/DocumentMigrationAgent.d.ts.map +1 -1
  33. package/dist/cjs/DocumentMigrationAgent.js +24 -0
  34. package/dist/cjs/DocumentMigrationAgent.js.map +1 -1
  35. package/dist/cjs/EMailAgent.d.ts +33 -0
  36. package/dist/cjs/EMailAgent.d.ts.map +1 -1
  37. package/dist/cjs/EMailAgent.js +69 -0
  38. package/dist/cjs/EMailAgent.js.map +1 -1
  39. package/dist/cjs/Enums.d.ts +299 -5
  40. package/dist/cjs/Enums.d.ts.map +1 -1
  41. package/dist/cjs/Enums.js +309 -4
  42. package/dist/cjs/Enums.js.map +1 -1
  43. package/dist/cjs/LicenseAgent.d.ts +15 -0
  44. package/dist/cjs/LicenseAgent.d.ts.map +1 -1
  45. package/dist/cjs/LicenseAgent.js +33 -0
  46. package/dist/cjs/LicenseAgent.js.map +1 -1
  47. package/dist/cjs/ListAgent.d.ts +23 -22
  48. package/dist/cjs/ListAgent.d.ts.map +1 -1
  49. package/dist/cjs/ListAgent.js +36 -48
  50. package/dist/cjs/ListAgent.js.map +1 -1
  51. package/dist/cjs/MDOAgent.d.ts +1 -1
  52. package/dist/cjs/MarketingAgent.d.ts +31 -0
  53. package/dist/cjs/MarketingAgent.d.ts.map +1 -1
  54. package/dist/cjs/MarketingAgent.js +67 -0
  55. package/dist/cjs/MarketingAgent.js.map +1 -1
  56. package/dist/cjs/PersonAgent.d.ts +35 -0
  57. package/dist/cjs/PersonAgent.d.ts.map +1 -1
  58. package/dist/cjs/PersonAgent.js +71 -0
  59. package/dist/cjs/PersonAgent.js.map +1 -1
  60. package/dist/cjs/ProjectAgent.d.ts +16 -0
  61. package/dist/cjs/ProjectAgent.d.ts.map +1 -1
  62. package/dist/cjs/ProjectAgent.js +34 -0
  63. package/dist/cjs/ProjectAgent.js.map +1 -1
  64. package/dist/cjs/QuoteAgent.d.ts +16 -0
  65. package/dist/cjs/QuoteAgent.d.ts.map +1 -1
  66. package/dist/cjs/QuoteAgent.js +34 -0
  67. package/dist/cjs/QuoteAgent.js.map +1 -1
  68. package/dist/cjs/SaleAgent.d.ts +47 -0
  69. package/dist/cjs/SaleAgent.d.ts.map +1 -1
  70. package/dist/cjs/SaleAgent.js +101 -0
  71. package/dist/cjs/SaleAgent.js.map +1 -1
  72. package/dist/cjs/SelectionAgent.d.ts +15 -7
  73. package/dist/cjs/SelectionAgent.d.ts.map +1 -1
  74. package/dist/cjs/SelectionAgent.js +33 -21
  75. package/dist/cjs/SelectionAgent.js.map +1 -1
  76. package/dist/cjs/SentryAgent.d.ts +15 -0
  77. package/dist/cjs/SentryAgent.d.ts.map +1 -1
  78. package/dist/cjs/SentryAgent.js +33 -0
  79. package/dist/cjs/SentryAgent.js.map +1 -1
  80. package/dist/cjs/TicketAgent.d.ts +117 -2
  81. package/dist/cjs/TicketAgent.d.ts.map +1 -1
  82. package/dist/cjs/TicketAgent.js +255 -0
  83. package/dist/cjs/TicketAgent.js.map +1 -1
  84. package/dist/cjs/WorkflowAgent.d.ts +80 -2
  85. package/dist/cjs/WorkflowAgent.d.ts.map +1 -1
  86. package/dist/cjs/WorkflowAgent.js +188 -0
  87. package/dist/cjs/WorkflowAgent.js.map +1 -1
  88. package/dist/esm/AIAgent.d.ts +16 -0
  89. package/dist/esm/AIAgent.d.ts.map +1 -1
  90. package/dist/esm/AIAgent.js +34 -0
  91. package/dist/esm/AIAgent.js.map +1 -1
  92. package/dist/esm/AppointmentAgent.d.ts +117 -0
  93. package/dist/esm/AppointmentAgent.d.ts.map +1 -1
  94. package/dist/esm/AppointmentAgent.js +242 -0
  95. package/dist/esm/AppointmentAgent.js.map +1 -1
  96. package/dist/esm/CRMScriptAgent.d.ts +31 -0
  97. package/dist/esm/CRMScriptAgent.d.ts.map +1 -1
  98. package/dist/esm/CRMScriptAgent.js +67 -0
  99. package/dist/esm/CRMScriptAgent.js.map +1 -1
  100. package/dist/esm/Carriers.d.ts +1289 -31
  101. package/dist/esm/Carriers.d.ts.map +1 -1
  102. package/dist/esm/Converters.d.ts +30 -0
  103. package/dist/esm/Converters.d.ts.map +1 -1
  104. package/dist/esm/Converters.js +582 -8
  105. package/dist/esm/Converters.js.map +1 -1
  106. package/dist/esm/CustomerServiceAgent.d.ts +30 -0
  107. package/dist/esm/CustomerServiceAgent.d.ts.map +1 -1
  108. package/dist/esm/CustomerServiceAgent.js +66 -0
  109. package/dist/esm/CustomerServiceAgent.js.map +1 -1
  110. package/dist/esm/DiagnosticsAgent.d.ts +105 -0
  111. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
  112. package/dist/esm/DiagnosticsAgent.js +229 -0
  113. package/dist/esm/DiagnosticsAgent.js.map +1 -1
  114. package/dist/esm/DocumentAgent.d.ts +17 -0
  115. package/dist/esm/DocumentAgent.d.ts.map +1 -1
  116. package/dist/esm/DocumentAgent.js +36 -0
  117. package/dist/esm/DocumentAgent.js.map +1 -1
  118. package/dist/esm/DocumentMigrationAgent.d.ts +7 -0
  119. package/dist/esm/DocumentMigrationAgent.d.ts.map +1 -1
  120. package/dist/esm/DocumentMigrationAgent.js +24 -0
  121. package/dist/esm/DocumentMigrationAgent.js.map +1 -1
  122. package/dist/esm/EMailAgent.d.ts +33 -0
  123. package/dist/esm/EMailAgent.d.ts.map +1 -1
  124. package/dist/esm/EMailAgent.js +69 -0
  125. package/dist/esm/EMailAgent.js.map +1 -1
  126. package/dist/esm/Enums.d.ts +299 -5
  127. package/dist/esm/Enums.d.ts.map +1 -1
  128. package/dist/esm/Enums.js +305 -0
  129. package/dist/esm/Enums.js.map +1 -1
  130. package/dist/esm/LicenseAgent.d.ts +15 -0
  131. package/dist/esm/LicenseAgent.d.ts.map +1 -1
  132. package/dist/esm/LicenseAgent.js +33 -0
  133. package/dist/esm/LicenseAgent.js.map +1 -1
  134. package/dist/esm/ListAgent.d.ts +23 -22
  135. package/dist/esm/ListAgent.d.ts.map +1 -1
  136. package/dist/esm/ListAgent.js +36 -48
  137. package/dist/esm/ListAgent.js.map +1 -1
  138. package/dist/esm/MDOAgent.d.ts +1 -1
  139. package/dist/esm/MarketingAgent.d.ts +31 -0
  140. package/dist/esm/MarketingAgent.d.ts.map +1 -1
  141. package/dist/esm/MarketingAgent.js +67 -0
  142. package/dist/esm/MarketingAgent.js.map +1 -1
  143. package/dist/esm/PersonAgent.d.ts +35 -0
  144. package/dist/esm/PersonAgent.d.ts.map +1 -1
  145. package/dist/esm/PersonAgent.js +71 -0
  146. package/dist/esm/PersonAgent.js.map +1 -1
  147. package/dist/esm/ProjectAgent.d.ts +16 -0
  148. package/dist/esm/ProjectAgent.d.ts.map +1 -1
  149. package/dist/esm/ProjectAgent.js +34 -0
  150. package/dist/esm/ProjectAgent.js.map +1 -1
  151. package/dist/esm/QuoteAgent.d.ts +16 -0
  152. package/dist/esm/QuoteAgent.d.ts.map +1 -1
  153. package/dist/esm/QuoteAgent.js +34 -0
  154. package/dist/esm/QuoteAgent.js.map +1 -1
  155. package/dist/esm/SaleAgent.d.ts +47 -0
  156. package/dist/esm/SaleAgent.d.ts.map +1 -1
  157. package/dist/esm/SaleAgent.js +101 -0
  158. package/dist/esm/SaleAgent.js.map +1 -1
  159. package/dist/esm/SelectionAgent.d.ts +15 -7
  160. package/dist/esm/SelectionAgent.d.ts.map +1 -1
  161. package/dist/esm/SelectionAgent.js +33 -21
  162. package/dist/esm/SelectionAgent.js.map +1 -1
  163. package/dist/esm/SentryAgent.d.ts +15 -0
  164. package/dist/esm/SentryAgent.d.ts.map +1 -1
  165. package/dist/esm/SentryAgent.js +33 -0
  166. package/dist/esm/SentryAgent.js.map +1 -1
  167. package/dist/esm/TicketAgent.d.ts +117 -2
  168. package/dist/esm/TicketAgent.d.ts.map +1 -1
  169. package/dist/esm/TicketAgent.js +255 -0
  170. package/dist/esm/TicketAgent.js.map +1 -1
  171. package/dist/esm/WorkflowAgent.d.ts +80 -2
  172. package/dist/esm/WorkflowAgent.d.ts.map +1 -1
  173. package/dist/esm/WorkflowAgent.js +188 -0
  174. package/dist/esm/WorkflowAgent.js.map +1 -1
  175. package/package.json +5 -6
  176. package/src/AIAgent.ts +58 -0
  177. package/src/AppointmentAgent.ts +406 -0
  178. package/src/CRMScriptAgent.ts +114 -0
  179. package/src/Carriers.ts +1667 -34
  180. package/src/Converters.ts +677 -9
  181. package/src/CustomerServiceAgent.ts +112 -0
  182. package/src/DiagnosticsAgent.ts +380 -0
  183. package/src/DocumentAgent.ts +61 -0
  184. package/src/DocumentMigrationAgent.ts +30 -0
  185. package/src/EMailAgent.ts +118 -0
  186. package/src/Enums.ts +316 -0
  187. package/src/LicenseAgent.ts +56 -0
  188. package/src/ListAgent.ts +69 -65
  189. package/src/MDOAgent.ts +1 -1
  190. package/src/MarketingAgent.ts +114 -0
  191. package/src/PersonAgent.ts +122 -0
  192. package/src/ProjectAgent.ts +58 -0
  193. package/src/QuoteAgent.ts +58 -0
  194. package/src/SaleAgent.ts +172 -0
  195. package/src/SelectionAgent.ts +56 -23
  196. package/src/SentryAgent.ts +56 -0
  197. package/src/TicketAgent.ts +432 -2
  198. package/src/WorkflowAgent.ts +268 -2
@@ -83,6 +83,10 @@ export interface IAppointmentAgent {
83
83
  setSeenManyAsync(appointmentIds: number[], updateMode: enums.RecurrenceUpdateMode, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
84
84
  moveAsync(request: carriers.Appointment_MoveRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
85
85
  moveAsync(appointmentId: number, newStartTime: Date, updateMode: enums.RecurrenceUpdateMode, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
86
+ moveWithEmailAsync(request: carriers.Appointment_MoveWithEmailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
87
+ moveWithEmailAsync(appointmentId: number, newStartTime: Date, updateMode: enums.RecurrenceUpdateMode, sendEmailToParticipants: boolean, smtpEMailConnectionInfo: carriers.EMailConnectionInfo, imapEMailConnectionInfo: carriers.EMailConnectionInfo, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
88
+ moveExtendedAsync(request: carriers.Appointment_MoveExtendedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
89
+ moveExtendedAsync(appointmentMoveData: carriers.AppointmentMoveData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
86
90
  acceptRejectedAsync(request: carriers.Appointment_AcceptRejectedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
87
91
  acceptRejectedAsync(appointmentId: number, updateMode: enums.RecurrenceUpdateMode, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
88
92
  createDefaultRecurrenceByDateAsync(request: carriers.Appointment_CreateDefaultRecurrenceByDateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.RecurrenceInfo >;
@@ -128,6 +132,8 @@ export interface IAppointmentAgent {
128
132
  getAppointmentEmailInvitationAsync(appointment: carriers.AppointmentEntity, templateName: string, language: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EMailEntity >;
129
133
  saveWithCustomInvitationAsync(request: carriers.Appointment_SaveWithCustomInvitationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentSaveData >;
130
134
  saveWithCustomInvitationAsync(appointmentEntity: carriers.AppointmentEntity, updateMode: enums.RecurrenceUpdateMode, sendEmailToParticipants: boolean, smtpEMailConnectionInfo: carriers.EMailConnectionInfo, imapEMailConnectionInfo: carriers.EMailConnectionInfo, emailBody: string, subject: string, templateLanguage: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentSaveData >;
135
+ convertAppointmentToTaskAsync(request: carriers.Appointment_ConvertAppointmentToTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
136
+ convertAppointmentToTaskAsync(appointmentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
131
137
  getAppointmentListAsync(appointmentIds: number[]) : Promise< carriers.Appointment[] >;
132
138
  getMyAppointmentsAsync(request: carriers.Appointment_GetMyAppointmentsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment[] >;
133
139
  getMyAppointmentsAsync(startTime: Date, endTime: Date, count: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment[] >;
@@ -194,6 +200,10 @@ export interface IAppointmentAgent {
194
200
  getDiaryByGroupAsync(groupId: number, groupType: number, startTime: Date, endTime: Date, count: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment[] >;
195
201
  updateAppointmentAsync(request: carriers.Appointment_UpdateAppointmentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
196
202
  updateAppointmentAsync(id: number, startTime: Date, endTime: Date, status: number, type: number, associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
203
+ updateAppointmentWithModeAsync(request: carriers.Appointment_UpdateAppointmentWithModeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
204
+ updateAppointmentWithModeAsync(id: number, startTime: Date, endTime: Date, status: enums.AppointmentStatus, type: enums.AppointmentType, associateId: number, updateMode: enums.RecurrenceUpdateMode, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
205
+ updateAppointmentWithModeAndEmailAsync(request: carriers.Appointment_UpdateAppointmentWithModeAndEmailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
206
+ updateAppointmentWithModeAndEmailAsync(id: number, startTime: Date, endTime: Date, status: enums.AppointmentStatus, type: enums.AppointmentType, associateId: number, updateMode: enums.RecurrenceUpdateMode, sendEmailToParticipants: boolean, smtpEMailConnectionInfo: carriers.EMailConnectionInfo, imapEMailConnectionInfo: carriers.EMailConnectionInfo, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
197
207
  getAssociatesDiaryAsync(request: carriers.Appointment_GetAssociatesDiaryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment[] >;
198
208
  getAssociatesDiaryAsync(associateIds: number[], startTime: Date, endTime: Date, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment[] >;
199
209
  getAssociatesDiaryInfoAsync(request: carriers.Appointment_GetAssociatesDiaryInfoRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentInfo[] >;
@@ -221,6 +231,9 @@ export interface IAppointmentAgent {
221
231
  getTaskListItemAsync(taskListItemId: number) : Promise< carriers.TaskListItem >;
222
232
  getTaskListItemsAsync(request: carriers.Appointment_GetTaskListItemsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TaskListItem[] >;
223
233
  getTaskListItemsAsync(includeDeleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TaskListItem[] >;
234
+ createVideoMeetingReservationAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.VideoMeetingReservation >;
235
+ deleteVideoMeetingReservationAsync(request: carriers.Appointment_DeleteVideoMeetingReservationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
236
+ deleteVideoMeetingReservationAsync(videoMeetingId: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
224
237
  } // interface IAppointmentAgent
225
238
 
226
239
 
@@ -1776,6 +1789,124 @@ export class AppointmentAgent extends base.WebApiBase implements IAppointmentAge
1776
1789
  }
1777
1790
 
1778
1791
 
1792
+ private async _moveWithEmailAsync(request: carriers.Appointment_MoveWithEmailRequest, options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity > {
1793
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1794
+ base.WebApiBase.SetPending(options);
1795
+ return new Promise< carriers.AppointmentEntity >(async (resolve, reject) => {
1796
+ try {
1797
+ config.baseURL = this._options.baseUrl;
1798
+ const response = await this._axios.post("MoveWithEmail", request , config);
1799
+ base.WebApiBase.SetCompleted(options);
1800
+ const res : carriers.AppointmentEntity = converters.Create_AppointmentEntity_From( response.data );
1801
+ resolve(res);
1802
+ }
1803
+ catch( err ) {
1804
+ base.WebApiBase.HandleError(options, config, err);
1805
+ reject(err);
1806
+ }
1807
+ });
1808
+ }
1809
+
1810
+
1811
+
1812
+ /**
1813
+ * Moving a booking to another start time.
1814
+ * @param request - AppointmentId, NewStartTime, UpdateMode, SendEmailToParticipants, SmtpEMailConnectionInfo, ImapEMailConnectionInfo
1815
+ * @returns Updated AppointmentEntity
1816
+ */
1817
+ public async moveWithEmailAsync(request: carriers.Appointment_MoveWithEmailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
1818
+
1819
+ /**
1820
+ * Moving a booking to another start time.
1821
+ * @param appointmentId - The appointmentId. Both master and child record ids are accepted.
1822
+ * @param newStartTime - The new start time for the moved booking.
1823
+ * @param updateMode - Update mode for a recurring appointment.
1824
+ * @param sendEmailToParticipants - If true, emails will be sent to all participants that is marked with send email flag if deemed necessary. If false no mails will be sent even if the send email flag is true.
1825
+ * @param smtpEMailConnectionInfo - Login information for outgoing smtp email server. Will be null if no login information is relevant.
1826
+ * @param imapEMailConnectionInfo - Login information for imap server. Will be null if no login information is relevant.
1827
+ * @returns Updated AppointmentEntity
1828
+ */
1829
+ public async moveWithEmailAsync(appointmentId: number, newStartTime: Date, updateMode: enums.RecurrenceUpdateMode, sendEmailToParticipants: boolean, smtpEMailConnectionInfo: carriers.EMailConnectionInfo, imapEMailConnectionInfo: carriers.EMailConnectionInfo, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
1830
+
1831
+ public async moveWithEmailAsync(appointmentId:number|carriers.Appointment_MoveWithEmailRequest, newStartTime?:Date|base.WebApiRequestOptions, updateMode?:enums.RecurrenceUpdateMode, sendEmailToParticipants?:boolean, smtpEMailConnectionInfo?:carriers.EMailConnectionInfo, imapEMailConnectionInfo?:carriers.EMailConnectionInfo, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity > {
1832
+ let _request : carriers.Appointment_MoveWithEmailRequest = null;
1833
+ let _options : base.WebApiRequestOptions = null;
1834
+ const first : any = appointmentId;
1835
+ if( typeof( first ) === "object" && first && ( typeof(first.appointmentId)!='undefined' || typeof(first.newStartTime)!='undefined' || typeof(first.updateMode)!='undefined' || typeof(first.sendEmailToParticipants)!='undefined' || typeof(first.smtpEMailConnectionInfo)!='undefined' || typeof(first.imapEMailConnectionInfo)!='undefined' ) )
1836
+ {
1837
+ _request = appointmentId as carriers.Appointment_MoveWithEmailRequest;
1838
+ _options = newStartTime as base.WebApiRequestOptions;
1839
+ }
1840
+ else
1841
+ {
1842
+ _request = {
1843
+ appointmentId: appointmentId as number,
1844
+ newStartTime: newStartTime as Date,
1845
+ updateMode: updateMode as enums.RecurrenceUpdateMode,
1846
+ sendEmailToParticipants: sendEmailToParticipants as boolean,
1847
+ smtpEMailConnectionInfo: smtpEMailConnectionInfo as carriers.EMailConnectionInfo,
1848
+ imapEMailConnectionInfo: imapEMailConnectionInfo as carriers.EMailConnectionInfo,
1849
+ };
1850
+ _options = webapi_options;
1851
+ }
1852
+ return this._moveWithEmailAsync( _request, _options );
1853
+ }
1854
+
1855
+
1856
+ private async _moveExtendedAsync(request: carriers.Appointment_MoveExtendedRequest, options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity > {
1857
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1858
+ base.WebApiBase.SetPending(options);
1859
+ return new Promise< carriers.AppointmentEntity >(async (resolve, reject) => {
1860
+ try {
1861
+ config.baseURL = this._options.baseUrl;
1862
+ const response = await this._axios.post("MoveExtended", request , config);
1863
+ base.WebApiBase.SetCompleted(options);
1864
+ const res : carriers.AppointmentEntity = converters.Create_AppointmentEntity_From( response.data );
1865
+ resolve(res);
1866
+ }
1867
+ catch( err ) {
1868
+ base.WebApiBase.HandleError(options, config, err);
1869
+ reject(err);
1870
+ }
1871
+ });
1872
+ }
1873
+
1874
+
1875
+
1876
+ /**
1877
+ * Moving a booking to another start time and with new info and possibly notifications.
1878
+ * @param request - AppointmentMoveData
1879
+ * @returns Updated AppointmentEntity
1880
+ */
1881
+ public async moveExtendedAsync(request: carriers.Appointment_MoveExtendedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
1882
+
1883
+ /**
1884
+ * Moving a booking to another start time and with new info and possibly notifications.
1885
+ * @param appointmentMoveData - Move parameter data.
1886
+ * @returns Updated AppointmentEntity
1887
+ */
1888
+ public async moveExtendedAsync(appointmentMoveData: carriers.AppointmentMoveData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
1889
+
1890
+ public async moveExtendedAsync(appointmentMoveData:carriers.AppointmentMoveData|carriers.Appointment_MoveExtendedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity > {
1891
+ let _request : carriers.Appointment_MoveExtendedRequest = null;
1892
+ let _options : base.WebApiRequestOptions = null;
1893
+ const first : any = appointmentMoveData;
1894
+ if( typeof( first ) === "object" && first && ( typeof(first.appointmentMoveData)!='undefined' ) )
1895
+ {
1896
+ _request = appointmentMoveData as carriers.Appointment_MoveExtendedRequest;
1897
+ _options = webapi_options as base.WebApiRequestOptions;
1898
+ }
1899
+ else
1900
+ {
1901
+ _request = {
1902
+ appointmentMoveData: appointmentMoveData as carriers.AppointmentMoveData,
1903
+ };
1904
+ _options = webapi_options;
1905
+ }
1906
+ return this._moveExtendedAsync( _request, _options );
1907
+ }
1908
+
1909
+
1779
1910
  private async _acceptRejectedAsync(request: carriers.Appointment_AcceptRejectedRequest, options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity > {
1780
1911
  const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1781
1912
  base.WebApiBase.SetPending(options);
@@ -3051,6 +3182,60 @@ export class AppointmentAgent extends base.WebApiBase implements IAppointmentAge
3051
3182
  return this._saveWithCustomInvitationAsync( _request, _options );
3052
3183
  }
3053
3184
 
3185
+
3186
+ private async _convertAppointmentToTaskAsync(request: carriers.Appointment_ConvertAppointmentToTaskRequest, options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity > {
3187
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
3188
+ base.WebApiBase.SetPending(options);
3189
+ return new Promise< carriers.AppointmentEntity >(async (resolve, reject) => {
3190
+ try {
3191
+ config.baseURL = this._options.baseUrl;
3192
+ const response = await this._axios.post("ConvertAppointmentToTask", request , config);
3193
+ base.WebApiBase.SetCompleted(options);
3194
+ const res : carriers.AppointmentEntity = converters.Create_AppointmentEntity_From( response.data );
3195
+ resolve(res);
3196
+ }
3197
+ catch( err ) {
3198
+ base.WebApiBase.HandleError(options, config, err);
3199
+ reject(err);
3200
+ }
3201
+ });
3202
+ }
3203
+
3204
+
3205
+
3206
+ /**
3207
+ * Convert appointment to task if certain criteria are met (participants &lt; 2)
3208
+ * @param request - AppointmentId
3209
+ * @returns Appointment entity
3210
+ */
3211
+ public async convertAppointmentToTaskAsync(request: carriers.Appointment_ConvertAppointmentToTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
3212
+
3213
+ /**
3214
+ * Convert appointment to task if certain criteria are met (participants &lt; 2)
3215
+ * @param appointmentId - Appointment ID
3216
+ * @returns Appointment entity
3217
+ */
3218
+ public async convertAppointmentToTaskAsync(appointmentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity >;
3219
+
3220
+ public async convertAppointmentToTaskAsync(appointmentId:number|carriers.Appointment_ConvertAppointmentToTaskRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AppointmentEntity > {
3221
+ let _request : carriers.Appointment_ConvertAppointmentToTaskRequest = null;
3222
+ let _options : base.WebApiRequestOptions = null;
3223
+ const first : any = appointmentId;
3224
+ if( typeof( first ) === "object" && first && ( typeof(first.appointmentId)!='undefined' ) )
3225
+ {
3226
+ _request = appointmentId as carriers.Appointment_ConvertAppointmentToTaskRequest;
3227
+ _options = webapi_options as base.WebApiRequestOptions;
3228
+ }
3229
+ else
3230
+ {
3231
+ _request = {
3232
+ appointmentId: appointmentId as number,
3233
+ };
3234
+ _options = webapi_options;
3235
+ }
3236
+ return this._convertAppointmentToTaskAsync( _request, _options );
3237
+ }
3238
+
3054
3239
  /**
3055
3240
  * Gets an array of Appointment objects.
3056
3241
  * @param appointmentIds - The primary keys.
@@ -5034,6 +5219,144 @@ export class AppointmentAgent extends base.WebApiBase implements IAppointmentAge
5034
5219
  }
5035
5220
 
5036
5221
 
5222
+ private async _updateAppointmentWithModeAsync(request: carriers.Appointment_UpdateAppointmentWithModeRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Appointment > {
5223
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
5224
+ base.WebApiBase.SetPending(options);
5225
+ return new Promise< carriers.Appointment >(async (resolve, reject) => {
5226
+ try {
5227
+ config.baseURL = this._options.baseUrl;
5228
+ const response = await this._axios.post("UpdateAppointmentWithMode", request , config);
5229
+ base.WebApiBase.SetCompleted(options);
5230
+ const res : carriers.Appointment = converters.Create_Appointment_From( response.data );
5231
+ resolve(res);
5232
+ }
5233
+ catch( err ) {
5234
+ base.WebApiBase.HandleError(options, config, err);
5235
+ reject(err);
5236
+ }
5237
+ });
5238
+ }
5239
+
5240
+
5241
+
5242
+ /**
5243
+ * Updates an appointment record, taking the given recurrence update mode into account.
5244
+ * @param request - Id, StartTime, EndTime, Status, Type, AssociateId, UpdateMode
5245
+ * @returns
5246
+ */
5247
+ public async updateAppointmentWithModeAsync(request: carriers.Appointment_UpdateAppointmentWithModeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
5248
+
5249
+ /**
5250
+ * Updates an appointment record, taking the given recurrence update mode into account.
5251
+ * @param id -
5252
+ * @param startTime -
5253
+ * @param endTime -
5254
+ * @param status -
5255
+ * @param type -
5256
+ * @param associateId - The appointment owner's id (associate id)
5257
+ * @param updateMode - Update mode for recurrence.
5258
+ * @returns
5259
+ */
5260
+ public async updateAppointmentWithModeAsync(id: number, startTime: Date, endTime: Date, status: enums.AppointmentStatus, type: enums.AppointmentType, associateId: number, updateMode: enums.RecurrenceUpdateMode, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
5261
+
5262
+ public async updateAppointmentWithModeAsync(id:number|carriers.Appointment_UpdateAppointmentWithModeRequest, startTime?:Date|base.WebApiRequestOptions, endTime?:Date, status?:enums.AppointmentStatus, type?:enums.AppointmentType, associateId?:number, updateMode?:enums.RecurrenceUpdateMode, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment > {
5263
+ let _request : carriers.Appointment_UpdateAppointmentWithModeRequest = null;
5264
+ let _options : base.WebApiRequestOptions = null;
5265
+ const first : any = id;
5266
+ if( typeof( first ) === "object" && first && ( typeof(first.id)!='undefined' || typeof(first.startTime)!='undefined' || typeof(first.endTime)!='undefined' || typeof(first.status)!='undefined' || typeof(first.type)!='undefined' || typeof(first.associateId)!='undefined' || typeof(first.updateMode)!='undefined' ) )
5267
+ {
5268
+ _request = id as carriers.Appointment_UpdateAppointmentWithModeRequest;
5269
+ _options = startTime as base.WebApiRequestOptions;
5270
+ }
5271
+ else
5272
+ {
5273
+ _request = {
5274
+ id: id as number,
5275
+ startTime: startTime as Date,
5276
+ endTime: endTime as Date,
5277
+ status: status as enums.AppointmentStatus,
5278
+ type: type as enums.AppointmentType,
5279
+ associateId: associateId as number,
5280
+ updateMode: updateMode as enums.RecurrenceUpdateMode,
5281
+ };
5282
+ _options = webapi_options;
5283
+ }
5284
+ return this._updateAppointmentWithModeAsync( _request, _options );
5285
+ }
5286
+
5287
+
5288
+ private async _updateAppointmentWithModeAndEmailAsync(request: carriers.Appointment_UpdateAppointmentWithModeAndEmailRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Appointment > {
5289
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
5290
+ base.WebApiBase.SetPending(options);
5291
+ return new Promise< carriers.Appointment >(async (resolve, reject) => {
5292
+ try {
5293
+ config.baseURL = this._options.baseUrl;
5294
+ const response = await this._axios.post("UpdateAppointmentWithModeAndEmail", request , config);
5295
+ base.WebApiBase.SetCompleted(options);
5296
+ const res : carriers.Appointment = converters.Create_Appointment_From( response.data );
5297
+ resolve(res);
5298
+ }
5299
+ catch( err ) {
5300
+ base.WebApiBase.HandleError(options, config, err);
5301
+ reject(err);
5302
+ }
5303
+ });
5304
+ }
5305
+
5306
+
5307
+
5308
+ /**
5309
+ * Updates an appointment record, taking the given recurrence update mode into account, possibly sending notification emails.
5310
+ * @param request - Id, StartTime, EndTime, Status, Type, AssociateId, UpdateMode, SendEmailToParticipants, SmtpEMailConnectionInfo, ImapEMailConnectionInfo
5311
+ * @returns
5312
+ */
5313
+ public async updateAppointmentWithModeAndEmailAsync(request: carriers.Appointment_UpdateAppointmentWithModeAndEmailRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
5314
+
5315
+ /**
5316
+ * Updates an appointment record, taking the given recurrence update mode into account, possibly sending notification emails.
5317
+ * @param id -
5318
+ * @param startTime -
5319
+ * @param endTime -
5320
+ * @param status -
5321
+ * @param type -
5322
+ * @param associateId - The appointment owner's id (associate id)
5323
+ * @param updateMode - Update mode for recurrence.
5324
+ * @param sendEmailToParticipants - If true, emails will be sent to all participants that is marked with send email flag if deemed necessary. If false no mails will be sent even if the send email flag is true.
5325
+ * @param smtpEMailConnectionInfo - Login information for outgoing smtp email server. Will be null if no login information is relevant.
5326
+ * @param imapEMailConnectionInfo - Login information for imap server. Will be null if no login information is relevant.
5327
+ * @returns
5328
+ */
5329
+ public async updateAppointmentWithModeAndEmailAsync(id: number, startTime: Date, endTime: Date, status: enums.AppointmentStatus, type: enums.AppointmentType, associateId: number, updateMode: enums.RecurrenceUpdateMode, sendEmailToParticipants: boolean, smtpEMailConnectionInfo: carriers.EMailConnectionInfo, imapEMailConnectionInfo: carriers.EMailConnectionInfo, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
5330
+
5331
+ public async updateAppointmentWithModeAndEmailAsync(id:number|carriers.Appointment_UpdateAppointmentWithModeAndEmailRequest, startTime?:Date|base.WebApiRequestOptions, endTime?:Date, status?:enums.AppointmentStatus, type?:enums.AppointmentType, associateId?:number, updateMode?:enums.RecurrenceUpdateMode, sendEmailToParticipants?:boolean, smtpEMailConnectionInfo?:carriers.EMailConnectionInfo, imapEMailConnectionInfo?:carriers.EMailConnectionInfo, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment > {
5332
+ let _request : carriers.Appointment_UpdateAppointmentWithModeAndEmailRequest = null;
5333
+ let _options : base.WebApiRequestOptions = null;
5334
+ const first : any = id;
5335
+ if( typeof( first ) === "object" && first && ( typeof(first.id)!='undefined' || typeof(first.startTime)!='undefined' || typeof(first.endTime)!='undefined' || typeof(first.status)!='undefined' || typeof(first.type)!='undefined' || typeof(first.associateId)!='undefined' || typeof(first.updateMode)!='undefined' || typeof(first.sendEmailToParticipants)!='undefined' || typeof(first.smtpEMailConnectionInfo)!='undefined' || typeof(first.imapEMailConnectionInfo)!='undefined' ) )
5336
+ {
5337
+ _request = id as carriers.Appointment_UpdateAppointmentWithModeAndEmailRequest;
5338
+ _options = startTime as base.WebApiRequestOptions;
5339
+ }
5340
+ else
5341
+ {
5342
+ _request = {
5343
+ id: id as number,
5344
+ startTime: startTime as Date,
5345
+ endTime: endTime as Date,
5346
+ status: status as enums.AppointmentStatus,
5347
+ type: type as enums.AppointmentType,
5348
+ associateId: associateId as number,
5349
+ updateMode: updateMode as enums.RecurrenceUpdateMode,
5350
+ sendEmailToParticipants: sendEmailToParticipants as boolean,
5351
+ smtpEMailConnectionInfo: smtpEMailConnectionInfo as carriers.EMailConnectionInfo,
5352
+ imapEMailConnectionInfo: imapEMailConnectionInfo as carriers.EMailConnectionInfo,
5353
+ };
5354
+ _options = webapi_options;
5355
+ }
5356
+ return this._updateAppointmentWithModeAndEmailAsync( _request, _options );
5357
+ }
5358
+
5359
+
5037
5360
  private async _getAssociatesDiaryAsync(request: carriers.Appointment_GetAssociatesDiaryRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Appointment[] > {
5038
5361
  const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
5039
5362
  base.WebApiBase.SetPending(options);
@@ -5822,6 +6145,89 @@ export class AppointmentAgent extends base.WebApiBase implements IAppointmentAge
5822
6145
  return this._getTaskListItemsAsync( _request, _options );
5823
6146
  }
5824
6147
 
6148
+
6149
+ private async _createVideoMeetingReservationAsync( options?:base.WebApiRequestOptions) : Promise< carriers.VideoMeetingReservation > {
6150
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
6151
+ base.WebApiBase.SetPending(options);
6152
+ return new Promise< carriers.VideoMeetingReservation >(async (resolve, reject) => {
6153
+ try {
6154
+ config.baseURL = this._options.baseUrl;
6155
+ const response = await this._axios.post("CreateVideoMeetingReservation", undefined , config);
6156
+ base.WebApiBase.SetCompleted(options);
6157
+ const res : carriers.VideoMeetingReservation = converters.Create_VideoMeetingReservation_From( response.data );
6158
+ resolve(res);
6159
+ }
6160
+ catch( err ) {
6161
+ base.WebApiBase.HandleError(options, config, err);
6162
+ reject(err);
6163
+ }
6164
+ });
6165
+ }
6166
+
6167
+
6168
+ /**
6169
+ * Create a VideoMeetingReservation. System users are not allowed to create video meeting reservations
6170
+ * @returns The created VideoMeetingReservation.
6171
+ */
6172
+ public async createVideoMeetingReservationAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.VideoMeetingReservation >
6173
+ {
6174
+ return this._createVideoMeetingReservationAsync(webapi_options);
6175
+ }
6176
+
6177
+
6178
+ private async _deleteVideoMeetingReservationAsync(request: carriers.Appointment_DeleteVideoMeetingReservationRequest, options?:base.WebApiRequestOptions) : Promise< void > {
6179
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
6180
+ base.WebApiBase.SetPending(options);
6181
+ return new Promise< void >(async (resolve, reject) => {
6182
+ try {
6183
+ config.baseURL = this._options.baseUrl;
6184
+ const response = await this._axios.post("DeleteVideoMeetingReservation", request , config);
6185
+ base.WebApiBase.SetCompleted(options);
6186
+ const res = response.data;
6187
+ resolve(res);
6188
+ }
6189
+ catch( err ) {
6190
+ base.WebApiBase.HandleError(options, config, err);
6191
+ reject(err);
6192
+ }
6193
+ });
6194
+ }
6195
+
6196
+
6197
+
6198
+ /**
6199
+ * Delete a VideoMeetingReservation.
6200
+ * @param request - VideoMeetingId
6201
+ * @returns
6202
+ */
6203
+ public async deleteVideoMeetingReservationAsync(request: carriers.Appointment_DeleteVideoMeetingReservationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
6204
+
6205
+ /**
6206
+ * Delete a VideoMeetingReservation.
6207
+ * @param videoMeetingId - The VideoMeetingReservation.VideoMeetingId to remove. System users are not allowed to delete video meeting reservations
6208
+ * @returns
6209
+ */
6210
+ public async deleteVideoMeetingReservationAsync(videoMeetingId: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
6211
+
6212
+ public async deleteVideoMeetingReservationAsync(videoMeetingId:string|carriers.Appointment_DeleteVideoMeetingReservationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
6213
+ let _request : carriers.Appointment_DeleteVideoMeetingReservationRequest = null;
6214
+ let _options : base.WebApiRequestOptions = null;
6215
+ const first : any = videoMeetingId;
6216
+ if( typeof( first ) === "object" && first && ( typeof(first.videoMeetingId)!='undefined' ) )
6217
+ {
6218
+ _request = videoMeetingId as carriers.Appointment_DeleteVideoMeetingReservationRequest;
6219
+ _options = webapi_options as base.WebApiRequestOptions;
6220
+ }
6221
+ else
6222
+ {
6223
+ _request = {
6224
+ videoMeetingId: videoMeetingId as string,
6225
+ };
6226
+ _options = webapi_options;
6227
+ }
6228
+ return this._deleteVideoMeetingReservationAsync( _request, _options );
6229
+ }
6230
+
5825
6231
  } // class v1AppointmentAgentController
5826
6232
 
5827
6233
 
@@ -42,6 +42,8 @@ export interface ICRMScriptAgent {
42
42
  deleteCRMScriptByUniqueIdentifierAsync(request: carriers.CRMScript_DeleteCRMScriptByUniqueIdentifierRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
43
43
  deleteCRMScriptByUniqueIdentifierAsync(uniqueIdentifier: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
44
44
  getCRMScriptEntityAsync(cRMScriptEntityId: number) : Promise< carriers.CRMScriptEntity >;
45
+ saveCRMScriptEntityWithoutCompileAsync(request: carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity >;
46
+ saveCRMScriptEntityWithoutCompileAsync(crmScriptEntity: carriers.CRMScriptEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity >;
45
47
  executeScriptAsync(request: carriers.CRMScript_ExecuteScriptRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
46
48
  executeScriptAsync(crmScriptId: number, parameters: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
47
49
  executeScriptByIncludeIdAsync(request: carriers.CRMScript_ExecuteScriptByIncludeIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
@@ -62,6 +64,8 @@ export interface ICRMScriptAgent {
62
64
  executeScriptByStringAsync(script: string, parameters: carriers.StringDictionary, eventData: carriers.EventData, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptRunResult >;
63
65
  validateScriptByStringAsync(request: carriers.CRMScript_ValidateScriptByStringRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
64
66
  validateScriptByStringAsync(script: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptResult >;
67
+ resolveIncludesAsync(request: carriers.CRMScript_ResolveIncludesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
68
+ resolveIncludesAsync(script: string, ignoreErrors: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
65
69
  getTriggerScriptEntityAsync(triggerScriptEntityId: number) : Promise< carriers.TriggerScriptEntity >;
66
70
  getTriggerScriptByUniqueIdAsync(request: carriers.CRMScript_GetTriggerScriptByUniqueIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
67
71
  getTriggerScriptByUniqueIdAsync(triggerScriptUniqueId: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.TriggerScriptEntity >;
@@ -423,6 +427,60 @@ export class CRMScriptAgent extends base.WebApiBase implements ICRMScriptAgent {
423
427
  }
424
428
 
425
429
 
430
+ private async _saveCRMScriptEntityWithoutCompileAsync(request: carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity > {
431
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
432
+ base.WebApiBase.SetPending(options);
433
+ return new Promise< carriers.CRMScriptEntity >(async (resolve, reject) => {
434
+ try {
435
+ config.baseURL = this._options.baseUrl;
436
+ const response = await this._axios.post("SaveCRMScriptEntityWithoutCompile", request , config);
437
+ base.WebApiBase.SetCompleted(options);
438
+ const res : carriers.CRMScriptEntity = converters.Create_CRMScriptEntity_From( response.data );
439
+ resolve(res);
440
+ }
441
+ catch( err ) {
442
+ base.WebApiBase.HandleError(options, config, err);
443
+ reject(err);
444
+ }
445
+ });
446
+ }
447
+
448
+
449
+
450
+ /**
451
+ * Save the script directly without compiling TypeScript
452
+ * @param request - CrmScriptEntity
453
+ * @returns The saved entity
454
+ */
455
+ public async saveCRMScriptEntityWithoutCompileAsync(request: carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity >;
456
+
457
+ /**
458
+ * Save the script directly without compiling TypeScript
459
+ * @param crmScriptEntity - The entity to save. Source and SourceCode should both be specified
460
+ * @returns The saved entity
461
+ */
462
+ public async saveCRMScriptEntityWithoutCompileAsync(crmScriptEntity: carriers.CRMScriptEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity >;
463
+
464
+ public async saveCRMScriptEntityWithoutCompileAsync(crmScriptEntity:carriers.CRMScriptEntity|carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CRMScriptEntity > {
465
+ let _request : carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest = null;
466
+ let _options : base.WebApiRequestOptions = null;
467
+ const first : any = crmScriptEntity;
468
+ if( typeof( first ) === "object" && first && ( typeof(first.crmScriptEntity)!='undefined' ) )
469
+ {
470
+ _request = crmScriptEntity as carriers.CRMScript_SaveCRMScriptEntityWithoutCompileRequest;
471
+ _options = webapi_options as base.WebApiRequestOptions;
472
+ }
473
+ else
474
+ {
475
+ _request = {
476
+ crmScriptEntity: crmScriptEntity as carriers.CRMScriptEntity,
477
+ };
478
+ _options = webapi_options;
479
+ }
480
+ return this._saveCRMScriptEntityWithoutCompileAsync( _request, _options );
481
+ }
482
+
483
+
426
484
  private async _executeScriptAsync(request: carriers.CRMScript_ExecuteScriptRequest, options?:base.WebApiRequestOptions) : Promise< string > {
427
485
  const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
428
486
  base.WebApiBase.SetPending(options);
@@ -976,6 +1034,62 @@ export class CRMScriptAgent extends base.WebApiBase implements ICRMScriptAgent {
976
1034
  return this._validateScriptByStringAsync( _request, _options );
977
1035
  }
978
1036
 
1037
+
1038
+ private async _resolveIncludesAsync(request: carriers.CRMScript_ResolveIncludesRequest, options?:base.WebApiRequestOptions) : Promise< number[] > {
1039
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1040
+ base.WebApiBase.SetPending(options);
1041
+ return new Promise< number[] >(async (resolve, reject) => {
1042
+ try {
1043
+ config.baseURL = this._options.baseUrl;
1044
+ const response = await this._axios.post("ResolveIncludes", request , config);
1045
+ base.WebApiBase.SetCompleted(options);
1046
+ const res : number[] = response.data as number[];
1047
+ resolve(res);
1048
+ }
1049
+ catch( err ) {
1050
+ base.WebApiBase.HandleError(options, config, err);
1051
+ reject(err);
1052
+ }
1053
+ });
1054
+ }
1055
+
1056
+
1057
+
1058
+ /**
1059
+ * Will resolve all includes for a TypeScript and return an array of the IDs
1060
+ * @param request - Script, IgnoreErrors
1061
+ * @returns The ids of all the included scripts
1062
+ */
1063
+ public async resolveIncludesAsync(request: carriers.CRMScript_ResolveIncludesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
1064
+
1065
+ /**
1066
+ * Will resolve all includes for a TypeScript and return an array of the IDs
1067
+ * @param script - The script to resolve includes for
1068
+ * @param ignoreErrors - If true, then missing includes will be ignored
1069
+ * @returns The ids of all the included scripts
1070
+ */
1071
+ public async resolveIncludesAsync(script: string, ignoreErrors: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< number[] >;
1072
+
1073
+ public async resolveIncludesAsync(script:string|carriers.CRMScript_ResolveIncludesRequest, ignoreErrors?:boolean|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< number[] > {
1074
+ let _request : carriers.CRMScript_ResolveIncludesRequest = null;
1075
+ let _options : base.WebApiRequestOptions = null;
1076
+ const first : any = script;
1077
+ if( typeof( first ) === "object" && first && ( typeof(first.script)!='undefined' || typeof(first.ignoreErrors)!='undefined' ) )
1078
+ {
1079
+ _request = script as carriers.CRMScript_ResolveIncludesRequest;
1080
+ _options = ignoreErrors as base.WebApiRequestOptions;
1081
+ }
1082
+ else
1083
+ {
1084
+ _request = {
1085
+ script: script as string,
1086
+ ignoreErrors: ignoreErrors as boolean,
1087
+ };
1088
+ _options = webapi_options;
1089
+ }
1090
+ return this._resolveIncludesAsync( _request, _options );
1091
+ }
1092
+
979
1093
  /**
980
1094
  * Gets a TriggerScriptEntity object.
981
1095
  * @param triggerScriptEntityId - The primary key.