@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.
- package/LICENSE.md +15 -15
- package/README.md +184 -184
- package/__tests__/Appointment63-notz.json +1925 -1925
- package/__tests__/Appointment63-utctz.json +1925 -1925
- package/__tests__/Appointment63.json +1925 -1925
- package/__tests__/AppointmentTzTest.ts +115 -115
- package/__tests__/AxiosNockTest.ts +28 -28
- package/__tests__/ContactDefault.json +699 -699
- package/__tests__/ContactEntity.json +272 -272
- package/__tests__/ContactRestTest.ts +144 -144
- package/__tests__/ContactTest.ts +395 -395
- package/__tests__/ConvertersTest.ts +97 -97
- package/__tests__/DocumentTest.ts +101 -101
- package/__tests__/Person210-notz.json +1932 -1932
- package/__tests__/Person210-utctz.json +1932 -1932
- package/__tests__/Person210.json +1932 -1932
- package/__tests__/PersonImageData.nock +22 -22
- package/__tests__/PersonTest.ts +41 -41
- package/__tests__/PersonTzTest.ts +113 -113
- package/__tests__/RecurrenceInfo.json +55 -55
- package/__tests__/ResponseCallbackTest.ts +23 -23
- package/__tests__/TableRights.json +441 -441
- package/__tests__/WebapiTest.ts +264 -264
- package/__tests__/Webhook.json +16 -16
- package/__tests__/WebhookTest.ts +209 -209
- package/dist/cjs/AIAgent.d.ts +62 -0
- package/dist/cjs/AIAgent.d.ts.map +1 -1
- package/dist/cjs/AIAgent.js +149 -0
- package/dist/cjs/AIAgent.js.map +1 -1
- package/dist/cjs/Carriers.d.ts +640 -14
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/Converters.d.ts +24 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +388 -17
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/DiagnosticsAgent.d.ts +38 -0
- package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/cjs/DiagnosticsAgent.js +91 -0
- package/dist/cjs/DiagnosticsAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +77 -1
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +83 -4
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +71 -6
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +157 -0
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/MarketingAgent.d.ts +68 -0
- package/dist/cjs/MarketingAgent.d.ts.map +1 -1
- package/dist/cjs/MarketingAgent.js +157 -0
- package/dist/cjs/MarketingAgent.js.map +1 -1
- package/dist/cjs/TicketAgent.d.ts +23 -0
- package/dist/cjs/TicketAgent.d.ts.map +1 -1
- package/dist/cjs/TicketAgent.js +65 -0
- package/dist/cjs/TicketAgent.js.map +1 -1
- package/dist/esm/AIAgent.d.ts +62 -0
- package/dist/esm/AIAgent.d.ts.map +1 -1
- package/dist/esm/AIAgent.js +150 -1
- package/dist/esm/AIAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +640 -14
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/Converters.d.ts +24 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +346 -0
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/DiagnosticsAgent.d.ts +38 -0
- package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/esm/DiagnosticsAgent.js +91 -0
- package/dist/esm/DiagnosticsAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +77 -1
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +79 -0
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +71 -6
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +157 -0
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/MarketingAgent.d.ts +68 -0
- package/dist/esm/MarketingAgent.d.ts.map +1 -1
- package/dist/esm/MarketingAgent.js +157 -0
- package/dist/esm/MarketingAgent.js.map +1 -1
- package/dist/esm/TicketAgent.d.ts +23 -0
- package/dist/esm/TicketAgent.d.ts.map +1 -1
- package/dist/esm/TicketAgent.js +65 -0
- package/dist/esm/TicketAgent.js.map +1 -1
- package/examples-js/hello.js +12 -12
- package/examples-ts/hello.ts +8 -8
- package/package.json +93 -93
- package/scripts/postbuild.js +22 -22
- package/scripts/setVersion.js +44 -44
- package/src/AIAgent.ts +2239 -1992
- package/src/AppointmentAgent.ts +6263 -6263
- package/src/AppointmentRestApi.ts +225 -225
- package/src/ArchiveAgent.ts +1950 -1950
- package/src/AssociateAgent.ts +422 -422
- package/src/AxiosCacheHandler.ts +74 -74
- package/src/BLOBAgent.ts +2100 -2100
- package/src/Base64.ts +285 -285
- package/src/BatchAgent.ts +910 -910
- package/src/BulkUpdateAgent.ts +504 -504
- package/src/CRMScriptAgent.ts +1390 -1390
- package/src/Carriers.ts +53121 -52274
- package/src/ChatAgent.ts +1422 -1422
- package/src/ConfigurationAgent.ts +2228 -2228
- package/src/ContactAgent.ts +1756 -1756
- package/src/ContactRestApi.ts +237 -237
- package/src/Converters.ts +23496 -23090
- package/src/CustomerServiceAgent.ts +1799 -1799
- package/src/DashAgent.ts +1674 -1674
- package/src/DatabaseAgent.ts +120 -120
- package/src/DatabaseTableAgent.ts +534 -534
- package/src/Day_js.ts +41 -41
- package/src/DiagnosticsAgent.ts +1384 -1240
- package/src/DocumentAgent.ts +5079 -5079
- package/src/DocumentMigrationAgent.ts +524 -524
- package/src/DocumentRestApi.ts +259 -259
- package/src/EMailAgent.ts +5328 -5328
- package/src/Enums.ts +6998 -6916
- package/src/ErpSyncAgent.ts +2658 -2658
- package/src/FavouriteAgent.ts +720 -720
- package/src/FindAgent.ts +2330 -2330
- package/src/ForeignSystemAgent.ts +1710 -1710
- package/src/FreeTextAgent.ts +372 -372
- package/src/ImportAgent.ts +304 -304
- package/src/LicenseAgent.ts +1230 -1230
- package/src/ListAgent.ts +11451 -11237
- package/src/MDOAgent.ts +748 -748
- package/src/MarketingAgent.ts +1146 -890
- package/src/MessagingAgent.ts +384 -384
- package/src/NavigatorAgent.ts +140 -140
- package/src/NumberAllocationAgent.ts +296 -296
- package/src/PersonAgent.ts +3287 -3287
- package/src/PersonRestApi.ts +241 -241
- package/src/PhoneListAgent.ts +458 -458
- package/src/PocketAgent.ts +780 -780
- package/src/PreferenceAgent.ts +1900 -1900
- package/src/PreviewsAgent.ts +116 -116
- package/src/ProjectAgent.ts +2391 -2391
- package/src/ProjectRestApi.ts +239 -239
- package/src/QuoteAgent.ts +5159 -5159
- package/src/RelationAgent.ts +220 -220
- package/src/ReportAgent.ts +154 -154
- package/src/ResourceAgent.ts +358 -358
- package/src/SaintAgent.ts +601 -601
- package/src/SaleAgent.ts +2034 -2034
- package/src/SaleRestApi.ts +233 -233
- package/src/SelectionAgent.ts +3195 -3195
- package/src/SentryAgent.ts +462 -462
- package/src/SoApiConstants.ts +8 -8
- package/src/TargetsAgent.ts +1104 -1104
- package/src/TicketAgent.ts +3708 -3638
- package/src/TimeZoneAgent.ts +528 -528
- package/src/TooltipsAgent.ts +116 -116
- package/src/UserAgent.ts +4856 -4856
- package/src/UserDefinedFieldInfoAgent.ts +1764 -1764
- package/src/ViewStateAgent.ts +858 -858
- package/src/WebApi.ts +872 -872
- package/src/WebApiBase.ts +565 -565
- package/src/WebhookAgent.ts +388 -388
- package/src/WorkflowAgent.ts +1338 -1338
- package/tsconfig.esm.json +8 -8
- package/tsconfig.jest.json +8 -8
- package/tsconfig.json +34 -34
package/src/DiagnosticsAgent.ts
CHANGED
|
@@ -1,1240 +1,1384 @@
|
|
|
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/DiagnosticsAgent.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
|
-
* Diagnostics, usage data collection, caches and flushing
|
|
28
|
-
*/
|
|
29
|
-
export interface IDiagnosticsAgent {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
flushCachesByNameAsync(
|
|
34
|
-
|
|
35
|
-
getCacheStateAsync(
|
|
36
|
-
|
|
37
|
-
getCacheInvalidationGenerationsAsync(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
logViewStateAsync(
|
|
42
|
-
|
|
43
|
-
changeLogSettingsAsync(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
constructor(baseUrl
|
|
85
|
-
constructor(
|
|
86
|
-
|
|
87
|
-
constructor(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
base.WebApiBase.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
base.WebApiBase.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
base.WebApiBase.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
base.WebApiBase.
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
base.WebApiBase.
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
base.WebApiBase.
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
base.WebApiBase.
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
*
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
return
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
*
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1108
|
-
{
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
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/DiagnosticsAgent.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
|
+
* Diagnostics, usage data collection, caches and flushing
|
|
28
|
+
*/
|
|
29
|
+
export interface IDiagnosticsAgent {
|
|
30
|
+
getAnalyticsDataAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AnalyticsData >;
|
|
31
|
+
flushCachesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
32
|
+
getCacheNamesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
33
|
+
flushCachesByNameAsync(request: carriers.Diagnostics_FlushCachesByNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
34
|
+
flushCachesByNameAsync(cacheNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
35
|
+
getCacheStateAsync(request: carriers.Diagnostics_GetCacheStateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
36
|
+
getCacheStateAsync(cacheNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
37
|
+
getCacheInvalidationGenerationsAsync(request: carriers.Diagnostics_GetCacheInvalidationGenerationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] >;
|
|
38
|
+
getCacheInvalidationGenerationsAsync(names: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] >;
|
|
39
|
+
getEntityCountsForCurrentUserAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EntityCounts[] >;
|
|
40
|
+
getEntityCountsForAllUsersAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EntityCounts[] >;
|
|
41
|
+
logViewStateAsync(request: carriers.Diagnostics_LogViewStateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
42
|
+
logViewStateAsync(viewState: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
43
|
+
changeLogSettingsAsync(request: carriers.Diagnostics_ChangeLogSettingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
44
|
+
changeLogSettingsAsync(logWarning: boolean, logInformation: boolean, logSuccessAudit: boolean, logFailureAudit: boolean, logToEventLog: boolean, logToSuperOffice: boolean, logToFile: boolean, logToTrace: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
45
|
+
trackEventAsync(request: carriers.Diagnostics_TrackEventRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
46
|
+
trackEventAsync(trackEventName: string, eventProperties: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
47
|
+
trackUserAsync(request: carriers.Diagnostics_TrackUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
48
|
+
trackUserAsync(userProperties: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
49
|
+
collectDataAdditionsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
50
|
+
collectWinUsageAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
51
|
+
collectWebUsageAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
52
|
+
collectTableSizesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
53
|
+
resyncUsersAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
54
|
+
sendSystemMessageAsync(request: carriers.Diagnostics_SendSystemMessageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
55
|
+
sendSystemMessageAsync(systemMessageId: string, associateId: number, markdownMessage: string, expire: Date, type: enums.SystemMessageType, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
56
|
+
removeSystemMessageAsync(request: carriers.Diagnostics_RemoveSystemMessageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
57
|
+
removeSystemMessageAsync(onlineappId: number, systemMessageId: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
58
|
+
removeSystemMessageForAssociateAsync(request: carriers.Diagnostics_RemoveSystemMessageForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
59
|
+
removeSystemMessageForAssociateAsync(onlineappId: number, systemMessageId: string, associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
60
|
+
getSystemMessagesAsync(request: carriers.Diagnostics_GetSystemMessagesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] >;
|
|
61
|
+
getSystemMessagesAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] >;
|
|
62
|
+
removeExpiredSystemMessagesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
63
|
+
getNextTableNumberAsync(webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
64
|
+
performTasksAfterUpgradeAsync(webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
65
|
+
performTasksAfterCustomObjectTableCreatedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableCreatedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
66
|
+
performTasksAfterCustomObjectTableCreatedAsync(tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
67
|
+
performTasksAfterCustomObjectTableDeletedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
68
|
+
performTasksAfterCustomObjectTableDeletedAsync(tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
69
|
+
addWebAppUsageAsync(request: carriers.Diagnostics_AddWebAppUsageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
70
|
+
addWebAppUsageAsync(webAppUsages: carriers.WebAppUsage[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
71
|
+
webAppUsageExistsInPeriodAsync(request: carriers.Diagnostics_WebAppUsageExistsInPeriodRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
72
|
+
webAppUsageExistsInPeriodAsync(associateId: number, viewState: string, fromDate: Date, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
73
|
+
getWebAppUsagesForPeriodAsync(request: carriers.Diagnostics_GetWebAppUsagesForPeriodRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WebAppUsage[] >;
|
|
74
|
+
getWebAppUsagesForPeriodAsync(fromDate: Date, toDate: Date, searchTerm: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WebAppUsage[] >;
|
|
75
|
+
} // interface IDiagnosticsAgent
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Diagnostics, usage data collection, caches and flushing
|
|
82
|
+
*/
|
|
83
|
+
export class DiagnosticsAgent extends base.WebApiBase implements IDiagnosticsAgent {
|
|
84
|
+
constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
|
|
85
|
+
constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
|
|
86
|
+
constructor(baseUrl: string, resourceManager:any);
|
|
87
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
|
|
88
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
|
|
89
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
|
|
90
|
+
constructor(options: base.WebApiOptions);
|
|
91
|
+
|
|
92
|
+
constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
|
|
93
|
+
langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
|
|
94
|
+
langOrResourceOrRM?:string|base.ResourceParsing|any,
|
|
95
|
+
cultureCode?: string,
|
|
96
|
+
) {
|
|
97
|
+
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
98
|
+
options.basePath = "v1/Agents/Diagnostics/";
|
|
99
|
+
super(options);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
private async _getAnalyticsDataAsync( options?:base.WebApiRequestOptions) : Promise< carriers.AnalyticsData > {
|
|
105
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
106
|
+
base.WebApiBase.SetPending(options);
|
|
107
|
+
return new Promise< carriers.AnalyticsData >(async (resolve, reject) => {
|
|
108
|
+
try {
|
|
109
|
+
config.baseURL = this._options.baseUrl;
|
|
110
|
+
const response = await this._axios.post("GetAnalyticsData", undefined , config);
|
|
111
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
112
|
+
const res : carriers.AnalyticsData = converters.Create_AnalyticsData_From( response.data );
|
|
113
|
+
resolve(res);
|
|
114
|
+
}
|
|
115
|
+
catch( err ) {
|
|
116
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
117
|
+
reject(err);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Retrieve analytics properties to be included in usage tracking.
|
|
125
|
+
* @returns Description Analytics Data
|
|
126
|
+
*/
|
|
127
|
+
public async getAnalyticsDataAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.AnalyticsData >
|
|
128
|
+
{
|
|
129
|
+
return this._getAnalyticsDataAsync(webapi_options);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
private async _flushCachesAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
134
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
135
|
+
base.WebApiBase.SetPending(options);
|
|
136
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
137
|
+
try {
|
|
138
|
+
config.baseURL = this._options.baseUrl;
|
|
139
|
+
const response = await this._axios.post("FlushCaches", undefined , config);
|
|
140
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
141
|
+
const res = response.data;
|
|
142
|
+
resolve(res);
|
|
143
|
+
}
|
|
144
|
+
catch( err ) {
|
|
145
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
146
|
+
reject(err);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Flushes all NetServer caches
|
|
154
|
+
* @returns
|
|
155
|
+
*/
|
|
156
|
+
public async flushCachesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
157
|
+
{
|
|
158
|
+
return this._flushCachesAsync(webapi_options);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
private async _getCacheNamesAsync( options?:base.WebApiRequestOptions) : Promise< string[] > {
|
|
163
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
164
|
+
base.WebApiBase.SetPending(options);
|
|
165
|
+
return new Promise< string[] >(async (resolve, reject) => {
|
|
166
|
+
try {
|
|
167
|
+
config.baseURL = this._options.baseUrl;
|
|
168
|
+
const response = await this._axios.post("GetCacheNames", undefined , config);
|
|
169
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
170
|
+
const res : string[] = response.data as string[];
|
|
171
|
+
resolve(res);
|
|
172
|
+
}
|
|
173
|
+
catch( err ) {
|
|
174
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
175
|
+
reject(err);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Get the name of the caches that can be flushed
|
|
183
|
+
* @returns Name of the caches that can be flusehd
|
|
184
|
+
*/
|
|
185
|
+
public async getCacheNamesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< string[] >
|
|
186
|
+
{
|
|
187
|
+
return this._getCacheNamesAsync(webapi_options);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
private async _flushCachesByNameAsync(request: carriers.Diagnostics_FlushCachesByNameRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
192
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
193
|
+
base.WebApiBase.SetPending(options);
|
|
194
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
195
|
+
try {
|
|
196
|
+
config.baseURL = this._options.baseUrl;
|
|
197
|
+
const response = await this._axios.post("FlushCachesByName", request , config);
|
|
198
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
199
|
+
const res = 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
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Flushes all NetServer caches named
|
|
213
|
+
* @param request - CacheNames
|
|
214
|
+
* @returns This method has no return value
|
|
215
|
+
*/
|
|
216
|
+
public async flushCachesByNameAsync(request: carriers.Diagnostics_FlushCachesByNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Flushes all NetServer caches named
|
|
220
|
+
* @param cacheNames - Name of the cachnes to flush
|
|
221
|
+
* @returns This method has no return value
|
|
222
|
+
*/
|
|
223
|
+
public async flushCachesByNameAsync(cacheNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
224
|
+
|
|
225
|
+
public async flushCachesByNameAsync(cacheNames:string[]|carriers.Diagnostics_FlushCachesByNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
226
|
+
let _request : carriers.Diagnostics_FlushCachesByNameRequest = null;
|
|
227
|
+
let _options : base.WebApiRequestOptions = null;
|
|
228
|
+
const first : any = cacheNames;
|
|
229
|
+
if( typeof( first ) === "object" && first && ( typeof(first.cacheNames)!='undefined' ) )
|
|
230
|
+
{
|
|
231
|
+
_request = cacheNames as carriers.Diagnostics_FlushCachesByNameRequest;
|
|
232
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
233
|
+
}
|
|
234
|
+
else
|
|
235
|
+
{
|
|
236
|
+
_request = {
|
|
237
|
+
cacheNames: cacheNames as string[],
|
|
238
|
+
};
|
|
239
|
+
_options = webapi_options;
|
|
240
|
+
}
|
|
241
|
+
return this._flushCachesByNameAsync( _request, _options );
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
private async _getCacheStateAsync(request: carriers.Diagnostics_GetCacheStateRequest, options?:base.WebApiRequestOptions) : Promise< string > {
|
|
246
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
247
|
+
base.WebApiBase.SetPending(options);
|
|
248
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
249
|
+
try {
|
|
250
|
+
config.baseURL = this._options.baseUrl;
|
|
251
|
+
const response = await this._axios.post("GetCacheState", request , config);
|
|
252
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
253
|
+
const res : string = response.data as string;
|
|
254
|
+
resolve(res);
|
|
255
|
+
}
|
|
256
|
+
catch( err ) {
|
|
257
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
258
|
+
reject(err);
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Get the current generation value of the named caches. State is opaque.
|
|
267
|
+
* @param request - CacheNames
|
|
268
|
+
* @returns Current state of the caches named. If not the same as previous value, then it is time to flush
|
|
269
|
+
*/
|
|
270
|
+
public async getCacheStateAsync(request: carriers.Diagnostics_GetCacheStateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Get the current generation value of the named caches. State is opaque.
|
|
274
|
+
* @param cacheNames - Names of the caches to check
|
|
275
|
+
* @returns Current state of the caches named. If not the same as previous value, then it is time to flush
|
|
276
|
+
*/
|
|
277
|
+
public async getCacheStateAsync(cacheNames: string[], webapi_options?:base.WebApiRequestOptions) : Promise< string >;
|
|
278
|
+
|
|
279
|
+
public async getCacheStateAsync(cacheNames:string[]|carriers.Diagnostics_GetCacheStateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string > {
|
|
280
|
+
let _request : carriers.Diagnostics_GetCacheStateRequest = null;
|
|
281
|
+
let _options : base.WebApiRequestOptions = null;
|
|
282
|
+
const first : any = cacheNames;
|
|
283
|
+
if( typeof( first ) === "object" && first && ( typeof(first.cacheNames)!='undefined' ) )
|
|
284
|
+
{
|
|
285
|
+
_request = cacheNames as carriers.Diagnostics_GetCacheStateRequest;
|
|
286
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
287
|
+
}
|
|
288
|
+
else
|
|
289
|
+
{
|
|
290
|
+
_request = {
|
|
291
|
+
cacheNames: cacheNames as string[],
|
|
292
|
+
};
|
|
293
|
+
_options = webapi_options;
|
|
294
|
+
}
|
|
295
|
+
return this._getCacheStateAsync( _request, _options );
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
private async _getCacheInvalidationGenerationsAsync(request: carriers.Diagnostics_GetCacheInvalidationGenerationsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] > {
|
|
300
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
301
|
+
base.WebApiBase.SetPending(options);
|
|
302
|
+
return new Promise< carriers.CacheInvalidation[] >(async (resolve, reject) => {
|
|
303
|
+
try {
|
|
304
|
+
config.baseURL = this._options.baseUrl;
|
|
305
|
+
const response = await this._axios.post("GetCacheInvalidationGenerations", request , config);
|
|
306
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
307
|
+
const res : carriers.CacheInvalidation[] = converters.Create_CacheInvalidationArray_From( response.data );
|
|
308
|
+
resolve(res);
|
|
309
|
+
}
|
|
310
|
+
catch( err ) {
|
|
311
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
312
|
+
reject(err);
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Get generation for provided names
|
|
321
|
+
* @param request - Names
|
|
322
|
+
* @returns Array of caches with generation number
|
|
323
|
+
*/
|
|
324
|
+
public async getCacheInvalidationGenerationsAsync(request: carriers.Diagnostics_GetCacheInvalidationGenerationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] >;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Get generation for provided names
|
|
328
|
+
* @param names - Name of caches
|
|
329
|
+
* @returns Array of caches with generation number
|
|
330
|
+
*/
|
|
331
|
+
public async getCacheInvalidationGenerationsAsync(names: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] >;
|
|
332
|
+
|
|
333
|
+
public async getCacheInvalidationGenerationsAsync(names:string[]|carriers.Diagnostics_GetCacheInvalidationGenerationsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CacheInvalidation[] > {
|
|
334
|
+
let _request : carriers.Diagnostics_GetCacheInvalidationGenerationsRequest = null;
|
|
335
|
+
let _options : base.WebApiRequestOptions = null;
|
|
336
|
+
const first : any = names;
|
|
337
|
+
if( typeof( first ) === "object" && first && ( typeof(first.names)!='undefined' ) )
|
|
338
|
+
{
|
|
339
|
+
_request = names as carriers.Diagnostics_GetCacheInvalidationGenerationsRequest;
|
|
340
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
341
|
+
}
|
|
342
|
+
else
|
|
343
|
+
{
|
|
344
|
+
_request = {
|
|
345
|
+
names: names as string[],
|
|
346
|
+
};
|
|
347
|
+
_options = webapi_options;
|
|
348
|
+
}
|
|
349
|
+
return this._getCacheInvalidationGenerationsAsync( _request, _options );
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
private async _getEntityCountsForCurrentUserAsync( options?:base.WebApiRequestOptions) : Promise< carriers.EntityCounts[] > {
|
|
354
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
355
|
+
base.WebApiBase.SetPending(options);
|
|
356
|
+
return new Promise< carriers.EntityCounts[] >(async (resolve, reject) => {
|
|
357
|
+
try {
|
|
358
|
+
config.baseURL = this._options.baseUrl;
|
|
359
|
+
const response = await this._axios.post("GetEntityCountsForCurrentUser", undefined , config);
|
|
360
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
361
|
+
const res : carriers.EntityCounts[] = converters.Create_EntityCountsArray_From( response.data );
|
|
362
|
+
resolve(res);
|
|
363
|
+
}
|
|
364
|
+
catch( err ) {
|
|
365
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
366
|
+
reject(err);
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Get an array of entities and number of entities created for the current associate
|
|
374
|
+
* @returns Array of EntityCounts[] for the current associate
|
|
375
|
+
*/
|
|
376
|
+
public async getEntityCountsForCurrentUserAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EntityCounts[] >
|
|
377
|
+
{
|
|
378
|
+
return this._getEntityCountsForCurrentUserAsync(webapi_options);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
private async _getEntityCountsForAllUsersAsync( options?:base.WebApiRequestOptions) : Promise< carriers.EntityCounts[] > {
|
|
383
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
384
|
+
base.WebApiBase.SetPending(options);
|
|
385
|
+
return new Promise< carriers.EntityCounts[] >(async (resolve, reject) => {
|
|
386
|
+
try {
|
|
387
|
+
config.baseURL = this._options.baseUrl;
|
|
388
|
+
const response = await this._axios.post("GetEntityCountsForAllUsers", undefined , config);
|
|
389
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
390
|
+
const res : carriers.EntityCounts[] = converters.Create_EntityCountsArray_From( response.data );
|
|
391
|
+
resolve(res);
|
|
392
|
+
}
|
|
393
|
+
catch( err ) {
|
|
394
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
395
|
+
reject(err);
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Get an array of entities and number of entities created for all associates.
|
|
403
|
+
* @returns Array of EntityCounts[] for all the users
|
|
404
|
+
*/
|
|
405
|
+
public async getEntityCountsForAllUsersAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.EntityCounts[] >
|
|
406
|
+
{
|
|
407
|
+
return this._getEntityCountsForAllUsersAsync(webapi_options);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
private async _logViewStateAsync(request: carriers.Diagnostics_LogViewStateRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
412
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
413
|
+
base.WebApiBase.SetPending(options);
|
|
414
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
415
|
+
try {
|
|
416
|
+
config.baseURL = this._options.baseUrl;
|
|
417
|
+
const response = await this._axios.post("LogViewState", request , config);
|
|
418
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
419
|
+
const res = response.data;
|
|
420
|
+
resolve(res);
|
|
421
|
+
}
|
|
422
|
+
catch( err ) {
|
|
423
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
424
|
+
reject(err);
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Log a change in view state. The granularity of the logging depends on the current configuration. This call returns asynchronously, leaving the server to finish processing later on.
|
|
433
|
+
* @param request - ViewState
|
|
434
|
+
* @returns
|
|
435
|
+
*/
|
|
436
|
+
public async logViewStateAsync(request: carriers.Diagnostics_LogViewStateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Log a change in view state. The granularity of the logging depends on the current configuration. This call returns asynchronously, leaving the server to finish processing later on.
|
|
440
|
+
* @param viewState - Current view state to be logged
|
|
441
|
+
* @returns
|
|
442
|
+
*/
|
|
443
|
+
public async logViewStateAsync(viewState: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
444
|
+
|
|
445
|
+
public async logViewStateAsync(viewState:string|carriers.Diagnostics_LogViewStateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
446
|
+
let _request : carriers.Diagnostics_LogViewStateRequest = null;
|
|
447
|
+
let _options : base.WebApiRequestOptions = null;
|
|
448
|
+
const first : any = viewState;
|
|
449
|
+
if( typeof( first ) === "object" && first && ( typeof(first.viewState)!='undefined' ) )
|
|
450
|
+
{
|
|
451
|
+
_request = viewState as carriers.Diagnostics_LogViewStateRequest;
|
|
452
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
453
|
+
}
|
|
454
|
+
else
|
|
455
|
+
{
|
|
456
|
+
_request = {
|
|
457
|
+
viewState: viewState as string,
|
|
458
|
+
};
|
|
459
|
+
_options = webapi_options;
|
|
460
|
+
}
|
|
461
|
+
return this._logViewStateAsync( _request, _options );
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
private async _changeLogSettingsAsync(request: carriers.Diagnostics_ChangeLogSettingsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
466
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
467
|
+
base.WebApiBase.SetPending(options);
|
|
468
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
469
|
+
try {
|
|
470
|
+
config.baseURL = this._options.baseUrl;
|
|
471
|
+
const response = await this._axios.post("ChangeLogSettings", request , config);
|
|
472
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
473
|
+
const res = response.data;
|
|
474
|
+
resolve(res);
|
|
475
|
+
}
|
|
476
|
+
catch( err ) {
|
|
477
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
478
|
+
reject(err);
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Change NetServer log settings.
|
|
487
|
+
* @param request - LogWarning, LogInformation, LogSuccessAudit, LogFailureAudit, LogToEventLog, LogToSuperOffice, LogToFile, LogToTrace
|
|
488
|
+
* @returns
|
|
489
|
+
*/
|
|
490
|
+
public async changeLogSettingsAsync(request: carriers.Diagnostics_ChangeLogSettingsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Change NetServer log settings.
|
|
494
|
+
* @param logWarning - Turn on warning log
|
|
495
|
+
* @param logInformation - Turn on information log
|
|
496
|
+
* @param logSuccessAudit - Turn on success audit log
|
|
497
|
+
* @param logFailureAudit - Turn on failure audit log
|
|
498
|
+
* @param logToEventLog - Log to event log
|
|
499
|
+
* @param logToSuperOffice - Log to SuperOffice
|
|
500
|
+
* @param logToFile - Log to file
|
|
501
|
+
* @param logToTrace - Log to trace
|
|
502
|
+
* @returns
|
|
503
|
+
*/
|
|
504
|
+
public async changeLogSettingsAsync(logWarning: boolean, logInformation: boolean, logSuccessAudit: boolean, logFailureAudit: boolean, logToEventLog: boolean, logToSuperOffice: boolean, logToFile: boolean, logToTrace: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
505
|
+
|
|
506
|
+
public async changeLogSettingsAsync(logWarning:boolean|carriers.Diagnostics_ChangeLogSettingsRequest, logInformation?:boolean|base.WebApiRequestOptions, logSuccessAudit?:boolean, logFailureAudit?:boolean, logToEventLog?:boolean, logToSuperOffice?:boolean, logToFile?:boolean, logToTrace?:boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
507
|
+
let _request : carriers.Diagnostics_ChangeLogSettingsRequest = null;
|
|
508
|
+
let _options : base.WebApiRequestOptions = null;
|
|
509
|
+
const first : any = logWarning;
|
|
510
|
+
if( typeof( first ) === "object" && first && ( typeof(first.logWarning)!='undefined' || typeof(first.logInformation)!='undefined' || typeof(first.logSuccessAudit)!='undefined' || typeof(first.logFailureAudit)!='undefined' || typeof(first.logToEventLog)!='undefined' || typeof(first.logToSuperOffice)!='undefined' || typeof(first.logToFile)!='undefined' || typeof(first.logToTrace)!='undefined' ) )
|
|
511
|
+
{
|
|
512
|
+
_request = logWarning as carriers.Diagnostics_ChangeLogSettingsRequest;
|
|
513
|
+
_options = logInformation as base.WebApiRequestOptions;
|
|
514
|
+
}
|
|
515
|
+
else
|
|
516
|
+
{
|
|
517
|
+
_request = {
|
|
518
|
+
logWarning: logWarning as boolean,
|
|
519
|
+
logInformation: logInformation as boolean,
|
|
520
|
+
logSuccessAudit: logSuccessAudit as boolean,
|
|
521
|
+
logFailureAudit: logFailureAudit as boolean,
|
|
522
|
+
logToEventLog: logToEventLog as boolean,
|
|
523
|
+
logToSuperOffice: logToSuperOffice as boolean,
|
|
524
|
+
logToFile: logToFile as boolean,
|
|
525
|
+
logToTrace: logToTrace as boolean,
|
|
526
|
+
};
|
|
527
|
+
_options = webapi_options;
|
|
528
|
+
}
|
|
529
|
+
return this._changeLogSettingsAsync( _request, _options );
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
private async _trackEventAsync(request: carriers.Diagnostics_TrackEventRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
534
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
535
|
+
base.WebApiBase.SetPending(options);
|
|
536
|
+
return new Promise< number >(async (resolve, reject) => {
|
|
537
|
+
try {
|
|
538
|
+
config.baseURL = this._options.baseUrl;
|
|
539
|
+
const response = await this._axios.post("TrackEvent", request , config);
|
|
540
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
541
|
+
const res : number = response.data as number;
|
|
542
|
+
resolve(res);
|
|
543
|
+
}
|
|
544
|
+
catch( err ) {
|
|
545
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
546
|
+
reject(err);
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Sends events to Amplitude and Userflow.
|
|
555
|
+
* @param request - TrackEventName, EventProperties
|
|
556
|
+
* @returns Amplitude Session id used to track the event. May be the same as passed in SO-AMPLITUDE header or ampSess cookie, or a fresh one if none defined.
|
|
557
|
+
*/
|
|
558
|
+
public async trackEventAsync(request: carriers.Diagnostics_TrackEventRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Sends events to Amplitude and Userflow.
|
|
562
|
+
* @param trackEventName - "Sale Completed" or "Sale Sold" etc. See the TrackEventNames class for suitable string constants.
|
|
563
|
+
* @param eventProperties - key-value pairs of event properties. client is set from the application token. Special keys: app_version, platform, os_name, os_version, device_brand, device_manufacturer
|
|
564
|
+
* @returns Amplitude Session id used to track the event. May be the same as passed in SO-AMPLITUDE header or ampSess cookie, or a fresh one if none defined.
|
|
565
|
+
*/
|
|
566
|
+
public async trackEventAsync(trackEventName: string, eventProperties: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
567
|
+
|
|
568
|
+
public async trackEventAsync(trackEventName:string|carriers.Diagnostics_TrackEventRequest, eventProperties?:carriers.StringDictionary|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
|
|
569
|
+
let _request : carriers.Diagnostics_TrackEventRequest = null;
|
|
570
|
+
let _options : base.WebApiRequestOptions = null;
|
|
571
|
+
const first : any = trackEventName;
|
|
572
|
+
if( typeof( first ) === "object" && first && ( typeof(first.trackEventName)!='undefined' || typeof(first.eventProperties)!='undefined' ) )
|
|
573
|
+
{
|
|
574
|
+
_request = trackEventName as carriers.Diagnostics_TrackEventRequest;
|
|
575
|
+
_options = eventProperties as base.WebApiRequestOptions;
|
|
576
|
+
}
|
|
577
|
+
else
|
|
578
|
+
{
|
|
579
|
+
_request = {
|
|
580
|
+
trackEventName: trackEventName as string,
|
|
581
|
+
eventProperties: eventProperties as carriers.StringDictionary,
|
|
582
|
+
};
|
|
583
|
+
_options = webapi_options;
|
|
584
|
+
}
|
|
585
|
+
return this._trackEventAsync( _request, _options );
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
private async _trackUserAsync(request: carriers.Diagnostics_TrackUserRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
590
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
591
|
+
base.WebApiBase.SetPending(options);
|
|
592
|
+
return new Promise< number >(async (resolve, reject) => {
|
|
593
|
+
try {
|
|
594
|
+
config.baseURL = this._options.baseUrl;
|
|
595
|
+
const response = await this._axios.post("TrackUser", request , config);
|
|
596
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
597
|
+
const res : number = response.data as number;
|
|
598
|
+
resolve(res);
|
|
599
|
+
}
|
|
600
|
+
catch( err ) {
|
|
601
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
602
|
+
reject(err);
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Sends user identification to Amplitude and Userflow. Sets current rights, user licenses automatically. Additional properties can be specified in userProperties.
|
|
611
|
+
* @param request - UserProperties
|
|
612
|
+
* @returns Amplitude Session id used to track the user. May be the same as passed in SO-AMPLITUDE header or ampSess cookie, or a fresh one if none defined.
|
|
613
|
+
*/
|
|
614
|
+
public async trackUserAsync(request: carriers.Diagnostics_TrackUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Sends user identification to Amplitude and Userflow. Sets current rights, user licenses automatically. Additional properties can be specified in userProperties.
|
|
618
|
+
* @param userProperties - Optional: Additional key-value pairs of user properties to set on the user. Special keys: app_version, platform, os_name, os_version, device_brand, device_manufacturer
|
|
619
|
+
* @returns Amplitude Session id used to track the user. May be the same as passed in SO-AMPLITUDE header or ampSess cookie, or a fresh one if none defined.
|
|
620
|
+
*/
|
|
621
|
+
public async trackUserAsync(userProperties: carriers.StringDictionary, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
622
|
+
|
|
623
|
+
public async trackUserAsync(userProperties:carriers.StringDictionary|carriers.Diagnostics_TrackUserRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
|
|
624
|
+
let _request : carriers.Diagnostics_TrackUserRequest = null;
|
|
625
|
+
let _options : base.WebApiRequestOptions = null;
|
|
626
|
+
const first : any = userProperties;
|
|
627
|
+
if( typeof( first ) === "object" && first && ( typeof(first.userProperties)!='undefined' ) )
|
|
628
|
+
{
|
|
629
|
+
_request = userProperties as carriers.Diagnostics_TrackUserRequest;
|
|
630
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
631
|
+
}
|
|
632
|
+
else
|
|
633
|
+
{
|
|
634
|
+
_request = {
|
|
635
|
+
userProperties: userProperties as carriers.StringDictionary,
|
|
636
|
+
};
|
|
637
|
+
_options = webapi_options;
|
|
638
|
+
}
|
|
639
|
+
return this._trackUserAsync( _request, _options );
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
private async _collectDataAdditionsAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
644
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
645
|
+
base.WebApiBase.SetPending(options);
|
|
646
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
647
|
+
try {
|
|
648
|
+
config.baseURL = this._options.baseUrl;
|
|
649
|
+
const response = await this._axios.post("CollectDataAdditions", undefined , config);
|
|
650
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
651
|
+
const res = response.data;
|
|
652
|
+
resolve(res);
|
|
653
|
+
}
|
|
654
|
+
catch( err ) {
|
|
655
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
656
|
+
reject(err);
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Collect and transmit usage statistics: Database Additions. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
|
|
664
|
+
* @returns This method has no return value
|
|
665
|
+
*/
|
|
666
|
+
public async collectDataAdditionsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
667
|
+
{
|
|
668
|
+
return this._collectDataAdditionsAsync(webapi_options);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
private async _collectWinUsageAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
673
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
674
|
+
base.WebApiBase.SetPending(options);
|
|
675
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
676
|
+
try {
|
|
677
|
+
config.baseURL = this._options.baseUrl;
|
|
678
|
+
const response = await this._axios.post("CollectWinUsage", undefined , config);
|
|
679
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
680
|
+
const res = response.data;
|
|
681
|
+
resolve(res);
|
|
682
|
+
}
|
|
683
|
+
catch( err ) {
|
|
684
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
685
|
+
reject(err);
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Collect and transmit usage statistics: Windows CRM Client Usage. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
|
|
693
|
+
* @returns This method has no return value
|
|
694
|
+
*/
|
|
695
|
+
public async collectWinUsageAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
696
|
+
{
|
|
697
|
+
return this._collectWinUsageAsync(webapi_options);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
private async _collectWebUsageAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
702
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
703
|
+
base.WebApiBase.SetPending(options);
|
|
704
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
705
|
+
try {
|
|
706
|
+
config.baseURL = this._options.baseUrl;
|
|
707
|
+
const response = await this._axios.post("CollectWebUsage", undefined , config);
|
|
708
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
709
|
+
const res = 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
|
+
* Collect and transmit usage statistics: Web-based clients Usage. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
|
|
722
|
+
* @returns This method has no return value
|
|
723
|
+
*/
|
|
724
|
+
public async collectWebUsageAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
725
|
+
{
|
|
726
|
+
return this._collectWebUsageAsync(webapi_options);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
private async _collectTableSizesAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
731
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
732
|
+
base.WebApiBase.SetPending(options);
|
|
733
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
734
|
+
try {
|
|
735
|
+
config.baseURL = this._options.baseUrl;
|
|
736
|
+
const response = await this._axios.post("CollectTableSizes", undefined , config);
|
|
737
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
738
|
+
const res = response.data;
|
|
739
|
+
resolve(res);
|
|
740
|
+
}
|
|
741
|
+
catch( err ) {
|
|
742
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
743
|
+
reject(err);
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Collect and transmit usage statistics: Table Sizes. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
|
|
751
|
+
* @returns This method has no return value
|
|
752
|
+
*/
|
|
753
|
+
public async collectTableSizesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
754
|
+
{
|
|
755
|
+
return this._collectTableSizesAsync(webapi_options);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
private async _resyncUsersAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
760
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
761
|
+
base.WebApiBase.SetPending(options);
|
|
762
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
763
|
+
try {
|
|
764
|
+
config.baseURL = this._options.baseUrl;
|
|
765
|
+
const response = await this._axios.post("ResyncUsers", undefined , config);
|
|
766
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
767
|
+
const res = response.data;
|
|
768
|
+
resolve(res);
|
|
769
|
+
}
|
|
770
|
+
catch( err ) {
|
|
771
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
772
|
+
reject(err);
|
|
773
|
+
}
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Resynchronize user information with SuperOffice Community, if opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.
|
|
780
|
+
* @returns This method has no return value
|
|
781
|
+
*/
|
|
782
|
+
public async resyncUsersAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
783
|
+
{
|
|
784
|
+
return this._resyncUsersAsync(webapi_options);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
private async _sendSystemMessageAsync(request: carriers.Diagnostics_SendSystemMessageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
789
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
790
|
+
base.WebApiBase.SetPending(options);
|
|
791
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
792
|
+
try {
|
|
793
|
+
config.baseURL = this._options.baseUrl;
|
|
794
|
+
const response = await this._axios.post("SendSystemMessage", request , config);
|
|
795
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
796
|
+
const res = response.data;
|
|
797
|
+
resolve(res);
|
|
798
|
+
}
|
|
799
|
+
catch( err ) {
|
|
800
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
801
|
+
reject(err);
|
|
802
|
+
}
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Adds a system message for a specific associate.
|
|
810
|
+
* @param request - SystemMessageId, AssociateId, MarkdownMessage, Expire, Type
|
|
811
|
+
* @returns
|
|
812
|
+
*/
|
|
813
|
+
public async sendSystemMessageAsync(request: carriers.Diagnostics_SendSystemMessageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Adds a system message for a specific associate.
|
|
817
|
+
* @param systemMessageId - The message string id
|
|
818
|
+
* @param associateId - The associateId of the message target.
|
|
819
|
+
* @param markdownMessage - Markdown message to be displayed to the user
|
|
820
|
+
* @param expire - When the message will no longer be available
|
|
821
|
+
* @param type - Type of message, example: info, warning, error
|
|
822
|
+
* @returns
|
|
823
|
+
*/
|
|
824
|
+
public async sendSystemMessageAsync(systemMessageId: string, associateId: number, markdownMessage: string, expire: Date, type: enums.SystemMessageType, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
825
|
+
|
|
826
|
+
public async sendSystemMessageAsync(systemMessageId:string|carriers.Diagnostics_SendSystemMessageRequest, associateId?:number|base.WebApiRequestOptions, markdownMessage?:string, expire?:Date, type?:enums.SystemMessageType, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
827
|
+
let _request : carriers.Diagnostics_SendSystemMessageRequest = null;
|
|
828
|
+
let _options : base.WebApiRequestOptions = null;
|
|
829
|
+
const first : any = systemMessageId;
|
|
830
|
+
if( typeof( first ) === "object" && first && ( typeof(first.systemMessageId)!='undefined' || typeof(first.associateId)!='undefined' || typeof(first.markdownMessage)!='undefined' || typeof(first.expire)!='undefined' || typeof(first.type)!='undefined' ) )
|
|
831
|
+
{
|
|
832
|
+
_request = systemMessageId as carriers.Diagnostics_SendSystemMessageRequest;
|
|
833
|
+
_options = associateId as base.WebApiRequestOptions;
|
|
834
|
+
}
|
|
835
|
+
else
|
|
836
|
+
{
|
|
837
|
+
_request = {
|
|
838
|
+
systemMessageId: systemMessageId as string,
|
|
839
|
+
associateId: associateId as number,
|
|
840
|
+
markdownMessage: markdownMessage as string,
|
|
841
|
+
expire: expire as Date,
|
|
842
|
+
type: type as enums.SystemMessageType,
|
|
843
|
+
};
|
|
844
|
+
_options = webapi_options;
|
|
845
|
+
}
|
|
846
|
+
return this._sendSystemMessageAsync( _request, _options );
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
private async _removeSystemMessageAsync(request: carriers.Diagnostics_RemoveSystemMessageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
851
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
852
|
+
base.WebApiBase.SetPending(options);
|
|
853
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
854
|
+
try {
|
|
855
|
+
config.baseURL = this._options.baseUrl;
|
|
856
|
+
const response = await this._axios.post("RemoveSystemMessage", request , config);
|
|
857
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
858
|
+
const res = response.data;
|
|
859
|
+
resolve(res);
|
|
860
|
+
}
|
|
861
|
+
catch( err ) {
|
|
862
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
863
|
+
reject(err);
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Removes a system message for current associate
|
|
872
|
+
* @param request - OnlineappId, SystemMessageId
|
|
873
|
+
* @returns
|
|
874
|
+
*/
|
|
875
|
+
public async removeSystemMessageAsync(request: carriers.Diagnostics_RemoveSystemMessageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Removes a system message for current associate
|
|
879
|
+
* @param onlineappId - Id of the online app that owns this message
|
|
880
|
+
* @param systemMessageId - Message identifier, used for message removal
|
|
881
|
+
* @returns
|
|
882
|
+
*/
|
|
883
|
+
public async removeSystemMessageAsync(onlineappId: number, systemMessageId: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
884
|
+
|
|
885
|
+
public async removeSystemMessageAsync(onlineappId:number|carriers.Diagnostics_RemoveSystemMessageRequest, systemMessageId?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
886
|
+
let _request : carriers.Diagnostics_RemoveSystemMessageRequest = null;
|
|
887
|
+
let _options : base.WebApiRequestOptions = null;
|
|
888
|
+
const first : any = onlineappId;
|
|
889
|
+
if( typeof( first ) === "object" && first && ( typeof(first.onlineappId)!='undefined' || typeof(first.systemMessageId)!='undefined' ) )
|
|
890
|
+
{
|
|
891
|
+
_request = onlineappId as carriers.Diagnostics_RemoveSystemMessageRequest;
|
|
892
|
+
_options = systemMessageId as base.WebApiRequestOptions;
|
|
893
|
+
}
|
|
894
|
+
else
|
|
895
|
+
{
|
|
896
|
+
_request = {
|
|
897
|
+
onlineappId: onlineappId as number,
|
|
898
|
+
systemMessageId: systemMessageId as string,
|
|
899
|
+
};
|
|
900
|
+
_options = webapi_options;
|
|
901
|
+
}
|
|
902
|
+
return this._removeSystemMessageAsync( _request, _options );
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
private async _removeSystemMessageForAssociateAsync(request: carriers.Diagnostics_RemoveSystemMessageForAssociateRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
907
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
908
|
+
base.WebApiBase.SetPending(options);
|
|
909
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
910
|
+
try {
|
|
911
|
+
config.baseURL = this._options.baseUrl;
|
|
912
|
+
const response = await this._axios.post("RemoveSystemMessageForAssociate", request , config);
|
|
913
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
914
|
+
const res = response.data;
|
|
915
|
+
resolve(res);
|
|
916
|
+
}
|
|
917
|
+
catch( err ) {
|
|
918
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
919
|
+
reject(err);
|
|
920
|
+
}
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* Removes a system message for specific associate.
|
|
928
|
+
* @param request - OnlineappId, SystemMessageId, AssociateId
|
|
929
|
+
* @returns
|
|
930
|
+
*/
|
|
931
|
+
public async removeSystemMessageForAssociateAsync(request: carriers.Diagnostics_RemoveSystemMessageForAssociateRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Removes a system message for specific associate.
|
|
935
|
+
* @param onlineappId - Id of the online app that owns this message
|
|
936
|
+
* @param systemMessageId - Message identifier, used for message update or removal
|
|
937
|
+
* @param associateId - The associateId of the message target.
|
|
938
|
+
* @returns
|
|
939
|
+
*/
|
|
940
|
+
public async removeSystemMessageForAssociateAsync(onlineappId: number, systemMessageId: string, associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
941
|
+
|
|
942
|
+
public async removeSystemMessageForAssociateAsync(onlineappId:number|carriers.Diagnostics_RemoveSystemMessageForAssociateRequest, systemMessageId?:string|base.WebApiRequestOptions, associateId?:number, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
943
|
+
let _request : carriers.Diagnostics_RemoveSystemMessageForAssociateRequest = null;
|
|
944
|
+
let _options : base.WebApiRequestOptions = null;
|
|
945
|
+
const first : any = onlineappId;
|
|
946
|
+
if( typeof( first ) === "object" && first && ( typeof(first.onlineappId)!='undefined' || typeof(first.systemMessageId)!='undefined' || typeof(first.associateId)!='undefined' ) )
|
|
947
|
+
{
|
|
948
|
+
_request = onlineappId as carriers.Diagnostics_RemoveSystemMessageForAssociateRequest;
|
|
949
|
+
_options = systemMessageId as base.WebApiRequestOptions;
|
|
950
|
+
}
|
|
951
|
+
else
|
|
952
|
+
{
|
|
953
|
+
_request = {
|
|
954
|
+
onlineappId: onlineappId as number,
|
|
955
|
+
systemMessageId: systemMessageId as string,
|
|
956
|
+
associateId: associateId as number,
|
|
957
|
+
};
|
|
958
|
+
_options = webapi_options;
|
|
959
|
+
}
|
|
960
|
+
return this._removeSystemMessageForAssociateAsync( _request, _options );
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
private async _getSystemMessagesAsync(request: carriers.Diagnostics_GetSystemMessagesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] > {
|
|
965
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
966
|
+
base.WebApiBase.SetPending(options);
|
|
967
|
+
return new Promise< carriers.SystemMessage[] >(async (resolve, reject) => {
|
|
968
|
+
try {
|
|
969
|
+
config.baseURL = this._options.baseUrl;
|
|
970
|
+
const response = await this._axios.post("GetSystemMessages", request , config);
|
|
971
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
972
|
+
const res : carriers.SystemMessage[] = converters.Create_SystemMessageArray_From( response.data );
|
|
973
|
+
resolve(res);
|
|
974
|
+
}
|
|
975
|
+
catch( err ) {
|
|
976
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
977
|
+
reject(err);
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Retrieves a list of system messages for a specific associate.
|
|
986
|
+
* @param request - AssociateId
|
|
987
|
+
* @returns List of SystemMessages for desired associate
|
|
988
|
+
*/
|
|
989
|
+
public async getSystemMessagesAsync(request: carriers.Diagnostics_GetSystemMessagesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] >;
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* Retrieves a list of system messages for a specific associate.
|
|
993
|
+
* @param associateId - The associateId of the message target.
|
|
994
|
+
* @returns List of SystemMessages for desired associate
|
|
995
|
+
*/
|
|
996
|
+
public async getSystemMessagesAsync(associateId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] >;
|
|
997
|
+
|
|
998
|
+
public async getSystemMessagesAsync(associateId:number|carriers.Diagnostics_GetSystemMessagesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.SystemMessage[] > {
|
|
999
|
+
let _request : carriers.Diagnostics_GetSystemMessagesRequest = null;
|
|
1000
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1001
|
+
const first : any = associateId;
|
|
1002
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' ) )
|
|
1003
|
+
{
|
|
1004
|
+
_request = associateId as carriers.Diagnostics_GetSystemMessagesRequest;
|
|
1005
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1006
|
+
}
|
|
1007
|
+
else
|
|
1008
|
+
{
|
|
1009
|
+
_request = {
|
|
1010
|
+
associateId: associateId as number,
|
|
1011
|
+
};
|
|
1012
|
+
_options = webapi_options;
|
|
1013
|
+
}
|
|
1014
|
+
return this._getSystemMessagesAsync( _request, _options );
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
private async _removeExpiredSystemMessagesAsync( options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1019
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1020
|
+
base.WebApiBase.SetPending(options);
|
|
1021
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1022
|
+
try {
|
|
1023
|
+
config.baseURL = this._options.baseUrl;
|
|
1024
|
+
const response = await this._axios.post("RemoveExpiredSystemMessages", undefined , config);
|
|
1025
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1026
|
+
const res = response.data;
|
|
1027
|
+
resolve(res);
|
|
1028
|
+
}
|
|
1029
|
+
catch( err ) {
|
|
1030
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1031
|
+
reject(err);
|
|
1032
|
+
}
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* Deletes expired system messages.
|
|
1039
|
+
* @returns
|
|
1040
|
+
*/
|
|
1041
|
+
public async removeExpiredSystemMessagesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< void >
|
|
1042
|
+
{
|
|
1043
|
+
return this._removeExpiredSystemMessagesAsync(webapi_options);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
private async _getNextTableNumberAsync( options?:base.WebApiRequestOptions) : Promise< number > {
|
|
1048
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1049
|
+
base.WebApiBase.SetPending(options);
|
|
1050
|
+
return new Promise< number >(async (resolve, reject) => {
|
|
1051
|
+
try {
|
|
1052
|
+
config.baseURL = this._options.baseUrl;
|
|
1053
|
+
const response = await this._axios.post("GetNextTableNumber", undefined , config);
|
|
1054
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1055
|
+
const res : number = response.data as number;
|
|
1056
|
+
resolve(res);
|
|
1057
|
+
}
|
|
1058
|
+
catch( err ) {
|
|
1059
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1060
|
+
reject(err);
|
|
1061
|
+
}
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* Increment save and return NextTableNumber, to be used when creating new extra table
|
|
1068
|
+
* @returns NextTableNumber of DatabaseModel
|
|
1069
|
+
*/
|
|
1070
|
+
public async getNextTableNumberAsync(webapi_options?:base.WebApiRequestOptions) : Promise< number >
|
|
1071
|
+
{
|
|
1072
|
+
return this._getNextTableNumberAsync(webapi_options);
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
private async _performTasksAfterUpgradeAsync( options?:base.WebApiRequestOptions) : Promise< string > {
|
|
1077
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1078
|
+
base.WebApiBase.SetPending(options);
|
|
1079
|
+
return new Promise< string >(async (resolve, reject) => {
|
|
1080
|
+
try {
|
|
1081
|
+
config.baseURL = this._options.baseUrl;
|
|
1082
|
+
const response = await this._axios.post("PerformTasksAfterUpgrade", undefined , config);
|
|
1083
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1084
|
+
const res : string = response.data as string;
|
|
1085
|
+
resolve(res);
|
|
1086
|
+
}
|
|
1087
|
+
catch( err ) {
|
|
1088
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1089
|
+
reject(err);
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* After upgrading to a new fileset, there may be tasks that need to be done. Examples - import new TypicalSearches, if present. Tasks performed here need to be idempotent and independent of the actual upgrade jump (what was the previous version). They should complete in a reasonable time, not more than a few minutes maximum.
|
|
1097
|
+
* @returns Message that can be shown to the user, summarizing what has been done, if anything.
|
|
1098
|
+
*/
|
|
1099
|
+
public async performTasksAfterUpgradeAsync(webapi_options?:base.WebApiRequestOptions) : Promise< string >
|
|
1100
|
+
{
|
|
1101
|
+
return this._performTasksAfterUpgradeAsync(webapi_options);
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
private async _performTasksAfterCustomObjectTableCreatedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableCreatedRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1106
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1107
|
+
base.WebApiBase.SetPending(options);
|
|
1108
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1109
|
+
try {
|
|
1110
|
+
config.baseURL = this._options.baseUrl;
|
|
1111
|
+
const response = await this._axios.post("PerformTasksAfterCustomObjectTableCreated", request , config);
|
|
1112
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1113
|
+
const res = response.data;
|
|
1114
|
+
resolve(res);
|
|
1115
|
+
}
|
|
1116
|
+
catch( err ) {
|
|
1117
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1118
|
+
reject(err);
|
|
1119
|
+
}
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* A temporary method to be used from c++ until CustomObjectsAgent.CreateTable implemented in NetServer
|
|
1127
|
+
* @param request - TableName
|
|
1128
|
+
* @returns This method has no return value
|
|
1129
|
+
*/
|
|
1130
|
+
public async performTasksAfterCustomObjectTableCreatedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableCreatedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* A temporary method to be used from c++ until CustomObjectsAgent.CreateTable implemented in NetServer
|
|
1134
|
+
* @param tableName - Name of DB table of the custom object that was created. E.g., 'y_car'
|
|
1135
|
+
* @returns This method has no return value
|
|
1136
|
+
*/
|
|
1137
|
+
public async performTasksAfterCustomObjectTableCreatedAsync(tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1138
|
+
|
|
1139
|
+
public async performTasksAfterCustomObjectTableCreatedAsync(tableName:string|carriers.Diagnostics_PerformTasksAfterCustomObjectTableCreatedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1140
|
+
let _request : carriers.Diagnostics_PerformTasksAfterCustomObjectTableCreatedRequest = null;
|
|
1141
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1142
|
+
const first : any = tableName;
|
|
1143
|
+
if( typeof( first ) === "object" && first && ( typeof(first.tableName)!='undefined' ) )
|
|
1144
|
+
{
|
|
1145
|
+
_request = tableName as carriers.Diagnostics_PerformTasksAfterCustomObjectTableCreatedRequest;
|
|
1146
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1147
|
+
}
|
|
1148
|
+
else
|
|
1149
|
+
{
|
|
1150
|
+
_request = {
|
|
1151
|
+
tableName: tableName as string,
|
|
1152
|
+
};
|
|
1153
|
+
_options = webapi_options;
|
|
1154
|
+
}
|
|
1155
|
+
return this._performTasksAfterCustomObjectTableCreatedAsync( _request, _options );
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
private async _performTasksAfterCustomObjectTableDeletedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1160
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1161
|
+
base.WebApiBase.SetPending(options);
|
|
1162
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1163
|
+
try {
|
|
1164
|
+
config.baseURL = this._options.baseUrl;
|
|
1165
|
+
const response = await this._axios.post("PerformTasksAfterCustomObjectTableDeleted", request , config);
|
|
1166
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1167
|
+
const res = response.data;
|
|
1168
|
+
resolve(res);
|
|
1169
|
+
}
|
|
1170
|
+
catch( err ) {
|
|
1171
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1172
|
+
reject(err);
|
|
1173
|
+
}
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* A temporary method to be used from c++ until CustomObjectsAgent.DeleteTable implemented in NetServer
|
|
1181
|
+
* @param request - TableName
|
|
1182
|
+
* @returns This method has no return value
|
|
1183
|
+
*/
|
|
1184
|
+
public async performTasksAfterCustomObjectTableDeletedAsync(request: carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* A temporary method to be used from c++ until CustomObjectsAgent.DeleteTable implemented in NetServer
|
|
1188
|
+
* @param tableName - Name of DB table of the custom object that was deleted. E.g., 'y_car'
|
|
1189
|
+
* @returns This method has no return value
|
|
1190
|
+
*/
|
|
1191
|
+
public async performTasksAfterCustomObjectTableDeletedAsync(tableName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1192
|
+
|
|
1193
|
+
public async performTasksAfterCustomObjectTableDeletedAsync(tableName:string|carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1194
|
+
let _request : carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest = null;
|
|
1195
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1196
|
+
const first : any = tableName;
|
|
1197
|
+
if( typeof( first ) === "object" && first && ( typeof(first.tableName)!='undefined' ) )
|
|
1198
|
+
{
|
|
1199
|
+
_request = tableName as carriers.Diagnostics_PerformTasksAfterCustomObjectTableDeletedRequest;
|
|
1200
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1201
|
+
}
|
|
1202
|
+
else
|
|
1203
|
+
{
|
|
1204
|
+
_request = {
|
|
1205
|
+
tableName: tableName as string,
|
|
1206
|
+
};
|
|
1207
|
+
_options = webapi_options;
|
|
1208
|
+
}
|
|
1209
|
+
return this._performTasksAfterCustomObjectTableDeletedAsync( _request, _options );
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
private async _addWebAppUsageAsync(request: carriers.Diagnostics_AddWebAppUsageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1214
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1215
|
+
base.WebApiBase.SetPending(options);
|
|
1216
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1217
|
+
try {
|
|
1218
|
+
config.baseURL = this._options.baseUrl;
|
|
1219
|
+
const response = await this._axios.post("AddWebAppUsage", request , config);
|
|
1220
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1221
|
+
const res = response.data;
|
|
1222
|
+
resolve(res);
|
|
1223
|
+
}
|
|
1224
|
+
catch( err ) {
|
|
1225
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1226
|
+
reject(err);
|
|
1227
|
+
}
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* Adds WebApp usage to existing log
|
|
1235
|
+
* @param request - WebAppUsages
|
|
1236
|
+
* @returns
|
|
1237
|
+
*/
|
|
1238
|
+
public async addWebAppUsageAsync(request: carriers.Diagnostics_AddWebAppUsageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Adds WebApp usage to existing log
|
|
1242
|
+
* @param webAppUsages - Web app usage.
|
|
1243
|
+
* @returns
|
|
1244
|
+
*/
|
|
1245
|
+
public async addWebAppUsageAsync(webAppUsages: carriers.WebAppUsage[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1246
|
+
|
|
1247
|
+
public async addWebAppUsageAsync(webAppUsages:carriers.WebAppUsage[]|carriers.Diagnostics_AddWebAppUsageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1248
|
+
let _request : carriers.Diagnostics_AddWebAppUsageRequest = null;
|
|
1249
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1250
|
+
const first : any = webAppUsages;
|
|
1251
|
+
if( typeof( first ) === "object" && first && ( typeof(first.webAppUsages)!='undefined' ) )
|
|
1252
|
+
{
|
|
1253
|
+
_request = webAppUsages as carriers.Diagnostics_AddWebAppUsageRequest;
|
|
1254
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1255
|
+
}
|
|
1256
|
+
else
|
|
1257
|
+
{
|
|
1258
|
+
_request = {
|
|
1259
|
+
webAppUsages: webAppUsages as carriers.WebAppUsage[],
|
|
1260
|
+
};
|
|
1261
|
+
_options = webapi_options;
|
|
1262
|
+
}
|
|
1263
|
+
return this._addWebAppUsageAsync( _request, _options );
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
private async _webAppUsageExistsInPeriodAsync(request: carriers.Diagnostics_WebAppUsageExistsInPeriodRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1268
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1269
|
+
base.WebApiBase.SetPending(options);
|
|
1270
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
1271
|
+
try {
|
|
1272
|
+
config.baseURL = this._options.baseUrl;
|
|
1273
|
+
const response = await this._axios.post("WebAppUsageExistsInPeriod", request , config);
|
|
1274
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1275
|
+
const res : boolean = response.data as boolean;
|
|
1276
|
+
resolve(res);
|
|
1277
|
+
}
|
|
1278
|
+
catch( err ) {
|
|
1279
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1280
|
+
reject(err);
|
|
1281
|
+
}
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* Returns true if viewState has been clicked at least once since FromDate, if asscoiateId < 0 or FromDate is DateTime.MinValue no restriction given for those parameters
|
|
1289
|
+
* @param request - AssociateId, ViewState, FromDate
|
|
1290
|
+
* @returns Returns true if viewState has been clicked at least once since FromDate
|
|
1291
|
+
*/
|
|
1292
|
+
public async webAppUsageExistsInPeriodAsync(request: carriers.Diagnostics_WebAppUsageExistsInPeriodRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* Returns true if viewState has been clicked at least once since FromDate, if asscoiateId < 0 or FromDate is DateTime.MinValue no restriction given for those parameters
|
|
1296
|
+
* @param associateId - The asscoiate id to look for webapp usage
|
|
1297
|
+
* @param viewState - The viewState to search for
|
|
1298
|
+
* @param fromDate - The datetime to restrict webapp usage on
|
|
1299
|
+
* @returns Returns true if viewState has been clicked at least once since FromDate
|
|
1300
|
+
*/
|
|
1301
|
+
public async webAppUsageExistsInPeriodAsync(associateId: number, viewState: string, fromDate: Date, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1302
|
+
|
|
1303
|
+
public async webAppUsageExistsInPeriodAsync(associateId:number|carriers.Diagnostics_WebAppUsageExistsInPeriodRequest, viewState?:string|base.WebApiRequestOptions, fromDate?:Date, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1304
|
+
let _request : carriers.Diagnostics_WebAppUsageExistsInPeriodRequest = null;
|
|
1305
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1306
|
+
const first : any = associateId;
|
|
1307
|
+
if( typeof( first ) === "object" && first && ( typeof(first.associateId)!='undefined' || typeof(first.viewState)!='undefined' || typeof(first.fromDate)!='undefined' ) )
|
|
1308
|
+
{
|
|
1309
|
+
_request = associateId as carriers.Diagnostics_WebAppUsageExistsInPeriodRequest;
|
|
1310
|
+
_options = viewState as base.WebApiRequestOptions;
|
|
1311
|
+
}
|
|
1312
|
+
else
|
|
1313
|
+
{
|
|
1314
|
+
_request = {
|
|
1315
|
+
associateId: associateId as number,
|
|
1316
|
+
viewState: viewState as string,
|
|
1317
|
+
fromDate: fromDate as Date,
|
|
1318
|
+
};
|
|
1319
|
+
_options = webapi_options;
|
|
1320
|
+
}
|
|
1321
|
+
return this._webAppUsageExistsInPeriodAsync( _request, _options );
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
private async _getWebAppUsagesForPeriodAsync(request: carriers.Diagnostics_GetWebAppUsagesForPeriodRequest, options?:base.WebApiRequestOptions) : Promise< carriers.WebAppUsage[] > {
|
|
1326
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1327
|
+
base.WebApiBase.SetPending(options);
|
|
1328
|
+
return new Promise< carriers.WebAppUsage[] >(async (resolve, reject) => {
|
|
1329
|
+
try {
|
|
1330
|
+
config.baseURL = this._options.baseUrl;
|
|
1331
|
+
const response = await this._axios.post("GetWebAppUsagesForPeriod", request , config);
|
|
1332
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1333
|
+
const res : carriers.WebAppUsage[] = converters.Create_WebAppUsageArray_From( response.data );
|
|
1334
|
+
resolve(res);
|
|
1335
|
+
}
|
|
1336
|
+
catch( err ) {
|
|
1337
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1338
|
+
reject(err);
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Get all WebAppUsages for a given period, that match an optional search term
|
|
1347
|
+
* @param request - FromDate, ToDate, SearchTerm
|
|
1348
|
+
* @returns
|
|
1349
|
+
*/
|
|
1350
|
+
public async getWebAppUsagesForPeriodAsync(request: carriers.Diagnostics_GetWebAppUsagesForPeriodRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WebAppUsage[] >;
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Get all WebAppUsages for a given period, that match an optional search term
|
|
1354
|
+
* @param fromDate -
|
|
1355
|
+
* @param toDate -
|
|
1356
|
+
* @param searchTerm - ViewState search term. '%' is the wildcard character, for example 'Pocket%' will match all viewstates starting with 'Pocket'. If empty, all viewstates will be matched
|
|
1357
|
+
* @returns
|
|
1358
|
+
*/
|
|
1359
|
+
public async getWebAppUsagesForPeriodAsync(fromDate: Date, toDate: Date, searchTerm: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WebAppUsage[] >;
|
|
1360
|
+
|
|
1361
|
+
public async getWebAppUsagesForPeriodAsync(fromDate:Date|carriers.Diagnostics_GetWebAppUsagesForPeriodRequest, toDate?:Date|base.WebApiRequestOptions, searchTerm?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.WebAppUsage[] > {
|
|
1362
|
+
let _request : carriers.Diagnostics_GetWebAppUsagesForPeriodRequest = null;
|
|
1363
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1364
|
+
const first : any = fromDate;
|
|
1365
|
+
if( typeof( first ) === "object" && first && ( typeof(first.fromDate)!='undefined' || typeof(first.toDate)!='undefined' || typeof(first.searchTerm)!='undefined' ) )
|
|
1366
|
+
{
|
|
1367
|
+
_request = fromDate as carriers.Diagnostics_GetWebAppUsagesForPeriodRequest;
|
|
1368
|
+
_options = toDate as base.WebApiRequestOptions;
|
|
1369
|
+
}
|
|
1370
|
+
else
|
|
1371
|
+
{
|
|
1372
|
+
_request = {
|
|
1373
|
+
fromDate: fromDate as Date,
|
|
1374
|
+
toDate: toDate as Date,
|
|
1375
|
+
searchTerm: searchTerm as string,
|
|
1376
|
+
};
|
|
1377
|
+
_options = webapi_options;
|
|
1378
|
+
}
|
|
1379
|
+
return this._getWebAppUsagesForPeriodAsync( _request, _options );
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
} // class v1DiagnosticsAgentController
|
|
1383
|
+
|
|
1384
|
+
|