@seamapi/http 0.24.0 → 0.25.1

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.
Files changed (128) hide show
  1. package/README.md +15 -0
  2. package/dist/connect.cjs +771 -732
  3. package/dist/connect.cjs.map +1 -1
  4. package/dist/connect.d.cts +153 -127
  5. package/lib/seam/connect/index.d.ts +1 -0
  6. package/lib/seam/connect/index.js +1 -0
  7. package/lib/seam/connect/index.js.map +1 -1
  8. package/lib/seam/connect/routes/access-codes-unmanaged.d.ts +6 -5
  9. package/lib/seam/connect/routes/access-codes-unmanaged.js +26 -22
  10. package/lib/seam/connect/routes/access-codes-unmanaged.js.map +1 -1
  11. package/lib/seam/connect/routes/access-codes.d.ts +9 -8
  12. package/lib/seam/connect/routes/access-codes.js +41 -38
  13. package/lib/seam/connect/routes/access-codes.js.map +1 -1
  14. package/lib/seam/connect/routes/acs-access-groups.d.ts +6 -5
  15. package/lib/seam/connect/routes/acs-access-groups.js +26 -23
  16. package/lib/seam/connect/routes/acs-access-groups.js.map +1 -1
  17. package/lib/seam/connect/routes/acs-credential-pools.d.ts +2 -1
  18. package/lib/seam/connect/routes/acs-credential-pools.js +6 -5
  19. package/lib/seam/connect/routes/acs-credential-pools.js.map +1 -1
  20. package/lib/seam/connect/routes/acs-credential-provisioning-automations.d.ts +2 -1
  21. package/lib/seam/connect/routes/acs-credential-provisioning-automations.js +6 -5
  22. package/lib/seam/connect/routes/acs-credential-provisioning-automations.js.map +1 -1
  23. package/lib/seam/connect/routes/acs-credentials.d.ts +8 -7
  24. package/lib/seam/connect/routes/acs-credentials.js +36 -34
  25. package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
  26. package/lib/seam/connect/routes/acs-entrances.d.ts +5 -4
  27. package/lib/seam/connect/routes/acs-entrances.js +21 -19
  28. package/lib/seam/connect/routes/acs-entrances.js.map +1 -1
  29. package/lib/seam/connect/routes/acs-systems.d.ts +3 -2
  30. package/lib/seam/connect/routes/acs-systems.js +11 -10
  31. package/lib/seam/connect/routes/acs-systems.js.map +1 -1
  32. package/lib/seam/connect/routes/acs-users.d.ts +12 -11
  33. package/lib/seam/connect/routes/acs-users.js +56 -48
  34. package/lib/seam/connect/routes/acs-users.js.map +1 -1
  35. package/lib/seam/connect/routes/action-attempts.d.ts +3 -2
  36. package/lib/seam/connect/routes/action-attempts.js +12 -18
  37. package/lib/seam/connect/routes/action-attempts.js.map +1 -1
  38. package/lib/seam/connect/routes/client-sessions.d.ts +8 -7
  39. package/lib/seam/connect/routes/client-sessions.js +36 -33
  40. package/lib/seam/connect/routes/client-sessions.js.map +1 -1
  41. package/lib/seam/connect/routes/connect-webviews.d.ts +6 -5
  42. package/lib/seam/connect/routes/connect-webviews.js +25 -22
  43. package/lib/seam/connect/routes/connect-webviews.js.map +1 -1
  44. package/lib/seam/connect/routes/connected-accounts.d.ts +5 -4
  45. package/lib/seam/connect/routes/connected-accounts.js +21 -19
  46. package/lib/seam/connect/routes/connected-accounts.js.map +1 -1
  47. package/lib/seam/connect/routes/devices-simulate.d.ts +2 -1
  48. package/lib/seam/connect/routes/devices-simulate.js +6 -4
  49. package/lib/seam/connect/routes/devices-simulate.js.map +1 -1
  50. package/lib/seam/connect/routes/devices-unmanaged.d.ts +4 -3
  51. package/lib/seam/connect/routes/devices-unmanaged.js +16 -14
  52. package/lib/seam/connect/routes/devices-unmanaged.js.map +1 -1
  53. package/lib/seam/connect/routes/devices.d.ts +6 -5
  54. package/lib/seam/connect/routes/devices.js +26 -23
  55. package/lib/seam/connect/routes/devices.js.map +1 -1
  56. package/lib/seam/connect/routes/events.d.ts +3 -2
  57. package/lib/seam/connect/routes/events.js +11 -10
  58. package/lib/seam/connect/routes/events.js.map +1 -1
  59. package/lib/seam/connect/routes/locks.d.ts +5 -4
  60. package/lib/seam/connect/routes/locks.js +23 -36
  61. package/lib/seam/connect/routes/locks.js.map +1 -1
  62. package/lib/seam/connect/routes/networks.d.ts +3 -2
  63. package/lib/seam/connect/routes/networks.js +11 -10
  64. package/lib/seam/connect/routes/networks.js.map +1 -1
  65. package/lib/seam/connect/routes/noise-sensors-noise-thresholds.d.ts +6 -5
  66. package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js +26 -23
  67. package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -1
  68. package/lib/seam/connect/routes/phones-simulate.d.ts +2 -1
  69. package/lib/seam/connect/routes/phones-simulate.js +6 -5
  70. package/lib/seam/connect/routes/phones-simulate.js.map +1 -1
  71. package/lib/seam/connect/routes/phones.d.ts +3 -2
  72. package/lib/seam/connect/routes/phones.js +11 -9
  73. package/lib/seam/connect/routes/phones.js.map +1 -1
  74. package/lib/seam/connect/routes/thermostats-climate-setting-schedules.d.ts +6 -5
  75. package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js +26 -23
  76. package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js.map +1 -1
  77. package/lib/seam/connect/routes/thermostats.d.ts +9 -8
  78. package/lib/seam/connect/routes/thermostats.js +46 -76
  79. package/lib/seam/connect/routes/thermostats.js.map +1 -1
  80. package/lib/seam/connect/routes/user-identities-enrollment-automations.d.ts +5 -4
  81. package/lib/seam/connect/routes/user-identities-enrollment-automations.js +21 -19
  82. package/lib/seam/connect/routes/user-identities-enrollment-automations.js.map +1 -1
  83. package/lib/seam/connect/routes/user-identities.d.ts +13 -12
  84. package/lib/seam/connect/routes/user-identities.js +61 -54
  85. package/lib/seam/connect/routes/user-identities.js.map +1 -1
  86. package/lib/seam/connect/routes/webhooks.d.ts +6 -5
  87. package/lib/seam/connect/routes/webhooks.js +26 -23
  88. package/lib/seam/connect/routes/webhooks.js.map +1 -1
  89. package/lib/seam/connect/routes/workspaces.d.ts +5 -4
  90. package/lib/seam/connect/routes/workspaces.js +21 -19
  91. package/lib/seam/connect/routes/workspaces.js.map +1 -1
  92. package/lib/seam/connect/seam-http-request.d.ts +29 -0
  93. package/lib/seam/connect/seam-http-request.js +94 -0
  94. package/lib/seam/connect/seam-http-request.js.map +1 -0
  95. package/lib/version.d.ts +1 -1
  96. package/lib/version.js +1 -1
  97. package/package.json +2 -2
  98. package/src/lib/seam/connect/index.ts +1 -0
  99. package/src/lib/seam/connect/routes/access-codes-unmanaged.ts +37 -34
  100. package/src/lib/seam/connect/routes/access-codes.ts +56 -60
  101. package/src/lib/seam/connect/routes/acs-access-groups.ts +33 -32
  102. package/src/lib/seam/connect/routes/acs-credential-pools.ts +7 -7
  103. package/src/lib/seam/connect/routes/acs-credential-provisioning-automations.ts +11 -13
  104. package/src/lib/seam/connect/routes/acs-credentials.ts +42 -46
  105. package/src/lib/seam/connect/routes/acs-entrances.ts +31 -28
  106. package/src/lib/seam/connect/routes/acs-systems.ts +13 -14
  107. package/src/lib/seam/connect/routes/acs-users.ts +66 -61
  108. package/src/lib/seam/connect/routes/action-attempts.ts +14 -26
  109. package/src/lib/seam/connect/routes/client-sessions.ts +45 -49
  110. package/src/lib/seam/connect/routes/connect-webviews.ts +28 -28
  111. package/src/lib/seam/connect/routes/connected-accounts.ts +26 -29
  112. package/src/lib/seam/connect/routes/devices-simulate.ts +6 -4
  113. package/src/lib/seam/connect/routes/devices-unmanaged.ts +18 -18
  114. package/src/lib/seam/connect/routes/devices.ts +30 -31
  115. package/src/lib/seam/connect/routes/events.ts +11 -12
  116. package/src/lib/seam/connect/routes/locks.ts +25 -50
  117. package/src/lib/seam/connect/routes/networks.ts +14 -13
  118. package/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +48 -38
  119. package/src/lib/seam/connect/routes/phones-simulate.ts +9 -10
  120. package/src/lib/seam/connect/routes/phones.ts +11 -10
  121. package/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts +47 -55
  122. package/src/lib/seam/connect/routes/thermostats.ts +53 -110
  123. package/src/lib/seam/connect/routes/user-identities-enrollment-automations.ts +39 -48
  124. package/src/lib/seam/connect/routes/user-identities.ts +81 -78
  125. package/src/lib/seam/connect/routes/webhooks.ts +30 -28
  126. package/src/lib/seam/connect/routes/workspaces.ts +26 -25
  127. package/src/lib/seam/connect/seam-http-request.ts +168 -0
  128. package/src/lib/version.ts +1 -1
package/dist/connect.cjs CHANGED
@@ -11,6 +11,25 @@ var axios__default = /*#__PURE__*/_interopDefault(axios);
11
11
  var axiosBetterStacktrace__default = /*#__PURE__*/_interopDefault(axiosBetterStacktrace);
12
12
  var axiosRetry__default = /*#__PURE__*/_interopDefault(axiosRetry);
13
13
 
14
+ var __accessCheck = (obj, member, msg) => {
15
+ if (!member.has(obj))
16
+ throw TypeError("Cannot " + msg);
17
+ };
18
+ var __privateGet = (obj, member, getter) => {
19
+ __accessCheck(obj, member, "read from private field");
20
+ return getter ? getter.call(obj) : member.get(obj);
21
+ };
22
+ var __privateAdd = (obj, member, value) => {
23
+ if (member.has(obj))
24
+ throw TypeError("Cannot add the same private member more than once");
25
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
26
+ };
27
+ var __privateSet = (obj, member, value, setter) => {
28
+ __accessCheck(obj, member, "write to private field");
29
+ setter ? setter.call(obj, value) : member.set(obj, value);
30
+ return value;
31
+ };
32
+
14
33
  // src/lib/lts-version.ts
15
34
  var seamApiLtsVersion = "1.0.0";
16
35
 
@@ -634,6 +653,88 @@ var SeamActionAttemptTimeoutError = class extends SeamActionAttemptError {
634
653
  };
635
654
  var isSuccessfulActionAttempt = (actionAttempt) => actionAttempt.status === "success";
636
655
  var isFailedActionAttempt = (actionAttempt) => actionAttempt.status === "error";
656
+ var _a, _parent, _config;
657
+ var SeamHttpRequest = class {
658
+ constructor(parent, config) {
659
+ this[_a] = "SeamHttpRequest";
660
+ __privateAdd(this, _parent, void 0);
661
+ __privateAdd(this, _config, void 0);
662
+ __privateSet(this, _parent, parent);
663
+ __privateSet(this, _config, config);
664
+ }
665
+ get responseKey() {
666
+ return __privateGet(this, _config).responseKey;
667
+ }
668
+ get url() {
669
+ const { client } = __privateGet(this, _parent);
670
+ const { params } = __privateGet(this, _config);
671
+ const serializer = typeof client.defaults.paramsSerializer === "function" ? client.defaults.paramsSerializer : urlSearchParamsSerializer.serializeUrlSearchParams;
672
+ const origin = getUrlPrefix(client.defaults.baseURL ?? "");
673
+ const pathname = __privateGet(this, _config).path.startsWith("/") ? __privateGet(this, _config).path : `/${__privateGet(this, _config).path}`;
674
+ const path = params == null ? pathname : `${pathname}?${serializer(params)}`;
675
+ return new URL(`${origin}${path}`);
676
+ }
677
+ get method() {
678
+ return __privateGet(this, _config).method;
679
+ }
680
+ get body() {
681
+ return __privateGet(this, _config).body;
682
+ }
683
+ async execute() {
684
+ const { client } = __privateGet(this, _parent);
685
+ const response = await client.request({
686
+ url: __privateGet(this, _config).path,
687
+ method: __privateGet(this, _config).method,
688
+ data: __privateGet(this, _config).body,
689
+ params: __privateGet(this, _config).params
690
+ });
691
+ if (this.responseKey === void 0) {
692
+ return void 0;
693
+ }
694
+ const data = response.data[this.responseKey];
695
+ if (this.responseKey === "action_attempt") {
696
+ const waitForActionAttempt = __privateGet(this, _config).options?.waitForActionAttempt ?? __privateGet(this, _parent).defaults.waitForActionAttempt;
697
+ if (waitForActionAttempt !== false) {
698
+ return await resolveActionAttempt(
699
+ data,
700
+ SeamHttpActionAttempts.fromClient(client, {
701
+ ...__privateGet(this, _parent).defaults,
702
+ waitForActionAttempt: false
703
+ }),
704
+ typeof waitForActionAttempt === "boolean" ? {} : waitForActionAttempt
705
+ );
706
+ }
707
+ }
708
+ return data;
709
+ }
710
+ async then(onfulfilled, onrejected) {
711
+ return await this.execute().then(onfulfilled, onrejected);
712
+ }
713
+ async catch(onrejected) {
714
+ return await this.execute().catch(onrejected);
715
+ }
716
+ async finally(onfinally) {
717
+ return await this.execute().finally(onfinally);
718
+ }
719
+ };
720
+ _a = Symbol.toStringTag;
721
+ _parent = new WeakMap();
722
+ _config = new WeakMap();
723
+ var getUrlPrefix = (input) => {
724
+ if (URL.canParse(input)) {
725
+ const url = new URL(input).toString();
726
+ if (url.endsWith("/"))
727
+ return url.slice(0, -1);
728
+ return url;
729
+ }
730
+ if (globalThis.location != null) {
731
+ const pathname = input.startsWith("/") ? input : `/${input}`;
732
+ return new URL(`${globalThis.location.origin}${pathname}`).toString();
733
+ }
734
+ throw new Error(
735
+ `Cannot resolve origin from ${input} in a non-browser environment`
736
+ );
737
+ };
637
738
 
638
739
  // src/lib/seam/connect/routes/client-sessions.ts
639
740
  var SeamHttpClientSessions = class _SeamHttpClientSessions {
@@ -712,58 +813,60 @@ var SeamHttpClientSessions = class _SeamHttpClientSessions {
712
813
  const clientSessions = _SeamHttpClientSessions.fromClient(this.client);
713
814
  await clientSessions.get();
714
815
  }
715
- async create(body) {
716
- const { data } = await this.client.request({
717
- url: "/client_sessions/create",
816
+ create(body) {
817
+ return new SeamHttpRequest(this, {
818
+ path: "/client_sessions/create",
718
819
  method: "post",
719
- data: body
820
+ body,
821
+ responseKey: "client_session"
720
822
  });
721
- return data.client_session;
722
823
  }
723
- async delete(body) {
724
- await this.client.request({
725
- url: "/client_sessions/delete",
824
+ delete(body) {
825
+ return new SeamHttpRequest(this, {
826
+ path: "/client_sessions/delete",
726
827
  method: "post",
727
- data: body
828
+ body,
829
+ responseKey: void 0
728
830
  });
729
831
  }
730
- async get(body) {
731
- const { data } = await this.client.request({
732
- url: "/client_sessions/get",
832
+ get(body) {
833
+ return new SeamHttpRequest(this, {
834
+ path: "/client_sessions/get",
733
835
  method: "post",
734
- data: body
836
+ body,
837
+ responseKey: "client_session"
735
838
  });
736
- return data.client_session;
737
839
  }
738
- async getOrCreate(body) {
739
- const { data } = await this.client.request({
740
- url: "/client_sessions/get_or_create",
840
+ getOrCreate(body) {
841
+ return new SeamHttpRequest(this, {
842
+ path: "/client_sessions/get_or_create",
741
843
  method: "post",
742
- data: body
844
+ body,
845
+ responseKey: "client_session"
743
846
  });
744
- return data.client_session;
745
847
  }
746
- async grantAccess(body) {
747
- const { data } = await this.client.request({
748
- url: "/client_sessions/grant_access",
848
+ grantAccess(body) {
849
+ return new SeamHttpRequest(this, {
850
+ path: "/client_sessions/grant_access",
749
851
  method: "post",
750
- data: body
852
+ body,
853
+ responseKey: "client_session"
751
854
  });
752
- return data.client_session;
753
855
  }
754
- async list(body) {
755
- const { data } = await this.client.request({
756
- url: "/client_sessions/list",
856
+ list(body) {
857
+ return new SeamHttpRequest(this, {
858
+ path: "/client_sessions/list",
757
859
  method: "post",
758
- data: body
860
+ body,
861
+ responseKey: "client_sessions"
759
862
  });
760
- return data.client_sessions;
761
863
  }
762
- async revoke(body) {
763
- await this.client.request({
764
- url: "/client_sessions/revoke",
864
+ revoke(body) {
865
+ return new SeamHttpRequest(this, {
866
+ path: "/client_sessions/revoke",
765
867
  method: "post",
766
- data: body
868
+ body,
869
+ responseKey: void 0
767
870
  });
768
871
  }
769
872
  };
@@ -845,43 +948,44 @@ var SeamHttpAccessCodesUnmanaged = class _SeamHttpAccessCodesUnmanaged {
845
948
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
846
949
  await clientSessions.get();
847
950
  }
848
- async convertToManaged(body) {
849
- await this.client.request({
850
- url: "/access_codes/unmanaged/convert_to_managed",
951
+ convertToManaged(body) {
952
+ return new SeamHttpRequest(this, {
953
+ path: "/access_codes/unmanaged/convert_to_managed",
851
954
  method: "post",
852
- data: body
955
+ body,
956
+ responseKey: void 0
853
957
  });
854
958
  }
855
- async delete(body) {
856
- await this.client.request({
857
- url: "/access_codes/unmanaged/delete",
959
+ delete(body) {
960
+ return new SeamHttpRequest(this, {
961
+ path: "/access_codes/unmanaged/delete",
858
962
  method: "post",
859
- data: body
963
+ body,
964
+ responseKey: void 0
860
965
  });
861
966
  }
862
- async get(body) {
863
- const { data } = await this.client.request(
864
- {
865
- url: "/access_codes/unmanaged/get",
866
- method: "post",
867
- data: body
868
- }
869
- );
870
- return data.access_code;
967
+ get(body) {
968
+ return new SeamHttpRequest(this, {
969
+ path: "/access_codes/unmanaged/get",
970
+ method: "post",
971
+ body,
972
+ responseKey: "access_code"
973
+ });
871
974
  }
872
- async list(body) {
873
- const { data } = await this.client.request({
874
- url: "/access_codes/unmanaged/list",
975
+ list(body) {
976
+ return new SeamHttpRequest(this, {
977
+ path: "/access_codes/unmanaged/list",
875
978
  method: "post",
876
- data: body
979
+ body,
980
+ responseKey: "access_codes"
877
981
  });
878
- return data.access_codes;
879
982
  }
880
- async update(body) {
881
- await this.client.request({
882
- url: "/access_codes/unmanaged/update",
983
+ update(body) {
984
+ return new SeamHttpRequest(this, {
985
+ path: "/access_codes/unmanaged/update",
883
986
  method: "post",
884
- data: body
987
+ body,
988
+ responseKey: void 0
885
989
  });
886
990
  }
887
991
  };
@@ -966,68 +1070,68 @@ var SeamHttpAccessCodes = class _SeamHttpAccessCodes {
966
1070
  get unmanaged() {
967
1071
  return SeamHttpAccessCodesUnmanaged.fromClient(this.client, this.defaults);
968
1072
  }
969
- async create(body) {
970
- const { data } = await this.client.request({
971
- url: "/access_codes/create",
1073
+ create(body) {
1074
+ return new SeamHttpRequest(this, {
1075
+ path: "/access_codes/create",
972
1076
  method: "post",
973
- data: body
1077
+ body,
1078
+ responseKey: "access_code"
974
1079
  });
975
- return data.access_code;
976
1080
  }
977
- async createMultiple(body) {
978
- const { data } = await this.client.request({
979
- url: "/access_codes/create_multiple",
1081
+ createMultiple(body) {
1082
+ return new SeamHttpRequest(this, {
1083
+ path: "/access_codes/create_multiple",
980
1084
  method: "post",
981
- data: body
1085
+ body,
1086
+ responseKey: "access_codes"
982
1087
  });
983
- return data.access_codes;
984
1088
  }
985
- async delete(body) {
986
- await this.client.request({
987
- url: "/access_codes/delete",
1089
+ delete(body) {
1090
+ return new SeamHttpRequest(this, {
1091
+ path: "/access_codes/delete",
988
1092
  method: "post",
989
- data: body
1093
+ body,
1094
+ responseKey: void 0
990
1095
  });
991
1096
  }
992
- async generateCode(body) {
993
- const { data } = await this.client.request(
994
- {
995
- url: "/access_codes/generate_code",
996
- method: "post",
997
- data: body
998
- }
999
- );
1000
- return data.generated_code;
1097
+ generateCode(body) {
1098
+ return new SeamHttpRequest(this, {
1099
+ path: "/access_codes/generate_code",
1100
+ method: "post",
1101
+ body,
1102
+ responseKey: "generated_code"
1103
+ });
1001
1104
  }
1002
- async get(body) {
1003
- const { data } = await this.client.request({
1004
- url: "/access_codes/get",
1105
+ get(body) {
1106
+ return new SeamHttpRequest(this, {
1107
+ path: "/access_codes/get",
1005
1108
  method: "post",
1006
- data: body
1109
+ body,
1110
+ responseKey: "access_code"
1007
1111
  });
1008
- return data.access_code;
1009
1112
  }
1010
- async list(body) {
1011
- const { data } = await this.client.request({
1012
- url: "/access_codes/list",
1113
+ list(body) {
1114
+ return new SeamHttpRequest(this, {
1115
+ path: "/access_codes/list",
1013
1116
  method: "post",
1014
- data: body
1117
+ body,
1118
+ responseKey: "access_codes"
1015
1119
  });
1016
- return data.access_codes;
1017
1120
  }
1018
- async pullBackupAccessCode(body) {
1019
- const { data } = await this.client.request({
1020
- url: "/access_codes/pull_backup_access_code",
1121
+ pullBackupAccessCode(body) {
1122
+ return new SeamHttpRequest(this, {
1123
+ path: "/access_codes/pull_backup_access_code",
1021
1124
  method: "post",
1022
- data: body
1125
+ body,
1126
+ responseKey: "backup_access_code"
1023
1127
  });
1024
- return data.backup_access_code;
1025
1128
  }
1026
- async update(body) {
1027
- await this.client.request({
1028
- url: "/access_codes/update",
1129
+ update(body) {
1130
+ return new SeamHttpRequest(this, {
1131
+ path: "/access_codes/update",
1029
1132
  method: "post",
1030
- data: body
1133
+ body,
1134
+ responseKey: void 0
1031
1135
  });
1032
1136
  }
1033
1137
  };
@@ -1109,42 +1213,44 @@ var SeamHttpAcsAccessGroups = class _SeamHttpAcsAccessGroups {
1109
1213
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1110
1214
  await clientSessions.get();
1111
1215
  }
1112
- async addUser(body) {
1113
- await this.client.request({
1114
- url: "/acs/access_groups/add_user",
1216
+ addUser(body) {
1217
+ return new SeamHttpRequest(this, {
1218
+ path: "/acs/access_groups/add_user",
1115
1219
  method: "post",
1116
- data: body
1220
+ body,
1221
+ responseKey: void 0
1117
1222
  });
1118
1223
  }
1119
- async get(body) {
1120
- const { data } = await this.client.request({
1121
- url: "/acs/access_groups/get",
1224
+ get(body) {
1225
+ return new SeamHttpRequest(this, {
1226
+ path: "/acs/access_groups/get",
1122
1227
  method: "post",
1123
- data: body
1228
+ body,
1229
+ responseKey: "acs_access_group"
1124
1230
  });
1125
- return data.acs_access_group;
1126
1231
  }
1127
- async list(body) {
1128
- const { data } = await this.client.request({
1129
- url: "/acs/access_groups/list",
1232
+ list(body) {
1233
+ return new SeamHttpRequest(this, {
1234
+ path: "/acs/access_groups/list",
1130
1235
  method: "post",
1131
- data: body
1236
+ body,
1237
+ responseKey: "acs_access_groups"
1132
1238
  });
1133
- return data.acs_access_groups;
1134
1239
  }
1135
- async listUsers(body) {
1136
- const { data } = await this.client.request({
1137
- url: "/acs/access_groups/list_users",
1240
+ listUsers(body) {
1241
+ return new SeamHttpRequest(this, {
1242
+ path: "/acs/access_groups/list_users",
1138
1243
  method: "post",
1139
- data: body
1244
+ body,
1245
+ responseKey: "acs_users"
1140
1246
  });
1141
- return data.acs_users;
1142
1247
  }
1143
- async removeUser(body) {
1144
- await this.client.request({
1145
- url: "/acs/access_groups/remove_user",
1248
+ removeUser(body) {
1249
+ return new SeamHttpRequest(this, {
1250
+ path: "/acs/access_groups/remove_user",
1146
1251
  method: "post",
1147
- data: body
1252
+ body,
1253
+ responseKey: void 0
1148
1254
  });
1149
1255
  }
1150
1256
  };
@@ -1226,13 +1332,13 @@ var SeamHttpAcsCredentialPools = class _SeamHttpAcsCredentialPools {
1226
1332
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1227
1333
  await clientSessions.get();
1228
1334
  }
1229
- async list(body) {
1230
- const { data } = await this.client.request({
1231
- url: "/acs/credential_pools/list",
1335
+ list(body) {
1336
+ return new SeamHttpRequest(this, {
1337
+ path: "/acs/credential_pools/list",
1232
1338
  method: "post",
1233
- data: body
1339
+ body,
1340
+ responseKey: "acs_credential_pools"
1234
1341
  });
1235
- return data.acs_credential_pools;
1236
1342
  }
1237
1343
  };
1238
1344
 
@@ -1316,15 +1422,13 @@ var SeamHttpAcsCredentialProvisioningAutomations = class _SeamHttpAcsCredentialP
1316
1422
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1317
1423
  await clientSessions.get();
1318
1424
  }
1319
- async launch(body) {
1320
- const { data } = await this.client.request(
1321
- {
1322
- url: "/acs/credential_provisioning_automations/launch",
1323
- method: "post",
1324
- data: body
1325
- }
1326
- );
1327
- return data.acs_credential_provisioning_automation;
1425
+ launch(body) {
1426
+ return new SeamHttpRequest(this, {
1427
+ path: "/acs/credential_provisioning_automations/launch",
1428
+ method: "post",
1429
+ body,
1430
+ responseKey: "acs_credential_provisioning_automation"
1431
+ });
1328
1432
  }
1329
1433
  };
1330
1434
 
@@ -1405,60 +1509,61 @@ var SeamHttpAcsCredentials = class _SeamHttpAcsCredentials {
1405
1509
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1406
1510
  await clientSessions.get();
1407
1511
  }
1408
- async assign(body) {
1409
- const { data } = await this.client.request({
1410
- url: "/acs/credentials/assign",
1512
+ assign(body) {
1513
+ return new SeamHttpRequest(this, {
1514
+ path: "/acs/credentials/assign",
1411
1515
  method: "post",
1412
- data: body
1516
+ body,
1517
+ responseKey: "acs_credential"
1413
1518
  });
1414
- return data.acs_credential;
1415
1519
  }
1416
- async create(body) {
1417
- const { data } = await this.client.request({
1418
- url: "/acs/credentials/create",
1520
+ create(body) {
1521
+ return new SeamHttpRequest(this, {
1522
+ path: "/acs/credentials/create",
1419
1523
  method: "post",
1420
- data: body
1524
+ body,
1525
+ responseKey: "acs_credential"
1421
1526
  });
1422
- return data.acs_credential;
1423
1527
  }
1424
- async delete(body) {
1425
- await this.client.request({
1426
- url: "/acs/credentials/delete",
1528
+ delete(body) {
1529
+ return new SeamHttpRequest(this, {
1530
+ path: "/acs/credentials/delete",
1427
1531
  method: "post",
1428
- data: body
1532
+ body,
1533
+ responseKey: void 0
1429
1534
  });
1430
1535
  }
1431
- async get(body) {
1432
- const { data } = await this.client.request({
1433
- url: "/acs/credentials/get",
1536
+ get(body) {
1537
+ return new SeamHttpRequest(this, {
1538
+ path: "/acs/credentials/get",
1434
1539
  method: "post",
1435
- data: body
1540
+ body,
1541
+ responseKey: "acs_credential"
1436
1542
  });
1437
- return data.acs_credential;
1438
1543
  }
1439
- async list(body) {
1440
- const { data } = await this.client.request({
1441
- url: "/acs/credentials/list",
1544
+ list(body) {
1545
+ return new SeamHttpRequest(this, {
1546
+ path: "/acs/credentials/list",
1442
1547
  method: "post",
1443
- data: body
1548
+ body,
1549
+ responseKey: "acs_credentials"
1444
1550
  });
1445
- return data.acs_credentials;
1446
1551
  }
1447
- async unassign(body) {
1448
- const { data } = await this.client.request({
1449
- url: "/acs/credentials/unassign",
1552
+ unassign(body) {
1553
+ return new SeamHttpRequest(this, {
1554
+ path: "/acs/credentials/unassign",
1450
1555
  method: "post",
1451
- data: body
1556
+ body,
1557
+ responseKey: "acs_credential"
1452
1558
  });
1453
- return data.acs_credential;
1454
1559
  }
1455
- async update(body) {
1456
- const { data } = await this.client.request({
1457
- url: "/acs/credentials/update",
1560
+ update(body) {
1561
+ return new SeamHttpRequest(this, {
1562
+ path: "/acs/credentials/update",
1458
1563
  method: "post",
1459
- data: body
1564
+ body,
1565
+ responseKey: "acs_credential"
1460
1566
  });
1461
- return data.acs_credential;
1462
1567
  }
1463
1568
  };
1464
1569
 
@@ -1539,36 +1644,37 @@ var SeamHttpAcsEntrances = class _SeamHttpAcsEntrances {
1539
1644
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1540
1645
  await clientSessions.get();
1541
1646
  }
1542
- async get(body) {
1543
- const { data } = await this.client.request({
1544
- url: "/acs/entrances/get",
1647
+ get(body) {
1648
+ return new SeamHttpRequest(this, {
1649
+ path: "/acs/entrances/get",
1545
1650
  method: "post",
1546
- data: body
1651
+ body,
1652
+ responseKey: "acs_entrance"
1547
1653
  });
1548
- return data.acs_entrance;
1549
1654
  }
1550
- async grantAccess(body) {
1551
- await this.client.request({
1552
- url: "/acs/entrances/grant_access",
1655
+ grantAccess(body) {
1656
+ return new SeamHttpRequest(this, {
1657
+ path: "/acs/entrances/grant_access",
1553
1658
  method: "post",
1554
- data: body
1659
+ body,
1660
+ responseKey: void 0
1555
1661
  });
1556
1662
  }
1557
- async list(body) {
1558
- const { data } = await this.client.request({
1559
- url: "/acs/entrances/list",
1663
+ list(body) {
1664
+ return new SeamHttpRequest(this, {
1665
+ path: "/acs/entrances/list",
1560
1666
  method: "post",
1561
- data: body
1667
+ body,
1668
+ responseKey: "acs_entrances"
1562
1669
  });
1563
- return data.acs_entrances;
1564
1670
  }
1565
- async listCredentialsWithAccess(body) {
1566
- const { data } = await this.client.request({
1567
- url: "/acs/entrances/list_credentials_with_access",
1671
+ listCredentialsWithAccess(body) {
1672
+ return new SeamHttpRequest(this, {
1673
+ path: "/acs/entrances/list_credentials_with_access",
1568
1674
  method: "post",
1569
- data: body
1675
+ body,
1676
+ responseKey: "acs_credentials"
1570
1677
  });
1571
- return data.acs_credentials;
1572
1678
  }
1573
1679
  };
1574
1680
 
@@ -1649,21 +1755,21 @@ var SeamHttpAcsSystems = class _SeamHttpAcsSystems {
1649
1755
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1650
1756
  await clientSessions.get();
1651
1757
  }
1652
- async get(body) {
1653
- const { data } = await this.client.request({
1654
- url: "/acs/systems/get",
1758
+ get(body) {
1759
+ return new SeamHttpRequest(this, {
1760
+ path: "/acs/systems/get",
1655
1761
  method: "post",
1656
- data: body
1762
+ body,
1763
+ responseKey: "acs_system"
1657
1764
  });
1658
- return data.acs_system;
1659
1765
  }
1660
- async list(body) {
1661
- const { data } = await this.client.request({
1662
- url: "/acs/systems/list",
1766
+ list(body) {
1767
+ return new SeamHttpRequest(this, {
1768
+ path: "/acs/systems/list",
1663
1769
  method: "post",
1664
- data: body
1770
+ body,
1771
+ responseKey: "acs_systems"
1665
1772
  });
1666
- return data.acs_systems;
1667
1773
  }
1668
1774
  };
1669
1775
 
@@ -1744,85 +1850,92 @@ var SeamHttpAcsUsers = class _SeamHttpAcsUsers {
1744
1850
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
1745
1851
  await clientSessions.get();
1746
1852
  }
1747
- async addToAccessGroup(body) {
1748
- await this.client.request({
1749
- url: "/acs/users/add_to_access_group",
1853
+ addToAccessGroup(body) {
1854
+ return new SeamHttpRequest(this, {
1855
+ path: "/acs/users/add_to_access_group",
1750
1856
  method: "post",
1751
- data: body
1857
+ body,
1858
+ responseKey: void 0
1752
1859
  });
1753
1860
  }
1754
- async create(body) {
1755
- const { data } = await this.client.request({
1756
- url: "/acs/users/create",
1861
+ create(body) {
1862
+ return new SeamHttpRequest(this, {
1863
+ path: "/acs/users/create",
1757
1864
  method: "post",
1758
- data: body
1865
+ body,
1866
+ responseKey: "acs_user"
1759
1867
  });
1760
- return data.acs_user;
1761
1868
  }
1762
- async delete(body) {
1763
- await this.client.request({
1764
- url: "/acs/users/delete",
1869
+ delete(body) {
1870
+ return new SeamHttpRequest(this, {
1871
+ path: "/acs/users/delete",
1765
1872
  method: "post",
1766
- data: body
1873
+ body,
1874
+ responseKey: void 0
1767
1875
  });
1768
1876
  }
1769
- async get(body) {
1770
- const { data } = await this.client.request({
1771
- url: "/acs/users/get",
1877
+ get(body) {
1878
+ return new SeamHttpRequest(this, {
1879
+ path: "/acs/users/get",
1772
1880
  method: "post",
1773
- data: body
1881
+ body,
1882
+ responseKey: "acs_user"
1774
1883
  });
1775
- return data.acs_user;
1776
1884
  }
1777
- async list(body) {
1778
- const { data } = await this.client.request({
1779
- url: "/acs/users/list",
1885
+ list(body) {
1886
+ return new SeamHttpRequest(this, {
1887
+ path: "/acs/users/list",
1780
1888
  method: "post",
1781
- data: body
1889
+ body,
1890
+ responseKey: "acs_users"
1782
1891
  });
1783
- return data.acs_users;
1784
1892
  }
1785
- async listAccessibleEntrances(body) {
1786
- const { data } = await this.client.request({
1787
- url: "/acs/users/list_accessible_entrances",
1893
+ listAccessibleEntrances(body) {
1894
+ return new SeamHttpRequest(this, {
1895
+ path: "/acs/users/list_accessible_entrances",
1788
1896
  method: "post",
1789
- data: body
1897
+ body,
1898
+ responseKey: "acs_entrances"
1790
1899
  });
1791
- return data.acs_entrances;
1792
1900
  }
1793
- async removeFromAccessGroup(body) {
1794
- await this.client.request({
1795
- url: "/acs/users/remove_from_access_group",
1901
+ removeFromAccessGroup(body) {
1902
+ return new SeamHttpRequest(this, {
1903
+ path: "/acs/users/remove_from_access_group",
1796
1904
  method: "post",
1797
- data: body
1905
+ body,
1906
+ responseKey: void 0
1798
1907
  });
1799
1908
  }
1800
- async revokeAccessToAllEntrances(body) {
1801
- await this.client.request({
1802
- url: "/acs/users/revoke_access_to_all_entrances",
1909
+ revokeAccessToAllEntrances(body) {
1910
+ return new SeamHttpRequest(this, {
1911
+ path: "/acs/users/revoke_access_to_all_entrances",
1803
1912
  method: "post",
1804
- data: body
1913
+ body,
1914
+ responseKey: void 0
1805
1915
  });
1806
1916
  }
1807
- async suspend(body) {
1808
- await this.client.request({
1809
- url: "/acs/users/suspend",
1917
+ suspend(body) {
1918
+ return new SeamHttpRequest(this, {
1919
+ path: "/acs/users/suspend",
1810
1920
  method: "post",
1811
- data: body
1921
+ body,
1922
+ responseKey: void 0
1812
1923
  });
1813
1924
  }
1814
- async unsuspend(body) {
1815
- await this.client.request({
1816
- url: "/acs/users/unsuspend",
1925
+ unsuspend(body) {
1926
+ return new SeamHttpRequest(this, {
1927
+ path: "/acs/users/unsuspend",
1817
1928
  method: "post",
1818
- data: body
1929
+ body,
1930
+ responseKey: void 0
1819
1931
  });
1820
1932
  }
1821
- async update(body) {
1822
- await this.client.request({
1823
- url: "/acs/users/update",
1933
+ update(body) {
1934
+ return new SeamHttpRequest(this, {
1935
+ path: "/acs/users/update",
1824
1936
  method: "post",
1825
- data: body
1937
+ body,
1938
+ responseKey: void 0
1826
1939
  });
1827
1940
  }
1828
1941
  };
@@ -2007,32 +2120,22 @@ var SeamHttpActionAttempts = class _SeamHttpActionAttempts {
2007
2120
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2008
2121
  await clientSessions.get();
2009
2122
  }
2010
- async get(body, options = {}) {
2011
- const { data } = await this.client.request({
2012
- url: "/action_attempts/get",
2123
+ get(body, options = {}) {
2124
+ return new SeamHttpRequest(this, {
2125
+ path: "/action_attempts/get",
2013
2126
  method: "post",
2014
- data: body
2015
- });
2016
- const waitForActionAttempt = options.waitForActionAttempt ?? this.defaults.waitForActionAttempt;
2017
- if (waitForActionAttempt !== false) {
2018
- return await resolveActionAttempt(
2019
- data.action_attempt,
2020
- _SeamHttpActionAttempts.fromClient(this.client, {
2021
- ...this.defaults,
2022
- waitForActionAttempt: false
2023
- }),
2024
- typeof waitForActionAttempt === "boolean" ? {} : waitForActionAttempt
2025
- );
2026
- }
2027
- return data.action_attempt;
2127
+ body,
2128
+ responseKey: "action_attempt",
2129
+ options
2130
+ });
2028
2131
  }
2029
- async list(body) {
2030
- const { data } = await this.client.request({
2031
- url: "/action_attempts/list",
2132
+ list(body) {
2133
+ return new SeamHttpRequest(this, {
2134
+ path: "/action_attempts/list",
2032
2135
  method: "post",
2033
- data: body
2136
+ body,
2137
+ responseKey: "action_attempts"
2034
2138
  });
2035
- return data.action_attempts;
2036
2139
  }
2037
2140
  };
2038
2141
 
@@ -2113,42 +2216,44 @@ var SeamHttpConnectWebviews = class _SeamHttpConnectWebviews {
2113
2216
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2114
2217
  await clientSessions.get();
2115
2218
  }
2116
- async create(body) {
2117
- const { data } = await this.client.request({
2118
- url: "/connect_webviews/create",
2219
+ create(body) {
2220
+ return new SeamHttpRequest(this, {
2221
+ path: "/connect_webviews/create",
2119
2222
  method: "post",
2120
- data: body
2223
+ body,
2224
+ responseKey: "connect_webview"
2121
2225
  });
2122
- return data.connect_webview;
2123
2226
  }
2124
- async delete(body) {
2125
- await this.client.request({
2126
- url: "/connect_webviews/delete",
2227
+ delete(body) {
2228
+ return new SeamHttpRequest(this, {
2229
+ path: "/connect_webviews/delete",
2127
2230
  method: "post",
2128
- data: body
2231
+ body,
2232
+ responseKey: void 0
2129
2233
  });
2130
2234
  }
2131
- async get(body) {
2132
- const { data } = await this.client.request({
2133
- url: "/connect_webviews/get",
2235
+ get(body) {
2236
+ return new SeamHttpRequest(this, {
2237
+ path: "/connect_webviews/get",
2134
2238
  method: "post",
2135
- data: body
2239
+ body,
2240
+ responseKey: "connect_webview"
2136
2241
  });
2137
- return data.connect_webview;
2138
2242
  }
2139
- async list(body) {
2140
- const { data } = await this.client.request({
2141
- url: "/connect_webviews/list",
2243
+ list(body) {
2244
+ return new SeamHttpRequest(this, {
2245
+ path: "/connect_webviews/list",
2142
2246
  method: "post",
2143
- data: body
2247
+ body,
2248
+ responseKey: "connect_webviews"
2144
2249
  });
2145
- return data.connect_webviews;
2146
2250
  }
2147
- async view(params) {
2148
- await this.client.request({
2149
- url: "/connect_webviews/view",
2251
+ view(params) {
2252
+ return new SeamHttpRequest(this, {
2253
+ path: "/connect_webviews/view",
2150
2254
  method: "get",
2151
- params
2255
+ params,
2256
+ responseKey: void 0
2152
2257
  });
2153
2258
  }
2154
2259
  };
@@ -2230,38 +2335,37 @@ var SeamHttpConnectedAccounts = class _SeamHttpConnectedAccounts {
2230
2335
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2231
2336
  await clientSessions.get();
2232
2337
  }
2233
- async delete(body) {
2234
- await this.client.request({
2235
- url: "/connected_accounts/delete",
2338
+ delete(body) {
2339
+ return new SeamHttpRequest(this, {
2340
+ path: "/connected_accounts/delete",
2236
2341
  method: "post",
2237
- data: body
2342
+ body,
2343
+ responseKey: void 0
2238
2344
  });
2239
2345
  }
2240
- async get(body) {
2241
- const { data } = await this.client.request({
2242
- url: "/connected_accounts/get",
2346
+ get(body) {
2347
+ return new SeamHttpRequest(this, {
2348
+ path: "/connected_accounts/get",
2243
2349
  method: "post",
2244
- data: body
2350
+ body,
2351
+ responseKey: "connected_account"
2245
2352
  });
2246
- return data.connected_account;
2247
2353
  }
2248
- async list(body) {
2249
- const { data } = await this.client.request({
2250
- url: "/connected_accounts/list",
2354
+ list(body) {
2355
+ return new SeamHttpRequest(this, {
2356
+ path: "/connected_accounts/list",
2251
2357
  method: "post",
2252
- data: body
2358
+ body,
2359
+ responseKey: "connected_accounts"
2253
2360
  });
2254
- return data.connected_accounts;
2255
2361
  }
2256
- async update(body) {
2257
- const { data } = await this.client.request(
2258
- {
2259
- url: "/connected_accounts/update",
2260
- method: "post",
2261
- data: body
2262
- }
2263
- );
2264
- return data.connected_account;
2362
+ update(body) {
2363
+ return new SeamHttpRequest(this, {
2364
+ path: "/connected_accounts/update",
2365
+ method: "post",
2366
+ body,
2367
+ responseKey: "connected_account"
2368
+ });
2265
2369
  }
2266
2370
  };
2267
2371
 
@@ -2342,11 +2446,12 @@ var SeamHttpDevicesSimulate = class _SeamHttpDevicesSimulate {
2342
2446
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2343
2447
  await clientSessions.get();
2344
2448
  }
2345
- async remove(body) {
2346
- await this.client.request({
2347
- url: "/devices/simulate/remove",
2449
+ remove(body) {
2450
+ return new SeamHttpRequest(this, {
2451
+ path: "/devices/simulate/remove",
2348
2452
  method: "post",
2349
- data: body
2453
+ body,
2454
+ responseKey: void 0
2350
2455
  });
2351
2456
  }
2352
2457
  };
@@ -2428,27 +2533,28 @@ var SeamHttpDevicesUnmanaged = class _SeamHttpDevicesUnmanaged {
2428
2533
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2429
2534
  await clientSessions.get();
2430
2535
  }
2431
- async get(body) {
2432
- const { data } = await this.client.request({
2433
- url: "/devices/unmanaged/get",
2536
+ get(body) {
2537
+ return new SeamHttpRequest(this, {
2538
+ path: "/devices/unmanaged/get",
2434
2539
  method: "post",
2435
- data: body
2540
+ body,
2541
+ responseKey: "device"
2436
2542
  });
2437
- return data.device;
2438
2543
  }
2439
- async list(body) {
2440
- const { data } = await this.client.request({
2441
- url: "/devices/unmanaged/list",
2544
+ list(body) {
2545
+ return new SeamHttpRequest(this, {
2546
+ path: "/devices/unmanaged/list",
2442
2547
  method: "post",
2443
- data: body
2548
+ body,
2549
+ responseKey: "devices"
2444
2550
  });
2445
- return data.devices;
2446
2551
  }
2447
- async update(body) {
2448
- await this.client.request({
2449
- url: "/devices/unmanaged/update",
2552
+ update(body) {
2553
+ return new SeamHttpRequest(this, {
2554
+ path: "/devices/unmanaged/update",
2450
2555
  method: "post",
2451
- data: body
2556
+ body,
2557
+ responseKey: void 0
2452
2558
  });
2453
2559
  }
2454
2560
  };
@@ -2536,42 +2642,44 @@ var SeamHttpDevices = class _SeamHttpDevices {
2536
2642
  get simulate() {
2537
2643
  return SeamHttpDevicesSimulate.fromClient(this.client, this.defaults);
2538
2644
  }
2539
- async delete(body) {
2540
- await this.client.request({
2541
- url: "/devices/delete",
2645
+ delete(body) {
2646
+ return new SeamHttpRequest(this, {
2647
+ path: "/devices/delete",
2542
2648
  method: "post",
2543
- data: body
2649
+ body,
2650
+ responseKey: void 0
2544
2651
  });
2545
2652
  }
2546
- async get(body) {
2547
- const { data } = await this.client.request({
2548
- url: "/devices/get",
2653
+ get(body) {
2654
+ return new SeamHttpRequest(this, {
2655
+ path: "/devices/get",
2549
2656
  method: "post",
2550
- data: body
2657
+ body,
2658
+ responseKey: "device"
2551
2659
  });
2552
- return data.device;
2553
2660
  }
2554
- async list(body) {
2555
- const { data } = await this.client.request({
2556
- url: "/devices/list",
2661
+ list(body) {
2662
+ return new SeamHttpRequest(this, {
2663
+ path: "/devices/list",
2557
2664
  method: "post",
2558
- data: body
2665
+ body,
2666
+ responseKey: "devices"
2559
2667
  });
2560
- return data.devices;
2561
2668
  }
2562
- async listDeviceProviders(body) {
2563
- const { data } = await this.client.request({
2564
- url: "/devices/list_device_providers",
2669
+ listDeviceProviders(body) {
2670
+ return new SeamHttpRequest(this, {
2671
+ path: "/devices/list_device_providers",
2565
2672
  method: "post",
2566
- data: body
2673
+ body,
2674
+ responseKey: "device_providers"
2567
2675
  });
2568
- return data.device_providers;
2569
2676
  }
2570
- async update(body) {
2571
- await this.client.request({
2572
- url: "/devices/update",
2677
+ update(body) {
2678
+ return new SeamHttpRequest(this, {
2679
+ path: "/devices/update",
2573
2680
  method: "post",
2574
- data: body
2681
+ body,
2682
+ responseKey: void 0
2575
2683
  });
2576
2684
  }
2577
2685
  };
@@ -2653,21 +2761,21 @@ var SeamHttpEvents = class _SeamHttpEvents {
2653
2761
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2654
2762
  await clientSessions.get();
2655
2763
  }
2656
- async get(body) {
2657
- const { data } = await this.client.request({
2658
- url: "/events/get",
2764
+ get(body) {
2765
+ return new SeamHttpRequest(this, {
2766
+ path: "/events/get",
2659
2767
  method: "post",
2660
- data: body
2768
+ body,
2769
+ responseKey: "event"
2661
2770
  });
2662
- return data.event;
2663
2771
  }
2664
- async list(body) {
2665
- const { data } = await this.client.request({
2666
- url: "/events/list",
2772
+ list(body) {
2773
+ return new SeamHttpRequest(this, {
2774
+ path: "/events/list",
2667
2775
  method: "post",
2668
- data: body
2776
+ body,
2777
+ responseKey: "events"
2669
2778
  });
2670
- return data.events;
2671
2779
  }
2672
2780
  };
2673
2781
 
@@ -2748,59 +2856,39 @@ var SeamHttpLocks = class _SeamHttpLocks {
2748
2856
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2749
2857
  await clientSessions.get();
2750
2858
  }
2751
- async get(body) {
2752
- const { data } = await this.client.request({
2753
- url: "/locks/get",
2859
+ get(body) {
2860
+ return new SeamHttpRequest(this, {
2861
+ path: "/locks/get",
2754
2862
  method: "post",
2755
- data: body
2863
+ body,
2864
+ responseKey: "device"
2756
2865
  });
2757
- return data.device;
2758
2866
  }
2759
- async list(body) {
2760
- const { data } = await this.client.request({
2761
- url: "/locks/list",
2867
+ list(body) {
2868
+ return new SeamHttpRequest(this, {
2869
+ path: "/locks/list",
2762
2870
  method: "post",
2763
- data: body
2871
+ body,
2872
+ responseKey: "devices"
2764
2873
  });
2765
- return data.devices;
2766
2874
  }
2767
- async lockDoor(body, options = {}) {
2768
- const { data } = await this.client.request({
2769
- url: "/locks/lock_door",
2875
+ lockDoor(body, options = {}) {
2876
+ return new SeamHttpRequest(this, {
2877
+ path: "/locks/lock_door",
2770
2878
  method: "post",
2771
- data: body
2772
- });
2773
- const waitForActionAttempt = options.waitForActionAttempt ?? this.defaults.waitForActionAttempt;
2774
- if (waitForActionAttempt !== false) {
2775
- return await resolveActionAttempt(
2776
- data.action_attempt,
2777
- SeamHttpActionAttempts.fromClient(this.client, {
2778
- ...this.defaults,
2779
- waitForActionAttempt: false
2780
- }),
2781
- typeof waitForActionAttempt === "boolean" ? {} : waitForActionAttempt
2782
- );
2783
- }
2784
- return data.action_attempt;
2879
+ body,
2880
+ responseKey: "action_attempt",
2881
+ options
2882
+ });
2785
2883
  }
2786
- async unlockDoor(body, options = {}) {
2787
- const { data } = await this.client.request({
2788
- url: "/locks/unlock_door",
2884
+ unlockDoor(body, options = {}) {
2885
+ return new SeamHttpRequest(this, {
2886
+ path: "/locks/unlock_door",
2789
2887
  method: "post",
2790
- data: body
2791
- });
2792
- const waitForActionAttempt = options.waitForActionAttempt ?? this.defaults.waitForActionAttempt;
2793
- if (waitForActionAttempt !== false) {
2794
- return await resolveActionAttempt(
2795
- data.action_attempt,
2796
- SeamHttpActionAttempts.fromClient(this.client, {
2797
- ...this.defaults,
2798
- waitForActionAttempt: false
2799
- }),
2800
- typeof waitForActionAttempt === "boolean" ? {} : waitForActionAttempt
2801
- );
2802
- }
2803
- return data.action_attempt;
2888
+ body,
2889
+ responseKey: "action_attempt",
2890
+ options
2891
+ });
2804
2892
  }
2805
2893
  };
2806
2894
 
@@ -2881,21 +2969,21 @@ var SeamHttpNetworks = class _SeamHttpNetworks {
2881
2969
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2882
2970
  await clientSessions.get();
2883
2971
  }
2884
- async get(body) {
2885
- const { data } = await this.client.request({
2886
- url: "/networks/get",
2972
+ get(body) {
2973
+ return new SeamHttpRequest(this, {
2974
+ path: "/networks/get",
2887
2975
  method: "post",
2888
- data: body
2976
+ body,
2977
+ responseKey: "network"
2889
2978
  });
2890
- return data.network;
2891
2979
  }
2892
- async list(body) {
2893
- const { data } = await this.client.request({
2894
- url: "/networks/list",
2980
+ list(body) {
2981
+ return new SeamHttpRequest(this, {
2982
+ path: "/networks/list",
2895
2983
  method: "post",
2896
- data: body
2984
+ body,
2985
+ responseKey: "networks"
2897
2986
  });
2898
- return data.networks;
2899
2987
  }
2900
2988
  };
2901
2989
 
@@ -2979,42 +3067,44 @@ var SeamHttpNoiseSensorsNoiseThresholds = class _SeamHttpNoiseSensorsNoiseThresh
2979
3067
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
2980
3068
  await clientSessions.get();
2981
3069
  }
2982
- async create(body) {
2983
- const { data } = await this.client.request({
2984
- url: "/noise_sensors/noise_thresholds/create",
3070
+ create(body) {
3071
+ return new SeamHttpRequest(this, {
3072
+ path: "/noise_sensors/noise_thresholds/create",
2985
3073
  method: "post",
2986
- data: body
3074
+ body,
3075
+ responseKey: "noise_threshold"
2987
3076
  });
2988
- return data.noise_threshold;
2989
3077
  }
2990
- async delete(body) {
2991
- await this.client.request({
2992
- url: "/noise_sensors/noise_thresholds/delete",
3078
+ delete(body) {
3079
+ return new SeamHttpRequest(this, {
3080
+ path: "/noise_sensors/noise_thresholds/delete",
2993
3081
  method: "post",
2994
- data: body
3082
+ body,
3083
+ responseKey: void 0
2995
3084
  });
2996
3085
  }
2997
- async get(body) {
2998
- const { data } = await this.client.request({
2999
- url: "/noise_sensors/noise_thresholds/get",
3086
+ get(body) {
3087
+ return new SeamHttpRequest(this, {
3088
+ path: "/noise_sensors/noise_thresholds/get",
3000
3089
  method: "post",
3001
- data: body
3090
+ body,
3091
+ responseKey: "noise_threshold"
3002
3092
  });
3003
- return data.noise_threshold;
3004
3093
  }
3005
- async list(body) {
3006
- const { data } = await this.client.request({
3007
- url: "/noise_sensors/noise_thresholds/list",
3094
+ list(body) {
3095
+ return new SeamHttpRequest(this, {
3096
+ path: "/noise_sensors/noise_thresholds/list",
3008
3097
  method: "post",
3009
- data: body
3098
+ body,
3099
+ responseKey: "noise_thresholds"
3010
3100
  });
3011
- return data.noise_thresholds;
3012
3101
  }
3013
- async update(body) {
3014
- await this.client.request({
3015
- url: "/noise_sensors/noise_thresholds/update",
3102
+ update(body) {
3103
+ return new SeamHttpRequest(this, {
3104
+ path: "/noise_sensors/noise_thresholds/update",
3016
3105
  method: "post",
3017
- data: body
3106
+ body,
3107
+ responseKey: void 0
3018
3108
  });
3019
3109
  }
3020
3110
  };
@@ -3181,13 +3271,13 @@ var SeamHttpPhonesSimulate = class _SeamHttpPhonesSimulate {
3181
3271
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
3182
3272
  await clientSessions.get();
3183
3273
  }
3184
- async createSandboxPhone(body) {
3185
- const { data } = await this.client.request({
3186
- url: "/phones/simulate/create_sandbox_phone",
3274
+ createSandboxPhone(body) {
3275
+ return new SeamHttpRequest(this, {
3276
+ path: "/phones/simulate/create_sandbox_phone",
3187
3277
  method: "post",
3188
- data: body
3278
+ body,
3279
+ responseKey: "phone"
3189
3280
  });
3190
- return data.phone;
3191
3281
  }
3192
3282
  };
3193
3283
 
@@ -3271,20 +3361,21 @@ var SeamHttpPhones = class _SeamHttpPhones {
3271
3361
  get simulate() {
3272
3362
  return SeamHttpPhonesSimulate.fromClient(this.client, this.defaults);
3273
3363
  }
3274
- async deactivate(body) {
3275
- await this.client.request({
3276
- url: "/phones/deactivate",
3364
+ deactivate(body) {
3365
+ return new SeamHttpRequest(this, {
3366
+ path: "/phones/deactivate",
3277
3367
  method: "post",
3278
- data: body
3368
+ body,
3369
+ responseKey: void 0
3279
3370
  });
3280
3371
  }
3281
- async list(body) {
3282
- const { data } = await this.client.request({
3283
- url: "/phones/list",
3372
+ list(body) {
3373
+ return new SeamHttpRequest(this, {
3374
+ path: "/phones/list",
3284
3375
  method: "post",
3285
- data: body
3376
+ body,
3377
+ responseKey: "phones"
3286
3378
  });
3287
- return data.phones;
3288
3379
  }
3289
3380
  };
3290
3381
 
@@ -3368,51 +3459,45 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
3368
3459
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
3369
3460
  await clientSessions.get();
3370
3461
  }
3371
- async create(body) {
3372
- const { data } = await this.client.request(
3373
- {
3374
- url: "/thermostats/climate_setting_schedules/create",
3375
- method: "post",
3376
- data: body
3377
- }
3378
- );
3379
- return data.climate_setting_schedule;
3380
- }
3381
- async delete(body) {
3382
- await this.client.request(
3383
- {
3384
- url: "/thermostats/climate_setting_schedules/delete",
3385
- method: "post",
3386
- data: body
3387
- }
3388
- );
3462
+ create(body) {
3463
+ return new SeamHttpRequest(this, {
3464
+ path: "/thermostats/climate_setting_schedules/create",
3465
+ method: "post",
3466
+ body,
3467
+ responseKey: "climate_setting_schedule"
3468
+ });
3389
3469
  }
3390
- async get(body) {
3391
- const { data } = await this.client.request({
3392
- url: "/thermostats/climate_setting_schedules/get",
3470
+ delete(body) {
3471
+ return new SeamHttpRequest(this, {
3472
+ path: "/thermostats/climate_setting_schedules/delete",
3393
3473
  method: "post",
3394
- data: body
3474
+ body,
3475
+ responseKey: void 0
3395
3476
  });
3396
- return data.climate_setting_schedule;
3397
3477
  }
3398
- async list(body) {
3399
- const { data } = await this.client.request(
3400
- {
3401
- url: "/thermostats/climate_setting_schedules/list",
3402
- method: "post",
3403
- data: body
3404
- }
3405
- );
3406
- return data.climate_setting_schedules;
3407
- }
3408
- async update(body) {
3409
- await this.client.request(
3410
- {
3411
- url: "/thermostats/climate_setting_schedules/update",
3412
- method: "post",
3413
- data: body
3414
- }
3415
- );
3478
+ get(body) {
3479
+ return new SeamHttpRequest(this, {
3480
+ path: "/thermostats/climate_setting_schedules/get",
3481
+ method: "post",
3482
+ body,
3483
+ responseKey: "climate_setting_schedule"
3484
+ });
3485
+ }
3486
+ list(body) {
3487
+ return new SeamHttpRequest(this, {
3488
+ path: "/thermostats/climate_setting_schedules/list",
3489
+ method: "post",
3490
+ body,
3491
+ responseKey: "climate_setting_schedules"
3492
+ });
3493
+ }
3494
+ update(body) {
3495
+ return new SeamHttpRequest(this, {
3496
+ path: "/thermostats/climate_setting_schedules/update",
3497
+ method: "post",
3498
+ body,
3499
+ responseKey: void 0
3500
+ });
3416
3501
  }
3417
3502
  };
3418
3503
 
@@ -3499,122 +3584,73 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
3499
3584
  this.defaults
3500
3585
  );
3501
3586
  }
3502
- async cool(body, options = {}) {
3503
- const { data } = await this.client.request({
3504
- url: "/thermostats/cool",
3587
+ cool(body, options = {}) {
3588
+ return new SeamHttpRequest(this, {
3589
+ path: "/thermostats/cool",
3505
3590
  method: "post",
3506
- data: body
3507
- });
3508
- const waitForActionAttempt = options.waitForActionAttempt ?? this.defaults.waitForActionAttempt;
3509
- if (waitForActionAttempt !== false) {
3510
- return await resolveActionAttempt(
3511
- data.action_attempt,
3512
- SeamHttpActionAttempts.fromClient(this.client, {
3513
- ...this.defaults,
3514
- waitForActionAttempt: false
3515
- }),
3516
- typeof waitForActionAttempt === "boolean" ? {} : waitForActionAttempt
3517
- );
3518
- }
3519
- return data.action_attempt;
3591
+ body,
3592
+ responseKey: "action_attempt",
3593
+ options
3594
+ });
3520
3595
  }
3521
- async get(body) {
3522
- const { data } = await this.client.request({
3523
- url: "/thermostats/get",
3596
+ get(body) {
3597
+ return new SeamHttpRequest(this, {
3598
+ path: "/thermostats/get",
3524
3599
  method: "post",
3525
- data: body
3600
+ body,
3601
+ responseKey: "thermostat"
3526
3602
  });
3527
- return data.thermostat;
3528
3603
  }
3529
- async heat(body, options = {}) {
3530
- const { data } = await this.client.request({
3531
- url: "/thermostats/heat",
3604
+ heat(body, options = {}) {
3605
+ return new SeamHttpRequest(this, {
3606
+ path: "/thermostats/heat",
3532
3607
  method: "post",
3533
- data: body
3534
- });
3535
- const waitForActionAttempt = options.waitForActionAttempt ?? this.defaults.waitForActionAttempt;
3536
- if (waitForActionAttempt !== false) {
3537
- return await resolveActionAttempt(
3538
- data.action_attempt,
3539
- SeamHttpActionAttempts.fromClient(this.client, {
3540
- ...this.defaults,
3541
- waitForActionAttempt: false
3542
- }),
3543
- typeof waitForActionAttempt === "boolean" ? {} : waitForActionAttempt
3544
- );
3545
- }
3546
- return data.action_attempt;
3608
+ body,
3609
+ responseKey: "action_attempt",
3610
+ options
3611
+ });
3547
3612
  }
3548
- async heatCool(body, options = {}) {
3549
- const { data } = await this.client.request({
3550
- url: "/thermostats/heat_cool",
3613
+ heatCool(body, options = {}) {
3614
+ return new SeamHttpRequest(this, {
3615
+ path: "/thermostats/heat_cool",
3551
3616
  method: "post",
3552
- data: body
3553
- });
3554
- const waitForActionAttempt = options.waitForActionAttempt ?? this.defaults.waitForActionAttempt;
3555
- if (waitForActionAttempt !== false) {
3556
- return await resolveActionAttempt(
3557
- data.action_attempt,
3558
- SeamHttpActionAttempts.fromClient(this.client, {
3559
- ...this.defaults,
3560
- waitForActionAttempt: false
3561
- }),
3562
- typeof waitForActionAttempt === "boolean" ? {} : waitForActionAttempt
3563
- );
3564
- }
3565
- return data.action_attempt;
3617
+ body,
3618
+ responseKey: "action_attempt",
3619
+ options
3620
+ });
3566
3621
  }
3567
- async list(body) {
3568
- const { data } = await this.client.request({
3569
- url: "/thermostats/list",
3622
+ list(body) {
3623
+ return new SeamHttpRequest(this, {
3624
+ path: "/thermostats/list",
3570
3625
  method: "post",
3571
- data: body
3626
+ body,
3627
+ responseKey: "thermostats"
3572
3628
  });
3573
- return data.thermostats;
3574
3629
  }
3575
- async off(body, options = {}) {
3576
- const { data } = await this.client.request({
3577
- url: "/thermostats/off",
3630
+ off(body, options = {}) {
3631
+ return new SeamHttpRequest(this, {
3632
+ path: "/thermostats/off",
3578
3633
  method: "post",
3579
- data: body
3580
- });
3581
- const waitForActionAttempt = options.waitForActionAttempt ?? this.defaults.waitForActionAttempt;
3582
- if (waitForActionAttempt !== false) {
3583
- return await resolveActionAttempt(
3584
- data.action_attempt,
3585
- SeamHttpActionAttempts.fromClient(this.client, {
3586
- ...this.defaults,
3587
- waitForActionAttempt: false
3588
- }),
3589
- typeof waitForActionAttempt === "boolean" ? {} : waitForActionAttempt
3590
- );
3591
- }
3592
- return data.action_attempt;
3634
+ body,
3635
+ responseKey: "action_attempt",
3636
+ options
3637
+ });
3593
3638
  }
3594
- async setFanMode(body, options = {}) {
3595
- const { data } = await this.client.request({
3596
- url: "/thermostats/set_fan_mode",
3639
+ setFanMode(body, options = {}) {
3640
+ return new SeamHttpRequest(this, {
3641
+ path: "/thermostats/set_fan_mode",
3597
3642
  method: "post",
3598
- data: body
3599
- });
3600
- const waitForActionAttempt = options.waitForActionAttempt ?? this.defaults.waitForActionAttempt;
3601
- if (waitForActionAttempt !== false) {
3602
- return await resolveActionAttempt(
3603
- data.action_attempt,
3604
- SeamHttpActionAttempts.fromClient(this.client, {
3605
- ...this.defaults,
3606
- waitForActionAttempt: false
3607
- }),
3608
- typeof waitForActionAttempt === "boolean" ? {} : waitForActionAttempt
3609
- );
3610
- }
3611
- return data.action_attempt;
3643
+ body,
3644
+ responseKey: "action_attempt",
3645
+ options
3646
+ });
3612
3647
  }
3613
- async update(body) {
3614
- await this.client.request({
3615
- url: "/thermostats/update",
3648
+ update(body) {
3649
+ return new SeamHttpRequest(this, {
3650
+ path: "/thermostats/update",
3616
3651
  method: "post",
3617
- data: body
3652
+ body,
3653
+ responseKey: void 0
3618
3654
  });
3619
3655
  }
3620
3656
  };
@@ -3699,44 +3735,37 @@ var SeamHttpUserIdentitiesEnrollmentAutomations = class _SeamHttpUserIdentitiesE
3699
3735
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
3700
3736
  await clientSessions.get();
3701
3737
  }
3702
- async delete(body) {
3703
- await this.client.request(
3704
- {
3705
- url: "/user_identities/enrollment_automations/delete",
3706
- method: "post",
3707
- data: body
3708
- }
3709
- );
3738
+ delete(body) {
3739
+ return new SeamHttpRequest(this, {
3740
+ path: "/user_identities/enrollment_automations/delete",
3741
+ method: "post",
3742
+ body,
3743
+ responseKey: void 0
3744
+ });
3710
3745
  }
3711
- async get(body) {
3712
- const { data } = await this.client.request(
3713
- {
3714
- url: "/user_identities/enrollment_automations/get",
3715
- method: "post",
3716
- data: body
3717
- }
3718
- );
3719
- return data.enrollment_automation;
3720
- }
3721
- async launch(body) {
3722
- const { data } = await this.client.request(
3723
- {
3724
- url: "/user_identities/enrollment_automations/launch",
3725
- method: "post",
3726
- data: body
3727
- }
3728
- );
3729
- return data.enrollment_automation;
3730
- }
3731
- async list(body) {
3732
- const { data } = await this.client.request(
3733
- {
3734
- url: "/user_identities/enrollment_automations/list",
3735
- method: "post",
3736
- data: body
3737
- }
3738
- );
3739
- return data.enrollment_automations;
3746
+ get(body) {
3747
+ return new SeamHttpRequest(this, {
3748
+ path: "/user_identities/enrollment_automations/get",
3749
+ method: "post",
3750
+ body,
3751
+ responseKey: "enrollment_automation"
3752
+ });
3753
+ }
3754
+ launch(body) {
3755
+ return new SeamHttpRequest(this, {
3756
+ path: "/user_identities/enrollment_automations/launch",
3757
+ method: "post",
3758
+ body,
3759
+ responseKey: "enrollment_automation"
3760
+ });
3761
+ }
3762
+ list(body) {
3763
+ return new SeamHttpRequest(this, {
3764
+ path: "/user_identities/enrollment_automations/list",
3765
+ method: "post",
3766
+ body,
3767
+ responseKey: "enrollment_automations"
3768
+ });
3740
3769
  }
3741
3770
  };
3742
3771
 
@@ -3823,94 +3852,100 @@ var SeamHttpUserIdentities = class _SeamHttpUserIdentities {
3823
3852
  this.defaults
3824
3853
  );
3825
3854
  }
3826
- async addAcsUser(body) {
3827
- await this.client.request({
3828
- url: "/user_identities/add_acs_user",
3855
+ addAcsUser(body) {
3856
+ return new SeamHttpRequest(this, {
3857
+ path: "/user_identities/add_acs_user",
3829
3858
  method: "post",
3830
- data: body
3859
+ body,
3860
+ responseKey: void 0
3831
3861
  });
3832
3862
  }
3833
- async create(body) {
3834
- const { data } = await this.client.request({
3835
- url: "/user_identities/create",
3863
+ create(body) {
3864
+ return new SeamHttpRequest(this, {
3865
+ path: "/user_identities/create",
3836
3866
  method: "post",
3837
- data: body
3867
+ body,
3868
+ responseKey: "user_identity"
3838
3869
  });
3839
- return data.user_identity;
3840
3870
  }
3841
- async delete(body) {
3842
- await this.client.request({
3843
- url: "/user_identities/delete",
3871
+ delete(body) {
3872
+ return new SeamHttpRequest(this, {
3873
+ path: "/user_identities/delete",
3844
3874
  method: "post",
3845
- data: body
3875
+ body,
3876
+ responseKey: void 0
3846
3877
  });
3847
3878
  }
3848
- async get(body) {
3849
- const { data } = await this.client.request({
3850
- url: "/user_identities/get",
3879
+ get(body) {
3880
+ return new SeamHttpRequest(this, {
3881
+ path: "/user_identities/get",
3851
3882
  method: "post",
3852
- data: body
3883
+ body,
3884
+ responseKey: "user_identity"
3853
3885
  });
3854
- return data.user_identity;
3855
3886
  }
3856
- async grantAccessToDevice(body) {
3857
- await this.client.request({
3858
- url: "/user_identities/grant_access_to_device",
3887
+ grantAccessToDevice(body) {
3888
+ return new SeamHttpRequest(this, {
3889
+ path: "/user_identities/grant_access_to_device",
3859
3890
  method: "post",
3860
- data: body
3891
+ body,
3892
+ responseKey: void 0
3861
3893
  });
3862
3894
  }
3863
- async list(body) {
3864
- const { data } = await this.client.request({
3865
- url: "/user_identities/list",
3895
+ list(body) {
3896
+ return new SeamHttpRequest(this, {
3897
+ path: "/user_identities/list",
3866
3898
  method: "post",
3867
- data: body
3899
+ body,
3900
+ responseKey: "user_identities"
3868
3901
  });
3869
- return data.user_identities;
3870
3902
  }
3871
- async listAccessibleDevices(body) {
3872
- const { data } = await this.client.request({
3873
- url: "/user_identities/list_accessible_devices",
3903
+ listAccessibleDevices(body) {
3904
+ return new SeamHttpRequest(this, {
3905
+ path: "/user_identities/list_accessible_devices",
3874
3906
  method: "post",
3875
- data: body
3907
+ body,
3908
+ responseKey: "accessible_devices"
3876
3909
  });
3877
- return data.accessible_devices;
3878
3910
  }
3879
- async listAcsSystems(body) {
3880
- const { data } = await this.client.request({
3881
- url: "/user_identities/list_acs_systems",
3911
+ listAcsSystems(body) {
3912
+ return new SeamHttpRequest(this, {
3913
+ path: "/user_identities/list_acs_systems",
3882
3914
  method: "post",
3883
- data: body
3915
+ body,
3916
+ responseKey: "acs_systems"
3884
3917
  });
3885
- return data.acs_systems;
3886
3918
  }
3887
- async listAcsUsers(body) {
3888
- const { data } = await this.client.request({
3889
- url: "/user_identities/list_acs_users",
3919
+ listAcsUsers(body) {
3920
+ return new SeamHttpRequest(this, {
3921
+ path: "/user_identities/list_acs_users",
3890
3922
  method: "post",
3891
- data: body
3923
+ body,
3924
+ responseKey: "acs_users"
3892
3925
  });
3893
- return data.acs_users;
3894
3926
  }
3895
- async removeAcsUser(body) {
3896
- await this.client.request({
3897
- url: "/user_identities/remove_acs_user",
3927
+ removeAcsUser(body) {
3928
+ return new SeamHttpRequest(this, {
3929
+ path: "/user_identities/remove_acs_user",
3898
3930
  method: "post",
3899
- data: body
3931
+ body,
3932
+ responseKey: void 0
3900
3933
  });
3901
3934
  }
3902
- async revokeAccessToDevice(body) {
3903
- await this.client.request({
3904
- url: "/user_identities/revoke_access_to_device",
3935
+ revokeAccessToDevice(body) {
3936
+ return new SeamHttpRequest(this, {
3937
+ path: "/user_identities/revoke_access_to_device",
3905
3938
  method: "post",
3906
- data: body
3939
+ body,
3940
+ responseKey: void 0
3907
3941
  });
3908
3942
  }
3909
- async update(body) {
3910
- await this.client.request({
3911
- url: "/user_identities/update",
3943
+ update(body) {
3944
+ return new SeamHttpRequest(this, {
3945
+ path: "/user_identities/update",
3912
3946
  method: "post",
3913
- data: body
3947
+ body,
3948
+ responseKey: void 0
3914
3949
  });
3915
3950
  }
3916
3951
  };
@@ -3992,42 +4027,44 @@ var SeamHttpWebhooks = class _SeamHttpWebhooks {
3992
4027
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
3993
4028
  await clientSessions.get();
3994
4029
  }
3995
- async create(body) {
3996
- const { data } = await this.client.request({
3997
- url: "/webhooks/create",
4030
+ create(body) {
4031
+ return new SeamHttpRequest(this, {
4032
+ path: "/webhooks/create",
3998
4033
  method: "post",
3999
- data: body
4034
+ body,
4035
+ responseKey: "webhook"
4000
4036
  });
4001
- return data.webhook;
4002
4037
  }
4003
- async delete(body) {
4004
- await this.client.request({
4005
- url: "/webhooks/delete",
4038
+ delete(body) {
4039
+ return new SeamHttpRequest(this, {
4040
+ path: "/webhooks/delete",
4006
4041
  method: "post",
4007
- data: body
4042
+ body,
4043
+ responseKey: void 0
4008
4044
  });
4009
4045
  }
4010
- async get(body) {
4011
- const { data } = await this.client.request({
4012
- url: "/webhooks/get",
4046
+ get(body) {
4047
+ return new SeamHttpRequest(this, {
4048
+ path: "/webhooks/get",
4013
4049
  method: "post",
4014
- data: body
4050
+ body,
4051
+ responseKey: "webhook"
4015
4052
  });
4016
- return data.webhook;
4017
4053
  }
4018
- async list(body) {
4019
- const { data } = await this.client.request({
4020
- url: "/webhooks/list",
4054
+ list(body) {
4055
+ return new SeamHttpRequest(this, {
4056
+ path: "/webhooks/list",
4021
4057
  method: "post",
4022
- data: body
4058
+ body,
4059
+ responseKey: "webhooks"
4023
4060
  });
4024
- return data.webhooks;
4025
4061
  }
4026
- async update(body) {
4027
- await this.client.request({
4028
- url: "/webhooks/update",
4062
+ update(body) {
4063
+ return new SeamHttpRequest(this, {
4064
+ path: "/webhooks/update",
4029
4065
  method: "post",
4030
- data: body
4066
+ body,
4067
+ responseKey: void 0
4031
4068
  });
4032
4069
  }
4033
4070
  };
@@ -4109,35 +4146,36 @@ var SeamHttpWorkspaces = class _SeamHttpWorkspaces {
4109
4146
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
4110
4147
  await clientSessions.get();
4111
4148
  }
4112
- async create(body) {
4113
- const { data } = await this.client.request({
4114
- url: "/workspaces/create",
4149
+ create(body) {
4150
+ return new SeamHttpRequest(this, {
4151
+ path: "/workspaces/create",
4115
4152
  method: "post",
4116
- data: body
4153
+ body,
4154
+ responseKey: "workspace"
4117
4155
  });
4118
- return data.workspace;
4119
4156
  }
4120
- async get(body) {
4121
- const { data } = await this.client.request({
4122
- url: "/workspaces/get",
4157
+ get(body) {
4158
+ return new SeamHttpRequest(this, {
4159
+ path: "/workspaces/get",
4123
4160
  method: "post",
4124
- data: body
4161
+ body,
4162
+ responseKey: "workspace"
4125
4163
  });
4126
- return data.workspace;
4127
4164
  }
4128
- async list(body) {
4129
- const { data } = await this.client.request({
4130
- url: "/workspaces/list",
4165
+ list(body) {
4166
+ return new SeamHttpRequest(this, {
4167
+ path: "/workspaces/list",
4131
4168
  method: "post",
4132
- data: body
4169
+ body,
4170
+ responseKey: "workspaces"
4133
4171
  });
4134
- return data.workspaces;
4135
4172
  }
4136
- async resetSandbox(body) {
4137
- await this.client.request({
4138
- url: "/workspaces/reset_sandbox",
4173
+ resetSandbox(body) {
4174
+ return new SeamHttpRequest(this, {
4175
+ path: "/workspaces/reset_sandbox",
4139
4176
  method: "post",
4140
- data: body
4177
+ body,
4178
+ responseKey: void 0
4141
4179
  });
4142
4180
  }
4143
4181
  };
@@ -4347,6 +4385,7 @@ exports.SeamHttpNoiseSensors = SeamHttpNoiseSensors;
4347
4385
  exports.SeamHttpNoiseSensorsNoiseThresholds = SeamHttpNoiseSensorsNoiseThresholds;
4348
4386
  exports.SeamHttpPhones = SeamHttpPhones;
4349
4387
  exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
4388
+ exports.SeamHttpRequest = SeamHttpRequest;
4350
4389
  exports.SeamHttpThermostats = SeamHttpThermostats;
4351
4390
  exports.SeamHttpThermostatsClimateSettingSchedules = SeamHttpThermostatsClimateSettingSchedules;
4352
4391
  exports.SeamHttpUnauthorizedError = SeamHttpUnauthorizedError;