@superoffice/webapi 11.7.727 → 11.9.1204

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 (163) hide show
  1. package/LICENSE.md +15 -15
  2. package/README.md +184 -184
  3. package/__tests__/Appointment63-notz.json +1925 -1925
  4. package/__tests__/Appointment63-utctz.json +1925 -1925
  5. package/__tests__/Appointment63.json +1925 -1925
  6. package/__tests__/AppointmentTzTest.ts +115 -115
  7. package/__tests__/AxiosNockTest.ts +28 -28
  8. package/__tests__/ContactDefault.json +699 -699
  9. package/__tests__/ContactEntity.json +272 -272
  10. package/__tests__/ContactRestTest.ts +144 -144
  11. package/__tests__/ContactTest.ts +395 -395
  12. package/__tests__/ConvertersTest.ts +97 -97
  13. package/__tests__/DocumentTest.ts +101 -101
  14. package/__tests__/Person210-notz.json +1932 -1932
  15. package/__tests__/Person210-utctz.json +1932 -1932
  16. package/__tests__/Person210.json +1932 -1932
  17. package/__tests__/PersonImageData.nock +22 -22
  18. package/__tests__/PersonTest.ts +41 -41
  19. package/__tests__/PersonTzTest.ts +113 -113
  20. package/__tests__/RecurrenceInfo.json +55 -55
  21. package/__tests__/ResponseCallbackTest.ts +23 -23
  22. package/__tests__/TableRights.json +441 -441
  23. package/__tests__/WebapiTest.ts +264 -264
  24. package/__tests__/Webhook.json +16 -16
  25. package/__tests__/WebhookTest.ts +209 -209
  26. package/dist/cjs/AIAgent.d.ts +62 -0
  27. package/dist/cjs/AIAgent.d.ts.map +1 -1
  28. package/dist/cjs/AIAgent.js +149 -0
  29. package/dist/cjs/AIAgent.js.map +1 -1
  30. package/dist/cjs/Carriers.d.ts +640 -14
  31. package/dist/cjs/Carriers.d.ts.map +1 -1
  32. package/dist/cjs/Converters.d.ts +24 -0
  33. package/dist/cjs/Converters.d.ts.map +1 -1
  34. package/dist/cjs/Converters.js +388 -17
  35. package/dist/cjs/Converters.js.map +1 -1
  36. package/dist/cjs/DiagnosticsAgent.d.ts +38 -0
  37. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
  38. package/dist/cjs/DiagnosticsAgent.js +91 -0
  39. package/dist/cjs/DiagnosticsAgent.js.map +1 -1
  40. package/dist/cjs/Enums.d.ts +77 -1
  41. package/dist/cjs/Enums.d.ts.map +1 -1
  42. package/dist/cjs/Enums.js +83 -4
  43. package/dist/cjs/Enums.js.map +1 -1
  44. package/dist/cjs/ListAgent.d.ts +71 -6
  45. package/dist/cjs/ListAgent.d.ts.map +1 -1
  46. package/dist/cjs/ListAgent.js +157 -0
  47. package/dist/cjs/ListAgent.js.map +1 -1
  48. package/dist/cjs/MarketingAgent.d.ts +68 -0
  49. package/dist/cjs/MarketingAgent.d.ts.map +1 -1
  50. package/dist/cjs/MarketingAgent.js +157 -0
  51. package/dist/cjs/MarketingAgent.js.map +1 -1
  52. package/dist/cjs/TicketAgent.d.ts +23 -0
  53. package/dist/cjs/TicketAgent.d.ts.map +1 -1
  54. package/dist/cjs/TicketAgent.js +65 -0
  55. package/dist/cjs/TicketAgent.js.map +1 -1
  56. package/dist/esm/AIAgent.d.ts +62 -0
  57. package/dist/esm/AIAgent.d.ts.map +1 -1
  58. package/dist/esm/AIAgent.js +150 -1
  59. package/dist/esm/AIAgent.js.map +1 -1
  60. package/dist/esm/Carriers.d.ts +640 -14
  61. package/dist/esm/Carriers.d.ts.map +1 -1
  62. package/dist/esm/Converters.d.ts +24 -0
  63. package/dist/esm/Converters.d.ts.map +1 -1
  64. package/dist/esm/Converters.js +346 -0
  65. package/dist/esm/Converters.js.map +1 -1
  66. package/dist/esm/DiagnosticsAgent.d.ts +38 -0
  67. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
  68. package/dist/esm/DiagnosticsAgent.js +91 -0
  69. package/dist/esm/DiagnosticsAgent.js.map +1 -1
  70. package/dist/esm/Enums.d.ts +77 -1
  71. package/dist/esm/Enums.d.ts.map +1 -1
  72. package/dist/esm/Enums.js +79 -0
  73. package/dist/esm/Enums.js.map +1 -1
  74. package/dist/esm/ListAgent.d.ts +71 -6
  75. package/dist/esm/ListAgent.d.ts.map +1 -1
  76. package/dist/esm/ListAgent.js +157 -0
  77. package/dist/esm/ListAgent.js.map +1 -1
  78. package/dist/esm/MarketingAgent.d.ts +68 -0
  79. package/dist/esm/MarketingAgent.d.ts.map +1 -1
  80. package/dist/esm/MarketingAgent.js +157 -0
  81. package/dist/esm/MarketingAgent.js.map +1 -1
  82. package/dist/esm/TicketAgent.d.ts +23 -0
  83. package/dist/esm/TicketAgent.d.ts.map +1 -1
  84. package/dist/esm/TicketAgent.js +65 -0
  85. package/dist/esm/TicketAgent.js.map +1 -1
  86. package/examples-js/hello.js +12 -12
  87. package/examples-ts/hello.ts +8 -8
  88. package/package.json +93 -93
  89. package/scripts/postbuild.js +22 -22
  90. package/scripts/setVersion.js +44 -44
  91. package/src/AIAgent.ts +2239 -1992
  92. package/src/AppointmentAgent.ts +6263 -6263
  93. package/src/AppointmentRestApi.ts +225 -225
  94. package/src/ArchiveAgent.ts +1950 -1950
  95. package/src/AssociateAgent.ts +422 -422
  96. package/src/AxiosCacheHandler.ts +74 -74
  97. package/src/BLOBAgent.ts +2100 -2100
  98. package/src/Base64.ts +285 -285
  99. package/src/BatchAgent.ts +910 -910
  100. package/src/BulkUpdateAgent.ts +504 -504
  101. package/src/CRMScriptAgent.ts +1390 -1390
  102. package/src/Carriers.ts +53121 -52274
  103. package/src/ChatAgent.ts +1422 -1422
  104. package/src/ConfigurationAgent.ts +2228 -2228
  105. package/src/ContactAgent.ts +1756 -1756
  106. package/src/ContactRestApi.ts +237 -237
  107. package/src/Converters.ts +23496 -23090
  108. package/src/CustomerServiceAgent.ts +1799 -1799
  109. package/src/DashAgent.ts +1674 -1674
  110. package/src/DatabaseAgent.ts +120 -120
  111. package/src/DatabaseTableAgent.ts +534 -534
  112. package/src/Day_js.ts +41 -41
  113. package/src/DiagnosticsAgent.ts +1384 -1240
  114. package/src/DocumentAgent.ts +5079 -5079
  115. package/src/DocumentMigrationAgent.ts +524 -524
  116. package/src/DocumentRestApi.ts +259 -259
  117. package/src/EMailAgent.ts +5328 -5328
  118. package/src/Enums.ts +6998 -6916
  119. package/src/ErpSyncAgent.ts +2658 -2658
  120. package/src/FavouriteAgent.ts +720 -720
  121. package/src/FindAgent.ts +2330 -2330
  122. package/src/ForeignSystemAgent.ts +1710 -1710
  123. package/src/FreeTextAgent.ts +372 -372
  124. package/src/ImportAgent.ts +304 -304
  125. package/src/LicenseAgent.ts +1230 -1230
  126. package/src/ListAgent.ts +11451 -11237
  127. package/src/MDOAgent.ts +748 -748
  128. package/src/MarketingAgent.ts +1146 -890
  129. package/src/MessagingAgent.ts +384 -384
  130. package/src/NavigatorAgent.ts +140 -140
  131. package/src/NumberAllocationAgent.ts +296 -296
  132. package/src/PersonAgent.ts +3287 -3287
  133. package/src/PersonRestApi.ts +241 -241
  134. package/src/PhoneListAgent.ts +458 -458
  135. package/src/PocketAgent.ts +780 -780
  136. package/src/PreferenceAgent.ts +1900 -1900
  137. package/src/PreviewsAgent.ts +116 -116
  138. package/src/ProjectAgent.ts +2391 -2391
  139. package/src/ProjectRestApi.ts +239 -239
  140. package/src/QuoteAgent.ts +5159 -5159
  141. package/src/RelationAgent.ts +220 -220
  142. package/src/ReportAgent.ts +154 -154
  143. package/src/ResourceAgent.ts +358 -358
  144. package/src/SaintAgent.ts +601 -601
  145. package/src/SaleAgent.ts +2034 -2034
  146. package/src/SaleRestApi.ts +233 -233
  147. package/src/SelectionAgent.ts +3195 -3195
  148. package/src/SentryAgent.ts +462 -462
  149. package/src/SoApiConstants.ts +8 -8
  150. package/src/TargetsAgent.ts +1104 -1104
  151. package/src/TicketAgent.ts +3708 -3638
  152. package/src/TimeZoneAgent.ts +528 -528
  153. package/src/TooltipsAgent.ts +116 -116
  154. package/src/UserAgent.ts +4856 -4856
  155. package/src/UserDefinedFieldInfoAgent.ts +1764 -1764
  156. package/src/ViewStateAgent.ts +858 -858
  157. package/src/WebApi.ts +872 -872
  158. package/src/WebApiBase.ts +565 -565
  159. package/src/WebhookAgent.ts +388 -388
  160. package/src/WorkflowAgent.ts +1338 -1338
  161. package/tsconfig.esm.json +8 -8
  162. package/tsconfig.jest.json +8 -8
  163. package/tsconfig.json +34 -34
package/src/DashAgent.ts CHANGED
@@ -1,1674 +1,1674 @@
1
- // <auto-generated>
2
- // SuperOffice Code Generator
3
- // modelling\templates\servicestswebapi\tswebapiagents.tt
4
- // </auto-generated>
5
-
6
-
7
- /* tslint:disable */
8
- //----------------------------------------------------------------------------
9
- // G E N E R A T E D F I L E ! D O N O T E D I T !
10
- //----------------------------------------------------------------------------
11
- //
12
- // File: WebApi/DashAgent.ts
13
- //
14
- //----------------------------------------------------------------------------
15
- // Copyright (C) SuperOffice AS
16
- //----------------------------------------------------------------------------
17
-
18
- import { AxiosRequestConfig } from 'axios';
19
- import { Duration } from 'dayjs/plugin/duration';
20
- import * as enums from './Enums';
21
- import * as base from './WebApiBase';
22
- import * as carriers from './Carriers';
23
- import * as converters from './Converters';
24
- import { FromBase64ToString, ToBase64 } from './Base64';
25
-
26
- /**
27
- * Agent that lets you configure dashboard tiles and retrieve dashboard data
28
- */
29
- export interface IDashAgent {
30
- createDefaultDashAsync(): Promise< carriers.Dash >;
31
- saveDashAsync(entity: carriers.Dash) : Promise< carriers.Dash >;
32
- deleteDashAsync(DashId: number) : Promise<void>;
33
- createDefaultDashCollectionAsync(): Promise< carriers.DashCollection >;
34
- createDefaultDashThemeAsync(): Promise< carriers.DashTheme >;
35
- saveDashThemeAsync(entity: carriers.DashTheme) : Promise< carriers.DashTheme >;
36
- deleteDashThemeAsync(DashThemeId: number) : Promise<void>;
37
- createDefaultDashTileAsync(): Promise< carriers.DashTile >;
38
- saveDashTileAsync(entity: carriers.DashTile) : Promise< carriers.DashTile >;
39
- deleteDashTileAsync(DashTileId: number) : Promise<void>;
40
- createDefaultDashTileDefinitionAsync(): Promise< carriers.DashTileDefinition >;
41
- saveDashTileDefinitionAsync(entity: carriers.DashTileDefinition) : Promise< carriers.DashTileDefinition >;
42
- deleteDashTileDefinitionAsync(DashTileDefinitionId: number) : Promise<void>;
43
- createDefaultPreviewDashAsync(): Promise< carriers.PreviewDash >;
44
- createDefaultPreviewDashTileAsync(): Promise< carriers.PreviewDashTile >;
45
- getDashAsync(dashId: number) : Promise< carriers.Dash >;
46
- addTileToDashboardAsync(request: carriers.Dash_AddTileToDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
47
- addTileToDashboardAsync(dashboardId: number, dashTileDefinitionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
48
- addNewTileToDashboardAsync(request: carriers.Dash_AddNewTileToDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
49
- addNewTileToDashboardAsync(dashboardId: number, dashTileDefinition: carriers.DashTileDefinition, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
50
- duplicateDashboardAsync(request: carriers.Dash_DuplicateDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash >;
51
- duplicateDashboardAsync(dashboardId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash >;
52
- getDashListAsync(request: carriers.Dash_GetDashListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] >;
53
- getDashListAsync(dashboards: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] >;
54
- getDashQuickFiltersAsync(request: carriers.Dash_GetDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
55
- getDashQuickFiltersAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
56
- saveDashQuickFiltersAsync(request: carriers.Dash_SaveDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
57
- saveDashQuickFiltersAsync(dashboardId: number, quickFilters: carriers.QuickFilterInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
58
- getPossibleDashQuickFiltersAsync(request: carriers.Dash_GetPossibleDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
59
- getPossibleDashQuickFiltersAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
60
- getDashCollectionAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection >;
61
- getDashThemeAsync(dashThemeId: number) : Promise< carriers.DashTheme >;
62
- getDashTileAsync(dashTileId: number) : Promise< carriers.DashTile >;
63
- getDashTilesAsync(request: carriers.Dash_GetDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] >;
64
- getDashTilesAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] >;
65
- saveDashTilesAsync(request: carriers.Dash_SaveDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
66
- saveDashTilesAsync(dashboardId: number, dashTiles: carriers.DashTile[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
67
- createDashTileSelectionFromEntityAsync(request: carriers.Dash_CreateDashTileSelectionFromEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
68
- createDashTileSelectionFromEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
69
- copyTileSelectionAsync(request: carriers.Dash_CopyTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
70
- copyTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
71
- getTempTileSelectionAsync(request: carriers.Dash_GetTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
72
- getTempTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
73
- getSecondaryTempTileSelectionAsync(request: carriers.Dash_GetSecondaryTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
74
- getSecondaryTempTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
75
- createDefaultTileForEntityAsync(request: carriers.Dash_CreateDefaultTileForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
76
- createDefaultTileForEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
77
- duplicateTileAsync(request: carriers.Dash_DuplicateTileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
78
- duplicateTileAsync(dashTileId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
79
- getDashTileDefinitionAsync(dashTileDefinitionId: number) : Promise< carriers.DashTileDefinition >;
80
- createDefaultTileDefinitionForEntityAsync(request: carriers.Dash_CreateDefaultTileDefinitionForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition >;
81
- createDefaultTileDefinitionForEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition >;
82
- getDashTileHtmlAsync(request: carriers.Dash_GetDashTileHtmlRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml >;
83
- getDashTileHtmlAsync(dashboardTileDefinitionId: number, languageCode: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml >;
84
- getDashTileHtmlListAsync(request: carriers.Dash_GetDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
85
- getDashTileHtmlListAsync(dashboardTileDefinitionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
86
- saveDashTileHtmlListAsync(request: carriers.Dash_SaveDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
87
- saveDashTileHtmlListAsync(dashboardTileDefinitionId: number, languages: carriers.DashTileHtml[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
88
- getPreviewDashAsync(request: carriers.Dash_GetPreviewDashRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash >;
89
- getPreviewDashAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash >;
90
- } // interface IDashAgent
91
-
92
-
93
-
94
-
95
- /**
96
- * Agent that lets you configure dashboard tiles and retrieve dashboard data
97
- */
98
- export class DashAgent extends base.WebApiBase implements IDashAgent {
99
- constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
100
- constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
101
- constructor(baseUrl: string, resourceManager:any);
102
- constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
103
- constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
104
- constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
105
- constructor(options: base.WebApiOptions);
106
-
107
- constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
108
- langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
109
- langOrResourceOrRM?:string|base.ResourceParsing|any,
110
- cultureCode?: string,
111
- ) {
112
- const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
113
- options.basePath = "v1/Agents/Dash/";
114
- super(options);
115
- }
116
-
117
-
118
-
119
- /**
120
- * Set default values into a new Dash.
121
- * NetServer calculates default values on the entity, which is required when creating/storing a new instance
122
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
123
- * @returns A blank entity.
124
- */
125
- public async createDefaultDashAsync(options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
126
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
127
- base.WebApiBase.SetPending(options);
128
- return new Promise< carriers.Dash >(async (resolve, reject) => {
129
- try {
130
- const response = await this._axios.post("CreateDefaultDash", null, config);
131
- base.WebApiBase.SetCompleted(options, response);
132
- const res : carriers.Dash = converters.Create_Dash_From( response.data );
133
- resolve(res);
134
- }
135
- catch( err ) {
136
- base.WebApiBase.HandleError(options, config, err);
137
- reject(err);
138
- }
139
- });
140
- }
141
- /**
142
- * Replace the existing Dash or creates a new Dash if the id parameter is empty
143
- * @param entity - The Dash to be saved.
144
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
145
- * @returns New or updated Dash
146
- */
147
- public async saveDashAsync(entity: carriers.Dash, options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
148
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
149
- base.WebApiBase.SetPending(options);
150
- return new Promise< carriers.Dash >(async (resolve, reject) => {
151
- try {
152
- const response = await this._axios.post("SaveDash", entity, config);
153
- base.WebApiBase.SetCompleted(options, response);
154
- const res : carriers.Dash = converters.Create_Dash_From( response.data );
155
- resolve(res);
156
- }
157
- catch( err ) {
158
- base.WebApiBase.HandleError(options, config, err);
159
- reject(err);
160
- }
161
- });
162
- }
163
-
164
- /**
165
- * Deletes the Dash
166
- * @param DashId - The id of the Dash to be deleted.
167
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
168
- */
169
- public async deleteDashAsync(DashId: number, options?:base.WebApiRequestOptions) : Promise< void > {
170
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
171
- base.WebApiBase.SetPending(options);
172
- return new Promise< void >(async (resolve, reject) => {
173
- try {
174
- const response = await this._axios.post("DeleteDash?DashId=" + DashId, null, config );
175
- base.WebApiBase.SetCompleted(options, response);
176
- const res = response.data;
177
- resolve(res);
178
- }
179
- catch( err ) {
180
- base.WebApiBase.HandleError(options, config, err);
181
- reject(err);
182
- }
183
- });
184
- }
185
-
186
- /**
187
- * Set default values into a new DashCollection.
188
- * NetServer calculates default values on the entity, which is required when creating/storing a new instance
189
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
190
- * @returns A blank entity.
191
- */
192
- public async createDefaultDashCollectionAsync(options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection > {
193
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
194
- base.WebApiBase.SetPending(options);
195
- return new Promise< carriers.DashCollection >(async (resolve, reject) => {
196
- try {
197
- const response = await this._axios.post("CreateDefaultDashCollection", null, config);
198
- base.WebApiBase.SetCompleted(options, response);
199
- const res : carriers.DashCollection = converters.Create_DashCollection_From( response.data );
200
- resolve(res);
201
- }
202
- catch( err ) {
203
- base.WebApiBase.HandleError(options, config, err);
204
- reject(err);
205
- }
206
- });
207
- }
208
-
209
- /**
210
- * Set default values into a new DashTheme.
211
- * NetServer calculates default values on the entity, which is required when creating/storing a new instance
212
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
213
- * @returns A blank entity.
214
- */
215
- public async createDefaultDashThemeAsync(options?:base.WebApiRequestOptions) : Promise< carriers.DashTheme > {
216
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
217
- base.WebApiBase.SetPending(options);
218
- return new Promise< carriers.DashTheme >(async (resolve, reject) => {
219
- try {
220
- const response = await this._axios.post("CreateDefaultDashTheme", null, config);
221
- base.WebApiBase.SetCompleted(options, response);
222
- const res : carriers.DashTheme = converters.Create_DashTheme_From( response.data );
223
- resolve(res);
224
- }
225
- catch( err ) {
226
- base.WebApiBase.HandleError(options, config, err);
227
- reject(err);
228
- }
229
- });
230
- }
231
- /**
232
- * Replace the existing DashTheme or creates a new DashTheme if the id parameter is empty
233
- * @param entity - The DashTheme to be saved.
234
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
235
- * @returns New or updated DashTheme
236
- */
237
- public async saveDashThemeAsync(entity: carriers.DashTheme, options?:base.WebApiRequestOptions) : Promise< carriers.DashTheme > {
238
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
239
- base.WebApiBase.SetPending(options);
240
- return new Promise< carriers.DashTheme >(async (resolve, reject) => {
241
- try {
242
- const response = await this._axios.post("SaveDashTheme", entity, config);
243
- base.WebApiBase.SetCompleted(options, response);
244
- const res : carriers.DashTheme = converters.Create_DashTheme_From( response.data );
245
- resolve(res);
246
- }
247
- catch( err ) {
248
- base.WebApiBase.HandleError(options, config, err);
249
- reject(err);
250
- }
251
- });
252
- }
253
-
254
- /**
255
- * Deletes the DashTheme
256
- * @param DashThemeId - The id of the DashTheme to be deleted.
257
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
258
- */
259
- public async deleteDashThemeAsync(DashThemeId: number, options?:base.WebApiRequestOptions) : Promise< void > {
260
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
261
- base.WebApiBase.SetPending(options);
262
- return new Promise< void >(async (resolve, reject) => {
263
- try {
264
- const response = await this._axios.post("DeleteDashTheme?DashThemeId=" + DashThemeId, null, config );
265
- base.WebApiBase.SetCompleted(options, response);
266
- const res = response.data;
267
- resolve(res);
268
- }
269
- catch( err ) {
270
- base.WebApiBase.HandleError(options, config, err);
271
- reject(err);
272
- }
273
- });
274
- }
275
-
276
- /**
277
- * Set default values into a new DashTile.
278
- * NetServer calculates default values on the entity, which is required when creating/storing a new instance
279
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
280
- * @returns A blank entity.
281
- */
282
- public async createDefaultDashTileAsync(options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
283
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
284
- base.WebApiBase.SetPending(options);
285
- return new Promise< carriers.DashTile >(async (resolve, reject) => {
286
- try {
287
- const response = await this._axios.post("CreateDefaultDashTile", null, config);
288
- base.WebApiBase.SetCompleted(options, response);
289
- const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
290
- resolve(res);
291
- }
292
- catch( err ) {
293
- base.WebApiBase.HandleError(options, config, err);
294
- reject(err);
295
- }
296
- });
297
- }
298
- /**
299
- * Replace the existing DashTile or creates a new DashTile if the id parameter is empty
300
- * @param entity - The DashTile to be saved.
301
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
302
- * @returns New or updated DashTile
303
- */
304
- public async saveDashTileAsync(entity: carriers.DashTile, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
305
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
306
- base.WebApiBase.SetPending(options);
307
- return new Promise< carriers.DashTile >(async (resolve, reject) => {
308
- try {
309
- const response = await this._axios.post("SaveDashTile", entity, config);
310
- base.WebApiBase.SetCompleted(options, response);
311
- const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
312
- resolve(res);
313
- }
314
- catch( err ) {
315
- base.WebApiBase.HandleError(options, config, err);
316
- reject(err);
317
- }
318
- });
319
- }
320
-
321
- /**
322
- * Deletes the DashTile
323
- * @param DashTileId - The id of the DashTile to be deleted.
324
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
325
- */
326
- public async deleteDashTileAsync(DashTileId: number, options?:base.WebApiRequestOptions) : Promise< void > {
327
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
328
- base.WebApiBase.SetPending(options);
329
- return new Promise< void >(async (resolve, reject) => {
330
- try {
331
- const response = await this._axios.post("DeleteDashTile?DashTileId=" + DashTileId, null, config );
332
- base.WebApiBase.SetCompleted(options, response);
333
- const res = response.data;
334
- resolve(res);
335
- }
336
- catch( err ) {
337
- base.WebApiBase.HandleError(options, config, err);
338
- reject(err);
339
- }
340
- });
341
- }
342
-
343
- /**
344
- * Set default values into a new DashTileDefinition.
345
- * NetServer calculates default values on the entity, which is required when creating/storing a new instance
346
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
347
- * @returns A blank entity.
348
- */
349
- public async createDefaultDashTileDefinitionAsync(options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
350
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
351
- base.WebApiBase.SetPending(options);
352
- return new Promise< carriers.DashTileDefinition >(async (resolve, reject) => {
353
- try {
354
- const response = await this._axios.post("CreateDefaultDashTileDefinition", null, config);
355
- base.WebApiBase.SetCompleted(options, response);
356
- const res : carriers.DashTileDefinition = converters.Create_DashTileDefinition_From( response.data );
357
- resolve(res);
358
- }
359
- catch( err ) {
360
- base.WebApiBase.HandleError(options, config, err);
361
- reject(err);
362
- }
363
- });
364
- }
365
- /**
366
- * Replace the existing DashTileDefinition or creates a new DashTileDefinition if the id parameter is empty
367
- * @param entity - The DashTileDefinition to be saved.
368
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
369
- * @returns New or updated DashTileDefinition
370
- */
371
- public async saveDashTileDefinitionAsync(entity: carriers.DashTileDefinition, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
372
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
373
- base.WebApiBase.SetPending(options);
374
- return new Promise< carriers.DashTileDefinition >(async (resolve, reject) => {
375
- try {
376
- const response = await this._axios.post("SaveDashTileDefinition", entity, config);
377
- base.WebApiBase.SetCompleted(options, response);
378
- const res : carriers.DashTileDefinition = converters.Create_DashTileDefinition_From( response.data );
379
- resolve(res);
380
- }
381
- catch( err ) {
382
- base.WebApiBase.HandleError(options, config, err);
383
- reject(err);
384
- }
385
- });
386
- }
387
-
388
- /**
389
- * Deletes the DashTileDefinition
390
- * @param DashTileDefinitionId - The id of the DashTileDefinition to be deleted.
391
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
392
- */
393
- public async deleteDashTileDefinitionAsync(DashTileDefinitionId: number, options?:base.WebApiRequestOptions) : Promise< void > {
394
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
395
- base.WebApiBase.SetPending(options);
396
- return new Promise< void >(async (resolve, reject) => {
397
- try {
398
- const response = await this._axios.post("DeleteDashTileDefinition?DashTileDefinitionId=" + DashTileDefinitionId, null, config );
399
- base.WebApiBase.SetCompleted(options, response);
400
- const res = response.data;
401
- resolve(res);
402
- }
403
- catch( err ) {
404
- base.WebApiBase.HandleError(options, config, err);
405
- reject(err);
406
- }
407
- });
408
- }
409
-
410
- /**
411
- * Set default values into a new PreviewDash.
412
- * NetServer calculates default values on the entity, which is required when creating/storing a new instance
413
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
414
- * @returns A blank entity.
415
- */
416
- public async createDefaultPreviewDashAsync(options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash > {
417
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
418
- base.WebApiBase.SetPending(options);
419
- return new Promise< carriers.PreviewDash >(async (resolve, reject) => {
420
- try {
421
- const response = await this._axios.post("CreateDefaultPreviewDash", null, config);
422
- base.WebApiBase.SetCompleted(options, response);
423
- const res : carriers.PreviewDash = converters.Create_PreviewDash_From( response.data );
424
- resolve(res);
425
- }
426
- catch( err ) {
427
- base.WebApiBase.HandleError(options, config, err);
428
- reject(err);
429
- }
430
- });
431
- }
432
-
433
- /**
434
- * Set default values into a new PreviewDashTile.
435
- * NetServer calculates default values on the entity, which is required when creating/storing a new instance
436
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
437
- * @returns A blank entity.
438
- */
439
- public async createDefaultPreviewDashTileAsync(options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDashTile > {
440
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
441
- base.WebApiBase.SetPending(options);
442
- return new Promise< carriers.PreviewDashTile >(async (resolve, reject) => {
443
- try {
444
- const response = await this._axios.post("CreateDefaultPreviewDashTile", null, config);
445
- base.WebApiBase.SetCompleted(options, response);
446
- const res : carriers.PreviewDashTile = converters.Create_PreviewDashTile_From( response.data );
447
- resolve(res);
448
- }
449
- catch( err ) {
450
- base.WebApiBase.HandleError(options, config, err);
451
- reject(err);
452
- }
453
- });
454
- }
455
- /**
456
- * Gets a Dash object.
457
- * @param dashId - The primary key.
458
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
459
- * @returns A single Dash
460
- */
461
- public async getDashAsync(dashId: number, options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
462
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
463
- base.WebApiBase.SetPending(options);
464
- return new Promise< carriers.Dash >(async (resolve, reject) => {
465
- try {
466
- const response = await this._axios.post("GetDash?dashId=" + dashId, null, config);
467
- base.WebApiBase.SetCompleted(options, response);
468
- const res = converters.Create_Dash_From( response.data );
469
- resolve(res);
470
- }
471
- catch( err ) {
472
- base.WebApiBase.HandleError(options, config, err);
473
- reject(err);
474
- }
475
- });
476
- }
477
-
478
-
479
- private async _addTileToDashboardAsync(request: carriers.Dash_AddTileToDashboardRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
480
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
481
- base.WebApiBase.SetPending(options);
482
- return new Promise< carriers.DashTile >(async (resolve, reject) => {
483
- try {
484
- config.baseURL = this._options.baseUrl;
485
- const response = await this._axios.post("AddTileToDashboard", request , config);
486
- base.WebApiBase.SetCompleted(options, response);
487
- const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
488
- resolve(res);
489
- }
490
- catch( err ) {
491
- base.WebApiBase.HandleError(options, config, err);
492
- reject(err);
493
- }
494
- });
495
- }
496
-
497
-
498
-
499
- /**
500
- * Add a tile to a dashboard with next rank
501
- * @param request - DashboardId, DashTileDefinitionId
502
- * @returns The newly added tile
503
- */
504
- public async addTileToDashboardAsync(request: carriers.Dash_AddTileToDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
505
-
506
- /**
507
- * Add a tile to a dashboard with next rank
508
- * @param dashboardId - The id of the dashboard to add the tile to
509
- * @param dashTileDefinitionId - The id of the dashboard tile definition
510
- * @returns The newly added tile
511
- */
512
- public async addTileToDashboardAsync(dashboardId: number, dashTileDefinitionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
513
-
514
- public async addTileToDashboardAsync(dashboardId:number|carriers.Dash_AddTileToDashboardRequest, dashTileDefinitionId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
515
- let _request : carriers.Dash_AddTileToDashboardRequest = null;
516
- let _options : base.WebApiRequestOptions = null;
517
- const first : any = dashboardId;
518
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.dashTileDefinitionId)!='undefined' ) )
519
- {
520
- _request = dashboardId as carriers.Dash_AddTileToDashboardRequest;
521
- _options = dashTileDefinitionId as base.WebApiRequestOptions;
522
- }
523
- else
524
- {
525
- _request = {
526
- dashboardId: dashboardId as number,
527
- dashTileDefinitionId: dashTileDefinitionId as number,
528
- };
529
- _options = webapi_options;
530
- }
531
- return this._addTileToDashboardAsync( _request, _options );
532
- }
533
-
534
-
535
- private async _addNewTileToDashboardAsync(request: carriers.Dash_AddNewTileToDashboardRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
536
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
537
- base.WebApiBase.SetPending(options);
538
- return new Promise< carriers.DashTile >(async (resolve, reject) => {
539
- try {
540
- config.baseURL = this._options.baseUrl;
541
- const response = await this._axios.post("AddNewTileToDashboard", request , config);
542
- base.WebApiBase.SetCompleted(options, response);
543
- const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
544
- resolve(res);
545
- }
546
- catch( err ) {
547
- base.WebApiBase.HandleError(options, config, err);
548
- reject(err);
549
- }
550
- });
551
- }
552
-
553
-
554
-
555
- /**
556
- * Add a new tile to a dashboard with next rank
557
- * @param request - DashboardId, DashTileDefinition
558
- * @returns The newly added tile
559
- */
560
- public async addNewTileToDashboardAsync(request: carriers.Dash_AddNewTileToDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
561
-
562
- /**
563
- * Add a new tile to a dashboard with next rank
564
- * @param dashboardId - The id of the dashboard to add the tile to
565
- * @param dashTileDefinition - The tile definition data to add to the dashboard
566
- * @returns The newly added tile
567
- */
568
- public async addNewTileToDashboardAsync(dashboardId: number, dashTileDefinition: carriers.DashTileDefinition, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
569
-
570
- public async addNewTileToDashboardAsync(dashboardId:number|carriers.Dash_AddNewTileToDashboardRequest, dashTileDefinition?:carriers.DashTileDefinition|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
571
- let _request : carriers.Dash_AddNewTileToDashboardRequest = null;
572
- let _options : base.WebApiRequestOptions = null;
573
- const first : any = dashboardId;
574
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.dashTileDefinition)!='undefined' ) )
575
- {
576
- _request = dashboardId as carriers.Dash_AddNewTileToDashboardRequest;
577
- _options = dashTileDefinition as base.WebApiRequestOptions;
578
- }
579
- else
580
- {
581
- _request = {
582
- dashboardId: dashboardId as number,
583
- dashTileDefinition: dashTileDefinition as carriers.DashTileDefinition,
584
- };
585
- _options = webapi_options;
586
- }
587
- return this._addNewTileToDashboardAsync( _request, _options );
588
- }
589
-
590
-
591
- private async _duplicateDashboardAsync(request: carriers.Dash_DuplicateDashboardRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
592
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
593
- base.WebApiBase.SetPending(options);
594
- return new Promise< carriers.Dash >(async (resolve, reject) => {
595
- try {
596
- config.baseURL = this._options.baseUrl;
597
- const response = await this._axios.post("DuplicateDashboard", request , config);
598
- base.WebApiBase.SetCompleted(options, response);
599
- const res : carriers.Dash = converters.Create_Dash_From( response.data );
600
- resolve(res);
601
- }
602
- catch( err ) {
603
- base.WebApiBase.HandleError(options, config, err);
604
- reject(err);
605
- }
606
- });
607
- }
608
-
609
-
610
-
611
- /**
612
- * Duplicate for the dashboard and all the sub elements
613
- * @param request - DashboardId, Name
614
- * @returns New dashboard
615
- */
616
- public async duplicateDashboardAsync(request: carriers.Dash_DuplicateDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash >;
617
-
618
- /**
619
- * Duplicate for the dashboard and all the sub elements
620
- * @param dashboardId - The id of the dashboard to add the tile to
621
- * @param name - The name of the new dashboard
622
- * @returns New dashboard
623
- */
624
- public async duplicateDashboardAsync(dashboardId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash >;
625
-
626
- public async duplicateDashboardAsync(dashboardId:number|carriers.Dash_DuplicateDashboardRequest, name?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
627
- let _request : carriers.Dash_DuplicateDashboardRequest = null;
628
- let _options : base.WebApiRequestOptions = null;
629
- const first : any = dashboardId;
630
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.name)!='undefined' ) )
631
- {
632
- _request = dashboardId as carriers.Dash_DuplicateDashboardRequest;
633
- _options = name as base.WebApiRequestOptions;
634
- }
635
- else
636
- {
637
- _request = {
638
- dashboardId: dashboardId as number,
639
- name: name as string,
640
- };
641
- _options = webapi_options;
642
- }
643
- return this._duplicateDashboardAsync( _request, _options );
644
- }
645
-
646
-
647
- private async _getDashListAsync(request: carriers.Dash_GetDashListRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] > {
648
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
649
- base.WebApiBase.SetPending(options);
650
- return new Promise< carriers.Dash[] >(async (resolve, reject) => {
651
- try {
652
- config.baseURL = this._options.baseUrl;
653
- const response = await this._axios.post("GetDashList", request , config);
654
- base.WebApiBase.SetCompleted(options, response);
655
- const res : carriers.Dash[] = converters.Create_DashArray_From( response.data );
656
- resolve(res);
657
- }
658
- catch( err ) {
659
- base.WebApiBase.HandleError(options, config, err);
660
- reject(err);
661
- }
662
- });
663
- }
664
-
665
-
666
-
667
- /**
668
- * Gets the ordered list of dashboards
669
- * @param request - Dashboards
670
- * @returns List of dashboards
671
- */
672
- public async getDashListAsync(request: carriers.Dash_GetDashListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] >;
673
-
674
- /**
675
- * Gets the ordered list of dashboards
676
- * @param dashboards - List of dashboardIds
677
- * @returns List of dashboards
678
- */
679
- public async getDashListAsync(dashboards: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] >;
680
-
681
- public async getDashListAsync(dashboards:number[]|carriers.Dash_GetDashListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] > {
682
- let _request : carriers.Dash_GetDashListRequest = null;
683
- let _options : base.WebApiRequestOptions = null;
684
- const first : any = dashboards;
685
- if( typeof( first ) === "object" && first && ( typeof(first.dashboards)!='undefined' ) )
686
- {
687
- _request = dashboards as carriers.Dash_GetDashListRequest;
688
- _options = webapi_options as base.WebApiRequestOptions;
689
- }
690
- else
691
- {
692
- _request = {
693
- dashboards: dashboards as number[],
694
- };
695
- _options = webapi_options;
696
- }
697
- return this._getDashListAsync( _request, _options );
698
- }
699
-
700
-
701
- private async _getDashQuickFiltersAsync(request: carriers.Dash_GetDashQuickFiltersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
702
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
703
- base.WebApiBase.SetPending(options);
704
- return new Promise< carriers.QuickFilterInfo[] >(async (resolve, reject) => {
705
- try {
706
- config.baseURL = this._options.baseUrl;
707
- const response = await this._axios.post("GetDashQuickFilters", request , config);
708
- base.WebApiBase.SetCompleted(options, response);
709
- const res : carriers.QuickFilterInfo[] = converters.Create_QuickFilterInfoArray_From( response.data );
710
- resolve(res);
711
- }
712
- catch( err ) {
713
- base.WebApiBase.HandleError(options, config, err);
714
- reject(err);
715
- }
716
- });
717
- }
718
-
719
-
720
-
721
- /**
722
- * Gets the quick filters for this dashboard
723
- * @param request - DashboardId
724
- * @returns List of quick filters for the given dashboard
725
- */
726
- public async getDashQuickFiltersAsync(request: carriers.Dash_GetDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
727
-
728
- /**
729
- * Gets the quick filters for this dashboard
730
- * @param dashboardId - The id of the dashboard to get the quick filters for
731
- * @returns List of quick filters for the given dashboard
732
- */
733
- public async getDashQuickFiltersAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
734
-
735
- public async getDashQuickFiltersAsync(dashboardId:number|carriers.Dash_GetDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
736
- let _request : carriers.Dash_GetDashQuickFiltersRequest = null;
737
- let _options : base.WebApiRequestOptions = null;
738
- const first : any = dashboardId;
739
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' ) )
740
- {
741
- _request = dashboardId as carriers.Dash_GetDashQuickFiltersRequest;
742
- _options = webapi_options as base.WebApiRequestOptions;
743
- }
744
- else
745
- {
746
- _request = {
747
- dashboardId: dashboardId as number,
748
- };
749
- _options = webapi_options;
750
- }
751
- return this._getDashQuickFiltersAsync( _request, _options );
752
- }
753
-
754
-
755
- private async _saveDashQuickFiltersAsync(request: carriers.Dash_SaveDashQuickFiltersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
756
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
757
- base.WebApiBase.SetPending(options);
758
- return new Promise< carriers.QuickFilterInfo[] >(async (resolve, reject) => {
759
- try {
760
- config.baseURL = this._options.baseUrl;
761
- const response = await this._axios.post("SaveDashQuickFilters", request , config);
762
- base.WebApiBase.SetCompleted(options, response);
763
- const res : carriers.QuickFilterInfo[] = converters.Create_QuickFilterInfoArray_From( response.data );
764
- resolve(res);
765
- }
766
- catch( err ) {
767
- base.WebApiBase.HandleError(options, config, err);
768
- reject(err);
769
- }
770
- });
771
- }
772
-
773
-
774
-
775
- /**
776
- * Saves the quick filters for this dashboard
777
- * @param request - DashboardId, QuickFilters
778
- * @returns List of saved quick filters for the given dashboard
779
- */
780
- public async saveDashQuickFiltersAsync(request: carriers.Dash_SaveDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
781
-
782
- /**
783
- * Saves the quick filters for this dashboard
784
- * @param dashboardId - The id of the dashboard these quick filters are associated with
785
- * @param quickFilters - Complete list of quick filters for the given dashboard, overwriting the existing list
786
- * @returns List of saved quick filters for the given dashboard
787
- */
788
- public async saveDashQuickFiltersAsync(dashboardId: number, quickFilters: carriers.QuickFilterInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
789
-
790
- public async saveDashQuickFiltersAsync(dashboardId:number|carriers.Dash_SaveDashQuickFiltersRequest, quickFilters?:carriers.QuickFilterInfo[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
791
- let _request : carriers.Dash_SaveDashQuickFiltersRequest = null;
792
- let _options : base.WebApiRequestOptions = null;
793
- const first : any = dashboardId;
794
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.quickFilters)!='undefined' ) )
795
- {
796
- _request = dashboardId as carriers.Dash_SaveDashQuickFiltersRequest;
797
- _options = quickFilters as base.WebApiRequestOptions;
798
- }
799
- else
800
- {
801
- _request = {
802
- dashboardId: dashboardId as number,
803
- quickFilters: quickFilters as carriers.QuickFilterInfo[],
804
- };
805
- _options = webapi_options;
806
- }
807
- return this._saveDashQuickFiltersAsync( _request, _options );
808
- }
809
-
810
-
811
- private async _getPossibleDashQuickFiltersAsync(request: carriers.Dash_GetPossibleDashQuickFiltersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
812
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
813
- base.WebApiBase.SetPending(options);
814
- return new Promise< carriers.QuickFilterInfo[] >(async (resolve, reject) => {
815
- try {
816
- config.baseURL = this._options.baseUrl;
817
- const response = await this._axios.post("GetPossibleDashQuickFilters", request , config);
818
- base.WebApiBase.SetCompleted(options, response);
819
- const res : carriers.QuickFilterInfo[] = converters.Create_QuickFilterInfoArray_From( response.data );
820
- resolve(res);
821
- }
822
- catch( err ) {
823
- base.WebApiBase.HandleError(options, config, err);
824
- reject(err);
825
- }
826
- });
827
- }
828
-
829
-
830
-
831
- /**
832
- * Gets the possible (not stored/selected) quick filters for this dashboard
833
- * @param request - DashboardId
834
- * @returns List of possible quick filters for the given dashboard
835
- */
836
- public async getPossibleDashQuickFiltersAsync(request: carriers.Dash_GetPossibleDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
837
-
838
- /**
839
- * Gets the possible (not stored/selected) quick filters for this dashboard
840
- * @param dashboardId - The id of the dashboard to get the possible quick filters for
841
- * @returns List of possible quick filters for the given dashboard
842
- */
843
- public async getPossibleDashQuickFiltersAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
844
-
845
- public async getPossibleDashQuickFiltersAsync(dashboardId:number|carriers.Dash_GetPossibleDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
846
- let _request : carriers.Dash_GetPossibleDashQuickFiltersRequest = null;
847
- let _options : base.WebApiRequestOptions = null;
848
- const first : any = dashboardId;
849
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' ) )
850
- {
851
- _request = dashboardId as carriers.Dash_GetPossibleDashQuickFiltersRequest;
852
- _options = webapi_options as base.WebApiRequestOptions;
853
- }
854
- else
855
- {
856
- _request = {
857
- dashboardId: dashboardId as number,
858
- };
859
- _options = webapi_options;
860
- }
861
- return this._getPossibleDashQuickFiltersAsync( _request, _options );
862
- }
863
-
864
-
865
- private async _getDashCollectionAsync( options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection > {
866
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
867
- base.WebApiBase.SetPending(options);
868
- return new Promise< carriers.DashCollection >(async (resolve, reject) => {
869
- try {
870
- config.baseURL = this._options.baseUrl;
871
- const response = await this._axios.post("GetDashCollection", undefined , config);
872
- base.WebApiBase.SetCompleted(options, response);
873
- const res : carriers.DashCollection = converters.Create_DashCollection_From( response.data );
874
- resolve(res);
875
- }
876
- catch( err ) {
877
- base.WebApiBase.HandleError(options, config, err);
878
- reject(err);
879
- }
880
- });
881
- }
882
-
883
-
884
- /**
885
- * Gets a collection of dashboards for the current associate
886
- * @returns Dashboard collection
887
- */
888
- public async getDashCollectionAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection >
889
- {
890
- return this._getDashCollectionAsync(webapi_options);
891
- }
892
-
893
- /**
894
- * Gets a DashTheme object.
895
- * @param dashThemeId - The primary key.
896
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
897
- * @returns A single DashTheme
898
- */
899
- public async getDashThemeAsync(dashThemeId: number, options?:base.WebApiRequestOptions) : Promise< carriers.DashTheme > {
900
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
901
- base.WebApiBase.SetPending(options);
902
- return new Promise< carriers.DashTheme >(async (resolve, reject) => {
903
- try {
904
- const response = await this._axios.post("GetDashTheme?dashThemeId=" + dashThemeId, null, config);
905
- base.WebApiBase.SetCompleted(options, response);
906
- const res = converters.Create_DashTheme_From( response.data );
907
- resolve(res);
908
- }
909
- catch( err ) {
910
- base.WebApiBase.HandleError(options, config, err);
911
- reject(err);
912
- }
913
- });
914
- }
915
-
916
- /**
917
- * Gets a DashTile object.
918
- * @param dashTileId - The primary key.
919
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
920
- * @returns A single DashTile
921
- */
922
- public async getDashTileAsync(dashTileId: number, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
923
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
924
- base.WebApiBase.SetPending(options);
925
- return new Promise< carriers.DashTile >(async (resolve, reject) => {
926
- try {
927
- const response = await this._axios.post("GetDashTile?dashTileId=" + dashTileId, null, config);
928
- base.WebApiBase.SetCompleted(options, response);
929
- const res = converters.Create_DashTile_From( response.data );
930
- resolve(res);
931
- }
932
- catch( err ) {
933
- base.WebApiBase.HandleError(options, config, err);
934
- reject(err);
935
- }
936
- });
937
- }
938
-
939
-
940
- private async _getDashTilesAsync(request: carriers.Dash_GetDashTilesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] > {
941
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
942
- base.WebApiBase.SetPending(options);
943
- return new Promise< carriers.DashTile[] >(async (resolve, reject) => {
944
- try {
945
- config.baseURL = this._options.baseUrl;
946
- const response = await this._axios.post("GetDashTiles", request , config);
947
- base.WebApiBase.SetCompleted(options, response);
948
- const res : carriers.DashTile[] = converters.Create_DashTileArray_From( response.data );
949
- resolve(res);
950
- }
951
- catch( err ) {
952
- base.WebApiBase.HandleError(options, config, err);
953
- reject(err);
954
- }
955
- });
956
- }
957
-
958
-
959
-
960
- /**
961
- * Gets the ordered list of tiles for a dashboard
962
- * @param request - DashboardId
963
- * @returns Ordered list of dashboard tiles
964
- */
965
- public async getDashTilesAsync(request: carriers.Dash_GetDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] >;
966
-
967
- /**
968
- * Gets the ordered list of tiles for a dashboard
969
- * @param dashboardId - The id of the dashboard
970
- * @returns Ordered list of dashboard tiles
971
- */
972
- public async getDashTilesAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] >;
973
-
974
- public async getDashTilesAsync(dashboardId:number|carriers.Dash_GetDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] > {
975
- let _request : carriers.Dash_GetDashTilesRequest = null;
976
- let _options : base.WebApiRequestOptions = null;
977
- const first : any = dashboardId;
978
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' ) )
979
- {
980
- _request = dashboardId as carriers.Dash_GetDashTilesRequest;
981
- _options = webapi_options as base.WebApiRequestOptions;
982
- }
983
- else
984
- {
985
- _request = {
986
- dashboardId: dashboardId as number,
987
- };
988
- _options = webapi_options;
989
- }
990
- return this._getDashTilesAsync( _request, _options );
991
- }
992
-
993
-
994
- private async _saveDashTilesAsync(request: carriers.Dash_SaveDashTilesRequest, options?:base.WebApiRequestOptions) : Promise< void > {
995
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
996
- base.WebApiBase.SetPending(options);
997
- return new Promise< void >(async (resolve, reject) => {
998
- try {
999
- config.baseURL = this._options.baseUrl;
1000
- const response = await this._axios.post("SaveDashTiles", request , config);
1001
- base.WebApiBase.SetCompleted(options, response);
1002
- const res = response.data;
1003
- resolve(res);
1004
- }
1005
- catch( err ) {
1006
- base.WebApiBase.HandleError(options, config, err);
1007
- reject(err);
1008
- }
1009
- });
1010
- }
1011
-
1012
-
1013
-
1014
- /**
1015
- * Saves the ordered list of tiles for a dashboard
1016
- * @param request - DashboardId, DashTiles
1017
- * @returns
1018
- */
1019
- public async saveDashTilesAsync(request: carriers.Dash_SaveDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1020
-
1021
- /**
1022
- * Saves the ordered list of tiles for a dashboard
1023
- * @param dashboardId - The id of the dashboard
1024
- * @param dashTiles - The tiles in order
1025
- * @returns
1026
- */
1027
- public async saveDashTilesAsync(dashboardId: number, dashTiles: carriers.DashTile[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1028
-
1029
- public async saveDashTilesAsync(dashboardId:number|carriers.Dash_SaveDashTilesRequest, dashTiles?:carriers.DashTile[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1030
- let _request : carriers.Dash_SaveDashTilesRequest = null;
1031
- let _options : base.WebApiRequestOptions = null;
1032
- const first : any = dashboardId;
1033
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.dashTiles)!='undefined' ) )
1034
- {
1035
- _request = dashboardId as carriers.Dash_SaveDashTilesRequest;
1036
- _options = dashTiles as base.WebApiRequestOptions;
1037
- }
1038
- else
1039
- {
1040
- _request = {
1041
- dashboardId: dashboardId as number,
1042
- dashTiles: dashTiles as carriers.DashTile[],
1043
- };
1044
- _options = webapi_options;
1045
- }
1046
- return this._saveDashTilesAsync( _request, _options );
1047
- }
1048
-
1049
-
1050
- private async _createDashTileSelectionFromEntityAsync(request: carriers.Dash_CreateDashTileSelectionFromEntityRequest, options?:base.WebApiRequestOptions) : Promise< number > {
1051
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1052
- base.WebApiBase.SetPending(options);
1053
- return new Promise< number >(async (resolve, reject) => {
1054
- try {
1055
- config.baseURL = this._options.baseUrl;
1056
- const response = await this._axios.post("CreateDashTileSelectionFromEntity", request , config);
1057
- base.WebApiBase.SetCompleted(options, response);
1058
- const res : number = response.data as number;
1059
- resolve(res);
1060
- }
1061
- catch( err ) {
1062
- base.WebApiBase.HandleError(options, config, err);
1063
- reject(err);
1064
- }
1065
- });
1066
- }
1067
-
1068
-
1069
-
1070
- /**
1071
- * Returns the id to a dashboard tile selection
1072
- * @param request - EntityName
1073
- * @returns Selection Id
1074
- */
1075
- public async createDashTileSelectionFromEntityAsync(request: carriers.Dash_CreateDashTileSelectionFromEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1076
-
1077
- /**
1078
- * Returns the id to a dashboard tile selection
1079
- * @param entityName - The name of the entity to create a default selection for
1080
- * @returns Selection Id
1081
- */
1082
- public async createDashTileSelectionFromEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1083
-
1084
- public async createDashTileSelectionFromEntityAsync(entityName:string|carriers.Dash_CreateDashTileSelectionFromEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1085
- let _request : carriers.Dash_CreateDashTileSelectionFromEntityRequest = null;
1086
- let _options : base.WebApiRequestOptions = null;
1087
- const first : any = entityName;
1088
- if( typeof( first ) === "object" && first && ( typeof(first.entityName)!='undefined' ) )
1089
- {
1090
- _request = entityName as carriers.Dash_CreateDashTileSelectionFromEntityRequest;
1091
- _options = webapi_options as base.WebApiRequestOptions;
1092
- }
1093
- else
1094
- {
1095
- _request = {
1096
- entityName: entityName as string,
1097
- };
1098
- _options = webapi_options;
1099
- }
1100
- return this._createDashTileSelectionFromEntityAsync( _request, _options );
1101
- }
1102
-
1103
-
1104
- private async _copyTileSelectionAsync(request: carriers.Dash_CopyTileSelectionRequest, options?:base.WebApiRequestOptions) : Promise< number > {
1105
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1106
- base.WebApiBase.SetPending(options);
1107
- return new Promise< number >(async (resolve, reject) => {
1108
- try {
1109
- config.baseURL = this._options.baseUrl;
1110
- const response = await this._axios.post("CopyTileSelection", request , config);
1111
- base.WebApiBase.SetCompleted(options, response);
1112
- const res : number = response.data as number;
1113
- resolve(res);
1114
- }
1115
- catch( err ) {
1116
- base.WebApiBase.HandleError(options, config, err);
1117
- reject(err);
1118
- }
1119
- });
1120
- }
1121
-
1122
-
1123
-
1124
- /**
1125
- * Copy Tile Selection for the dashboard
1126
- * @param request - SelectionId
1127
- * @returns Selection Id
1128
- */
1129
- public async copyTileSelectionAsync(request: carriers.Dash_CopyTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1130
-
1131
- /**
1132
- * Copy Tile Selection for the dashboard
1133
- * @param selectionId - The id of the selection to copy from
1134
- * @returns Selection Id
1135
- */
1136
- public async copyTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1137
-
1138
- public async copyTileSelectionAsync(selectionId:number|carriers.Dash_CopyTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1139
- let _request : carriers.Dash_CopyTileSelectionRequest = null;
1140
- let _options : base.WebApiRequestOptions = null;
1141
- const first : any = selectionId;
1142
- if( typeof( first ) === "object" && first && ( typeof(first.selectionId)!='undefined' ) )
1143
- {
1144
- _request = selectionId as carriers.Dash_CopyTileSelectionRequest;
1145
- _options = webapi_options as base.WebApiRequestOptions;
1146
- }
1147
- else
1148
- {
1149
- _request = {
1150
- selectionId: selectionId as number,
1151
- };
1152
- _options = webapi_options;
1153
- }
1154
- return this._copyTileSelectionAsync( _request, _options );
1155
- }
1156
-
1157
-
1158
- private async _getTempTileSelectionAsync(request: carriers.Dash_GetTempTileSelectionRequest, options?:base.WebApiRequestOptions) : Promise< number > {
1159
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1160
- base.WebApiBase.SetPending(options);
1161
- return new Promise< number >(async (resolve, reject) => {
1162
- try {
1163
- config.baseURL = this._options.baseUrl;
1164
- const response = await this._axios.post("GetTempTileSelection", request , config);
1165
- base.WebApiBase.SetCompleted(options, response);
1166
- const res : number = response.data as number;
1167
- resolve(res);
1168
- }
1169
- catch( err ) {
1170
- base.WebApiBase.HandleError(options, config, err);
1171
- reject(err);
1172
- }
1173
- });
1174
- }
1175
-
1176
-
1177
-
1178
- /**
1179
- * Copy selection to temporary personal tile selection
1180
- * @param request - SelectionId
1181
- * @returns Selection Id
1182
- */
1183
- public async getTempTileSelectionAsync(request: carriers.Dash_GetTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1184
-
1185
- /**
1186
- * Copy selection to temporary personal tile selection
1187
- * @param selectionId - The id of the selection to copy from
1188
- * @returns Selection Id
1189
- */
1190
- public async getTempTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1191
-
1192
- public async getTempTileSelectionAsync(selectionId:number|carriers.Dash_GetTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1193
- let _request : carriers.Dash_GetTempTileSelectionRequest = null;
1194
- let _options : base.WebApiRequestOptions = null;
1195
- const first : any = selectionId;
1196
- if( typeof( first ) === "object" && first && ( typeof(first.selectionId)!='undefined' ) )
1197
- {
1198
- _request = selectionId as carriers.Dash_GetTempTileSelectionRequest;
1199
- _options = webapi_options as base.WebApiRequestOptions;
1200
- }
1201
- else
1202
- {
1203
- _request = {
1204
- selectionId: selectionId as number,
1205
- };
1206
- _options = webapi_options;
1207
- }
1208
- return this._getTempTileSelectionAsync( _request, _options );
1209
- }
1210
-
1211
-
1212
- private async _getSecondaryTempTileSelectionAsync(request: carriers.Dash_GetSecondaryTempTileSelectionRequest, options?:base.WebApiRequestOptions) : Promise< number > {
1213
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1214
- base.WebApiBase.SetPending(options);
1215
- return new Promise< number >(async (resolve, reject) => {
1216
- try {
1217
- config.baseURL = this._options.baseUrl;
1218
- const response = await this._axios.post("GetSecondaryTempTileSelection", request , config);
1219
- base.WebApiBase.SetCompleted(options, response);
1220
- const res : number = response.data as number;
1221
- resolve(res);
1222
- }
1223
- catch( err ) {
1224
- base.WebApiBase.HandleError(options, config, err);
1225
- reject(err);
1226
- }
1227
- });
1228
- }
1229
-
1230
-
1231
-
1232
- /**
1233
- * Copy selection to secondary temporary personal tile selection
1234
- * @param request - SelectionId
1235
- * @returns Selection Id
1236
- */
1237
- public async getSecondaryTempTileSelectionAsync(request: carriers.Dash_GetSecondaryTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1238
-
1239
- /**
1240
- * Copy selection to secondary temporary personal tile selection
1241
- * @param selectionId - The id of the selection to copy from
1242
- * @returns Selection Id
1243
- */
1244
- public async getSecondaryTempTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1245
-
1246
- public async getSecondaryTempTileSelectionAsync(selectionId:number|carriers.Dash_GetSecondaryTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1247
- let _request : carriers.Dash_GetSecondaryTempTileSelectionRequest = null;
1248
- let _options : base.WebApiRequestOptions = null;
1249
- const first : any = selectionId;
1250
- if( typeof( first ) === "object" && first && ( typeof(first.selectionId)!='undefined' ) )
1251
- {
1252
- _request = selectionId as carriers.Dash_GetSecondaryTempTileSelectionRequest;
1253
- _options = webapi_options as base.WebApiRequestOptions;
1254
- }
1255
- else
1256
- {
1257
- _request = {
1258
- selectionId: selectionId as number,
1259
- };
1260
- _options = webapi_options;
1261
- }
1262
- return this._getSecondaryTempTileSelectionAsync( _request, _options );
1263
- }
1264
-
1265
-
1266
- private async _createDefaultTileForEntityAsync(request: carriers.Dash_CreateDefaultTileForEntityRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
1267
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1268
- base.WebApiBase.SetPending(options);
1269
- return new Promise< carriers.DashTile >(async (resolve, reject) => {
1270
- try {
1271
- config.baseURL = this._options.baseUrl;
1272
- const response = await this._axios.post("CreateDefaultTileForEntity", request , config);
1273
- base.WebApiBase.SetCompleted(options, response);
1274
- const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
1275
- resolve(res);
1276
- }
1277
- catch( err ) {
1278
- base.WebApiBase.HandleError(options, config, err);
1279
- reject(err);
1280
- }
1281
- });
1282
- }
1283
-
1284
-
1285
-
1286
- /**
1287
- * Set Measure to CountAll and MeasureField to primary key field
1288
- * @param request - EntityName
1289
- * @returns Default
1290
- */
1291
- public async createDefaultTileForEntityAsync(request: carriers.Dash_CreateDefaultTileForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
1292
-
1293
- /**
1294
- * Set Measure to CountAll and MeasureField to primary key field
1295
- * @param entityName - Name of entity to use for primary key
1296
- * @returns Default
1297
- */
1298
- public async createDefaultTileForEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
1299
-
1300
- public async createDefaultTileForEntityAsync(entityName:string|carriers.Dash_CreateDefaultTileForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
1301
- let _request : carriers.Dash_CreateDefaultTileForEntityRequest = null;
1302
- let _options : base.WebApiRequestOptions = null;
1303
- const first : any = entityName;
1304
- if( typeof( first ) === "object" && first && ( typeof(first.entityName)!='undefined' ) )
1305
- {
1306
- _request = entityName as carriers.Dash_CreateDefaultTileForEntityRequest;
1307
- _options = webapi_options as base.WebApiRequestOptions;
1308
- }
1309
- else
1310
- {
1311
- _request = {
1312
- entityName: entityName as string,
1313
- };
1314
- _options = webapi_options;
1315
- }
1316
- return this._createDefaultTileForEntityAsync( _request, _options );
1317
- }
1318
-
1319
-
1320
- private async _duplicateTileAsync(request: carriers.Dash_DuplicateTileRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
1321
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1322
- base.WebApiBase.SetPending(options);
1323
- return new Promise< carriers.DashTile >(async (resolve, reject) => {
1324
- try {
1325
- config.baseURL = this._options.baseUrl;
1326
- const response = await this._axios.post("DuplicateTile", request , config);
1327
- base.WebApiBase.SetCompleted(options, response);
1328
- const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
1329
- resolve(res);
1330
- }
1331
- catch( err ) {
1332
- base.WebApiBase.HandleError(options, config, err);
1333
- reject(err);
1334
- }
1335
- });
1336
- }
1337
-
1338
-
1339
-
1340
- /**
1341
- * Duplicate for the tile and all the sub elements
1342
- * @param request - DashTileId, Name
1343
- * @returns New tile
1344
- */
1345
- public async duplicateTileAsync(request: carriers.Dash_DuplicateTileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
1346
-
1347
- /**
1348
- * Duplicate for the tile and all the sub elements
1349
- * @param dashTileId - The id of the tile to copy
1350
- * @param name - The name of the new tile
1351
- * @returns New tile
1352
- */
1353
- public async duplicateTileAsync(dashTileId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
1354
-
1355
- public async duplicateTileAsync(dashTileId:number|carriers.Dash_DuplicateTileRequest, name?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
1356
- let _request : carriers.Dash_DuplicateTileRequest = null;
1357
- let _options : base.WebApiRequestOptions = null;
1358
- const first : any = dashTileId;
1359
- if( typeof( first ) === "object" && first && ( typeof(first.dashTileId)!='undefined' || typeof(first.name)!='undefined' ) )
1360
- {
1361
- _request = dashTileId as carriers.Dash_DuplicateTileRequest;
1362
- _options = name as base.WebApiRequestOptions;
1363
- }
1364
- else
1365
- {
1366
- _request = {
1367
- dashTileId: dashTileId as number,
1368
- name: name as string,
1369
- };
1370
- _options = webapi_options;
1371
- }
1372
- return this._duplicateTileAsync( _request, _options );
1373
- }
1374
-
1375
- /**
1376
- * Gets a DashTileDefinition object.
1377
- * @param dashTileDefinitionId - The primary key.
1378
- * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
1379
- * @returns A single DashTileDefinition
1380
- */
1381
- public async getDashTileDefinitionAsync(dashTileDefinitionId: number, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
1382
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1383
- base.WebApiBase.SetPending(options);
1384
- return new Promise< carriers.DashTileDefinition >(async (resolve, reject) => {
1385
- try {
1386
- const response = await this._axios.post("GetDashTileDefinition?dashTileDefinitionId=" + dashTileDefinitionId, null, config);
1387
- base.WebApiBase.SetCompleted(options, response);
1388
- const res = converters.Create_DashTileDefinition_From( response.data );
1389
- resolve(res);
1390
- }
1391
- catch( err ) {
1392
- base.WebApiBase.HandleError(options, config, err);
1393
- reject(err);
1394
- }
1395
- });
1396
- }
1397
-
1398
-
1399
- private async _createDefaultTileDefinitionForEntityAsync(request: carriers.Dash_CreateDefaultTileDefinitionForEntityRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
1400
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1401
- base.WebApiBase.SetPending(options);
1402
- return new Promise< carriers.DashTileDefinition >(async (resolve, reject) => {
1403
- try {
1404
- config.baseURL = this._options.baseUrl;
1405
- const response = await this._axios.post("CreateDefaultTileDefinitionForEntity", request , config);
1406
- base.WebApiBase.SetCompleted(options, response);
1407
- const res : carriers.DashTileDefinition = converters.Create_DashTileDefinition_From( response.data );
1408
- resolve(res);
1409
- }
1410
- catch( err ) {
1411
- base.WebApiBase.HandleError(options, config, err);
1412
- reject(err);
1413
- }
1414
- });
1415
- }
1416
-
1417
-
1418
-
1419
- /**
1420
- * Set Measure to CountAll and MeasureField to primary key field
1421
- * @param request - EntityName
1422
- * @returns Default
1423
- */
1424
- public async createDefaultTileDefinitionForEntityAsync(request: carriers.Dash_CreateDefaultTileDefinitionForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition >;
1425
-
1426
- /**
1427
- * Set Measure to CountAll and MeasureField to primary key field
1428
- * @param entityName - Name of entity to use for primary key
1429
- * @returns Default
1430
- */
1431
- public async createDefaultTileDefinitionForEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition >;
1432
-
1433
- public async createDefaultTileDefinitionForEntityAsync(entityName:string|carriers.Dash_CreateDefaultTileDefinitionForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
1434
- let _request : carriers.Dash_CreateDefaultTileDefinitionForEntityRequest = null;
1435
- let _options : base.WebApiRequestOptions = null;
1436
- const first : any = entityName;
1437
- if( typeof( first ) === "object" && first && ( typeof(first.entityName)!='undefined' ) )
1438
- {
1439
- _request = entityName as carriers.Dash_CreateDefaultTileDefinitionForEntityRequest;
1440
- _options = webapi_options as base.WebApiRequestOptions;
1441
- }
1442
- else
1443
- {
1444
- _request = {
1445
- entityName: entityName as string,
1446
- };
1447
- _options = webapi_options;
1448
- }
1449
- return this._createDefaultTileDefinitionForEntityAsync( _request, _options );
1450
- }
1451
-
1452
-
1453
- private async _getDashTileHtmlAsync(request: carriers.Dash_GetDashTileHtmlRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml > {
1454
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1455
- base.WebApiBase.SetPending(options);
1456
- return new Promise< carriers.DashTileHtml >(async (resolve, reject) => {
1457
- try {
1458
- config.baseURL = this._options.baseUrl;
1459
- const response = await this._axios.post("GetDashTileHtml", request , config);
1460
- base.WebApiBase.SetCompleted(options, response);
1461
- const res : carriers.DashTileHtml = converters.Create_DashTileHtml_From( response.data );
1462
- resolve(res);
1463
- }
1464
- catch( err ) {
1465
- base.WebApiBase.HandleError(options, config, err);
1466
- reject(err);
1467
- }
1468
- });
1469
- }
1470
-
1471
-
1472
-
1473
- /**
1474
- * Get HTML for a dashboard tile definition with TileType = HTML
1475
- * @param request - DashboardTileDefinitionId, LanguageCode
1476
- * @returns HTML data
1477
- */
1478
- public async getDashTileHtmlAsync(request: carriers.Dash_GetDashTileHtmlRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml >;
1479
-
1480
- /**
1481
- * Get HTML for a dashboard tile definition with TileType = HTML
1482
- * @param dashboardTileDefinitionId - The id of the dashboard tile definition
1483
- * @param languageCode - Preferred language code.
1484
- * @returns HTML data
1485
- */
1486
- public async getDashTileHtmlAsync(dashboardTileDefinitionId: number, languageCode: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml >;
1487
-
1488
- public async getDashTileHtmlAsync(dashboardTileDefinitionId:number|carriers.Dash_GetDashTileHtmlRequest, languageCode?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml > {
1489
- let _request : carriers.Dash_GetDashTileHtmlRequest = null;
1490
- let _options : base.WebApiRequestOptions = null;
1491
- const first : any = dashboardTileDefinitionId;
1492
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardTileDefinitionId)!='undefined' || typeof(first.languageCode)!='undefined' ) )
1493
- {
1494
- _request = dashboardTileDefinitionId as carriers.Dash_GetDashTileHtmlRequest;
1495
- _options = languageCode as base.WebApiRequestOptions;
1496
- }
1497
- else
1498
- {
1499
- _request = {
1500
- dashboardTileDefinitionId: dashboardTileDefinitionId as number,
1501
- languageCode: languageCode as string,
1502
- };
1503
- _options = webapi_options;
1504
- }
1505
- return this._getDashTileHtmlAsync( _request, _options );
1506
- }
1507
-
1508
-
1509
- private async _getDashTileHtmlListAsync(request: carriers.Dash_GetDashTileHtmlListRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] > {
1510
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1511
- base.WebApiBase.SetPending(options);
1512
- return new Promise< carriers.DashTileHtml[] >(async (resolve, reject) => {
1513
- try {
1514
- config.baseURL = this._options.baseUrl;
1515
- const response = await this._axios.post("GetDashTileHtmlList", request , config);
1516
- base.WebApiBase.SetCompleted(options, response);
1517
- const res : carriers.DashTileHtml[] = converters.Create_DashTileHtmlArray_From( response.data );
1518
- resolve(res);
1519
- }
1520
- catch( err ) {
1521
- base.WebApiBase.HandleError(options, config, err);
1522
- reject(err);
1523
- }
1524
- });
1525
- }
1526
-
1527
-
1528
-
1529
- /**
1530
- * Get HTML for a dashboard tile definition with TileType = HTML. Retrieve a list with all registered languages.
1531
- * @param request - DashboardTileDefinitionId
1532
- * @returns
1533
- */
1534
- public async getDashTileHtmlListAsync(request: carriers.Dash_GetDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
1535
-
1536
- /**
1537
- * Get HTML for a dashboard tile definition with TileType = HTML. Retrieve a list with all registered languages.
1538
- * @param dashboardTileDefinitionId - The id of the dashboard tile definition
1539
- * @returns
1540
- */
1541
- public async getDashTileHtmlListAsync(dashboardTileDefinitionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
1542
-
1543
- public async getDashTileHtmlListAsync(dashboardTileDefinitionId:number|carriers.Dash_GetDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] > {
1544
- let _request : carriers.Dash_GetDashTileHtmlListRequest = null;
1545
- let _options : base.WebApiRequestOptions = null;
1546
- const first : any = dashboardTileDefinitionId;
1547
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardTileDefinitionId)!='undefined' ) )
1548
- {
1549
- _request = dashboardTileDefinitionId as carriers.Dash_GetDashTileHtmlListRequest;
1550
- _options = webapi_options as base.WebApiRequestOptions;
1551
- }
1552
- else
1553
- {
1554
- _request = {
1555
- dashboardTileDefinitionId: dashboardTileDefinitionId as number,
1556
- };
1557
- _options = webapi_options;
1558
- }
1559
- return this._getDashTileHtmlListAsync( _request, _options );
1560
- }
1561
-
1562
-
1563
- private async _saveDashTileHtmlListAsync(request: carriers.Dash_SaveDashTileHtmlListRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] > {
1564
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1565
- base.WebApiBase.SetPending(options);
1566
- return new Promise< carriers.DashTileHtml[] >(async (resolve, reject) => {
1567
- try {
1568
- config.baseURL = this._options.baseUrl;
1569
- const response = await this._axios.post("SaveDashTileHtmlList", request , config);
1570
- base.WebApiBase.SetCompleted(options, response);
1571
- const res : carriers.DashTileHtml[] = converters.Create_DashTileHtmlArray_From( response.data );
1572
- resolve(res);
1573
- }
1574
- catch( err ) {
1575
- base.WebApiBase.HandleError(options, config, err);
1576
- reject(err);
1577
- }
1578
- });
1579
- }
1580
-
1581
-
1582
-
1583
- /**
1584
- * Set the HTML data for a tile with TileType = HTML.
1585
- * @param request - DashboardTileDefinitionId, Languages
1586
- * @returns
1587
- */
1588
- public async saveDashTileHtmlListAsync(request: carriers.Dash_SaveDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
1589
-
1590
- /**
1591
- * Set the HTML data for a tile with TileType = HTML.
1592
- * @param dashboardTileDefinitionId - The id of the dashboard tile definition
1593
- * @param languages - List of HTML content per language
1594
- * @returns
1595
- */
1596
- public async saveDashTileHtmlListAsync(dashboardTileDefinitionId: number, languages: carriers.DashTileHtml[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
1597
-
1598
- public async saveDashTileHtmlListAsync(dashboardTileDefinitionId:number|carriers.Dash_SaveDashTileHtmlListRequest, languages?:carriers.DashTileHtml[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] > {
1599
- let _request : carriers.Dash_SaveDashTileHtmlListRequest = null;
1600
- let _options : base.WebApiRequestOptions = null;
1601
- const first : any = dashboardTileDefinitionId;
1602
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardTileDefinitionId)!='undefined' || typeof(first.languages)!='undefined' ) )
1603
- {
1604
- _request = dashboardTileDefinitionId as carriers.Dash_SaveDashTileHtmlListRequest;
1605
- _options = languages as base.WebApiRequestOptions;
1606
- }
1607
- else
1608
- {
1609
- _request = {
1610
- dashboardTileDefinitionId: dashboardTileDefinitionId as number,
1611
- languages: languages as carriers.DashTileHtml[],
1612
- };
1613
- _options = webapi_options;
1614
- }
1615
- return this._saveDashTileHtmlListAsync( _request, _options );
1616
- }
1617
-
1618
-
1619
- private async _getPreviewDashAsync(request: carriers.Dash_GetPreviewDashRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash > {
1620
- const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1621
- base.WebApiBase.SetPending(options);
1622
- return new Promise< carriers.PreviewDash >(async (resolve, reject) => {
1623
- try {
1624
- config.baseURL = this._options.baseUrl;
1625
- const response = await this._axios.post("GetPreviewDash", request , config);
1626
- base.WebApiBase.SetCompleted(options, response);
1627
- const res : carriers.PreviewDash = converters.Create_PreviewDash_From( response.data );
1628
- resolve(res);
1629
- }
1630
- catch( err ) {
1631
- base.WebApiBase.HandleError(options, config, err);
1632
- reject(err);
1633
- }
1634
- });
1635
- }
1636
-
1637
-
1638
-
1639
- /**
1640
- * Get a dashboard from its id
1641
- * @param request - DashboardId
1642
- * @returns Dashboard suitable for preview
1643
- */
1644
- public async getPreviewDashAsync(request: carriers.Dash_GetPreviewDashRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash >;
1645
-
1646
- /**
1647
- * Get a dashboard from its id
1648
- * @param dashboardId - Dashboard ID
1649
- * @returns Dashboard suitable for preview
1650
- */
1651
- public async getPreviewDashAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash >;
1652
-
1653
- public async getPreviewDashAsync(dashboardId:number|carriers.Dash_GetPreviewDashRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash > {
1654
- let _request : carriers.Dash_GetPreviewDashRequest = null;
1655
- let _options : base.WebApiRequestOptions = null;
1656
- const first : any = dashboardId;
1657
- if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' ) )
1658
- {
1659
- _request = dashboardId as carriers.Dash_GetPreviewDashRequest;
1660
- _options = webapi_options as base.WebApiRequestOptions;
1661
- }
1662
- else
1663
- {
1664
- _request = {
1665
- dashboardId: dashboardId as number,
1666
- };
1667
- _options = webapi_options;
1668
- }
1669
- return this._getPreviewDashAsync( _request, _options );
1670
- }
1671
-
1672
- } // class v1DashAgentController
1673
-
1674
-
1
+ // <auto-generated>
2
+ // SuperOffice Code Generator
3
+ // modelling\templates\servicestswebapi\tswebapiagents.tt
4
+ // </auto-generated>
5
+
6
+
7
+ /* tslint:disable */
8
+ //----------------------------------------------------------------------------
9
+ // G E N E R A T E D F I L E ! D O N O T E D I T !
10
+ //----------------------------------------------------------------------------
11
+ //
12
+ // File: WebApi/DashAgent.ts
13
+ //
14
+ //----------------------------------------------------------------------------
15
+ // Copyright (C) SuperOffice AS
16
+ //----------------------------------------------------------------------------
17
+
18
+ import { AxiosRequestConfig } from 'axios';
19
+ import { Duration } from 'dayjs/plugin/duration';
20
+ import * as enums from './Enums';
21
+ import * as base from './WebApiBase';
22
+ import * as carriers from './Carriers';
23
+ import * as converters from './Converters';
24
+ import { FromBase64ToString, ToBase64 } from './Base64';
25
+
26
+ /**
27
+ * Agent that lets you configure dashboard tiles and retrieve dashboard data
28
+ */
29
+ export interface IDashAgent {
30
+ createDefaultDashAsync(): Promise< carriers.Dash >;
31
+ saveDashAsync(entity: carriers.Dash) : Promise< carriers.Dash >;
32
+ deleteDashAsync(DashId: number) : Promise<void>;
33
+ createDefaultDashCollectionAsync(): Promise< carriers.DashCollection >;
34
+ createDefaultDashThemeAsync(): Promise< carriers.DashTheme >;
35
+ saveDashThemeAsync(entity: carriers.DashTheme) : Promise< carriers.DashTheme >;
36
+ deleteDashThemeAsync(DashThemeId: number) : Promise<void>;
37
+ createDefaultDashTileAsync(): Promise< carriers.DashTile >;
38
+ saveDashTileAsync(entity: carriers.DashTile) : Promise< carriers.DashTile >;
39
+ deleteDashTileAsync(DashTileId: number) : Promise<void>;
40
+ createDefaultDashTileDefinitionAsync(): Promise< carriers.DashTileDefinition >;
41
+ saveDashTileDefinitionAsync(entity: carriers.DashTileDefinition) : Promise< carriers.DashTileDefinition >;
42
+ deleteDashTileDefinitionAsync(DashTileDefinitionId: number) : Promise<void>;
43
+ createDefaultPreviewDashAsync(): Promise< carriers.PreviewDash >;
44
+ createDefaultPreviewDashTileAsync(): Promise< carriers.PreviewDashTile >;
45
+ getDashAsync(dashId: number) : Promise< carriers.Dash >;
46
+ addTileToDashboardAsync(request: carriers.Dash_AddTileToDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
47
+ addTileToDashboardAsync(dashboardId: number, dashTileDefinitionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
48
+ addNewTileToDashboardAsync(request: carriers.Dash_AddNewTileToDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
49
+ addNewTileToDashboardAsync(dashboardId: number, dashTileDefinition: carriers.DashTileDefinition, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
50
+ duplicateDashboardAsync(request: carriers.Dash_DuplicateDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash >;
51
+ duplicateDashboardAsync(dashboardId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash >;
52
+ getDashListAsync(request: carriers.Dash_GetDashListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] >;
53
+ getDashListAsync(dashboards: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] >;
54
+ getDashQuickFiltersAsync(request: carriers.Dash_GetDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
55
+ getDashQuickFiltersAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
56
+ saveDashQuickFiltersAsync(request: carriers.Dash_SaveDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
57
+ saveDashQuickFiltersAsync(dashboardId: number, quickFilters: carriers.QuickFilterInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
58
+ getPossibleDashQuickFiltersAsync(request: carriers.Dash_GetPossibleDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
59
+ getPossibleDashQuickFiltersAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
60
+ getDashCollectionAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection >;
61
+ getDashThemeAsync(dashThemeId: number) : Promise< carriers.DashTheme >;
62
+ getDashTileAsync(dashTileId: number) : Promise< carriers.DashTile >;
63
+ getDashTilesAsync(request: carriers.Dash_GetDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] >;
64
+ getDashTilesAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] >;
65
+ saveDashTilesAsync(request: carriers.Dash_SaveDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
66
+ saveDashTilesAsync(dashboardId: number, dashTiles: carriers.DashTile[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
67
+ createDashTileSelectionFromEntityAsync(request: carriers.Dash_CreateDashTileSelectionFromEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
68
+ createDashTileSelectionFromEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
69
+ copyTileSelectionAsync(request: carriers.Dash_CopyTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
70
+ copyTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
71
+ getTempTileSelectionAsync(request: carriers.Dash_GetTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
72
+ getTempTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
73
+ getSecondaryTempTileSelectionAsync(request: carriers.Dash_GetSecondaryTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
74
+ getSecondaryTempTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
75
+ createDefaultTileForEntityAsync(request: carriers.Dash_CreateDefaultTileForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
76
+ createDefaultTileForEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
77
+ duplicateTileAsync(request: carriers.Dash_DuplicateTileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
78
+ duplicateTileAsync(dashTileId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
79
+ getDashTileDefinitionAsync(dashTileDefinitionId: number) : Promise< carriers.DashTileDefinition >;
80
+ createDefaultTileDefinitionForEntityAsync(request: carriers.Dash_CreateDefaultTileDefinitionForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition >;
81
+ createDefaultTileDefinitionForEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition >;
82
+ getDashTileHtmlAsync(request: carriers.Dash_GetDashTileHtmlRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml >;
83
+ getDashTileHtmlAsync(dashboardTileDefinitionId: number, languageCode: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml >;
84
+ getDashTileHtmlListAsync(request: carriers.Dash_GetDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
85
+ getDashTileHtmlListAsync(dashboardTileDefinitionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
86
+ saveDashTileHtmlListAsync(request: carriers.Dash_SaveDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
87
+ saveDashTileHtmlListAsync(dashboardTileDefinitionId: number, languages: carriers.DashTileHtml[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
88
+ getPreviewDashAsync(request: carriers.Dash_GetPreviewDashRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash >;
89
+ getPreviewDashAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash >;
90
+ } // interface IDashAgent
91
+
92
+
93
+
94
+
95
+ /**
96
+ * Agent that lets you configure dashboard tiles and retrieve dashboard data
97
+ */
98
+ export class DashAgent extends base.WebApiBase implements IDashAgent {
99
+ constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
100
+ constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
101
+ constructor(baseUrl: string, resourceManager:any);
102
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
103
+ constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
104
+ constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
105
+ constructor(options: base.WebApiOptions);
106
+
107
+ constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
108
+ langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
109
+ langOrResourceOrRM?:string|base.ResourceParsing|any,
110
+ cultureCode?: string,
111
+ ) {
112
+ const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
113
+ options.basePath = "v1/Agents/Dash/";
114
+ super(options);
115
+ }
116
+
117
+
118
+
119
+ /**
120
+ * Set default values into a new Dash.
121
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
122
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
123
+ * @returns A blank entity.
124
+ */
125
+ public async createDefaultDashAsync(options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
126
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
127
+ base.WebApiBase.SetPending(options);
128
+ return new Promise< carriers.Dash >(async (resolve, reject) => {
129
+ try {
130
+ const response = await this._axios.post("CreateDefaultDash", null, config);
131
+ base.WebApiBase.SetCompleted(options, response);
132
+ const res : carriers.Dash = converters.Create_Dash_From( response.data );
133
+ resolve(res);
134
+ }
135
+ catch( err ) {
136
+ base.WebApiBase.HandleError(options, config, err);
137
+ reject(err);
138
+ }
139
+ });
140
+ }
141
+ /**
142
+ * Replace the existing Dash or creates a new Dash if the id parameter is empty
143
+ * @param entity - The Dash to be saved.
144
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
145
+ * @returns New or updated Dash
146
+ */
147
+ public async saveDashAsync(entity: carriers.Dash, options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
148
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
149
+ base.WebApiBase.SetPending(options);
150
+ return new Promise< carriers.Dash >(async (resolve, reject) => {
151
+ try {
152
+ const response = await this._axios.post("SaveDash", entity, config);
153
+ base.WebApiBase.SetCompleted(options, response);
154
+ const res : carriers.Dash = converters.Create_Dash_From( response.data );
155
+ resolve(res);
156
+ }
157
+ catch( err ) {
158
+ base.WebApiBase.HandleError(options, config, err);
159
+ reject(err);
160
+ }
161
+ });
162
+ }
163
+
164
+ /**
165
+ * Deletes the Dash
166
+ * @param DashId - The id of the Dash to be deleted.
167
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
168
+ */
169
+ public async deleteDashAsync(DashId: number, options?:base.WebApiRequestOptions) : Promise< void > {
170
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
171
+ base.WebApiBase.SetPending(options);
172
+ return new Promise< void >(async (resolve, reject) => {
173
+ try {
174
+ const response = await this._axios.post("DeleteDash?DashId=" + DashId, null, config );
175
+ base.WebApiBase.SetCompleted(options, response);
176
+ const res = response.data;
177
+ resolve(res);
178
+ }
179
+ catch( err ) {
180
+ base.WebApiBase.HandleError(options, config, err);
181
+ reject(err);
182
+ }
183
+ });
184
+ }
185
+
186
+ /**
187
+ * Set default values into a new DashCollection.
188
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
189
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
190
+ * @returns A blank entity.
191
+ */
192
+ public async createDefaultDashCollectionAsync(options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection > {
193
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
194
+ base.WebApiBase.SetPending(options);
195
+ return new Promise< carriers.DashCollection >(async (resolve, reject) => {
196
+ try {
197
+ const response = await this._axios.post("CreateDefaultDashCollection", null, config);
198
+ base.WebApiBase.SetCompleted(options, response);
199
+ const res : carriers.DashCollection = converters.Create_DashCollection_From( response.data );
200
+ resolve(res);
201
+ }
202
+ catch( err ) {
203
+ base.WebApiBase.HandleError(options, config, err);
204
+ reject(err);
205
+ }
206
+ });
207
+ }
208
+
209
+ /**
210
+ * Set default values into a new DashTheme.
211
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
212
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
213
+ * @returns A blank entity.
214
+ */
215
+ public async createDefaultDashThemeAsync(options?:base.WebApiRequestOptions) : Promise< carriers.DashTheme > {
216
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
217
+ base.WebApiBase.SetPending(options);
218
+ return new Promise< carriers.DashTheme >(async (resolve, reject) => {
219
+ try {
220
+ const response = await this._axios.post("CreateDefaultDashTheme", null, config);
221
+ base.WebApiBase.SetCompleted(options, response);
222
+ const res : carriers.DashTheme = converters.Create_DashTheme_From( response.data );
223
+ resolve(res);
224
+ }
225
+ catch( err ) {
226
+ base.WebApiBase.HandleError(options, config, err);
227
+ reject(err);
228
+ }
229
+ });
230
+ }
231
+ /**
232
+ * Replace the existing DashTheme or creates a new DashTheme if the id parameter is empty
233
+ * @param entity - The DashTheme to be saved.
234
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
235
+ * @returns New or updated DashTheme
236
+ */
237
+ public async saveDashThemeAsync(entity: carriers.DashTheme, options?:base.WebApiRequestOptions) : Promise< carriers.DashTheme > {
238
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
239
+ base.WebApiBase.SetPending(options);
240
+ return new Promise< carriers.DashTheme >(async (resolve, reject) => {
241
+ try {
242
+ const response = await this._axios.post("SaveDashTheme", entity, config);
243
+ base.WebApiBase.SetCompleted(options, response);
244
+ const res : carriers.DashTheme = converters.Create_DashTheme_From( response.data );
245
+ resolve(res);
246
+ }
247
+ catch( err ) {
248
+ base.WebApiBase.HandleError(options, config, err);
249
+ reject(err);
250
+ }
251
+ });
252
+ }
253
+
254
+ /**
255
+ * Deletes the DashTheme
256
+ * @param DashThemeId - The id of the DashTheme to be deleted.
257
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
258
+ */
259
+ public async deleteDashThemeAsync(DashThemeId: number, options?:base.WebApiRequestOptions) : Promise< void > {
260
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
261
+ base.WebApiBase.SetPending(options);
262
+ return new Promise< void >(async (resolve, reject) => {
263
+ try {
264
+ const response = await this._axios.post("DeleteDashTheme?DashThemeId=" + DashThemeId, null, config );
265
+ base.WebApiBase.SetCompleted(options, response);
266
+ const res = response.data;
267
+ resolve(res);
268
+ }
269
+ catch( err ) {
270
+ base.WebApiBase.HandleError(options, config, err);
271
+ reject(err);
272
+ }
273
+ });
274
+ }
275
+
276
+ /**
277
+ * Set default values into a new DashTile.
278
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
279
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
280
+ * @returns A blank entity.
281
+ */
282
+ public async createDefaultDashTileAsync(options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
283
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
284
+ base.WebApiBase.SetPending(options);
285
+ return new Promise< carriers.DashTile >(async (resolve, reject) => {
286
+ try {
287
+ const response = await this._axios.post("CreateDefaultDashTile", null, config);
288
+ base.WebApiBase.SetCompleted(options, response);
289
+ const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
290
+ resolve(res);
291
+ }
292
+ catch( err ) {
293
+ base.WebApiBase.HandleError(options, config, err);
294
+ reject(err);
295
+ }
296
+ });
297
+ }
298
+ /**
299
+ * Replace the existing DashTile or creates a new DashTile if the id parameter is empty
300
+ * @param entity - The DashTile to be saved.
301
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
302
+ * @returns New or updated DashTile
303
+ */
304
+ public async saveDashTileAsync(entity: carriers.DashTile, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
305
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
306
+ base.WebApiBase.SetPending(options);
307
+ return new Promise< carriers.DashTile >(async (resolve, reject) => {
308
+ try {
309
+ const response = await this._axios.post("SaveDashTile", entity, config);
310
+ base.WebApiBase.SetCompleted(options, response);
311
+ const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
312
+ resolve(res);
313
+ }
314
+ catch( err ) {
315
+ base.WebApiBase.HandleError(options, config, err);
316
+ reject(err);
317
+ }
318
+ });
319
+ }
320
+
321
+ /**
322
+ * Deletes the DashTile
323
+ * @param DashTileId - The id of the DashTile to be deleted.
324
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
325
+ */
326
+ public async deleteDashTileAsync(DashTileId: number, options?:base.WebApiRequestOptions) : Promise< void > {
327
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
328
+ base.WebApiBase.SetPending(options);
329
+ return new Promise< void >(async (resolve, reject) => {
330
+ try {
331
+ const response = await this._axios.post("DeleteDashTile?DashTileId=" + DashTileId, null, config );
332
+ base.WebApiBase.SetCompleted(options, response);
333
+ const res = response.data;
334
+ resolve(res);
335
+ }
336
+ catch( err ) {
337
+ base.WebApiBase.HandleError(options, config, err);
338
+ reject(err);
339
+ }
340
+ });
341
+ }
342
+
343
+ /**
344
+ * Set default values into a new DashTileDefinition.
345
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
346
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
347
+ * @returns A blank entity.
348
+ */
349
+ public async createDefaultDashTileDefinitionAsync(options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
350
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
351
+ base.WebApiBase.SetPending(options);
352
+ return new Promise< carriers.DashTileDefinition >(async (resolve, reject) => {
353
+ try {
354
+ const response = await this._axios.post("CreateDefaultDashTileDefinition", null, config);
355
+ base.WebApiBase.SetCompleted(options, response);
356
+ const res : carriers.DashTileDefinition = converters.Create_DashTileDefinition_From( response.data );
357
+ resolve(res);
358
+ }
359
+ catch( err ) {
360
+ base.WebApiBase.HandleError(options, config, err);
361
+ reject(err);
362
+ }
363
+ });
364
+ }
365
+ /**
366
+ * Replace the existing DashTileDefinition or creates a new DashTileDefinition if the id parameter is empty
367
+ * @param entity - The DashTileDefinition to be saved.
368
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
369
+ * @returns New or updated DashTileDefinition
370
+ */
371
+ public async saveDashTileDefinitionAsync(entity: carriers.DashTileDefinition, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
372
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
373
+ base.WebApiBase.SetPending(options);
374
+ return new Promise< carriers.DashTileDefinition >(async (resolve, reject) => {
375
+ try {
376
+ const response = await this._axios.post("SaveDashTileDefinition", entity, config);
377
+ base.WebApiBase.SetCompleted(options, response);
378
+ const res : carriers.DashTileDefinition = converters.Create_DashTileDefinition_From( response.data );
379
+ resolve(res);
380
+ }
381
+ catch( err ) {
382
+ base.WebApiBase.HandleError(options, config, err);
383
+ reject(err);
384
+ }
385
+ });
386
+ }
387
+
388
+ /**
389
+ * Deletes the DashTileDefinition
390
+ * @param DashTileDefinitionId - The id of the DashTileDefinition to be deleted.
391
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
392
+ */
393
+ public async deleteDashTileDefinitionAsync(DashTileDefinitionId: number, options?:base.WebApiRequestOptions) : Promise< void > {
394
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
395
+ base.WebApiBase.SetPending(options);
396
+ return new Promise< void >(async (resolve, reject) => {
397
+ try {
398
+ const response = await this._axios.post("DeleteDashTileDefinition?DashTileDefinitionId=" + DashTileDefinitionId, null, config );
399
+ base.WebApiBase.SetCompleted(options, response);
400
+ const res = response.data;
401
+ resolve(res);
402
+ }
403
+ catch( err ) {
404
+ base.WebApiBase.HandleError(options, config, err);
405
+ reject(err);
406
+ }
407
+ });
408
+ }
409
+
410
+ /**
411
+ * Set default values into a new PreviewDash.
412
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
413
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
414
+ * @returns A blank entity.
415
+ */
416
+ public async createDefaultPreviewDashAsync(options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash > {
417
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
418
+ base.WebApiBase.SetPending(options);
419
+ return new Promise< carriers.PreviewDash >(async (resolve, reject) => {
420
+ try {
421
+ const response = await this._axios.post("CreateDefaultPreviewDash", null, config);
422
+ base.WebApiBase.SetCompleted(options, response);
423
+ const res : carriers.PreviewDash = converters.Create_PreviewDash_From( response.data );
424
+ resolve(res);
425
+ }
426
+ catch( err ) {
427
+ base.WebApiBase.HandleError(options, config, err);
428
+ reject(err);
429
+ }
430
+ });
431
+ }
432
+
433
+ /**
434
+ * Set default values into a new PreviewDashTile.
435
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
436
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
437
+ * @returns A blank entity.
438
+ */
439
+ public async createDefaultPreviewDashTileAsync(options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDashTile > {
440
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
441
+ base.WebApiBase.SetPending(options);
442
+ return new Promise< carriers.PreviewDashTile >(async (resolve, reject) => {
443
+ try {
444
+ const response = await this._axios.post("CreateDefaultPreviewDashTile", null, config);
445
+ base.WebApiBase.SetCompleted(options, response);
446
+ const res : carriers.PreviewDashTile = converters.Create_PreviewDashTile_From( response.data );
447
+ resolve(res);
448
+ }
449
+ catch( err ) {
450
+ base.WebApiBase.HandleError(options, config, err);
451
+ reject(err);
452
+ }
453
+ });
454
+ }
455
+ /**
456
+ * Gets a Dash object.
457
+ * @param dashId - The primary key.
458
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
459
+ * @returns A single Dash
460
+ */
461
+ public async getDashAsync(dashId: number, options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
462
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
463
+ base.WebApiBase.SetPending(options);
464
+ return new Promise< carriers.Dash >(async (resolve, reject) => {
465
+ try {
466
+ const response = await this._axios.post("GetDash?dashId=" + dashId, null, config);
467
+ base.WebApiBase.SetCompleted(options, response);
468
+ const res = converters.Create_Dash_From( response.data );
469
+ resolve(res);
470
+ }
471
+ catch( err ) {
472
+ base.WebApiBase.HandleError(options, config, err);
473
+ reject(err);
474
+ }
475
+ });
476
+ }
477
+
478
+
479
+ private async _addTileToDashboardAsync(request: carriers.Dash_AddTileToDashboardRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
480
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
481
+ base.WebApiBase.SetPending(options);
482
+ return new Promise< carriers.DashTile >(async (resolve, reject) => {
483
+ try {
484
+ config.baseURL = this._options.baseUrl;
485
+ const response = await this._axios.post("AddTileToDashboard", request , config);
486
+ base.WebApiBase.SetCompleted(options, response);
487
+ const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
488
+ resolve(res);
489
+ }
490
+ catch( err ) {
491
+ base.WebApiBase.HandleError(options, config, err);
492
+ reject(err);
493
+ }
494
+ });
495
+ }
496
+
497
+
498
+
499
+ /**
500
+ * Add a tile to a dashboard with next rank
501
+ * @param request - DashboardId, DashTileDefinitionId
502
+ * @returns The newly added tile
503
+ */
504
+ public async addTileToDashboardAsync(request: carriers.Dash_AddTileToDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
505
+
506
+ /**
507
+ * Add a tile to a dashboard with next rank
508
+ * @param dashboardId - The id of the dashboard to add the tile to
509
+ * @param dashTileDefinitionId - The id of the dashboard tile definition
510
+ * @returns The newly added tile
511
+ */
512
+ public async addTileToDashboardAsync(dashboardId: number, dashTileDefinitionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
513
+
514
+ public async addTileToDashboardAsync(dashboardId:number|carriers.Dash_AddTileToDashboardRequest, dashTileDefinitionId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
515
+ let _request : carriers.Dash_AddTileToDashboardRequest = null;
516
+ let _options : base.WebApiRequestOptions = null;
517
+ const first : any = dashboardId;
518
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.dashTileDefinitionId)!='undefined' ) )
519
+ {
520
+ _request = dashboardId as carriers.Dash_AddTileToDashboardRequest;
521
+ _options = dashTileDefinitionId as base.WebApiRequestOptions;
522
+ }
523
+ else
524
+ {
525
+ _request = {
526
+ dashboardId: dashboardId as number,
527
+ dashTileDefinitionId: dashTileDefinitionId as number,
528
+ };
529
+ _options = webapi_options;
530
+ }
531
+ return this._addTileToDashboardAsync( _request, _options );
532
+ }
533
+
534
+
535
+ private async _addNewTileToDashboardAsync(request: carriers.Dash_AddNewTileToDashboardRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
536
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
537
+ base.WebApiBase.SetPending(options);
538
+ return new Promise< carriers.DashTile >(async (resolve, reject) => {
539
+ try {
540
+ config.baseURL = this._options.baseUrl;
541
+ const response = await this._axios.post("AddNewTileToDashboard", request , config);
542
+ base.WebApiBase.SetCompleted(options, response);
543
+ const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
544
+ resolve(res);
545
+ }
546
+ catch( err ) {
547
+ base.WebApiBase.HandleError(options, config, err);
548
+ reject(err);
549
+ }
550
+ });
551
+ }
552
+
553
+
554
+
555
+ /**
556
+ * Add a new tile to a dashboard with next rank
557
+ * @param request - DashboardId, DashTileDefinition
558
+ * @returns The newly added tile
559
+ */
560
+ public async addNewTileToDashboardAsync(request: carriers.Dash_AddNewTileToDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
561
+
562
+ /**
563
+ * Add a new tile to a dashboard with next rank
564
+ * @param dashboardId - The id of the dashboard to add the tile to
565
+ * @param dashTileDefinition - The tile definition data to add to the dashboard
566
+ * @returns The newly added tile
567
+ */
568
+ public async addNewTileToDashboardAsync(dashboardId: number, dashTileDefinition: carriers.DashTileDefinition, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
569
+
570
+ public async addNewTileToDashboardAsync(dashboardId:number|carriers.Dash_AddNewTileToDashboardRequest, dashTileDefinition?:carriers.DashTileDefinition|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
571
+ let _request : carriers.Dash_AddNewTileToDashboardRequest = null;
572
+ let _options : base.WebApiRequestOptions = null;
573
+ const first : any = dashboardId;
574
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.dashTileDefinition)!='undefined' ) )
575
+ {
576
+ _request = dashboardId as carriers.Dash_AddNewTileToDashboardRequest;
577
+ _options = dashTileDefinition as base.WebApiRequestOptions;
578
+ }
579
+ else
580
+ {
581
+ _request = {
582
+ dashboardId: dashboardId as number,
583
+ dashTileDefinition: dashTileDefinition as carriers.DashTileDefinition,
584
+ };
585
+ _options = webapi_options;
586
+ }
587
+ return this._addNewTileToDashboardAsync( _request, _options );
588
+ }
589
+
590
+
591
+ private async _duplicateDashboardAsync(request: carriers.Dash_DuplicateDashboardRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
592
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
593
+ base.WebApiBase.SetPending(options);
594
+ return new Promise< carriers.Dash >(async (resolve, reject) => {
595
+ try {
596
+ config.baseURL = this._options.baseUrl;
597
+ const response = await this._axios.post("DuplicateDashboard", request , config);
598
+ base.WebApiBase.SetCompleted(options, response);
599
+ const res : carriers.Dash = converters.Create_Dash_From( response.data );
600
+ resolve(res);
601
+ }
602
+ catch( err ) {
603
+ base.WebApiBase.HandleError(options, config, err);
604
+ reject(err);
605
+ }
606
+ });
607
+ }
608
+
609
+
610
+
611
+ /**
612
+ * Duplicate for the dashboard and all the sub elements
613
+ * @param request - DashboardId, Name
614
+ * @returns New dashboard
615
+ */
616
+ public async duplicateDashboardAsync(request: carriers.Dash_DuplicateDashboardRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash >;
617
+
618
+ /**
619
+ * Duplicate for the dashboard and all the sub elements
620
+ * @param dashboardId - The id of the dashboard to add the tile to
621
+ * @param name - The name of the new dashboard
622
+ * @returns New dashboard
623
+ */
624
+ public async duplicateDashboardAsync(dashboardId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash >;
625
+
626
+ public async duplicateDashboardAsync(dashboardId:number|carriers.Dash_DuplicateDashboardRequest, name?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash > {
627
+ let _request : carriers.Dash_DuplicateDashboardRequest = null;
628
+ let _options : base.WebApiRequestOptions = null;
629
+ const first : any = dashboardId;
630
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.name)!='undefined' ) )
631
+ {
632
+ _request = dashboardId as carriers.Dash_DuplicateDashboardRequest;
633
+ _options = name as base.WebApiRequestOptions;
634
+ }
635
+ else
636
+ {
637
+ _request = {
638
+ dashboardId: dashboardId as number,
639
+ name: name as string,
640
+ };
641
+ _options = webapi_options;
642
+ }
643
+ return this._duplicateDashboardAsync( _request, _options );
644
+ }
645
+
646
+
647
+ private async _getDashListAsync(request: carriers.Dash_GetDashListRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] > {
648
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
649
+ base.WebApiBase.SetPending(options);
650
+ return new Promise< carriers.Dash[] >(async (resolve, reject) => {
651
+ try {
652
+ config.baseURL = this._options.baseUrl;
653
+ const response = await this._axios.post("GetDashList", request , config);
654
+ base.WebApiBase.SetCompleted(options, response);
655
+ const res : carriers.Dash[] = converters.Create_DashArray_From( response.data );
656
+ resolve(res);
657
+ }
658
+ catch( err ) {
659
+ base.WebApiBase.HandleError(options, config, err);
660
+ reject(err);
661
+ }
662
+ });
663
+ }
664
+
665
+
666
+
667
+ /**
668
+ * Gets the ordered list of dashboards
669
+ * @param request - Dashboards
670
+ * @returns List of dashboards
671
+ */
672
+ public async getDashListAsync(request: carriers.Dash_GetDashListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] >;
673
+
674
+ /**
675
+ * Gets the ordered list of dashboards
676
+ * @param dashboards - List of dashboardIds
677
+ * @returns List of dashboards
678
+ */
679
+ public async getDashListAsync(dashboards: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] >;
680
+
681
+ public async getDashListAsync(dashboards:number[]|carriers.Dash_GetDashListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Dash[] > {
682
+ let _request : carriers.Dash_GetDashListRequest = null;
683
+ let _options : base.WebApiRequestOptions = null;
684
+ const first : any = dashboards;
685
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboards)!='undefined' ) )
686
+ {
687
+ _request = dashboards as carriers.Dash_GetDashListRequest;
688
+ _options = webapi_options as base.WebApiRequestOptions;
689
+ }
690
+ else
691
+ {
692
+ _request = {
693
+ dashboards: dashboards as number[],
694
+ };
695
+ _options = webapi_options;
696
+ }
697
+ return this._getDashListAsync( _request, _options );
698
+ }
699
+
700
+
701
+ private async _getDashQuickFiltersAsync(request: carriers.Dash_GetDashQuickFiltersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
702
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
703
+ base.WebApiBase.SetPending(options);
704
+ return new Promise< carriers.QuickFilterInfo[] >(async (resolve, reject) => {
705
+ try {
706
+ config.baseURL = this._options.baseUrl;
707
+ const response = await this._axios.post("GetDashQuickFilters", request , config);
708
+ base.WebApiBase.SetCompleted(options, response);
709
+ const res : carriers.QuickFilterInfo[] = converters.Create_QuickFilterInfoArray_From( response.data );
710
+ resolve(res);
711
+ }
712
+ catch( err ) {
713
+ base.WebApiBase.HandleError(options, config, err);
714
+ reject(err);
715
+ }
716
+ });
717
+ }
718
+
719
+
720
+
721
+ /**
722
+ * Gets the quick filters for this dashboard
723
+ * @param request - DashboardId
724
+ * @returns List of quick filters for the given dashboard
725
+ */
726
+ public async getDashQuickFiltersAsync(request: carriers.Dash_GetDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
727
+
728
+ /**
729
+ * Gets the quick filters for this dashboard
730
+ * @param dashboardId - The id of the dashboard to get the quick filters for
731
+ * @returns List of quick filters for the given dashboard
732
+ */
733
+ public async getDashQuickFiltersAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
734
+
735
+ public async getDashQuickFiltersAsync(dashboardId:number|carriers.Dash_GetDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
736
+ let _request : carriers.Dash_GetDashQuickFiltersRequest = null;
737
+ let _options : base.WebApiRequestOptions = null;
738
+ const first : any = dashboardId;
739
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' ) )
740
+ {
741
+ _request = dashboardId as carriers.Dash_GetDashQuickFiltersRequest;
742
+ _options = webapi_options as base.WebApiRequestOptions;
743
+ }
744
+ else
745
+ {
746
+ _request = {
747
+ dashboardId: dashboardId as number,
748
+ };
749
+ _options = webapi_options;
750
+ }
751
+ return this._getDashQuickFiltersAsync( _request, _options );
752
+ }
753
+
754
+
755
+ private async _saveDashQuickFiltersAsync(request: carriers.Dash_SaveDashQuickFiltersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
756
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
757
+ base.WebApiBase.SetPending(options);
758
+ return new Promise< carriers.QuickFilterInfo[] >(async (resolve, reject) => {
759
+ try {
760
+ config.baseURL = this._options.baseUrl;
761
+ const response = await this._axios.post("SaveDashQuickFilters", request , config);
762
+ base.WebApiBase.SetCompleted(options, response);
763
+ const res : carriers.QuickFilterInfo[] = converters.Create_QuickFilterInfoArray_From( response.data );
764
+ resolve(res);
765
+ }
766
+ catch( err ) {
767
+ base.WebApiBase.HandleError(options, config, err);
768
+ reject(err);
769
+ }
770
+ });
771
+ }
772
+
773
+
774
+
775
+ /**
776
+ * Saves the quick filters for this dashboard
777
+ * @param request - DashboardId, QuickFilters
778
+ * @returns List of saved quick filters for the given dashboard
779
+ */
780
+ public async saveDashQuickFiltersAsync(request: carriers.Dash_SaveDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
781
+
782
+ /**
783
+ * Saves the quick filters for this dashboard
784
+ * @param dashboardId - The id of the dashboard these quick filters are associated with
785
+ * @param quickFilters - Complete list of quick filters for the given dashboard, overwriting the existing list
786
+ * @returns List of saved quick filters for the given dashboard
787
+ */
788
+ public async saveDashQuickFiltersAsync(dashboardId: number, quickFilters: carriers.QuickFilterInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
789
+
790
+ public async saveDashQuickFiltersAsync(dashboardId:number|carriers.Dash_SaveDashQuickFiltersRequest, quickFilters?:carriers.QuickFilterInfo[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
791
+ let _request : carriers.Dash_SaveDashQuickFiltersRequest = null;
792
+ let _options : base.WebApiRequestOptions = null;
793
+ const first : any = dashboardId;
794
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.quickFilters)!='undefined' ) )
795
+ {
796
+ _request = dashboardId as carriers.Dash_SaveDashQuickFiltersRequest;
797
+ _options = quickFilters as base.WebApiRequestOptions;
798
+ }
799
+ else
800
+ {
801
+ _request = {
802
+ dashboardId: dashboardId as number,
803
+ quickFilters: quickFilters as carriers.QuickFilterInfo[],
804
+ };
805
+ _options = webapi_options;
806
+ }
807
+ return this._saveDashQuickFiltersAsync( _request, _options );
808
+ }
809
+
810
+
811
+ private async _getPossibleDashQuickFiltersAsync(request: carriers.Dash_GetPossibleDashQuickFiltersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
812
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
813
+ base.WebApiBase.SetPending(options);
814
+ return new Promise< carriers.QuickFilterInfo[] >(async (resolve, reject) => {
815
+ try {
816
+ config.baseURL = this._options.baseUrl;
817
+ const response = await this._axios.post("GetPossibleDashQuickFilters", request , config);
818
+ base.WebApiBase.SetCompleted(options, response);
819
+ const res : carriers.QuickFilterInfo[] = converters.Create_QuickFilterInfoArray_From( response.data );
820
+ resolve(res);
821
+ }
822
+ catch( err ) {
823
+ base.WebApiBase.HandleError(options, config, err);
824
+ reject(err);
825
+ }
826
+ });
827
+ }
828
+
829
+
830
+
831
+ /**
832
+ * Gets the possible (not stored/selected) quick filters for this dashboard
833
+ * @param request - DashboardId
834
+ * @returns List of possible quick filters for the given dashboard
835
+ */
836
+ public async getPossibleDashQuickFiltersAsync(request: carriers.Dash_GetPossibleDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
837
+
838
+ /**
839
+ * Gets the possible (not stored/selected) quick filters for this dashboard
840
+ * @param dashboardId - The id of the dashboard to get the possible quick filters for
841
+ * @returns List of possible quick filters for the given dashboard
842
+ */
843
+ public async getPossibleDashQuickFiltersAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] >;
844
+
845
+ public async getPossibleDashQuickFiltersAsync(dashboardId:number|carriers.Dash_GetPossibleDashQuickFiltersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.QuickFilterInfo[] > {
846
+ let _request : carriers.Dash_GetPossibleDashQuickFiltersRequest = null;
847
+ let _options : base.WebApiRequestOptions = null;
848
+ const first : any = dashboardId;
849
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' ) )
850
+ {
851
+ _request = dashboardId as carriers.Dash_GetPossibleDashQuickFiltersRequest;
852
+ _options = webapi_options as base.WebApiRequestOptions;
853
+ }
854
+ else
855
+ {
856
+ _request = {
857
+ dashboardId: dashboardId as number,
858
+ };
859
+ _options = webapi_options;
860
+ }
861
+ return this._getPossibleDashQuickFiltersAsync( _request, _options );
862
+ }
863
+
864
+
865
+ private async _getDashCollectionAsync( options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection > {
866
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
867
+ base.WebApiBase.SetPending(options);
868
+ return new Promise< carriers.DashCollection >(async (resolve, reject) => {
869
+ try {
870
+ config.baseURL = this._options.baseUrl;
871
+ const response = await this._axios.post("GetDashCollection", undefined , config);
872
+ base.WebApiBase.SetCompleted(options, response);
873
+ const res : carriers.DashCollection = converters.Create_DashCollection_From( response.data );
874
+ resolve(res);
875
+ }
876
+ catch( err ) {
877
+ base.WebApiBase.HandleError(options, config, err);
878
+ reject(err);
879
+ }
880
+ });
881
+ }
882
+
883
+
884
+ /**
885
+ * Gets a collection of dashboards for the current associate
886
+ * @returns Dashboard collection
887
+ */
888
+ public async getDashCollectionAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashCollection >
889
+ {
890
+ return this._getDashCollectionAsync(webapi_options);
891
+ }
892
+
893
+ /**
894
+ * Gets a DashTheme object.
895
+ * @param dashThemeId - The primary key.
896
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
897
+ * @returns A single DashTheme
898
+ */
899
+ public async getDashThemeAsync(dashThemeId: number, options?:base.WebApiRequestOptions) : Promise< carriers.DashTheme > {
900
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
901
+ base.WebApiBase.SetPending(options);
902
+ return new Promise< carriers.DashTheme >(async (resolve, reject) => {
903
+ try {
904
+ const response = await this._axios.post("GetDashTheme?dashThemeId=" + dashThemeId, null, config);
905
+ base.WebApiBase.SetCompleted(options, response);
906
+ const res = converters.Create_DashTheme_From( response.data );
907
+ resolve(res);
908
+ }
909
+ catch( err ) {
910
+ base.WebApiBase.HandleError(options, config, err);
911
+ reject(err);
912
+ }
913
+ });
914
+ }
915
+
916
+ /**
917
+ * Gets a DashTile object.
918
+ * @param dashTileId - The primary key.
919
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
920
+ * @returns A single DashTile
921
+ */
922
+ public async getDashTileAsync(dashTileId: number, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
923
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
924
+ base.WebApiBase.SetPending(options);
925
+ return new Promise< carriers.DashTile >(async (resolve, reject) => {
926
+ try {
927
+ const response = await this._axios.post("GetDashTile?dashTileId=" + dashTileId, null, config);
928
+ base.WebApiBase.SetCompleted(options, response);
929
+ const res = converters.Create_DashTile_From( response.data );
930
+ resolve(res);
931
+ }
932
+ catch( err ) {
933
+ base.WebApiBase.HandleError(options, config, err);
934
+ reject(err);
935
+ }
936
+ });
937
+ }
938
+
939
+
940
+ private async _getDashTilesAsync(request: carriers.Dash_GetDashTilesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] > {
941
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
942
+ base.WebApiBase.SetPending(options);
943
+ return new Promise< carriers.DashTile[] >(async (resolve, reject) => {
944
+ try {
945
+ config.baseURL = this._options.baseUrl;
946
+ const response = await this._axios.post("GetDashTiles", request , config);
947
+ base.WebApiBase.SetCompleted(options, response);
948
+ const res : carriers.DashTile[] = converters.Create_DashTileArray_From( response.data );
949
+ resolve(res);
950
+ }
951
+ catch( err ) {
952
+ base.WebApiBase.HandleError(options, config, err);
953
+ reject(err);
954
+ }
955
+ });
956
+ }
957
+
958
+
959
+
960
+ /**
961
+ * Gets the ordered list of tiles for a dashboard
962
+ * @param request - DashboardId
963
+ * @returns Ordered list of dashboard tiles
964
+ */
965
+ public async getDashTilesAsync(request: carriers.Dash_GetDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] >;
966
+
967
+ /**
968
+ * Gets the ordered list of tiles for a dashboard
969
+ * @param dashboardId - The id of the dashboard
970
+ * @returns Ordered list of dashboard tiles
971
+ */
972
+ public async getDashTilesAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] >;
973
+
974
+ public async getDashTilesAsync(dashboardId:number|carriers.Dash_GetDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile[] > {
975
+ let _request : carriers.Dash_GetDashTilesRequest = null;
976
+ let _options : base.WebApiRequestOptions = null;
977
+ const first : any = dashboardId;
978
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' ) )
979
+ {
980
+ _request = dashboardId as carriers.Dash_GetDashTilesRequest;
981
+ _options = webapi_options as base.WebApiRequestOptions;
982
+ }
983
+ else
984
+ {
985
+ _request = {
986
+ dashboardId: dashboardId as number,
987
+ };
988
+ _options = webapi_options;
989
+ }
990
+ return this._getDashTilesAsync( _request, _options );
991
+ }
992
+
993
+
994
+ private async _saveDashTilesAsync(request: carriers.Dash_SaveDashTilesRequest, options?:base.WebApiRequestOptions) : Promise< void > {
995
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
996
+ base.WebApiBase.SetPending(options);
997
+ return new Promise< void >(async (resolve, reject) => {
998
+ try {
999
+ config.baseURL = this._options.baseUrl;
1000
+ const response = await this._axios.post("SaveDashTiles", request , config);
1001
+ base.WebApiBase.SetCompleted(options, response);
1002
+ const res = response.data;
1003
+ resolve(res);
1004
+ }
1005
+ catch( err ) {
1006
+ base.WebApiBase.HandleError(options, config, err);
1007
+ reject(err);
1008
+ }
1009
+ });
1010
+ }
1011
+
1012
+
1013
+
1014
+ /**
1015
+ * Saves the ordered list of tiles for a dashboard
1016
+ * @param request - DashboardId, DashTiles
1017
+ * @returns
1018
+ */
1019
+ public async saveDashTilesAsync(request: carriers.Dash_SaveDashTilesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1020
+
1021
+ /**
1022
+ * Saves the ordered list of tiles for a dashboard
1023
+ * @param dashboardId - The id of the dashboard
1024
+ * @param dashTiles - The tiles in order
1025
+ * @returns
1026
+ */
1027
+ public async saveDashTilesAsync(dashboardId: number, dashTiles: carriers.DashTile[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
1028
+
1029
+ public async saveDashTilesAsync(dashboardId:number|carriers.Dash_SaveDashTilesRequest, dashTiles?:carriers.DashTile[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
1030
+ let _request : carriers.Dash_SaveDashTilesRequest = null;
1031
+ let _options : base.WebApiRequestOptions = null;
1032
+ const first : any = dashboardId;
1033
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' || typeof(first.dashTiles)!='undefined' ) )
1034
+ {
1035
+ _request = dashboardId as carriers.Dash_SaveDashTilesRequest;
1036
+ _options = dashTiles as base.WebApiRequestOptions;
1037
+ }
1038
+ else
1039
+ {
1040
+ _request = {
1041
+ dashboardId: dashboardId as number,
1042
+ dashTiles: dashTiles as carriers.DashTile[],
1043
+ };
1044
+ _options = webapi_options;
1045
+ }
1046
+ return this._saveDashTilesAsync( _request, _options );
1047
+ }
1048
+
1049
+
1050
+ private async _createDashTileSelectionFromEntityAsync(request: carriers.Dash_CreateDashTileSelectionFromEntityRequest, options?:base.WebApiRequestOptions) : Promise< number > {
1051
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1052
+ base.WebApiBase.SetPending(options);
1053
+ return new Promise< number >(async (resolve, reject) => {
1054
+ try {
1055
+ config.baseURL = this._options.baseUrl;
1056
+ const response = await this._axios.post("CreateDashTileSelectionFromEntity", request , config);
1057
+ base.WebApiBase.SetCompleted(options, response);
1058
+ const res : number = response.data as number;
1059
+ resolve(res);
1060
+ }
1061
+ catch( err ) {
1062
+ base.WebApiBase.HandleError(options, config, err);
1063
+ reject(err);
1064
+ }
1065
+ });
1066
+ }
1067
+
1068
+
1069
+
1070
+ /**
1071
+ * Returns the id to a dashboard tile selection
1072
+ * @param request - EntityName
1073
+ * @returns Selection Id
1074
+ */
1075
+ public async createDashTileSelectionFromEntityAsync(request: carriers.Dash_CreateDashTileSelectionFromEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1076
+
1077
+ /**
1078
+ * Returns the id to a dashboard tile selection
1079
+ * @param entityName - The name of the entity to create a default selection for
1080
+ * @returns Selection Id
1081
+ */
1082
+ public async createDashTileSelectionFromEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1083
+
1084
+ public async createDashTileSelectionFromEntityAsync(entityName:string|carriers.Dash_CreateDashTileSelectionFromEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1085
+ let _request : carriers.Dash_CreateDashTileSelectionFromEntityRequest = null;
1086
+ let _options : base.WebApiRequestOptions = null;
1087
+ const first : any = entityName;
1088
+ if( typeof( first ) === "object" && first && ( typeof(first.entityName)!='undefined' ) )
1089
+ {
1090
+ _request = entityName as carriers.Dash_CreateDashTileSelectionFromEntityRequest;
1091
+ _options = webapi_options as base.WebApiRequestOptions;
1092
+ }
1093
+ else
1094
+ {
1095
+ _request = {
1096
+ entityName: entityName as string,
1097
+ };
1098
+ _options = webapi_options;
1099
+ }
1100
+ return this._createDashTileSelectionFromEntityAsync( _request, _options );
1101
+ }
1102
+
1103
+
1104
+ private async _copyTileSelectionAsync(request: carriers.Dash_CopyTileSelectionRequest, options?:base.WebApiRequestOptions) : Promise< number > {
1105
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1106
+ base.WebApiBase.SetPending(options);
1107
+ return new Promise< number >(async (resolve, reject) => {
1108
+ try {
1109
+ config.baseURL = this._options.baseUrl;
1110
+ const response = await this._axios.post("CopyTileSelection", request , config);
1111
+ base.WebApiBase.SetCompleted(options, response);
1112
+ const res : number = response.data as number;
1113
+ resolve(res);
1114
+ }
1115
+ catch( err ) {
1116
+ base.WebApiBase.HandleError(options, config, err);
1117
+ reject(err);
1118
+ }
1119
+ });
1120
+ }
1121
+
1122
+
1123
+
1124
+ /**
1125
+ * Copy Tile Selection for the dashboard
1126
+ * @param request - SelectionId
1127
+ * @returns Selection Id
1128
+ */
1129
+ public async copyTileSelectionAsync(request: carriers.Dash_CopyTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1130
+
1131
+ /**
1132
+ * Copy Tile Selection for the dashboard
1133
+ * @param selectionId - The id of the selection to copy from
1134
+ * @returns Selection Id
1135
+ */
1136
+ public async copyTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1137
+
1138
+ public async copyTileSelectionAsync(selectionId:number|carriers.Dash_CopyTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1139
+ let _request : carriers.Dash_CopyTileSelectionRequest = null;
1140
+ let _options : base.WebApiRequestOptions = null;
1141
+ const first : any = selectionId;
1142
+ if( typeof( first ) === "object" && first && ( typeof(first.selectionId)!='undefined' ) )
1143
+ {
1144
+ _request = selectionId as carriers.Dash_CopyTileSelectionRequest;
1145
+ _options = webapi_options as base.WebApiRequestOptions;
1146
+ }
1147
+ else
1148
+ {
1149
+ _request = {
1150
+ selectionId: selectionId as number,
1151
+ };
1152
+ _options = webapi_options;
1153
+ }
1154
+ return this._copyTileSelectionAsync( _request, _options );
1155
+ }
1156
+
1157
+
1158
+ private async _getTempTileSelectionAsync(request: carriers.Dash_GetTempTileSelectionRequest, options?:base.WebApiRequestOptions) : Promise< number > {
1159
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1160
+ base.WebApiBase.SetPending(options);
1161
+ return new Promise< number >(async (resolve, reject) => {
1162
+ try {
1163
+ config.baseURL = this._options.baseUrl;
1164
+ const response = await this._axios.post("GetTempTileSelection", request , config);
1165
+ base.WebApiBase.SetCompleted(options, response);
1166
+ const res : number = response.data as number;
1167
+ resolve(res);
1168
+ }
1169
+ catch( err ) {
1170
+ base.WebApiBase.HandleError(options, config, err);
1171
+ reject(err);
1172
+ }
1173
+ });
1174
+ }
1175
+
1176
+
1177
+
1178
+ /**
1179
+ * Copy selection to temporary personal tile selection
1180
+ * @param request - SelectionId
1181
+ * @returns Selection Id
1182
+ */
1183
+ public async getTempTileSelectionAsync(request: carriers.Dash_GetTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1184
+
1185
+ /**
1186
+ * Copy selection to temporary personal tile selection
1187
+ * @param selectionId - The id of the selection to copy from
1188
+ * @returns Selection Id
1189
+ */
1190
+ public async getTempTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1191
+
1192
+ public async getTempTileSelectionAsync(selectionId:number|carriers.Dash_GetTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1193
+ let _request : carriers.Dash_GetTempTileSelectionRequest = null;
1194
+ let _options : base.WebApiRequestOptions = null;
1195
+ const first : any = selectionId;
1196
+ if( typeof( first ) === "object" && first && ( typeof(first.selectionId)!='undefined' ) )
1197
+ {
1198
+ _request = selectionId as carriers.Dash_GetTempTileSelectionRequest;
1199
+ _options = webapi_options as base.WebApiRequestOptions;
1200
+ }
1201
+ else
1202
+ {
1203
+ _request = {
1204
+ selectionId: selectionId as number,
1205
+ };
1206
+ _options = webapi_options;
1207
+ }
1208
+ return this._getTempTileSelectionAsync( _request, _options );
1209
+ }
1210
+
1211
+
1212
+ private async _getSecondaryTempTileSelectionAsync(request: carriers.Dash_GetSecondaryTempTileSelectionRequest, options?:base.WebApiRequestOptions) : Promise< number > {
1213
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1214
+ base.WebApiBase.SetPending(options);
1215
+ return new Promise< number >(async (resolve, reject) => {
1216
+ try {
1217
+ config.baseURL = this._options.baseUrl;
1218
+ const response = await this._axios.post("GetSecondaryTempTileSelection", request , config);
1219
+ base.WebApiBase.SetCompleted(options, response);
1220
+ const res : number = response.data as number;
1221
+ resolve(res);
1222
+ }
1223
+ catch( err ) {
1224
+ base.WebApiBase.HandleError(options, config, err);
1225
+ reject(err);
1226
+ }
1227
+ });
1228
+ }
1229
+
1230
+
1231
+
1232
+ /**
1233
+ * Copy selection to secondary temporary personal tile selection
1234
+ * @param request - SelectionId
1235
+ * @returns Selection Id
1236
+ */
1237
+ public async getSecondaryTempTileSelectionAsync(request: carriers.Dash_GetSecondaryTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1238
+
1239
+ /**
1240
+ * Copy selection to secondary temporary personal tile selection
1241
+ * @param selectionId - The id of the selection to copy from
1242
+ * @returns Selection Id
1243
+ */
1244
+ public async getSecondaryTempTileSelectionAsync(selectionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
1245
+
1246
+ public async getSecondaryTempTileSelectionAsync(selectionId:number|carriers.Dash_GetSecondaryTempTileSelectionRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
1247
+ let _request : carriers.Dash_GetSecondaryTempTileSelectionRequest = null;
1248
+ let _options : base.WebApiRequestOptions = null;
1249
+ const first : any = selectionId;
1250
+ if( typeof( first ) === "object" && first && ( typeof(first.selectionId)!='undefined' ) )
1251
+ {
1252
+ _request = selectionId as carriers.Dash_GetSecondaryTempTileSelectionRequest;
1253
+ _options = webapi_options as base.WebApiRequestOptions;
1254
+ }
1255
+ else
1256
+ {
1257
+ _request = {
1258
+ selectionId: selectionId as number,
1259
+ };
1260
+ _options = webapi_options;
1261
+ }
1262
+ return this._getSecondaryTempTileSelectionAsync( _request, _options );
1263
+ }
1264
+
1265
+
1266
+ private async _createDefaultTileForEntityAsync(request: carriers.Dash_CreateDefaultTileForEntityRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
1267
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1268
+ base.WebApiBase.SetPending(options);
1269
+ return new Promise< carriers.DashTile >(async (resolve, reject) => {
1270
+ try {
1271
+ config.baseURL = this._options.baseUrl;
1272
+ const response = await this._axios.post("CreateDefaultTileForEntity", request , config);
1273
+ base.WebApiBase.SetCompleted(options, response);
1274
+ const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
1275
+ resolve(res);
1276
+ }
1277
+ catch( err ) {
1278
+ base.WebApiBase.HandleError(options, config, err);
1279
+ reject(err);
1280
+ }
1281
+ });
1282
+ }
1283
+
1284
+
1285
+
1286
+ /**
1287
+ * Set Measure to CountAll and MeasureField to primary key field
1288
+ * @param request - EntityName
1289
+ * @returns Default
1290
+ */
1291
+ public async createDefaultTileForEntityAsync(request: carriers.Dash_CreateDefaultTileForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
1292
+
1293
+ /**
1294
+ * Set Measure to CountAll and MeasureField to primary key field
1295
+ * @param entityName - Name of entity to use for primary key
1296
+ * @returns Default
1297
+ */
1298
+ public async createDefaultTileForEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
1299
+
1300
+ public async createDefaultTileForEntityAsync(entityName:string|carriers.Dash_CreateDefaultTileForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
1301
+ let _request : carriers.Dash_CreateDefaultTileForEntityRequest = null;
1302
+ let _options : base.WebApiRequestOptions = null;
1303
+ const first : any = entityName;
1304
+ if( typeof( first ) === "object" && first && ( typeof(first.entityName)!='undefined' ) )
1305
+ {
1306
+ _request = entityName as carriers.Dash_CreateDefaultTileForEntityRequest;
1307
+ _options = webapi_options as base.WebApiRequestOptions;
1308
+ }
1309
+ else
1310
+ {
1311
+ _request = {
1312
+ entityName: entityName as string,
1313
+ };
1314
+ _options = webapi_options;
1315
+ }
1316
+ return this._createDefaultTileForEntityAsync( _request, _options );
1317
+ }
1318
+
1319
+
1320
+ private async _duplicateTileAsync(request: carriers.Dash_DuplicateTileRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
1321
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1322
+ base.WebApiBase.SetPending(options);
1323
+ return new Promise< carriers.DashTile >(async (resolve, reject) => {
1324
+ try {
1325
+ config.baseURL = this._options.baseUrl;
1326
+ const response = await this._axios.post("DuplicateTile", request , config);
1327
+ base.WebApiBase.SetCompleted(options, response);
1328
+ const res : carriers.DashTile = converters.Create_DashTile_From( response.data );
1329
+ resolve(res);
1330
+ }
1331
+ catch( err ) {
1332
+ base.WebApiBase.HandleError(options, config, err);
1333
+ reject(err);
1334
+ }
1335
+ });
1336
+ }
1337
+
1338
+
1339
+
1340
+ /**
1341
+ * Duplicate for the tile and all the sub elements
1342
+ * @param request - DashTileId, Name
1343
+ * @returns New tile
1344
+ */
1345
+ public async duplicateTileAsync(request: carriers.Dash_DuplicateTileRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
1346
+
1347
+ /**
1348
+ * Duplicate for the tile and all the sub elements
1349
+ * @param dashTileId - The id of the tile to copy
1350
+ * @param name - The name of the new tile
1351
+ * @returns New tile
1352
+ */
1353
+ public async duplicateTileAsync(dashTileId: number, name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile >;
1354
+
1355
+ public async duplicateTileAsync(dashTileId:number|carriers.Dash_DuplicateTileRequest, name?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTile > {
1356
+ let _request : carriers.Dash_DuplicateTileRequest = null;
1357
+ let _options : base.WebApiRequestOptions = null;
1358
+ const first : any = dashTileId;
1359
+ if( typeof( first ) === "object" && first && ( typeof(first.dashTileId)!='undefined' || typeof(first.name)!='undefined' ) )
1360
+ {
1361
+ _request = dashTileId as carriers.Dash_DuplicateTileRequest;
1362
+ _options = name as base.WebApiRequestOptions;
1363
+ }
1364
+ else
1365
+ {
1366
+ _request = {
1367
+ dashTileId: dashTileId as number,
1368
+ name: name as string,
1369
+ };
1370
+ _options = webapi_options;
1371
+ }
1372
+ return this._duplicateTileAsync( _request, _options );
1373
+ }
1374
+
1375
+ /**
1376
+ * Gets a DashTileDefinition object.
1377
+ * @param dashTileDefinitionId - The primary key.
1378
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
1379
+ * @returns A single DashTileDefinition
1380
+ */
1381
+ public async getDashTileDefinitionAsync(dashTileDefinitionId: number, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
1382
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1383
+ base.WebApiBase.SetPending(options);
1384
+ return new Promise< carriers.DashTileDefinition >(async (resolve, reject) => {
1385
+ try {
1386
+ const response = await this._axios.post("GetDashTileDefinition?dashTileDefinitionId=" + dashTileDefinitionId, null, config);
1387
+ base.WebApiBase.SetCompleted(options, response);
1388
+ const res = converters.Create_DashTileDefinition_From( response.data );
1389
+ resolve(res);
1390
+ }
1391
+ catch( err ) {
1392
+ base.WebApiBase.HandleError(options, config, err);
1393
+ reject(err);
1394
+ }
1395
+ });
1396
+ }
1397
+
1398
+
1399
+ private async _createDefaultTileDefinitionForEntityAsync(request: carriers.Dash_CreateDefaultTileDefinitionForEntityRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
1400
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1401
+ base.WebApiBase.SetPending(options);
1402
+ return new Promise< carriers.DashTileDefinition >(async (resolve, reject) => {
1403
+ try {
1404
+ config.baseURL = this._options.baseUrl;
1405
+ const response = await this._axios.post("CreateDefaultTileDefinitionForEntity", request , config);
1406
+ base.WebApiBase.SetCompleted(options, response);
1407
+ const res : carriers.DashTileDefinition = converters.Create_DashTileDefinition_From( response.data );
1408
+ resolve(res);
1409
+ }
1410
+ catch( err ) {
1411
+ base.WebApiBase.HandleError(options, config, err);
1412
+ reject(err);
1413
+ }
1414
+ });
1415
+ }
1416
+
1417
+
1418
+
1419
+ /**
1420
+ * Set Measure to CountAll and MeasureField to primary key field
1421
+ * @param request - EntityName
1422
+ * @returns Default
1423
+ */
1424
+ public async createDefaultTileDefinitionForEntityAsync(request: carriers.Dash_CreateDefaultTileDefinitionForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition >;
1425
+
1426
+ /**
1427
+ * Set Measure to CountAll and MeasureField to primary key field
1428
+ * @param entityName - Name of entity to use for primary key
1429
+ * @returns Default
1430
+ */
1431
+ public async createDefaultTileDefinitionForEntityAsync(entityName: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition >;
1432
+
1433
+ public async createDefaultTileDefinitionForEntityAsync(entityName:string|carriers.Dash_CreateDefaultTileDefinitionForEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileDefinition > {
1434
+ let _request : carriers.Dash_CreateDefaultTileDefinitionForEntityRequest = null;
1435
+ let _options : base.WebApiRequestOptions = null;
1436
+ const first : any = entityName;
1437
+ if( typeof( first ) === "object" && first && ( typeof(first.entityName)!='undefined' ) )
1438
+ {
1439
+ _request = entityName as carriers.Dash_CreateDefaultTileDefinitionForEntityRequest;
1440
+ _options = webapi_options as base.WebApiRequestOptions;
1441
+ }
1442
+ else
1443
+ {
1444
+ _request = {
1445
+ entityName: entityName as string,
1446
+ };
1447
+ _options = webapi_options;
1448
+ }
1449
+ return this._createDefaultTileDefinitionForEntityAsync( _request, _options );
1450
+ }
1451
+
1452
+
1453
+ private async _getDashTileHtmlAsync(request: carriers.Dash_GetDashTileHtmlRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml > {
1454
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1455
+ base.WebApiBase.SetPending(options);
1456
+ return new Promise< carriers.DashTileHtml >(async (resolve, reject) => {
1457
+ try {
1458
+ config.baseURL = this._options.baseUrl;
1459
+ const response = await this._axios.post("GetDashTileHtml", request , config);
1460
+ base.WebApiBase.SetCompleted(options, response);
1461
+ const res : carriers.DashTileHtml = converters.Create_DashTileHtml_From( response.data );
1462
+ resolve(res);
1463
+ }
1464
+ catch( err ) {
1465
+ base.WebApiBase.HandleError(options, config, err);
1466
+ reject(err);
1467
+ }
1468
+ });
1469
+ }
1470
+
1471
+
1472
+
1473
+ /**
1474
+ * Get HTML for a dashboard tile definition with TileType = HTML
1475
+ * @param request - DashboardTileDefinitionId, LanguageCode
1476
+ * @returns HTML data
1477
+ */
1478
+ public async getDashTileHtmlAsync(request: carriers.Dash_GetDashTileHtmlRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml >;
1479
+
1480
+ /**
1481
+ * Get HTML for a dashboard tile definition with TileType = HTML
1482
+ * @param dashboardTileDefinitionId - The id of the dashboard tile definition
1483
+ * @param languageCode - Preferred language code.
1484
+ * @returns HTML data
1485
+ */
1486
+ public async getDashTileHtmlAsync(dashboardTileDefinitionId: number, languageCode: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml >;
1487
+
1488
+ public async getDashTileHtmlAsync(dashboardTileDefinitionId:number|carriers.Dash_GetDashTileHtmlRequest, languageCode?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml > {
1489
+ let _request : carriers.Dash_GetDashTileHtmlRequest = null;
1490
+ let _options : base.WebApiRequestOptions = null;
1491
+ const first : any = dashboardTileDefinitionId;
1492
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardTileDefinitionId)!='undefined' || typeof(first.languageCode)!='undefined' ) )
1493
+ {
1494
+ _request = dashboardTileDefinitionId as carriers.Dash_GetDashTileHtmlRequest;
1495
+ _options = languageCode as base.WebApiRequestOptions;
1496
+ }
1497
+ else
1498
+ {
1499
+ _request = {
1500
+ dashboardTileDefinitionId: dashboardTileDefinitionId as number,
1501
+ languageCode: languageCode as string,
1502
+ };
1503
+ _options = webapi_options;
1504
+ }
1505
+ return this._getDashTileHtmlAsync( _request, _options );
1506
+ }
1507
+
1508
+
1509
+ private async _getDashTileHtmlListAsync(request: carriers.Dash_GetDashTileHtmlListRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] > {
1510
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1511
+ base.WebApiBase.SetPending(options);
1512
+ return new Promise< carriers.DashTileHtml[] >(async (resolve, reject) => {
1513
+ try {
1514
+ config.baseURL = this._options.baseUrl;
1515
+ const response = await this._axios.post("GetDashTileHtmlList", request , config);
1516
+ base.WebApiBase.SetCompleted(options, response);
1517
+ const res : carriers.DashTileHtml[] = converters.Create_DashTileHtmlArray_From( response.data );
1518
+ resolve(res);
1519
+ }
1520
+ catch( err ) {
1521
+ base.WebApiBase.HandleError(options, config, err);
1522
+ reject(err);
1523
+ }
1524
+ });
1525
+ }
1526
+
1527
+
1528
+
1529
+ /**
1530
+ * Get HTML for a dashboard tile definition with TileType = HTML. Retrieve a list with all registered languages.
1531
+ * @param request - DashboardTileDefinitionId
1532
+ * @returns
1533
+ */
1534
+ public async getDashTileHtmlListAsync(request: carriers.Dash_GetDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
1535
+
1536
+ /**
1537
+ * Get HTML for a dashboard tile definition with TileType = HTML. Retrieve a list with all registered languages.
1538
+ * @param dashboardTileDefinitionId - The id of the dashboard tile definition
1539
+ * @returns
1540
+ */
1541
+ public async getDashTileHtmlListAsync(dashboardTileDefinitionId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
1542
+
1543
+ public async getDashTileHtmlListAsync(dashboardTileDefinitionId:number|carriers.Dash_GetDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] > {
1544
+ let _request : carriers.Dash_GetDashTileHtmlListRequest = null;
1545
+ let _options : base.WebApiRequestOptions = null;
1546
+ const first : any = dashboardTileDefinitionId;
1547
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardTileDefinitionId)!='undefined' ) )
1548
+ {
1549
+ _request = dashboardTileDefinitionId as carriers.Dash_GetDashTileHtmlListRequest;
1550
+ _options = webapi_options as base.WebApiRequestOptions;
1551
+ }
1552
+ else
1553
+ {
1554
+ _request = {
1555
+ dashboardTileDefinitionId: dashboardTileDefinitionId as number,
1556
+ };
1557
+ _options = webapi_options;
1558
+ }
1559
+ return this._getDashTileHtmlListAsync( _request, _options );
1560
+ }
1561
+
1562
+
1563
+ private async _saveDashTileHtmlListAsync(request: carriers.Dash_SaveDashTileHtmlListRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] > {
1564
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1565
+ base.WebApiBase.SetPending(options);
1566
+ return new Promise< carriers.DashTileHtml[] >(async (resolve, reject) => {
1567
+ try {
1568
+ config.baseURL = this._options.baseUrl;
1569
+ const response = await this._axios.post("SaveDashTileHtmlList", request , config);
1570
+ base.WebApiBase.SetCompleted(options, response);
1571
+ const res : carriers.DashTileHtml[] = converters.Create_DashTileHtmlArray_From( response.data );
1572
+ resolve(res);
1573
+ }
1574
+ catch( err ) {
1575
+ base.WebApiBase.HandleError(options, config, err);
1576
+ reject(err);
1577
+ }
1578
+ });
1579
+ }
1580
+
1581
+
1582
+
1583
+ /**
1584
+ * Set the HTML data for a tile with TileType = HTML.
1585
+ * @param request - DashboardTileDefinitionId, Languages
1586
+ * @returns
1587
+ */
1588
+ public async saveDashTileHtmlListAsync(request: carriers.Dash_SaveDashTileHtmlListRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
1589
+
1590
+ /**
1591
+ * Set the HTML data for a tile with TileType = HTML.
1592
+ * @param dashboardTileDefinitionId - The id of the dashboard tile definition
1593
+ * @param languages - List of HTML content per language
1594
+ * @returns
1595
+ */
1596
+ public async saveDashTileHtmlListAsync(dashboardTileDefinitionId: number, languages: carriers.DashTileHtml[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] >;
1597
+
1598
+ public async saveDashTileHtmlListAsync(dashboardTileDefinitionId:number|carriers.Dash_SaveDashTileHtmlListRequest, languages?:carriers.DashTileHtml[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DashTileHtml[] > {
1599
+ let _request : carriers.Dash_SaveDashTileHtmlListRequest = null;
1600
+ let _options : base.WebApiRequestOptions = null;
1601
+ const first : any = dashboardTileDefinitionId;
1602
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardTileDefinitionId)!='undefined' || typeof(first.languages)!='undefined' ) )
1603
+ {
1604
+ _request = dashboardTileDefinitionId as carriers.Dash_SaveDashTileHtmlListRequest;
1605
+ _options = languages as base.WebApiRequestOptions;
1606
+ }
1607
+ else
1608
+ {
1609
+ _request = {
1610
+ dashboardTileDefinitionId: dashboardTileDefinitionId as number,
1611
+ languages: languages as carriers.DashTileHtml[],
1612
+ };
1613
+ _options = webapi_options;
1614
+ }
1615
+ return this._saveDashTileHtmlListAsync( _request, _options );
1616
+ }
1617
+
1618
+
1619
+ private async _getPreviewDashAsync(request: carriers.Dash_GetPreviewDashRequest, options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash > {
1620
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1621
+ base.WebApiBase.SetPending(options);
1622
+ return new Promise< carriers.PreviewDash >(async (resolve, reject) => {
1623
+ try {
1624
+ config.baseURL = this._options.baseUrl;
1625
+ const response = await this._axios.post("GetPreviewDash", request , config);
1626
+ base.WebApiBase.SetCompleted(options, response);
1627
+ const res : carriers.PreviewDash = converters.Create_PreviewDash_From( response.data );
1628
+ resolve(res);
1629
+ }
1630
+ catch( err ) {
1631
+ base.WebApiBase.HandleError(options, config, err);
1632
+ reject(err);
1633
+ }
1634
+ });
1635
+ }
1636
+
1637
+
1638
+
1639
+ /**
1640
+ * Get a dashboard from its id
1641
+ * @param request - DashboardId
1642
+ * @returns Dashboard suitable for preview
1643
+ */
1644
+ public async getPreviewDashAsync(request: carriers.Dash_GetPreviewDashRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash >;
1645
+
1646
+ /**
1647
+ * Get a dashboard from its id
1648
+ * @param dashboardId - Dashboard ID
1649
+ * @returns Dashboard suitable for preview
1650
+ */
1651
+ public async getPreviewDashAsync(dashboardId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash >;
1652
+
1653
+ public async getPreviewDashAsync(dashboardId:number|carriers.Dash_GetPreviewDashRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.PreviewDash > {
1654
+ let _request : carriers.Dash_GetPreviewDashRequest = null;
1655
+ let _options : base.WebApiRequestOptions = null;
1656
+ const first : any = dashboardId;
1657
+ if( typeof( first ) === "object" && first && ( typeof(first.dashboardId)!='undefined' ) )
1658
+ {
1659
+ _request = dashboardId as carriers.Dash_GetPreviewDashRequest;
1660
+ _options = webapi_options as base.WebApiRequestOptions;
1661
+ }
1662
+ else
1663
+ {
1664
+ _request = {
1665
+ dashboardId: dashboardId as number,
1666
+ };
1667
+ _options = webapi_options;
1668
+ }
1669
+ return this._getPreviewDashAsync( _request, _options );
1670
+ }
1671
+
1672
+ } // class v1DashAgentController
1673
+
1674
+