particle-api-js 9.0.1 → 9.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Particle.js CHANGED
@@ -190,6 +190,7 @@ var Particle = function () {
190
190
  * @param {Object} options.auth Access token
191
191
  * @param {Object} options.mfaToken Token given from previous step to
192
192
  * @param {Object} options.otp Current one-time-password generated from the authentication app
193
+ * @param {Boolean} options.invalidateTokens Should all tokens be invalidated
193
194
  * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
194
195
  * @param {Object} [options.context] Request context
195
196
  * @returns {Promise} A promise
@@ -200,15 +201,23 @@ var Particle = function () {
200
201
  value: function confirmMfa(_ref4) {
201
202
  var mfaToken = _ref4.mfaToken,
202
203
  otp = _ref4.otp,
204
+ _ref4$invalidateToken = _ref4.invalidateTokens,
205
+ invalidateTokens = _ref4$invalidateToken === undefined ? false : _ref4$invalidateToken,
203
206
  auth = _ref4.auth,
204
207
  headers = _ref4.headers,
205
208
  context = _ref4.context;
206
209
 
210
+ var data = { mfa_token: mfaToken, otp: otp };
211
+
212
+ if (invalidateTokens) {
213
+ data.invalidate_tokens = true;
214
+ }
215
+
207
216
  return this.post({
208
217
  uri: '/v1/user/mfa-enable',
209
218
  auth: auth,
210
219
  headers: headers,
211
- data: { mfa_token: mfaToken, otp: otp },
220
+ data: data,
212
221
  context: context
213
222
  });
214
223
  }
@@ -436,23 +445,47 @@ var Particle = function () {
436
445
  }
437
446
 
438
447
  /**
439
- * Delete the current user
448
+ * Revoke all active access tokens
440
449
  * @param {Object} options Options for this API call
441
450
  * @param {String} options.auth Access Token
442
- * @param {String} options.password Password
443
451
  * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
444
452
  * @param {Object} [options.context] Request context
445
453
  * @returns {Promise} A promise
446
454
  */
447
455
 
448
456
  }, {
449
- key: 'deleteUser',
450
- value: function deleteUser(_ref13) {
457
+ key: 'deleteActiveAccessTokens',
458
+ value: function deleteActiveAccessTokens(_ref13) {
451
459
  var auth = _ref13.auth,
452
- password = _ref13.password,
453
460
  headers = _ref13.headers,
454
461
  context = _ref13.context;
455
462
 
463
+ return this.delete({
464
+ uri: '/v1/access_tokens',
465
+ auth: auth,
466
+ headers: headers,
467
+ context: context
468
+ });
469
+ }
470
+
471
+ /**
472
+ * Delete the current user
473
+ * @param {Object} options Options for this API call
474
+ * @param {String} options.auth Access Token
475
+ * @param {String} options.password Password
476
+ * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
477
+ * @param {Object} [options.context] Request context
478
+ * @returns {Promise} A promise
479
+ */
480
+
481
+ }, {
482
+ key: 'deleteUser',
483
+ value: function deleteUser(_ref14) {
484
+ var auth = _ref14.auth,
485
+ password = _ref14.password,
486
+ headers = _ref14.headers,
487
+ context = _ref14.context;
488
+
456
489
  return this.delete({
457
490
  uri: '/v1/user',
458
491
  data: { password: password },
@@ -467,6 +500,7 @@ var Particle = function () {
467
500
  * @param {Object} options Options for this API call
468
501
  * @param {String} options.username Username
469
502
  * @param {String} options.password Password
503
+ * @param {String} options.otp Current one-time-password generated from the authentication application
470
504
  * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
471
505
  * @param {Object} [options.context] Request context
472
506
  * @returns {Promise} A promise
@@ -474,15 +508,17 @@ var Particle = function () {
474
508
 
475
509
  }, {
476
510
  key: 'listAccessTokens',
477
- value: function listAccessTokens(_ref14) {
478
- var username = _ref14.username,
479
- password = _ref14.password,
480
- headers = _ref14.headers,
481
- context = _ref14.context;
511
+ value: function listAccessTokens(_ref15) {
512
+ var username = _ref15.username,
513
+ password = _ref15.password,
514
+ otp = _ref15.otp,
515
+ headers = _ref15.headers,
516
+ context = _ref15.context;
482
517
 
483
518
  return this.get({
484
519
  uri: '/v1/access_tokens',
485
520
  auth: { username: username, password: password },
521
+ query: otp ? { otp: otp } : undefined,
486
522
  headers: headers,
487
523
  context: context
488
524
  });
@@ -502,12 +538,12 @@ var Particle = function () {
502
538
  }, {
503
539
  key: 'trackingIdentity',
504
540
  value: function trackingIdentity() {
505
- var _ref15 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
506
- _ref15$full = _ref15.full,
507
- full = _ref15$full === undefined ? false : _ref15$full,
508
- auth = _ref15.auth,
509
- headers = _ref15.headers,
510
- context = _ref15.context;
541
+ var _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
542
+ _ref16$full = _ref16.full,
543
+ full = _ref16$full === undefined ? false : _ref16$full,
544
+ auth = _ref16.auth,
545
+ headers = _ref16.headers,
546
+ context = _ref16.context;
511
547
 
512
548
  return this.get({
513
549
  uri: '/v1/user/identify',
@@ -537,18 +573,18 @@ var Particle = function () {
537
573
 
538
574
  }, {
539
575
  key: 'listDevices',
540
- value: function listDevices(_ref16) {
541
- var deviceId = _ref16.deviceId,
542
- deviceName = _ref16.deviceName,
543
- groups = _ref16.groups,
544
- sortAttr = _ref16.sortAttr,
545
- sortDir = _ref16.sortDir,
546
- page = _ref16.page,
547
- perPage = _ref16.perPage,
548
- product = _ref16.product,
549
- auth = _ref16.auth,
550
- headers = _ref16.headers,
551
- context = _ref16.context;
576
+ value: function listDevices(_ref17) {
577
+ var deviceId = _ref17.deviceId,
578
+ deviceName = _ref17.deviceName,
579
+ groups = _ref17.groups,
580
+ sortAttr = _ref17.sortAttr,
581
+ sortDir = _ref17.sortDir,
582
+ page = _ref17.page,
583
+ perPage = _ref17.perPage,
584
+ product = _ref17.product,
585
+ auth = _ref17.auth,
586
+ headers = _ref17.headers,
587
+ context = _ref17.context;
552
588
 
553
589
  var uri = void 0,
554
590
  query = void 0;
@@ -577,12 +613,12 @@ var Particle = function () {
577
613
 
578
614
  }, {
579
615
  key: 'getDevice',
580
- value: function getDevice(_ref17) {
581
- var deviceId = _ref17.deviceId,
582
- product = _ref17.product,
583
- auth = _ref17.auth,
584
- headers = _ref17.headers,
585
- context = _ref17.context;
616
+ value: function getDevice(_ref18) {
617
+ var deviceId = _ref18.deviceId,
618
+ product = _ref18.product,
619
+ auth = _ref18.auth,
620
+ headers = _ref18.headers,
621
+ context = _ref18.context;
586
622
 
587
623
  var uri = this.deviceUri({ deviceId: deviceId, product: product });
588
624
  return this.get({ uri: uri, auth: auth, headers: headers, context: context });
@@ -600,12 +636,12 @@ var Particle = function () {
600
636
 
601
637
  }, {
602
638
  key: 'claimDevice',
603
- value: function claimDevice(_ref18) {
604
- var deviceId = _ref18.deviceId,
605
- requestTransfer = _ref18.requestTransfer,
606
- auth = _ref18.auth,
607
- headers = _ref18.headers,
608
- context = _ref18.context;
639
+ value: function claimDevice(_ref19) {
640
+ var deviceId = _ref19.deviceId,
641
+ requestTransfer = _ref19.requestTransfer,
642
+ auth = _ref19.auth,
643
+ headers = _ref19.headers,
644
+ context = _ref19.context;
609
645
 
610
646
  return this.post({
611
647
  uri: '/v1/devices',
@@ -634,13 +670,13 @@ var Particle = function () {
634
670
 
635
671
  }, {
636
672
  key: 'addDeviceToProduct',
637
- value: function addDeviceToProduct(_ref19) {
638
- var deviceId = _ref19.deviceId,
639
- product = _ref19.product,
640
- file = _ref19.file,
641
- auth = _ref19.auth,
642
- headers = _ref19.headers,
643
- context = _ref19.context;
673
+ value: function addDeviceToProduct(_ref20) {
674
+ var deviceId = _ref20.deviceId,
675
+ product = _ref20.product,
676
+ file = _ref20.file,
677
+ auth = _ref20.auth,
678
+ headers = _ref20.headers,
679
+ context = _ref20.context;
644
680
 
645
681
  var files = void 0,
646
682
  data = void 0;
@@ -676,13 +712,13 @@ var Particle = function () {
676
712
 
677
713
  }, {
678
714
  key: 'removeDevice',
679
- value: function removeDevice(_ref20) {
680
- var deviceId = _ref20.deviceId,
681
- deny = _ref20.deny,
682
- product = _ref20.product,
683
- auth = _ref20.auth,
684
- headers = _ref20.headers,
685
- context = _ref20.context;
715
+ value: function removeDevice(_ref21) {
716
+ var deviceId = _ref21.deviceId,
717
+ deny = _ref21.deny,
718
+ product = _ref21.product,
719
+ auth = _ref21.auth,
720
+ headers = _ref21.headers,
721
+ context = _ref21.context;
686
722
 
687
723
  var uri = this.deviceUri({ deviceId: deviceId, product: product });
688
724
  var data = product ? { deny: deny } : undefined;
@@ -702,12 +738,12 @@ var Particle = function () {
702
738
 
703
739
  }, {
704
740
  key: 'removeDeviceOwner',
705
- value: function removeDeviceOwner(_ref21) {
706
- var deviceId = _ref21.deviceId,
707
- product = _ref21.product,
708
- auth = _ref21.auth,
709
- headers = _ref21.headers,
710
- context = _ref21.context;
741
+ value: function removeDeviceOwner(_ref22) {
742
+ var deviceId = _ref22.deviceId,
743
+ product = _ref22.product,
744
+ auth = _ref22.auth,
745
+ headers = _ref22.headers,
746
+ context = _ref22.context;
711
747
 
712
748
  var uri = '/v1/products/' + product + '/devices/' + deviceId + '/owner';
713
749
  return this.delete({ uri: uri, auth: auth, headers: headers, context: context });
@@ -727,13 +763,13 @@ var Particle = function () {
727
763
 
728
764
  }, {
729
765
  key: 'renameDevice',
730
- value: function renameDevice(_ref22) {
731
- var deviceId = _ref22.deviceId,
732
- name = _ref22.name,
733
- product = _ref22.product,
734
- auth = _ref22.auth,
735
- headers = _ref22.headers,
736
- context = _ref22.context;
766
+ value: function renameDevice(_ref23) {
767
+ var deviceId = _ref23.deviceId,
768
+ name = _ref23.name,
769
+ product = _ref23.product,
770
+ auth = _ref23.auth,
771
+ headers = _ref23.headers,
772
+ context = _ref23.context;
737
773
 
738
774
  return this.updateDevice({ deviceId: deviceId, name: name, product: product, auth: auth, headers: headers, context: context });
739
775
  }
@@ -752,13 +788,13 @@ var Particle = function () {
752
788
 
753
789
  }, {
754
790
  key: 'signalDevice',
755
- value: function signalDevice(_ref23) {
756
- var deviceId = _ref23.deviceId,
757
- signal = _ref23.signal,
758
- product = _ref23.product,
759
- auth = _ref23.auth,
760
- headers = _ref23.headers,
761
- context = _ref23.context;
791
+ value: function signalDevice(_ref24) {
792
+ var deviceId = _ref24.deviceId,
793
+ signal = _ref24.signal,
794
+ product = _ref24.product,
795
+ auth = _ref24.auth,
796
+ headers = _ref24.headers,
797
+ context = _ref24.context;
762
798
 
763
799
  return this.updateDevice({ deviceId: deviceId, signal: signal, product: product, auth: auth, headers: headers, context: context });
764
800
  }
@@ -777,13 +813,13 @@ var Particle = function () {
777
813
 
778
814
  }, {
779
815
  key: 'setDeviceNotes',
780
- value: function setDeviceNotes(_ref24) {
781
- var deviceId = _ref24.deviceId,
782
- notes = _ref24.notes,
783
- product = _ref24.product,
784
- auth = _ref24.auth,
785
- headers = _ref24.headers,
786
- context = _ref24.context;
816
+ value: function setDeviceNotes(_ref25) {
817
+ var deviceId = _ref25.deviceId,
818
+ notes = _ref25.notes,
819
+ product = _ref25.product,
820
+ auth = _ref25.auth,
821
+ headers = _ref25.headers,
822
+ context = _ref25.context;
787
823
 
788
824
  return this.updateDevice({ deviceId: deviceId, notes: notes, product: product, auth: auth, headers: headers, context: context });
789
825
  }
@@ -802,14 +838,14 @@ var Particle = function () {
802
838
 
803
839
  }, {
804
840
  key: 'markAsDevelopmentDevice',
805
- value: function markAsDevelopmentDevice(_ref25) {
806
- var deviceId = _ref25.deviceId,
807
- _ref25$development = _ref25.development,
808
- development = _ref25$development === undefined ? true : _ref25$development,
809
- product = _ref25.product,
810
- auth = _ref25.auth,
811
- headers = _ref25.headers,
812
- context = _ref25.context;
841
+ value: function markAsDevelopmentDevice(_ref26) {
842
+ var deviceId = _ref26.deviceId,
843
+ _ref26$development = _ref26.development,
844
+ development = _ref26$development === undefined ? true : _ref26$development,
845
+ product = _ref26.product,
846
+ auth = _ref26.auth,
847
+ headers = _ref26.headers,
848
+ context = _ref26.context;
813
849
 
814
850
  return this.updateDevice({ deviceId: deviceId, development: development, product: product, auth: auth, headers: headers, context: context });
815
851
  }
@@ -829,13 +865,13 @@ var Particle = function () {
829
865
 
830
866
  }, {
831
867
  key: 'lockDeviceProductFirmware',
832
- value: function lockDeviceProductFirmware(_ref26) {
833
- var deviceId = _ref26.deviceId,
834
- desiredFirmwareVersion = _ref26.desiredFirmwareVersion,
835
- flash = _ref26.flash,
836
- product = _ref26.product,
837
- auth = _ref26.auth,
838
- context = _ref26.context;
868
+ value: function lockDeviceProductFirmware(_ref27) {
869
+ var deviceId = _ref27.deviceId,
870
+ desiredFirmwareVersion = _ref27.desiredFirmwareVersion,
871
+ flash = _ref27.flash,
872
+ product = _ref27.product,
873
+ auth = _ref27.auth,
874
+ context = _ref27.context;
839
875
 
840
876
  return this.updateDevice({ deviceId: deviceId, desiredFirmwareVersion: desiredFirmwareVersion, flash: flash, product: product, auth: auth, context: context });
841
877
  }
@@ -853,12 +889,12 @@ var Particle = function () {
853
889
 
854
890
  }, {
855
891
  key: 'unlockDeviceProductFirmware',
856
- value: function unlockDeviceProductFirmware(_ref27) {
857
- var deviceId = _ref27.deviceId,
858
- product = _ref27.product,
859
- auth = _ref27.auth,
860
- headers = _ref27.headers,
861
- context = _ref27.context;
892
+ value: function unlockDeviceProductFirmware(_ref28) {
893
+ var deviceId = _ref28.deviceId,
894
+ product = _ref28.product,
895
+ auth = _ref28.auth,
896
+ headers = _ref28.headers,
897
+ context = _ref28.context;
862
898
 
863
899
  return this.updateDevice({ deviceId: deviceId, desiredFirmwareVersion: null, product: product, auth: auth, headers: headers, context: context });
864
900
  }
@@ -883,18 +919,18 @@ var Particle = function () {
883
919
 
884
920
  }, {
885
921
  key: 'updateDevice',
886
- value: function updateDevice(_ref28) {
887
- var deviceId = _ref28.deviceId,
888
- name = _ref28.name,
889
- signal = _ref28.signal,
890
- notes = _ref28.notes,
891
- development = _ref28.development,
892
- desiredFirmwareVersion = _ref28.desiredFirmwareVersion,
893
- flash = _ref28.flash,
894
- product = _ref28.product,
895
- auth = _ref28.auth,
896
- headers = _ref28.headers,
897
- context = _ref28.context;
922
+ value: function updateDevice(_ref29) {
923
+ var deviceId = _ref29.deviceId,
924
+ name = _ref29.name,
925
+ signal = _ref29.signal,
926
+ notes = _ref29.notes,
927
+ development = _ref29.development,
928
+ desiredFirmwareVersion = _ref29.desiredFirmwareVersion,
929
+ flash = _ref29.flash,
930
+ product = _ref29.product,
931
+ auth = _ref29.auth,
932
+ headers = _ref29.headers,
933
+ context = _ref29.context;
898
934
 
899
935
  if (signal !== undefined) {
900
936
  signal = signal ? '1' : '0';
@@ -918,11 +954,11 @@ var Particle = function () {
918
954
 
919
955
  }, {
920
956
  key: 'provisionDevice',
921
- value: function provisionDevice(_ref29) {
922
- var productId = _ref29.productId,
923
- auth = _ref29.auth,
924
- headers = _ref29.headers,
925
- context = _ref29.context;
957
+ value: function provisionDevice(_ref30) {
958
+ var productId = _ref30.productId,
959
+ auth = _ref30.auth,
960
+ headers = _ref30.headers,
961
+ context = _ref30.context;
926
962
 
927
963
  return this.post({
928
964
  uri: '/v1/devices',
@@ -948,23 +984,23 @@ var Particle = function () {
948
984
 
949
985
  }, {
950
986
  key: 'getClaimCode',
951
- value: function getClaimCode(_ref30) {
952
- var iccid = _ref30.iccid,
953
- product = _ref30.product,
954
- auth = _ref30.auth,
955
- headers = _ref30.headers,
956
- context = _ref30.context;
987
+ value: function getClaimCode(_ref31) {
988
+ var iccid = _ref31.iccid,
989
+ product = _ref31.product,
990
+ auth = _ref31.auth,
991
+ headers = _ref31.headers,
992
+ context = _ref31.context;
957
993
 
958
994
  var uri = product ? '/v1/products/' + product + '/device_claims' : '/v1/device_claims';
959
995
  return this.post({ uri: uri, auth: auth, headers: headers, data: { iccid: iccid }, context: context });
960
996
  }
961
997
  }, {
962
998
  key: 'validatePromoCode',
963
- value: function validatePromoCode(_ref31) {
964
- var promoCode = _ref31.promoCode,
965
- auth = _ref31.auth,
966
- headers = _ref31.headers,
967
- context = _ref31.context;
999
+ value: function validatePromoCode(_ref32) {
1000
+ var promoCode = _ref32.promoCode,
1001
+ auth = _ref32.auth,
1002
+ headers = _ref32.headers,
1003
+ context = _ref32.context;
968
1004
 
969
1005
  return this.get({
970
1006
  uri: '/v1/promo_code/' + promoCode,
@@ -975,12 +1011,12 @@ var Particle = function () {
975
1011
  }
976
1012
  }, {
977
1013
  key: 'changeProduct',
978
- value: function changeProduct(_ref32) {
979
- var deviceId = _ref32.deviceId,
980
- productId = _ref32.productId,
981
- auth = _ref32.auth,
982
- headers = _ref32.headers,
983
- context = _ref32.context;
1014
+ value: function changeProduct(_ref33) {
1015
+ var deviceId = _ref33.deviceId,
1016
+ productId = _ref33.productId,
1017
+ auth = _ref33.auth,
1018
+ headers = _ref33.headers,
1019
+ context = _ref33.context;
984
1020
 
985
1021
  return this.put({
986
1022
  uri: '/v1/devices/' + deviceId,
@@ -1005,13 +1041,13 @@ var Particle = function () {
1005
1041
 
1006
1042
  }, {
1007
1043
  key: 'getVariable',
1008
- value: function getVariable(_ref33) {
1009
- var deviceId = _ref33.deviceId,
1010
- name = _ref33.name,
1011
- product = _ref33.product,
1012
- auth = _ref33.auth,
1013
- headers = _ref33.headers,
1014
- context = _ref33.context;
1044
+ value: function getVariable(_ref34) {
1045
+ var deviceId = _ref34.deviceId,
1046
+ name = _ref34.name,
1047
+ product = _ref34.product,
1048
+ auth = _ref34.auth,
1049
+ headers = _ref34.headers,
1050
+ context = _ref34.context;
1015
1051
 
1016
1052
  var uri = product ? '/v1/products/' + product + '/devices/' + deviceId + '/' + name : '/v1/devices/' + deviceId + '/' + name;
1017
1053
 
@@ -1033,14 +1069,14 @@ var Particle = function () {
1033
1069
 
1034
1070
  }, {
1035
1071
  key: 'flashDevice',
1036
- value: function flashDevice(_ref34) {
1037
- var deviceId = _ref34.deviceId,
1038
- product = _ref34.product,
1039
- files = _ref34.files,
1040
- targetVersion = _ref34.targetVersion,
1041
- auth = _ref34.auth,
1042
- headers = _ref34.headers,
1043
- context = _ref34.context;
1072
+ value: function flashDevice(_ref35) {
1073
+ var deviceId = _ref35.deviceId,
1074
+ product = _ref35.product,
1075
+ files = _ref35.files,
1076
+ targetVersion = _ref35.targetVersion,
1077
+ auth = _ref35.auth,
1078
+ headers = _ref35.headers,
1079
+ context = _ref35.context;
1044
1080
 
1045
1081
  var uri = this.deviceUri({ deviceId: deviceId, product: product });
1046
1082
  var form = {};
@@ -1066,11 +1102,11 @@ var Particle = function () {
1066
1102
 
1067
1103
  }, {
1068
1104
  key: 'flashTinker',
1069
- value: function flashTinker(_ref35) {
1070
- var deviceId = _ref35.deviceId,
1071
- auth = _ref35.auth,
1072
- headers = _ref35.headers,
1073
- context = _ref35.context;
1105
+ value: function flashTinker(_ref36) {
1106
+ var deviceId = _ref36.deviceId,
1107
+ auth = _ref36.auth,
1108
+ headers = _ref36.headers,
1109
+ context = _ref36.context;
1074
1110
 
1075
1111
  /* eslint-disable no-console */
1076
1112
  if (console && console.warning) {
@@ -1100,13 +1136,13 @@ var Particle = function () {
1100
1136
 
1101
1137
  }, {
1102
1138
  key: 'compileCode',
1103
- value: function compileCode(_ref36) {
1104
- var files = _ref36.files,
1105
- platformId = _ref36.platformId,
1106
- targetVersion = _ref36.targetVersion,
1107
- auth = _ref36.auth,
1108
- headers = _ref36.headers,
1109
- context = _ref36.context;
1139
+ value: function compileCode(_ref37) {
1140
+ var files = _ref37.files,
1141
+ platformId = _ref37.platformId,
1142
+ targetVersion = _ref37.targetVersion,
1143
+ auth = _ref37.auth,
1144
+ headers = _ref37.headers,
1145
+ context = _ref37.context;
1110
1146
 
1111
1147
  var form = { platform_id: platformId };
1112
1148
 
@@ -1139,11 +1175,11 @@ var Particle = function () {
1139
1175
 
1140
1176
  }, {
1141
1177
  key: 'downloadFirmwareBinary',
1142
- value: function downloadFirmwareBinary(_ref37) {
1143
- var binaryId = _ref37.binaryId,
1144
- auth = _ref37.auth,
1145
- headers = _ref37.headers,
1146
- context = _ref37.context;
1178
+ value: function downloadFirmwareBinary(_ref38) {
1179
+ var binaryId = _ref38.binaryId,
1180
+ auth = _ref38.auth,
1181
+ headers = _ref38.headers,
1182
+ context = _ref38.context;
1147
1183
 
1148
1184
  var req = this.request({
1149
1185
  uri: '/v1/binaries/' + binaryId,
@@ -1171,13 +1207,13 @@ var Particle = function () {
1171
1207
 
1172
1208
  }, {
1173
1209
  key: 'sendPublicKey',
1174
- value: function sendPublicKey(_ref38) {
1175
- var deviceId = _ref38.deviceId,
1176
- key = _ref38.key,
1177
- algorithm = _ref38.algorithm,
1178
- auth = _ref38.auth,
1179
- headers = _ref38.headers,
1180
- context = _ref38.context;
1210
+ value: function sendPublicKey(_ref39) {
1211
+ var deviceId = _ref39.deviceId,
1212
+ key = _ref39.key,
1213
+ algorithm = _ref39.algorithm,
1214
+ auth = _ref39.auth,
1215
+ headers = _ref39.headers,
1216
+ context = _ref39.context;
1181
1217
 
1182
1218
  return this.post({
1183
1219
  uri: '/v1/provisioning/' + deviceId,
@@ -1209,14 +1245,14 @@ var Particle = function () {
1209
1245
 
1210
1246
  }, {
1211
1247
  key: 'callFunction',
1212
- value: function callFunction(_ref39) {
1213
- var deviceId = _ref39.deviceId,
1214
- name = _ref39.name,
1215
- argument = _ref39.argument,
1216
- product = _ref39.product,
1217
- auth = _ref39.auth,
1218
- headers = _ref39.headers,
1219
- context = _ref39.context;
1248
+ value: function callFunction(_ref40) {
1249
+ var deviceId = _ref40.deviceId,
1250
+ name = _ref40.name,
1251
+ argument = _ref40.argument,
1252
+ product = _ref40.product,
1253
+ auth = _ref40.auth,
1254
+ headers = _ref40.headers,
1255
+ context = _ref40.context;
1220
1256
 
1221
1257
  var uri = product ? '/v1/products/' + product + '/devices/' + deviceId + '/' + name : '/v1/devices/' + deviceId + '/' + name;
1222
1258
  return this.post({ uri: uri, auth: auth, headers: headers, data: { args: argument }, context: context });
@@ -1236,12 +1272,12 @@ var Particle = function () {
1236
1272
 
1237
1273
  }, {
1238
1274
  key: 'getEventStream',
1239
- value: function getEventStream(_ref40) {
1240
- var deviceId = _ref40.deviceId,
1241
- name = _ref40.name,
1242
- org = _ref40.org,
1243
- product = _ref40.product,
1244
- auth = _ref40.auth;
1275
+ value: function getEventStream(_ref41) {
1276
+ var deviceId = _ref41.deviceId,
1277
+ name = _ref41.name,
1278
+ org = _ref41.org,
1279
+ product = _ref41.product,
1280
+ auth = _ref41.auth;
1245
1281
 
1246
1282
  var uri = '/v1/';
1247
1283
  if (org) {
@@ -1283,14 +1319,14 @@ var Particle = function () {
1283
1319
 
1284
1320
  }, {
1285
1321
  key: 'publishEvent',
1286
- value: function publishEvent(_ref41) {
1287
- var name = _ref41.name,
1288
- data = _ref41.data,
1289
- isPrivate = _ref41.isPrivate,
1290
- product = _ref41.product,
1291
- auth = _ref41.auth,
1292
- headers = _ref41.headers,
1293
- context = _ref41.context;
1322
+ value: function publishEvent(_ref42) {
1323
+ var name = _ref42.name,
1324
+ data = _ref42.data,
1325
+ isPrivate = _ref42.isPrivate,
1326
+ product = _ref42.product,
1327
+ auth = _ref42.auth,
1328
+ headers = _ref42.headers,
1329
+ context = _ref42.context;
1294
1330
 
1295
1331
  var uri = product ? '/v1/products/' + product + '/events' : '/v1/devices/events';
1296
1332
  var postData = { name: name, data: data, private: isPrivate };
@@ -1325,17 +1361,17 @@ var Particle = function () {
1325
1361
 
1326
1362
  }, {
1327
1363
  key: 'createWebhook',
1328
- value: function createWebhook(_ref42) {
1329
- var event = _ref42.event,
1330
- url = _ref42.url,
1331
- device = _ref42.device,
1332
- rejectUnauthorized = _ref42.rejectUnauthorized,
1333
- noDefaults = _ref42.noDefaults,
1334
- hook = _ref42.hook,
1335
- product = _ref42.product,
1336
- auth = _ref42.auth,
1337
- headers = _ref42.headers,
1338
- context = _ref42.context;
1364
+ value: function createWebhook(_ref43) {
1365
+ var event = _ref43.event,
1366
+ url = _ref43.url,
1367
+ device = _ref43.device,
1368
+ rejectUnauthorized = _ref43.rejectUnauthorized,
1369
+ noDefaults = _ref43.noDefaults,
1370
+ hook = _ref43.hook,
1371
+ product = _ref43.product,
1372
+ auth = _ref43.auth,
1373
+ headers = _ref43.headers,
1374
+ context = _ref43.context;
1339
1375
 
1340
1376
  var uri = product ? '/v1/products/' + product + '/webhooks' : '/v1/webhooks';
1341
1377
  var data = { event: event, url: url, deviceId: device, rejectUnauthorized: rejectUnauthorized, noDefaults: noDefaults };
@@ -1373,12 +1409,12 @@ var Particle = function () {
1373
1409
 
1374
1410
  }, {
1375
1411
  key: 'deleteWebhook',
1376
- value: function deleteWebhook(_ref43) {
1377
- var hookId = _ref43.hookId,
1378
- product = _ref43.product,
1379
- auth = _ref43.auth,
1380
- headers = _ref43.headers,
1381
- context = _ref43.context;
1412
+ value: function deleteWebhook(_ref44) {
1413
+ var hookId = _ref44.hookId,
1414
+ product = _ref44.product,
1415
+ auth = _ref44.auth,
1416
+ headers = _ref44.headers,
1417
+ context = _ref44.context;
1382
1418
 
1383
1419
  var uri = product ? '/v1/products/' + product + '/webhooks/' + hookId : '/v1/webhooks/' + hookId;
1384
1420
  return this.delete({ uri: uri, auth: auth, headers: headers, context: context });
@@ -1396,11 +1432,11 @@ var Particle = function () {
1396
1432
 
1397
1433
  }, {
1398
1434
  key: 'listWebhooks',
1399
- value: function listWebhooks(_ref44) {
1400
- var product = _ref44.product,
1401
- auth = _ref44.auth,
1402
- headers = _ref44.headers,
1403
- context = _ref44.context;
1435
+ value: function listWebhooks(_ref45) {
1436
+ var product = _ref45.product,
1437
+ auth = _ref45.auth,
1438
+ headers = _ref45.headers,
1439
+ context = _ref45.context;
1404
1440
 
1405
1441
  var uri = product ? '/v1/products/' + product + '/webhooks' : '/v1/webhooks';
1406
1442
  return this.get({ uri: uri, auth: auth, headers: headers, context: context });
@@ -1424,14 +1460,14 @@ var Particle = function () {
1424
1460
 
1425
1461
  }, {
1426
1462
  key: 'createIntegration',
1427
- value: function createIntegration(_ref45) {
1428
- var event = _ref45.event,
1429
- settings = _ref45.settings,
1430
- deviceId = _ref45.deviceId,
1431
- product = _ref45.product,
1432
- auth = _ref45.auth,
1433
- headers = _ref45.headers,
1434
- context = _ref45.context;
1463
+ value: function createIntegration(_ref46) {
1464
+ var event = _ref46.event,
1465
+ settings = _ref46.settings,
1466
+ deviceId = _ref46.deviceId,
1467
+ product = _ref46.product,
1468
+ auth = _ref46.auth,
1469
+ headers = _ref46.headers,
1470
+ context = _ref46.context;
1435
1471
 
1436
1472
  var uri = product ? '/v1/products/' + product + '/integrations' : '/v1/integrations';
1437
1473
  var data = (0, _assign2.default)({ event: event, deviceid: deviceId }, settings);
@@ -1457,15 +1493,15 @@ var Particle = function () {
1457
1493
 
1458
1494
  }, {
1459
1495
  key: 'editIntegration',
1460
- value: function editIntegration(_ref46) {
1461
- var integrationId = _ref46.integrationId,
1462
- event = _ref46.event,
1463
- settings = _ref46.settings,
1464
- deviceId = _ref46.deviceId,
1465
- product = _ref46.product,
1466
- auth = _ref46.auth,
1467
- headers = _ref46.headers,
1468
- context = _ref46.context;
1496
+ value: function editIntegration(_ref47) {
1497
+ var integrationId = _ref47.integrationId,
1498
+ event = _ref47.event,
1499
+ settings = _ref47.settings,
1500
+ deviceId = _ref47.deviceId,
1501
+ product = _ref47.product,
1502
+ auth = _ref47.auth,
1503
+ headers = _ref47.headers,
1504
+ context = _ref47.context;
1469
1505
 
1470
1506
  var uri = product ? '/v1/products/' + product + '/integrations/' + integrationId : '/v1/integrations/' + integrationId;
1471
1507
  var data = (0, _assign2.default)({ event: event, deviceid: deviceId }, settings);
@@ -1486,12 +1522,12 @@ var Particle = function () {
1486
1522
 
1487
1523
  }, {
1488
1524
  key: 'deleteIntegration',
1489
- value: function deleteIntegration(_ref47) {
1490
- var integrationId = _ref47.integrationId,
1491
- product = _ref47.product,
1492
- auth = _ref47.auth,
1493
- headers = _ref47.headers,
1494
- context = _ref47.context;
1525
+ value: function deleteIntegration(_ref48) {
1526
+ var integrationId = _ref48.integrationId,
1527
+ product = _ref48.product,
1528
+ auth = _ref48.auth,
1529
+ headers = _ref48.headers,
1530
+ context = _ref48.context;
1495
1531
 
1496
1532
  var uri = product ? '/v1/products/' + product + '/integrations/' + integrationId : '/v1/integrations/' + integrationId;
1497
1533
  return this.delete({ uri: uri, auth: auth, headers: headers, context: context });
@@ -1509,11 +1545,11 @@ var Particle = function () {
1509
1545
 
1510
1546
  }, {
1511
1547
  key: 'listIntegrations',
1512
- value: function listIntegrations(_ref48) {
1513
- var product = _ref48.product,
1514
- auth = _ref48.auth,
1515
- headers = _ref48.headers,
1516
- context = _ref48.context;
1548
+ value: function listIntegrations(_ref49) {
1549
+ var product = _ref49.product,
1550
+ auth = _ref49.auth,
1551
+ headers = _ref49.headers,
1552
+ context = _ref49.context;
1517
1553
 
1518
1554
  var uri = product ? '/v1/products/' + product + '/integrations' : '/v1/integrations';
1519
1555
  return this.get({ uri: uri, auth: auth, headers: headers, context: context });
@@ -1530,10 +1566,10 @@ var Particle = function () {
1530
1566
 
1531
1567
  }, {
1532
1568
  key: 'getUserInfo',
1533
- value: function getUserInfo(_ref49) {
1534
- var auth = _ref49.auth,
1535
- headers = _ref49.headers,
1536
- context = _ref49.context;
1569
+ value: function getUserInfo(_ref50) {
1570
+ var auth = _ref50.auth,
1571
+ headers = _ref50.headers,
1572
+ context = _ref50.context;
1537
1573
 
1538
1574
  return this.get({ uri: '/v1/user', auth: auth, headers: headers, context: context });
1539
1575
  }
@@ -1550,11 +1586,11 @@ var Particle = function () {
1550
1586
 
1551
1587
  }, {
1552
1588
  key: 'setUserInfo',
1553
- value: function setUserInfo(_ref50) {
1554
- var accountInfo = _ref50.accountInfo,
1555
- auth = _ref50.auth,
1556
- headers = _ref50.headers,
1557
- context = _ref50.context;
1589
+ value: function setUserInfo(_ref51) {
1590
+ var accountInfo = _ref51.accountInfo,
1591
+ auth = _ref51.auth,
1592
+ headers = _ref51.headers,
1593
+ context = _ref51.context;
1558
1594
 
1559
1595
  var data = { account_info: accountInfo };
1560
1596
  return this.put({ uri: '/v1/user', auth: auth, headers: headers, data: data, context: context });
@@ -1566,6 +1602,7 @@ var Particle = function () {
1566
1602
  * @param {String} options.auth Access Token
1567
1603
  * @param {String} options.currentPassword Current password
1568
1604
  * @param {String} options.username New email
1605
+ * @param {Boolean} options.invalidateTokens Should all tokens be invalidated
1569
1606
  * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
1570
1607
  * @param {Object} [options.context] Request context
1571
1608
  * @returns {Promise} A promise
@@ -1573,14 +1610,21 @@ var Particle = function () {
1573
1610
 
1574
1611
  }, {
1575
1612
  key: 'changeUsername',
1576
- value: function changeUsername(_ref51) {
1577
- var currentPassword = _ref51.currentPassword,
1578
- username = _ref51.username,
1579
- auth = _ref51.auth,
1580
- headers = _ref51.headers,
1581
- context = _ref51.context;
1613
+ value: function changeUsername(_ref52) {
1614
+ var currentPassword = _ref52.currentPassword,
1615
+ username = _ref52.username,
1616
+ _ref52$invalidateToke = _ref52.invalidateTokens,
1617
+ invalidateTokens = _ref52$invalidateToke === undefined ? false : _ref52$invalidateToke,
1618
+ auth = _ref52.auth,
1619
+ headers = _ref52.headers,
1620
+ context = _ref52.context;
1582
1621
 
1583
1622
  var data = { username: username, current_password: currentPassword };
1623
+
1624
+ if (invalidateTokens) {
1625
+ data.invalidate_tokens = true;
1626
+ }
1627
+
1584
1628
  return this.put({ uri: '/v1/user', auth: auth, headers: headers, data: data, context: context });
1585
1629
  }
1586
1630
 
@@ -1598,14 +1642,14 @@ var Particle = function () {
1598
1642
 
1599
1643
  }, {
1600
1644
  key: 'changeUserPassword',
1601
- value: function changeUserPassword(_ref52) {
1602
- var currentPassword = _ref52.currentPassword,
1603
- password = _ref52.password,
1604
- _ref52$invalidateToke = _ref52.invalidateTokens,
1605
- invalidateTokens = _ref52$invalidateToke === undefined ? false : _ref52$invalidateToke,
1606
- auth = _ref52.auth,
1607
- headers = _ref52.headers,
1608
- context = _ref52.context;
1645
+ value: function changeUserPassword(_ref53) {
1646
+ var currentPassword = _ref53.currentPassword,
1647
+ password = _ref53.password,
1648
+ _ref53$invalidateToke = _ref53.invalidateTokens,
1649
+ invalidateTokens = _ref53$invalidateToke === undefined ? false : _ref53$invalidateToke,
1650
+ auth = _ref53.auth,
1651
+ headers = _ref53.headers,
1652
+ context = _ref53.context;
1609
1653
 
1610
1654
  var data = { password: password, current_password: currentPassword };
1611
1655
 
@@ -1633,16 +1677,16 @@ var Particle = function () {
1633
1677
 
1634
1678
  }, {
1635
1679
  key: 'listSIMs',
1636
- value: function listSIMs(_ref53) {
1637
- var iccid = _ref53.iccid,
1638
- deviceId = _ref53.deviceId,
1639
- deviceName = _ref53.deviceName,
1640
- page = _ref53.page,
1641
- perPage = _ref53.perPage,
1642
- product = _ref53.product,
1643
- auth = _ref53.auth,
1644
- headers = _ref53.headers,
1645
- context = _ref53.context;
1680
+ value: function listSIMs(_ref54) {
1681
+ var iccid = _ref54.iccid,
1682
+ deviceId = _ref54.deviceId,
1683
+ deviceName = _ref54.deviceName,
1684
+ page = _ref54.page,
1685
+ perPage = _ref54.perPage,
1686
+ product = _ref54.product,
1687
+ auth = _ref54.auth,
1688
+ headers = _ref54.headers,
1689
+ context = _ref54.context;
1646
1690
 
1647
1691
  var uri = product ? '/v1/products/' + product + '/sims' : '/v1/sims';
1648
1692
  var query = product ? { iccid: iccid, deviceId: deviceId, deviceName: deviceName, page: page, per_page: perPage } : undefined;
@@ -1662,12 +1706,12 @@ var Particle = function () {
1662
1706
 
1663
1707
  }, {
1664
1708
  key: 'getSIMDataUsage',
1665
- value: function getSIMDataUsage(_ref54) {
1666
- var iccid = _ref54.iccid,
1667
- product = _ref54.product,
1668
- auth = _ref54.auth,
1669
- headers = _ref54.headers,
1670
- context = _ref54.context;
1709
+ value: function getSIMDataUsage(_ref55) {
1710
+ var iccid = _ref55.iccid,
1711
+ product = _ref55.product,
1712
+ auth = _ref55.auth,
1713
+ headers = _ref55.headers,
1714
+ context = _ref55.context;
1671
1715
 
1672
1716
  var uri = product ? '/v1/products/' + product + '/sims/' + iccid + '/data_usage' : '/v1/sims/' + iccid + '/data_usage';
1673
1717
 
@@ -1686,11 +1730,11 @@ var Particle = function () {
1686
1730
 
1687
1731
  }, {
1688
1732
  key: 'getFleetDataUsage',
1689
- value: function getFleetDataUsage(_ref55) {
1690
- var product = _ref55.product,
1691
- auth = _ref55.auth,
1692
- headers = _ref55.headers,
1693
- context = _ref55.context;
1733
+ value: function getFleetDataUsage(_ref56) {
1734
+ var product = _ref56.product,
1735
+ auth = _ref56.auth,
1736
+ headers = _ref56.headers,
1737
+ context = _ref56.context;
1694
1738
 
1695
1739
  return this.get({
1696
1740
  uri: '/v1/products/' + product + '/sims/data_usage',
@@ -1712,11 +1756,11 @@ var Particle = function () {
1712
1756
 
1713
1757
  }, {
1714
1758
  key: 'checkSIM',
1715
- value: function checkSIM(_ref56) {
1716
- var iccid = _ref56.iccid,
1717
- auth = _ref56.auth,
1718
- headers = _ref56.headers,
1719
- context = _ref56.context;
1759
+ value: function checkSIM(_ref57) {
1760
+ var iccid = _ref57.iccid,
1761
+ auth = _ref57.auth,
1762
+ headers = _ref57.headers,
1763
+ context = _ref57.context;
1720
1764
 
1721
1765
  return this.head({ uri: '/v1/sims/' + iccid, auth: auth, headers: headers, context: context });
1722
1766
  }
@@ -1736,15 +1780,15 @@ var Particle = function () {
1736
1780
 
1737
1781
  }, {
1738
1782
  key: 'activateSIM',
1739
- value: function activateSIM(_ref57) {
1740
- var iccid = _ref57.iccid,
1741
- iccids = _ref57.iccids,
1742
- country = _ref57.country,
1743
- promoCode = _ref57.promoCode,
1744
- product = _ref57.product,
1745
- auth = _ref57.auth,
1746
- headers = _ref57.headers,
1747
- context = _ref57.context;
1783
+ value: function activateSIM(_ref58) {
1784
+ var iccid = _ref58.iccid,
1785
+ iccids = _ref58.iccids,
1786
+ country = _ref58.country,
1787
+ promoCode = _ref58.promoCode,
1788
+ product = _ref58.product,
1789
+ auth = _ref58.auth,
1790
+ headers = _ref58.headers,
1791
+ context = _ref58.context;
1748
1792
 
1749
1793
  // promoCode is deprecated
1750
1794
  iccids = iccids || [iccid];
@@ -1768,12 +1812,12 @@ var Particle = function () {
1768
1812
 
1769
1813
  }, {
1770
1814
  key: 'deactivateSIM',
1771
- value: function deactivateSIM(_ref58) {
1772
- var iccid = _ref58.iccid,
1773
- product = _ref58.product,
1774
- auth = _ref58.auth,
1775
- headers = _ref58.headers,
1776
- context = _ref58.context;
1815
+ value: function deactivateSIM(_ref59) {
1816
+ var iccid = _ref59.iccid,
1817
+ product = _ref59.product,
1818
+ auth = _ref59.auth,
1819
+ headers = _ref59.headers,
1820
+ context = _ref59.context;
1777
1821
 
1778
1822
  var uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;
1779
1823
  var data = { action: 'deactivate' };
@@ -1794,13 +1838,13 @@ var Particle = function () {
1794
1838
 
1795
1839
  }, {
1796
1840
  key: 'reactivateSIM',
1797
- value: function reactivateSIM(_ref59) {
1798
- var iccid = _ref59.iccid,
1799
- mbLimit = _ref59.mbLimit,
1800
- product = _ref59.product,
1801
- auth = _ref59.auth,
1802
- headers = _ref59.headers,
1803
- context = _ref59.context;
1841
+ value: function reactivateSIM(_ref60) {
1842
+ var iccid = _ref60.iccid,
1843
+ mbLimit = _ref60.mbLimit,
1844
+ product = _ref60.product,
1845
+ auth = _ref60.auth,
1846
+ headers = _ref60.headers,
1847
+ context = _ref60.context;
1804
1848
 
1805
1849
  var uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;
1806
1850
  var data = { mb_limit: mbLimit, action: 'reactivate' };
@@ -1821,13 +1865,13 @@ var Particle = function () {
1821
1865
 
1822
1866
  }, {
1823
1867
  key: 'updateSIM',
1824
- value: function updateSIM(_ref60) {
1825
- var iccid = _ref60.iccid,
1826
- mbLimit = _ref60.mbLimit,
1827
- product = _ref60.product,
1828
- auth = _ref60.auth,
1829
- headers = _ref60.headers,
1830
- context = _ref60.context;
1868
+ value: function updateSIM(_ref61) {
1869
+ var iccid = _ref61.iccid,
1870
+ mbLimit = _ref61.mbLimit,
1871
+ product = _ref61.product,
1872
+ auth = _ref61.auth,
1873
+ headers = _ref61.headers,
1874
+ context = _ref61.context;
1831
1875
 
1832
1876
  var uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;
1833
1877
  var data = { mb_limit: mbLimit };
@@ -1847,12 +1891,12 @@ var Particle = function () {
1847
1891
 
1848
1892
  }, {
1849
1893
  key: 'removeSIM',
1850
- value: function removeSIM(_ref61) {
1851
- var iccid = _ref61.iccid,
1852
- product = _ref61.product,
1853
- auth = _ref61.auth,
1854
- headers = _ref61.headers,
1855
- context = _ref61.context;
1894
+ value: function removeSIM(_ref62) {
1895
+ var iccid = _ref62.iccid,
1896
+ product = _ref62.product,
1897
+ auth = _ref62.auth,
1898
+ headers = _ref62.headers,
1899
+ context = _ref62.context;
1856
1900
 
1857
1901
  var uri = product ? '/v1/products/' + product + '/sims/' + iccid : '/v1/sims/' + iccid;
1858
1902
  return this.delete({ uri: uri, auth: auth, headers: headers, context: context });
@@ -1870,11 +1914,11 @@ var Particle = function () {
1870
1914
 
1871
1915
  }, {
1872
1916
  key: 'listBuildTargets',
1873
- value: function listBuildTargets(_ref62) {
1874
- var onlyFeatured = _ref62.onlyFeatured,
1875
- auth = _ref62.auth,
1876
- headers = _ref62.headers,
1877
- context = _ref62.context;
1917
+ value: function listBuildTargets(_ref63) {
1918
+ var onlyFeatured = _ref63.onlyFeatured,
1919
+ auth = _ref63.auth,
1920
+ headers = _ref63.headers,
1921
+ context = _ref63.context;
1878
1922
 
1879
1923
  var query = onlyFeatured ? { featured: !!onlyFeatured } : undefined;
1880
1924
  return this.get({ uri: '/v1/build_targets', auth: auth, headers: headers, query: query, context: context });
@@ -1907,18 +1951,18 @@ var Particle = function () {
1907
1951
 
1908
1952
  }, {
1909
1953
  key: 'listLibraries',
1910
- value: function listLibraries(_ref63) {
1911
- var page = _ref63.page,
1912
- limit = _ref63.limit,
1913
- filter = _ref63.filter,
1914
- sort = _ref63.sort,
1915
- architectures = _ref63.architectures,
1916
- category = _ref63.category,
1917
- scope = _ref63.scope,
1918
- excludeScopes = _ref63.excludeScopes,
1919
- auth = _ref63.auth,
1920
- headers = _ref63.headers,
1921
- context = _ref63.context;
1954
+ value: function listLibraries(_ref64) {
1955
+ var page = _ref64.page,
1956
+ limit = _ref64.limit,
1957
+ filter = _ref64.filter,
1958
+ sort = _ref64.sort,
1959
+ architectures = _ref64.architectures,
1960
+ category = _ref64.category,
1961
+ scope = _ref64.scope,
1962
+ excludeScopes = _ref64.excludeScopes,
1963
+ auth = _ref64.auth,
1964
+ headers = _ref64.headers,
1965
+ context = _ref64.context;
1922
1966
 
1923
1967
  return this.get({
1924
1968
  uri: '/v1/libraries',
@@ -1956,12 +2000,12 @@ var Particle = function () {
1956
2000
 
1957
2001
  }, {
1958
2002
  key: 'getLibrary',
1959
- value: function getLibrary(_ref64) {
1960
- var name = _ref64.name,
1961
- version = _ref64.version,
1962
- auth = _ref64.auth,
1963
- headers = _ref64.headers,
1964
- context = _ref64.context;
2003
+ value: function getLibrary(_ref65) {
2004
+ var name = _ref65.name,
2005
+ version = _ref65.version,
2006
+ auth = _ref65.auth,
2007
+ headers = _ref65.headers,
2008
+ context = _ref65.context;
1965
2009
 
1966
2010
  return this.get({
1967
2011
  uri: '/v1/libraries/' + name,
@@ -1986,13 +2030,13 @@ var Particle = function () {
1986
2030
 
1987
2031
  }, {
1988
2032
  key: 'getLibraryVersions',
1989
- value: function getLibraryVersions(_ref65) {
1990
- var name = _ref65.name,
1991
- page = _ref65.page,
1992
- limit = _ref65.limit,
1993
- auth = _ref65.auth,
1994
- headers = _ref65.headers,
1995
- context = _ref65.context;
2033
+ value: function getLibraryVersions(_ref66) {
2034
+ var name = _ref66.name,
2035
+ page = _ref66.page,
2036
+ limit = _ref66.limit,
2037
+ auth = _ref66.auth,
2038
+ headers = _ref66.headers,
2039
+ context = _ref66.context;
1996
2040
 
1997
2041
  return this.get({
1998
2042
  uri: '/v1/libraries/' + name + '/versions',
@@ -2016,11 +2060,11 @@ var Particle = function () {
2016
2060
 
2017
2061
  }, {
2018
2062
  key: 'contributeLibrary',
2019
- value: function contributeLibrary(_ref66) {
2020
- var archive = _ref66.archive,
2021
- auth = _ref66.auth,
2022
- headers = _ref66.headers,
2023
- context = _ref66.context;
2063
+ value: function contributeLibrary(_ref67) {
2064
+ var archive = _ref67.archive,
2065
+ auth = _ref67.auth,
2066
+ headers = _ref67.headers,
2067
+ context = _ref67.context;
2024
2068
 
2025
2069
  var files = {
2026
2070
  'archive.tar.gz': archive
@@ -2048,11 +2092,11 @@ var Particle = function () {
2048
2092
 
2049
2093
  }, {
2050
2094
  key: 'publishLibrary',
2051
- value: function publishLibrary(_ref67) {
2052
- var name = _ref67.name,
2053
- auth = _ref67.auth,
2054
- headers = _ref67.headers,
2055
- context = _ref67.context;
2095
+ value: function publishLibrary(_ref68) {
2096
+ var name = _ref68.name,
2097
+ auth = _ref68.auth,
2098
+ headers = _ref68.headers,
2099
+ context = _ref68.context;
2056
2100
 
2057
2101
  return this.request({
2058
2102
  uri: '/v1/libraries/' + name,
@@ -2077,12 +2121,12 @@ var Particle = function () {
2077
2121
 
2078
2122
  }, {
2079
2123
  key: 'deleteLibrary',
2080
- value: function deleteLibrary(_ref68) {
2081
- var name = _ref68.name,
2082
- force = _ref68.force,
2083
- auth = _ref68.auth,
2084
- headers = _ref68.headers,
2085
- context = _ref68.context;
2124
+ value: function deleteLibrary(_ref69) {
2125
+ var name = _ref69.name,
2126
+ force = _ref69.force,
2127
+ auth = _ref69.auth,
2128
+ headers = _ref69.headers,
2129
+ context = _ref69.context;
2086
2130
 
2087
2131
  return this.delete({
2088
2132
  uri: '/v1/libraries/' + name,
@@ -2104,10 +2148,10 @@ var Particle = function () {
2104
2148
 
2105
2149
  }, {
2106
2150
  key: 'downloadFile',
2107
- value: function downloadFile(_ref69) {
2108
- var uri = _ref69.uri,
2109
- headers = _ref69.headers,
2110
- context = _ref69.context;
2151
+ value: function downloadFile(_ref70) {
2152
+ var uri = _ref70.uri,
2153
+ headers = _ref70.headers,
2154
+ context = _ref70.context;
2111
2155
 
2112
2156
  var req = this.request({ uri: uri, method: 'get', headers: headers, context: context, raw: true });
2113
2157
  return this._provideFileData(req);
@@ -2125,11 +2169,11 @@ var Particle = function () {
2125
2169
 
2126
2170
  }, {
2127
2171
  key: 'listOAuthClients',
2128
- value: function listOAuthClients(_ref70) {
2129
- var product = _ref70.product,
2130
- auth = _ref70.auth,
2131
- headers = _ref70.headers,
2132
- context = _ref70.context;
2172
+ value: function listOAuthClients(_ref71) {
2173
+ var product = _ref71.product,
2174
+ auth = _ref71.auth,
2175
+ headers = _ref71.headers,
2176
+ context = _ref71.context;
2133
2177
 
2134
2178
  var uri = product ? '/v1/products/' + product + '/clients' : '/v1/clients';
2135
2179
  return this.get({ uri: uri, auth: auth, headers: headers, context: context });
@@ -2151,15 +2195,15 @@ var Particle = function () {
2151
2195
 
2152
2196
  }, {
2153
2197
  key: 'createOAuthClient',
2154
- value: function createOAuthClient(_ref71) {
2155
- var name = _ref71.name,
2156
- type = _ref71.type,
2157
- redirect_uri = _ref71.redirect_uri,
2158
- scope = _ref71.scope,
2159
- product = _ref71.product,
2160
- auth = _ref71.auth,
2161
- headers = _ref71.headers,
2162
- context = _ref71.context;
2198
+ value: function createOAuthClient(_ref72) {
2199
+ var name = _ref72.name,
2200
+ type = _ref72.type,
2201
+ redirect_uri = _ref72.redirect_uri,
2202
+ scope = _ref72.scope,
2203
+ product = _ref72.product,
2204
+ auth = _ref72.auth,
2205
+ headers = _ref72.headers,
2206
+ context = _ref72.context;
2163
2207
 
2164
2208
  var uri = product ? '/v1/products/' + product + '/clients' : '/v1/clients';
2165
2209
  var data = { name: name, type: type, redirect_uri: redirect_uri, scope: scope };
@@ -2181,14 +2225,14 @@ var Particle = function () {
2181
2225
 
2182
2226
  }, {
2183
2227
  key: 'updateOAuthClient',
2184
- value: function updateOAuthClient(_ref72) {
2185
- var clientId = _ref72.clientId,
2186
- name = _ref72.name,
2187
- scope = _ref72.scope,
2188
- product = _ref72.product,
2189
- auth = _ref72.auth,
2190
- headers = _ref72.headers,
2191
- context = _ref72.context;
2228
+ value: function updateOAuthClient(_ref73) {
2229
+ var clientId = _ref73.clientId,
2230
+ name = _ref73.name,
2231
+ scope = _ref73.scope,
2232
+ product = _ref73.product,
2233
+ auth = _ref73.auth,
2234
+ headers = _ref73.headers,
2235
+ context = _ref73.context;
2192
2236
 
2193
2237
  var uri = product ? '/v1/products/' + product + '/clients/' + clientId : '/v1/clients/' + clientId;
2194
2238
  var data = { name: name, scope: scope };
@@ -2208,12 +2252,12 @@ var Particle = function () {
2208
2252
 
2209
2253
  }, {
2210
2254
  key: 'deleteOAuthClient',
2211
- value: function deleteOAuthClient(_ref73) {
2212
- var clientId = _ref73.clientId,
2213
- product = _ref73.product,
2214
- auth = _ref73.auth,
2215
- headers = _ref73.headers,
2216
- context = _ref73.context;
2255
+ value: function deleteOAuthClient(_ref74) {
2256
+ var clientId = _ref74.clientId,
2257
+ product = _ref74.product,
2258
+ auth = _ref74.auth,
2259
+ headers = _ref74.headers,
2260
+ context = _ref74.context;
2217
2261
 
2218
2262
  var uri = product ? '/v1/products/' + product + '/clients/' + clientId : '/v1/clients/' + clientId;
2219
2263
  return this.delete({ uri: uri, auth: auth, headers: headers, context: context });
@@ -2230,10 +2274,10 @@ var Particle = function () {
2230
2274
 
2231
2275
  }, {
2232
2276
  key: 'listProducts',
2233
- value: function listProducts(_ref74) {
2234
- var auth = _ref74.auth,
2235
- headers = _ref74.headers,
2236
- context = _ref74.context;
2277
+ value: function listProducts(_ref75) {
2278
+ var auth = _ref75.auth,
2279
+ headers = _ref75.headers,
2280
+ context = _ref75.context;
2237
2281
 
2238
2282
  return this.get({ uri: '/v1/products', auth: auth, headers: headers, context: context });
2239
2283
  }
@@ -2250,11 +2294,11 @@ var Particle = function () {
2250
2294
 
2251
2295
  }, {
2252
2296
  key: 'getProduct',
2253
- value: function getProduct(_ref75) {
2254
- var product = _ref75.product,
2255
- auth = _ref75.auth,
2256
- headers = _ref75.headers,
2257
- context = _ref75.context;
2297
+ value: function getProduct(_ref76) {
2298
+ var product = _ref76.product,
2299
+ auth = _ref76.auth,
2300
+ headers = _ref76.headers,
2301
+ context = _ref76.context;
2258
2302
 
2259
2303
  return this.get({ uri: '/v1/products/' + product, auth: auth, headers: headers, context: context });
2260
2304
  }
@@ -2271,11 +2315,11 @@ var Particle = function () {
2271
2315
 
2272
2316
  }, {
2273
2317
  key: 'listProductFirmware',
2274
- value: function listProductFirmware(_ref76) {
2275
- var product = _ref76.product,
2276
- auth = _ref76.auth,
2277
- headers = _ref76.headers,
2278
- context = _ref76.context;
2318
+ value: function listProductFirmware(_ref77) {
2319
+ var product = _ref77.product,
2320
+ auth = _ref77.auth,
2321
+ headers = _ref77.headers,
2322
+ context = _ref77.context;
2279
2323
 
2280
2324
  return this.get({ uri: '/v1/products/' + product + '/firmware', auth: auth, headers: headers, context: context });
2281
2325
  }
@@ -2297,15 +2341,15 @@ var Particle = function () {
2297
2341
 
2298
2342
  }, {
2299
2343
  key: 'uploadProductFirmware',
2300
- value: function uploadProductFirmware(_ref77) {
2301
- var file = _ref77.file,
2302
- version = _ref77.version,
2303
- title = _ref77.title,
2304
- description = _ref77.description,
2305
- product = _ref77.product,
2306
- auth = _ref77.auth,
2307
- headers = _ref77.headers,
2308
- context = _ref77.context;
2344
+ value: function uploadProductFirmware(_ref78) {
2345
+ var file = _ref78.file,
2346
+ version = _ref78.version,
2347
+ title = _ref78.title,
2348
+ description = _ref78.description,
2349
+ product = _ref78.product,
2350
+ auth = _ref78.auth,
2351
+ headers = _ref78.headers,
2352
+ context = _ref78.context;
2309
2353
 
2310
2354
  return this.request({
2311
2355
  uri: '/v1/products/' + product + '/firmware',
@@ -2337,12 +2381,12 @@ var Particle = function () {
2337
2381
 
2338
2382
  }, {
2339
2383
  key: 'getProductFirmware',
2340
- value: function getProductFirmware(_ref78) {
2341
- var version = _ref78.version,
2342
- product = _ref78.product,
2343
- auth = _ref78.auth,
2344
- headers = _ref78.headers,
2345
- context = _ref78.context;
2384
+ value: function getProductFirmware(_ref79) {
2385
+ var version = _ref79.version,
2386
+ product = _ref79.product,
2387
+ auth = _ref79.auth,
2388
+ headers = _ref79.headers,
2389
+ context = _ref79.context;
2346
2390
 
2347
2391
  return this.get({
2348
2392
  uri: '/v1/products/' + product + '/firmware/' + version,
@@ -2367,14 +2411,14 @@ var Particle = function () {
2367
2411
 
2368
2412
  }, {
2369
2413
  key: 'updateProductFirmware',
2370
- value: function updateProductFirmware(_ref79) {
2371
- var version = _ref79.version,
2372
- title = _ref79.title,
2373
- description = _ref79.description,
2374
- product = _ref79.product,
2375
- auth = _ref79.auth,
2376
- headers = _ref79.headers,
2377
- context = _ref79.context;
2414
+ value: function updateProductFirmware(_ref80) {
2415
+ var version = _ref80.version,
2416
+ title = _ref80.title,
2417
+ description = _ref80.description,
2418
+ product = _ref80.product,
2419
+ auth = _ref80.auth,
2420
+ headers = _ref80.headers,
2421
+ context = _ref80.context;
2378
2422
 
2379
2423
  var uri = '/v1/products/' + product + '/firmware/' + version;
2380
2424
  return this.put({ uri: uri, auth: auth, headers: headers, data: { title: title, description: description }, context: context });
@@ -2393,12 +2437,12 @@ var Particle = function () {
2393
2437
 
2394
2438
  }, {
2395
2439
  key: 'downloadProductFirmware',
2396
- value: function downloadProductFirmware(_ref80) {
2397
- var version = _ref80.version,
2398
- product = _ref80.product,
2399
- auth = _ref80.auth,
2400
- headers = _ref80.headers,
2401
- context = _ref80.context;
2440
+ value: function downloadProductFirmware(_ref81) {
2441
+ var version = _ref81.version,
2442
+ product = _ref81.product,
2443
+ auth = _ref81.auth,
2444
+ headers = _ref81.headers,
2445
+ context = _ref81.context;
2402
2446
 
2403
2447
  var req = this.request({
2404
2448
  uri: '/v1/products/' + product + '/firmware/' + version + '/binary',
@@ -2440,12 +2484,12 @@ var Particle = function () {
2440
2484
 
2441
2485
  }, {
2442
2486
  key: 'releaseProductFirmware',
2443
- value: function releaseProductFirmware(_ref81) {
2444
- var version = _ref81.version,
2445
- product = _ref81.product,
2446
- auth = _ref81.auth,
2447
- headers = _ref81.headers,
2448
- context = _ref81.context;
2487
+ value: function releaseProductFirmware(_ref82) {
2488
+ var version = _ref82.version,
2489
+ product = _ref82.product,
2490
+ auth = _ref82.auth,
2491
+ headers = _ref82.headers,
2492
+ context = _ref82.context;
2449
2493
 
2450
2494
  var uri = '/v1/products/' + product + '/firmware/release';
2451
2495
  return this.put({ uri: uri, auth: auth, headers: headers, data: { version: version }, context: context });
@@ -2463,11 +2507,11 @@ var Particle = function () {
2463
2507
 
2464
2508
  }, {
2465
2509
  key: 'listTeamMembers',
2466
- value: function listTeamMembers(_ref82) {
2467
- var product = _ref82.product,
2468
- auth = _ref82.auth,
2469
- headers = _ref82.headers,
2470
- context = _ref82.context;
2510
+ value: function listTeamMembers(_ref83) {
2511
+ var product = _ref83.product,
2512
+ auth = _ref83.auth,
2513
+ headers = _ref83.headers,
2514
+ context = _ref83.context;
2471
2515
 
2472
2516
  return this.get({
2473
2517
  uri: '/v1/products/' + product + '/team',
@@ -2490,12 +2534,12 @@ var Particle = function () {
2490
2534
 
2491
2535
  }, {
2492
2536
  key: 'inviteTeamMember',
2493
- value: function inviteTeamMember(_ref83) {
2494
- var username = _ref83.username,
2495
- product = _ref83.product,
2496
- auth = _ref83.auth,
2497
- headers = _ref83.headers,
2498
- context = _ref83.context;
2537
+ value: function inviteTeamMember(_ref84) {
2538
+ var username = _ref84.username,
2539
+ product = _ref84.product,
2540
+ auth = _ref84.auth,
2541
+ headers = _ref84.headers,
2542
+ context = _ref84.context;
2499
2543
 
2500
2544
  return this.post({
2501
2545
  uri: '/v1/products/' + product + '/team',
@@ -2519,12 +2563,12 @@ var Particle = function () {
2519
2563
 
2520
2564
  }, {
2521
2565
  key: 'removeTeamMember',
2522
- value: function removeTeamMember(_ref84) {
2523
- var username = _ref84.username,
2524
- product = _ref84.product,
2525
- auth = _ref84.auth,
2526
- headers = _ref84.headers,
2527
- context = _ref84.context;
2566
+ value: function removeTeamMember(_ref85) {
2567
+ var username = _ref85.username,
2568
+ product = _ref85.product,
2569
+ auth = _ref85.auth,
2570
+ headers = _ref85.headers,
2571
+ context = _ref85.context;
2528
2572
 
2529
2573
  return this.delete({
2530
2574
  uri: '/v1/products/' + product + '/team/' + username,
@@ -2546,11 +2590,11 @@ var Particle = function () {
2546
2590
 
2547
2591
  }, {
2548
2592
  key: 'lookupSerialNumber',
2549
- value: function lookupSerialNumber(_ref85) {
2550
- var serialNumber = _ref85.serialNumber,
2551
- auth = _ref85.auth,
2552
- headers = _ref85.headers,
2553
- context = _ref85.context;
2593
+ value: function lookupSerialNumber(_ref86) {
2594
+ var serialNumber = _ref86.serialNumber,
2595
+ auth = _ref86.auth,
2596
+ headers = _ref86.headers,
2597
+ context = _ref86.context;
2554
2598
 
2555
2599
  return this.get({
2556
2600
  uri: '/v1/serial_numbers/' + serialNumber,
@@ -2574,13 +2618,13 @@ var Particle = function () {
2574
2618
 
2575
2619
  }, {
2576
2620
  key: 'createMeshNetwork',
2577
- value: function createMeshNetwork(_ref86) {
2578
- var name = _ref86.name,
2579
- deviceId = _ref86.deviceId,
2580
- iccid = _ref86.iccid,
2581
- auth = _ref86.auth,
2582
- headers = _ref86.headers,
2583
- context = _ref86.context;
2621
+ value: function createMeshNetwork(_ref87) {
2622
+ var name = _ref87.name,
2623
+ deviceId = _ref87.deviceId,
2624
+ iccid = _ref87.iccid,
2625
+ auth = _ref87.auth,
2626
+ headers = _ref87.headers,
2627
+ context = _ref87.context;
2584
2628
 
2585
2629
  return this.post({
2586
2630
  uri: '/v1/networks',
@@ -2603,11 +2647,11 @@ var Particle = function () {
2603
2647
 
2604
2648
  }, {
2605
2649
  key: 'removeMeshNetwork',
2606
- value: function removeMeshNetwork(_ref87) {
2607
- var networkId = _ref87.networkId,
2608
- auth = _ref87.auth,
2609
- headers = _ref87.headers,
2610
- context = _ref87.context;
2650
+ value: function removeMeshNetwork(_ref88) {
2651
+ var networkId = _ref88.networkId,
2652
+ auth = _ref88.auth,
2653
+ headers = _ref88.headers,
2654
+ context = _ref88.context;
2611
2655
 
2612
2656
  return this.delete({ uri: '/v1/networks/' + networkId, auth: auth, headers: headers, context: context });
2613
2657
  }
@@ -2625,12 +2669,12 @@ var Particle = function () {
2625
2669
 
2626
2670
  }, {
2627
2671
  key: 'listMeshNetworks',
2628
- value: function listMeshNetworks(_ref88) {
2629
- var page = _ref88.page,
2630
- perPage = _ref88.perPage,
2631
- auth = _ref88.auth,
2632
- headers = _ref88.headers,
2633
- context = _ref88.context;
2672
+ value: function listMeshNetworks(_ref89) {
2673
+ var page = _ref89.page,
2674
+ perPage = _ref89.perPage,
2675
+ auth = _ref89.auth,
2676
+ headers = _ref89.headers,
2677
+ context = _ref89.context;
2634
2678
 
2635
2679
  var query = page ? { page: page, per_page: perPage } : undefined;
2636
2680
  return this.get({ uri: '/v1/networks', auth: auth, headers: headers, query: query, context: context });
@@ -2648,11 +2692,11 @@ var Particle = function () {
2648
2692
 
2649
2693
  }, {
2650
2694
  key: 'getMeshNetwork',
2651
- value: function getMeshNetwork(_ref89) {
2652
- var networkId = _ref89.networkId,
2653
- auth = _ref89.auth,
2654
- headers = _ref89.headers,
2655
- context = _ref89.context;
2695
+ value: function getMeshNetwork(_ref90) {
2696
+ var networkId = _ref90.networkId,
2697
+ auth = _ref90.auth,
2698
+ headers = _ref90.headers,
2699
+ context = _ref90.context;
2656
2700
 
2657
2701
  return this.get({ uri: '/v1/networks/' + networkId, auth: auth, headers: headers, context: context });
2658
2702
  }
@@ -2671,13 +2715,13 @@ var Particle = function () {
2671
2715
 
2672
2716
  }, {
2673
2717
  key: 'updateMeshNetwork',
2674
- value: function updateMeshNetwork(_ref90) {
2675
- var networkId = _ref90.networkId,
2676
- action = _ref90.action,
2677
- deviceId = _ref90.deviceId,
2678
- auth = _ref90.auth,
2679
- headers = _ref90.headers,
2680
- context = _ref90.context;
2718
+ value: function updateMeshNetwork(_ref91) {
2719
+ var networkId = _ref91.networkId,
2720
+ action = _ref91.action,
2721
+ deviceId = _ref91.deviceId,
2722
+ auth = _ref91.auth,
2723
+ headers = _ref91.headers,
2724
+ context = _ref91.context;
2681
2725
 
2682
2726
  return this.put({
2683
2727
  uri: '/v1/networks/' + networkId,
@@ -2701,12 +2745,12 @@ var Particle = function () {
2701
2745
 
2702
2746
  }, {
2703
2747
  key: 'addMeshNetworkDevice',
2704
- value: function addMeshNetworkDevice(_ref91) {
2705
- var networkId = _ref91.networkId,
2706
- deviceId = _ref91.deviceId,
2707
- auth = _ref91.auth,
2708
- headers = _ref91.headers,
2709
- context = _ref91.context;
2748
+ value: function addMeshNetworkDevice(_ref92) {
2749
+ var networkId = _ref92.networkId,
2750
+ deviceId = _ref92.deviceId,
2751
+ auth = _ref92.auth,
2752
+ headers = _ref92.headers,
2753
+ context = _ref92.context;
2710
2754
 
2711
2755
  return this.updateMeshNetwork({
2712
2756
  action: 'add-device',
@@ -2731,12 +2775,12 @@ var Particle = function () {
2731
2775
 
2732
2776
  }, {
2733
2777
  key: 'removeMeshNetworkDevice',
2734
- value: function removeMeshNetworkDevice(_ref92) {
2735
- var networkId = _ref92.networkId,
2736
- deviceId = _ref92.deviceId,
2737
- auth = _ref92.auth,
2738
- headers = _ref92.headers,
2739
- context = _ref92.context;
2778
+ value: function removeMeshNetworkDevice(_ref93) {
2779
+ var networkId = _ref93.networkId,
2780
+ deviceId = _ref93.deviceId,
2781
+ auth = _ref93.auth,
2782
+ headers = _ref93.headers,
2783
+ context = _ref93.context;
2740
2784
 
2741
2785
  if (!networkId) {
2742
2786
  return this.delete({
@@ -2770,14 +2814,14 @@ var Particle = function () {
2770
2814
 
2771
2815
  }, {
2772
2816
  key: 'listMeshNetworkDevices',
2773
- value: function listMeshNetworkDevices(_ref93) {
2774
- var networkId = _ref93.networkId,
2775
- role = _ref93.role,
2776
- page = _ref93.page,
2777
- perPage = _ref93.perPage,
2778
- auth = _ref93.auth,
2779
- headers = _ref93.headers,
2780
- context = _ref93.context;
2817
+ value: function listMeshNetworkDevices(_ref94) {
2818
+ var networkId = _ref94.networkId,
2819
+ role = _ref94.role,
2820
+ page = _ref94.page,
2821
+ perPage = _ref94.perPage,
2822
+ auth = _ref94.auth,
2823
+ headers = _ref94.headers,
2824
+ context = _ref94.context;
2781
2825
 
2782
2826
  var query = role || page ? { role: role, page: page, per_page: perPage } : undefined;
2783
2827
  return this.get({
@@ -2801,11 +2845,11 @@ var Particle = function () {
2801
2845
 
2802
2846
  }, {
2803
2847
  key: 'getProductConfiguration',
2804
- value: function getProductConfiguration(_ref94) {
2805
- var auth = _ref94.auth,
2806
- product = _ref94.product,
2807
- headers = _ref94.headers,
2808
- context = _ref94.context;
2848
+ value: function getProductConfiguration(_ref95) {
2849
+ var auth = _ref95.auth,
2850
+ product = _ref95.product,
2851
+ headers = _ref95.headers,
2852
+ context = _ref95.context;
2809
2853
 
2810
2854
  return this.get({
2811
2855
  uri: '/v1/products/' + product + '/config',
@@ -2827,12 +2871,12 @@ var Particle = function () {
2827
2871
 
2828
2872
  }, {
2829
2873
  key: 'getProductConfigurationSchema',
2830
- value: function getProductConfigurationSchema(_ref95) {
2831
- var auth = _ref95.auth,
2832
- product = _ref95.product,
2833
- _ref95$headers = _ref95.headers,
2834
- headers = _ref95$headers === undefined ? {} : _ref95$headers,
2835
- context = _ref95.context;
2874
+ value: function getProductConfigurationSchema(_ref96) {
2875
+ var auth = _ref96.auth,
2876
+ product = _ref96.product,
2877
+ _ref96$headers = _ref96.headers,
2878
+ headers = _ref96$headers === undefined ? {} : _ref96$headers,
2879
+ context = _ref96.context;
2836
2880
 
2837
2881
  headers.accept = 'application/schema+json';
2838
2882
  return this.get({
@@ -2856,12 +2900,12 @@ var Particle = function () {
2856
2900
 
2857
2901
  }, {
2858
2902
  key: 'getProductDeviceConfiguration',
2859
- value: function getProductDeviceConfiguration(_ref96) {
2860
- var auth = _ref96.auth,
2861
- product = _ref96.product,
2862
- deviceId = _ref96.deviceId,
2863
- headers = _ref96.headers,
2864
- context = _ref96.context;
2903
+ value: function getProductDeviceConfiguration(_ref97) {
2904
+ var auth = _ref97.auth,
2905
+ product = _ref97.product,
2906
+ deviceId = _ref97.deviceId,
2907
+ headers = _ref97.headers,
2908
+ context = _ref97.context;
2865
2909
 
2866
2910
  return this.get({
2867
2911
  uri: '/v1/products/' + product + '/config/' + deviceId,
@@ -2884,12 +2928,12 @@ var Particle = function () {
2884
2928
 
2885
2929
  }, {
2886
2930
  key: 'getProductDeviceConfigurationSchema',
2887
- value: function getProductDeviceConfigurationSchema(_ref97) {
2888
- var auth = _ref97.auth,
2889
- product = _ref97.product,
2890
- deviceId = _ref97.deviceId,
2891
- headers = _ref97.headers,
2892
- context = _ref97.context;
2931
+ value: function getProductDeviceConfigurationSchema(_ref98) {
2932
+ var auth = _ref98.auth,
2933
+ product = _ref98.product,
2934
+ deviceId = _ref98.deviceId,
2935
+ headers = _ref98.headers,
2936
+ context = _ref98.context;
2893
2937
 
2894
2938
  headers.accept = 'application/schema+json';
2895
2939
  return this.get({
@@ -2913,12 +2957,12 @@ var Particle = function () {
2913
2957
 
2914
2958
  }, {
2915
2959
  key: 'setProductConfiguration',
2916
- value: function setProductConfiguration(_ref98) {
2917
- var auth = _ref98.auth,
2918
- product = _ref98.product,
2919
- config = _ref98.config,
2920
- headers = _ref98.headers,
2921
- context = _ref98.context;
2960
+ value: function setProductConfiguration(_ref99) {
2961
+ var auth = _ref99.auth,
2962
+ product = _ref99.product,
2963
+ config = _ref99.config,
2964
+ headers = _ref99.headers,
2965
+ context = _ref99.context;
2922
2966
 
2923
2967
  return this.put({
2924
2968
  uri: '/v1/products/' + product + '/config',
@@ -2943,13 +2987,13 @@ var Particle = function () {
2943
2987
 
2944
2988
  }, {
2945
2989
  key: 'setProductDeviceConfiguration',
2946
- value: function setProductDeviceConfiguration(_ref99) {
2947
- var auth = _ref99.auth,
2948
- product = _ref99.product,
2949
- deviceId = _ref99.deviceId,
2950
- config = _ref99.config,
2951
- headers = _ref99.headers,
2952
- context = _ref99.context;
2990
+ value: function setProductDeviceConfiguration(_ref100) {
2991
+ var auth = _ref100.auth,
2992
+ product = _ref100.product,
2993
+ deviceId = _ref100.deviceId,
2994
+ config = _ref100.config,
2995
+ headers = _ref100.headers,
2996
+ context = _ref100.context;
2953
2997
 
2954
2998
  return this.put({
2955
2999
  uri: '/v1/products/' + product + '/config/' + deviceId,
@@ -2980,19 +3024,19 @@ var Particle = function () {
2980
3024
 
2981
3025
  }, {
2982
3026
  key: 'getProductLocations',
2983
- value: function getProductLocations(_ref100) {
2984
- var auth = _ref100.auth,
2985
- product = _ref100.product,
2986
- dateRange = _ref100.dateRange,
2987
- rectBl = _ref100.rectBl,
2988
- rectTr = _ref100.rectTr,
2989
- deviceId = _ref100.deviceId,
2990
- deviceName = _ref100.deviceName,
2991
- groups = _ref100.groups,
2992
- page = _ref100.page,
2993
- perPage = _ref100.perPage,
2994
- headers = _ref100.headers,
2995
- context = _ref100.context;
3027
+ value: function getProductLocations(_ref101) {
3028
+ var auth = _ref101.auth,
3029
+ product = _ref101.product,
3030
+ dateRange = _ref101.dateRange,
3031
+ rectBl = _ref101.rectBl,
3032
+ rectTr = _ref101.rectTr,
3033
+ deviceId = _ref101.deviceId,
3034
+ deviceName = _ref101.deviceName,
3035
+ groups = _ref101.groups,
3036
+ page = _ref101.page,
3037
+ perPage = _ref101.perPage,
3038
+ headers = _ref101.headers,
3039
+ context = _ref101.context;
2996
3040
 
2997
3041
  return this.get({
2998
3042
  uri: '/v1/products/' + product + '/locations',
@@ -3030,15 +3074,15 @@ var Particle = function () {
3030
3074
 
3031
3075
  }, {
3032
3076
  key: 'getProductDeviceLocations',
3033
- value: function getProductDeviceLocations(_ref101) {
3034
- var auth = _ref101.auth,
3035
- product = _ref101.product,
3036
- dateRange = _ref101.dateRange,
3037
- rectBl = _ref101.rectBl,
3038
- rectTr = _ref101.rectTr,
3039
- deviceId = _ref101.deviceId,
3040
- headers = _ref101.headers,
3041
- context = _ref101.context;
3077
+ value: function getProductDeviceLocations(_ref102) {
3078
+ var auth = _ref102.auth,
3079
+ product = _ref102.product,
3080
+ dateRange = _ref102.dateRange,
3081
+ rectBl = _ref102.rectBl,
3082
+ rectTr = _ref102.rectTr,
3083
+ deviceId = _ref102.deviceId,
3084
+ headers = _ref102.headers,
3085
+ context = _ref102.context;
3042
3086
 
3043
3087
  return this.get({
3044
3088
  uri: '/v1/products/' + product + '/locations/' + deviceId,
@@ -3064,27 +3108,15 @@ var Particle = function () {
3064
3108
 
3065
3109
  }, {
3066
3110
  key: 'deviceUri',
3067
- value: function deviceUri(_ref102) {
3068
- var deviceId = _ref102.deviceId,
3069
- product = _ref102.product;
3111
+ value: function deviceUri(_ref103) {
3112
+ var deviceId = _ref103.deviceId,
3113
+ product = _ref103.product;
3070
3114
 
3071
3115
  return product ? '/v1/products/' + product + '/devices/' + deviceId : '/v1/devices/' + deviceId;
3072
3116
  }
3073
3117
  }, {
3074
3118
  key: 'get',
3075
- value: function get(_ref103) {
3076
- var uri = _ref103.uri,
3077
- auth = _ref103.auth,
3078
- headers = _ref103.headers,
3079
- query = _ref103.query,
3080
- context = _ref103.context;
3081
-
3082
- context = this._buildContext(context);
3083
- return this.agent.get({ uri: uri, auth: auth, headers: headers, query: query, context: context });
3084
- }
3085
- }, {
3086
- key: 'head',
3087
- value: function head(_ref104) {
3119
+ value: function get(_ref104) {
3088
3120
  var uri = _ref104.uri,
3089
3121
  auth = _ref104.auth,
3090
3122
  headers = _ref104.headers,
@@ -3092,23 +3124,23 @@ var Particle = function () {
3092
3124
  context = _ref104.context;
3093
3125
 
3094
3126
  context = this._buildContext(context);
3095
- return this.agent.head({ uri: uri, auth: auth, headers: headers, query: query, context: context });
3127
+ return this.agent.get({ uri: uri, auth: auth, headers: headers, query: query, context: context });
3096
3128
  }
3097
3129
  }, {
3098
- key: 'post',
3099
- value: function post(_ref105) {
3130
+ key: 'head',
3131
+ value: function head(_ref105) {
3100
3132
  var uri = _ref105.uri,
3101
3133
  auth = _ref105.auth,
3102
3134
  headers = _ref105.headers,
3103
- data = _ref105.data,
3135
+ query = _ref105.query,
3104
3136
  context = _ref105.context;
3105
3137
 
3106
3138
  context = this._buildContext(context);
3107
- return this.agent.post({ uri: uri, auth: auth, headers: headers, data: data, context: context });
3139
+ return this.agent.head({ uri: uri, auth: auth, headers: headers, query: query, context: context });
3108
3140
  }
3109
3141
  }, {
3110
- key: 'put',
3111
- value: function put(_ref106) {
3142
+ key: 'post',
3143
+ value: function post(_ref106) {
3112
3144
  var uri = _ref106.uri,
3113
3145
  auth = _ref106.auth,
3114
3146
  headers = _ref106.headers,
@@ -3116,17 +3148,29 @@ var Particle = function () {
3116
3148
  context = _ref106.context;
3117
3149
 
3118
3150
  context = this._buildContext(context);
3119
- return this.agent.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });
3151
+ return this.agent.post({ uri: uri, auth: auth, headers: headers, data: data, context: context });
3120
3152
  }
3121
3153
  }, {
3122
- key: 'delete',
3123
- value: function _delete(_ref107) {
3154
+ key: 'put',
3155
+ value: function put(_ref107) {
3124
3156
  var uri = _ref107.uri,
3125
3157
  auth = _ref107.auth,
3126
3158
  headers = _ref107.headers,
3127
3159
  data = _ref107.data,
3128
3160
  context = _ref107.context;
3129
3161
 
3162
+ context = this._buildContext(context);
3163
+ return this.agent.put({ uri: uri, auth: auth, headers: headers, data: data, context: context });
3164
+ }
3165
+ }, {
3166
+ key: 'delete',
3167
+ value: function _delete(_ref108) {
3168
+ var uri = _ref108.uri,
3169
+ auth = _ref108.auth,
3170
+ headers = _ref108.headers,
3171
+ data = _ref108.data,
3172
+ context = _ref108.context;
3173
+
3130
3174
  context = this._buildContext(context);
3131
3175
  return this.agent.delete({ uri: uri, auth: auth, headers: headers, data: data, context: context });
3132
3176
  }