@seamapi/http 1.49.0 → 1.51.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 (58) hide show
  1. package/dist/connect.cjs +313 -117
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +106 -59
  4. package/dist/index.cjs +319 -119
  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 +16 -16
  8. package/lib/seam/connect/routes/index.d.ts +1 -1
  9. package/lib/seam/connect/routes/index.js +1 -1
  10. package/lib/seam/connect/routes/index.js.map +1 -1
  11. package/lib/seam/connect/routes/instant-keys/index.d.ts +1 -0
  12. package/lib/seam/connect/routes/instant-keys/index.js +6 -0
  13. package/lib/seam/connect/routes/instant-keys/index.js.map +1 -0
  14. package/lib/seam/connect/routes/{networks/networks.d.ts → instant-keys/instant-keys.d.ts} +15 -28
  15. package/lib/seam/connect/routes/{networks/networks.js → instant-keys/instant-keys.js} +12 -30
  16. package/lib/seam/connect/routes/instant-keys/instant-keys.js.map +1 -0
  17. package/lib/seam/connect/routes/seam/console/console.d.ts +21 -0
  18. package/lib/seam/connect/routes/seam/console/console.js +93 -0
  19. package/lib/seam/connect/routes/seam/console/console.js.map +1 -0
  20. package/lib/seam/connect/routes/seam/console/index.d.ts +2 -0
  21. package/lib/seam/connect/routes/seam/console/index.js +7 -0
  22. package/lib/seam/connect/routes/seam/console/index.js.map +1 -0
  23. package/lib/seam/connect/routes/seam/console/v1/index.d.ts +1 -0
  24. package/lib/seam/connect/routes/{networks → seam/console/v1}/index.js +1 -1
  25. package/lib/seam/connect/routes/seam/console/v1/index.js.map +1 -0
  26. package/lib/seam/connect/routes/seam/console/v1/v1.d.ts +34 -0
  27. package/lib/seam/connect/routes/seam/console/v1/v1.js +102 -0
  28. package/lib/seam/connect/routes/seam/console/v1/v1.js.map +1 -0
  29. package/lib/seam/connect/routes/seam/index.d.ts +1 -0
  30. package/lib/seam/connect/routes/seam/index.js +1 -0
  31. package/lib/seam/connect/routes/seam/index.js.map +1 -1
  32. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +7 -5
  33. package/lib/seam/connect/routes/seam-http-endpoints.js +29 -21
  34. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  35. package/lib/seam/connect/routes/seam-http.d.ts +2 -2
  36. package/lib/seam/connect/routes/seam-http.js +4 -4
  37. package/lib/seam/connect/routes/seam-http.js.map +1 -1
  38. package/lib/seam/connect/routes/workspaces/workspaces.d.ts +13 -0
  39. package/lib/seam/connect/routes/workspaces/workspaces.js +12 -0
  40. package/lib/seam/connect/routes/workspaces/workspaces.js.map +1 -1
  41. package/lib/version.d.ts +1 -1
  42. package/lib/version.js +1 -1
  43. package/package.json +3 -3
  44. package/src/lib/seam/connect/routes/index.ts +1 -1
  45. package/src/lib/seam/connect/routes/instant-keys/index.ts +6 -0
  46. package/src/lib/seam/connect/routes/instant-keys/instant-keys.ts +200 -0
  47. package/src/lib/seam/connect/routes/seam/console/console.ts +173 -0
  48. package/src/lib/seam/connect/routes/seam/console/index.ts +7 -0
  49. package/src/lib/seam/connect/routes/{networks → seam/console/v1}/index.ts +1 -1
  50. package/src/lib/seam/connect/routes/{networks/networks.ts → seam/console/v1/v1.ts} +35 -70
  51. package/src/lib/seam/connect/routes/seam/index.ts +1 -0
  52. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +67 -47
  53. package/src/lib/seam/connect/routes/seam-http.ts +5 -5
  54. package/src/lib/seam/connect/routes/workspaces/workspaces.ts +41 -0
  55. package/src/lib/version.ts +1 -1
  56. package/lib/seam/connect/routes/networks/index.d.ts +0 -1
  57. package/lib/seam/connect/routes/networks/index.js.map +0 -1
  58. package/lib/seam/connect/routes/networks/networks.js.map +0 -1
package/dist/connect.cjs CHANGED
@@ -4399,8 +4399,8 @@ var _SeamHttpEvents = class _SeamHttpEvents {
4399
4399
  _SeamHttpEvents.ltsVersion = seamApiLtsVersion;
4400
4400
  var SeamHttpEvents = _SeamHttpEvents;
4401
4401
 
4402
- // src/lib/seam/connect/routes/locks/simulate/simulate.ts
4403
- var _SeamHttpLocksSimulate = class _SeamHttpLocksSimulate {
4402
+ // src/lib/seam/connect/routes/instant-keys/instant-keys.ts
4403
+ var _SeamHttpInstantKeys = class _SeamHttpInstantKeys {
4404
4404
  constructor(apiKeyOrOptions = {}) {
4405
4405
  this.ltsVersion = seamApiLtsVersion;
4406
4406
  const options = parseOptions(apiKeyOrOptions);
@@ -4412,28 +4412,28 @@ var _SeamHttpLocksSimulate = class _SeamHttpLocksSimulate {
4412
4412
  if (!isSeamHttpOptionsWithClient(constructorOptions)) {
4413
4413
  throw new SeamHttpInvalidOptionsError("Missing client");
4414
4414
  }
4415
- return new _SeamHttpLocksSimulate(constructorOptions);
4415
+ return new _SeamHttpInstantKeys(constructorOptions);
4416
4416
  }
4417
4417
  static fromApiKey(apiKey, options = {}) {
4418
4418
  const constructorOptions = { ...options, apiKey };
4419
4419
  if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
4420
4420
  throw new SeamHttpInvalidOptionsError("Missing apiKey");
4421
4421
  }
4422
- return new _SeamHttpLocksSimulate(constructorOptions);
4422
+ return new _SeamHttpInstantKeys(constructorOptions);
4423
4423
  }
4424
4424
  static fromClientSessionToken(clientSessionToken, options = {}) {
4425
4425
  const constructorOptions = { ...options, clientSessionToken };
4426
4426
  if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
4427
4427
  throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
4428
4428
  }
4429
- return new _SeamHttpLocksSimulate(constructorOptions);
4429
+ return new _SeamHttpInstantKeys(constructorOptions);
4430
4430
  }
4431
4431
  static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
4432
4432
  warnOnInsecureuserIdentifierKey(userIdentifierKey);
4433
4433
  const clientOptions = parseOptions({ ...options, publishableKey });
4434
4434
  if (isSeamHttpOptionsWithClient(clientOptions)) {
4435
4435
  throw new SeamHttpInvalidOptionsError(
4436
- "The client option cannot be used with SeamHttpLocksSimulate.fromPublishableKey"
4436
+ "The client option cannot be used with SeamHttpInstantKeys.fromPublishableKey"
4437
4437
  );
4438
4438
  }
4439
4439
  const client = createClient(clientOptions);
@@ -4441,7 +4441,7 @@ var _SeamHttpLocksSimulate = class _SeamHttpLocksSimulate {
4441
4441
  const { token } = await clientSessions.getOrCreate({
4442
4442
  user_identifier_key: userIdentifierKey
4443
4443
  });
4444
- return _SeamHttpLocksSimulate.fromClientSessionToken(token, options);
4444
+ return _SeamHttpInstantKeys.fromClientSessionToken(token, options);
4445
4445
  }
4446
4446
  static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
4447
4447
  const constructorOptions = { ...options, consoleSessionToken, workspaceId };
@@ -4450,7 +4450,7 @@ var _SeamHttpLocksSimulate = class _SeamHttpLocksSimulate {
4450
4450
  "Missing consoleSessionToken or workspaceId"
4451
4451
  );
4452
4452
  }
4453
- return new _SeamHttpLocksSimulate(constructorOptions);
4453
+ return new _SeamHttpInstantKeys(constructorOptions);
4454
4454
  }
4455
4455
  static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
4456
4456
  const constructorOptions = { ...options, personalAccessToken, workspaceId };
@@ -4459,7 +4459,7 @@ var _SeamHttpLocksSimulate = class _SeamHttpLocksSimulate {
4459
4459
  "Missing personalAccessToken or workspaceId"
4460
4460
  );
4461
4461
  }
4462
- return new _SeamHttpLocksSimulate(constructorOptions);
4462
+ return new _SeamHttpInstantKeys(constructorOptions);
4463
4463
  }
4464
4464
  createPaginator(request) {
4465
4465
  return new SeamPaginator(this, request);
@@ -4480,30 +4480,21 @@ var _SeamHttpLocksSimulate = class _SeamHttpLocksSimulate {
4480
4480
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
4481
4481
  await clientSessions.get();
4482
4482
  }
4483
- keypadCodeEntry(parameters, options = {}) {
4484
- return new SeamHttpRequest(this, {
4485
- pathname: "/locks/simulate/keypad_code_entry",
4486
- method: "POST",
4487
- body: parameters,
4488
- responseKey: "action_attempt",
4489
- options
4490
- });
4491
- }
4492
- manualLockViaKeypad(parameters, options = {}) {
4483
+ list(parameters, options = {}) {
4493
4484
  return new SeamHttpRequest(this, {
4494
- pathname: "/locks/simulate/manual_lock_via_keypad",
4485
+ pathname: "/instant_keys/list",
4495
4486
  method: "POST",
4496
4487
  body: parameters,
4497
- responseKey: "action_attempt",
4488
+ responseKey: "instant_keys",
4498
4489
  options
4499
4490
  });
4500
4491
  }
4501
4492
  };
4502
- _SeamHttpLocksSimulate.ltsVersion = seamApiLtsVersion;
4503
- var SeamHttpLocksSimulate = _SeamHttpLocksSimulate;
4493
+ _SeamHttpInstantKeys.ltsVersion = seamApiLtsVersion;
4494
+ var SeamHttpInstantKeys = _SeamHttpInstantKeys;
4504
4495
 
4505
- // src/lib/seam/connect/routes/locks/locks.ts
4506
- var _SeamHttpLocks = class _SeamHttpLocks {
4496
+ // src/lib/seam/connect/routes/locks/simulate/simulate.ts
4497
+ var _SeamHttpLocksSimulate = class _SeamHttpLocksSimulate {
4507
4498
  constructor(apiKeyOrOptions = {}) {
4508
4499
  this.ltsVersion = seamApiLtsVersion;
4509
4500
  const options = parseOptions(apiKeyOrOptions);
@@ -4515,28 +4506,28 @@ var _SeamHttpLocks = class _SeamHttpLocks {
4515
4506
  if (!isSeamHttpOptionsWithClient(constructorOptions)) {
4516
4507
  throw new SeamHttpInvalidOptionsError("Missing client");
4517
4508
  }
4518
- return new _SeamHttpLocks(constructorOptions);
4509
+ return new _SeamHttpLocksSimulate(constructorOptions);
4519
4510
  }
4520
4511
  static fromApiKey(apiKey, options = {}) {
4521
4512
  const constructorOptions = { ...options, apiKey };
4522
4513
  if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
4523
4514
  throw new SeamHttpInvalidOptionsError("Missing apiKey");
4524
4515
  }
4525
- return new _SeamHttpLocks(constructorOptions);
4516
+ return new _SeamHttpLocksSimulate(constructorOptions);
4526
4517
  }
4527
4518
  static fromClientSessionToken(clientSessionToken, options = {}) {
4528
4519
  const constructorOptions = { ...options, clientSessionToken };
4529
4520
  if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
4530
4521
  throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
4531
4522
  }
4532
- return new _SeamHttpLocks(constructorOptions);
4523
+ return new _SeamHttpLocksSimulate(constructorOptions);
4533
4524
  }
4534
4525
  static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
4535
4526
  warnOnInsecureuserIdentifierKey(userIdentifierKey);
4536
4527
  const clientOptions = parseOptions({ ...options, publishableKey });
4537
4528
  if (isSeamHttpOptionsWithClient(clientOptions)) {
4538
4529
  throw new SeamHttpInvalidOptionsError(
4539
- "The client option cannot be used with SeamHttpLocks.fromPublishableKey"
4530
+ "The client option cannot be used with SeamHttpLocksSimulate.fromPublishableKey"
4540
4531
  );
4541
4532
  }
4542
4533
  const client = createClient(clientOptions);
@@ -4544,7 +4535,7 @@ var _SeamHttpLocks = class _SeamHttpLocks {
4544
4535
  const { token } = await clientSessions.getOrCreate({
4545
4536
  user_identifier_key: userIdentifierKey
4546
4537
  });
4547
- return _SeamHttpLocks.fromClientSessionToken(token, options);
4538
+ return _SeamHttpLocksSimulate.fromClientSessionToken(token, options);
4548
4539
  }
4549
4540
  static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
4550
4541
  const constructorOptions = { ...options, consoleSessionToken, workspaceId };
@@ -4553,7 +4544,7 @@ var _SeamHttpLocks = class _SeamHttpLocks {
4553
4544
  "Missing consoleSessionToken or workspaceId"
4554
4545
  );
4555
4546
  }
4556
- return new _SeamHttpLocks(constructorOptions);
4547
+ return new _SeamHttpLocksSimulate(constructorOptions);
4557
4548
  }
4558
4549
  static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
4559
4550
  const constructorOptions = { ...options, personalAccessToken, workspaceId };
@@ -4562,7 +4553,7 @@ var _SeamHttpLocks = class _SeamHttpLocks {
4562
4553
  "Missing personalAccessToken or workspaceId"
4563
4554
  );
4564
4555
  }
4565
- return new _SeamHttpLocks(constructorOptions);
4556
+ return new _SeamHttpLocksSimulate(constructorOptions);
4566
4557
  }
4567
4558
  createPaginator(request) {
4568
4559
  return new SeamPaginator(this, request);
@@ -4583,39 +4574,18 @@ var _SeamHttpLocks = class _SeamHttpLocks {
4583
4574
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
4584
4575
  await clientSessions.get();
4585
4576
  }
4586
- get simulate() {
4587
- return SeamHttpLocksSimulate.fromClient(this.client, this.defaults);
4588
- }
4589
- get(parameters, options = {}) {
4590
- return new SeamHttpRequest(this, {
4591
- pathname: "/locks/get",
4592
- method: "POST",
4593
- body: parameters,
4594
- responseKey: "device",
4595
- options
4596
- });
4597
- }
4598
- list(parameters, options = {}) {
4599
- return new SeamHttpRequest(this, {
4600
- pathname: "/locks/list",
4601
- method: "POST",
4602
- body: parameters,
4603
- responseKey: "devices",
4604
- options
4605
- });
4606
- }
4607
- lockDoor(parameters, options = {}) {
4577
+ keypadCodeEntry(parameters, options = {}) {
4608
4578
  return new SeamHttpRequest(this, {
4609
- pathname: "/locks/lock_door",
4579
+ pathname: "/locks/simulate/keypad_code_entry",
4610
4580
  method: "POST",
4611
4581
  body: parameters,
4612
4582
  responseKey: "action_attempt",
4613
4583
  options
4614
4584
  });
4615
4585
  }
4616
- unlockDoor(parameters, options = {}) {
4586
+ manualLockViaKeypad(parameters, options = {}) {
4617
4587
  return new SeamHttpRequest(this, {
4618
- pathname: "/locks/unlock_door",
4588
+ pathname: "/locks/simulate/manual_lock_via_keypad",
4619
4589
  method: "POST",
4620
4590
  body: parameters,
4621
4591
  responseKey: "action_attempt",
@@ -4623,19 +4593,14 @@ var _SeamHttpLocks = class _SeamHttpLocks {
4623
4593
  });
4624
4594
  }
4625
4595
  };
4626
- _SeamHttpLocks.ltsVersion = seamApiLtsVersion;
4627
- var SeamHttpLocks = _SeamHttpLocks;
4596
+ _SeamHttpLocksSimulate.ltsVersion = seamApiLtsVersion;
4597
+ var SeamHttpLocksSimulate = _SeamHttpLocksSimulate;
4628
4598
 
4629
- // src/lib/seam/connect/routes/networks/networks.ts
4630
- var _SeamHttpNetworks = class _SeamHttpNetworks {
4599
+ // src/lib/seam/connect/routes/locks/locks.ts
4600
+ var _SeamHttpLocks = class _SeamHttpLocks {
4631
4601
  constructor(apiKeyOrOptions = {}) {
4632
4602
  this.ltsVersion = seamApiLtsVersion;
4633
4603
  const options = parseOptions(apiKeyOrOptions);
4634
- if (!options.isUndocumentedApiEnabled) {
4635
- throw new Error(
4636
- "Cannot use undocumented API without isUndocumentedApiEnabled"
4637
- );
4638
- }
4639
4604
  this.client = "client" in options ? options.client : createClient(options);
4640
4605
  this.defaults = limitToSeamHttpRequestOptions(options);
4641
4606
  }
@@ -4644,28 +4609,28 @@ var _SeamHttpNetworks = class _SeamHttpNetworks {
4644
4609
  if (!isSeamHttpOptionsWithClient(constructorOptions)) {
4645
4610
  throw new SeamHttpInvalidOptionsError("Missing client");
4646
4611
  }
4647
- return new _SeamHttpNetworks(constructorOptions);
4612
+ return new _SeamHttpLocks(constructorOptions);
4648
4613
  }
4649
4614
  static fromApiKey(apiKey, options = {}) {
4650
4615
  const constructorOptions = { ...options, apiKey };
4651
4616
  if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
4652
4617
  throw new SeamHttpInvalidOptionsError("Missing apiKey");
4653
4618
  }
4654
- return new _SeamHttpNetworks(constructorOptions);
4619
+ return new _SeamHttpLocks(constructorOptions);
4655
4620
  }
4656
4621
  static fromClientSessionToken(clientSessionToken, options = {}) {
4657
4622
  const constructorOptions = { ...options, clientSessionToken };
4658
4623
  if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
4659
4624
  throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
4660
4625
  }
4661
- return new _SeamHttpNetworks(constructorOptions);
4626
+ return new _SeamHttpLocks(constructorOptions);
4662
4627
  }
4663
4628
  static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
4664
4629
  warnOnInsecureuserIdentifierKey(userIdentifierKey);
4665
4630
  const clientOptions = parseOptions({ ...options, publishableKey });
4666
4631
  if (isSeamHttpOptionsWithClient(clientOptions)) {
4667
4632
  throw new SeamHttpInvalidOptionsError(
4668
- "The client option cannot be used with SeamHttpNetworks.fromPublishableKey"
4633
+ "The client option cannot be used with SeamHttpLocks.fromPublishableKey"
4669
4634
  );
4670
4635
  }
4671
4636
  const client = createClient(clientOptions);
@@ -4673,7 +4638,7 @@ var _SeamHttpNetworks = class _SeamHttpNetworks {
4673
4638
  const { token } = await clientSessions.getOrCreate({
4674
4639
  user_identifier_key: userIdentifierKey
4675
4640
  });
4676
- return _SeamHttpNetworks.fromClientSessionToken(token, options);
4641
+ return _SeamHttpLocks.fromClientSessionToken(token, options);
4677
4642
  }
4678
4643
  static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
4679
4644
  const constructorOptions = { ...options, consoleSessionToken, workspaceId };
@@ -4682,7 +4647,7 @@ var _SeamHttpNetworks = class _SeamHttpNetworks {
4682
4647
  "Missing consoleSessionToken or workspaceId"
4683
4648
  );
4684
4649
  }
4685
- return new _SeamHttpNetworks(constructorOptions);
4650
+ return new _SeamHttpLocks(constructorOptions);
4686
4651
  }
4687
4652
  static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
4688
4653
  const constructorOptions = { ...options, personalAccessToken, workspaceId };
@@ -4691,7 +4656,7 @@ var _SeamHttpNetworks = class _SeamHttpNetworks {
4691
4656
  "Missing personalAccessToken or workspaceId"
4692
4657
  );
4693
4658
  }
4694
- return new _SeamHttpNetworks(constructorOptions);
4659
+ return new _SeamHttpLocks(constructorOptions);
4695
4660
  }
4696
4661
  createPaginator(request) {
4697
4662
  return new SeamPaginator(this, request);
@@ -4712,37 +4677,48 @@ var _SeamHttpNetworks = class _SeamHttpNetworks {
4712
4677
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
4713
4678
  await clientSessions.get();
4714
4679
  }
4680
+ get simulate() {
4681
+ return SeamHttpLocksSimulate.fromClient(this.client, this.defaults);
4682
+ }
4715
4683
  get(parameters, options = {}) {
4716
- if (!this.defaults.isUndocumentedApiEnabled) {
4717
- throw new Error(
4718
- "Cannot use undocumented API without isUndocumentedApiEnabled"
4719
- );
4720
- }
4721
4684
  return new SeamHttpRequest(this, {
4722
- pathname: "/networks/get",
4685
+ pathname: "/locks/get",
4723
4686
  method: "POST",
4724
4687
  body: parameters,
4725
- responseKey: "network",
4688
+ responseKey: "device",
4726
4689
  options
4727
4690
  });
4728
4691
  }
4729
4692
  list(parameters, options = {}) {
4730
- if (!this.defaults.isUndocumentedApiEnabled) {
4731
- throw new Error(
4732
- "Cannot use undocumented API without isUndocumentedApiEnabled"
4733
- );
4734
- }
4735
4693
  return new SeamHttpRequest(this, {
4736
- pathname: "/networks/list",
4694
+ pathname: "/locks/list",
4695
+ method: "POST",
4696
+ body: parameters,
4697
+ responseKey: "devices",
4698
+ options
4699
+ });
4700
+ }
4701
+ lockDoor(parameters, options = {}) {
4702
+ return new SeamHttpRequest(this, {
4703
+ pathname: "/locks/lock_door",
4704
+ method: "POST",
4705
+ body: parameters,
4706
+ responseKey: "action_attempt",
4707
+ options
4708
+ });
4709
+ }
4710
+ unlockDoor(parameters, options = {}) {
4711
+ return new SeamHttpRequest(this, {
4712
+ pathname: "/locks/unlock_door",
4737
4713
  method: "POST",
4738
4714
  body: parameters,
4739
- responseKey: "networks",
4715
+ responseKey: "action_attempt",
4740
4716
  options
4741
4717
  });
4742
4718
  }
4743
4719
  };
4744
- _SeamHttpNetworks.ltsVersion = seamApiLtsVersion;
4745
- var SeamHttpNetworks = _SeamHttpNetworks;
4720
+ _SeamHttpLocks.ltsVersion = seamApiLtsVersion;
4721
+ var SeamHttpLocks = _SeamHttpLocks;
4746
4722
 
4747
4723
  // src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts
4748
4724
  var _SeamHttpNoiseSensorsNoiseThresholds = class _SeamHttpNoiseSensorsNoiseThresholds {
@@ -5283,6 +5259,203 @@ var _SeamHttpPhones = class _SeamHttpPhones {
5283
5259
  _SeamHttpPhones.ltsVersion = seamApiLtsVersion;
5284
5260
  var SeamHttpPhones = _SeamHttpPhones;
5285
5261
 
5262
+ // src/lib/seam/connect/routes/seam/console/v1/v1.ts
5263
+ var _SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
5264
+ constructor(apiKeyOrOptions = {}) {
5265
+ this.ltsVersion = seamApiLtsVersion;
5266
+ const options = parseOptions(apiKeyOrOptions);
5267
+ if (!options.isUndocumentedApiEnabled) {
5268
+ throw new Error(
5269
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
5270
+ );
5271
+ }
5272
+ this.client = "client" in options ? options.client : createClient(options);
5273
+ this.defaults = limitToSeamHttpRequestOptions(options);
5274
+ }
5275
+ static fromClient(client, options = {}) {
5276
+ const constructorOptions = { ...options, client };
5277
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5278
+ throw new SeamHttpInvalidOptionsError("Missing client");
5279
+ }
5280
+ return new _SeamHttpSeamConsoleV1(constructorOptions);
5281
+ }
5282
+ static fromApiKey(apiKey, options = {}) {
5283
+ const constructorOptions = { ...options, apiKey };
5284
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5285
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
5286
+ }
5287
+ return new _SeamHttpSeamConsoleV1(constructorOptions);
5288
+ }
5289
+ static fromClientSessionToken(clientSessionToken, options = {}) {
5290
+ const constructorOptions = { ...options, clientSessionToken };
5291
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5292
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5293
+ }
5294
+ return new _SeamHttpSeamConsoleV1(constructorOptions);
5295
+ }
5296
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5297
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
5298
+ const clientOptions = parseOptions({ ...options, publishableKey });
5299
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
5300
+ throw new SeamHttpInvalidOptionsError(
5301
+ "The client option cannot be used with SeamHttpSeamConsoleV1.fromPublishableKey"
5302
+ );
5303
+ }
5304
+ const client = createClient(clientOptions);
5305
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
5306
+ const { token } = await clientSessions.getOrCreate({
5307
+ user_identifier_key: userIdentifierKey
5308
+ });
5309
+ return _SeamHttpSeamConsoleV1.fromClientSessionToken(token, options);
5310
+ }
5311
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5312
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5313
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5314
+ throw new SeamHttpInvalidOptionsError(
5315
+ "Missing consoleSessionToken or workspaceId"
5316
+ );
5317
+ }
5318
+ return new _SeamHttpSeamConsoleV1(constructorOptions);
5319
+ }
5320
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5321
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
5322
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5323
+ throw new SeamHttpInvalidOptionsError(
5324
+ "Missing personalAccessToken or workspaceId"
5325
+ );
5326
+ }
5327
+ return new _SeamHttpSeamConsoleV1(constructorOptions);
5328
+ }
5329
+ createPaginator(request) {
5330
+ return new SeamPaginator(this, request);
5331
+ }
5332
+ async updateClientSessionToken(clientSessionToken) {
5333
+ const { headers } = this.client.defaults;
5334
+ const authHeaders = getAuthHeadersForClientSessionToken({
5335
+ clientSessionToken
5336
+ });
5337
+ for (const key of Object.keys(authHeaders)) {
5338
+ if (headers[key] == null) {
5339
+ throw new Error(
5340
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5341
+ );
5342
+ }
5343
+ }
5344
+ this.client.defaults.headers = { ...headers, ...authHeaders };
5345
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5346
+ await clientSessions.get();
5347
+ }
5348
+ getResourceLocator(parameters, options = {}) {
5349
+ if (!this.defaults.isUndocumentedApiEnabled) {
5350
+ throw new Error(
5351
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
5352
+ );
5353
+ }
5354
+ return new SeamHttpRequest(this, {
5355
+ pathname: "/seam/console/v1/get_resource_locator",
5356
+ method: "GET",
5357
+ params: parameters,
5358
+ responseKey: "resource_locator",
5359
+ options
5360
+ });
5361
+ }
5362
+ };
5363
+ _SeamHttpSeamConsoleV1.ltsVersion = seamApiLtsVersion;
5364
+ var SeamHttpSeamConsoleV1 = _SeamHttpSeamConsoleV1;
5365
+
5366
+ // src/lib/seam/connect/routes/seam/console/console.ts
5367
+ var _SeamHttpSeamConsole = class _SeamHttpSeamConsole {
5368
+ constructor(apiKeyOrOptions = {}) {
5369
+ this.ltsVersion = seamApiLtsVersion;
5370
+ const options = parseOptions(apiKeyOrOptions);
5371
+ if (!options.isUndocumentedApiEnabled) {
5372
+ throw new Error(
5373
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
5374
+ );
5375
+ }
5376
+ this.client = "client" in options ? options.client : createClient(options);
5377
+ this.defaults = limitToSeamHttpRequestOptions(options);
5378
+ }
5379
+ static fromClient(client, options = {}) {
5380
+ const constructorOptions = { ...options, client };
5381
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5382
+ throw new SeamHttpInvalidOptionsError("Missing client");
5383
+ }
5384
+ return new _SeamHttpSeamConsole(constructorOptions);
5385
+ }
5386
+ static fromApiKey(apiKey, options = {}) {
5387
+ const constructorOptions = { ...options, apiKey };
5388
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5389
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
5390
+ }
5391
+ return new _SeamHttpSeamConsole(constructorOptions);
5392
+ }
5393
+ static fromClientSessionToken(clientSessionToken, options = {}) {
5394
+ const constructorOptions = { ...options, clientSessionToken };
5395
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5396
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5397
+ }
5398
+ return new _SeamHttpSeamConsole(constructorOptions);
5399
+ }
5400
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5401
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
5402
+ const clientOptions = parseOptions({ ...options, publishableKey });
5403
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
5404
+ throw new SeamHttpInvalidOptionsError(
5405
+ "The client option cannot be used with SeamHttpSeamConsole.fromPublishableKey"
5406
+ );
5407
+ }
5408
+ const client = createClient(clientOptions);
5409
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
5410
+ const { token } = await clientSessions.getOrCreate({
5411
+ user_identifier_key: userIdentifierKey
5412
+ });
5413
+ return _SeamHttpSeamConsole.fromClientSessionToken(token, options);
5414
+ }
5415
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5416
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5417
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5418
+ throw new SeamHttpInvalidOptionsError(
5419
+ "Missing consoleSessionToken or workspaceId"
5420
+ );
5421
+ }
5422
+ return new _SeamHttpSeamConsole(constructorOptions);
5423
+ }
5424
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5425
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
5426
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5427
+ throw new SeamHttpInvalidOptionsError(
5428
+ "Missing personalAccessToken or workspaceId"
5429
+ );
5430
+ }
5431
+ return new _SeamHttpSeamConsole(constructorOptions);
5432
+ }
5433
+ createPaginator(request) {
5434
+ return new SeamPaginator(this, request);
5435
+ }
5436
+ async updateClientSessionToken(clientSessionToken) {
5437
+ const { headers } = this.client.defaults;
5438
+ const authHeaders = getAuthHeadersForClientSessionToken({
5439
+ clientSessionToken
5440
+ });
5441
+ for (const key of Object.keys(authHeaders)) {
5442
+ if (headers[key] == null) {
5443
+ throw new Error(
5444
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5445
+ );
5446
+ }
5447
+ }
5448
+ this.client.defaults.headers = { ...headers, ...authHeaders };
5449
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5450
+ await clientSessions.get();
5451
+ }
5452
+ get v1() {
5453
+ return SeamHttpSeamConsoleV1.fromClient(this.client, this.defaults);
5454
+ }
5455
+ };
5456
+ _SeamHttpSeamConsole.ltsVersion = seamApiLtsVersion;
5457
+ var SeamHttpSeamConsole = _SeamHttpSeamConsole;
5458
+
5286
5459
  // src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts
5287
5460
  var _SeamHttpSeamCustomerV1AutomationRuns = class _SeamHttpSeamCustomerV1AutomationRuns {
5288
5461
  constructor(apiKeyOrOptions = {}) {
@@ -8098,6 +8271,20 @@ var _SeamHttpWorkspaces = class _SeamHttpWorkspaces {
8098
8271
  options
8099
8272
  });
8100
8273
  }
8274
+ findResources(parameters, options = {}) {
8275
+ if (!this.defaults.isUndocumentedApiEnabled) {
8276
+ throw new Error(
8277
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8278
+ );
8279
+ }
8280
+ return new SeamHttpRequest(this, {
8281
+ pathname: "/workspaces/find_resources",
8282
+ method: "GET",
8283
+ params: parameters,
8284
+ responseKey: "batch",
8285
+ options
8286
+ });
8287
+ }
8101
8288
  get(parameters, options = {}) {
8102
8289
  return new SeamHttpRequest(this, {
8103
8290
  pathname: "/workspaces/get",
@@ -8255,12 +8442,12 @@ var _SeamHttp = class _SeamHttp {
8255
8442
  get events() {
8256
8443
  return SeamHttpEvents.fromClient(this.client, this.defaults);
8257
8444
  }
8445
+ get instantKeys() {
8446
+ return SeamHttpInstantKeys.fromClient(this.client, this.defaults);
8447
+ }
8258
8448
  get locks() {
8259
8449
  return SeamHttpLocks.fromClient(this.client, this.defaults);
8260
8450
  }
8261
- get networks() {
8262
- return SeamHttpNetworks.fromClient(this.client, this.defaults);
8263
- }
8264
8451
  get noiseSensors() {
8265
8452
  return SeamHttpNoiseSensors.fromClient(this.client, this.defaults);
8266
8453
  }
@@ -9233,6 +9420,13 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9233
9420
  return seam.list(...args);
9234
9421
  };
9235
9422
  }
9423
+ get ["/instant_keys/list"]() {
9424
+ const { client, defaults } = this;
9425
+ return function instantKeysList(...args) {
9426
+ const seam = SeamHttpInstantKeys.fromClient(client, defaults);
9427
+ return seam.list(...args);
9428
+ };
9429
+ }
9236
9430
  get ["/locks/get"]() {
9237
9431
  const { client, defaults } = this;
9238
9432
  return function locksGet(...args) {
@@ -9275,30 +9469,6 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9275
9469
  return seam.manualLockViaKeypad(...args);
9276
9470
  };
9277
9471
  }
9278
- get ["/networks/get"]() {
9279
- const { client, defaults } = this;
9280
- if (!this.defaults.isUndocumentedApiEnabled) {
9281
- throw new Error(
9282
- "Cannot use undocumented API without isUndocumentedApiEnabled"
9283
- );
9284
- }
9285
- return function networksGet(...args) {
9286
- const seam = SeamHttpNetworks.fromClient(client, defaults);
9287
- return seam.get(...args);
9288
- };
9289
- }
9290
- get ["/networks/list"]() {
9291
- const { client, defaults } = this;
9292
- if (!this.defaults.isUndocumentedApiEnabled) {
9293
- throw new Error(
9294
- "Cannot use undocumented API without isUndocumentedApiEnabled"
9295
- );
9296
- }
9297
- return function networksList(...args) {
9298
- const seam = SeamHttpNetworks.fromClient(client, defaults);
9299
- return seam.list(...args);
9300
- };
9301
- }
9302
9472
  get ["/noise_sensors/list"]() {
9303
9473
  const { client, defaults } = this;
9304
9474
  return function noiseSensorsList(...args) {
@@ -9391,6 +9561,18 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9391
9561
  return seam.createSandboxPhone(...args);
9392
9562
  };
9393
9563
  }
9564
+ get ["/seam/console/v1/get_resource_locator"]() {
9565
+ const { client, defaults } = this;
9566
+ if (!this.defaults.isUndocumentedApiEnabled) {
9567
+ throw new Error(
9568
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
9569
+ );
9570
+ }
9571
+ return function seamConsoleV1GetResourceLocator(...args) {
9572
+ const seam = SeamHttpSeamConsoleV1.fromClient(client, defaults);
9573
+ return seam.getResourceLocator(...args);
9574
+ };
9575
+ }
9394
9576
  get ["/seam/customer/v1/automation_runs/list"]() {
9395
9577
  const { client, defaults } = this;
9396
9578
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10165,6 +10347,18 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10165
10347
  return seam.create(...args);
10166
10348
  };
10167
10349
  }
10350
+ get ["/workspaces/find_resources"]() {
10351
+ const { client, defaults } = this;
10352
+ if (!this.defaults.isUndocumentedApiEnabled) {
10353
+ throw new Error(
10354
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10355
+ );
10356
+ }
10357
+ return function workspacesFindResources(...args) {
10358
+ const seam = SeamHttpWorkspaces.fromClient(client, defaults);
10359
+ return seam.findResources(...args);
10360
+ };
10361
+ }
10168
10362
  get ["/workspaces/get"]() {
10169
10363
  const { client, defaults } = this;
10170
10364
  return function workspacesGet(...args) {
@@ -10332,19 +10526,21 @@ exports.SeamHttpDevicesUnmanaged = SeamHttpDevicesUnmanaged;
10332
10526
  exports.SeamHttpEndpoints = SeamHttpEndpoints;
10333
10527
  exports.SeamHttpEndpointsWithoutWorkspace = SeamHttpEndpointsWithoutWorkspace;
10334
10528
  exports.SeamHttpEvents = SeamHttpEvents;
10529
+ exports.SeamHttpInstantKeys = SeamHttpInstantKeys;
10335
10530
  exports.SeamHttpInvalidInputError = SeamHttpInvalidInputError;
10336
10531
  exports.SeamHttpInvalidOptionsError = SeamHttpInvalidOptionsError;
10337
10532
  exports.SeamHttpInvalidTokenError = SeamHttpInvalidTokenError;
10338
10533
  exports.SeamHttpLocks = SeamHttpLocks;
10339
10534
  exports.SeamHttpLocksSimulate = SeamHttpLocksSimulate;
10340
10535
  exports.SeamHttpMultiWorkspace = SeamHttpMultiWorkspace;
10341
- exports.SeamHttpNetworks = SeamHttpNetworks;
10342
10536
  exports.SeamHttpNoiseSensors = SeamHttpNoiseSensors;
10343
10537
  exports.SeamHttpNoiseSensorsNoiseThresholds = SeamHttpNoiseSensorsNoiseThresholds;
10344
10538
  exports.SeamHttpNoiseSensorsSimulate = SeamHttpNoiseSensorsSimulate;
10345
10539
  exports.SeamHttpPhones = SeamHttpPhones;
10346
10540
  exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
10347
10541
  exports.SeamHttpRequest = SeamHttpRequest;
10542
+ exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
10543
+ exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
10348
10544
  exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
10349
10545
  exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
10350
10546
  exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;