forked from sidneys/pb-for-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pushbullet.d.ts
1402 lines (1286 loc) · 32.8 KB
/
pushbullet.d.ts
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
// TypeScript Type definitions for Pushbullet Web Client (https://pushbullet.com)
// sidneys
// https://github.com/sidneys/pb-for-desktop
/// <reference types="node" />
declare namespace Pushbullet {
/**
* Push Direction
*/
enum MessageDirection {
incoming = 'incoming',
outgoing = 'outgoing',
self = 'self',
}
/**
* Base Push Types
*/
enum PushType {
Default = 'push',
Note = 'note',
Link = 'link',
File = 'file',
}
/**
* Image URLs
*/
enum ImageUrl {
Everything = '/img/deviceicons/everything.png',
System = '/img/deviceicons/system.png',
User = '/img/deviceicons/user.png',
Phone = '/img/deviceicons/phone.png',
Group = '/img/deviceicons/system.png'
}
/**
* Ephemeral Types
*/
enum EphemeralType {
Sms = 'messaging_extension_reply',
SmsChanged = 'sms_changed',
Notification = 'mirror',
Dismissal = 'dismissal',
Clipboard = 'clip'
}
/**
* Package Names
*/
enum PackageName {
Android = 'com.pushbullet.android',
}
/**
* Package Names
*/
enum URI {
Api = 'https://api.pushbullet.com',
Log = 'https://ocelot.pushbullet.com',
Redirect = 'https://www.pushbullet.com/'
}
/**
* Objects (such as pushes and devices) can be created, modified,
* listed and deleted. All timestamps that appear on objects are
* floating point seconds since the epoch, also called Unix Time.
*/
interface Item {
/**
* Unique identifier for this object
* Example: "ujpah72o0sjAoRtnM0jc"
*/
iden: string
/**
* false if the item has been deleted
* Example: true
*/
active: boolean
/**
* Creation time in floating point seconds (unix timestamp)
* Example: 1.381092887398433e+09
*/
created: number
/**
* Last modified time in floating point seconds (unix timestamp)
* Example: 1.441054560741007e+09
*/
modified: number
}
/**
* A Push.
*/
interface Push extends Item {
/**
* Type of the push, one of "note", "file", "link".
* Example: "note"
*/
type: PushType
/**
* true if the push has been dismissed by any device or if any device
* was active when the push was received
* Example: false
*/
dismissed: boolean
/**
* Unique identifier set by the client, used to identify a push in case you
* receive it from /v2/everything before the call to /v2/pushes has completed.
* This should be a unique value. Pushes with guid set are mostly idempotent,
* meaning that sending another push with the same guid is unlikely to create
* another push (it will return the previously created push).
* Example: "993aaa48567d91068e96c75a74644159"
*/
guid: string
/**
* Direction the push was sent in, can be "self", "outgoing", or "incoming"
* Example: "self"
*/
direction: MessageDirection
/**
* User iden of the sender
* Example: "ujpah72o0"
*/
sender_iden: string
/**
* Email address of the sender
* Example: "elon@teslamotors.com"
*/
sender_email: string
/**
* Canonical email address of the sender
* Example: "elon@teslamotors.com"
*/
sender_email_normalized: string
/**
* Name of the sender
* Example: "Elon Musk"
*/
sender_name: string
/**
* User iden of the receiver
* Example: "ujpah72o0"
*/
receiver_iden: string
/**
* Email address of the receiver
* Example: "elon@teslamotors.com"
*/
receiver_email: string
/**
* Canonical email address of the receiver
* Example: "elon@teslamotors.com"
*/
receiver_email_normalized: string
/**
* Device iden of the target device, if sending to a single device
* Example: "ujpah72o0sjAoRtnM0jc"
*/
target_device_iden: string
/**
* Device iden of the sending device. Optionally set by the sender when creating a push
* Example: "ujpah72o0sjAoRtnM0jc"
*/
source_device_iden: string
/**
* If the push was created by a client, set to the iden of that client.
* Example: "ujpah72o0sjAoRtnM0jc"
*/
client_iden: string
/**
* If the push was created by a channel, set to the iden of that channel
* Example: "ujpah72o0sjAoRtnM0jc"
*/
channel_iden: string
/**
* List of guids (client side identifiers, not the guid field on pushes)
* for awake apps at the time the push was sent. If the length of this
* list is > 0, dismissed will be set to true and the awake app(s) must
* decide what to do with the notification
* Example: ["web-2d8cdf2a2b9b","web-cdb2313c74e"]
*/
awake_app_guids: string[]
/**
* Title of the push, used for all types of pushes
* Example: "Space Travel Ideas"
*/
title: string
/**
* Body of the push, used for all types of pushes
* Example: "Space Elevator, Mars Hyperloop, Space Model S (Model Space?)
*/
body: string
/**
* URL field, used for type="link" pushes
* Example: "http://www.teslamotors.com/"
*/
url: string
/**
* File name, used for type="file" pushes
* Example: "john.jpg"
*/
file_name: string
/**
* File mime type, used for type="file" pushes
* Example: "image/jpeg"
*/
file_type: string
/**
* File download url, used for type="file" pushes
* Example: "https://dl.pushbulletusercontent.com
* /foGfub1jtC6yYcOMACk1AbHwTrTKvrDc/john.jpg"
*/
file_url: string
/**
* URL to an image to use for this push, present on
* type="file" pushes if file_type matches image/*
* Example: "https://lh3.googleuserconten.com
* /mrrz35lLbiYAz8ejkJcpdsYhN3tMEtrXxj93k_gQPin4GfdD
* jVy2Bj26pOGrpFQmAM7OFBHcDfdMjrScg3EUIJrgJeY"
*/
image_url: string
/**
* Width of image in pixels, only present if image_url is set
* Example: 322
*/
image_width: number
/**
* Height of image in pixels, only present if image_url is set
* Example: 484
*/
image_height: number
}
/**
* Chats are created whenever you send a message to someone or a receive
* a message from them and there is no existing chat between you and the
* other user.
*/
interface Chat extends Item {
/**
* If true, notifications from this chat will not be shown
* Example: false
*/
muted: boolean
/**
* The user or email that the chat is with
*/
with: {
/**
* If this is a user, the iden of that user
* Example: "ujlMns72k"
*/
iden: string
/**
* "email" or "user"
* Example: "user"
*/
type: ('email' | 'user')
/**
* Name of the person
* Example: "John Carmack"
*/
name: string
/**
* Email address of the person
* Example: "carmack@idsoftware.com"
*/
email: string
/**
* Canonical email address of the person
* Example: "carmack@idsoftware.com"
*/
email_normalized: string
/**
* Image to display for the person
* Example: "https://dl.pushbulletusercontent.com
* /foGfub1jtC6yYcOMACk1AbHwTrTKvrDc/john.jpg"
*/
image_url: string
}
}
/**
* A Device.
*/
interface Device extends Item {
/**
* Icon to use for this device, can be an arbitrary string.
* Commonly used values are: "desktop", "browser", "website", "laptop", "tablet", "phone", "watch", "system"
* Example: ios
*/
icon?: string
/**
* Name to use when displaying the device
* Example: "Elon Musk's iPhone"
*/
nickname?: string
/**
* true if the nickname was automatically generated from the manufacturer and model fields (only used for some android phones)
* Example: true
*/
generated_nickname?: boolean
/**
* Manufacturer of the device
* Example: "Apple
*/
manufacturer?: string
/**
* Model of the device
* Example: "iPhone 5s (GSM)"
*/
model: string
/**
* Version of the Pushbullet application installed on the device
* Example: 8623
*/
app_version?: number
/**
* String fingerprint for the device, used by apps to avoid duplicate
* devices. Value is platform-specific.
* Example: "nLN19IRNzS5xidPF+X8mKGNRpQo2X6XBgyO30FL6OiQ="
*/
fingerprint?: string
/**
* Fingerprint for the device's end-to-end encryption key, used to
* determine which devices the current device (based on its own
* key fingerprint) will be able to talk to.
* Example: "5ae6ec7e1fe681861b0cc85c53accc13bf94c11db7461a2808903f7469bfda56"
*/
key_fingerprint?: string
/**
* Platform-specific push token. If you are making your own device, leave
* this blank and you can listen for events on the Realtime Event Stream.
* Example: "production:f73be0ee7877c8c7fa69b1468cde764f"
*/
push_token?: (string | null)
/**
* true if the devices has SMS capability, currently only true for type="android" devices
* Example: true
*/
has_sms?: boolean
/**
* true if the devices has MMS capability, currently only true for type="android" devices
* Example: true
*/
has_mms?: boolean
/**
* @deprecated use {@link icon} field instead
* Type of device, can be an arbitrary string.
* Commonly used values are: "android", "chrome", "firefox", "ios", "windows", "stream", "safari", "mac", "opera", "website"
*/
type?: string
/**
* @deprecated old name for {@link type}
*/
kind?: string
/**
* @deprecated used to be for partially-initialized type="android" devices
*/
pushable?: string
}
/**
* Subscribe to channels to receive any updates pushed to that channel.
* Channels can be created on the website. Each channel has a unique tag to identify it.
* When you push to a channel, all people subscribed to that channel will receive a push.
* To push to a channel, use the channel_tag parameter on create-push
*/
interface Subscription extends Item {
/**
* If true, notifications from this chat will not be shown
* Example: false
*/
muted: boolean
/**
* Information about the channel that is being subscribed to
*/
channel: {
/**
* Unique identifier for the channel
* Example: "ujpah72o0sjAoRtnM0jc"
*/
iden: string
/**
* Unique tag for this channel
* Example: "elonmusknews"
*/
tag: string
/**
* Name of the channel
* Example: "Elon Musk News"
*/
name: string
/**
* Description of the channel
* Example: "News about Elon Musk."
*/
description: string
/**
* Image for the channel
* Example: "https://dl.pushbulletusercontent.com/StzRmwdkIe8gluBH3XoJ9HjRqjlUYSf4/musk.jpg"
*/
image_url: string
/**
/**
* Link to a website for the channel
* Example: "https://twitter.com/elonmusk"
*/
website_url: string
}
}
/**
* User
*/
interface User extends Item {
/**
* Email address
* Example: "elon@teslamotors.com"
*/
email: string
/**
* Canonical email address
* Example: "elon@teslamotors.com"
*/
email_normalized: string
/**
* Full name if available
* Example: "Elon Musk"
*/
name: string
/**
* URL for image of user or placeholder image
* Example: "https://static.pushbullet.com/missing-image/55a7dc-45"
*/
image_url: string
/**
* Maximum upload size in bytes
* Example: 26214400
*/
max_upload_size: number
/**
* Number of users referred by this user
* Example: 2
*/
referred_count: number
/**
* User iden for the user that referred the current user, if set
* Example: "ujlxm0aiz2"
*/
referrer_iden: string
}
/**
* OAuth Grants (Connected Apps)
*/
interface Grant extends Item {
client: {
/**
* Unique identifier for the grant
* Example: "ujpah72o0sjAoRtnM0jc"
*/
iden: string
/**
* Image for the grant
* Example: "https://dl.pushbulletusercontent.com/StzRmwdkIe8gluBH3XoJ9HjRqjlUYSf4/musk.jpg"
*/
image_url: string
/**
* Name of the grant
* Example: "Elon Musk News"
*/
name: string
/**
/**
* Link to a website for the grant
* Example: "https://twitter.com/elonmusk"
*/
website_url: string
}
}
/**
* Text
*/
interface Text extends Item {
data: {
/**
* The iden of the device corresponding to the phone that should send the text.
* Example: "ujpah72o0sjAoRtnM0jc"
*/
target_device_iden: string
/**
* The phone numbers the text should be sent to.
* Example: "000155533133"
*/
addresses: string[]
/**
* The text message to send.
* Example: "Hello!"
*/
message: string
/**
* File mime type, used for type="file" pushes
* Example: "image/jpeg"
*/
file_type: string
}
}
/**
* You can send arbitrary JSON messages, called "ephemerals", to all
* devices on your account. Ephemerals are stored for a short period of
* time (if at all) and are sent directly to devices.
*/
interface BaseEphemeral {
/**
* Must be set to push which is the only type of ephemeral currently.
*/
type: "push"
/**
* true if the message is encrypted
* Example: "MXAdvN64uXWtLXCRaqYHEtGhiogR1VHyXX21Lpjp4jv3v+JWygMBA9Wp5npbQdfeZAgOZI+JT3y3pbmq+OrKXrK1rg=="
*/
encrypted?: boolean
/**
* Base64-Encoded JSON Object
* Example: "MXAdvN64uXWtLXCRaqYHEtGhiogR1VHyXX21Lpjp4jv3v+JWygMBA9Wp5npbQdfeZAgOZI+JT3y3pbmq+OrKXrK1rg=="
*/
ciphertext?: string
/**
* JSON Data
* Example: "MXAdvN64uXWtLXCRaqYHEtGhiogR1VHyXX21Lpjp4jv3v+JWygMBA9Wp5npbQdfeZAgOZI+JT3y3pbmq+OrKXrK1rg=="
*/
push?: (SmsEphemeral | SmsChangeEphemeral | NotificationEphemeral | DismissalEphemeral | ClipboardEphemeral)
}
/**
* SMS Ephemeral
*/
interface SmsEphemeral {
/**
* "messaging_extension_reply" for sending SMS.
*/
type: EphemeralType.Sms
/**
* The user iden of the user sending this message.
* Example: "ujpah72o0"
*/
source_user_iden: string
/**
* "com.pushbullet.android" for sending SMS.
*/
package_name: PackageName.Android
/**
* The iden of the device corresponding to the phone that should send the SMS.
* Example: "ujpah72o0sjAoRtnM0jc"
*/
target_device_iden: string
/**
* Phone number to send the SMS to.
* Example: "+1 303 555 1212"
*/
conversation_iden: string
/**
* The SMS message to send.
* Example: "Hello!"
*/
message: string
}
/**
* SmS Change Ephemeral Data
*/
interface SmsChangeEphemeral {
/**
* "clip" for clipboard messages.
*/
type: EphemeralType.SmsChanged
/**
* The iden of the device sending this message.
* Example: "ujpah72o0sjAoRtnM0jc"
*/
source_device_iden: string
/**
* The iden of the device sending this message.
* Example: "ujpah72o0sjAoRtnM0jc"
*/
notifications: {
/**
* The SMS message text
* Example: "Hello!"
*/
body: string
/**
* The SMS messages' originating phone number
* Example: "6505551212"
*/
title: string
/**
* The SMS messages' timestamp
* Example: 1546022176
*/
timestamp: number
/**
* Unique identifier of the corresponding SMS message thread
* Example: "3"
*/
thread_id: string
}
}
/**
* Mirrored Notification Ephemeral
*/
interface NotificationEphemeral {
/**
* "mirror" for mirrored notifications.
*/
type: EphemeralType.Notification
/**
* The user iden of the user sending this message.
* Example: "ujpah72o0"
*/
source_user_iden: string
/**
* Base64-encoded JPEG image to use as the icon of the push.
* Example: "/9j/4AAQSkZJRgABAQAA [..]"
*/
icon: string
/**
* The title of the notification.
* Example: "Mirroring test"
*/
title: string
/**
* The body of the notification.
* Example: "If you see this on your computer, Android-to-PC notifications are working!\n"
*/
body: string
/**
* The iden of the device sending this message.
* Example: "ujpah72o0sjAoRtnM0jc"
*/
source_device_iden: string
/**
* The name of the application that created the notification.
* Example: "Pushbullet"
*/
application_name: string
/**
* True if the notification can be dismissed.
* Example: true
*/
dismissable: boolean
/**
* The package that made the notification, used when updating/dismissing an existing notification.
* Example: "com.pushbullet.android"
*/
package_name: string
/**
* The id of the notification, used when updating/dismissing an existing notification.
* Example: "-8"
*/
notification_id: string
/**
* The tag of the notification, used when updating/dismissing an existing notification.
* Example: null
*/
notification_tag: (string | null)
/**
* The phone is rooted.
* Example: false
*/
has_root: boolean
/**
* The client version of the app sending this message.
* Example: 125
*/
client_version: number
}
/**
* Dismissal Ephemeral
*/
interface DismissalEphemeral {
/**
* "dismissal" for notification dismissals.
*/
type: EphemeralType.Dismissal
/**
* The user iden of the user sending this message.
* Example: "ujpah72o0"
*/
source_user_iden: string
/**
* Set to the package_name field from the mirrored notification.
*/
package_name: string
/**
* Set to the notification_id field from the mirrored notification.
* Example: "-8"
*/
notification_id: string
/**
* Set to the notification_tag field from the mirrored notification.
* Example: null
*/
notification_tag: (string | null)
}
/**
* Clipboard Ephemeral Data
*/
interface ClipboardEphemeral {
/**
* "clip" for clipboard messages.
*/
type: EphemeralType.Dismissal
/**
* The user iden of the user sending this message.
* Example: "ujpah72o0"
*/
source_user_iden: string
/**
* The text to copy to the clipboard.
*/
body: string
/**
* The iden of the device sending this message.
* Example: "ujpah72o0sjAoRtnM0jc"
*/
source_device_iden: string
}
}
/**
* Pushbullet Web Client Interface via window.pb
*/
declare namespace PushbulletBrowserClient {
interface Window {
/**
* window.pb
*/
pb: {
VERSION: number
DEBUG: boolean
API_SERVER: Pushbullet.URI.Api
AUTH_REDIRECT_URI: Pushbullet.URI.Log
LOG_SERVER: Pushbullet.URI.Log
URLS: {
android: 'https://play.google.com/store/apps/details?id=com.pushbullet.android&referrer=utm_source%3Dpushbullet.com'
chrome: 'https://chrome.google.com/webstore/detail/chlffgpmiacpedhhbkiomidkjlcfhogd'
firefox: 'https://addons.mozilla.org/en-US/firefox/addon/pushbullet/versions/'
ios: 'https://itunes.apple.com/us/app/pushbullet/id810352052?ls=1&mt=8'
mac: 'https://itunes.apple.com/us/app/pushbullet-from-pushbullet/id948415170?ls=1&mt=12'
opera: 'https://addons.opera.com/en/extensions/details/pushbullet/'
safari: 'http://update.pushbullet.com/extension.safariextz'
windows: 'https://update.pushbullet.com/pushbullet_installer.exe'
}
session_id: string
file_dragging: boolean
in_frame: boolean
PUSH_PER_PAGE: number
show_pushes: number
client_id: string
stuff_loaded: boolean
delete_mode: null
rename_mode: null
logging_in: boolean
pro: {
plan: string
upgrading: boolean
}
db: {
VERSION: number
local_storage: boolean
}
channels: {
uploading: boolean
file_url: string
}
channel_create: {
expanded: boolean
}
chats: {
picker: Picker
}
everything: {
modified_after: string
cursor: {}
}
net: {
API_VERSION: string
USER_AGENT: string
}
header: {
height: number
navs: Array<[string, string]>
mobile: boolean
}
path: string[]
visit_info: {
path: string
referrer: string
browser_name: string
browser_version: string
browser_mobile: boolean
user_agent: string
platform: string
language: string
encryption: boolean
}
browser: {
name: string
version: string
mobile: boolean
}
setup: {
invite_picker: Picker
invite_emails: {}
}
account: Pushbullet.User
pushbox: {
target: object
scroll_lock: boolean
width_minibar: number
width_sidebar: number
width_mainbar: number
}
support: {
email: string
message: string
message_sent: boolean
guesses: object[]
name: string
}
remotefiles: {
view: string
device_started: boolean
popup: object
}
pushform: {
target: object
expanded: boolean
type: string
title?: string
content?: string
url?: string
address?: string
file_name: string
file_url?: string
file_type?: string
file_progress: number
message: string
error_message: string
waiting: boolean
to_selection: number
picker: {
props: {
direction: string
placeholder: string
clear_on_click: boolean
}
search?: string
target: string
}
showing: boolean
}
search: {
type: string
q: string
}
targets: {
delete_check_iden: string
block_check_iden: string
}
sms: {
q: string[]
message_time_out: number
count: number
form_showing: boolean
picker: Picker
new_sms_picker: Picker
target: object
wants_thread_id: string
}
chat_heads: object
clients: object
oauth: object
widget: object
error: object
pushes: object
/**
* Pushbullet Backend API Suites
*/
api: {
accounts: PushbulletApiSuite.AccountsApi
devices: PushbulletApiSuite.DevicesApi
grants: PushbulletApiSuite.GrantsApi
pinger: PushbulletApiSuite.PingerSuite
pushes: PushbulletApiSuite.PushesApi
sms: PushbulletApiSuite.SmsApi
text: PushbulletApiSuite.TextsApi
},
/**
* E2E Utilities
*/
e2e: {
decrypt(encrypted: string): string
enabled: boolean
encrypt(plaintext: string): string
error: boolean
init(): void
key_fingerprint: string
set_password(plaintext: string): string
}
},
/**
* UI Utilities
*/
onecup: {
/**
* Navigates to the given URL.
*/
goto(url: string): void
/**
* Marks the UI as requiring a refresh.
*/
refresh(): void
}
/**
* Sidebar Utilities
*/
sidebar: {
needs_update: boolean
/**
* Marks the Sidebar as requiring a refresh.
*/
update(): void
},
/**
* SMS Utilities
*/
sms: {
message_time_out: 30000
count: number
form_showing: boolean
picker: object
send(message: string): void
send_new(): void
send_file(file: Pushbullet.Push): void
target: {
desc: string
image_url: string
info: {
blurb: ""
count: number
recent: number
}
name: string
obj: Pushbullet.Device
type: string
url: string
}
}
/**
* Websocket Utilities
*/
ws: {
last_message: 30000
connected: boolean
socket: WebSocket
}
/**
* Push Targeting Utilities
*/
targets: {
block_check_iden: string
by_device_iden(iden: string): Pushbullet.Item
by_email(email: string): Pushbullet.Item
by_tag(tag: string): Pushbullet.Item
chats(): Pushbullet.Chat[]
delete_check_iden: string
devices: Pushbullet.Device[]
generate(): void
make(obj: Pushbullet.Item, force_type?: string): Pushbullet.Item
make_ac_target(ac: Pushbullet.Chat): Pushbullet.Item
make_email(email: string): Pushbullet.Item
make_phone(phone: string): Pushbullet.Item
match(target: object): boolean
subscriptions(): Pushbullet.Item[]
}
/**
* Generate Random Identifier