From fe46f3a638ce86dd12ea0883928a9cee5ca8f4cb Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Wed, 23 Jul 2025 17:39:02 -0700 Subject: [PATCH 1/9] Rename codegen script to generate --- .github/workflows/generate.yml | 2 +- README.md | 2 +- package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 491d425e6..263d9f333 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -58,7 +58,7 @@ jobs: max_attempts: 3 retry_wait_seconds: 1 timeout_minutes: 2 - command: npm run codegen + command: npm run generate - name: Commit uses: stefanzweifel/git-auto-commit-action@v5 with: diff --git a/README.md b/README.md index 909a25c32..68450c6c9 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ $ git clone https://github.com/seamapi/docs.git $ cd docs $ nvm install $ npm install -$ npm run codegen +$ npm run generate ``` Primary development tasks are defined under `scripts` in `package.json` diff --git a/package.json b/package.json index 62457a6ba..d7434802f 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ }, "files": [], "scripts": { - "codegen": "tsx codegen/smith.ts", - "postcodegen": "npm run format", + "generate": "tsx codegen/smith.ts", + "postgenerate": "npm run format", "typecheck": "tsc", "lint": "eslint --ignore-path .prettierignore .", "prelint": "prettier --check --ignore-path .prettierignore .", From e4b8731c9935bafd3e36978080784dfeb95899b9 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Wed, 23 Jul 2025 17:42:42 -0700 Subject: [PATCH 2/9] Add default path title for all paths --- codegen/data/paths.yaml | 45 ---------------------------------------- codegen/lib/reference.ts | 9 ++++++++ 2 files changed, 9 insertions(+), 45 deletions(-) diff --git a/codegen/data/paths.yaml b/codegen/data/paths.yaml index f904d60a9..913e352a4 100644 --- a/codegen/data/paths.yaml +++ b/codegen/data/paths.yaml @@ -18,30 +18,12 @@ 3. Create `acs_credential`s, which are the digital means of granting access to users, such as PIN codes, mobile keys, and plastic (RFID) cards. If you are developing a mobile app to provide access for your users, you can also use [Seam's iOS and Android SDKs](https://docs.seam.co/latest/capability-guides/mobile-access/mobile-device-sdks) that pair with the Seam API to create and manage mobile keys. -/acs/systems: - title: Systems - /acs/users: title: ACS Users -/acs/entrances: - title: Entrances - -/acs/access_groups: - title: Access Groups - -/acs/credentials: - title: Credentials - -/acs/encoders: - title: Encoders - /acs/encoders/simulate: title: Encoder Simulations -/phones: - title: Phones - /phones/simulate: title: Phone Simulations @@ -99,15 +81,9 @@ --- -/noise_sensors/noise_thresholds: - title: Noise Thresholds - /noise_sensors/simulate: title: Noise Sensor Simulations -/user_identities: - title: User Identities - /access_codes: title: Access Codes include_groups: @@ -135,28 +111,10 @@ title: Spaces alpha: "**Early Access Preview.** The spaces API is currently in Alpha. We're actively developing it and seeking early feedback at [support@seam.co](mailto:support@seam.co). Expect breaking changes as we refine the design." -/connected_accounts: - title: Connected Accounts - /customers: title: Customers alpha: "**Early Access Preview.** The customers API is currently in Alpha. We're actively developing it and seeking early feedback at [support@seam.co](mailto:support@seam.co). Expect breaking changes as we refine the design." -/client_sessions: - title: Client Sessions - -/connect_webviews: - title: Connect Webviews - -/webhooks: - title: Webhooks - -/workspaces: - title: Workspaces - -/devices: - title: Devices - /devices/unmanaged: title: Unmanaged Devices @@ -200,6 +158,3 @@ /locks/simulate: title: Lock Simulations - -/instant_keys: - title: Instant Keys diff --git a/codegen/lib/reference.ts b/codegen/lib/reference.ts index ca5db7ad8..71a06d518 100644 --- a/codegen/lib/reference.ts +++ b/codegen/lib/reference.ts @@ -1,6 +1,8 @@ import type { Blueprint, Endpoint } from '@seamapi/blueprint' import type Metalsmith from 'metalsmith' +import { toCapitalCase } from 'lib/handlebars/helpers.js' + import { type ApiEndpointLayoutContext, type ApiNamespaceLayoutContext, @@ -42,6 +44,13 @@ export const reference = ( const { blueprint } = metadata + for (const { path, name } of [...blueprint.routes, ...blueprint.namespaces]) { + if (path in pathMetadata) continue + pathMetadata[path] = PathMetadataSchema.valueSchema.parse({ + title: toCapitalCase(name), + }) + } + const { resources } = blueprint const namespaces = blueprint.namespaces.filter( From 211291bf45b68820bcbf6f9abafebe86abcca91d Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 24 Jul 2025 00:44:53 +0000 Subject: [PATCH 3/9] ci: Generate docs --- docs/SUMMARY.md | 9 + docs/api/_report.md | 15 + docs/api/thermostats/daily_programs/README.md | 119 +++++++ docs/api/thermostats/daily_programs/create.md | 309 ++++++++++++++++++ docs/api/thermostats/daily_programs/delete.md | 153 +++++++++ docs/api/thermostats/daily_programs/update.md | 268 +++++++++++++++ .../enrollment_automations/README.md | 120 +++++++ .../enrollment_automations/delete.md | 32 ++ .../enrollment_automations/get.md | 33 ++ .../enrollment_automations/launch.md | 56 ++++ .../enrollment_automations/list.md | 33 ++ 11 files changed, 1147 insertions(+) create mode 100644 docs/api/thermostats/daily_programs/README.md create mode 100644 docs/api/thermostats/daily_programs/create.md create mode 100644 docs/api/thermostats/daily_programs/delete.md create mode 100644 docs/api/thermostats/daily_programs/update.md create mode 100644 docs/api/user_identities/enrollment_automations/README.md create mode 100644 docs/api/user_identities/enrollment_automations/delete.md create mode 100644 docs/api/user_identities/enrollment_automations/get.md create mode 100644 docs/api/user_identities/enrollment_automations/launch.md create mode 100644 docs/api/user_identities/enrollment_automations/list.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index f43b3fff3..277f3d747 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -326,6 +326,10 @@ * [Set to Off Mode](api/thermostats/off.md) * [Update a Climate Preset](api/thermostats/update_climate_preset.md) * [Update the Thermostat Weekly Program](api/thermostats/update_weekly_program.md) + * [Daily Programs](api/thermostats/daily_programs/README.md) + * [Create a Thermostat Daily Program](api/thermostats/daily_programs/create.md) + * [Delete a Thermostat Daily Program](api/thermostats/daily_programs/delete.md) + * [Update a Thermostat Daily Program](api/thermostats/daily_programs/update.md) * [Thermostat Schedules](api/thermostats/schedules/README.md) * [Create a Thermostat Schedule](api/thermostats/schedules/create.md) * [Delete a Thermostat Schedule](api/thermostats/schedules/delete.md) @@ -349,6 +353,11 @@ * [Remove an ACS User from a User Identity](api/user_identities/remove_acs_user.md) * [Revoke Access to a Device from a User Identity](api/user_identities/revoke_access_to_device.md) * [Update a User Identity](api/user_identities/update.md) + * [Enrollment Automations](api/user_identities/enrollment_automations/README.md) + * [Delete an Enrollment Automation](api/user_identities/enrollment_automations/delete.md) + * [Get an Enrollment Automation](api/user_identities/enrollment_automations/get.md) + * [Launch an Enrollment Automation](api/user_identities/enrollment_automations/launch.md) + * [List Enrollment Automations](api/user_identities/enrollment_automations/list.md) * [Webhooks](api/webhooks/README.md) * [Create a Webhook](api/webhooks/create.md) * [Delete a Webhook](api/webhooks/delete.md) diff --git a/docs/api/_report.md b/docs/api/_report.md index aa8d87749..8bfe1df7e 100644 --- a/docs/api/_report.md +++ b/docs/api/_report.md @@ -4,8 +4,23 @@ ### Routes +- `/acs/access_groups` +- `/acs/credentials` +- `/acs/encoders` +- `/acs/entrances` +- `/acs/systems` +- `/client_sessions` +- `/connect_webviews` +- `/connected_accounts` +- `/devices` +- `/instant_keys` +- `/noise_sensors/noise_thresholds` +- `/phones` - `/thermostats/daily_programs` +- `/user_identities` - `/user_identities/enrollment_automations` +- `/webhooks` +- `/workspaces` ## Undocumented diff --git a/docs/api/thermostats/daily_programs/README.md b/docs/api/thermostats/daily_programs/README.md new file mode 100644 index 000000000..b43bc8900 --- /dev/null +++ b/docs/api/thermostats/daily_programs/README.md @@ -0,0 +1,119 @@ +# Daily Programs + +## The thermostat_daily_program Object + +- [Properties](./#properties) +- [Endpoints](./#endpoints) + + +Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. + +{% tabs %} +{% tab title="Thermostat Daily Program" %} + +A thermostat daily program resource. + +```json +{ + "created_at": "2025-06-14T16:54:17.946642Z", + "device_id": "58437d45-47ac-4ee6-ab27-7b2d1f2947d1", + "name": "Weekday Program", + "periods": [ + { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, + { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } + ], + "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" +} +``` +{% endtab %} +{% endtabs %} + +--- +## Properties + +**`created_at`** *Datetime* + +Date and time at which the thermostat daily program was created. + + + + +--- + +**`device_id`** *UUID* + +ID of the thermostat device on which the thermostat daily program is configured. + + + + +--- + +**`name`** *String* + +User-friendly name to identify the thermostat daily program. + + + + +--- + +**`periods`** *List* *of Objects* + +Array of thermostat daily program periods. + + + +
+ Child Object Properties +climate_preset_key String + + Key of the [climate preset](../../../capability-guides/thermostats/creating-and-managing-climate-presets/README.md) to activate at the `starts_at_time`. + +starts_at_time String + + Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + +
+ +--- + +**`thermostat_daily_program_id`** *UUID* + +ID of the thermostat daily program. + + + + +--- + +**`workspace_id`** *UUID* + +ID of the [workspace](../../../core-concepts/workspaces/README.md) that contains the thermostat daily program. + + + + +--- + +## Endpoints + + +[**`/thermostats/daily_programs/create`**](./create.md) + +Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + + +[**`/thermostats/daily_programs/delete`**](./delete.md) + +Deletes a thermostat daily program. + + +[**`/thermostats/daily_programs/update`**](./update.md) + +Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + + diff --git a/docs/api/thermostats/daily_programs/create.md b/docs/api/thermostats/daily_programs/create.md new file mode 100644 index 000000000..20f59ba58 --- /dev/null +++ b/docs/api/thermostats/daily_programs/create.md @@ -0,0 +1,309 @@ +# Create a Thermostat Daily Program + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + + +{% tabs %} +{% tab title="JavaScript" %} + +Creates a new thermostat daily program. + +#### Code: + +```javascript +await seam.thermostats.dailyPrograms.create({ + device_id: "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + name: "Weekday Program", + periods: [ + { starts_at_time: "07:00:00", climate_preset_key: "Home" }, + { starts_at_time: "09:00:00", climate_preset_key: "Away" }, + { starts_at_time: "16:00:00", climate_preset_key: "Home" }, + { starts_at_time: "22:30:00", climate_preset_key: "Sleep" }, + ], +}); +``` + +#### Output: + +```javascript +{ + "created_at": "2025-06-14T16:54:17.946642Z", + "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + "name": "Weekday Program", + "periods": [ + { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, + { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } + ], + "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" +} +``` +{% endtab %} + +{% tab title="cURL" %} + +Creates a new thermostat daily program. + +#### Code: + +```curl +curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/create" \ + --header "Authorization: Bearer $SEAM_API_KEY" \ + --json @- < "2025-06-14T16:54:17.946642Z", + "device_id" => "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + "name" => "Weekday Program", + "periods" => [ + { starts_at_time: "07:00:00", climate_preset_key: "Home" }, + { starts_at_time: "09:00:00", climate_preset_key: "Away" }, + { starts_at_time: "16:00:00", climate_preset_key: "Home" }, + { starts_at_time: "22:30:00", climate_preset_key: "Sleep" }, + ], + "thermostat_daily_program_id" => "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id" => "8da8d923-e55b-45cd-84a3-6c96b3d3d454", +} +``` +{% endtab %} + +{% tab title="PHP" %} + +Creates a new thermostat daily program. + +#### Code: + +```php +$seam->thermostats->daily_programs->create( + device_id: "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + name: "Weekday Program", + periods: [ + ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"], + ["starts_at_time" => "16:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"], + ] +); +``` + +#### Output: + +```php +[ + "created_at" => "2025-06-14T16:54:17.946642Z", + "device_id" => "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + "name" => "Weekday Program", + "periods" => [ + ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"], + ["starts_at_time" => "16:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"], + ], + "thermostat_daily_program_id" => "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id" => "8da8d923-e55b-45cd-84a3-6c96b3d3d454", +]; +``` +{% endtab %} + +{% tab title="Seam CLI" %} + +Creates a new thermostat daily program. + +#### Code: + +```seam_cli +seam thermostats daily-programs create --device_id "cc2d0fb9-1f5f-410f-80f1-a64b699de82a" --name "Weekday Program" --periods [{"starts_at_time":"07:00:00","climate_preset_key":"Home"},{"starts_at_time":"09:00:00","climate_preset_key":"Away"},{"starts_at_time":"16:00:00","climate_preset_key":"Home"},{"starts_at_time":"22:30:00","climate_preset_key":"Sleep"}] +``` + +#### Output: + +```seam_cli +{ + "created_at": "2025-06-14T16:54:17.946642Z", + "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + "name": "Weekday Program", + "periods": [ + { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, + { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } + ], + "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" +} +``` +{% endtab %} + +{% endtabs %} + + +
+ +Authentication Methods + +- API key +- Client session token +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`device_id`** *String* (Required) + +ID of the thermostat device for which you want to create a daily program. + +--- + +**`name`** *String* (Required) + +Name of the thermostat daily program. + +--- + +**`periods`** *Array* *of Objects* (Required) + +Array of thermostat daily program periods. + +--- + + +## Response + +[thermostat\_daily\_program](.) + + +{% tabs %} +{% tab title="JSON" %} + + + +```json +{ + "created_at": "2025-06-14T16:54:17.946642Z", + "device_id": "58437d45-47ac-4ee6-ab27-7b2d1f2947d1", + "name": "Weekday Program", + "periods": [ + { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, + { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } + ], + "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" +} +``` +{% endtab %} +{% endtabs %} diff --git a/docs/api/thermostats/daily_programs/delete.md b/docs/api/thermostats/daily_programs/delete.md new file mode 100644 index 000000000..e8212972e --- /dev/null +++ b/docs/api/thermostats/daily_programs/delete.md @@ -0,0 +1,153 @@ +# Delete a Thermostat Daily Program + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Deletes a thermostat daily program. + + +{% tabs %} +{% tab title="JavaScript" %} + +Deletes a thermostat daily program. + +#### Code: + +```javascript +await seam.thermostats.dailyPrograms.delete({ + thermostat_daily_program_id: "a8665859-629e-4696-88b1-1eda1976250a", +}); +``` + +#### Output: + +```javascript +// void +``` +{% endtab %} + +{% tab title="cURL" %} + +Deletes a thermostat daily program. + +#### Code: + +```curl +curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/delete" \ + --header "Authorization: Bearer $SEAM_API_KEY" \ + --json @- <thermostats->daily_programs->delete( + thermostat_daily_program_id: "a8665859-629e-4696-88b1-1eda1976250a" +); +``` + +#### Output: + +```php + +``` +{% endtab %} + +{% tab title="Seam CLI" %} + +Deletes a thermostat daily program. + +#### Code: + +```seam_cli +seam thermostats daily-programs delete --thermostat_daily_program_id "a8665859-629e-4696-88b1-1eda1976250a" +``` + +#### Output: + +```seam_cli +{} +``` +{% endtab %} + +{% endtabs %} + + +
+ +Authentication Methods + +- API key +- Client session token +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`thermostat_daily_program_id`** *String* (Required) + +ID of the thermostat daily program that you want to delete. + +--- + + +## Response + +void + diff --git a/docs/api/thermostats/daily_programs/update.md b/docs/api/thermostats/daily_programs/update.md new file mode 100644 index 000000000..8ea56b81f --- /dev/null +++ b/docs/api/thermostats/daily_programs/update.md @@ -0,0 +1,268 @@ +# Update a Thermostat Daily Program + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + + +{% tabs %} +{% tab title="JavaScript" %} + +Updates a specified thermostat daily program. + +#### Code: + +```javascript +await seam.thermostats.dailyPrograms.update({ + thermostat_daily_program_id: "6baf3a53-ba83-4052-8ea5-143584e18f03", + name: "Weekday Program", + periods: [ + { starts_at_time: "07:00:00", climate_preset_key: "Home" }, + { starts_at_time: "09:00:00", climate_preset_key: "Away" }, + { starts_at_time: "17:00:00", climate_preset_key: "Home" }, + { starts_at_time: "22:30:00", climate_preset_key: "Sleep" }, + ], +}); +``` + +#### Output: + +```javascript +{ + "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type": "PUSH_THERMOSTAT_PROGRAMS", + "error": null, + "result": {}, + "status": "success" +} +``` +{% endtab %} + +{% tab title="cURL" %} + +Updates a specified thermostat daily program. + +#### Code: + +```curl +curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/update" \ + --header "Authorization: Bearer $SEAM_API_KEY" \ + --json @- < "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type" => "PUSH_THERMOSTAT_PROGRAMS", + "error" => nil, + "result" => { + }, + "status" => "success", +} +``` +{% endtab %} + +{% tab title="PHP" %} + +Updates a specified thermostat daily program. + +#### Code: + +```php +$seam->thermostats->daily_programs->update( + thermostat_daily_program_id: "6baf3a53-ba83-4052-8ea5-143584e18f03", + name: "Weekday Program", + periods: [ + ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"], + ["starts_at_time" => "17:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"], + ] +); +``` + +#### Output: + +```php +[ + "action_attempt_id" => "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type" => "PUSH_THERMOSTAT_PROGRAMS", + "error" => null, + "result" => [], + "status" => "success", +]; +``` +{% endtab %} + +{% tab title="Seam CLI" %} + +Updates a specified thermostat daily program. + +#### Code: + +```seam_cli +seam thermostats daily-programs update --thermostat_daily_program_id "6baf3a53-ba83-4052-8ea5-143584e18f03" --name "Weekday Program" --periods [{"starts_at_time":"07:00:00","climate_preset_key":"Home"},{"starts_at_time":"09:00:00","climate_preset_key":"Away"},{"starts_at_time":"17:00:00","climate_preset_key":"Home"},{"starts_at_time":"22:30:00","climate_preset_key":"Sleep"}] +``` + +#### Output: + +```seam_cli +{ + "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type": "PUSH_THERMOSTAT_PROGRAMS", + "error": null, + "result": {}, + "status": "success" +} +``` +{% endtab %} + +{% endtabs %} + + +
+ +Authentication Methods + +- API key +- Client session token +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`name`** *String* (Required) + +Name of the thermostat daily program that you want to update. + +--- + +**`periods`** *Array* *of Objects* (Required) + +Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program. + +--- + +**`thermostat_daily_program_id`** *String* (Required) + +ID of the thermostat daily program that you want to update. + +--- + + +## Response + +[action\_attempt](./) + + +{% tabs %} +{% tab title="JSON" %} + + + +```json +{ + "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type": "PUSH_THERMOSTAT_PROGRAMS", + "error": null, + "result": {}, + "status": "success" +} +``` +{% endtab %} +{% endtabs %} diff --git a/docs/api/user_identities/enrollment_automations/README.md b/docs/api/user_identities/enrollment_automations/README.md new file mode 100644 index 000000000..e63f3305f --- /dev/null +++ b/docs/api/user_identities/enrollment_automations/README.md @@ -0,0 +1,120 @@ +# Enrollment Automations + +## The enrollment_automation Object + +- [Properties](./#properties) +- [Events](./#events) +- [Endpoints](./#endpoints) + + +Represents an [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) within the [Seam mobile access solution](../../../capability-guides/mobile-access/README.md). + +--- +## Properties + +**`created_at`** *Datetime* + +Date and time at which the enrollment automation was created. + + + + +--- + +**`credential_manager_acs_system_id`** *UUID* + +ID of the associated [ACS system](https://docs.seam.co/latest/capability-guides/access-systems) that serves as the credential manager. + + + + +--- + +**`enrollment_automation_id`** *UUID* + +ID of the enrollment automation. + + + + +--- + +**`user_identity_id`** *UUID* + +ID of the associated [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity). + + + + +--- + +**`workspace_id`** *UUID* + +ID of the [workspace](../../../core-concepts/workspaces/README.md) that contains the enrollment automation. + + + + +--- + + +## Events + +**`enrollment_automation.deleted`** + +An [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md#prepare-the-phones-for-a-user-identity-to-start-receiving-mobile-credentials-using-an-enrollment-aut) was deleted. + +
+ +Properties + +created_at Datetime + + Date and time at which the event was created. + +enrollment_automation_id UUID + + ID of the affected enrollment automation. + +event_id UUID + + ID of the event. + +event_type Enum + + Value: `enrollment_automation.deleted` + +occurred_at Datetime + + Date and time at which the event occurred. + +workspace_id UUID + + ID of the [workspace](../../../core-concepts/workspaces/README.md) associated with the event. +
+ +--- + +## Endpoints + + +[**`/user_identities/enrollment_automations/delete`**](./delete.md) + +Deletes a specified [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md). You must delete all enrollment automations associated with a [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity) before [deleting the user identity](https://docs.seam.co/latest/api/user_identities/delete). + + +[**`/user_identities/enrollment_automations/get`**](./get.md) + +Returns a specified [enrollment automation](https://docs.seam.co/latest/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system/). + + +[**`/user_identities/enrollment_automations/launch`**](./launch.md) + +Sets up a new [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) for a specified [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity) with a specified [credential manager](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md). + + +[**`/user_identities/enrollment_automations/list`**](./list.md) + +Returns a list of all [enrollment automations](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) for a specified [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity). + + diff --git a/docs/api/user_identities/enrollment_automations/delete.md b/docs/api/user_identities/enrollment_automations/delete.md new file mode 100644 index 000000000..0e5630797 --- /dev/null +++ b/docs/api/user_identities/enrollment_automations/delete.md @@ -0,0 +1,32 @@ +# Delete an Enrollment Automation + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Deletes a specified [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md). You must delete all enrollment automations associated with a [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity) before [deleting the user identity](https://docs.seam.co/latest/api/user_identities/delete). + + +
+ +Authentication Methods + +- API key +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`enrollment_automation_id`** *String* (Required) + +ID of the enrollment automation that you want to delete. + +--- + + +## Response + +void + diff --git a/docs/api/user_identities/enrollment_automations/get.md b/docs/api/user_identities/enrollment_automations/get.md new file mode 100644 index 000000000..796498e8a --- /dev/null +++ b/docs/api/user_identities/enrollment_automations/get.md @@ -0,0 +1,33 @@ +# Get an Enrollment Automation + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Returns a specified [enrollment automation](https://docs.seam.co/latest/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system/). + + +
+ +Authentication Methods + +- API key +- Client session token +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`enrollment_automation_id`** *String* (Required) + +ID of the enrollment automation that you want to get. + +--- + + +## Response + +[enrollment\_automation](.) + diff --git a/docs/api/user_identities/enrollment_automations/launch.md b/docs/api/user_identities/enrollment_automations/launch.md new file mode 100644 index 000000000..7726af806 --- /dev/null +++ b/docs/api/user_identities/enrollment_automations/launch.md @@ -0,0 +1,56 @@ +# Launch an Enrollment Automation + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Sets up a new [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) for a specified [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity) with a specified [credential manager](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md). + + +
+ +Authentication Methods + +- API key +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`credential_manager_acs_system_id`** *String* (Required) + +ID of the desired access system that serves as the credential manager for the enrollment automation. + +--- + +**`user_identity_id`** *String* (Required) + +ID of the user identity for which you want to launch an enrollment automation. + +--- + +**`acs_credential_pool_id`** *String* + +ID of the credential pool from which to obtain credentials for the user identity. + +--- + +**`create_credential_manager_user`** *Boolean* + +Indicates whether to create an associated credential manager user. If you set `create_credential_manager_user` to `true`, you cannot specify a `credential_manager_acs_user_id`. + +--- + +**`credential_manager_acs_user_id`** *String* + +ID of the associated access system user within the credential manager. If you specify a `credential_manager_acs_user_id`, you cannot set `create_credential_manager_user` to `true`. + +--- + + +## Response + +[enrollment\_automation](.) + diff --git a/docs/api/user_identities/enrollment_automations/list.md b/docs/api/user_identities/enrollment_automations/list.md new file mode 100644 index 000000000..d0451702a --- /dev/null +++ b/docs/api/user_identities/enrollment_automations/list.md @@ -0,0 +1,33 @@ +# List Enrollment Automations + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Returns a list of all [enrollment automations](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) for a specified [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity). + + +
+ +Authentication Methods + +- API key +- Client session token +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`user_identity_id`** *String* (Required) + +ID of the user identity for which you want to retrieve enrollment automations. + +--- + + +## Response + +Array of [enrollment\_automations](.) + From 0be86f4ed36f9cdc1b0461a69f461e107e0ab9ba Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 24 Jul 2025 02:11:58 +0000 Subject: [PATCH 4/9] ci: Generate docs --- docs/SUMMARY.md | 10 - docs/api/_report.md | 20 ++ docs/api/thermostats/daily_programs/README.md | 119 ------- docs/api/thermostats/daily_programs/create.md | 309 ------------------ docs/api/thermostats/daily_programs/delete.md | 153 --------- docs/api/thermostats/daily_programs/update.md | 268 --------------- .../enrollment_automations/README.md | 120 ------- .../enrollment_automations/delete.md | 32 -- .../enrollment_automations/get.md | 33 -- .../enrollment_automations/launch.md | 56 ---- .../enrollment_automations/list.md | 33 -- 11 files changed, 20 insertions(+), 1133 deletions(-) delete mode 100644 docs/api/thermostats/daily_programs/README.md delete mode 100644 docs/api/thermostats/daily_programs/create.md delete mode 100644 docs/api/thermostats/daily_programs/delete.md delete mode 100644 docs/api/thermostats/daily_programs/update.md delete mode 100644 docs/api/user_identities/enrollment_automations/README.md delete mode 100644 docs/api/user_identities/enrollment_automations/delete.md delete mode 100644 docs/api/user_identities/enrollment_automations/get.md delete mode 100644 docs/api/user_identities/enrollment_automations/launch.md delete mode 100644 docs/api/user_identities/enrollment_automations/list.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 277f3d747..afd57906b 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -325,11 +325,6 @@ * [Set to Heat-Cool (Auto) Mode](api/thermostats/heat_cool.md) * [Set to Off Mode](api/thermostats/off.md) * [Update a Climate Preset](api/thermostats/update_climate_preset.md) - * [Update the Thermostat Weekly Program](api/thermostats/update_weekly_program.md) - * [Daily Programs](api/thermostats/daily_programs/README.md) - * [Create a Thermostat Daily Program](api/thermostats/daily_programs/create.md) - * [Delete a Thermostat Daily Program](api/thermostats/daily_programs/delete.md) - * [Update a Thermostat Daily Program](api/thermostats/daily_programs/update.md) * [Thermostat Schedules](api/thermostats/schedules/README.md) * [Create a Thermostat Schedule](api/thermostats/schedules/create.md) * [Delete a Thermostat Schedule](api/thermostats/schedules/delete.md) @@ -353,11 +348,6 @@ * [Remove an ACS User from a User Identity](api/user_identities/remove_acs_user.md) * [Revoke Access to a Device from a User Identity](api/user_identities/revoke_access_to_device.md) * [Update a User Identity](api/user_identities/update.md) - * [Enrollment Automations](api/user_identities/enrollment_automations/README.md) - * [Delete an Enrollment Automation](api/user_identities/enrollment_automations/delete.md) - * [Get an Enrollment Automation](api/user_identities/enrollment_automations/get.md) - * [Launch an Enrollment Automation](api/user_identities/enrollment_automations/launch.md) - * [List Enrollment Automations](api/user_identities/enrollment_automations/list.md) * [Webhooks](api/webhooks/README.md) * [Create a Webhook](api/webhooks/create.md) * [Delete a Webhook](api/webhooks/delete.md) diff --git a/docs/api/_report.md b/docs/api/_report.md index d18f33266..8ddb7f23f 100644 --- a/docs/api/_report.md +++ b/docs/api/_report.md @@ -1,5 +1,25 @@ # Documentation Report +## Untitled + +### Routes + +- `/acs/access_groups` +- `/acs/credentials` +- `/acs/encoders` +- `/acs/entrances` +- `/acs/systems` +- `/client_sessions` +- `/connect_webviews` +- `/connected_accounts` +- `/devices` +- `/instant_keys` +- `/noise_sensors/noise_thresholds` +- `/phones` +- `/user_identities` +- `/webhooks` +- `/workspaces` + ## Undocumented These items are intentionally undocumented. diff --git a/docs/api/thermostats/daily_programs/README.md b/docs/api/thermostats/daily_programs/README.md deleted file mode 100644 index b43bc8900..000000000 --- a/docs/api/thermostats/daily_programs/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# Daily Programs - -## The thermostat_daily_program Object - -- [Properties](./#properties) -- [Endpoints](./#endpoints) - - -Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. - -{% tabs %} -{% tab title="Thermostat Daily Program" %} - -A thermostat daily program resource. - -```json -{ - "created_at": "2025-06-14T16:54:17.946642Z", - "device_id": "58437d45-47ac-4ee6-ab27-7b2d1f2947d1", - "name": "Weekday Program", - "periods": [ - { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, - { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, - { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, - { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } - ], - "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", - "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" -} -``` -{% endtab %} -{% endtabs %} - ---- -## Properties - -**`created_at`** *Datetime* - -Date and time at which the thermostat daily program was created. - - - - ---- - -**`device_id`** *UUID* - -ID of the thermostat device on which the thermostat daily program is configured. - - - - ---- - -**`name`** *String* - -User-friendly name to identify the thermostat daily program. - - - - ---- - -**`periods`** *List* *of Objects* - -Array of thermostat daily program periods. - - - -
- Child Object Properties -climate_preset_key String - - Key of the [climate preset](../../../capability-guides/thermostats/creating-and-managing-climate-presets/README.md) to activate at the `starts_at_time`. - -starts_at_time String - - Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - -
- ---- - -**`thermostat_daily_program_id`** *UUID* - -ID of the thermostat daily program. - - - - ---- - -**`workspace_id`** *UUID* - -ID of the [workspace](../../../core-concepts/workspaces/README.md) that contains the thermostat daily program. - - - - ---- - -## Endpoints - - -[**`/thermostats/daily_programs/create`**](./create.md) - -Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. - - -[**`/thermostats/daily_programs/delete`**](./delete.md) - -Deletes a thermostat daily program. - - -[**`/thermostats/daily_programs/update`**](./update.md) - -Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. - - diff --git a/docs/api/thermostats/daily_programs/create.md b/docs/api/thermostats/daily_programs/create.md deleted file mode 100644 index 20f59ba58..000000000 --- a/docs/api/thermostats/daily_programs/create.md +++ /dev/null @@ -1,309 +0,0 @@ -# Create a Thermostat Daily Program - -- [Request Parameters](#request-parameters) -- [Response](#response) - -Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. - - -{% tabs %} -{% tab title="JavaScript" %} - -Creates a new thermostat daily program. - -#### Code: - -```javascript -await seam.thermostats.dailyPrograms.create({ - device_id: "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", - name: "Weekday Program", - periods: [ - { starts_at_time: "07:00:00", climate_preset_key: "Home" }, - { starts_at_time: "09:00:00", climate_preset_key: "Away" }, - { starts_at_time: "16:00:00", climate_preset_key: "Home" }, - { starts_at_time: "22:30:00", climate_preset_key: "Sleep" }, - ], -}); -``` - -#### Output: - -```javascript -{ - "created_at": "2025-06-14T16:54:17.946642Z", - "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", - "name": "Weekday Program", - "periods": [ - { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, - { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, - { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, - { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } - ], - "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", - "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" -} -``` -{% endtab %} - -{% tab title="cURL" %} - -Creates a new thermostat daily program. - -#### Code: - -```curl -curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/create" \ - --header "Authorization: Bearer $SEAM_API_KEY" \ - --json @- < "2025-06-14T16:54:17.946642Z", - "device_id" => "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", - "name" => "Weekday Program", - "periods" => [ - { starts_at_time: "07:00:00", climate_preset_key: "Home" }, - { starts_at_time: "09:00:00", climate_preset_key: "Away" }, - { starts_at_time: "16:00:00", climate_preset_key: "Home" }, - { starts_at_time: "22:30:00", climate_preset_key: "Sleep" }, - ], - "thermostat_daily_program_id" => "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", - "workspace_id" => "8da8d923-e55b-45cd-84a3-6c96b3d3d454", -} -``` -{% endtab %} - -{% tab title="PHP" %} - -Creates a new thermostat daily program. - -#### Code: - -```php -$seam->thermostats->daily_programs->create( - device_id: "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", - name: "Weekday Program", - periods: [ - ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"], - ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"], - ["starts_at_time" => "16:00:00", "climate_preset_key" => "Home"], - ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"], - ] -); -``` - -#### Output: - -```php -[ - "created_at" => "2025-06-14T16:54:17.946642Z", - "device_id" => "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", - "name" => "Weekday Program", - "periods" => [ - ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"], - ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"], - ["starts_at_time" => "16:00:00", "climate_preset_key" => "Home"], - ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"], - ], - "thermostat_daily_program_id" => "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", - "workspace_id" => "8da8d923-e55b-45cd-84a3-6c96b3d3d454", -]; -``` -{% endtab %} - -{% tab title="Seam CLI" %} - -Creates a new thermostat daily program. - -#### Code: - -```seam_cli -seam thermostats daily-programs create --device_id "cc2d0fb9-1f5f-410f-80f1-a64b699de82a" --name "Weekday Program" --periods [{"starts_at_time":"07:00:00","climate_preset_key":"Home"},{"starts_at_time":"09:00:00","climate_preset_key":"Away"},{"starts_at_time":"16:00:00","climate_preset_key":"Home"},{"starts_at_time":"22:30:00","climate_preset_key":"Sleep"}] -``` - -#### Output: - -```seam_cli -{ - "created_at": "2025-06-14T16:54:17.946642Z", - "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", - "name": "Weekday Program", - "periods": [ - { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, - { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, - { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, - { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } - ], - "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", - "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" -} -``` -{% endtab %} - -{% endtabs %} - - -
- -Authentication Methods - -- API key -- Client session token -- Personal access token -
Must also include the `seam-workspace` header in the request. - -To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). -
- -## Request Parameters - -**`device_id`** *String* (Required) - -ID of the thermostat device for which you want to create a daily program. - ---- - -**`name`** *String* (Required) - -Name of the thermostat daily program. - ---- - -**`periods`** *Array* *of Objects* (Required) - -Array of thermostat daily program periods. - ---- - - -## Response - -[thermostat\_daily\_program](.) - - -{% tabs %} -{% tab title="JSON" %} - - - -```json -{ - "created_at": "2025-06-14T16:54:17.946642Z", - "device_id": "58437d45-47ac-4ee6-ab27-7b2d1f2947d1", - "name": "Weekday Program", - "periods": [ - { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, - { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, - { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, - { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } - ], - "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", - "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" -} -``` -{% endtab %} -{% endtabs %} diff --git a/docs/api/thermostats/daily_programs/delete.md b/docs/api/thermostats/daily_programs/delete.md deleted file mode 100644 index e8212972e..000000000 --- a/docs/api/thermostats/daily_programs/delete.md +++ /dev/null @@ -1,153 +0,0 @@ -# Delete a Thermostat Daily Program - -- [Request Parameters](#request-parameters) -- [Response](#response) - -Deletes a thermostat daily program. - - -{% tabs %} -{% tab title="JavaScript" %} - -Deletes a thermostat daily program. - -#### Code: - -```javascript -await seam.thermostats.dailyPrograms.delete({ - thermostat_daily_program_id: "a8665859-629e-4696-88b1-1eda1976250a", -}); -``` - -#### Output: - -```javascript -// void -``` -{% endtab %} - -{% tab title="cURL" %} - -Deletes a thermostat daily program. - -#### Code: - -```curl -curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/delete" \ - --header "Authorization: Bearer $SEAM_API_KEY" \ - --json @- <thermostats->daily_programs->delete( - thermostat_daily_program_id: "a8665859-629e-4696-88b1-1eda1976250a" -); -``` - -#### Output: - -```php - -``` -{% endtab %} - -{% tab title="Seam CLI" %} - -Deletes a thermostat daily program. - -#### Code: - -```seam_cli -seam thermostats daily-programs delete --thermostat_daily_program_id "a8665859-629e-4696-88b1-1eda1976250a" -``` - -#### Output: - -```seam_cli -{} -``` -{% endtab %} - -{% endtabs %} - - -
- -Authentication Methods - -- API key -- Client session token -- Personal access token -
Must also include the `seam-workspace` header in the request. - -To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). -
- -## Request Parameters - -**`thermostat_daily_program_id`** *String* (Required) - -ID of the thermostat daily program that you want to delete. - ---- - - -## Response - -void - diff --git a/docs/api/thermostats/daily_programs/update.md b/docs/api/thermostats/daily_programs/update.md deleted file mode 100644 index 8ea56b81f..000000000 --- a/docs/api/thermostats/daily_programs/update.md +++ /dev/null @@ -1,268 +0,0 @@ -# Update a Thermostat Daily Program - -- [Request Parameters](#request-parameters) -- [Response](#response) - -Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. - - -{% tabs %} -{% tab title="JavaScript" %} - -Updates a specified thermostat daily program. - -#### Code: - -```javascript -await seam.thermostats.dailyPrograms.update({ - thermostat_daily_program_id: "6baf3a53-ba83-4052-8ea5-143584e18f03", - name: "Weekday Program", - periods: [ - { starts_at_time: "07:00:00", climate_preset_key: "Home" }, - { starts_at_time: "09:00:00", climate_preset_key: "Away" }, - { starts_at_time: "17:00:00", climate_preset_key: "Home" }, - { starts_at_time: "22:30:00", climate_preset_key: "Sleep" }, - ], -}); -``` - -#### Output: - -```javascript -{ - "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", - "action_type": "PUSH_THERMOSTAT_PROGRAMS", - "error": null, - "result": {}, - "status": "success" -} -``` -{% endtab %} - -{% tab title="cURL" %} - -Updates a specified thermostat daily program. - -#### Code: - -```curl -curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/update" \ - --header "Authorization: Bearer $SEAM_API_KEY" \ - --json @- < "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", - "action_type" => "PUSH_THERMOSTAT_PROGRAMS", - "error" => nil, - "result" => { - }, - "status" => "success", -} -``` -{% endtab %} - -{% tab title="PHP" %} - -Updates a specified thermostat daily program. - -#### Code: - -```php -$seam->thermostats->daily_programs->update( - thermostat_daily_program_id: "6baf3a53-ba83-4052-8ea5-143584e18f03", - name: "Weekday Program", - periods: [ - ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"], - ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"], - ["starts_at_time" => "17:00:00", "climate_preset_key" => "Home"], - ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"], - ] -); -``` - -#### Output: - -```php -[ - "action_attempt_id" => "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", - "action_type" => "PUSH_THERMOSTAT_PROGRAMS", - "error" => null, - "result" => [], - "status" => "success", -]; -``` -{% endtab %} - -{% tab title="Seam CLI" %} - -Updates a specified thermostat daily program. - -#### Code: - -```seam_cli -seam thermostats daily-programs update --thermostat_daily_program_id "6baf3a53-ba83-4052-8ea5-143584e18f03" --name "Weekday Program" --periods [{"starts_at_time":"07:00:00","climate_preset_key":"Home"},{"starts_at_time":"09:00:00","climate_preset_key":"Away"},{"starts_at_time":"17:00:00","climate_preset_key":"Home"},{"starts_at_time":"22:30:00","climate_preset_key":"Sleep"}] -``` - -#### Output: - -```seam_cli -{ - "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", - "action_type": "PUSH_THERMOSTAT_PROGRAMS", - "error": null, - "result": {}, - "status": "success" -} -``` -{% endtab %} - -{% endtabs %} - - -
- -Authentication Methods - -- API key -- Client session token -- Personal access token -
Must also include the `seam-workspace` header in the request. - -To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). -
- -## Request Parameters - -**`name`** *String* (Required) - -Name of the thermostat daily program that you want to update. - ---- - -**`periods`** *Array* *of Objects* (Required) - -Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program. - ---- - -**`thermostat_daily_program_id`** *String* (Required) - -ID of the thermostat daily program that you want to update. - ---- - - -## Response - -[action\_attempt](./) - - -{% tabs %} -{% tab title="JSON" %} - - - -```json -{ - "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", - "action_type": "PUSH_THERMOSTAT_PROGRAMS", - "error": null, - "result": {}, - "status": "success" -} -``` -{% endtab %} -{% endtabs %} diff --git a/docs/api/user_identities/enrollment_automations/README.md b/docs/api/user_identities/enrollment_automations/README.md deleted file mode 100644 index e63f3305f..000000000 --- a/docs/api/user_identities/enrollment_automations/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# Enrollment Automations - -## The enrollment_automation Object - -- [Properties](./#properties) -- [Events](./#events) -- [Endpoints](./#endpoints) - - -Represents an [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) within the [Seam mobile access solution](../../../capability-guides/mobile-access/README.md). - ---- -## Properties - -**`created_at`** *Datetime* - -Date and time at which the enrollment automation was created. - - - - ---- - -**`credential_manager_acs_system_id`** *UUID* - -ID of the associated [ACS system](https://docs.seam.co/latest/capability-guides/access-systems) that serves as the credential manager. - - - - ---- - -**`enrollment_automation_id`** *UUID* - -ID of the enrollment automation. - - - - ---- - -**`user_identity_id`** *UUID* - -ID of the associated [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity). - - - - ---- - -**`workspace_id`** *UUID* - -ID of the [workspace](../../../core-concepts/workspaces/README.md) that contains the enrollment automation. - - - - ---- - - -## Events - -**`enrollment_automation.deleted`** - -An [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md#prepare-the-phones-for-a-user-identity-to-start-receiving-mobile-credentials-using-an-enrollment-aut) was deleted. - -
- -Properties - -created_at Datetime - - Date and time at which the event was created. - -enrollment_automation_id UUID - - ID of the affected enrollment automation. - -event_id UUID - - ID of the event. - -event_type Enum - - Value: `enrollment_automation.deleted` - -occurred_at Datetime - - Date and time at which the event occurred. - -workspace_id UUID - - ID of the [workspace](../../../core-concepts/workspaces/README.md) associated with the event. -
- ---- - -## Endpoints - - -[**`/user_identities/enrollment_automations/delete`**](./delete.md) - -Deletes a specified [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md). You must delete all enrollment automations associated with a [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity) before [deleting the user identity](https://docs.seam.co/latest/api/user_identities/delete). - - -[**`/user_identities/enrollment_automations/get`**](./get.md) - -Returns a specified [enrollment automation](https://docs.seam.co/latest/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system/). - - -[**`/user_identities/enrollment_automations/launch`**](./launch.md) - -Sets up a new [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) for a specified [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity) with a specified [credential manager](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md). - - -[**`/user_identities/enrollment_automations/list`**](./list.md) - -Returns a list of all [enrollment automations](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) for a specified [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity). - - diff --git a/docs/api/user_identities/enrollment_automations/delete.md b/docs/api/user_identities/enrollment_automations/delete.md deleted file mode 100644 index 0e5630797..000000000 --- a/docs/api/user_identities/enrollment_automations/delete.md +++ /dev/null @@ -1,32 +0,0 @@ -# Delete an Enrollment Automation - -- [Request Parameters](#request-parameters) -- [Response](#response) - -Deletes a specified [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md). You must delete all enrollment automations associated with a [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity) before [deleting the user identity](https://docs.seam.co/latest/api/user_identities/delete). - - -
- -Authentication Methods - -- API key -- Personal access token -
Must also include the `seam-workspace` header in the request. - -To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). -
- -## Request Parameters - -**`enrollment_automation_id`** *String* (Required) - -ID of the enrollment automation that you want to delete. - ---- - - -## Response - -void - diff --git a/docs/api/user_identities/enrollment_automations/get.md b/docs/api/user_identities/enrollment_automations/get.md deleted file mode 100644 index 796498e8a..000000000 --- a/docs/api/user_identities/enrollment_automations/get.md +++ /dev/null @@ -1,33 +0,0 @@ -# Get an Enrollment Automation - -- [Request Parameters](#request-parameters) -- [Response](#response) - -Returns a specified [enrollment automation](https://docs.seam.co/latest/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system/). - - -
- -Authentication Methods - -- API key -- Client session token -- Personal access token -
Must also include the `seam-workspace` header in the request. - -To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). -
- -## Request Parameters - -**`enrollment_automation_id`** *String* (Required) - -ID of the enrollment automation that you want to get. - ---- - - -## Response - -[enrollment\_automation](.) - diff --git a/docs/api/user_identities/enrollment_automations/launch.md b/docs/api/user_identities/enrollment_automations/launch.md deleted file mode 100644 index 7726af806..000000000 --- a/docs/api/user_identities/enrollment_automations/launch.md +++ /dev/null @@ -1,56 +0,0 @@ -# Launch an Enrollment Automation - -- [Request Parameters](#request-parameters) -- [Response](#response) - -Sets up a new [enrollment automation](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) for a specified [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity) with a specified [credential manager](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md). - - -
- -Authentication Methods - -- API key -- Personal access token -
Must also include the `seam-workspace` header in the request. - -To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). -
- -## Request Parameters - -**`credential_manager_acs_system_id`** *String* (Required) - -ID of the desired access system that serves as the credential manager for the enrollment automation. - ---- - -**`user_identity_id`** *String* (Required) - -ID of the user identity for which you want to launch an enrollment automation. - ---- - -**`acs_credential_pool_id`** *String* - -ID of the credential pool from which to obtain credentials for the user identity. - ---- - -**`create_credential_manager_user`** *Boolean* - -Indicates whether to create an associated credential manager user. If you set `create_credential_manager_user` to `true`, you cannot specify a `credential_manager_acs_user_id`. - ---- - -**`credential_manager_acs_user_id`** *String* - -ID of the associated access system user within the credential manager. If you specify a `credential_manager_acs_user_id`, you cannot set `create_credential_manager_user` to `true`. - ---- - - -## Response - -[enrollment\_automation](.) - diff --git a/docs/api/user_identities/enrollment_automations/list.md b/docs/api/user_identities/enrollment_automations/list.md deleted file mode 100644 index d0451702a..000000000 --- a/docs/api/user_identities/enrollment_automations/list.md +++ /dev/null @@ -1,33 +0,0 @@ -# List Enrollment Automations - -- [Request Parameters](#request-parameters) -- [Response](#response) - -Returns a list of all [enrollment automations](../../../capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system.md) for a specified [user identity](../../../capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities.md#what-is-a-user-identity). - - -
- -Authentication Methods - -- API key -- Client session token -- Personal access token -
Must also include the `seam-workspace` header in the request. - -To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). -
- -## Request Parameters - -**`user_identity_id`** *String* (Required) - -ID of the user identity for which you want to retrieve enrollment automations. - ---- - - -## Response - -Array of [enrollment\_automations](.) - From 6885dc5220574241bec18ee49ab447adaf342686 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Wed, 23 Jul 2025 19:15:32 -0700 Subject: [PATCH 5/9] Remove untitled namespaces and routes from report --- codegen/layouts/report.hbs | 16 ---------------- codegen/lib/report.ts | 21 --------------------- 2 files changed, 37 deletions(-) diff --git a/codegen/layouts/report.hbs b/codegen/layouts/report.hbs index 082603ba2..b2e8cb6d9 100644 --- a/codegen/layouts/report.hbs +++ b/codegen/layouts/report.hbs @@ -2,22 +2,6 @@ {{#if (or noTitle.routes.length noTitle.endpoints.length noTitle.namespaces.length )}} ## Untitled -{{#if noTitle.namespaces.length }} - -### Namespaces - -{{#each noTitle.namespaces}} -- `{{name}}` -{{/each}} -{{/if}} -{{#if noTitle.routes.length }} - -### Routes - -{{#each noTitle.routes}} -- `{{name}}` -{{/each}} -{{/if}} {{#if noTitle.endpoints.length }} ### Endpoints diff --git a/codegen/lib/report.ts b/codegen/lib/report.ts index b7457ed91..89407c09f 100644 --- a/codegen/lib/report.ts +++ b/codegen/lib/report.ts @@ -119,13 +119,6 @@ function generateReport(metadata: Metadata): Report { } for (const namespace of blueprint.namespaces ?? []) { - if ( - !namespace.isUndocumented && - pathMetadata[namespace.path]?.title == null - ) { - addUntitledNamespaceToReport(namespace.path, report) - } - processNamespace(namespace, report) } @@ -294,25 +287,11 @@ function processRoute(route: Route, report: Report, metadata: Metadata): void { ? PathMetadataSchema.parse(metadata.pathMetadata) : {} - if (pathMetadata[route.path]?.title == null && !route.isUndocumented) { - report.noTitle.routes.push({ name: route.path }) - } - - // TODO: route description - for (const endpoint of route.endpoints) { processEndpoint(endpoint, report) } } -const addUntitledNamespaceToReport = ( - namespace: string, - report: Report, -): void => { - if (report.noTitle.namespaces.some((n) => n.name === namespace)) return - report.noTitle.namespaces.push({ name: namespace }) -} - function processNamespace(namespace: Namespace, report: Report): void { const addNamespace = (section: ReportItem[], reason: string): void => { if (section.some((item) => item.name === namespace.path)) return From 53f795bc75300d6b94871f7c1d90fc42e075461f Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Wed, 23 Jul 2025 19:26:09 -0700 Subject: [PATCH 6/9] Fix linter error --- codegen/lib/report.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/codegen/lib/report.ts b/codegen/lib/report.ts index 89407c09f..b7118a697 100644 --- a/codegen/lib/report.ts +++ b/codegen/lib/report.ts @@ -12,8 +12,6 @@ import type { import { openapi } from '@seamapi/types/connect' import type Metalsmith from 'metalsmith' -import { PathMetadataSchema } from './path-metadata.js' - const defaultDeprecatedMessage = 'No deprecated message provided' const defaultDraftMessage = 'No draft message provided' const defaultUndocumentedMessage = 'No undocumented message provided' @@ -108,11 +106,6 @@ function generateReport(metadata: Metadata): Report { }, } - const pathMetadata = - 'pathMetadata' in metadata - ? PathMetadataSchema.parse(metadata.pathMetadata) - : {} - const routes = blueprint.routes ?? [] for (const route of routes) { processRoute(route, report, metadata) @@ -260,7 +253,7 @@ function processProperty( } } -function processRoute(route: Route, report: Report, metadata: Metadata): void { +function processRoute(route: Route, report: Report): void { if (route.isUndocumented) { report.undocumented.routes.push({ name: route.path, @@ -282,11 +275,6 @@ function processRoute(route: Route, report: Report, metadata: Metadata): void { }) } - const pathMetadata = - 'pathMetadata' in metadata - ? PathMetadataSchema.parse(metadata.pathMetadata) - : {} - for (const endpoint of route.endpoints) { processEndpoint(endpoint, report) } From 890056959c7e8166503516eded1668dcfd96df8a Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 24 Jul 2025 02:28:03 +0000 Subject: [PATCH 7/9] ci: Generate docs --- docs/api/_report.md | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/docs/api/_report.md b/docs/api/_report.md index 8ddb7f23f..d18f33266 100644 --- a/docs/api/_report.md +++ b/docs/api/_report.md @@ -1,25 +1,5 @@ # Documentation Report -## Untitled - -### Routes - -- `/acs/access_groups` -- `/acs/credentials` -- `/acs/encoders` -- `/acs/entrances` -- `/acs/systems` -- `/client_sessions` -- `/connect_webviews` -- `/connected_accounts` -- `/devices` -- `/instant_keys` -- `/noise_sensors/noise_thresholds` -- `/phones` -- `/user_identities` -- `/webhooks` -- `/workspaces` - ## Undocumented These items are intentionally undocumented. From c7e4b5387d9a4511a19950850b56fba78892a2ad Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Wed, 23 Jul 2025 19:57:56 -0700 Subject: [PATCH 8/9] Fix type error --- codegen/lib/report.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/lib/report.ts b/codegen/lib/report.ts index b7118a697..ca5e01a50 100644 --- a/codegen/lib/report.ts +++ b/codegen/lib/report.ts @@ -108,7 +108,7 @@ function generateReport(metadata: Metadata): Report { const routes = blueprint.routes ?? [] for (const route of routes) { - processRoute(route, report, metadata) + processRoute(route, report) } for (const namespace of blueprint.namespaces ?? []) { From ee3cc3258a7cb6959c4ae60d974cb0607618824c Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Thu, 24 Jul 2025 20:50:56 +0000 Subject: [PATCH 9/9] ci: Generate docs --- docs/SUMMARY.md | 4 + docs/api/_report.md | 6 - docs/api/thermostats/daily_programs/README.md | 119 +++++++ docs/api/thermostats/daily_programs/create.md | 309 ++++++++++++++++++ docs/api/thermostats/daily_programs/delete.md | 153 +++++++++ docs/api/thermostats/daily_programs/update.md | 268 +++++++++++++++ 6 files changed, 853 insertions(+), 6 deletions(-) create mode 100644 docs/api/thermostats/daily_programs/README.md create mode 100644 docs/api/thermostats/daily_programs/create.md create mode 100644 docs/api/thermostats/daily_programs/delete.md create mode 100644 docs/api/thermostats/daily_programs/update.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index f43b3fff3..0fa6607ce 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -326,6 +326,10 @@ * [Set to Off Mode](api/thermostats/off.md) * [Update a Climate Preset](api/thermostats/update_climate_preset.md) * [Update the Thermostat Weekly Program](api/thermostats/update_weekly_program.md) + * [Daily Programs](api/thermostats/daily_programs/README.md) + * [Create a Thermostat Daily Program](api/thermostats/daily_programs/create.md) + * [Delete a Thermostat Daily Program](api/thermostats/daily_programs/delete.md) + * [Update a Thermostat Daily Program](api/thermostats/daily_programs/update.md) * [Thermostat Schedules](api/thermostats/schedules/README.md) * [Create a Thermostat Schedule](api/thermostats/schedules/create.md) * [Delete a Thermostat Schedule](api/thermostats/schedules/delete.md) diff --git a/docs/api/_report.md b/docs/api/_report.md index 0edb87662..e1f598d1d 100644 --- a/docs/api/_report.md +++ b/docs/api/_report.md @@ -1,11 +1,5 @@ # Documentation Report -## Untitled - -### Routes - -- `/thermostats/daily_programs` - ## Undocumented These items are intentionally undocumented. diff --git a/docs/api/thermostats/daily_programs/README.md b/docs/api/thermostats/daily_programs/README.md new file mode 100644 index 000000000..b43bc8900 --- /dev/null +++ b/docs/api/thermostats/daily_programs/README.md @@ -0,0 +1,119 @@ +# Daily Programs + +## The thermostat_daily_program Object + +- [Properties](./#properties) +- [Endpoints](./#endpoints) + + +Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. + +{% tabs %} +{% tab title="Thermostat Daily Program" %} + +A thermostat daily program resource. + +```json +{ + "created_at": "2025-06-14T16:54:17.946642Z", + "device_id": "58437d45-47ac-4ee6-ab27-7b2d1f2947d1", + "name": "Weekday Program", + "periods": [ + { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, + { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } + ], + "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" +} +``` +{% endtab %} +{% endtabs %} + +--- +## Properties + +**`created_at`** *Datetime* + +Date and time at which the thermostat daily program was created. + + + + +--- + +**`device_id`** *UUID* + +ID of the thermostat device on which the thermostat daily program is configured. + + + + +--- + +**`name`** *String* + +User-friendly name to identify the thermostat daily program. + + + + +--- + +**`periods`** *List* *of Objects* + +Array of thermostat daily program periods. + + + +
+ Child Object Properties +climate_preset_key String + + Key of the [climate preset](../../../capability-guides/thermostats/creating-and-managing-climate-presets/README.md) to activate at the `starts_at_time`. + +starts_at_time String + + Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + +
+ +--- + +**`thermostat_daily_program_id`** *UUID* + +ID of the thermostat daily program. + + + + +--- + +**`workspace_id`** *UUID* + +ID of the [workspace](../../../core-concepts/workspaces/README.md) that contains the thermostat daily program. + + + + +--- + +## Endpoints + + +[**`/thermostats/daily_programs/create`**](./create.md) + +Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + + +[**`/thermostats/daily_programs/delete`**](./delete.md) + +Deletes a thermostat daily program. + + +[**`/thermostats/daily_programs/update`**](./update.md) + +Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + + diff --git a/docs/api/thermostats/daily_programs/create.md b/docs/api/thermostats/daily_programs/create.md new file mode 100644 index 000000000..20f59ba58 --- /dev/null +++ b/docs/api/thermostats/daily_programs/create.md @@ -0,0 +1,309 @@ +# Create a Thermostat Daily Program + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + + +{% tabs %} +{% tab title="JavaScript" %} + +Creates a new thermostat daily program. + +#### Code: + +```javascript +await seam.thermostats.dailyPrograms.create({ + device_id: "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + name: "Weekday Program", + periods: [ + { starts_at_time: "07:00:00", climate_preset_key: "Home" }, + { starts_at_time: "09:00:00", climate_preset_key: "Away" }, + { starts_at_time: "16:00:00", climate_preset_key: "Home" }, + { starts_at_time: "22:30:00", climate_preset_key: "Sleep" }, + ], +}); +``` + +#### Output: + +```javascript +{ + "created_at": "2025-06-14T16:54:17.946642Z", + "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + "name": "Weekday Program", + "periods": [ + { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, + { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } + ], + "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" +} +``` +{% endtab %} + +{% tab title="cURL" %} + +Creates a new thermostat daily program. + +#### Code: + +```curl +curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/create" \ + --header "Authorization: Bearer $SEAM_API_KEY" \ + --json @- < "2025-06-14T16:54:17.946642Z", + "device_id" => "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + "name" => "Weekday Program", + "periods" => [ + { starts_at_time: "07:00:00", climate_preset_key: "Home" }, + { starts_at_time: "09:00:00", climate_preset_key: "Away" }, + { starts_at_time: "16:00:00", climate_preset_key: "Home" }, + { starts_at_time: "22:30:00", climate_preset_key: "Sleep" }, + ], + "thermostat_daily_program_id" => "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id" => "8da8d923-e55b-45cd-84a3-6c96b3d3d454", +} +``` +{% endtab %} + +{% tab title="PHP" %} + +Creates a new thermostat daily program. + +#### Code: + +```php +$seam->thermostats->daily_programs->create( + device_id: "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + name: "Weekday Program", + periods: [ + ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"], + ["starts_at_time" => "16:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"], + ] +); +``` + +#### Output: + +```php +[ + "created_at" => "2025-06-14T16:54:17.946642Z", + "device_id" => "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + "name" => "Weekday Program", + "periods" => [ + ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"], + ["starts_at_time" => "16:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"], + ], + "thermostat_daily_program_id" => "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id" => "8da8d923-e55b-45cd-84a3-6c96b3d3d454", +]; +``` +{% endtab %} + +{% tab title="Seam CLI" %} + +Creates a new thermostat daily program. + +#### Code: + +```seam_cli +seam thermostats daily-programs create --device_id "cc2d0fb9-1f5f-410f-80f1-a64b699de82a" --name "Weekday Program" --periods [{"starts_at_time":"07:00:00","climate_preset_key":"Home"},{"starts_at_time":"09:00:00","climate_preset_key":"Away"},{"starts_at_time":"16:00:00","climate_preset_key":"Home"},{"starts_at_time":"22:30:00","climate_preset_key":"Sleep"}] +``` + +#### Output: + +```seam_cli +{ + "created_at": "2025-06-14T16:54:17.946642Z", + "device_id": "cc2d0fb9-1f5f-410f-80f1-a64b699de82a", + "name": "Weekday Program", + "periods": [ + { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, + { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } + ], + "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" +} +``` +{% endtab %} + +{% endtabs %} + + +
+ +Authentication Methods + +- API key +- Client session token +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`device_id`** *String* (Required) + +ID of the thermostat device for which you want to create a daily program. + +--- + +**`name`** *String* (Required) + +Name of the thermostat daily program. + +--- + +**`periods`** *Array* *of Objects* (Required) + +Array of thermostat daily program periods. + +--- + + +## Response + +[thermostat\_daily\_program](.) + + +{% tabs %} +{% tab title="JSON" %} + + + +```json +{ + "created_at": "2025-06-14T16:54:17.946642Z", + "device_id": "58437d45-47ac-4ee6-ab27-7b2d1f2947d1", + "name": "Weekday Program", + "periods": [ + { "starts_at_time": "07:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "09:00:00", "climate_preset_key": "Away" }, + { "starts_at_time": "16:00:00", "climate_preset_key": "Home" }, + { "starts_at_time": "22:30:00", "climate_preset_key": "Sleep" } + ], + "thermostat_daily_program_id": "ab8ef74c-c7cd-4100-aa32-0ef960c0080d", + "workspace_id": "8da8d923-e55b-45cd-84a3-6c96b3d3d454" +} +``` +{% endtab %} +{% endtabs %} diff --git a/docs/api/thermostats/daily_programs/delete.md b/docs/api/thermostats/daily_programs/delete.md new file mode 100644 index 000000000..e8212972e --- /dev/null +++ b/docs/api/thermostats/daily_programs/delete.md @@ -0,0 +1,153 @@ +# Delete a Thermostat Daily Program + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Deletes a thermostat daily program. + + +{% tabs %} +{% tab title="JavaScript" %} + +Deletes a thermostat daily program. + +#### Code: + +```javascript +await seam.thermostats.dailyPrograms.delete({ + thermostat_daily_program_id: "a8665859-629e-4696-88b1-1eda1976250a", +}); +``` + +#### Output: + +```javascript +// void +``` +{% endtab %} + +{% tab title="cURL" %} + +Deletes a thermostat daily program. + +#### Code: + +```curl +curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/delete" \ + --header "Authorization: Bearer $SEAM_API_KEY" \ + --json @- <thermostats->daily_programs->delete( + thermostat_daily_program_id: "a8665859-629e-4696-88b1-1eda1976250a" +); +``` + +#### Output: + +```php + +``` +{% endtab %} + +{% tab title="Seam CLI" %} + +Deletes a thermostat daily program. + +#### Code: + +```seam_cli +seam thermostats daily-programs delete --thermostat_daily_program_id "a8665859-629e-4696-88b1-1eda1976250a" +``` + +#### Output: + +```seam_cli +{} +``` +{% endtab %} + +{% endtabs %} + + +
+ +Authentication Methods + +- API key +- Client session token +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`thermostat_daily_program_id`** *String* (Required) + +ID of the thermostat daily program that you want to delete. + +--- + + +## Response + +void + diff --git a/docs/api/thermostats/daily_programs/update.md b/docs/api/thermostats/daily_programs/update.md new file mode 100644 index 000000000..8ea56b81f --- /dev/null +++ b/docs/api/thermostats/daily_programs/update.md @@ -0,0 +1,268 @@ +# Update a Thermostat Daily Program + +- [Request Parameters](#request-parameters) +- [Response](#response) + +Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + + +{% tabs %} +{% tab title="JavaScript" %} + +Updates a specified thermostat daily program. + +#### Code: + +```javascript +await seam.thermostats.dailyPrograms.update({ + thermostat_daily_program_id: "6baf3a53-ba83-4052-8ea5-143584e18f03", + name: "Weekday Program", + periods: [ + { starts_at_time: "07:00:00", climate_preset_key: "Home" }, + { starts_at_time: "09:00:00", climate_preset_key: "Away" }, + { starts_at_time: "17:00:00", climate_preset_key: "Home" }, + { starts_at_time: "22:30:00", climate_preset_key: "Sleep" }, + ], +}); +``` + +#### Output: + +```javascript +{ + "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type": "PUSH_THERMOSTAT_PROGRAMS", + "error": null, + "result": {}, + "status": "success" +} +``` +{% endtab %} + +{% tab title="cURL" %} + +Updates a specified thermostat daily program. + +#### Code: + +```curl +curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/update" \ + --header "Authorization: Bearer $SEAM_API_KEY" \ + --json @- < "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type" => "PUSH_THERMOSTAT_PROGRAMS", + "error" => nil, + "result" => { + }, + "status" => "success", +} +``` +{% endtab %} + +{% tab title="PHP" %} + +Updates a specified thermostat daily program. + +#### Code: + +```php +$seam->thermostats->daily_programs->update( + thermostat_daily_program_id: "6baf3a53-ba83-4052-8ea5-143584e18f03", + name: "Weekday Program", + periods: [ + ["starts_at_time" => "07:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "09:00:00", "climate_preset_key" => "Away"], + ["starts_at_time" => "17:00:00", "climate_preset_key" => "Home"], + ["starts_at_time" => "22:30:00", "climate_preset_key" => "Sleep"], + ] +); +``` + +#### Output: + +```php +[ + "action_attempt_id" => "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type" => "PUSH_THERMOSTAT_PROGRAMS", + "error" => null, + "result" => [], + "status" => "success", +]; +``` +{% endtab %} + +{% tab title="Seam CLI" %} + +Updates a specified thermostat daily program. + +#### Code: + +```seam_cli +seam thermostats daily-programs update --thermostat_daily_program_id "6baf3a53-ba83-4052-8ea5-143584e18f03" --name "Weekday Program" --periods [{"starts_at_time":"07:00:00","climate_preset_key":"Home"},{"starts_at_time":"09:00:00","climate_preset_key":"Away"},{"starts_at_time":"17:00:00","climate_preset_key":"Home"},{"starts_at_time":"22:30:00","climate_preset_key":"Sleep"}] +``` + +#### Output: + +```seam_cli +{ + "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type": "PUSH_THERMOSTAT_PROGRAMS", + "error": null, + "result": {}, + "status": "success" +} +``` +{% endtab %} + +{% endtabs %} + + +
+ +Authentication Methods + +- API key +- Client session token +- Personal access token +
Must also include the `seam-workspace` header in the request. + +To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication). +
+ +## Request Parameters + +**`name`** *String* (Required) + +Name of the thermostat daily program that you want to update. + +--- + +**`periods`** *Array* *of Objects* (Required) + +Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program. + +--- + +**`thermostat_daily_program_id`** *String* (Required) + +ID of the thermostat daily program that you want to update. + +--- + + +## Response + +[action\_attempt](./) + + +{% tabs %} +{% tab title="JSON" %} + + + +```json +{ + "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d", + "action_type": "PUSH_THERMOSTAT_PROGRAMS", + "error": null, + "result": {}, + "status": "success" +} +``` +{% endtab %} +{% endtabs %}