1
+ import ActionUriEndpoint from './endpoints/actionuri' ;
2
+ import AppointmentEndpoint from './endpoints/appointment' ;
3
+ import AssignmentEndpoint from './endpoints/assignment' ;
4
+ import CalendarEndpoint from './endpoints/calendar' ;
5
+ import CaptionEndpoint from './endpoints/caption' ;
6
+ import CategoryEndpoint from './endpoints/category' ;
7
+ import ConnectorEndpoint from './endpoints/connector' ;
8
+ import ContainerEndpoint from './endpoints/container' ;
9
+ import FilterGroupEndpoint from './endpoints/filtergroup' ;
10
+ import FilterValueEndpoint from './endpoints/filtervalue' ;
11
+ import ImportEndpoint , { ImportResponse } from './endpoints/import' ;
12
+ import JobEndpoint from './endpoints/job' ;
13
+ import MessageEndpoint from './endpoints/message' ;
14
+ import NotificationEndpoint from './endpoints/notification' ;
15
+ import PinEndpoint from './endpoints/pin' ;
16
+ import ResourceEndpoint from './endpoints/resource' ;
17
+ import ResourceTypeEndpoint from './endpoints/resourcetype' ;
18
+ import TaskEndpoint from './endpoints/task' ;
19
+ import TimeMarkerEndpoint from './endpoints/timemarker' ;
20
+ import UserEndpoint from './endpoints/user' ;
21
+ import Environment from './environment' ;
22
+ import IImportModel from './models/base/iimportmodel' ;
23
+ import { Severity } from './models/constants/severity' ;
24
+
25
+ class DimeSchedulerClient {
26
+ private importEndpoint : ImportEndpoint ;
27
+ private messages : MessageEndpoint ;
28
+ actionUris : ActionUriEndpoint ;
29
+ appointments : AppointmentEndpoint ;
30
+ captions : CaptionEndpoint ;
31
+ categories : CategoryEndpoint ;
32
+ connectors : ConnectorEndpoint ;
33
+ containers : ContainerEndpoint ;
34
+ filterGroups : FilterGroupEndpoint ;
35
+ filterValues : FilterValueEndpoint ;
36
+ jobs : JobEndpoint ;
37
+ notifications : NotificationEndpoint ;
38
+ pins : PinEndpoint ;
39
+ resources : ResourceEndpoint ;
40
+ tasks : TaskEndpoint ;
41
+ timeMarkers : TimeMarkerEndpoint ;
42
+ users : UserEndpoint ;
43
+ assignments : AssignmentEndpoint ;
44
+ resourceTypes : ResourceTypeEndpoint ;
45
+ calendars : CalendarEndpoint ;
46
+
47
+ constructor ( apiKey : string , env : Environment = Environment . Production ) {
48
+ this . importEndpoint = new ImportEndpoint ( env , apiKey ) ;
49
+ this . messages = new MessageEndpoint ( env , apiKey ) ;
50
+ this . actionUris = new ActionUriEndpoint ( env , apiKey ) ;
51
+ this . appointments = new AppointmentEndpoint ( env , apiKey ) ;
52
+ this . assignments = new AssignmentEndpoint ( env , apiKey ) ;
53
+ this . captions = new CaptionEndpoint ( env , apiKey ) ;
54
+ this . categories = new CategoryEndpoint ( env , apiKey ) ;
55
+ this . connectors = new ConnectorEndpoint ( env , apiKey ) ;
56
+ this . containers = new ContainerEndpoint ( env , apiKey ) ;
57
+ this . filterGroups = new FilterGroupEndpoint ( env , apiKey ) ;
58
+ this . filterValues = new FilterValueEndpoint ( env , apiKey ) ;
59
+ this . jobs = new JobEndpoint ( env , apiKey ) ;
60
+ this . notifications = new NotificationEndpoint ( env , apiKey ) ;
61
+ this . pins = new PinEndpoint ( env , apiKey ) ;
62
+ this . resources = new ResourceEndpoint ( env , apiKey ) ;
63
+ this . tasks = new TaskEndpoint ( env , apiKey ) ;
64
+ this . timeMarkers = new TimeMarkerEndpoint ( env , apiKey ) ;
65
+ this . users = new UserEndpoint ( env , apiKey ) ;
66
+ this . resourceTypes = new ResourceTypeEndpoint ( env , apiKey ) ;
67
+ this . calendars = new CalendarEndpoint ( env , apiKey ) ;
68
+ }
69
+
70
+ import ( importable : IImportModel | Array < IImportModel > , append : boolean = true ) : Promise < ImportResponse > {
71
+ return this . importEndpoint . processAsync ( importable , append ) ;
72
+ }
73
+
74
+ sendMessage ( text : string , severity : Severity , user ?: string ) : Promise < void > {
75
+ return this . messages . processAsync ( text , severity , user ) ;
76
+ }
77
+ }
78
+
79
+ export default DimeSchedulerClient ;
0 commit comments