From 64e34d3aaac0b754573c676d44b844336106b5db Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 24 Jul 2025 01:52:27 +0000 Subject: [PATCH 1/2] feat: Update to @seamapi/types@1.466.0 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index f01fd682..ef2d31db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@seamapi/blueprint": "^0.51.1", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^0.4.4", - "@seamapi/types": "1.465.0", + "@seamapi/types": "1.466.0", "@swc/core": "^1.11.29", "@types/eslint": "^8.44.2", "@types/jsonwebtoken": "^9.0.6", @@ -1216,9 +1216,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.465.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.465.0.tgz", - "integrity": "sha512-qJ9Oly5zlxD533cooMgXZd65xM9f7x1vaPCDvVRBmFoiBUAXX9ICwWyH9ll4s8v4fMwAz444/CfDjOjJKGA/3Q==", + "version": "1.466.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.466.0.tgz", + "integrity": "sha512-yJ7ud18Kc3OGK9SGx4/7qvS+qP2Lqq11Ur8wc82gz1ltJCnVe0mkVpOxCxJQRT81TLs8g0XgDHVNASGww1qhvQ==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index a0e09340..437835a2 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "@seamapi/blueprint": "^0.51.1", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^0.4.4", - "@seamapi/types": "1.465.0", + "@seamapi/types": "1.466.0", "@swc/core": "^1.11.29", "@types/eslint": "^8.44.2", "@types/jsonwebtoken": "^9.0.6", From 872d18397e98ab24066b41c75b5643a557b7933a Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 24 Jul 2025 01:53:23 +0000 Subject: [PATCH 2/2] ci: Generate code --- package-lock.json | 2 +- package.json | 2 +- .../connect/routes/seam-http-endpoints.ts | 40 +++++++++++++++++++ .../daily-programs/daily-programs.ts | 20 ++++++++++ .../connect/routes/thermostats/thermostats.ts | 5 +++ .../enrollment-automations.ts | 25 ++++++++++++ 6 files changed, 92 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef2d31db..7c718366 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "npm": ">=10.1.0" }, "peerDependencies": { - "@seamapi/types": "^1.465.0" + "@seamapi/types": "^1.466.0" }, "peerDependenciesMeta": { "@seamapi/types": { diff --git a/package.json b/package.json index 437835a2..00db0328 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "npm": ">=10.1.0" }, "peerDependencies": { - "@seamapi/types": "^1.465.0" + "@seamapi/types": "^1.466.0" }, "peerDependenciesMeta": { "@seamapi/types": { diff --git a/src/lib/seam/connect/routes/seam-http-endpoints.ts b/src/lib/seam/connect/routes/seam-http-endpoints.ts index d254a028..e04bf16d 100644 --- a/src/lib/seam/connect/routes/seam-http-endpoints.ts +++ b/src/lib/seam/connect/routes/seam-http-endpoints.ts @@ -3302,6 +3302,11 @@ export class SeamHttpEndpoints { options?: ThermostatsUpdateWeeklyProgramOptions, ) => ThermostatsUpdateWeeklyProgramRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function thermostatsUpdateWeeklyProgram( ...args: Parameters ): ReturnType { @@ -3315,6 +3320,11 @@ export class SeamHttpEndpoints { options?: ThermostatsDailyProgramsCreateOptions, ) => ThermostatsDailyProgramsCreateRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function thermostatsDailyProgramsCreate( ...args: Parameters ): ReturnType { @@ -3328,6 +3338,11 @@ export class SeamHttpEndpoints { options?: ThermostatsDailyProgramsDeleteOptions, ) => ThermostatsDailyProgramsDeleteRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function thermostatsDailyProgramsDelete( ...args: Parameters ): ReturnType { @@ -3341,6 +3356,11 @@ export class SeamHttpEndpoints { options?: ThermostatsDailyProgramsUpdateOptions, ) => ThermostatsDailyProgramsUpdateRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function thermostatsDailyProgramsUpdate( ...args: Parameters ): ReturnType { @@ -3994,6 +4014,11 @@ export class SeamHttpEndpoints { options?: UserIdentitiesEnrollmentAutomationsDeleteOptions, ) => UserIdentitiesEnrollmentAutomationsDeleteRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function userIdentitiesEnrollmentAutomationsDelete( ...args: Parameters ): ReturnType { @@ -4010,6 +4035,11 @@ export class SeamHttpEndpoints { options?: UserIdentitiesEnrollmentAutomationsGetOptions, ) => UserIdentitiesEnrollmentAutomationsGetRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function userIdentitiesEnrollmentAutomationsGet( ...args: Parameters ): ReturnType { @@ -4026,6 +4056,11 @@ export class SeamHttpEndpoints { options?: UserIdentitiesEnrollmentAutomationsLaunchOptions, ) => UserIdentitiesEnrollmentAutomationsLaunchRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function userIdentitiesEnrollmentAutomationsLaunch( ...args: Parameters ): ReturnType { @@ -4042,6 +4077,11 @@ export class SeamHttpEndpoints { options?: UserIdentitiesEnrollmentAutomationsListOptions, ) => UserIdentitiesEnrollmentAutomationsListRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function userIdentitiesEnrollmentAutomationsList( ...args: Parameters ): ReturnType { diff --git a/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts b/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts index 3406bc03..edfe8607 100644 --- a/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts +++ b/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts @@ -44,6 +44,11 @@ export class SeamHttpThermostatsDailyPrograms { constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { const options = parseOptions(apiKeyOrOptions) + if (!options.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } this.client = 'client' in options ? options.client : createClient(options) this.defaults = limitToSeamHttpRequestOptions(options) } @@ -170,6 +175,11 @@ export class SeamHttpThermostatsDailyPrograms { parameters?: ThermostatsDailyProgramsCreateParameters, options: ThermostatsDailyProgramsCreateOptions = {}, ): ThermostatsDailyProgramsCreateRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/thermostats/daily_programs/create', method: 'POST', @@ -183,6 +193,11 @@ export class SeamHttpThermostatsDailyPrograms { parameters?: ThermostatsDailyProgramsDeleteParameters, options: ThermostatsDailyProgramsDeleteOptions = {}, ): ThermostatsDailyProgramsDeleteRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/thermostats/daily_programs/delete', method: 'POST', @@ -196,6 +211,11 @@ export class SeamHttpThermostatsDailyPrograms { parameters?: ThermostatsDailyProgramsUpdateParameters, options: ThermostatsDailyProgramsUpdateOptions = {}, ): ThermostatsDailyProgramsUpdateRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/thermostats/daily_programs/update', method: 'PATCH', diff --git a/src/lib/seam/connect/routes/thermostats/thermostats.ts b/src/lib/seam/connect/routes/thermostats/thermostats.ts index da325fcd..d5cc73ae 100644 --- a/src/lib/seam/connect/routes/thermostats/thermostats.ts +++ b/src/lib/seam/connect/routes/thermostats/thermostats.ts @@ -373,6 +373,11 @@ export class SeamHttpThermostats { parameters?: ThermostatsUpdateWeeklyProgramParameters, options: ThermostatsUpdateWeeklyProgramOptions = {}, ): ThermostatsUpdateWeeklyProgramRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/thermostats/update_weekly_program', method: 'POST', diff --git a/src/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.ts b/src/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.ts index 546c6bde..a68572ee 100644 --- a/src/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.ts +++ b/src/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.ts @@ -44,6 +44,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations { constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { const options = parseOptions(apiKeyOrOptions) + if (!options.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } this.client = 'client' in options ? options.client : createClient(options) this.defaults = limitToSeamHttpRequestOptions(options) } @@ -170,6 +175,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations { parameters?: UserIdentitiesEnrollmentAutomationsDeleteParameters, options: UserIdentitiesEnrollmentAutomationsDeleteOptions = {}, ): UserIdentitiesEnrollmentAutomationsDeleteRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/user_identities/enrollment_automations/delete', method: 'POST', @@ -183,6 +193,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations { parameters?: UserIdentitiesEnrollmentAutomationsGetParameters, options: UserIdentitiesEnrollmentAutomationsGetOptions = {}, ): UserIdentitiesEnrollmentAutomationsGetRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/user_identities/enrollment_automations/get', method: 'POST', @@ -196,6 +211,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations { parameters?: UserIdentitiesEnrollmentAutomationsLaunchParameters, options: UserIdentitiesEnrollmentAutomationsLaunchOptions = {}, ): UserIdentitiesEnrollmentAutomationsLaunchRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/user_identities/enrollment_automations/launch', method: 'POST', @@ -209,6 +229,11 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations { parameters?: UserIdentitiesEnrollmentAutomationsListParameters, options: UserIdentitiesEnrollmentAutomationsListOptions = {}, ): UserIdentitiesEnrollmentAutomationsListRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/user_identities/enrollment_automations/list', method: 'POST',