@seamapi/http 1.56.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.
- package/dist/connect.cjs +0 -698
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +3 -278
- package/dist/index.cjs +0 -704
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/index.d.ts +0 -3
- package/lib/seam/connect/routes/index.js +0 -3
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +2 -21
- package/lib/seam/connect/routes/seam-http-endpoints.js +0 -163
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
- package/lib/seam/connect/routes/seam-http.d.ts +0 -6
- package/lib/seam/connect/routes/seam-http.js +0 -12
- package/lib/seam/connect/routes/seam-http.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/index.ts +0 -3
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +0 -361
- package/src/lib/seam/connect/routes/seam-http.ts +0 -15
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/routes/unstable-access-grants/index.d.ts +0 -1
- package/lib/seam/connect/routes/unstable-access-grants/index.js +0 -6
- package/lib/seam/connect/routes/unstable-access-grants/index.js.map +0 -1
- package/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.d.ts +0 -73
- package/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.js +0 -138
- package/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.js.map +0 -1
- package/lib/seam/connect/routes/unstable-access-methods/index.d.ts +0 -1
- package/lib/seam/connect/routes/unstable-access-methods/index.js +0 -6
- package/lib/seam/connect/routes/unstable-access-methods/index.js.map +0 -1
- package/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.d.ts +0 -60
- package/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.js +0 -126
- package/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.js.map +0 -1
- package/lib/seam/connect/routes/unstable-locations/index.d.ts +0 -1
- package/lib/seam/connect/routes/unstable-locations/index.js +0 -6
- package/lib/seam/connect/routes/unstable-locations/index.js.map +0 -1
- package/lib/seam/connect/routes/unstable-locations/unstable-locations.d.ts +0 -138
- package/lib/seam/connect/routes/unstable-locations/unstable-locations.js +0 -198
- package/lib/seam/connect/routes/unstable-locations/unstable-locations.js.map +0 -1
- package/src/lib/seam/connect/routes/unstable-access-grants/index.ts +0 -6
- package/src/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.ts +0 -333
- package/src/lib/seam/connect/routes/unstable-access-methods/index.ts +0 -6
- package/src/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.ts +0 -295
- package/src/lib/seam/connect/routes/unstable-locations/index.ts +0 -6
- package/src/lib/seam/connect/routes/unstable-locations/unstable-locations.ts +0 -544
package/dist/connect.cjs
CHANGED
|
@@ -7119,500 +7119,6 @@ var _SeamHttpThermostats = class _SeamHttpThermostats {
|
|
|
7119
7119
|
_SeamHttpThermostats.ltsVersion = seamApiLtsVersion;
|
|
7120
7120
|
var SeamHttpThermostats = _SeamHttpThermostats;
|
|
7121
7121
|
|
|
7122
|
-
// src/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.ts
|
|
7123
|
-
var _SeamHttpUnstableAccessGrants = class _SeamHttpUnstableAccessGrants {
|
|
7124
|
-
constructor(apiKeyOrOptions = {}) {
|
|
7125
|
-
this.ltsVersion = seamApiLtsVersion;
|
|
7126
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
7127
|
-
if (!options.isUndocumentedApiEnabled) {
|
|
7128
|
-
throw new Error(
|
|
7129
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7130
|
-
);
|
|
7131
|
-
}
|
|
7132
|
-
this.client = "client" in options ? options.client : createClient(options);
|
|
7133
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
7134
|
-
}
|
|
7135
|
-
static fromClient(client, options = {}) {
|
|
7136
|
-
const constructorOptions = { ...options, client };
|
|
7137
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7138
|
-
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7139
|
-
}
|
|
7140
|
-
return new _SeamHttpUnstableAccessGrants(constructorOptions);
|
|
7141
|
-
}
|
|
7142
|
-
static fromApiKey(apiKey, options = {}) {
|
|
7143
|
-
const constructorOptions = { ...options, apiKey };
|
|
7144
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7145
|
-
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7146
|
-
}
|
|
7147
|
-
return new _SeamHttpUnstableAccessGrants(constructorOptions);
|
|
7148
|
-
}
|
|
7149
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7150
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
7151
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7152
|
-
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7153
|
-
}
|
|
7154
|
-
return new _SeamHttpUnstableAccessGrants(constructorOptions);
|
|
7155
|
-
}
|
|
7156
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7157
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7158
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7159
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7160
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7161
|
-
"The client option cannot be used with SeamHttpUnstableAccessGrants.fromPublishableKey"
|
|
7162
|
-
);
|
|
7163
|
-
}
|
|
7164
|
-
const client = createClient(clientOptions);
|
|
7165
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7166
|
-
const { token } = await clientSessions.getOrCreate({
|
|
7167
|
-
user_identifier_key: userIdentifierKey
|
|
7168
|
-
});
|
|
7169
|
-
return _SeamHttpUnstableAccessGrants.fromClientSessionToken(token, options);
|
|
7170
|
-
}
|
|
7171
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7172
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7173
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7174
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7175
|
-
"Missing consoleSessionToken or workspaceId"
|
|
7176
|
-
);
|
|
7177
|
-
}
|
|
7178
|
-
return new _SeamHttpUnstableAccessGrants(constructorOptions);
|
|
7179
|
-
}
|
|
7180
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7181
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7182
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7183
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7184
|
-
"Missing personalAccessToken or workspaceId"
|
|
7185
|
-
);
|
|
7186
|
-
}
|
|
7187
|
-
return new _SeamHttpUnstableAccessGrants(constructorOptions);
|
|
7188
|
-
}
|
|
7189
|
-
createPaginator(request) {
|
|
7190
|
-
return new SeamPaginator(this, request);
|
|
7191
|
-
}
|
|
7192
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
7193
|
-
const { headers } = this.client.defaults;
|
|
7194
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7195
|
-
clientSessionToken
|
|
7196
|
-
});
|
|
7197
|
-
for (const key of Object.keys(authHeaders)) {
|
|
7198
|
-
if (headers[key] == null) {
|
|
7199
|
-
throw new Error(
|
|
7200
|
-
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7201
|
-
);
|
|
7202
|
-
}
|
|
7203
|
-
}
|
|
7204
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7205
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7206
|
-
await clientSessions.get();
|
|
7207
|
-
}
|
|
7208
|
-
create(parameters, options = {}) {
|
|
7209
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7210
|
-
throw new Error(
|
|
7211
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7212
|
-
);
|
|
7213
|
-
}
|
|
7214
|
-
return new SeamHttpRequest(this, {
|
|
7215
|
-
pathname: "/unstable_access_grants/create",
|
|
7216
|
-
method: "POST",
|
|
7217
|
-
body: parameters,
|
|
7218
|
-
responseKey: "access_grant",
|
|
7219
|
-
options
|
|
7220
|
-
});
|
|
7221
|
-
}
|
|
7222
|
-
delete(parameters, options = {}) {
|
|
7223
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7224
|
-
throw new Error(
|
|
7225
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7226
|
-
);
|
|
7227
|
-
}
|
|
7228
|
-
return new SeamHttpRequest(this, {
|
|
7229
|
-
pathname: "/unstable_access_grants/delete",
|
|
7230
|
-
method: "POST",
|
|
7231
|
-
body: parameters,
|
|
7232
|
-
responseKey: void 0,
|
|
7233
|
-
options
|
|
7234
|
-
});
|
|
7235
|
-
}
|
|
7236
|
-
get(parameters, options = {}) {
|
|
7237
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7238
|
-
throw new Error(
|
|
7239
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7240
|
-
);
|
|
7241
|
-
}
|
|
7242
|
-
return new SeamHttpRequest(this, {
|
|
7243
|
-
pathname: "/unstable_access_grants/get",
|
|
7244
|
-
method: "POST",
|
|
7245
|
-
body: parameters,
|
|
7246
|
-
responseKey: "access_grant",
|
|
7247
|
-
options
|
|
7248
|
-
});
|
|
7249
|
-
}
|
|
7250
|
-
list(parameters, options = {}) {
|
|
7251
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7252
|
-
throw new Error(
|
|
7253
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7254
|
-
);
|
|
7255
|
-
}
|
|
7256
|
-
return new SeamHttpRequest(this, {
|
|
7257
|
-
pathname: "/unstable_access_grants/list",
|
|
7258
|
-
method: "POST",
|
|
7259
|
-
body: parameters,
|
|
7260
|
-
responseKey: "access_grants",
|
|
7261
|
-
options
|
|
7262
|
-
});
|
|
7263
|
-
}
|
|
7264
|
-
};
|
|
7265
|
-
_SeamHttpUnstableAccessGrants.ltsVersion = seamApiLtsVersion;
|
|
7266
|
-
var SeamHttpUnstableAccessGrants = _SeamHttpUnstableAccessGrants;
|
|
7267
|
-
|
|
7268
|
-
// src/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.ts
|
|
7269
|
-
var _SeamHttpUnstableAccessMethods = class _SeamHttpUnstableAccessMethods {
|
|
7270
|
-
constructor(apiKeyOrOptions = {}) {
|
|
7271
|
-
this.ltsVersion = seamApiLtsVersion;
|
|
7272
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
7273
|
-
if (!options.isUndocumentedApiEnabled) {
|
|
7274
|
-
throw new Error(
|
|
7275
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7276
|
-
);
|
|
7277
|
-
}
|
|
7278
|
-
this.client = "client" in options ? options.client : createClient(options);
|
|
7279
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
7280
|
-
}
|
|
7281
|
-
static fromClient(client, options = {}) {
|
|
7282
|
-
const constructorOptions = { ...options, client };
|
|
7283
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7284
|
-
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7285
|
-
}
|
|
7286
|
-
return new _SeamHttpUnstableAccessMethods(constructorOptions);
|
|
7287
|
-
}
|
|
7288
|
-
static fromApiKey(apiKey, options = {}) {
|
|
7289
|
-
const constructorOptions = { ...options, apiKey };
|
|
7290
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7291
|
-
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7292
|
-
}
|
|
7293
|
-
return new _SeamHttpUnstableAccessMethods(constructorOptions);
|
|
7294
|
-
}
|
|
7295
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7296
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
7297
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7298
|
-
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7299
|
-
}
|
|
7300
|
-
return new _SeamHttpUnstableAccessMethods(constructorOptions);
|
|
7301
|
-
}
|
|
7302
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7303
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7304
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7305
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7306
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7307
|
-
"The client option cannot be used with SeamHttpUnstableAccessMethods.fromPublishableKey"
|
|
7308
|
-
);
|
|
7309
|
-
}
|
|
7310
|
-
const client = createClient(clientOptions);
|
|
7311
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7312
|
-
const { token } = await clientSessions.getOrCreate({
|
|
7313
|
-
user_identifier_key: userIdentifierKey
|
|
7314
|
-
});
|
|
7315
|
-
return _SeamHttpUnstableAccessMethods.fromClientSessionToken(token, options);
|
|
7316
|
-
}
|
|
7317
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7318
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7319
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7320
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7321
|
-
"Missing consoleSessionToken or workspaceId"
|
|
7322
|
-
);
|
|
7323
|
-
}
|
|
7324
|
-
return new _SeamHttpUnstableAccessMethods(constructorOptions);
|
|
7325
|
-
}
|
|
7326
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7327
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7328
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7329
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7330
|
-
"Missing personalAccessToken or workspaceId"
|
|
7331
|
-
);
|
|
7332
|
-
}
|
|
7333
|
-
return new _SeamHttpUnstableAccessMethods(constructorOptions);
|
|
7334
|
-
}
|
|
7335
|
-
createPaginator(request) {
|
|
7336
|
-
return new SeamPaginator(this, request);
|
|
7337
|
-
}
|
|
7338
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
7339
|
-
const { headers } = this.client.defaults;
|
|
7340
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7341
|
-
clientSessionToken
|
|
7342
|
-
});
|
|
7343
|
-
for (const key of Object.keys(authHeaders)) {
|
|
7344
|
-
if (headers[key] == null) {
|
|
7345
|
-
throw new Error(
|
|
7346
|
-
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7347
|
-
);
|
|
7348
|
-
}
|
|
7349
|
-
}
|
|
7350
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7351
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7352
|
-
await clientSessions.get();
|
|
7353
|
-
}
|
|
7354
|
-
delete(parameters, options = {}) {
|
|
7355
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7356
|
-
throw new Error(
|
|
7357
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7358
|
-
);
|
|
7359
|
-
}
|
|
7360
|
-
return new SeamHttpRequest(this, {
|
|
7361
|
-
pathname: "/unstable_access_methods/delete",
|
|
7362
|
-
method: "POST",
|
|
7363
|
-
body: parameters,
|
|
7364
|
-
responseKey: void 0,
|
|
7365
|
-
options
|
|
7366
|
-
});
|
|
7367
|
-
}
|
|
7368
|
-
get(parameters, options = {}) {
|
|
7369
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7370
|
-
throw new Error(
|
|
7371
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7372
|
-
);
|
|
7373
|
-
}
|
|
7374
|
-
return new SeamHttpRequest(this, {
|
|
7375
|
-
pathname: "/unstable_access_methods/get",
|
|
7376
|
-
method: "POST",
|
|
7377
|
-
body: parameters,
|
|
7378
|
-
responseKey: "access_method",
|
|
7379
|
-
options
|
|
7380
|
-
});
|
|
7381
|
-
}
|
|
7382
|
-
list(parameters, options = {}) {
|
|
7383
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7384
|
-
throw new Error(
|
|
7385
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7386
|
-
);
|
|
7387
|
-
}
|
|
7388
|
-
return new SeamHttpRequest(this, {
|
|
7389
|
-
pathname: "/unstable_access_methods/list",
|
|
7390
|
-
method: "POST",
|
|
7391
|
-
body: parameters,
|
|
7392
|
-
responseKey: "access_methods",
|
|
7393
|
-
options
|
|
7394
|
-
});
|
|
7395
|
-
}
|
|
7396
|
-
};
|
|
7397
|
-
_SeamHttpUnstableAccessMethods.ltsVersion = seamApiLtsVersion;
|
|
7398
|
-
var SeamHttpUnstableAccessMethods = _SeamHttpUnstableAccessMethods;
|
|
7399
|
-
|
|
7400
|
-
// src/lib/seam/connect/routes/unstable-locations/unstable-locations.ts
|
|
7401
|
-
var _SeamHttpUnstableLocations = class _SeamHttpUnstableLocations {
|
|
7402
|
-
constructor(apiKeyOrOptions = {}) {
|
|
7403
|
-
this.ltsVersion = seamApiLtsVersion;
|
|
7404
|
-
const options = parseOptions(apiKeyOrOptions);
|
|
7405
|
-
if (!options.isUndocumentedApiEnabled) {
|
|
7406
|
-
throw new Error(
|
|
7407
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7408
|
-
);
|
|
7409
|
-
}
|
|
7410
|
-
this.client = "client" in options ? options.client : createClient(options);
|
|
7411
|
-
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
7412
|
-
}
|
|
7413
|
-
static fromClient(client, options = {}) {
|
|
7414
|
-
const constructorOptions = { ...options, client };
|
|
7415
|
-
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7416
|
-
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7417
|
-
}
|
|
7418
|
-
return new _SeamHttpUnstableLocations(constructorOptions);
|
|
7419
|
-
}
|
|
7420
|
-
static fromApiKey(apiKey, options = {}) {
|
|
7421
|
-
const constructorOptions = { ...options, apiKey };
|
|
7422
|
-
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7423
|
-
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7424
|
-
}
|
|
7425
|
-
return new _SeamHttpUnstableLocations(constructorOptions);
|
|
7426
|
-
}
|
|
7427
|
-
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7428
|
-
const constructorOptions = { ...options, clientSessionToken };
|
|
7429
|
-
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7430
|
-
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7431
|
-
}
|
|
7432
|
-
return new _SeamHttpUnstableLocations(constructorOptions);
|
|
7433
|
-
}
|
|
7434
|
-
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7435
|
-
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7436
|
-
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7437
|
-
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7438
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7439
|
-
"The client option cannot be used with SeamHttpUnstableLocations.fromPublishableKey"
|
|
7440
|
-
);
|
|
7441
|
-
}
|
|
7442
|
-
const client = createClient(clientOptions);
|
|
7443
|
-
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7444
|
-
const { token } = await clientSessions.getOrCreate({
|
|
7445
|
-
user_identifier_key: userIdentifierKey
|
|
7446
|
-
});
|
|
7447
|
-
return _SeamHttpUnstableLocations.fromClientSessionToken(token, options);
|
|
7448
|
-
}
|
|
7449
|
-
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7450
|
-
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7451
|
-
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7452
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7453
|
-
"Missing consoleSessionToken or workspaceId"
|
|
7454
|
-
);
|
|
7455
|
-
}
|
|
7456
|
-
return new _SeamHttpUnstableLocations(constructorOptions);
|
|
7457
|
-
}
|
|
7458
|
-
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7459
|
-
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7460
|
-
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7461
|
-
throw new SeamHttpInvalidOptionsError(
|
|
7462
|
-
"Missing personalAccessToken or workspaceId"
|
|
7463
|
-
);
|
|
7464
|
-
}
|
|
7465
|
-
return new _SeamHttpUnstableLocations(constructorOptions);
|
|
7466
|
-
}
|
|
7467
|
-
createPaginator(request) {
|
|
7468
|
-
return new SeamPaginator(this, request);
|
|
7469
|
-
}
|
|
7470
|
-
async updateClientSessionToken(clientSessionToken) {
|
|
7471
|
-
const { headers } = this.client.defaults;
|
|
7472
|
-
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7473
|
-
clientSessionToken
|
|
7474
|
-
});
|
|
7475
|
-
for (const key of Object.keys(authHeaders)) {
|
|
7476
|
-
if (headers[key] == null) {
|
|
7477
|
-
throw new Error(
|
|
7478
|
-
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7479
|
-
);
|
|
7480
|
-
}
|
|
7481
|
-
}
|
|
7482
|
-
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7483
|
-
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7484
|
-
await clientSessions.get();
|
|
7485
|
-
}
|
|
7486
|
-
addAcsEntrances(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/add_acs_entrances",
|
|
7494
|
-
method: "PUT",
|
|
7495
|
-
body: parameters,
|
|
7496
|
-
responseKey: void 0,
|
|
7497
|
-
options
|
|
7498
|
-
});
|
|
7499
|
-
}
|
|
7500
|
-
addDevices(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/add_devices",
|
|
7508
|
-
method: "PUT",
|
|
7509
|
-
body: parameters,
|
|
7510
|
-
responseKey: void 0,
|
|
7511
|
-
options
|
|
7512
|
-
});
|
|
7513
|
-
}
|
|
7514
|
-
create(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/create",
|
|
7522
|
-
method: "POST",
|
|
7523
|
-
body: parameters,
|
|
7524
|
-
responseKey: "location",
|
|
7525
|
-
options
|
|
7526
|
-
});
|
|
7527
|
-
}
|
|
7528
|
-
delete(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/delete",
|
|
7536
|
-
method: "POST",
|
|
7537
|
-
body: parameters,
|
|
7538
|
-
responseKey: void 0,
|
|
7539
|
-
options
|
|
7540
|
-
});
|
|
7541
|
-
}
|
|
7542
|
-
get(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/get",
|
|
7550
|
-
method: "POST",
|
|
7551
|
-
body: parameters,
|
|
7552
|
-
responseKey: "location",
|
|
7553
|
-
options
|
|
7554
|
-
});
|
|
7555
|
-
}
|
|
7556
|
-
list(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/list",
|
|
7564
|
-
method: "GET",
|
|
7565
|
-
params: parameters,
|
|
7566
|
-
responseKey: "locations",
|
|
7567
|
-
options
|
|
7568
|
-
});
|
|
7569
|
-
}
|
|
7570
|
-
removeAcsEntrances(parameters, options = {}) {
|
|
7571
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7572
|
-
throw new Error(
|
|
7573
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7574
|
-
);
|
|
7575
|
-
}
|
|
7576
|
-
return new SeamHttpRequest(this, {
|
|
7577
|
-
pathname: "/unstable_locations/remove_acs_entrances",
|
|
7578
|
-
method: "POST",
|
|
7579
|
-
body: parameters,
|
|
7580
|
-
responseKey: void 0,
|
|
7581
|
-
options
|
|
7582
|
-
});
|
|
7583
|
-
}
|
|
7584
|
-
removeDevices(parameters, options = {}) {
|
|
7585
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7586
|
-
throw new Error(
|
|
7587
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7588
|
-
);
|
|
7589
|
-
}
|
|
7590
|
-
return new SeamHttpRequest(this, {
|
|
7591
|
-
pathname: "/unstable_locations/remove_devices",
|
|
7592
|
-
method: "POST",
|
|
7593
|
-
body: parameters,
|
|
7594
|
-
responseKey: void 0,
|
|
7595
|
-
options
|
|
7596
|
-
});
|
|
7597
|
-
}
|
|
7598
|
-
update(parameters, options = {}) {
|
|
7599
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7600
|
-
throw new Error(
|
|
7601
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7602
|
-
);
|
|
7603
|
-
}
|
|
7604
|
-
return new SeamHttpRequest(this, {
|
|
7605
|
-
pathname: "/unstable_locations/update",
|
|
7606
|
-
method: "PATCH",
|
|
7607
|
-
body: parameters,
|
|
7608
|
-
responseKey: "location",
|
|
7609
|
-
options
|
|
7610
|
-
});
|
|
7611
|
-
}
|
|
7612
|
-
};
|
|
7613
|
-
_SeamHttpUnstableLocations.ltsVersion = seamApiLtsVersion;
|
|
7614
|
-
var SeamHttpUnstableLocations = _SeamHttpUnstableLocations;
|
|
7615
|
-
|
|
7616
7122
|
// src/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.ts
|
|
7617
7123
|
var _SeamHttpUnstablePartnerBuildingBlocks = class _SeamHttpUnstablePartnerBuildingBlocks {
|
|
7618
7124
|
constructor(apiKeyOrOptions = {}) {
|
|
@@ -8624,15 +8130,6 @@ var _SeamHttp = class _SeamHttp {
|
|
|
8624
8130
|
get thermostats() {
|
|
8625
8131
|
return SeamHttpThermostats.fromClient(this.client, this.defaults);
|
|
8626
8132
|
}
|
|
8627
|
-
get unstableAccessGrants() {
|
|
8628
|
-
return SeamHttpUnstableAccessGrants.fromClient(this.client, this.defaults);
|
|
8629
|
-
}
|
|
8630
|
-
get unstableAccessMethods() {
|
|
8631
|
-
return SeamHttpUnstableAccessMethods.fromClient(this.client, this.defaults);
|
|
8632
|
-
}
|
|
8633
|
-
get unstableLocations() {
|
|
8634
|
-
return SeamHttpUnstableLocations.fromClient(this.client, this.defaults);
|
|
8635
|
-
}
|
|
8636
8133
|
get unstablePartner() {
|
|
8637
8134
|
return SeamHttpUnstablePartner.fromClient(this.client, this.defaults);
|
|
8638
8135
|
}
|
|
@@ -10124,198 +9621,6 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10124
9621
|
return seam.temperatureReached(...args);
|
|
10125
9622
|
};
|
|
10126
9623
|
}
|
|
10127
|
-
get ["/unstable_access_grants/create"]() {
|
|
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 unstableAccessGrantsCreate(...args) {
|
|
10135
|
-
const seam = SeamHttpUnstableAccessGrants.fromClient(client, defaults);
|
|
10136
|
-
return seam.create(...args);
|
|
10137
|
-
};
|
|
10138
|
-
}
|
|
10139
|
-
get ["/unstable_access_grants/delete"]() {
|
|
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 unstableAccessGrantsDelete(...args) {
|
|
10147
|
-
const seam = SeamHttpUnstableAccessGrants.fromClient(client, defaults);
|
|
10148
|
-
return seam.delete(...args);
|
|
10149
|
-
};
|
|
10150
|
-
}
|
|
10151
|
-
get ["/unstable_access_grants/get"]() {
|
|
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 unstableAccessGrantsGet(...args) {
|
|
10159
|
-
const seam = SeamHttpUnstableAccessGrants.fromClient(client, defaults);
|
|
10160
|
-
return seam.get(...args);
|
|
10161
|
-
};
|
|
10162
|
-
}
|
|
10163
|
-
get ["/unstable_access_grants/list"]() {
|
|
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 unstableAccessGrantsList(...args) {
|
|
10171
|
-
const seam = SeamHttpUnstableAccessGrants.fromClient(client, defaults);
|
|
10172
|
-
return seam.list(...args);
|
|
10173
|
-
};
|
|
10174
|
-
}
|
|
10175
|
-
get ["/unstable_access_methods/delete"]() {
|
|
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 unstableAccessMethodsDelete(...args) {
|
|
10183
|
-
const seam = SeamHttpUnstableAccessMethods.fromClient(client, defaults);
|
|
10184
|
-
return seam.delete(...args);
|
|
10185
|
-
};
|
|
10186
|
-
}
|
|
10187
|
-
get ["/unstable_access_methods/get"]() {
|
|
10188
|
-
const { client, defaults } = this;
|
|
10189
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10190
|
-
throw new Error(
|
|
10191
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10192
|
-
);
|
|
10193
|
-
}
|
|
10194
|
-
return function unstableAccessMethodsGet(...args) {
|
|
10195
|
-
const seam = SeamHttpUnstableAccessMethods.fromClient(client, defaults);
|
|
10196
|
-
return seam.get(...args);
|
|
10197
|
-
};
|
|
10198
|
-
}
|
|
10199
|
-
get ["/unstable_access_methods/list"]() {
|
|
10200
|
-
const { client, defaults } = this;
|
|
10201
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10202
|
-
throw new Error(
|
|
10203
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10204
|
-
);
|
|
10205
|
-
}
|
|
10206
|
-
return function unstableAccessMethodsList(...args) {
|
|
10207
|
-
const seam = SeamHttpUnstableAccessMethods.fromClient(client, defaults);
|
|
10208
|
-
return seam.list(...args);
|
|
10209
|
-
};
|
|
10210
|
-
}
|
|
10211
|
-
get ["/unstable_locations/add_acs_entrances"]() {
|
|
10212
|
-
const { client, defaults } = this;
|
|
10213
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10214
|
-
throw new Error(
|
|
10215
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10216
|
-
);
|
|
10217
|
-
}
|
|
10218
|
-
return function unstableLocationsAddAcsEntrances(...args) {
|
|
10219
|
-
const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
|
|
10220
|
-
return seam.addAcsEntrances(...args);
|
|
10221
|
-
};
|
|
10222
|
-
}
|
|
10223
|
-
get ["/unstable_locations/add_devices"]() {
|
|
10224
|
-
const { client, defaults } = this;
|
|
10225
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10226
|
-
throw new Error(
|
|
10227
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10228
|
-
);
|
|
10229
|
-
}
|
|
10230
|
-
return function unstableLocationsAddDevices(...args) {
|
|
10231
|
-
const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
|
|
10232
|
-
return seam.addDevices(...args);
|
|
10233
|
-
};
|
|
10234
|
-
}
|
|
10235
|
-
get ["/unstable_locations/create"]() {
|
|
10236
|
-
const { client, defaults } = this;
|
|
10237
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10238
|
-
throw new Error(
|
|
10239
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10240
|
-
);
|
|
10241
|
-
}
|
|
10242
|
-
return function unstableLocationsCreate(...args) {
|
|
10243
|
-
const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
|
|
10244
|
-
return seam.create(...args);
|
|
10245
|
-
};
|
|
10246
|
-
}
|
|
10247
|
-
get ["/unstable_locations/delete"]() {
|
|
10248
|
-
const { client, defaults } = this;
|
|
10249
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10250
|
-
throw new Error(
|
|
10251
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10252
|
-
);
|
|
10253
|
-
}
|
|
10254
|
-
return function unstableLocationsDelete(...args) {
|
|
10255
|
-
const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
|
|
10256
|
-
return seam.delete(...args);
|
|
10257
|
-
};
|
|
10258
|
-
}
|
|
10259
|
-
get ["/unstable_locations/get"]() {
|
|
10260
|
-
const { client, defaults } = this;
|
|
10261
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10262
|
-
throw new Error(
|
|
10263
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10264
|
-
);
|
|
10265
|
-
}
|
|
10266
|
-
return function unstableLocationsGet(...args) {
|
|
10267
|
-
const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
|
|
10268
|
-
return seam.get(...args);
|
|
10269
|
-
};
|
|
10270
|
-
}
|
|
10271
|
-
get ["/unstable_locations/list"]() {
|
|
10272
|
-
const { client, defaults } = this;
|
|
10273
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10274
|
-
throw new Error(
|
|
10275
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10276
|
-
);
|
|
10277
|
-
}
|
|
10278
|
-
return function unstableLocationsList(...args) {
|
|
10279
|
-
const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
|
|
10280
|
-
return seam.list(...args);
|
|
10281
|
-
};
|
|
10282
|
-
}
|
|
10283
|
-
get ["/unstable_locations/remove_acs_entrances"]() {
|
|
10284
|
-
const { client, defaults } = this;
|
|
10285
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10286
|
-
throw new Error(
|
|
10287
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10288
|
-
);
|
|
10289
|
-
}
|
|
10290
|
-
return function unstableLocationsRemoveAcsEntrances(...args) {
|
|
10291
|
-
const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
|
|
10292
|
-
return seam.removeAcsEntrances(...args);
|
|
10293
|
-
};
|
|
10294
|
-
}
|
|
10295
|
-
get ["/unstable_locations/remove_devices"]() {
|
|
10296
|
-
const { client, defaults } = this;
|
|
10297
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10298
|
-
throw new Error(
|
|
10299
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10300
|
-
);
|
|
10301
|
-
}
|
|
10302
|
-
return function unstableLocationsRemoveDevices(...args) {
|
|
10303
|
-
const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
|
|
10304
|
-
return seam.removeDevices(...args);
|
|
10305
|
-
};
|
|
10306
|
-
}
|
|
10307
|
-
get ["/unstable_locations/update"]() {
|
|
10308
|
-
const { client, defaults } = this;
|
|
10309
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10310
|
-
throw new Error(
|
|
10311
|
-
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10312
|
-
);
|
|
10313
|
-
}
|
|
10314
|
-
return function unstableLocationsUpdate(...args) {
|
|
10315
|
-
const seam = SeamHttpUnstableLocations.fromClient(client, defaults);
|
|
10316
|
-
return seam.update(...args);
|
|
10317
|
-
};
|
|
10318
|
-
}
|
|
10319
9624
|
get ["/unstable_partner/building_blocks/connect_accounts"]() {
|
|
10320
9625
|
const { client, defaults } = this;
|
|
10321
9626
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -10777,9 +10082,6 @@ exports.SeamHttpThermostatsDailyPrograms = SeamHttpThermostatsDailyPrograms;
|
|
|
10777
10082
|
exports.SeamHttpThermostatsSchedules = SeamHttpThermostatsSchedules;
|
|
10778
10083
|
exports.SeamHttpThermostatsSimulate = SeamHttpThermostatsSimulate;
|
|
10779
10084
|
exports.SeamHttpUnauthorizedError = SeamHttpUnauthorizedError;
|
|
10780
|
-
exports.SeamHttpUnstableAccessGrants = SeamHttpUnstableAccessGrants;
|
|
10781
|
-
exports.SeamHttpUnstableAccessMethods = SeamHttpUnstableAccessMethods;
|
|
10782
|
-
exports.SeamHttpUnstableLocations = SeamHttpUnstableLocations;
|
|
10783
10085
|
exports.SeamHttpUnstablePartner = SeamHttpUnstablePartner;
|
|
10784
10086
|
exports.SeamHttpUnstablePartnerBuildingBlocks = SeamHttpUnstablePartnerBuildingBlocks;
|
|
10785
10087
|
exports.SeamHttpUserIdentities = SeamHttpUserIdentities;
|