@seamapi/http 1.53.0 → 1.54.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/http",
3
- "version": "1.53.0",
3
+ "version": "1.54.0",
4
4
  "description": "JavaScript HTTP client for the Seam API written in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -85,7 +85,7 @@
85
85
  "npm": ">=10.1.0"
86
86
  },
87
87
  "peerDependencies": {
88
- "@seamapi/types": "^1.465.0"
88
+ "@seamapi/types": "^1.466.0"
89
89
  },
90
90
  "peerDependenciesMeta": {
91
91
  "@seamapi/types": {
@@ -101,7 +101,7 @@
101
101
  "@seamapi/blueprint": "^0.51.1",
102
102
  "@seamapi/fake-seam-connect": "^1.77.0",
103
103
  "@seamapi/smith": "^0.4.4",
104
- "@seamapi/types": "1.465.0",
104
+ "@seamapi/types": "1.466.0",
105
105
  "@swc/core": "^1.11.29",
106
106
  "@types/eslint": "^8.44.2",
107
107
  "@types/jsonwebtoken": "^9.0.6",
@@ -3302,6 +3302,11 @@ export class SeamHttpEndpoints {
3302
3302
  options?: ThermostatsUpdateWeeklyProgramOptions,
3303
3303
  ) => ThermostatsUpdateWeeklyProgramRequest {
3304
3304
  const { client, defaults } = this
3305
+ if (!this.defaults.isUndocumentedApiEnabled) {
3306
+ throw new Error(
3307
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
3308
+ )
3309
+ }
3305
3310
  return function thermostatsUpdateWeeklyProgram(
3306
3311
  ...args: Parameters<SeamHttpThermostats['updateWeeklyProgram']>
3307
3312
  ): ReturnType<SeamHttpThermostats['updateWeeklyProgram']> {
@@ -3315,6 +3320,11 @@ export class SeamHttpEndpoints {
3315
3320
  options?: ThermostatsDailyProgramsCreateOptions,
3316
3321
  ) => ThermostatsDailyProgramsCreateRequest {
3317
3322
  const { client, defaults } = this
3323
+ if (!this.defaults.isUndocumentedApiEnabled) {
3324
+ throw new Error(
3325
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
3326
+ )
3327
+ }
3318
3328
  return function thermostatsDailyProgramsCreate(
3319
3329
  ...args: Parameters<SeamHttpThermostatsDailyPrograms['create']>
3320
3330
  ): ReturnType<SeamHttpThermostatsDailyPrograms['create']> {
@@ -3328,6 +3338,11 @@ export class SeamHttpEndpoints {
3328
3338
  options?: ThermostatsDailyProgramsDeleteOptions,
3329
3339
  ) => ThermostatsDailyProgramsDeleteRequest {
3330
3340
  const { client, defaults } = this
3341
+ if (!this.defaults.isUndocumentedApiEnabled) {
3342
+ throw new Error(
3343
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
3344
+ )
3345
+ }
3331
3346
  return function thermostatsDailyProgramsDelete(
3332
3347
  ...args: Parameters<SeamHttpThermostatsDailyPrograms['delete']>
3333
3348
  ): ReturnType<SeamHttpThermostatsDailyPrograms['delete']> {
@@ -3341,6 +3356,11 @@ export class SeamHttpEndpoints {
3341
3356
  options?: ThermostatsDailyProgramsUpdateOptions,
3342
3357
  ) => ThermostatsDailyProgramsUpdateRequest {
3343
3358
  const { client, defaults } = this
3359
+ if (!this.defaults.isUndocumentedApiEnabled) {
3360
+ throw new Error(
3361
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
3362
+ )
3363
+ }
3344
3364
  return function thermostatsDailyProgramsUpdate(
3345
3365
  ...args: Parameters<SeamHttpThermostatsDailyPrograms['update']>
3346
3366
  ): ReturnType<SeamHttpThermostatsDailyPrograms['update']> {
@@ -3994,6 +4014,11 @@ export class SeamHttpEndpoints {
3994
4014
  options?: UserIdentitiesEnrollmentAutomationsDeleteOptions,
3995
4015
  ) => UserIdentitiesEnrollmentAutomationsDeleteRequest {
3996
4016
  const { client, defaults } = this
4017
+ if (!this.defaults.isUndocumentedApiEnabled) {
4018
+ throw new Error(
4019
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
4020
+ )
4021
+ }
3997
4022
  return function userIdentitiesEnrollmentAutomationsDelete(
3998
4023
  ...args: Parameters<SeamHttpUserIdentitiesEnrollmentAutomations['delete']>
3999
4024
  ): ReturnType<SeamHttpUserIdentitiesEnrollmentAutomations['delete']> {
@@ -4010,6 +4035,11 @@ export class SeamHttpEndpoints {
4010
4035
  options?: UserIdentitiesEnrollmentAutomationsGetOptions,
4011
4036
  ) => UserIdentitiesEnrollmentAutomationsGetRequest {
4012
4037
  const { client, defaults } = this
4038
+ if (!this.defaults.isUndocumentedApiEnabled) {
4039
+ throw new Error(
4040
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
4041
+ )
4042
+ }
4013
4043
  return function userIdentitiesEnrollmentAutomationsGet(
4014
4044
  ...args: Parameters<SeamHttpUserIdentitiesEnrollmentAutomations['get']>
4015
4045
  ): ReturnType<SeamHttpUserIdentitiesEnrollmentAutomations['get']> {
@@ -4026,6 +4056,11 @@ export class SeamHttpEndpoints {
4026
4056
  options?: UserIdentitiesEnrollmentAutomationsLaunchOptions,
4027
4057
  ) => UserIdentitiesEnrollmentAutomationsLaunchRequest {
4028
4058
  const { client, defaults } = this
4059
+ if (!this.defaults.isUndocumentedApiEnabled) {
4060
+ throw new Error(
4061
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
4062
+ )
4063
+ }
4029
4064
  return function userIdentitiesEnrollmentAutomationsLaunch(
4030
4065
  ...args: Parameters<SeamHttpUserIdentitiesEnrollmentAutomations['launch']>
4031
4066
  ): ReturnType<SeamHttpUserIdentitiesEnrollmentAutomations['launch']> {
@@ -4042,6 +4077,11 @@ export class SeamHttpEndpoints {
4042
4077
  options?: UserIdentitiesEnrollmentAutomationsListOptions,
4043
4078
  ) => UserIdentitiesEnrollmentAutomationsListRequest {
4044
4079
  const { client, defaults } = this
4080
+ if (!this.defaults.isUndocumentedApiEnabled) {
4081
+ throw new Error(
4082
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
4083
+ )
4084
+ }
4045
4085
  return function userIdentitiesEnrollmentAutomationsList(
4046
4086
  ...args: Parameters<SeamHttpUserIdentitiesEnrollmentAutomations['list']>
4047
4087
  ): ReturnType<SeamHttpUserIdentitiesEnrollmentAutomations['list']> {
@@ -44,6 +44,11 @@ export class SeamHttpThermostatsDailyPrograms {
44
44
 
45
45
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
46
46
  const options = parseOptions(apiKeyOrOptions)
47
+ if (!options.isUndocumentedApiEnabled) {
48
+ throw new Error(
49
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
50
+ )
51
+ }
47
52
  this.client = 'client' in options ? options.client : createClient(options)
48
53
  this.defaults = limitToSeamHttpRequestOptions(options)
49
54
  }
@@ -170,6 +175,11 @@ export class SeamHttpThermostatsDailyPrograms {
170
175
  parameters?: ThermostatsDailyProgramsCreateParameters,
171
176
  options: ThermostatsDailyProgramsCreateOptions = {},
172
177
  ): ThermostatsDailyProgramsCreateRequest {
178
+ if (!this.defaults.isUndocumentedApiEnabled) {
179
+ throw new Error(
180
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
181
+ )
182
+ }
173
183
  return new SeamHttpRequest(this, {
174
184
  pathname: '/thermostats/daily_programs/create',
175
185
  method: 'POST',
@@ -183,6 +193,11 @@ export class SeamHttpThermostatsDailyPrograms {
183
193
  parameters?: ThermostatsDailyProgramsDeleteParameters,
184
194
  options: ThermostatsDailyProgramsDeleteOptions = {},
185
195
  ): ThermostatsDailyProgramsDeleteRequest {
196
+ if (!this.defaults.isUndocumentedApiEnabled) {
197
+ throw new Error(
198
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
199
+ )
200
+ }
186
201
  return new SeamHttpRequest(this, {
187
202
  pathname: '/thermostats/daily_programs/delete',
188
203
  method: 'POST',
@@ -196,6 +211,11 @@ export class SeamHttpThermostatsDailyPrograms {
196
211
  parameters?: ThermostatsDailyProgramsUpdateParameters,
197
212
  options: ThermostatsDailyProgramsUpdateOptions = {},
198
213
  ): ThermostatsDailyProgramsUpdateRequest {
214
+ if (!this.defaults.isUndocumentedApiEnabled) {
215
+ throw new Error(
216
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
217
+ )
218
+ }
199
219
  return new SeamHttpRequest(this, {
200
220
  pathname: '/thermostats/daily_programs/update',
201
221
  method: 'PATCH',
@@ -373,6 +373,11 @@ export class SeamHttpThermostats {
373
373
  parameters?: ThermostatsUpdateWeeklyProgramParameters,
374
374
  options: ThermostatsUpdateWeeklyProgramOptions = {},
375
375
  ): ThermostatsUpdateWeeklyProgramRequest {
376
+ if (!this.defaults.isUndocumentedApiEnabled) {
377
+ throw new Error(
378
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
379
+ )
380
+ }
376
381
  return new SeamHttpRequest(this, {
377
382
  pathname: '/thermostats/update_weekly_program',
378
383
  method: 'POST',
@@ -44,6 +44,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
44
44
 
45
45
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
46
46
  const options = parseOptions(apiKeyOrOptions)
47
+ if (!options.isUndocumentedApiEnabled) {
48
+ throw new Error(
49
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
50
+ )
51
+ }
47
52
  this.client = 'client' in options ? options.client : createClient(options)
48
53
  this.defaults = limitToSeamHttpRequestOptions(options)
49
54
  }
@@ -170,6 +175,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
170
175
  parameters?: UserIdentitiesEnrollmentAutomationsDeleteParameters,
171
176
  options: UserIdentitiesEnrollmentAutomationsDeleteOptions = {},
172
177
  ): UserIdentitiesEnrollmentAutomationsDeleteRequest {
178
+ if (!this.defaults.isUndocumentedApiEnabled) {
179
+ throw new Error(
180
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
181
+ )
182
+ }
173
183
  return new SeamHttpRequest(this, {
174
184
  pathname: '/user_identities/enrollment_automations/delete',
175
185
  method: 'POST',
@@ -183,6 +193,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
183
193
  parameters?: UserIdentitiesEnrollmentAutomationsGetParameters,
184
194
  options: UserIdentitiesEnrollmentAutomationsGetOptions = {},
185
195
  ): UserIdentitiesEnrollmentAutomationsGetRequest {
196
+ if (!this.defaults.isUndocumentedApiEnabled) {
197
+ throw new Error(
198
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
199
+ )
200
+ }
186
201
  return new SeamHttpRequest(this, {
187
202
  pathname: '/user_identities/enrollment_automations/get',
188
203
  method: 'POST',
@@ -196,6 +211,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
196
211
  parameters?: UserIdentitiesEnrollmentAutomationsLaunchParameters,
197
212
  options: UserIdentitiesEnrollmentAutomationsLaunchOptions = {},
198
213
  ): UserIdentitiesEnrollmentAutomationsLaunchRequest {
214
+ if (!this.defaults.isUndocumentedApiEnabled) {
215
+ throw new Error(
216
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
217
+ )
218
+ }
199
219
  return new SeamHttpRequest(this, {
200
220
  pathname: '/user_identities/enrollment_automations/launch',
201
221
  method: 'POST',
@@ -209,6 +229,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
209
229
  parameters?: UserIdentitiesEnrollmentAutomationsListParameters,
210
230
  options: UserIdentitiesEnrollmentAutomationsListOptions = {},
211
231
  ): UserIdentitiesEnrollmentAutomationsListRequest {
232
+ if (!this.defaults.isUndocumentedApiEnabled) {
233
+ throw new Error(
234
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
235
+ )
236
+ }
212
237
  return new SeamHttpRequest(this, {
213
238
  pathname: '/user_identities/enrollment_automations/list',
214
239
  method: 'POST',
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '1.53.0'
1
+ const seamapiJavascriptHttpVersion = '1.54.0'
2
2
 
3
3
  export default seamapiJavascriptHttpVersion