@trakit/sync 0.0.5 → 0.0.6

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.
@@ -0,0 +1,1316 @@
1
+ import { Payload, RepAssetAdvancedGet, RepAssetAdvancedListByCompany, RepAssetBatchMerge, RepAssetDelete, RepAssetDispatchMerge, RepAssetGeneralGet, RepAssetGeneralListByCompany, RepAssetGet, RepAssetListByCompany, RepAssetMerge, RepAssetMessageBatchMerge, RepAssetMessageDelete, RepAssetMessageGet, RepAssetMessageListByAsset, RepAssetMessageListByCompany, RepAssetMessageMerge, RepAssetSuspend, RepBehaviourBatchMerge, RepBehaviourDelete, RepBehaviourGet, RepBehaviourListByCompany, RepBehaviourLogBatchDeleteByAsset, RepBehaviourLogBatchDeleteByBehaviour, RepBehaviourLogBatchDeleteByScript, RepBehaviourLogListByAsset, RepBehaviourLogListByBehaviour, RepBehaviourLogListByScript, RepBehaviourMerge, RepBehaviourScriptDelete, RepBehaviourScriptGet, RepBehaviourScriptListByCompany, RepBehaviourScriptMerge, RepCompanyDelete, RepCompanyDirectoryGet, RepCompanyDirectoryListByCompany, RepCompanyGeneralGet, RepCompanyGeneralListByCompany, RepCompanyGet, RepCompanyMerge, RepCompanyPolicyGet, RepCompanyPolicyListByCompany, RepCompanyResellerDelete, RepCompanyResellerGet, RepCompanyResellerMerge, RepCompanyStyleGet, RepCompanyStyleListByCompany, RepContactBatchDelete, RepContactBatchMerge, RepContactDelete, RepContactGet, RepContactListByCompany, RepContactMerge, RepDashcamGet, RepDashcamListByCompany, RepDashcamLiveListByCompany, RepDispatchJobBatchMerge, RepDispatchJobDelete, RepDispatchJobGet, RepDispatchJobListByAsset, RepDispatchJobListByCompany, RepDispatchJobMerge, RepDispatchTaskBatchMerge, RepDispatchTaskDelete, RepDispatchTaskGet, RepDispatchTaskListByAsset, RepDispatchTaskListByCompany, RepDispatchTaskMerge, RepDocumentDelete, RepDocumentGet, RepDocumentListByCompany, RepDocumentMerge, RepFormResultBatchMerge, RepFormResultDelete, RepFormResultGet, RepFormResultListByCompany, RepFormResultMerge, RepFormTemplateDelete, RepFormTemplateGet, RepFormTemplateListByCompany, RepFormTemplateMerge, RepIconDelete, RepIconGet, RepIconListByCompany, RepIconMerge, Reply, RepMachineDelete, RepMachineGet, RepMachineListByCompany, RepMachineMerge, RepMaintenanceJobDelete, RepMaintenanceJobGet, RepMaintenanceJobListByCompany, RepMaintenanceJobMerge, RepMaintenanceScheduleDelete, RepMaintenanceScheduleGet, RepMaintenanceScheduleListByCompany, RepMaintenanceScheduleMerge, RepPictureDelete, RepPictureGet, RepPictureListByCompany, RepPictureMerge, RepPlaceDelete, RepPlaceGet, RepPlaceListByCompany, RepPlaceMerge, RepProviderAdvancedGet, RepProviderAdvancedListByCompany, RepProviderBatchDelete, RepProviderBatchMerge, RepProviderConfigBatchMerge, RepProviderConfigDelete, RepProviderConfigGet, RepProviderConfigListByCompany, RepProviderConfigMerge, RepProviderConfigurationBatchMerge, RepProviderConfigurationDelete, RepProviderConfigurationGet, RepProviderConfigurationListByCompany, RepProviderConfigurationMerge, RepProviderControlGet, RepProviderControlListByCompany, RepProviderDelete, RepProviderGeneralGet, RepProviderGeneralListByCompany, RepProviderGet, RepProviderListByCompany, RepProviderMerge, RepProviderRegistrationDelete, RepProviderRegistrationGet, RepProviderRegistrationListByCompany, RepProviderRegistrationMerge, RepProviderScriptDelete, RepProviderScriptGet, RepProviderScriptListByCompany, RepProviderScriptMerge, RepReportResultDelete, RepReportResultGet, RepReportResultListByCompany, RepReportResultMerge, RepReportScheduleDelete, RepReportScheduleGet, RepReportScheduleListByCompany, RepReportScheduleMerge, RepReportTemplateDelete, RepReportTemplateGet, RepReportTemplateListByCompany, RepReportTemplateMerge, RepSelfContact, RepSelfGet, RepSelfLogout, RepSelfPassword, RepSelfPreferences, RepSessionDelete, RepSessionListByCompany, RepSessionListByUser, RepUserAdvancedGet, RepUserAdvancedListByCompany, RepUserDelete, RepUserGeneralGet, RepUserGeneralListByCompany, RepUserGet, RepUserGroupDelete, RepUserGroupGet, RepUserGroupListByCompany, RepUserGroupMerge, RepUserListByCompany, RepUserMerge } from '@trakit/commands';
2
+ import { codified, email, expression, guid, int, IRequestable, JsonObject, nothing, SyncName, SystemsOfUnits, Timezone, ulong, url, UserNotifications } from '@trakit/objects';
3
+ import { TrakitBaseCommander } from './TrakitBaseCommander';
4
+ /**
5
+ * Base class to retrieve, modify, and delete Trak-iT objects via the APIs.
6
+ */
7
+ export declare abstract class TrakitObjectCommander<TRequest> extends TrakitBaseCommander<TRequest> {
8
+ /**
9
+ * Gets invoked any time the connection's account information is updated while the connection is open.
10
+ */
11
+ onAccount?: ((this: TrakitObjectCommander<TRequest>, account: RepSelfGet) => any) | nothing;
12
+ /**
13
+ * Gets invoked any time all the objects for a given kind in the given company are updated.
14
+ */
15
+ onList?: ((this: TrakitObjectCommander<TRequest>, kind: SyncName, companyId: ulong, objects: IRequestable[]) => any) | nothing;
16
+ /**
17
+ * Gets invoked any time an object for a given kind in the given company is created or updated.
18
+ */
19
+ onUpdate?: ((this: TrakitObjectCommander<TRequest>, kind: SyncName, companyId: ulong, object: IRequestable) => any) | nothing;
20
+ /**
21
+ * Gets invoked any time an object for a given kind in the given company is deleted.
22
+ */
23
+ onDelete?: ((this: TrakitObjectCommander<TRequest>, kind: SyncName, companyId: ulong, key: ulong | guid | email | codified | string) => any) | nothing;
24
+ /**
25
+ * Overridden to handle storage and events.
26
+ * @inheritdoc
27
+ */
28
+ command<TReply extends Reply>(payload: Payload): Promise<TReply>;
29
+ /**
30
+ * Requests the details of the {@link User} or {@link Machine} currently identified.
31
+ * @returns The account details or null.
32
+ */
33
+ selfDetails(): Promise<RepSelfGet>;
34
+ /**
35
+ * Sends a login command, and if successful, saves the {@link RepSelfGet.ghostId|session id} for all further requests.
36
+ * @param username Your email address.
37
+ * @param password Your password.
38
+ * @param userAgent Optional string to identify the client software.
39
+ * @returns The response, which contains a SelfUser when successful.
40
+ */
41
+ login(username: string, password: string, userAgent?: string | nothing): Promise<RepSelfGet | null>;
42
+ /**
43
+ * Sends a logout command and removes the current {@link RepSelfGet|session information} whether successful or not.
44
+ * @returns The logout response.
45
+ */
46
+ logout(): Promise<RepSelfLogout>;
47
+ /**
48
+ * Allows a {@link User} to update their own {@link Contact}.
49
+ * If your {@link User} has no associated {@link Contact}, you will receive a {@link ErrorCode.contactNotFound} error.
50
+ * @param name Name for yourself.
51
+ * @param notes Notes for yourself.
52
+ * @param otherNames A collection of other names this person might go by.
53
+ * @param emails A collection of email addresses for yourself.
54
+ * @param phones A collection of phone numbers for yourself.
55
+ * @param addresses A collection of addresses for yourself.
56
+ * @param urls A collection of URLs for yourself.
57
+ * @param dates A collection of dates for yourself.
58
+ * @param options Saved JSON data used by client applications.
59
+ * @param roles A list of roles you play in your {@link Company}.
60
+ * @param pictures A list of {@link Picture.id}s to associate with your {@link Contact}.
61
+ * @returns The reply from the update contact command.
62
+ */
63
+ updateContact(name?: string, notes?: string, otherNames?: Map<string, string | null>, emails?: Map<string, string | null>, phones?: Map<string, ulong | null>, addresses?: Map<string, string | null>, urls?: Map<string, url | null>, dates?: Map<string, Date | null>, options?: Map<string, string | null>, roles?: string[], pictures?: ulong[]): Promise<RepSelfContact>;
64
+ /**
65
+ * Allows a session {@link User} to change their own password.
66
+ * @param oldPassword Your current password, as verification that you are the account owner.
67
+ * @param newPassword Your new password must conform to your company's PasswordPolicy.
68
+ * @returns The password change response.
69
+ */
70
+ updatePassword(oldPassword: string, newPassword: string): Promise<RepSelfPassword>;
71
+ /**
72
+ * Allows a {@link User} to change their own preferences.
73
+ * @param language Your language code, e.g., "en-US".
74
+ * @param timezone Your {@link Timezone.code}.
75
+ * @param notify Notification preferences.
76
+ * @param formats Format templates for dates, times, etc...
77
+ * @param measurements Measurement system preferences.
78
+ * @param options Saved JSON data used by client applications.
79
+ * @returns The reply from the update preferences command.
80
+ */
81
+ updatePreferences(language?: codified, timezone?: Timezone | string, notify?: UserNotifications[] | JsonObject[], formats?: Map<string, string> | JsonObject, measurements?: Map<string, SystemsOfUnits> | JsonObject, options?: Map<string, string> | JsonObject): Promise<RepSelfPreferences>;
82
+ /**
83
+ * Retrieves a given {@link Company} from the server by its {@link Company.id}.
84
+ * @param id
85
+ * @returns
86
+ */
87
+ getCompany(id: ulong): Promise<RepCompanyGet>;
88
+ /**
89
+ * Creates a new, or updates an existing {@link Company}.
90
+ * @param json
91
+ * @returns
92
+ */
93
+ mergeCompany(json: JsonObject): Promise<RepCompanyMerge>;
94
+ /**
95
+ * Deletes a {@link Company}.
96
+ * @param id
97
+ * @returns
98
+ */
99
+ removeCompany(id: ulong): Promise<RepCompanyDelete>;
100
+ /**
101
+ * Restores a deleted {@link Company}.
102
+ * @param id
103
+ * @returns
104
+ */
105
+ restoreCompany(id: ulong): Promise<RepCompanyDelete>;
106
+ /**
107
+ * Retrieves a list of all {@link CompanyGeneral}s in the tree for the given company.
108
+ * @param id
109
+ * @param constraints
110
+ * @returns
111
+ */
112
+ listCompanyGenerals(id: ulong, constraints?: JsonObject): Promise<RepCompanyGeneralListByCompany>;
113
+ /**
114
+ * Retrieves a given {@link CompanyGeneral} from the server by its {@link Company.id}.
115
+ * @param id
116
+ * @returns
117
+ */
118
+ getCompanyGeneral(id: ulong): Promise<RepCompanyGeneralGet>;
119
+ /**
120
+ * Retrieves a list of all {@link CompanyPolicy}s in the tree for the given company.
121
+ * @param id
122
+ * @param constraints
123
+ * @returns
124
+ */
125
+ listCompanyPolicies(id: ulong, constraints?: JsonObject): Promise<RepCompanyPolicyListByCompany>;
126
+ /**
127
+ * Retrieves a given {@link CompanyPolicy} from the server by its {@link Company.id}.
128
+ * @param id
129
+ * @returns
130
+ */
131
+ getCompanyPolicy(id: ulong): Promise<RepCompanyPolicyGet>;
132
+ /**
133
+ * Retrieves a list of all {@link CompanyStyle}s in the tree for the given company.
134
+ * @param id
135
+ * @param constraints
136
+ * @returns
137
+ */
138
+ listCompanyStyles(id: ulong, constraints?: JsonObject): Promise<RepCompanyStyleListByCompany>;
139
+ /**
140
+ * Retrieves a given {@link CompanyStyle} from the server by its {@link Company.id}.
141
+ * @param id
142
+ * @returns
143
+ */
144
+ getCompanyStyle(id: ulong): Promise<RepCompanyStyleGet>;
145
+ /**
146
+ * Retrieves a list of all {@link CompanyDirectory}s in the tree for the given company.
147
+ * @param id
148
+ * @param constraints
149
+ * @returns
150
+ */
151
+ listCompanyDirectories(id: ulong, constraints?: JsonObject): Promise<RepCompanyDirectoryListByCompany>;
152
+ /**
153
+ * Retrieves a given {@link CompanyDirectory} from the server by its {@link Company.id}.
154
+ * @param id
155
+ * @returns
156
+ */
157
+ getCompanyDirectory(id: ulong): Promise<RepCompanyDirectoryGet>;
158
+ /**
159
+ * Retrieves a given {@link CompanyReseller} from the server by its {@link CompanyReseller.id}.
160
+ * @param id
161
+ * @returns
162
+ */
163
+ getReseller(id: ulong): Promise<RepCompanyResellerGet>;
164
+ /**
165
+ * Creates a new, or updates an existing {@link CompanyReseller}.
166
+ * @param json
167
+ * @returns
168
+ */
169
+ mergeReseller(json: JsonObject): Promise<RepCompanyResellerMerge>;
170
+ /**
171
+ * Deletes a {@link CompanyReseller}.
172
+ * @param id
173
+ * @returns
174
+ */
175
+ removeReseller(id: ulong): Promise<RepCompanyResellerDelete>;
176
+ /**
177
+ * Restores a deleted {@link CompanyReseller}.
178
+ * @param id
179
+ * @returns
180
+ */
181
+ restoreReseller(id: ulong): Promise<RepCompanyResellerDelete>;
182
+ /**
183
+ * Retrieves a list of all {@link Contact}s in the given company.
184
+ * @param companyId
185
+ * @param constraints
186
+ * @returns
187
+ */
188
+ listContacts(companyId: ulong, constraints?: JsonObject): Promise<RepContactListByCompany>;
189
+ /**
190
+ * Retrieves a given contact from the server by its {@link Contact.id}.
191
+ * @param id
192
+ * @returns
193
+ */
194
+ getContact(id: ulong): Promise<RepContactGet>;
195
+ /**
196
+ * Creates a new, or updates an existing {@link Contact}.
197
+ * @param json
198
+ * @returns
199
+ */
200
+ mergeContact(json: JsonObject): Promise<RepContactMerge>;
201
+ /**
202
+ * Deletes a {@link Contact}.
203
+ * @param id
204
+ * @returns
205
+ */
206
+ removeContact(id: ulong): Promise<RepContactDelete>;
207
+ /**
208
+ * Restores a deleted {@link Contact}.
209
+ * @param id
210
+ * @returns
211
+ */
212
+ restoreContact(id: ulong): Promise<RepContactDelete>;
213
+ /**
214
+ * Merges a batch of {@link Contact}s.
215
+ * @param array
216
+ * @returns
217
+ */
218
+ multiMergeContact(array: JsonObject[]): Promise<RepContactBatchMerge>;
219
+ /**
220
+ * Merges a batch of {@link Contact}s.
221
+ * @param array
222
+ * @returns
223
+ */
224
+ multiRemoveContact(ids: ulong[]): Promise<RepContactBatchDelete>;
225
+ /**
226
+ * Retrieves a list of all {@link User}s in the given company.
227
+ * @param companyId
228
+ * @param constraints
229
+ * @returns
230
+ */
231
+ listUsers(companyId: ulong, constraints?: JsonObject): Promise<RepUserListByCompany>;
232
+ /**
233
+ * Retrieves a given user from the server by its {@link User.id}.
234
+ * @param login
235
+ * @returns
236
+ */
237
+ getUser(login: email): Promise<RepUserGet>;
238
+ /**
239
+ * Creates a new, or updates an existing {@link User}.
240
+ * @param json
241
+ * @returns
242
+ */
243
+ mergeUser(json: JsonObject): Promise<RepUserMerge>;
244
+ /**
245
+ * Deletes an {@link User}.
246
+ * @param login
247
+ * @returns
248
+ */
249
+ removeUser(login: email): Promise<RepUserDelete>;
250
+ /**
251
+ * Restores a deleted {@link User}.
252
+ * @param login
253
+ * @returns
254
+ */
255
+ restoreUser(login: email): Promise<RepUserDelete>;
256
+ /**
257
+ * Retrieves a list of all {@link UserGeneral}s in the given company.
258
+ * @param companyId
259
+ * @param constraints
260
+ * @returns
261
+ */
262
+ listUserGenerals(companyId: ulong, constraints?: JsonObject): Promise<RepUserGeneralListByCompany>;
263
+ /**
264
+ * Retrieves a given {@link UserGeneral} from the server by its {@link User.id}.
265
+ * @param login
266
+ * @returns
267
+ */
268
+ getUserGeneral(login: email): Promise<RepUserGeneralGet>;
269
+ /**
270
+ * Retrieves a list of all {@link UserAdvanced}s in the given company.
271
+ * @param companyId
272
+ * @param constraints
273
+ * @returns
274
+ */
275
+ listUserAdvanceds(companyId: ulong, constraints?: JsonObject): Promise<RepUserAdvancedListByCompany>;
276
+ /**
277
+ * Retrieves a given {@link UserAdvanced} from the server by its {@link User.id}.
278
+ * @param login
279
+ * @returns
280
+ */
281
+ getUserAdvanced(login: email): Promise<RepUserAdvancedGet>;
282
+ /**
283
+ * Retrieves a list of all {@link UserGroup}s in the given company.
284
+ * @param companyId
285
+ * @param constraints
286
+ * @returns
287
+ */
288
+ listUserGroups(companyId: ulong, constraints?: JsonObject): Promise<RepUserGroupListByCompany>;
289
+ /**
290
+ * Retrieves a given {@link UserGroup} from the server by its {@link UserGroup.id}.
291
+ * @param id
292
+ * @returns
293
+ */
294
+ getUserGroup(id: ulong): Promise<RepUserGroupGet>;
295
+ /**
296
+ * Creates a new, or updates an existing {@link UserGroup}.
297
+ * @param json
298
+ * @returns
299
+ */
300
+ mergeUserGroup(json: JsonObject): Promise<RepUserGroupMerge>;
301
+ /**
302
+ * Deletes a {@link UserGroup}.
303
+ * @param id
304
+ * @returns
305
+ */
306
+ removeUserGroup(id: ulong): Promise<RepUserGroupDelete>;
307
+ /**
308
+ * Restores a deleted {@link UserGroup}.
309
+ * @param id
310
+ * @returns
311
+ */
312
+ restoreUserGroup(id: ulong): Promise<RepUserGroupDelete>;
313
+ /**
314
+ * Retrieves a list of all {@link Machine}s in the given company.
315
+ * @param companyId
316
+ * @param constraints
317
+ * @returns
318
+ */
319
+ listMachines(companyId: ulong, constraints?: JsonObject): Promise<RepMachineListByCompany>;
320
+ /**
321
+ * Retrieves a given {@link Machine} from the server by its {@link Machine.key}.
322
+ * @param key
323
+ * @returns
324
+ */
325
+ getMachine(key: string): Promise<RepMachineGet>;
326
+ /**
327
+ * Creates a new, or updates an existing {@link Machine}.
328
+ * @param json
329
+ * @returns
330
+ */
331
+ mergeMachine(json: JsonObject): Promise<RepMachineMerge>;
332
+ /**
333
+ * Deletes an {@link Machine}.
334
+ * @param key
335
+ * @returns
336
+ */
337
+ removeMachine(key: string): Promise<RepMachineDelete>;
338
+ /**
339
+ * Restores a deleted {@link Machine}.
340
+ * @param key
341
+ * @returns
342
+ */
343
+ restoreMachine(key: string): Promise<RepMachineDelete>;
344
+ /**
345
+ * Retrieves a list of all {@link Session}s in the given {@link Company}.
346
+ * @param companyId
347
+ * @returns
348
+ */
349
+ listSessions(companyId: ulong, constraints?: JsonObject): Promise<RepSessionListByCompany>;
350
+ /**
351
+ * Retrieves a list of all {@link Session}s for the given {@link User}.
352
+ * @param login
353
+ * @returns
354
+ */
355
+ listSessionsByUser(login: email, constraints?: JsonObject): Promise<RepSessionListByUser>;
356
+ /**
357
+ * Kills a {@link Session}.
358
+ * @param handle
359
+ * @returns
360
+ */
361
+ killSession(handle: string): Promise<RepSessionDelete>;
362
+ /**
363
+ * Retrieves a list of all {@link Icon}s in the trunk for the given {@link Company}.
364
+ * @param companyId
365
+ * @param constraints
366
+ * @returns
367
+ */
368
+ listIcons(companyId: ulong, constraints?: JsonObject): Promise<RepIconListByCompany>;
369
+ /**
370
+ * Retrieves a given {@link Icon} from the server by its {@link Icon.id}.
371
+ * @param id
372
+ * @returns
373
+ */
374
+ getIcon(id: ulong): Promise<RepIconGet>;
375
+ /**
376
+ * Creates a new, or updates an existing {@link Icon}.
377
+ * @param json
378
+ * @returns
379
+ */
380
+ mergeIcon(json: JsonObject): Promise<RepIconMerge>;
381
+ /**
382
+ * Deletes a {@link Icon}.
383
+ * @param id
384
+ * @returns
385
+ */
386
+ removeIcon(id: ulong): Promise<RepIconDelete>;
387
+ /**
388
+ * Restores a deleted {@link Icon}.
389
+ * @param id
390
+ * @returns
391
+ */
392
+ restoreIcon(id: ulong): Promise<RepIconDelete>;
393
+ /**
394
+ * Retrieves a list of all {@link Picture}s in the trunk for the given {@link Company}.
395
+ * @param companyId
396
+ * @param constraints
397
+ * @returns
398
+ */
399
+ listPictures(companyId: ulong, constraints?: JsonObject): Promise<RepPictureListByCompany>;
400
+ /**
401
+ * Retrieves a given {@link Picture} from the server by its {@link Picture.id}.
402
+ * @param id
403
+ * @returns
404
+ */
405
+ getPicture(id: ulong): Promise<RepPictureGet>;
406
+ /**
407
+ * Creates a new, or updates an existing {@link Picture}.
408
+ * @param json
409
+ * @returns
410
+ */
411
+ mergePicture(json: JsonObject): Promise<RepPictureMerge>;
412
+ /**
413
+ * Deletes a {@link Picture}.
414
+ * @param id
415
+ * @returns
416
+ */
417
+ removePicture(id: ulong): Promise<RepPictureDelete>;
418
+ /**
419
+ * Restores a deleted {@link Picture}.
420
+ * @param id
421
+ * @returns
422
+ */
423
+ restorePicture(id: ulong): Promise<RepPictureDelete>;
424
+ /**
425
+ * Retrieves a list of all {@link Document}s in the given {@link Company}.
426
+ * @param companyId
427
+ * @param constraints
428
+ * @returns
429
+ */
430
+ listDocuments(companyId: ulong, constraints?: JsonObject): Promise<RepDocumentListByCompany>;
431
+ /**
432
+ * Retrieves a given {@link Document} from the server by its {@link Document.id}.
433
+ * @param id
434
+ * @returns
435
+ */
436
+ getDocument(id: ulong): Promise<RepDocumentGet>;
437
+ /**
438
+ * Creates a new, or updates an existing {@link Document}.
439
+ * @param json
440
+ * @returns
441
+ */
442
+ mergeDocument(json: JsonObject): Promise<RepDocumentMerge>;
443
+ /**
444
+ * Deletes a {@link Document}.
445
+ * @param id
446
+ * @returns
447
+ */
448
+ removeDocument(id: ulong): Promise<RepDocumentDelete>;
449
+ /**
450
+ * Restores a deleted {@link Document}.
451
+ * @param id
452
+ * @returns
453
+ */
454
+ restoreDocument(id: ulong): Promise<RepDocumentDelete>;
455
+ /**
456
+ * Retrieves a list of all {@link FormTemplate}s in the given {@link Company}.
457
+ * @param companyId
458
+ * @param constraints
459
+ * @returns
460
+ */
461
+ listFormTemplates(companyId: ulong, constraints?: JsonObject): Promise<RepFormTemplateListByCompany>;
462
+ /**
463
+ * Retrieves a given {@link FormTemplate} from the server by its {@link FormTemplate.id}.
464
+ * @param id
465
+ * @returns
466
+ */
467
+ getFormTemplate(id: ulong): Promise<RepFormTemplateGet>;
468
+ /**
469
+ * Creates a new, or updates an existing {@link FormTemplate}.
470
+ * @param json
471
+ * @returns
472
+ */
473
+ mergeFormTemplate(json: JsonObject): Promise<RepFormTemplateMerge>;
474
+ /**
475
+ * Deletes a {@link FormTemplate}.
476
+ * @param id
477
+ * @returns
478
+ */
479
+ removeFormTemplate(id: ulong): Promise<RepFormTemplateDelete>;
480
+ /**
481
+ * Restores a deleted {@link FormTemplate}.
482
+ * @param id
483
+ * @returns
484
+ */
485
+ restoreFormTemplate(id: ulong): Promise<RepFormTemplateDelete>;
486
+ /**
487
+ * Retrieves a list of all {@link FormResult}s in the given {@link Company}.
488
+ * @param companyId
489
+ * @param constraints
490
+ * @returns
491
+ */
492
+ listFormResults(companyId: ulong, constraints?: JsonObject): Promise<RepFormResultListByCompany>;
493
+ /**
494
+ * Retrieves a given {@link FormResult} from the server by its {@link FormResult.id}.
495
+ * @param id
496
+ * @returns
497
+ */
498
+ getFormResult(id: ulong): Promise<RepFormResultGet>;
499
+ /**
500
+ * Creates a new, or updates an existing {@link FormResult}.
501
+ * @param json
502
+ * @returns
503
+ */
504
+ mergeFormResult(json: JsonObject): Promise<RepFormResultMerge>;
505
+ /**
506
+ * Merges a batch of {@link FormResult}s.
507
+ * @param array
508
+ * @returns
509
+ */
510
+ multiMergeFormResult(id: ulong): Promise<RepFormResultBatchMerge>;
511
+ /**
512
+ * Deletes a {@link FormResult}.
513
+ * @param id
514
+ * @returns
515
+ */
516
+ removeFormResult(id: ulong): Promise<RepFormResultDelete>;
517
+ /**
518
+ * Restores a deleted {@link FormResult}.
519
+ * @param id
520
+ * @returns
521
+ */
522
+ restoreFormResult(id: ulong): Promise<RepFormResultDelete>;
523
+ /**
524
+ * Retrieves a list of all {@link Dashcam} in the given {@link Company}.
525
+ * @param companyId
526
+ * @param constraints
527
+ * @returns
528
+ */
529
+ listDashcamDatas(companyId: ulong, constraints?: JsonObject): Promise<RepDashcamListByCompany>;
530
+ /**
531
+ * Retrieves a given {@link Dashcam} from the server by its {@link Dashcam.guid}.
532
+ * @param guid
533
+ * @returns
534
+ */
535
+ getDashcamData(guid: guid): Promise<RepDashcamGet>;
536
+ /**
537
+ * Retrieves a list of all {@link DashcamLive|live dashcam images} in the given {@link Company}.
538
+ * @param companyId
539
+ * @returns
540
+ */
541
+ listDashcamLives(companyId: ulong, constraints?: JsonObject): Promise<RepDashcamLiveListByCompany>;
542
+ /**
543
+ * Retrieves a list of all {@link Asset}s in the given {@link Company}.
544
+ * @param companyId
545
+ * @param constraints
546
+ * @returns
547
+ */
548
+ listAssets(companyId: ulong, constraints?: JsonObject): Promise<RepAssetListByCompany>;
549
+ /**
550
+ * Retrieves a given {@link Asset} from the server by its {@link Asset.id}.
551
+ * @param id
552
+ * @returns
553
+ */
554
+ getAsset(id: ulong): Promise<RepAssetGet>;
555
+ /**
556
+ * Creates a new, or updates an existing {@link Asset}.
557
+ * @param json
558
+ * @returns
559
+ */
560
+ mergeAsset(json: JsonObject): Promise<RepAssetMerge>;
561
+ /**
562
+ * Merges a batch of {@link Asset}s.
563
+ * @param array
564
+ * @returns
565
+ */
566
+ multiMergeAsset(array: JsonObject[]): Promise<RepAssetBatchMerge>;
567
+ /**
568
+ * Deletes an {@link Asset}.
569
+ * @param id
570
+ * @returns
571
+ */
572
+ removeAsset(id: ulong): Promise<RepAssetDelete>;
573
+ /**
574
+ * Restores a deleted {@link Asset}.
575
+ * @param id
576
+ * @returns
577
+ */
578
+ restoreAsset(id: ulong): Promise<RepAssetDelete>;
579
+ /**
580
+ * Suspends an {@link Asset}.
581
+ * @param id
582
+ * @returns
583
+ */
584
+ suspendAsset(id: ulong): Promise<RepAssetSuspend>;
585
+ /**
586
+ * Reactivates an {@link Asset}.
587
+ * @param id
588
+ * @returns
589
+ */
590
+ reviveAsset(id: ulong): Promise<RepAssetSuspend>;
591
+ /**
592
+ * Searches all available companies for {@link Asset}s that match the given expression.
593
+ * @param expression
594
+ * @param constraints
595
+ * @returns
596
+ */
597
+ searchAssets(expression: expression, constraints?: JsonObject): void;
598
+ /**
599
+ * Retrieves a list of all {@link AssetGeneral}s in the given {@link Company}.
600
+ * @param companyId
601
+ * @param constraints
602
+ * @returns
603
+ */
604
+ listAssetGenerals(companyId: ulong, constraints?: JsonObject): Promise<RepAssetGeneralListByCompany>;
605
+ /**
606
+ * Retrieves a given {@link AssetGeneral} from the server by its {@link Asset.id}.
607
+ * @param id
608
+ * @returns
609
+ */
610
+ getAssetGeneral(id: ulong): Promise<RepAssetGeneralGet>;
611
+ /**
612
+ * Searches all available companies for {@link AssetGeneral}s that match the given expression.
613
+ * @param expression
614
+ * @param constraints
615
+ * @returns
616
+ */
617
+ searchAssetGenerals(expression: expression, constraints?: JsonObject): void;
618
+ /**
619
+ * Retrieves a list of all {@link AssetAdvanced}s in the given {@link Company}.
620
+ * @param companyId
621
+ * @param constraints
622
+ * @returns
623
+ */
624
+ listAssetAdvanceds(companyId: ulong, constraints?: JsonObject): Promise<RepAssetAdvancedListByCompany>;
625
+ /**
626
+ * Retrieves a given {@link AssetAdvanced} from the server by its {@link Asset.id}.
627
+ * @param id
628
+ * @returns
629
+ */
630
+ getAssetAdvanced(id: ulong): Promise<RepAssetAdvancedGet>;
631
+ /**
632
+ * Searches all available companies for {@link AssetAdvanced}s that match the given expression.
633
+ * @param expression
634
+ * @param constraints
635
+ * @returns
636
+ */
637
+ searchAssetAdvanceds(expression: expression, constraints?: JsonObject): void;
638
+ /**
639
+ * Updates the given {@link Asset}'s {@link DispatchJob}s and optimizes the steps based on back-end logic.
640
+ * @param id
641
+ * @returns
642
+ */
643
+ mergeAssetDispatch(json: JsonObject): Promise<RepAssetDispatchMerge>;
644
+ /**
645
+ * Retrieves a list of all {@link DispatchTask}s in the given {@link Company}.
646
+ * @param companyId
647
+ * @param constraints
648
+ * @returns
649
+ */
650
+ listDispatchTasks(companyId: ulong, constraints?: JsonObject): Promise<RepDispatchTaskListByCompany>;
651
+ /**
652
+ * Retrieves a list of all {@link DispatchTask}s for the given {@link Asset}.
653
+ * @param assetId
654
+ * @returns
655
+ */
656
+ getDispatchTasksByAsset(assetId: ulong, constraints?: JsonObject): Promise<RepDispatchTaskListByAsset>;
657
+ /**
658
+ * Retrieves a given {@link DispatchTask} from the server by its {@link DispatchTask.id}.
659
+ * @param id
660
+ * @returns
661
+ */
662
+ getDispatchTask(id: ulong): Promise<RepDispatchTaskGet>;
663
+ /**
664
+ * Creates a new, or updates an existing {@link DispatchTask}.
665
+ * @param json
666
+ * @returns
667
+ */
668
+ mergeDispatchTask(json: JsonObject): Promise<RepDispatchTaskMerge>;
669
+ /**
670
+ * Merges a batch of {@link DispatchTask}s.
671
+ * @param array
672
+ * @returns
673
+ */
674
+ multiMergeDispatchTask(id: ulong): Promise<RepDispatchTaskBatchMerge>;
675
+ /**
676
+ * Deletes a {@link DispatchTask}.
677
+ * @param id
678
+ * @returns
679
+ */
680
+ removeDispatchTask(id: ulong): Promise<RepDispatchTaskDelete>;
681
+ /**
682
+ * Restores a deleted {@link DispatchTask}.
683
+ * @param id
684
+ * @returns
685
+ */
686
+ restoreDispatchTask(id: ulong): Promise<RepDispatchTaskDelete>;
687
+ /**
688
+ * Retrieves a list of all {@link DispatchJob}s in the given {@link Company}.
689
+ * @param companyId
690
+ * @param constraints
691
+ * @returns
692
+ */
693
+ listDispatchJobs(companyId: ulong, constraints?: JsonObject): Promise<RepDispatchJobListByCompany>;
694
+ /**
695
+ * Retrieves a list of all {@link DispatchJob}s for the given {@link Asset}.
696
+ * @param assetId
697
+ * @returns
698
+ */
699
+ getDispatchJobsByAsset(assetId: ulong, constraints?: JsonObject): Promise<RepDispatchJobListByAsset>;
700
+ /**
701
+ * Retrieves a given {@link DispatchJob} from the server by its {@link DispatchJob.id}.
702
+ * @param id
703
+ * @returns
704
+ */
705
+ getDispatchJob(id: ulong): Promise<RepDispatchJobGet>;
706
+ /**
707
+ * Creates a new, or updates an existing {@link DispatchJob}.
708
+ * @param json
709
+ * @returns
710
+ */
711
+ mergeDispatchJob(json: JsonObject): Promise<RepDispatchJobMerge>;
712
+ /**
713
+ * Merges a batch of {@link DispatchJob}s.
714
+ * @param array
715
+ * @returns
716
+ */
717
+ multiMergeDispatchJob(id: ulong): Promise<RepDispatchJobBatchMerge>;
718
+ /**
719
+ * Deletes a {@link DispatchJob}.
720
+ * @param id
721
+ * @returns
722
+ */
723
+ removeDispatchJob(id: ulong): Promise<RepDispatchJobDelete>;
724
+ /**
725
+ * Restores a deleted {@link DispatchJob}.
726
+ * @param id
727
+ * @returns
728
+ */
729
+ restoreDispatchJob(id: ulong): Promise<RepDispatchJobDelete>;
730
+ /**
731
+ * Completes or progresses a {@link DispatchJob} (from the perspective of a driver, but by a dispatcher).
732
+ * @param json
733
+ * @returns
734
+ */
735
+ changeDispatchJob(json: JsonObject): Promise<RepDispatchJobMerge>;
736
+ /**
737
+ * Cancels a {@link DispatchJob} and removes it from the dispatcher's and driver's view.
738
+ * @param json
739
+ * @returns
740
+ */
741
+ cancelDispatchJob(json: JsonObject): Promise<RepDispatchJobMerge>;
742
+ /**
743
+ * Retrieves a list of all {@link AssetMessage}s in the given {@link Company}.
744
+ * @param companyId
745
+ * @param constraints
746
+ * @returns
747
+ */
748
+ listAssetMessages(companyId: ulong, constraints?: JsonObject): Promise<RepAssetMessageListByCompany>;
749
+ /**
750
+ * Retrieves a list of all {@link AssetMessage}s for the given {@link Asset}.
751
+ * @param assetId
752
+ * @returns
753
+ */
754
+ getAssetMessagesByAsset(assetId: ulong, constraints?: JsonObject): Promise<RepAssetMessageListByAsset>;
755
+ /**
756
+ * Retrieves a given {@link AssetMessage} from the server by its {@link Message.id}.
757
+ * @param id
758
+ * @returns
759
+ */
760
+ getAssetMessage(id: ulong): Promise<RepAssetMessageGet>;
761
+ /**
762
+ * Creates a new, or updates an existing {@link AssetMessage}.
763
+ * @param json
764
+ * @returns
765
+ */
766
+ mergeAssetMessage(json: JsonObject): Promise<RepAssetMessageMerge>;
767
+ /**
768
+ * Merges a batch of {@link AssetMessage}s.
769
+ * @param array
770
+ * @returns
771
+ */
772
+ multiMergeAssetMessage(id: ulong): Promise<RepAssetMessageBatchMerge>;
773
+ /**
774
+ * Deletes a {@link AssetMessage}.
775
+ * @param id
776
+ * @returns
777
+ */
778
+ removeAssetMessage(id: ulong): Promise<RepAssetMessageDelete>;
779
+ /**
780
+ * Restores a deleted {@link AssetMessage}.
781
+ * @param id
782
+ * @returns
783
+ */
784
+ restoreAssetMessage(id: ulong): Promise<RepAssetMessageDelete>;
785
+ /**
786
+ * Retrieves a list of all {@link Place}s in the given {@link Company}.
787
+ * @param companyId
788
+ * @param constraints
789
+ * @returns
790
+ */
791
+ listPlaces(companyId: ulong, constraints?: JsonObject): Promise<RepPlaceListByCompany>;
792
+ /**
793
+ * Retrieves a given {@link Place} from the server by its {@link Place.id}.
794
+ * @param id
795
+ * @returns
796
+ */
797
+ getPlace(id: ulong): Promise<RepPlaceGet>;
798
+ /**
799
+ * Creates a new, or updates an existing {@link Place}.
800
+ * @param json
801
+ * @returns
802
+ */
803
+ mergePlace(json: JsonObject): Promise<RepPlaceMerge>;
804
+ /**
805
+ * Deletes a {@link Place}.
806
+ * @param id
807
+ * @returns
808
+ */
809
+ removePlace(id: ulong): Promise<RepPlaceDelete>;
810
+ /**
811
+ * Restores a deleted {@link Place}.
812
+ * @param id
813
+ * @returns
814
+ */
815
+ restorePlace(id: ulong): Promise<RepPlaceDelete>;
816
+ /**
817
+ * Retrieves a list of all {@link Provider}s in the given {@link Company}.
818
+ * @param companyId
819
+ * @param constraints
820
+ * @returns
821
+ */
822
+ listProviders(companyId: ulong, constraints?: JsonObject): Promise<RepProviderListByCompany>;
823
+ /**
824
+ * Retrieves a given {@link Provider} from the server by its {@link Provider.id}.
825
+ * @param id
826
+ * @returns
827
+ */
828
+ getProvider(id: string): Promise<RepProviderGet>;
829
+ /**
830
+ * Creates a new, or updates an existing {@link Provider}.
831
+ * @param json
832
+ * @returns
833
+ */
834
+ mergeProvider(json: JsonObject): Promise<RepProviderMerge>;
835
+ /**
836
+ * Merges a batch of {@link Provider}s.
837
+ * @param array
838
+ * @returns
839
+ */
840
+ multiMergeProvider(array: JsonObject[]): Promise<RepProviderBatchMerge>;
841
+ /**
842
+ * Deletes a batch of {@link Provider}s.
843
+ * @param ids
844
+ * @returns
845
+ */
846
+ multiRemoveProvider(ids: string[]): Promise<RepProviderBatchDelete>;
847
+ /**
848
+ * Deletes an {@link Provider}.
849
+ * @param id
850
+ * @returns
851
+ */
852
+ removeProvider(id: string): Promise<RepProviderDelete>;
853
+ /**
854
+ * Restores a deleted {@link Provider}.
855
+ * @param id
856
+ * @returns
857
+ */
858
+ restoreProvider(id: string): Promise<RepProviderDelete>;
859
+ /**
860
+ * Searches all available companies for {@link Provider}s that match the given expression.
861
+ * @param expression
862
+ * @param constraints
863
+ * @returns
864
+ */
865
+ searchProviders(expression: expression, constraints?: JsonObject): void;
866
+ /**
867
+ * Retrieves a list of all {@link ProviderGeneral}s in the given {@link Company}.
868
+ * @param companyId
869
+ * @param constraints
870
+ * @returns
871
+ */
872
+ listProviderGenerals(companyId: ulong, constraints?: JsonObject): Promise<RepProviderGeneralListByCompany>;
873
+ /**
874
+ * Retrieves a given {@link ProviderGeneral} from the server by its {@link Provider.id}.
875
+ * @param id
876
+ * @returns
877
+ */
878
+ getProviderGeneral(id: string): Promise<RepProviderGeneralGet>;
879
+ /**
880
+ * Searches all available companies for {@link ProviderGeneral}s that match the given expression.
881
+ * @param expression
882
+ * @param constraints
883
+ * @returns
884
+ */
885
+ searchProviderGenerals(expression: expression, constraints?: JsonObject): void;
886
+ /**
887
+ * Retrieves a list of all {@link ProviderAdvanced}s in the given {@link Company}.
888
+ * @param companyId
889
+ * @param constraints
890
+ * @returns
891
+ */
892
+ listProviderAdvanceds(companyId: ulong, constraints?: JsonObject): Promise<RepProviderAdvancedListByCompany>;
893
+ /**
894
+ * Retrieves a given {@link ProviderAdvanced} from the server by its {@link Provider.id}.
895
+ * @param id
896
+ * @returns
897
+ */
898
+ getProviderAdvanced(id: string): Promise<RepProviderAdvancedGet>;
899
+ /**
900
+ * Searches all available companies for {@link ProviderAdvanced}s that match the given expression.
901
+ * @param expression
902
+ * @param constraints
903
+ * @returns
904
+ */
905
+ searchProviderAdvanceds(expression: expression, constraints?: JsonObject): void;
906
+ /**
907
+ * Retrieves a list of all {@link ProviderControl}s in the given {@link Company}.
908
+ * @param companyId
909
+ * @param constraints
910
+ * @returns
911
+ */
912
+ listProviderControls(companyId: ulong, constraints?: JsonObject): Promise<RepProviderControlListByCompany>;
913
+ /**
914
+ * Retrieves a given {@link ProviderControl} from the server by its {@link Provider.id}.
915
+ * @param id
916
+ * @returns
917
+ */
918
+ getProviderControl(id: string): Promise<RepProviderControlGet>;
919
+ /**
920
+ * Searches all available companies for {@link ProviderControl}s that match the given expression.
921
+ * @param expression
922
+ * @param constraints
923
+ * @returns
924
+ */
925
+ searchProviderControls(expression: expression, constraints?: JsonObject): void;
926
+ /**
927
+ * Retrieves a list of all {@link ProviderScript}s in the trunk for the given {@link Company}.
928
+ * @param companyId
929
+ * @param constraints
930
+ * @returns
931
+ */
932
+ listProviderScripts(companyId: ulong, constraints?: JsonObject): Promise<RepProviderScriptListByCompany>;
933
+ /**
934
+ * Retrieves a given {@link ProviderScript} from the server by its {@link ProviderScript.id}.
935
+ * @param id
936
+ * @returns
937
+ */
938
+ getProviderScript(id: ulong): Promise<RepProviderScriptGet>;
939
+ /**
940
+ * Creates a new, or updates an existing {@link ProviderScript}.
941
+ * @param json
942
+ * @returns
943
+ */
944
+ mergeProviderScript(json: JsonObject): Promise<RepProviderScriptMerge>;
945
+ /**
946
+ * Deletes a {@link ProviderScript}.
947
+ * @param id
948
+ * @returns
949
+ */
950
+ removeProviderScript(id: ulong): Promise<RepProviderScriptDelete>;
951
+ /**
952
+ * Restores a deleted {@link ProviderScript}.
953
+ * @param id
954
+ * @returns
955
+ */
956
+ restoreProviderScript(id: ulong): Promise<RepProviderScriptDelete>;
957
+ /**
958
+ * Retrieves a list of all {@link ProviderConfig}s in the given {@link Company}.
959
+ * @param companyId
960
+ * @param constraints
961
+ * @returns
962
+ */
963
+ listProviderConfigs(companyId: ulong, constraints?: JsonObject): Promise<RepProviderConfigListByCompany>;
964
+ /**
965
+ * Retrieves a given {@link ProviderConfig} from the server by its {@link ProviderConfig.id}.
966
+ * @param id
967
+ * @returns
968
+ */
969
+ getProviderConfig(id: ulong): Promise<RepProviderConfigGet>;
970
+ /**
971
+ * Creates a new, or updates an existing {@link ProviderConfig}.
972
+ * @param json
973
+ * @returns
974
+ */
975
+ mergeProviderConfig(json: JsonObject): Promise<RepProviderConfigMerge>;
976
+ /**
977
+ * Merges a batch of {@link ProviderConfig}s.
978
+ * @param array
979
+ * @returns
980
+ */
981
+ multiMergeProviderConfig(id: ulong): Promise<RepProviderConfigBatchMerge>;
982
+ /**
983
+ * Deletes a {@link ProviderConfig}.
984
+ * @param id
985
+ * @returns
986
+ */
987
+ removeProviderConfig(id: ulong): Promise<RepProviderConfigDelete>;
988
+ /**
989
+ * Restores a deleted {@link ProviderConfig}.
990
+ * @param id
991
+ * @returns
992
+ */
993
+ restoreProviderConfig(id: ulong): Promise<RepProviderConfigDelete>;
994
+ /**
995
+ * Retrieves a list of all {@link ProviderConfiguration}s in the given {@link Company}.
996
+ * @param companyId
997
+ * @param constraints
998
+ * @returns
999
+ */
1000
+ listProviderConfigurations(companyId: ulong, constraints?: JsonObject): Promise<RepProviderConfigurationListByCompany>;
1001
+ /**
1002
+ * Retrieves a given {@link ProviderConfiguration} from the server by its {@link ProviderConfiguration.id}.
1003
+ * @param id
1004
+ * @returns
1005
+ */
1006
+ getProviderConfiguration(id: ulong): Promise<RepProviderConfigurationGet>;
1007
+ /**
1008
+ * Creates a new, or updates an existing {@link ProviderConfiguration}.
1009
+ * @param json
1010
+ * @returns
1011
+ */
1012
+ mergeProviderConfiguration(json: JsonObject): Promise<RepProviderConfigurationMerge>;
1013
+ /**
1014
+ * Merges a batch of {@link ProviderConfiguration}s.
1015
+ * @param array
1016
+ * @returns
1017
+ */
1018
+ multiMergeProviderConfiguration(id: ulong): Promise<RepProviderConfigurationBatchMerge>;
1019
+ /**
1020
+ * Deletes a {@link ProviderConfiguration}.
1021
+ * @param id
1022
+ * @returns
1023
+ */
1024
+ removeProviderConfiguration(id: ulong): Promise<RepProviderConfigurationDelete>;
1025
+ /**
1026
+ * Restores a deleted {@link ProviderConfiguration}.
1027
+ * @param id
1028
+ * @returns
1029
+ */
1030
+ restoreProviderConfiguration(id: ulong): Promise<RepProviderConfigurationDelete>;
1031
+ /**
1032
+ * Retrieves a list of all {@link ProviderRegistration}s in the given {@link Company}.
1033
+ * @param companyId
1034
+ * @returns
1035
+ */
1036
+ listProviderRegistration(companyId: ulong, constraints?: JsonObject): Promise<RepProviderRegistrationListByCompany>;
1037
+ /**
1038
+ * Retrieves a given {@link ProviderRegistration} from the server by its {@link ProviderRegistration.id}.
1039
+ * @param code
1040
+ * @returns
1041
+ */
1042
+ getProviderRegistration(code: int): Promise<RepProviderRegistrationGet>;
1043
+ /**
1044
+ * Creates a new {@link ProviderRegistration}.
1045
+ * {@link ProviderRegistration}s cannot be updated, but they do expire on their own.
1046
+ * You can also delete them using {@link removeProviderRegistration}.
1047
+ * @param json
1048
+ * @returns
1049
+ */
1050
+ mergeProviderRegistration(json: JsonObject): Promise<RepProviderRegistrationMerge>;
1051
+ /**
1052
+ * Deletes a {@link ProviderRegistration}.
1053
+ * @param code
1054
+ * @returns
1055
+ */
1056
+ removeProviderRegistration(code: int): Promise<RepProviderRegistrationDelete>;
1057
+ /**
1058
+ * Retrieves a list of all {@link Behaviour}s in the given {@link Company}.
1059
+ * @param companyId
1060
+ * @param constraints
1061
+ * @returns
1062
+ */
1063
+ listBehaviours(companyId: ulong, constraints?: JsonObject): Promise<RepBehaviourListByCompany>;
1064
+ /**
1065
+ * Retrieves a given {@link Behaviour} from the server by its {@link Behaviour.id}.
1066
+ * @param id
1067
+ * @returns
1068
+ */
1069
+ getBehaviour(id: ulong): Promise<RepBehaviourGet>;
1070
+ /**
1071
+ * Creates a new, or updates an existing {@link Behaviour}.
1072
+ * @param json
1073
+ * @returns
1074
+ */
1075
+ mergeBehaviour(json: JsonObject): Promise<RepBehaviourMerge>;
1076
+ /**
1077
+ * Merges a batch of {@link Behaviour}s.
1078
+ * @param array
1079
+ * @returns
1080
+ */
1081
+ multiMergeBehaviour(id: ulong): Promise<RepBehaviourBatchMerge>;
1082
+ /**
1083
+ * Deletes a {@link Behaviour}.
1084
+ * @param id
1085
+ * @returns
1086
+ */
1087
+ removeBehaviour(id: ulong): Promise<RepBehaviourDelete>;
1088
+ /**
1089
+ * Restores a deleted {@link Behaviour}.
1090
+ * @param id
1091
+ * @returns
1092
+ */
1093
+ restoreBehaviour(id: ulong): Promise<RepBehaviourDelete>;
1094
+ /**
1095
+ * Retrieves a list of all {@link BehaviourScript}s in the trunk for the given {@link Company}.
1096
+ * @param companyId
1097
+ * @param constraints
1098
+ * @returns
1099
+ */
1100
+ listBehaviourScripts(companyId: ulong, constraints?: JsonObject): Promise<RepBehaviourScriptListByCompany>;
1101
+ /**
1102
+ * Retrieves a given {@link BehaviourScript} from the server by its {@link BehaviourScript.id}.
1103
+ * @param id
1104
+ * @returns
1105
+ */
1106
+ getBehaviourScript(id: ulong): Promise<RepBehaviourScriptGet>;
1107
+ /**
1108
+ * Creates a new, or updates an existing {@link Behaviour}.
1109
+ * @param json
1110
+ * @returns
1111
+ */
1112
+ mergeBehaviourScript(json: JsonObject): Promise<RepBehaviourScriptMerge>;
1113
+ /**
1114
+ * Deletes a {@link Behaviour}.
1115
+ * @param id
1116
+ * @returns
1117
+ */
1118
+ removeBehaviourScript(id: ulong): Promise<RepBehaviourScriptDelete>;
1119
+ /**
1120
+ * Restores a deleted {@link Behaviour}.
1121
+ * @param id
1122
+ * @returns
1123
+ */
1124
+ restoreBehaviourScript(id: ulong): Promise<RepBehaviourScriptDelete>;
1125
+ /**
1126
+ * Retrieves a list of all {@link BehaviourLog}s from the given {@link Asset}.
1127
+ * @param behaviourId
1128
+ * @returns
1129
+ */
1130
+ listBehaviourAssetLogs(behaviourId: ulong, constraints?: JsonObject): Promise<RepBehaviourLogListByAsset>;
1131
+ /**
1132
+ * Deletes all the {@link BehaviourLog}s from the given {@link Asset}.
1133
+ * @param behaviourId
1134
+ * @returns
1135
+ */
1136
+ clearBehaviourAssetLogs(behaviourId: ulong): Promise<RepBehaviourLogBatchDeleteByAsset>;
1137
+ /**
1138
+ * Retrieves a list of all {@link BehaviourLog}s from the given {@link Behaviour}.
1139
+ * @param behaviourId
1140
+ * @returns
1141
+ */
1142
+ listBehaviourLogs(behaviourId: ulong, constraints?: JsonObject): Promise<RepBehaviourLogListByBehaviour>;
1143
+ /**
1144
+ * Deletes all the {@link BehaviourLog}s from the given {@link Behaviour}.
1145
+ * @param behaviourId
1146
+ * @returns
1147
+ */
1148
+ clearBehaviourLogs(behaviourId: ulong): Promise<RepBehaviourLogBatchDeleteByBehaviour>;
1149
+ /**
1150
+ * Retrieves a list of all {@link BehaviourLog}s from the given {@link BehaviourScript}.
1151
+ * @param scriptId
1152
+ * @returns
1153
+ */
1154
+ listBehaviourScriptLogs(scriptId: ulong, constraints?: JsonObject): Promise<RepBehaviourLogListByScript>;
1155
+ /**
1156
+ * Deletes all the {@link BehaviourLog}s from the given {@link BehaviourScript}.
1157
+ * @param scriptId
1158
+ * @returns
1159
+ */
1160
+ clearBehaviourScriptLogs(scriptId: ulong, constraints?: JsonObject): Promise<RepBehaviourLogBatchDeleteByScript>;
1161
+ /**
1162
+ * Retrieves a list of all {@link ReportTemplate}s in the given {@link Company}.
1163
+ * @param companyId
1164
+ * @param constraints
1165
+ * @returns
1166
+ */
1167
+ listReportTemplates(companyId: ulong, constraints?: JsonObject): Promise<RepReportTemplateListByCompany>;
1168
+ /**
1169
+ * Retrieves a given {@link ReportTemplate} from the server by its {@link ReportTemplate.id}.
1170
+ * @param id
1171
+ * @returns
1172
+ */
1173
+ getReportTemplate(id: ulong): Promise<RepReportTemplateGet>;
1174
+ /**
1175
+ * Creates a new, or updates an existing {@link ReportTemplate}.
1176
+ * @param json
1177
+ * @returns
1178
+ */
1179
+ mergeReportTemplate(json: JsonObject): Promise<RepReportTemplateMerge>;
1180
+ /**
1181
+ * Deletes a {@link ReportTemplate}.
1182
+ * @param id
1183
+ * @returns
1184
+ */
1185
+ removeReportTemplate(id: ulong): Promise<RepReportTemplateDelete>;
1186
+ /**
1187
+ * Restores a deleted {@link ReportTemplate}.
1188
+ * @param id
1189
+ * @returns
1190
+ */
1191
+ restoreReportTemplate(id: ulong): Promise<RepReportTemplateDelete>;
1192
+ /**
1193
+ * Retrieves a list of all {@link ReportSchedule}s in the given {@link Company}.
1194
+ * @param companyId
1195
+ * @param constraints
1196
+ * @returns
1197
+ */
1198
+ listReportSchedules(companyId: ulong, constraints?: JsonObject): Promise<RepReportScheduleListByCompany>;
1199
+ /**
1200
+ * Retrieves a given {@link ReportSchedule} from the server by its {@link ReportSchedule.id}.
1201
+ * @param id
1202
+ * @returns
1203
+ */
1204
+ getReportSchedule(id: ulong): Promise<RepReportScheduleGet>;
1205
+ /**
1206
+ * Creates a new, or updates an existing {@link ReportSchedule}.
1207
+ * @param json
1208
+ * @returns
1209
+ */
1210
+ mergeReportSchedule(json: JsonObject): Promise<RepReportScheduleMerge>;
1211
+ /**
1212
+ * Deletes a {@link ReportSchedule}.
1213
+ * @param id
1214
+ * @returns
1215
+ */
1216
+ removeReportSchedule(id: ulong): Promise<RepReportScheduleDelete>;
1217
+ /**
1218
+ * Restores a deleted {@link ReportSchedule}.
1219
+ * @param id
1220
+ * @returns
1221
+ */
1222
+ restoreReportSchedule(id: ulong): Promise<RepReportScheduleDelete>;
1223
+ /**
1224
+ * Retrieves a list of all {@link ReportResult}s in the given {@link Company}.
1225
+ * @param companyId
1226
+ * @param constraints
1227
+ * @returns
1228
+ */
1229
+ listReportResults(companyId: ulong, constraints?: JsonObject): Promise<RepReportResultListByCompany>;
1230
+ /**
1231
+ * Retrieves a given {@link ReportResult} from the server by its {@link ReportResult.id}.
1232
+ * @param id
1233
+ * @returns
1234
+ */
1235
+ getReportResult(id: ulong): Promise<RepReportResultGet>;
1236
+ /**
1237
+ * Creates a new, or updates an existing {@link ReportResult}.
1238
+ * @param json
1239
+ * @returns
1240
+ */
1241
+ mergeReportResult(json: JsonObject): Promise<RepReportResultMerge>;
1242
+ /**
1243
+ * Deletes a {@link ReportResult}.
1244
+ * @param id
1245
+ * @returns
1246
+ */
1247
+ removeReportResult(id: ulong): Promise<RepReportResultDelete>;
1248
+ /**
1249
+ * Restores a deleted {@link ReportResult}.
1250
+ * @param id
1251
+ * @returns
1252
+ */
1253
+ restoreReportResult(id: ulong): Promise<RepReportResultDelete>;
1254
+ /**
1255
+ * Retrieves a list of all {@link MaintenanceSchedule}s in the given {@link Company}.
1256
+ * @param companyId
1257
+ * @param constraints
1258
+ * @returns
1259
+ */
1260
+ listMaintenanceSchedules(companyId: ulong, constraints?: JsonObject): Promise<RepMaintenanceScheduleListByCompany>;
1261
+ /**
1262
+ * Retrieves a given {@link MaintenanceSchedule} from the server by its {@link MaintenanceSchedule.id}.
1263
+ * @param id
1264
+ * @returns
1265
+ */
1266
+ getMaintenanceSchedule(id: ulong): Promise<RepMaintenanceScheduleGet>;
1267
+ /**
1268
+ * Creates a new, or updates an existing {@link MaintenanceSchedule}.
1269
+ * @param json
1270
+ * @returns
1271
+ */
1272
+ mergeMaintenanceSchedule(json: JsonObject): Promise<RepMaintenanceScheduleMerge>;
1273
+ /**
1274
+ * Deletes a {@link MaintenanceSchedule}.
1275
+ * @param id
1276
+ * @returns
1277
+ */
1278
+ removeMaintenanceSchedule(id: ulong): Promise<RepMaintenanceScheduleDelete>;
1279
+ /**
1280
+ * Restores a deleted {@link MaintenanceSchedule}.
1281
+ * @param id
1282
+ * @returns
1283
+ */
1284
+ restoreMaintenanceSchedule(id: ulong): Promise<RepMaintenanceScheduleDelete>;
1285
+ /**
1286
+ * Retrieves a list of all {@link MaintenanceJob}s in the given {@link Company}.
1287
+ * @param companyId
1288
+ * @param constraints
1289
+ * @returns
1290
+ */
1291
+ listMaintenanceJobs(companyId: ulong, constraints?: JsonObject): Promise<RepMaintenanceJobListByCompany>;
1292
+ /**
1293
+ * Retrieves a given {@link MaintenanceJob} from the server by its {@link MaintenanceJob.id}.
1294
+ * @param id
1295
+ * @returns
1296
+ */
1297
+ getMaintenanceJob(id: ulong): Promise<RepMaintenanceJobGet>;
1298
+ /**
1299
+ * Creates a new, or updates an existing {@link MaintenanceJob}.
1300
+ * @param json
1301
+ * @returns
1302
+ */
1303
+ mergeMaintenanceJob(json: JsonObject): Promise<RepMaintenanceJobMerge>;
1304
+ /**
1305
+ * Deletes a {@link MaintenanceJob}.
1306
+ * @param id
1307
+ * @returns
1308
+ */
1309
+ removeMaintenanceJob(id: ulong): Promise<RepMaintenanceJobDelete>;
1310
+ /**
1311
+ * Restores a deleted {@link MaintenanceJob}.
1312
+ * @param id
1313
+ * @returns
1314
+ */
1315
+ restoreMaintenanceJob(id: ulong): Promise<RepMaintenanceJobDelete>;
1316
+ }