@seamapi/http 1.48.0 → 1.50.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.
- package/dist/connect.cjs +253 -146
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +92 -62
- package/dist/index.cjs +257 -148
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/resolve-action-attempt.d.ts +20 -20
- package/lib/seam/connect/routes/access-methods/access-methods.d.ts +13 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js +9 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
- package/lib/seam/connect/routes/index.d.ts +0 -1
- package/lib/seam/connect/routes/index.js +0 -1
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/seam/console/console.d.ts +21 -0
- package/lib/seam/connect/routes/seam/console/console.js +93 -0
- package/lib/seam/connect/routes/seam/console/console.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/index.d.ts +2 -0
- package/lib/seam/connect/routes/seam/console/index.js +7 -0
- package/lib/seam/connect/routes/seam/console/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/v1/index.d.ts +1 -0
- package/lib/seam/connect/routes/{networks → seam/console/v1}/index.js +1 -1
- package/lib/seam/connect/routes/seam/console/v1/index.js.map +1 -0
- package/lib/seam/connect/routes/{networks/networks.d.ts → seam/console/v1/v1.d.ts} +21 -34
- package/lib/seam/connect/routes/{networks/networks.js → seam/console/v1/v1.js} +23 -35
- package/lib/seam/connect/routes/seam/console/v1/v1.js.map +1 -0
- package/lib/seam/connect/routes/seam/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/index.js +1 -0
- package/lib/seam/connect/routes/seam/index.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +7 -6
- package/lib/seam/connect/routes/seam-http-endpoints.js +28 -21
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
- package/lib/seam/connect/routes/seam-http.d.ts +0 -2
- package/lib/seam/connect/routes/seam-http.js +0 -4
- package/lib/seam/connect/routes/seam-http.js.map +1 -1
- package/lib/seam/connect/routes/workspaces/workspaces.d.ts +13 -0
- package/lib/seam/connect/routes/workspaces/workspaces.js +12 -0
- package/lib/seam/connect/routes/workspaces/workspaces.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/lib/seam/connect/routes/access-methods/access-methods.ts +36 -0
- package/src/lib/seam/connect/routes/index.ts +0 -1
- package/src/lib/seam/connect/routes/seam/console/console.ts +173 -0
- package/src/lib/seam/connect/routes/seam/console/index.ts +7 -0
- package/src/lib/seam/connect/routes/{networks → seam/console/v1}/index.ts +1 -1
- package/src/lib/seam/connect/routes/{networks/networks.ts → seam/console/v1/v1.ts} +35 -70
- package/src/lib/seam/connect/routes/seam/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +64 -47
- package/src/lib/seam/connect/routes/seam-http.ts +0 -5
- package/src/lib/seam/connect/routes/workspaces/workspaces.ts +41 -0
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/routes/networks/index.d.ts +0 -1
- package/lib/seam/connect/routes/networks/index.js.map +0 -1
- package/lib/seam/connect/routes/networks/networks.js.map +0 -1
package/dist/connect.cjs
CHANGED
|
@@ -1646,6 +1646,15 @@ var _SeamHttpAccessMethods = class _SeamHttpAccessMethods {
|
|
|
1646
1646
|
options
|
|
1647
1647
|
});
|
|
1648
1648
|
}
|
|
1649
|
+
getRelated(parameters, options = {}) {
|
|
1650
|
+
return new SeamHttpRequest(this, {
|
|
1651
|
+
pathname: "/access_methods/get_related",
|
|
1652
|
+
method: "POST",
|
|
1653
|
+
body: parameters,
|
|
1654
|
+
responseKey: "batch",
|
|
1655
|
+
options
|
|
1656
|
+
});
|
|
1657
|
+
}
|
|
1649
1658
|
list(parameters, options = {}) {
|
|
1650
1659
|
return new SeamHttpRequest(this, {
|
|
1651
1660
|
pathname: "/access_methods/list",
|
|
@@ -4617,124 +4626,6 @@ var _SeamHttpLocks = class _SeamHttpLocks {
|
|
|
4617
4626
|
_SeamHttpLocks.ltsVersion = seamApiLtsVersion;
|
|
4618
4627
|
var SeamHttpLocks = _SeamHttpLocks;
|
|
4619
4628
|
|
|
4620
|
-
// src/lib/seam/connect/routes/networks/networks.ts
|
|
4621
|
-
var _SeamHttpNetworks = class _SeamHttpNetworks {
|
|
4622
|
-
constructor(apiKeyOrOptions = {}) {
|
|
4623
|
-
this.ltsVersion = seamApiLtsVersion;
|
|
4624
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
4625
|
-
if (!options.isUndocumentedApiEnabled) {
|
|
4626
|
-
throw new Error(
|
|
4627
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
4628
|
-
);
|
|
4629
|
-
}
|
|
4630
|
-
this.client = "client" in options ? options.client : createClient(options);
|
|
4631
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
4632
|
-
}
|
|
4633
|
-
static fromClient(client, options = {}) {
|
|
4634
|
-
const constructorOptions = { ...options, client };
|
|
4635
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
4636
|
-
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
4637
|
-
}
|
|
4638
|
-
return new _SeamHttpNetworks(constructorOptions);
|
|
4639
|
-
}
|
|
4640
|
-
static fromApiKey(apiKey, options = {}) {
|
|
4641
|
-
const constructorOptions = { ...options, apiKey };
|
|
4642
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
4643
|
-
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
4644
|
-
}
|
|
4645
|
-
return new _SeamHttpNetworks(constructorOptions);
|
|
4646
|
-
}
|
|
4647
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
4648
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
4649
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
4650
|
-
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
4651
|
-
}
|
|
4652
|
-
return new _SeamHttpNetworks(constructorOptions);
|
|
4653
|
-
}
|
|
4654
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
4655
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
4656
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
4657
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
4658
|
-
throw new SeamHttpInvalidOptionsError(
|
|
4659
|
-
"The client option cannot be used with SeamHttpNetworks.fromPublishableKey"
|
|
4660
|
-
);
|
|
4661
|
-
}
|
|
4662
|
-
const client = createClient(clientOptions);
|
|
4663
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
4664
|
-
const { token } = await clientSessions.getOrCreate({
|
|
4665
|
-
user_identifier_key: userIdentifierKey
|
|
4666
|
-
});
|
|
4667
|
-
return _SeamHttpNetworks.fromClientSessionToken(token, options);
|
|
4668
|
-
}
|
|
4669
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
4670
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
4671
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
4672
|
-
throw new SeamHttpInvalidOptionsError(
|
|
4673
|
-
"Missing consoleSessionToken or workspaceId"
|
|
4674
|
-
);
|
|
4675
|
-
}
|
|
4676
|
-
return new _SeamHttpNetworks(constructorOptions);
|
|
4677
|
-
}
|
|
4678
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
4679
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
4680
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
4681
|
-
throw new SeamHttpInvalidOptionsError(
|
|
4682
|
-
"Missing personalAccessToken or workspaceId"
|
|
4683
|
-
);
|
|
4684
|
-
}
|
|
4685
|
-
return new _SeamHttpNetworks(constructorOptions);
|
|
4686
|
-
}
|
|
4687
|
-
createPaginator(request) {
|
|
4688
|
-
return new SeamPaginator(this, request);
|
|
4689
|
-
}
|
|
4690
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
4691
|
-
const { headers } = this.client.defaults;
|
|
4692
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
4693
|
-
clientSessionToken
|
|
4694
|
-
});
|
|
4695
|
-
for (const key of Object.keys(authHeaders)) {
|
|
4696
|
-
if (headers[key] == null) {
|
|
4697
|
-
throw new Error(
|
|
4698
|
-
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
4699
|
-
);
|
|
4700
|
-
}
|
|
4701
|
-
}
|
|
4702
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
4703
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
4704
|
-
await clientSessions.get();
|
|
4705
|
-
}
|
|
4706
|
-
get(parameters, options = {}) {
|
|
4707
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
4708
|
-
throw new Error(
|
|
4709
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
4710
|
-
);
|
|
4711
|
-
}
|
|
4712
|
-
return new SeamHttpRequest(this, {
|
|
4713
|
-
pathname: "/networks/get",
|
|
4714
|
-
method: "POST",
|
|
4715
|
-
body: parameters,
|
|
4716
|
-
responseKey: "network",
|
|
4717
|
-
options
|
|
4718
|
-
});
|
|
4719
|
-
}
|
|
4720
|
-
list(parameters, options = {}) {
|
|
4721
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
4722
|
-
throw new Error(
|
|
4723
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
4724
|
-
);
|
|
4725
|
-
}
|
|
4726
|
-
return new SeamHttpRequest(this, {
|
|
4727
|
-
pathname: "/networks/list",
|
|
4728
|
-
method: "POST",
|
|
4729
|
-
body: parameters,
|
|
4730
|
-
responseKey: "networks",
|
|
4731
|
-
options
|
|
4732
|
-
});
|
|
4733
|
-
}
|
|
4734
|
-
};
|
|
4735
|
-
_SeamHttpNetworks.ltsVersion = seamApiLtsVersion;
|
|
4736
|
-
var SeamHttpNetworks = _SeamHttpNetworks;
|
|
4737
|
-
|
|
4738
4629
|
// src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts
|
|
4739
4630
|
var _SeamHttpNoiseSensorsNoiseThresholds = class _SeamHttpNoiseSensorsNoiseThresholds {
|
|
4740
4631
|
constructor(apiKeyOrOptions = {}) {
|
|
@@ -5274,6 +5165,203 @@ var _SeamHttpPhones = class _SeamHttpPhones {
|
|
|
5274
5165
|
_SeamHttpPhones.ltsVersion = seamApiLtsVersion;
|
|
5275
5166
|
var SeamHttpPhones = _SeamHttpPhones;
|
|
5276
5167
|
|
|
5168
|
+
// src/lib/seam/connect/routes/seam/console/v1/v1.ts
|
|
5169
|
+
var _SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
|
|
5170
|
+
constructor(apiKeyOrOptions = {}) {
|
|
5171
|
+
this.ltsVersion = seamApiLtsVersion;
|
|
5172
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
5173
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
5174
|
+
throw new Error(
|
|
5175
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5176
|
+
);
|
|
5177
|
+
}
|
|
5178
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
5179
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
5180
|
+
}
|
|
5181
|
+
static fromClient(client, options = {}) {
|
|
5182
|
+
const constructorOptions = { ...options, client };
|
|
5183
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5184
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5185
|
+
}
|
|
5186
|
+
return new _SeamHttpSeamConsoleV1(constructorOptions);
|
|
5187
|
+
}
|
|
5188
|
+
static fromApiKey(apiKey, options = {}) {
|
|
5189
|
+
const constructorOptions = { ...options, apiKey };
|
|
5190
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5191
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5192
|
+
}
|
|
5193
|
+
return new _SeamHttpSeamConsoleV1(constructorOptions);
|
|
5194
|
+
}
|
|
5195
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5196
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
5197
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5198
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5199
|
+
}
|
|
5200
|
+
return new _SeamHttpSeamConsoleV1(constructorOptions);
|
|
5201
|
+
}
|
|
5202
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5203
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5204
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5205
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5206
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5207
|
+
"The client option cannot be used with SeamHttpSeamConsoleV1.fromPublishableKey"
|
|
5208
|
+
);
|
|
5209
|
+
}
|
|
5210
|
+
const client = createClient(clientOptions);
|
|
5211
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
5212
|
+
const { token } = await clientSessions.getOrCreate({
|
|
5213
|
+
user_identifier_key: userIdentifierKey
|
|
5214
|
+
});
|
|
5215
|
+
return _SeamHttpSeamConsoleV1.fromClientSessionToken(token, options);
|
|
5216
|
+
}
|
|
5217
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5218
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
5219
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
5220
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5221
|
+
"Missing consoleSessionToken or workspaceId"
|
|
5222
|
+
);
|
|
5223
|
+
}
|
|
5224
|
+
return new _SeamHttpSeamConsoleV1(constructorOptions);
|
|
5225
|
+
}
|
|
5226
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5227
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
5228
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
5229
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5230
|
+
"Missing personalAccessToken or workspaceId"
|
|
5231
|
+
);
|
|
5232
|
+
}
|
|
5233
|
+
return new _SeamHttpSeamConsoleV1(constructorOptions);
|
|
5234
|
+
}
|
|
5235
|
+
createPaginator(request) {
|
|
5236
|
+
return new SeamPaginator(this, request);
|
|
5237
|
+
}
|
|
5238
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
5239
|
+
const { headers } = this.client.defaults;
|
|
5240
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
5241
|
+
clientSessionToken
|
|
5242
|
+
});
|
|
5243
|
+
for (const key of Object.keys(authHeaders)) {
|
|
5244
|
+
if (headers[key] == null) {
|
|
5245
|
+
throw new Error(
|
|
5246
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
5247
|
+
);
|
|
5248
|
+
}
|
|
5249
|
+
}
|
|
5250
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
5251
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5252
|
+
await clientSessions.get();
|
|
5253
|
+
}
|
|
5254
|
+
getResourceType(parameters, options = {}) {
|
|
5255
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5256
|
+
throw new Error(
|
|
5257
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5258
|
+
);
|
|
5259
|
+
}
|
|
5260
|
+
return new SeamHttpRequest(this, {
|
|
5261
|
+
pathname: "/seam/console/v1/get_resource_type",
|
|
5262
|
+
method: "GET",
|
|
5263
|
+
params: parameters,
|
|
5264
|
+
responseKey: "resource_type",
|
|
5265
|
+
options
|
|
5266
|
+
});
|
|
5267
|
+
}
|
|
5268
|
+
};
|
|
5269
|
+
_SeamHttpSeamConsoleV1.ltsVersion = seamApiLtsVersion;
|
|
5270
|
+
var SeamHttpSeamConsoleV1 = _SeamHttpSeamConsoleV1;
|
|
5271
|
+
|
|
5272
|
+
// src/lib/seam/connect/routes/seam/console/console.ts
|
|
5273
|
+
var _SeamHttpSeamConsole = class _SeamHttpSeamConsole {
|
|
5274
|
+
constructor(apiKeyOrOptions = {}) {
|
|
5275
|
+
this.ltsVersion = seamApiLtsVersion;
|
|
5276
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
5277
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
5278
|
+
throw new Error(
|
|
5279
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5280
|
+
);
|
|
5281
|
+
}
|
|
5282
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
5283
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
5284
|
+
}
|
|
5285
|
+
static fromClient(client, options = {}) {
|
|
5286
|
+
const constructorOptions = { ...options, client };
|
|
5287
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5288
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5289
|
+
}
|
|
5290
|
+
return new _SeamHttpSeamConsole(constructorOptions);
|
|
5291
|
+
}
|
|
5292
|
+
static fromApiKey(apiKey, options = {}) {
|
|
5293
|
+
const constructorOptions = { ...options, apiKey };
|
|
5294
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5295
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5296
|
+
}
|
|
5297
|
+
return new _SeamHttpSeamConsole(constructorOptions);
|
|
5298
|
+
}
|
|
5299
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5300
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
5301
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5302
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5303
|
+
}
|
|
5304
|
+
return new _SeamHttpSeamConsole(constructorOptions);
|
|
5305
|
+
}
|
|
5306
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5307
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5308
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5309
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5310
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5311
|
+
"The client option cannot be used with SeamHttpSeamConsole.fromPublishableKey"
|
|
5312
|
+
);
|
|
5313
|
+
}
|
|
5314
|
+
const client = createClient(clientOptions);
|
|
5315
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
5316
|
+
const { token } = await clientSessions.getOrCreate({
|
|
5317
|
+
user_identifier_key: userIdentifierKey
|
|
5318
|
+
});
|
|
5319
|
+
return _SeamHttpSeamConsole.fromClientSessionToken(token, options);
|
|
5320
|
+
}
|
|
5321
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5322
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
5323
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
5324
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5325
|
+
"Missing consoleSessionToken or workspaceId"
|
|
5326
|
+
);
|
|
5327
|
+
}
|
|
5328
|
+
return new _SeamHttpSeamConsole(constructorOptions);
|
|
5329
|
+
}
|
|
5330
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5331
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
5332
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
5333
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5334
|
+
"Missing personalAccessToken or workspaceId"
|
|
5335
|
+
);
|
|
5336
|
+
}
|
|
5337
|
+
return new _SeamHttpSeamConsole(constructorOptions);
|
|
5338
|
+
}
|
|
5339
|
+
createPaginator(request) {
|
|
5340
|
+
return new SeamPaginator(this, request);
|
|
5341
|
+
}
|
|
5342
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
5343
|
+
const { headers } = this.client.defaults;
|
|
5344
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
5345
|
+
clientSessionToken
|
|
5346
|
+
});
|
|
5347
|
+
for (const key of Object.keys(authHeaders)) {
|
|
5348
|
+
if (headers[key] == null) {
|
|
5349
|
+
throw new Error(
|
|
5350
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
5351
|
+
);
|
|
5352
|
+
}
|
|
5353
|
+
}
|
|
5354
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
5355
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5356
|
+
await clientSessions.get();
|
|
5357
|
+
}
|
|
5358
|
+
get v1() {
|
|
5359
|
+
return SeamHttpSeamConsoleV1.fromClient(this.client, this.defaults);
|
|
5360
|
+
}
|
|
5361
|
+
};
|
|
5362
|
+
_SeamHttpSeamConsole.ltsVersion = seamApiLtsVersion;
|
|
5363
|
+
var SeamHttpSeamConsole = _SeamHttpSeamConsole;
|
|
5364
|
+
|
|
5277
5365
|
// src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts
|
|
5278
5366
|
var _SeamHttpSeamCustomerV1AutomationRuns = class _SeamHttpSeamCustomerV1AutomationRuns {
|
|
5279
5367
|
constructor(apiKeyOrOptions = {}) {
|
|
@@ -8089,6 +8177,20 @@ var _SeamHttpWorkspaces = class _SeamHttpWorkspaces {
|
|
|
8089
8177
|
options
|
|
8090
8178
|
});
|
|
8091
8179
|
}
|
|
8180
|
+
findResources(parameters, options = {}) {
|
|
8181
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
8182
|
+
throw new Error(
|
|
8183
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
8184
|
+
);
|
|
8185
|
+
}
|
|
8186
|
+
return new SeamHttpRequest(this, {
|
|
8187
|
+
pathname: "/workspaces/find_resources",
|
|
8188
|
+
method: "GET",
|
|
8189
|
+
params: parameters,
|
|
8190
|
+
responseKey: "batch",
|
|
8191
|
+
options
|
|
8192
|
+
});
|
|
8193
|
+
}
|
|
8092
8194
|
get(parameters, options = {}) {
|
|
8093
8195
|
return new SeamHttpRequest(this, {
|
|
8094
8196
|
pathname: "/workspaces/get",
|
|
@@ -8249,9 +8351,6 @@ var _SeamHttp = class _SeamHttp {
|
|
|
8249
8351
|
get locks() {
|
|
8250
8352
|
return SeamHttpLocks.fromClient(this.client, this.defaults);
|
|
8251
8353
|
}
|
|
8252
|
-
get networks() {
|
|
8253
|
-
return SeamHttpNetworks.fromClient(this.client, this.defaults);
|
|
8254
|
-
}
|
|
8255
8354
|
get noiseSensors() {
|
|
8256
8355
|
return SeamHttpNoiseSensors.fromClient(this.client, this.defaults);
|
|
8257
8356
|
}
|
|
@@ -8545,6 +8644,13 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
8545
8644
|
return seam.get(...args);
|
|
8546
8645
|
};
|
|
8547
8646
|
}
|
|
8647
|
+
get ["/access_methods/get_related"]() {
|
|
8648
|
+
const { client, defaults } = this;
|
|
8649
|
+
return function accessMethodsGetRelated(...args) {
|
|
8650
|
+
const seam = SeamHttpAccessMethods.fromClient(client, defaults);
|
|
8651
|
+
return seam.getRelated(...args);
|
|
8652
|
+
};
|
|
8653
|
+
}
|
|
8548
8654
|
get ["/access_methods/list"]() {
|
|
8549
8655
|
const { client, defaults } = this;
|
|
8550
8656
|
return function accessMethodsList(...args) {
|
|
@@ -9259,30 +9365,6 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
9259
9365
|
return seam.manualLockViaKeypad(...args);
|
|
9260
9366
|
};
|
|
9261
9367
|
}
|
|
9262
|
-
get ["/networks/get"]() {
|
|
9263
|
-
const { client, defaults } = this;
|
|
9264
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9265
|
-
throw new Error(
|
|
9266
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9267
|
-
);
|
|
9268
|
-
}
|
|
9269
|
-
return function networksGet(...args) {
|
|
9270
|
-
const seam = SeamHttpNetworks.fromClient(client, defaults);
|
|
9271
|
-
return seam.get(...args);
|
|
9272
|
-
};
|
|
9273
|
-
}
|
|
9274
|
-
get ["/networks/list"]() {
|
|
9275
|
-
const { client, defaults } = this;
|
|
9276
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9277
|
-
throw new Error(
|
|
9278
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9279
|
-
);
|
|
9280
|
-
}
|
|
9281
|
-
return function networksList(...args) {
|
|
9282
|
-
const seam = SeamHttpNetworks.fromClient(client, defaults);
|
|
9283
|
-
return seam.list(...args);
|
|
9284
|
-
};
|
|
9285
|
-
}
|
|
9286
9368
|
get ["/noise_sensors/list"]() {
|
|
9287
9369
|
const { client, defaults } = this;
|
|
9288
9370
|
return function noiseSensorsList(...args) {
|
|
@@ -9375,6 +9457,18 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
9375
9457
|
return seam.createSandboxPhone(...args);
|
|
9376
9458
|
};
|
|
9377
9459
|
}
|
|
9460
|
+
get ["/seam/console/v1/get_resource_type"]() {
|
|
9461
|
+
const { client, defaults } = this;
|
|
9462
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
9463
|
+
throw new Error(
|
|
9464
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
9465
|
+
);
|
|
9466
|
+
}
|
|
9467
|
+
return function seamConsoleV1GetResourceType(...args) {
|
|
9468
|
+
const seam = SeamHttpSeamConsoleV1.fromClient(client, defaults);
|
|
9469
|
+
return seam.getResourceType(...args);
|
|
9470
|
+
};
|
|
9471
|
+
}
|
|
9378
9472
|
get ["/seam/customer/v1/automation_runs/list"]() {
|
|
9379
9473
|
const { client, defaults } = this;
|
|
9380
9474
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -10149,6 +10243,18 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10149
10243
|
return seam.create(...args);
|
|
10150
10244
|
};
|
|
10151
10245
|
}
|
|
10246
|
+
get ["/workspaces/find_resources"]() {
|
|
10247
|
+
const { client, defaults } = this;
|
|
10248
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10249
|
+
throw new Error(
|
|
10250
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10251
|
+
);
|
|
10252
|
+
}
|
|
10253
|
+
return function workspacesFindResources(...args) {
|
|
10254
|
+
const seam = SeamHttpWorkspaces.fromClient(client, defaults);
|
|
10255
|
+
return seam.findResources(...args);
|
|
10256
|
+
};
|
|
10257
|
+
}
|
|
10152
10258
|
get ["/workspaces/get"]() {
|
|
10153
10259
|
const { client, defaults } = this;
|
|
10154
10260
|
return function workspacesGet(...args) {
|
|
@@ -10322,13 +10428,14 @@ exports.SeamHttpInvalidTokenError = SeamHttpInvalidTokenError;
|
|
|
10322
10428
|
exports.SeamHttpLocks = SeamHttpLocks;
|
|
10323
10429
|
exports.SeamHttpLocksSimulate = SeamHttpLocksSimulate;
|
|
10324
10430
|
exports.SeamHttpMultiWorkspace = SeamHttpMultiWorkspace;
|
|
10325
|
-
exports.SeamHttpNetworks = SeamHttpNetworks;
|
|
10326
10431
|
exports.SeamHttpNoiseSensors = SeamHttpNoiseSensors;
|
|
10327
10432
|
exports.SeamHttpNoiseSensorsNoiseThresholds = SeamHttpNoiseSensorsNoiseThresholds;
|
|
10328
10433
|
exports.SeamHttpNoiseSensorsSimulate = SeamHttpNoiseSensorsSimulate;
|
|
10329
10434
|
exports.SeamHttpPhones = SeamHttpPhones;
|
|
10330
10435
|
exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
|
|
10331
10436
|
exports.SeamHttpRequest = SeamHttpRequest;
|
|
10437
|
+
exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
|
|
10438
|
+
exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
|
|
10332
10439
|
exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
|
|
10333
10440
|
exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationRuns;
|
|
10334
10441
|
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|