@seamapi/http 1.56.0 → 1.57.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 (38) hide show
  1. package/dist/connect.cjs +0 -370
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +3 -135
  4. package/dist/index.cjs +0 -374
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/routes/index.d.ts +0 -2
  8. package/lib/seam/connect/routes/index.js +0 -2
  9. package/lib/seam/connect/routes/index.js.map +1 -1
  10. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +2 -11
  11. package/lib/seam/connect/routes/seam-http-endpoints.js +0 -72
  12. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  13. package/lib/seam/connect/routes/seam-http.d.ts +0 -4
  14. package/lib/seam/connect/routes/seam-http.js +0 -8
  15. package/lib/seam/connect/routes/seam-http.js.map +1 -1
  16. package/lib/version.d.ts +1 -1
  17. package/lib/version.js +1 -1
  18. package/package.json +3 -3
  19. package/src/lib/seam/connect/routes/index.ts +0 -2
  20. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +0 -160
  21. package/src/lib/seam/connect/routes/seam-http.ts +0 -10
  22. package/src/lib/version.ts +1 -1
  23. package/lib/seam/connect/routes/unstable-access-grants/index.d.ts +0 -1
  24. package/lib/seam/connect/routes/unstable-access-grants/index.js +0 -6
  25. package/lib/seam/connect/routes/unstable-access-grants/index.js.map +0 -1
  26. package/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.d.ts +0 -73
  27. package/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.js +0 -138
  28. package/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.js.map +0 -1
  29. package/lib/seam/connect/routes/unstable-access-methods/index.d.ts +0 -1
  30. package/lib/seam/connect/routes/unstable-access-methods/index.js +0 -6
  31. package/lib/seam/connect/routes/unstable-access-methods/index.js.map +0 -1
  32. package/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.d.ts +0 -60
  33. package/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.js +0 -126
  34. package/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.js.map +0 -1
  35. package/src/lib/seam/connect/routes/unstable-access-grants/index.ts +0 -6
  36. package/src/lib/seam/connect/routes/unstable-access-grants/unstable-access-grants.ts +0 -333
  37. package/src/lib/seam/connect/routes/unstable-access-methods/index.ts +0 -6
  38. package/src/lib/seam/connect/routes/unstable-access-methods/unstable-access-methods.ts +0 -295
package/dist/connect.cjs CHANGED
@@ -7119,284 +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
7122
  // src/lib/seam/connect/routes/unstable-locations/unstable-locations.ts
7401
7123
  var _SeamHttpUnstableLocations = class _SeamHttpUnstableLocations {
7402
7124
  constructor(apiKeyOrOptions = {}) {
@@ -8624,12 +8346,6 @@ var _SeamHttp = class _SeamHttp {
8624
8346
  get thermostats() {
8625
8347
  return SeamHttpThermostats.fromClient(this.client, this.defaults);
8626
8348
  }
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
8349
  get unstableLocations() {
8634
8350
  return SeamHttpUnstableLocations.fromClient(this.client, this.defaults);
8635
8351
  }
@@ -10124,90 +9840,6 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10124
9840
  return seam.temperatureReached(...args);
10125
9841
  };
10126
9842
  }
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
9843
  get ["/unstable_locations/add_acs_entrances"]() {
10212
9844
  const { client, defaults } = this;
10213
9845
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10777,8 +10409,6 @@ exports.SeamHttpThermostatsDailyPrograms = SeamHttpThermostatsDailyPrograms;
10777
10409
  exports.SeamHttpThermostatsSchedules = SeamHttpThermostatsSchedules;
10778
10410
  exports.SeamHttpThermostatsSimulate = SeamHttpThermostatsSimulate;
10779
10411
  exports.SeamHttpUnauthorizedError = SeamHttpUnauthorizedError;
10780
- exports.SeamHttpUnstableAccessGrants = SeamHttpUnstableAccessGrants;
10781
- exports.SeamHttpUnstableAccessMethods = SeamHttpUnstableAccessMethods;
10782
10412
  exports.SeamHttpUnstableLocations = SeamHttpUnstableLocations;
10783
10413
  exports.SeamHttpUnstablePartner = SeamHttpUnstablePartner;
10784
10414
  exports.SeamHttpUnstablePartnerBuildingBlocks = SeamHttpUnstablePartnerBuildingBlocks;