@seamapi/http 1.57.0 → 1.58.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 (30) hide show
  1. package/dist/connect.cjs +0 -328
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +3 -146
  4. package/dist/index.cjs +0 -330
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/routes/index.d.ts +0 -1
  8. package/lib/seam/connect/routes/index.js +0 -1
  9. package/lib/seam/connect/routes/index.js.map +1 -1
  10. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +2 -12
  11. package/lib/seam/connect/routes/seam-http-endpoints.js +0 -91
  12. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  13. package/lib/seam/connect/routes/seam-http.d.ts +0 -2
  14. package/lib/seam/connect/routes/seam-http.js +0 -4
  15. package/lib/seam/connect/routes/seam-http.js.map +1 -1
  16. package/lib/version.d.ts +1 -1
  17. package/lib/version.js +1 -1
  18. package/package.json +3 -3
  19. package/src/lib/seam/connect/routes/index.ts +0 -1
  20. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +0 -201
  21. package/src/lib/seam/connect/routes/seam-http.ts +0 -5
  22. package/src/lib/version.ts +1 -1
  23. package/lib/seam/connect/routes/unstable-locations/index.d.ts +0 -1
  24. package/lib/seam/connect/routes/unstable-locations/index.js +0 -6
  25. package/lib/seam/connect/routes/unstable-locations/index.js.map +0 -1
  26. package/lib/seam/connect/routes/unstable-locations/unstable-locations.d.ts +0 -138
  27. package/lib/seam/connect/routes/unstable-locations/unstable-locations.js +0 -198
  28. package/lib/seam/connect/routes/unstable-locations/unstable-locations.js.map +0 -1
  29. package/src/lib/seam/connect/routes/unstable-locations/index.ts +0 -6
  30. package/src/lib/seam/connect/routes/unstable-locations/unstable-locations.ts +0 -544
package/dist/index.cjs CHANGED
@@ -121,7 +121,6 @@ __export(index_exports, {
121
121
  SeamHttpThermostatsSchedules: () => SeamHttpThermostatsSchedules,
122
122
  SeamHttpThermostatsSimulate: () => SeamHttpThermostatsSimulate,
123
123
  SeamHttpUnauthorizedError: () => SeamHttpUnauthorizedError,
124
- SeamHttpUnstableLocations: () => SeamHttpUnstableLocations,
125
124
  SeamHttpUnstablePartner: () => SeamHttpUnstablePartner,
126
125
  SeamHttpUnstablePartnerBuildingBlocks: () => SeamHttpUnstablePartnerBuildingBlocks,
127
126
  SeamHttpUserIdentities: () => SeamHttpUserIdentities,
@@ -221,7 +220,6 @@ __export(connect_exports, {
221
220
  SeamHttpThermostatsSchedules: () => SeamHttpThermostatsSchedules,
222
221
  SeamHttpThermostatsSimulate: () => SeamHttpThermostatsSimulate,
223
222
  SeamHttpUnauthorizedError: () => SeamHttpUnauthorizedError,
224
- SeamHttpUnstableLocations: () => SeamHttpUnstableLocations,
225
223
  SeamHttpUnstablePartner: () => SeamHttpUnstablePartner,
226
224
  SeamHttpUnstablePartnerBuildingBlocks: () => SeamHttpUnstablePartnerBuildingBlocks,
227
225
  SeamHttpUserIdentities: () => SeamHttpUserIdentities,
@@ -7355,222 +7353,6 @@ var _SeamHttpThermostats = class _SeamHttpThermostats {
7355
7353
  _SeamHttpThermostats.ltsVersion = seamApiLtsVersion;
7356
7354
  var SeamHttpThermostats = _SeamHttpThermostats;
7357
7355
 
7358
- // src/lib/seam/connect/routes/unstable-locations/unstable-locations.ts
7359
- var _SeamHttpUnstableLocations = class _SeamHttpUnstableLocations {
7360
- constructor(apiKeyOrOptions = {}) {
7361
- this.ltsVersion = seamApiLtsVersion;
7362
- const options = parseOptions(apiKeyOrOptions);
7363
- if (!options.isUndocumentedApiEnabled) {
7364
- throw new Error(
7365
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7366
- );
7367
- }
7368
- this.client = "client" in options ? options.client : createClient(options);
7369
- this.defaults = limitToSeamHttpRequestOptions(options);
7370
- }
7371
- static fromClient(client, options = {}) {
7372
- const constructorOptions = { ...options, client };
7373
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
7374
- throw new SeamHttpInvalidOptionsError("Missing client");
7375
- }
7376
- return new _SeamHttpUnstableLocations(constructorOptions);
7377
- }
7378
- static fromApiKey(apiKey, options = {}) {
7379
- const constructorOptions = { ...options, apiKey };
7380
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
7381
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
7382
- }
7383
- return new _SeamHttpUnstableLocations(constructorOptions);
7384
- }
7385
- static fromClientSessionToken(clientSessionToken, options = {}) {
7386
- const constructorOptions = { ...options, clientSessionToken };
7387
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
7388
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
7389
- }
7390
- return new _SeamHttpUnstableLocations(constructorOptions);
7391
- }
7392
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
7393
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
7394
- const clientOptions = parseOptions({ ...options, publishableKey });
7395
- if (isSeamHttpOptionsWithClient(clientOptions)) {
7396
- throw new SeamHttpInvalidOptionsError(
7397
- "The client option cannot be used with SeamHttpUnstableLocations.fromPublishableKey"
7398
- );
7399
- }
7400
- const client = createClient(clientOptions);
7401
- const clientSessions = SeamHttpClientSessions.fromClient(client);
7402
- const { token } = await clientSessions.getOrCreate({
7403
- user_identifier_key: userIdentifierKey
7404
- });
7405
- return _SeamHttpUnstableLocations.fromClientSessionToken(token, options);
7406
- }
7407
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
7408
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
7409
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
7410
- throw new SeamHttpInvalidOptionsError(
7411
- "Missing consoleSessionToken or workspaceId"
7412
- );
7413
- }
7414
- return new _SeamHttpUnstableLocations(constructorOptions);
7415
- }
7416
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
7417
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
7418
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
7419
- throw new SeamHttpInvalidOptionsError(
7420
- "Missing personalAccessToken or workspaceId"
7421
- );
7422
- }
7423
- return new _SeamHttpUnstableLocations(constructorOptions);
7424
- }
7425
- createPaginator(request) {
7426
- return new SeamPaginator(this, request);
7427
- }
7428
- async updateClientSessionToken(clientSessionToken) {
7429
- const { headers } = this.client.defaults;
7430
- const authHeaders = getAuthHeadersForClientSessionToken({
7431
- clientSessionToken
7432
- });
7433
- for (const key of Object.keys(authHeaders)) {
7434
- if (headers[key] == null) {
7435
- throw new Error(
7436
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
7437
- );
7438
- }
7439
- }
7440
- this.client.defaults.headers = { ...headers, ...authHeaders };
7441
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7442
- await clientSessions.get();
7443
- }
7444
- addAcsEntrances(parameters, options = {}) {
7445
- if (!this.defaults.isUndocumentedApiEnabled) {
7446
- throw new Error(
7447
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7448
- );
7449
- }
7450
- return new SeamHttpRequest(this, {
7451
- pathname: "/unstable_locations/add_acs_entrances",
7452
- method: "PUT",
7453
- body: parameters,
7454
- responseKey: void 0,
7455
- options
7456
- });
7457
- }
7458
- addDevices(parameters, options = {}) {
7459
- if (!this.defaults.isUndocumentedApiEnabled) {
7460
- throw new Error(
7461
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7462
- );
7463
- }
7464
- return new SeamHttpRequest(this, {
7465
- pathname: "/unstable_locations/add_devices",
7466
- method: "PUT",
7467
- body: parameters,
7468
- responseKey: void 0,
7469
- options
7470
- });
7471
- }
7472
- create(parameters, options = {}) {
7473
- if (!this.defaults.isUndocumentedApiEnabled) {
7474
- throw new Error(
7475
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7476
- );
7477
- }
7478
- return new SeamHttpRequest(this, {
7479
- pathname: "/unstable_locations/create",
7480
- method: "POST",
7481
- body: parameters,
7482
- responseKey: "location",
7483
- options
7484
- });
7485
- }
7486
- delete(parameters, options = {}) {
7487
- if (!this.defaults.isUndocumentedApiEnabled) {
7488
- throw new Error(
7489
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7490
- );
7491
- }
7492
- return new SeamHttpRequest(this, {
7493
- pathname: "/unstable_locations/delete",
7494
- method: "POST",
7495
- body: parameters,
7496
- responseKey: void 0,
7497
- options
7498
- });
7499
- }
7500
- get(parameters, options = {}) {
7501
- if (!this.defaults.isUndocumentedApiEnabled) {
7502
- throw new Error(
7503
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7504
- );
7505
- }
7506
- return new SeamHttpRequest(this, {
7507
- pathname: "/unstable_locations/get",
7508
- method: "POST",
7509
- body: parameters,
7510
- responseKey: "location",
7511
- options
7512
- });
7513
- }
7514
- list(parameters, options = {}) {
7515
- if (!this.defaults.isUndocumentedApiEnabled) {
7516
- throw new Error(
7517
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7518
- );
7519
- }
7520
- return new SeamHttpRequest(this, {
7521
- pathname: "/unstable_locations/list",
7522
- method: "GET",
7523
- params: parameters,
7524
- responseKey: "locations",
7525
- options
7526
- });
7527
- }
7528
- removeAcsEntrances(parameters, options = {}) {
7529
- if (!this.defaults.isUndocumentedApiEnabled) {
7530
- throw new Error(
7531
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7532
- );
7533
- }
7534
- return new SeamHttpRequest(this, {
7535
- pathname: "/unstable_locations/remove_acs_entrances",
7536
- method: "POST",
7537
- body: parameters,
7538
- responseKey: void 0,
7539
- options
7540
- });
7541
- }
7542
- removeDevices(parameters, options = {}) {
7543
- if (!this.defaults.isUndocumentedApiEnabled) {
7544
- throw new Error(
7545
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7546
- );
7547
- }
7548
- return new SeamHttpRequest(this, {
7549
- pathname: "/unstable_locations/remove_devices",
7550
- method: "POST",
7551
- body: parameters,
7552
- responseKey: void 0,
7553
- options
7554
- });
7555
- }
7556
- update(parameters, options = {}) {
7557
- if (!this.defaults.isUndocumentedApiEnabled) {
7558
- throw new Error(
7559
- "Cannot use undocumented API without isUndocumentedApiEnabled"
7560
- );
7561
- }
7562
- return new SeamHttpRequest(this, {
7563
- pathname: "/unstable_locations/update",
7564
- method: "PATCH",
7565
- body: parameters,
7566
- responseKey: "location",
7567
- options
7568
- });
7569
- }
7570
- };
7571
- _SeamHttpUnstableLocations.ltsVersion = seamApiLtsVersion;
7572
- var SeamHttpUnstableLocations = _SeamHttpUnstableLocations;
7573
-
7574
7356
  // src/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.ts
7575
7357
  var _SeamHttpUnstablePartnerBuildingBlocks = class _SeamHttpUnstablePartnerBuildingBlocks {
7576
7358
  constructor(apiKeyOrOptions = {}) {
@@ -8582,9 +8364,6 @@ var _SeamHttp = class _SeamHttp {
8582
8364
  get thermostats() {
8583
8365
  return SeamHttpThermostats.fromClient(this.client, this.defaults);
8584
8366
  }
8585
- get unstableLocations() {
8586
- return SeamHttpUnstableLocations.fromClient(this.client, this.defaults);
8587
- }
8588
8367
  get unstablePartner() {
8589
8368
  return SeamHttpUnstablePartner.fromClient(this.client, this.defaults);
8590
8369
  }
@@ -10076,114 +9855,6 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10076
9855
  return seam.temperatureReached(...args);
10077
9856
  };
10078
9857
  }
10079
- get ["/unstable_locations/add_acs_entrances"]() {
10080
- const { client, defaults } = this;
10081
- if (!this.defaults.isUndocumentedApiEnabled) {
10082
- throw new Error(
10083
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10084
- );
10085
- }
10086
- return function unstableLocationsAddAcsEntrances(...args) {
10087
- const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
10088
- return seam.addAcsEntrances(...args);
10089
- };
10090
- }
10091
- get ["/unstable_locations/add_devices"]() {
10092
- const { client, defaults } = this;
10093
- if (!this.defaults.isUndocumentedApiEnabled) {
10094
- throw new Error(
10095
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10096
- );
10097
- }
10098
- return function unstableLocationsAddDevices(...args) {
10099
- const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
10100
- return seam.addDevices(...args);
10101
- };
10102
- }
10103
- get ["/unstable_locations/create"]() {
10104
- const { client, defaults } = this;
10105
- if (!this.defaults.isUndocumentedApiEnabled) {
10106
- throw new Error(
10107
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10108
- );
10109
- }
10110
- return function unstableLocationsCreate(...args) {
10111
- const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
10112
- return seam.create(...args);
10113
- };
10114
- }
10115
- get ["/unstable_locations/delete"]() {
10116
- const { client, defaults } = this;
10117
- if (!this.defaults.isUndocumentedApiEnabled) {
10118
- throw new Error(
10119
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10120
- );
10121
- }
10122
- return function unstableLocationsDelete(...args) {
10123
- const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
10124
- return seam.delete(...args);
10125
- };
10126
- }
10127
- get ["/unstable_locations/get"]() {
10128
- const { client, defaults } = this;
10129
- if (!this.defaults.isUndocumentedApiEnabled) {
10130
- throw new Error(
10131
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10132
- );
10133
- }
10134
- return function unstableLocationsGet(...args) {
10135
- const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
10136
- return seam.get(...args);
10137
- };
10138
- }
10139
- get ["/unstable_locations/list"]() {
10140
- const { client, defaults } = this;
10141
- if (!this.defaults.isUndocumentedApiEnabled) {
10142
- throw new Error(
10143
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10144
- );
10145
- }
10146
- return function unstableLocationsList(...args) {
10147
- const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
10148
- return seam.list(...args);
10149
- };
10150
- }
10151
- get ["/unstable_locations/remove_acs_entrances"]() {
10152
- const { client, defaults } = this;
10153
- if (!this.defaults.isUndocumentedApiEnabled) {
10154
- throw new Error(
10155
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10156
- );
10157
- }
10158
- return function unstableLocationsRemoveAcsEntrances(...args) {
10159
- const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
10160
- return seam.removeAcsEntrances(...args);
10161
- };
10162
- }
10163
- get ["/unstable_locations/remove_devices"]() {
10164
- const { client, defaults } = this;
10165
- if (!this.defaults.isUndocumentedApiEnabled) {
10166
- throw new Error(
10167
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10168
- );
10169
- }
10170
- return function unstableLocationsRemoveDevices(...args) {
10171
- const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
10172
- return seam.removeDevices(...args);
10173
- };
10174
- }
10175
- get ["/unstable_locations/update"]() {
10176
- const { client, defaults } = this;
10177
- if (!this.defaults.isUndocumentedApiEnabled) {
10178
- throw new Error(
10179
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10180
- );
10181
- }
10182
- return function unstableLocationsUpdate(...args) {
10183
- const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
10184
- return seam.update(...args);
10185
- };
10186
- }
10187
9858
  get ["/unstable_partner/building_blocks/connect_accounts"]() {
10188
9859
  const { client, defaults } = this;
10189
9860
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10651,7 +10322,6 @@ exports.SeamHttpThermostatsDailyPrograms = SeamHttpThermostatsDailyPrograms;
10651
10322
  exports.SeamHttpThermostatsSchedules = SeamHttpThermostatsSchedules;
10652
10323
  exports.SeamHttpThermostatsSimulate = SeamHttpThermostatsSimulate;
10653
10324
  exports.SeamHttpUnauthorizedError = SeamHttpUnauthorizedError;
10654
- exports.SeamHttpUnstableLocations = SeamHttpUnstableLocations;
10655
10325
  exports.SeamHttpUnstablePartner = SeamHttpUnstablePartner;
10656
10326
  exports.SeamHttpUnstablePartnerBuildingBlocks = SeamHttpUnstablePartnerBuildingBlocks;
10657
10327
  exports.SeamHttpUserIdentities = SeamHttpUserIdentities;