@seamapi/http 1.52.0 → 1.54.0

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 (28) hide show
  1. package/dist/connect.cjs +106 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +307 -293
  4. package/dist/index.cjs +106 -0
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/resolve-action-attempt.d.ts +388 -388
  8. package/lib/seam/connect/routes/instant-keys/instant-keys.d.ts +13 -0
  9. package/lib/seam/connect/routes/instant-keys/instant-keys.js +9 -0
  10. package/lib/seam/connect/routes/instant-keys/instant-keys.js.map +1 -1
  11. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +3 -2
  12. package/lib/seam/connect/routes/seam-http-endpoints.js +31 -0
  13. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  14. package/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.js +12 -0
  15. package/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
  16. package/lib/seam/connect/routes/thermostats/thermostats.js +3 -0
  17. package/lib/seam/connect/routes/thermostats/thermostats.js.map +1 -1
  18. package/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.js +15 -0
  19. package/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.js.map +1 -1
  20. package/lib/version.d.ts +1 -1
  21. package/lib/version.js +1 -1
  22. package/package.json +3 -3
  23. package/src/lib/seam/connect/routes/instant-keys/instant-keys.ts +33 -0
  24. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +57 -0
  25. package/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts +20 -0
  26. package/src/lib/seam/connect/routes/thermostats/thermostats.ts +5 -0
  27. package/src/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.ts +25 -0
  28. package/src/lib/version.ts +1 -1
package/dist/index.cjs CHANGED
@@ -4718,6 +4718,15 @@ var _SeamHttpInstantKeys = class _SeamHttpInstantKeys {
4718
4718
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
4719
4719
  await clientSessions.get();
4720
4720
  }
4721
+ delete(parameters, options = {}) {
4722
+ return new SeamHttpRequest(this, {
4723
+ pathname: "/instant_keys/delete",
4724
+ method: "POST",
4725
+ body: parameters,
4726
+ responseKey: void 0,
4727
+ options
4728
+ });
4729
+ }
4721
4730
  get(parameters, options = {}) {
4722
4731
  return new SeamHttpRequest(this, {
4723
4732
  pathname: "/instant_keys/get",
@@ -6647,6 +6656,11 @@ var _SeamHttpThermostatsDailyPrograms = class _SeamHttpThermostatsDailyPrograms
6647
6656
  constructor(apiKeyOrOptions = {}) {
6648
6657
  this.ltsVersion = seamApiLtsVersion;
6649
6658
  const options = parseOptions(apiKeyOrOptions);
6659
+ if (!options.isUndocumentedApiEnabled) {
6660
+ throw new Error(
6661
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6662
+ );
6663
+ }
6650
6664
  this.client = "client" in options ? options.client : createClient(options);
6651
6665
  this.defaults = limitToSeamHttpRequestOptions(options);
6652
6666
  }
@@ -6727,6 +6741,11 @@ var _SeamHttpThermostatsDailyPrograms = class _SeamHttpThermostatsDailyPrograms
6727
6741
  await clientSessions.get();
6728
6742
  }
6729
6743
  create(parameters, options = {}) {
6744
+ if (!this.defaults.isUndocumentedApiEnabled) {
6745
+ throw new Error(
6746
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6747
+ );
6748
+ }
6730
6749
  return new SeamHttpRequest(this, {
6731
6750
  pathname: "/thermostats/daily_programs/create",
6732
6751
  method: "POST",
@@ -6736,6 +6755,11 @@ var _SeamHttpThermostatsDailyPrograms = class _SeamHttpThermostatsDailyPrograms
6736
6755
  });
6737
6756
  }
6738
6757
  delete(parameters, options = {}) {
6758
+ if (!this.defaults.isUndocumentedApiEnabled) {
6759
+ throw new Error(
6760
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6761
+ );
6762
+ }
6739
6763
  return new SeamHttpRequest(this, {
6740
6764
  pathname: "/thermostats/daily_programs/delete",
6741
6765
  method: "POST",
@@ -6745,6 +6769,11 @@ var _SeamHttpThermostatsDailyPrograms = class _SeamHttpThermostatsDailyPrograms
6745
6769
  });
6746
6770
  }
6747
6771
  update(parameters, options = {}) {
6772
+ if (!this.defaults.isUndocumentedApiEnabled) {
6773
+ throw new Error(
6774
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
6775
+ );
6776
+ }
6748
6777
  return new SeamHttpRequest(this, {
6749
6778
  pathname: "/thermostats/daily_programs/update",
6750
6779
  method: "PATCH",
@@ -7215,6 +7244,11 @@ var _SeamHttpThermostats = class _SeamHttpThermostats {
7215
7244
  });
7216
7245
  }
7217
7246
  updateWeeklyProgram(parameters, options = {}) {
7247
+ if (!this.defaults.isUndocumentedApiEnabled) {
7248
+ throw new Error(
7249
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7250
+ );
7251
+ }
7218
7252
  return new SeamHttpRequest(this, {
7219
7253
  pathname: "/thermostats/update_weekly_program",
7220
7254
  method: "POST",
@@ -7971,6 +8005,11 @@ var _SeamHttpUserIdentitiesEnrollmentAutomations = class _SeamHttpUserIdentities
7971
8005
  constructor(apiKeyOrOptions = {}) {
7972
8006
  this.ltsVersion = seamApiLtsVersion;
7973
8007
  const options = parseOptions(apiKeyOrOptions);
8008
+ if (!options.isUndocumentedApiEnabled) {
8009
+ throw new Error(
8010
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8011
+ );
8012
+ }
7974
8013
  this.client = "client" in options ? options.client : createClient(options);
7975
8014
  this.defaults = limitToSeamHttpRequestOptions(options);
7976
8015
  }
@@ -8051,6 +8090,11 @@ var _SeamHttpUserIdentitiesEnrollmentAutomations = class _SeamHttpUserIdentities
8051
8090
  await clientSessions.get();
8052
8091
  }
8053
8092
  delete(parameters, options = {}) {
8093
+ if (!this.defaults.isUndocumentedApiEnabled) {
8094
+ throw new Error(
8095
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8096
+ );
8097
+ }
8054
8098
  return new SeamHttpRequest(this, {
8055
8099
  pathname: "/user_identities/enrollment_automations/delete",
8056
8100
  method: "POST",
@@ -8060,6 +8104,11 @@ var _SeamHttpUserIdentitiesEnrollmentAutomations = class _SeamHttpUserIdentities
8060
8104
  });
8061
8105
  }
8062
8106
  get(parameters, options = {}) {
8107
+ if (!this.defaults.isUndocumentedApiEnabled) {
8108
+ throw new Error(
8109
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8110
+ );
8111
+ }
8063
8112
  return new SeamHttpRequest(this, {
8064
8113
  pathname: "/user_identities/enrollment_automations/get",
8065
8114
  method: "POST",
@@ -8069,6 +8118,11 @@ var _SeamHttpUserIdentitiesEnrollmentAutomations = class _SeamHttpUserIdentities
8069
8118
  });
8070
8119
  }
8071
8120
  launch(parameters, options = {}) {
8121
+ if (!this.defaults.isUndocumentedApiEnabled) {
8122
+ throw new Error(
8123
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8124
+ );
8125
+ }
8072
8126
  return new SeamHttpRequest(this, {
8073
8127
  pathname: "/user_identities/enrollment_automations/launch",
8074
8128
  method: "POST",
@@ -8078,6 +8132,11 @@ var _SeamHttpUserIdentitiesEnrollmentAutomations = class _SeamHttpUserIdentities
8078
8132
  });
8079
8133
  }
8080
8134
  list(parameters, options = {}) {
8135
+ if (!this.defaults.isUndocumentedApiEnabled) {
8136
+ throw new Error(
8137
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8138
+ );
8139
+ }
8081
8140
  return new SeamHttpRequest(this, {
8082
8141
  pathname: "/user_identities/enrollment_automations/list",
8083
8142
  method: "POST",
@@ -9667,6 +9726,13 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9667
9726
  return seam.list(...args);
9668
9727
  };
9669
9728
  }
9729
+ get ["/instant_keys/delete"]() {
9730
+ const { client, defaults } = this;
9731
+ return function instantKeysDelete(...args) {
9732
+ const seam = SeamHttpInstantKeys.fromClient(client, defaults);
9733
+ return seam.delete(...args);
9734
+ };
9735
+ }
9670
9736
  get ["/instant_keys/get"]() {
9671
9737
  const { client, defaults } = this;
9672
9738
  return function instantKeysGet(...args) {
@@ -10101,6 +10167,11 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10101
10167
  }
10102
10168
  get ["/thermostats/update_weekly_program"]() {
10103
10169
  const { client, defaults } = this;
10170
+ if (!this.defaults.isUndocumentedApiEnabled) {
10171
+ throw new Error(
10172
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10173
+ );
10174
+ }
10104
10175
  return function thermostatsUpdateWeeklyProgram(...args) {
10105
10176
  const seam = SeamHttpThermostats.fromClient(client, defaults);
10106
10177
  return seam.updateWeeklyProgram(...args);
@@ -10108,6 +10179,11 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10108
10179
  }
10109
10180
  get ["/thermostats/daily_programs/create"]() {
10110
10181
  const { client, defaults } = this;
10182
+ if (!this.defaults.isUndocumentedApiEnabled) {
10183
+ throw new Error(
10184
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10185
+ );
10186
+ }
10111
10187
  return function thermostatsDailyProgramsCreate(...args) {
10112
10188
  const seam = SeamHttpThermostatsDailyPrograms.fromClient(client, defaults);
10113
10189
  return seam.create(...args);
@@ -10115,6 +10191,11 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10115
10191
  }
10116
10192
  get ["/thermostats/daily_programs/delete"]() {
10117
10193
  const { client, defaults } = this;
10194
+ if (!this.defaults.isUndocumentedApiEnabled) {
10195
+ throw new Error(
10196
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10197
+ );
10198
+ }
10118
10199
  return function thermostatsDailyProgramsDelete(...args) {
10119
10200
  const seam = SeamHttpThermostatsDailyPrograms.fromClient(client, defaults);
10120
10201
  return seam.delete(...args);
@@ -10122,6 +10203,11 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10122
10203
  }
10123
10204
  get ["/thermostats/daily_programs/update"]() {
10124
10205
  const { client, defaults } = this;
10206
+ if (!this.defaults.isUndocumentedApiEnabled) {
10207
+ throw new Error(
10208
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10209
+ );
10210
+ }
10125
10211
  return function thermostatsDailyProgramsUpdate(...args) {
10126
10212
  const seam = SeamHttpThermostatsDailyPrograms.fromClient(client, defaults);
10127
10213
  return seam.update(...args);
@@ -10521,6 +10607,11 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10521
10607
  }
10522
10608
  get ["/user_identities/enrollment_automations/delete"]() {
10523
10609
  const { client, defaults } = this;
10610
+ if (!this.defaults.isUndocumentedApiEnabled) {
10611
+ throw new Error(
10612
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10613
+ );
10614
+ }
10524
10615
  return function userIdentitiesEnrollmentAutomationsDelete(...args) {
10525
10616
  const seam = SeamHttpUserIdentitiesEnrollmentAutomations.fromClient(
10526
10617
  client,
@@ -10531,6 +10622,11 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10531
10622
  }
10532
10623
  get ["/user_identities/enrollment_automations/get"]() {
10533
10624
  const { client, defaults } = this;
10625
+ if (!this.defaults.isUndocumentedApiEnabled) {
10626
+ throw new Error(
10627
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10628
+ );
10629
+ }
10534
10630
  return function userIdentitiesEnrollmentAutomationsGet(...args) {
10535
10631
  const seam = SeamHttpUserIdentitiesEnrollmentAutomations.fromClient(
10536
10632
  client,
@@ -10541,6 +10637,11 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10541
10637
  }
10542
10638
  get ["/user_identities/enrollment_automations/launch"]() {
10543
10639
  const { client, defaults } = this;
10640
+ if (!this.defaults.isUndocumentedApiEnabled) {
10641
+ throw new Error(
10642
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10643
+ );
10644
+ }
10544
10645
  return function userIdentitiesEnrollmentAutomationsLaunch(...args) {
10545
10646
  const seam = SeamHttpUserIdentitiesEnrollmentAutomations.fromClient(
10546
10647
  client,
@@ -10551,6 +10652,11 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10551
10652
  }
10552
10653
  get ["/user_identities/enrollment_automations/list"]() {
10553
10654
  const { client, defaults } = this;
10655
+ if (!this.defaults.isUndocumentedApiEnabled) {
10656
+ throw new Error(
10657
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10658
+ );
10659
+ }
10554
10660
  return function userIdentitiesEnrollmentAutomationsList(...args) {
10555
10661
  const seam = SeamHttpUserIdentitiesEnrollmentAutomations.fromClient(
10556
10662
  client,