forked from ianlevesque/smartblinds-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
1117 lines (873 loc) · 31.6 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
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
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
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
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
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
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
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
# source: https://api.mysmartblinds.com/v1/graphql
# timestamp: Fri Mar 29 2019 13:42:49 GMT+0000 (Greenwich Mean Time)
schema {
query: BlindAPIQueries
mutation: BlindAPIMutations
}
"""A blind"""
type Blind {
"""id of user that added the blind"""
userId: String!
"""unique identifier for blind"""
id: String
"""id of the room that blind is in"""
roomId: String
"""battery percent from 0 to 100"""
batteryPercent: Int!
"""user visable name of the blind"""
name: String!
"""false until blind is synced with room information"""
hasSyncedPositions: Boolean!
"""false until blind is synced with room information"""
hasSyncedSchedule: Boolean!
"""
4 byte timestamp in seconds since Jan 1, 2001 when name is updated on the blind
"""
lastUpdateName: Int!
"""
4 byte timestamp in seconds since Jan 1, 2001 when status is updated on the blind
"""
lastUpdateStatus: Int!
"""unique id given by the blind itself in bytes encoded as base64"""
encodedMacAddress: String!
"""key needed to communicate with the blind in bytes encoded as base64"""
encodedPasskey: String!
"""flag to change out passkey on next connect"""
passkeyNeedsChanging: Boolean!
"""
changes the rotation direction depending on which way the blind was installed
"""
reverseRotation: Boolean!
"""orientation of the installed blind"""
orientation: Int
"""whether or not object is deleted"""
deleted: Boolean!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
"""
unix timestamp when object was last updated on the client. It is the client's
responsibility to provide this. By default, the server won't update an object
if the clientUpdatedAt is larger (later) than what is provide in the mutation
"""
clientUpdatedAt: Float!
}
"""All the mutations"""
type BlindAPIMutations {
"""
Move blinds through the API if user has a bridge connected. Position must be
between 0-200. Up to 7 blinds can be moved at once. Returns the same
information as the blindsState query. If a blind can't be reached, the state
returned will show a position and battery level of -1. Returns a GraphQL error
if the bridge doesn't respond.
"""
updateBlindsPosition(encodedMacAddresses: [String], position: Int!): [BlindState]
"""
Move blinds to smart positions through the API if user has a bridge connected.
Up to 7 blinds can be moved at once. Returns the same information as the
blindsState query. If a blind can't be reached, the state returned will show a
position and battery level of -1. Returns a GraphQL error if the bridge
doesn't respond.
"""
updateBlindsSmartPosition(encodedMacAddresses: [String], smartPosition: SmartPosition!): [BlindState]
"""update the logged in user"""
updateUser(user: UserInput): UpdateStatus
updateBlinds(blinds: [BlindInput]): UpdateStatus
updateRooms(rooms: [RoomInput]): UpdateStatus
updateSmartSwitches(smartSwitches: [SmartSwitchInput]): UpdateStatus
updateHubs(hubs: [HubInput]): UpdateStatus
createDebugInfos(debugInfos: [DebugInfoInput]): UpdateStatus
createDebugLogs(debugLogs: [DebugLogInput]): UpdateStatus
createSensorData(sensorData: [SensorDataInput]): UpdateStatus
}
"""All the queries"""
type BlindAPIQueries {
"""
fetch the logged in user and all rooms and blinds associated with the user
"""
user: User
"""
Gets the current state of blinds through the API if user has a bridge
connected. If a blind can't be reached, the state returned will show a
position and battery level of -1. Returns a GraphQL error if the bridge
doesn't respond.
"""
blindsState(encodedMacAddresses: [String]): [BlindState]
sendIdentifyHubCommand(encodedMacAddress: String): String
sendUpgradeNordicCommand(encodedMacAddress: String): String
blinds: [Blind]
rooms: [Room]
smartSwitches: [SmartSwitch]
hubs: [Hub]
debugInfos: [DebugInfo]
debugLogs: [DebugLog]
sensorData: [SensorData]
blindFirmwarePackage(current: FirmwarePackageBlindInput!, protocolVersion: Int = 2): FirmwarePackageInfoBlind!
blindBetaFirmwarePackage(current: FirmwarePackageBlindBetaInput!, protocolVersion: Int = 2): FirmwarePackageInfoBlindBeta!
smartSwitchFirmwarePackage(current: FirmwarePackageSmartSwitchInput!, protocolVersion: Int = 2): FirmwarePackageInfoSmartSwitch!
smartSwitchBetaFirmwarePackage(current: FirmwarePackageSmartSwitchBetaInput!, protocolVersion: Int = 2): FirmwarePackageInfoSmartSwitchBeta!
}
"""A blind"""
input BlindInput {
"""unique identifier for blind"""
id: String = "function v4(options, buf, offset) {\\n var i = buf && offset || 0;\\n\\n if (typeof(options) == 'string') {\\n buf = options === 'binary' ? new Array(16) : null;\\n options = null;\\n }\\n options = options || {};\\n\\n var rnds = options.random || (options.rng || rng)();\\n\\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\\n\\n // Copy bytes to buffer, if provided\\n if (buf) {\\n for (var ii = 0; ii < 16; ++ii) {\\n buf[i + ii] = rnds[ii];\\n }\\n }\\n\\n return buf || bytesToUuid(rnds);\\n}"
"""id of the room that blind is in"""
roomId: String
"""battery percent from 0 to 100"""
batteryPercent: Int!
"""user visable name of the blind"""
name: String!
"""false until blind is synced with room information"""
hasSyncedPositions: Boolean!
"""false until blind is synced with room information"""
hasSyncedSchedule: Boolean!
"""
4 byte timestamp in seconds since Jan 1, 2001 when name is updated on the blind
"""
lastUpdateName: Int!
"""
4 byte timestamp in seconds since Jan 1, 2001 when status is updated on the blind
"""
lastUpdateStatus: Int!
"""unique id given by the blind itself in bytes encoded as base64"""
encodedMacAddress: String!
"""key needed to communicate with the blind in bytes encoded as base64"""
encodedPasskey: String!
"""flag to change out passkey on next connect"""
passkeyNeedsChanging: Boolean!
"""
changes the rotation direction depending on which way the blind was installed
"""
reverseRotation: Boolean!
"""orientation of the installed blind"""
orientation: Int
"""whether or not object is deleted"""
deleted: Boolean!
"""
unix timestamp when object was last updated on the client. It is the client's
responsibility to provide this. By default, the server won't update an object
if the clientUpdatedAt is larger (later) than what is provide in the mutation
"""
clientUpdatedAt: Float!
"""bypasses the clientUpdatedAt timestamp check for mutations"""
forceWrite: Boolean
}
type BlindState {
"""Base64 encoded string of MAC Address bytes."""
encodedMacAddress: String!
"""Number between 0-200. -1 if position is unknown."""
position: Int!
"""
Measurement of signal strength. Values are negative and numbers closer to 0 indicate better signal strength.
"""
rssi: Int!
"""Number between 0-100. -1 if level is unknown."""
batteryLevel: Int!
}
"""debug Info and logs"""
type DebugInfo {
"""id of user"""
userId: String!
recordedTimestamp: Float!
"""blind id"""
blindId: String!
"""blind name"""
blindName: String
"""The debug data"""
debugData: String!
"""user's email"""
userEmail: String!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
}
"""debug Info and logs"""
input DebugInfoInput {
recordedTimestamp: Float! = 1553862725.229
"""blind id"""
blindId: String!
"""blind name"""
blindName: String
"""The debug data"""
debugData: String!
"""user's email"""
userEmail: String!
}
"""A debugLog"""
type DebugLog {
"""user id for the debugLog"""
userId: String!
recordedTimestamp: Float!
"""installation id for the debugLog"""
installationId: String
"""log File Name for the debugLog"""
logFileName: String!
"""log File Url for the debugLog"""
logFileUrl: String!
"""user Email for the debugLog"""
userEmail: String!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
}
"""A debugLog"""
input DebugLogInput {
recordedTimestamp: Float! = 1553862725.23
"""installation id for the debugLog"""
installationId: String
"""log File Name for the debugLog"""
logFileName: String!
"""log File Url for the debugLog"""
logFileUrl: String!
"""user Email for the debugLog"""
userEmail: String!
}
"""firmware for Blind"""
type FirmwareBlind {
"""BLE_APP, BLE_DFU, or MCU_APP + hardware version (BLE_APP_v12)"""
hardware: String
"""unique id for the the firmware package"""
version: Int
"""data url"""
url: String!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
}
"""installation firmware package"""
type FirmwarePackageBlind {
"""
id and version of the firmware package. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
version: Int!
"""
hardware version the update is for. 10s place is major, 1s place is minor (ex. 1.2 -> 12)
"""
hardwareVersion: Int!
"""
minimum version of the firmware package that needs to be install prior to this one
"""
prerequisiteVersion: Int
"""Version of communication protocol the firmware supports"""
protocolVersion: Int!
"""
version of the BLE Stack firmware. Major version is 100s place and up. Minor
version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEStackVersion: Int!
"""
version of the MCU Bootloader firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
MCUBootloaderVersion: Int!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
BLEApplication: FirmwareBlind!
BLEBootloader: FirmwareBlind!
MCUApplication: FirmwareBlind!
}
"""installation firmware package"""
type FirmwarePackageBlindBeta {
"""
id and version of the firmware package. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
version: Int!
"""
hardware version the update is for. 10s place is major, 1s place is minor (ex. 1.2 -> 12)
"""
hardwareVersion: Int!
"""
minimum version of the firmware package that needs to be install prior to this one
"""
prerequisiteVersion: Int
"""Version of communication protocol the firmware supports"""
protocolVersion: Int!
"""
version of the BLE Stack firmware. Major version is 100s place and up. Minor
version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEStackVersion: Int!
"""
version of the MCU Bootloader firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
MCUBootloaderVersion: Int!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
BLEApplication: FirmwareBlind!
BLEBootloader: FirmwareBlind!
MCUApplication: FirmwareBlind!
}
"""installation firmware package"""
input FirmwarePackageBlindBetaInput {
"""
hardware version the update is for. 10s place is major, 1s place is minor (ex. 1.2 -> 12)
"""
hardwareVersion: Int!
"""
version of the BLE Application firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEApplicationVersion: Int!
"""
version of the BLE Stack firmware. Major version is 100s place and up. Minor
version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEStackVersion: Int!
"""
version of the BLE Bootloader firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEBootloaderVersion: Int!
"""
version of the MCU Application firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
MCUApplicationVersion: Int!
"""
version of the MCU Bootloader firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
MCUBootloaderVersion: Int!
}
"""installation firmware package"""
input FirmwarePackageBlindInput {
"""
hardware version the update is for. 10s place is major, 1s place is minor (ex. 1.2 -> 12)
"""
hardwareVersion: Int!
"""
version of the BLE Application firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEApplicationVersion: Int!
"""
version of the BLE Stack firmware. Major version is 100s place and up. Minor
version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEStackVersion: Int!
"""
version of the BLE Bootloader firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEBootloaderVersion: Int!
"""
version of the MCU Application firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
MCUApplicationVersion: Int!
"""
version of the MCU Bootloader firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
MCUBootloaderVersion: Int!
}
type FirmwarePackageInfoBlind {
currentPackage: FirmwarePackageBlind
currentIsMatch: Boolean!
upgradePackage: FirmwarePackageBlind
}
type FirmwarePackageInfoBlindBeta {
currentPackage: FirmwarePackageBlindBeta
currentIsMatch: Boolean!
upgradePackage: FirmwarePackageBlindBeta
}
type FirmwarePackageInfoSmartSwitch {
currentPackage: FirmwarePackageSmartSwitch
currentIsMatch: Boolean!
upgradePackage: FirmwarePackageSmartSwitch
}
type FirmwarePackageInfoSmartSwitchBeta {
currentPackage: FirmwarePackageSmartSwitchBeta
currentIsMatch: Boolean!
upgradePackage: FirmwarePackageSmartSwitchBeta
}
"""installation firmware package"""
type FirmwarePackageSmartSwitch {
"""
id and version of the firmware package. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
version: Int!
"""
hardware version the update is for. 10s place is major, 1s place is minor (ex. 1.2 -> 12)
"""
hardwareVersion: Int!
"""
minimum version of the firmware package that needs to be install prior to this one
"""
prerequisiteVersion: Int
"""Version of communication protocol the firmware supports"""
protocolVersion: Int!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
BLEApplication: FirmwareSmartSwitch!
}
"""installation firmware package"""
type FirmwarePackageSmartSwitchBeta {
"""
id and version of the firmware package. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
version: Int!
"""
hardware version the update is for. 10s place is major, 1s place is minor (ex. 1.2 -> 12)
"""
hardwareVersion: Int!
"""
minimum version of the firmware package that needs to be install prior to this one
"""
prerequisiteVersion: Int
"""Version of communication protocol the firmware supports"""
protocolVersion: Int!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
BLEApplication: FirmwareSmartSwitch!
}
"""installation firmware package"""
input FirmwarePackageSmartSwitchBetaInput {
"""
hardware version the update is for. 10s place is major, 1s place is minor (ex. 1.2 -> 12)
"""
hardwareVersion: Int!
"""
version of the BLE Application firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEApplicationVersion: Int!
}
"""installation firmware package"""
input FirmwarePackageSmartSwitchInput {
"""
hardware version the update is for. 10s place is major, 1s place is minor (ex. 1.2 -> 12)
"""
hardwareVersion: Int!
"""
version of the BLE Application firmware. Major version is 100s place and up.
Minor version is 1s and 10s place. (ex. Version 1.5 -> 105. Version 0.10 -> 10)
"""
BLEApplicationVersion: Int!
}
"""firmware for SmartSwitch"""
type FirmwareSmartSwitch {
"""BLE_APP, BLE_DFU, or MCU_APP + hardware version (BLE_APP_v12)"""
hardware: String
"""unique id for the the firmware package"""
version: Int
"""data url"""
url: String!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
}
"""A hub"""
type Hub {
"""id of user that added the hub"""
userId: String!
"""unique identifier for hub"""
id: String
certificateId: String!
"""user visable name of the hub"""
name: String!
"""TODO: will be an enum with values: NONE, CLIENT_STARTED, COMPLETE"""
provisionState: String!
wifiVersion: String!
nordicVersion: String!
encodedMacAddress: String!
rssi: Int!
"""whether or not object is deleted"""
deleted: Boolean!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
"""
unix timestamp when object was last updated on the client. It is the client's
responsibility to provide this. By default, the server won't update an object
if the clientUpdatedAt is larger (later) than what is provide in the mutation
"""
clientUpdatedAt: Float!
}
"""A hub"""
input HubInput {
"""unique identifier for hub"""
id: String = "function v4(options, buf, offset) {\\n var i = buf && offset || 0;\\n\\n if (typeof(options) == 'string') {\\n buf = options === 'binary' ? new Array(16) : null;\\n options = null;\\n }\\n options = options || {};\\n\\n var rnds = options.random || (options.rng || rng)();\\n\\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\\n\\n // Copy bytes to buffer, if provided\\n if (buf) {\\n for (var ii = 0; ii < 16; ++ii) {\\n buf[i + ii] = rnds[ii];\\n }\\n }\\n\\n return buf || bytesToUuid(rnds);\\n}"
certificateId: String!
"""user visable name of the hub"""
name: String!
"""TODO: will be an enum with values: NONE, CLIENT_STARTED, COMPLETE"""
provisionState: String!
wifiVersion: String!
nordicVersion: String!
encodedMacAddress: String!
rssi: Int!
"""whether or not object is deleted"""
deleted: Boolean!
"""
unix timestamp when object was last updated on the client. It is the client's
responsibility to provide this. By default, the server won't update an object
if the clientUpdatedAt is larger (later) than what is provide in the mutation
"""
clientUpdatedAt: Float!
"""bypasses the clientUpdatedAt timestamp check for mutations"""
forceWrite: Boolean
}
"""installation type"""
type Installation {
"""installation user id"""
userId: String!
"""installation id"""
id: String
"""device token"""
deviceToken: String!
"""device type"""
deviceType: String!
"""time zone of where app was installation"""
timeZone: String
"""version of app installation"""
appVersion: String
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
}
"""installation type"""
input InstallationInput {
"""installation id"""
id: String = "function v4(options, buf, offset) {\\n var i = buf && offset || 0;\\n\\n if (typeof(options) == 'string') {\\n buf = options === 'binary' ? new Array(16) : null;\\n options = null;\\n }\\n options = options || {};\\n\\n var rnds = options.random || (options.rng || rng)();\\n\\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\\n\\n // Copy bytes to buffer, if provided\\n if (buf) {\\n for (var ii = 0; ii < 16; ++ii) {\\n buf[i + ii] = rnds[ii];\\n }\\n }\\n\\n return buf || bytesToUuid(rnds);\\n}"
"""device token"""
deviceToken: String!
"""device type"""
deviceType: String!
"""time zone of where app was installation"""
timeZone: String
"""version of app installation"""
appVersion: String
}
type ObjectUpdateStatus {
type: String!
primaryKeyName: String!
primaryKeyValue: String!
sortKeyName: String
sortKeyValue: String
}
"""A room that has blinds in it"""
type Room {
"""id of user that created the blind"""
userId: String!
"""unique id for the room"""
id: String
"""
blind position between 0 and 1: 0 is closed tilted down, 1 is closed tilted up
"""
defaultClosePosition: Float!
"""
blind position between 0 and 1: 0 is closed tilted down, 1 is closed tilted upg
"""
defaultOpenPosition: Float!
"""
4 byte timestamp in seconds since Jan 1, 2001 when either open or close position was updated on the blind
"""
lastUpdateDefaultPositions: Int!
"""
4 byte timestamp in seconds since Jan 1, 2001 when schedule was updated on the blind
"""
lastUpdateSchedule: Int!
"""user visable name of the room"""
name: String!
"""
encoded string representing the schedule for opening and closing the blinds in the room
"""
scheduleData: String
energySavingsEnabled: Boolean
energySavingsTemperatureSetPoint: Float
energySavingsPosition: Float
energySavingsResumeEnabled: Boolean
"""whether or not object is deleted"""
deleted: Boolean!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
"""
unix timestamp when object was last updated on the client. It is the client's
responsibility to provide this. By default, the server won't update an object
if the clientUpdatedAt is larger (later) than what is provide in the mutation
"""
clientUpdatedAt: Float!
}
"""A room that has blinds in it"""
input RoomInput {
"""unique id for the room"""
id: String = "function v4(options, buf, offset) {\\n var i = buf && offset || 0;\\n\\n if (typeof(options) == 'string') {\\n buf = options === 'binary' ? new Array(16) : null;\\n options = null;\\n }\\n options = options || {};\\n\\n var rnds = options.random || (options.rng || rng)();\\n\\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\\n\\n // Copy bytes to buffer, if provided\\n if (buf) {\\n for (var ii = 0; ii < 16; ++ii) {\\n buf[i + ii] = rnds[ii];\\n }\\n }\\n\\n return buf || bytesToUuid(rnds);\\n}"
"""
blind position between 0 and 1: 0 is closed tilted down, 1 is closed tilted up
"""
defaultClosePosition: Float! = 1
"""
blind position between 0 and 1: 0 is closed tilted down, 1 is closed tilted upg
"""
defaultOpenPosition: Float! = 0.5
"""
4 byte timestamp in seconds since Jan 1, 2001 when either open or close position was updated on the blind
"""
lastUpdateDefaultPositions: Int!
"""
4 byte timestamp in seconds since Jan 1, 2001 when schedule was updated on the blind
"""
lastUpdateSchedule: Int!
"""user visable name of the room"""
name: String!
"""
encoded string representing the schedule for opening and closing the blinds in the room
"""
scheduleData: String
energySavingsEnabled: Boolean
energySavingsTemperatureSetPoint: Float
energySavingsPosition: Float
energySavingsResumeEnabled: Boolean
"""whether or not object is deleted"""
deleted: Boolean!
"""
unix timestamp when object was last updated on the client. It is the client's
responsibility to provide this. By default, the server won't update an object
if the clientUpdatedAt is larger (later) than what is provide in the mutation
"""
clientUpdatedAt: Float!
"""bypasses the clientUpdatedAt timestamp check for mutations"""
forceWrite: Boolean
}
"""Sensor Data"""
type SensorData {
"""Sensor Data user id"""
userId: String!
recordedTimestamp: Float!
"""Sensor Data blind name"""
blindName: String
"""Sensor Data installation Id"""
installationID: String!
"""Sensor Data room name"""
roomName: String
"""Sensor Data user email"""
userEmail: String!
""" Number of Sensor Data readings"""
numberOfReadings: Float!
"""Sensor Data Name"""
sensorDataName: String!
"""Sensor Data URL"""
sensorDataUrl: String!
"""Sensor Data timstamp"""
timestamp: Float!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
}
"""Sensor Data"""
input SensorDataInput {
recordedTimestamp: Float! = 1553862725.231
"""Sensor Data blind name"""
blindName: String
"""Sensor Data installation Id"""
installationID: String!
"""Sensor Data room name"""
roomName: String
"""Sensor Data user email"""
userEmail: String!
""" Number of Sensor Data readings"""
numberOfReadings: Float!
"""Sensor Data Name"""
sensorDataName: String!
"""Sensor Data URL"""
sensorDataUrl: String!
"""Sensor Data timstamp"""
timestamp: Float!
}
enum SmartPosition {
OPEN
CLOSE
}
"""A Smart Switch"""
type SmartSwitch {
"""switch user id"""
userId: String!
"""smart switch id"""
id: String
name: String
encodedMacAddress: String!
"""blue group array"""
blueGroup: [String]
greenGroup: [String]
redGroup: [String]
whiteGroup: [String]
yellowGroup: [String]
bottomSwitchDefaultBlue: Float
bottomSwitchDefaultGreen: Float
bottomSwitchDefaultRed: Float
bottomSwitchDefaultWhite: Float
bottomSwitchDefaultYellow: Float
topSwitchDefaultBlue: Float
topSwitchDefaultGreen: Float
topSwitchDefaultRed: Float
topSwitchDefaultWhite: Float
topSwitchDefaultYellow: Float
"""whether or not object is deleted"""
deleted: Boolean!
"""unix timestamp when object was created"""
createdAt: Float!
"""unix timestamp when object was last updated on the server"""
updatedAt: Float!
"""
unix timestamp when object was last updated on the client. It is the client's
responsibility to provide this. By default, the server won't update an object
if the clientUpdatedAt is larger (later) than what is provide in the mutation
"""
clientUpdatedAt: Float!
}
"""A Smart Switch"""
input SmartSwitchInput {
"""smart switch id"""
id: String = "function v4(options, buf, offset) {\\n var i = buf && offset || 0;\\n\\n if (typeof(options) == 'string') {\\n buf = options === 'binary' ? new Array(16) : null;\\n options = null;\\n }\\n options = options || {};\\n\\n var rnds = options.random || (options.rng || rng)();\\n\\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\\n\\n // Copy bytes to buffer, if provided\\n if (buf) {\\n for (var ii = 0; ii < 16; ++ii) {\\n buf[i + ii] = rnds[ii];\\n }\\n }\\n\\n return buf || bytesToUuid(rnds);\\n}"
name: String
encodedMacAddress: String!
"""blue group array"""
blueGroup: [String]
greenGroup: [String]
redGroup: [String]
whiteGroup: [String]
yellowGroup: [String]
bottomSwitchDefaultBlue: Float
bottomSwitchDefaultGreen: Float
bottomSwitchDefaultRed: Float
bottomSwitchDefaultWhite: Float
bottomSwitchDefaultYellow: Float
topSwitchDefaultBlue: Float
topSwitchDefaultGreen: Float
topSwitchDefaultRed: Float
topSwitchDefaultWhite: Float
topSwitchDefaultYellow: Float
"""whether or not object is deleted"""
deleted: Boolean!
"""
unix timestamp when object was last updated on the client. It is the client's
responsibility to provide this. By default, the server won't update an object
if the clientUpdatedAt is larger (later) than what is provide in the mutation
"""
clientUpdatedAt: Float!
"""bypasses the clientUpdatedAt timestamp check for mutations"""
forceWrite: Boolean
}
type UpdateStatus {
notUpdated: [ObjectUpdateStatus]
updated: [ObjectUpdateStatus]
success: Boolean
}
"""A user"""
type User {
"""unique id for the user"""
id: String!
"""user's email address"""
email: String!
"""whether or not the user has varified the email address"""
emailVerified: Boolean!