diff --git a/docs/api-reference/_blueprint.json b/docs/api-reference/_blueprint.json index 7364c5b55..eeeff4493 100644 --- a/docs/api-reference/_blueprint.json +++ b/docs/api-reference/_blueprint.json @@ -57233,6 +57233,16 @@ "isDraft": false, "draftMessage": "" }, + { + "name": "access_code.mutations_requested", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, { "name": "access_code.scheduled_on_device", "description": "", @@ -58310,6 +58320,16 @@ "isDraft": false, "draftMessage": "" }, + { + "name": "access_code.mutations_requested", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, { "name": "access_code.scheduled_on_device", "description": "", @@ -72005,6 +72025,16 @@ "isDraft": false, "draftMessage": "" }, + { + "name": "access_code.mutations_requested", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, { "name": "access_code.scheduled_on_device", "description": "", @@ -73082,6 +73112,16 @@ "isDraft": false, "draftMessage": "" }, + { + "name": "access_code.mutations_requested", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, { "name": "access_code.scheduled_on_device", "description": "", @@ -122945,6 +122985,16 @@ "isDraft": false, "draftMessage": "" }, + { + "name": "access_code.mutations_requested", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, { "name": "access_code.scheduled_on_device", "description": "", @@ -142179,6 +142229,281 @@ "resourceSamples": [], "eventType": "access_code.time_frame_changed" }, + { + "resourceType": "event", + "properties": [ + { + "name": "access_code_id", + "description": "ID of the affected access code.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "id", + "jsonType": "string" + }, + { + "name": "connected_account_custom_metadata", + "description": "Custom metadata of the connected account, present when connected_account_id is provided.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "record", + "jsonType": "object" + }, + { + "name": "connected_account_id", + "description": "ID of the connected account associated with the affected access code.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "id", + "jsonType": "string" + }, + { + "name": "created_at", + "description": "Date and time at which the event was created.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "datetime", + "jsonType": "string" + }, + { + "name": "device_custom_metadata", + "description": "Custom metadata of the device, present when device_id is provided.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "record", + "jsonType": "object" + }, + { + "name": "device_id", + "description": "ID of the device associated with the affected access code.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "id", + "jsonType": "string" + }, + { + "name": "event_id", + "description": "ID of the event.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "id", + "jsonType": "string" + }, + { + "name": "event_type", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "enum", + "jsonType": "string", + "values": [ + { + "name": "access_code.mutations_requested", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + } + ] + }, + { + "name": "occurred_at", + "description": "Date and time at which the event occurred.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "datetime", + "jsonType": "string" + }, + { + "name": "requested_mutations", + "description": "Array of mutations requested on the access code, each containing the mutation type and from/to values.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "list", + "jsonType": "array", + "itemFormat": "object", + "itemProperties": [ + { + "name": "from", + "description": "Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "record", + "jsonType": "object" + }, + { + "name": "mutation_code", + "description": "Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "enum", + "jsonType": "string", + "values": [ + { + "name": "updating_name", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, + { + "name": "updating_code", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, + { + "name": "updating_time_frame", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, + { + "name": "deleting", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, + { + "name": "creating", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + }, + { + "name": "deferring_creation", + "description": "", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "" + } + ] + }, + { + "name": "to", + "description": "New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "record", + "jsonType": "object" + } + ] + }, + { + "name": "workspace_id", + "description": "ID of the workspace associated with the event.", + "isDeprecated": false, + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroupKey": null, + "format": "id", + "jsonType": "string" + } + ], + "description": "Mutations were requested on an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). This event fires at request time, before the change is confirmed on the device.", + "isDeprecated": false, + "routePath": "/access_codes", + "deprecationMessage": "", + "isUndocumented": false, + "undocumentedMessage": "", + "isDraft": false, + "draftMessage": "", + "propertyGroups": [], + "resourceSamples": [], + "eventType": "access_code.mutations_requested" + }, { "resourceType": "event", "properties": [ diff --git a/docs/api-reference/_report.md b/docs/api-reference/_report.md index 6f534e413..e70087276 100644 --- a/docs/api-reference/_report.md +++ b/docs/api-reference/_report.md @@ -685,6 +685,7 @@ These items are deprecated. - `event: access_code.name_changed` - `event: access_code.code_changed` - `event: access_code.time_frame_changed` +- `event: access_code.mutations_requested` - `event: access_code.scheduled_on_device` - `event: access_code.set_on_device` - `event: access_code.removed_from_device` diff --git a/docs/api-reference/access_codes/README.md b/docs/api-reference/access_codes/README.md index 60046cdf7..ae37380e5 100644 --- a/docs/api-reference/access_codes/README.md +++ b/docs/api-reference/access_codes/README.md @@ -2901,6 +2901,86 @@ The time frame of an [access code](https://docs.seam.co/low-level-apis/smart-loc --- +**`access_code.mutations_requested`** + +Mutations were requested on an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). This event fires at request time, before the change is confirmed on the device. + +
+ +Properties + +access_code_id UUID + + ID of the affected access code. + +connected_account_custom_metadata Record + + Custom metadata of the connected account, present when connected_account_id is provided. + +connected_account_id UUID + + ID of the connected account associated with the affected access code. + +created_at Datetime + + Date and time at which the event was created. + +device_custom_metadata Record + + Custom metadata of the device, present when device_id is provided. + +device_id UUID + + ID of the device associated with the affected access code. + +event_id UUID + + ID of the event. + +event_type Enum + + Value: `access_code.mutations_requested` + +occurred_at Datetime + + Date and time at which the event occurred. + +requested_mutations List of Objects + + Array of mutations requested on the access code, each containing the mutation type and from/to values. + +- from Record + + Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. + + +- mutation_code Enum + + Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. +
+ Enum values: + + - updating_name + - updating_code + - updating_time_frame + - deleting + - creating + - deferring_creation +
+ + +- to Record + + New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. + + +workspace_id UUID + + ID of the workspace associated with the event. +
+ +--- + **`access_code.scheduled_on_device`** An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was [scheduled natively](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) on a device. diff --git a/docs/api-reference/events/README.md b/docs/api-reference/events/README.md index 43d8c4b8a..53d09d7dc 100644 --- a/docs/api-reference/events/README.md +++ b/docs/api-reference/events/README.md @@ -32,6 +32,7 @@ Type of event. - access_code.name_changed - access_code.code_changed - access_code.time_frame_changed +- access_code.mutations_requested - access_code.scheduled_on_device - access_code.set_on_device - access_code.removed_from_device diff --git a/docs/api-reference/events/list.md b/docs/api-reference/events/list.md index 79fc0d302..3cf39937c 100644 --- a/docs/api-reference/events/list.md +++ b/docs/api-reference/events/list.md @@ -360,6 +360,7 @@ Possible enum values: - access_code.name_changed - access_code.code_changed - access_code.time_frame_changed +- access_code.mutations_requested - access_code.scheduled_on_device - access_code.set_on_device - access_code.removed_from_device diff --git a/mintlify-docs/api/access_codes/events.mdx b/mintlify-docs/api/access_codes/events.mdx index 6d5b23d97..646e3db5e 100644 --- a/mintlify-docs/api/access_codes/events.mdx +++ b/mintlify-docs/api/access_codes/events.mdx @@ -449,6 +449,78 @@ The time frame of an [access code](https://docs.seam.co/low-level-apis/smart-loc +## `access_code.mutations_requested` + +Mutations were requested on an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). This event fires at request time, before the change is confirmed on the device. + + + +```json Example webhook payload +{ + "access_code_id": "00000000-0000-0000-0000-000000000000", + "connected_account_custom_metadata": {}, + "connected_account_id": "00000000-0000-0000-0000-000000000000", + "created_at": "2025-01-01T00:00:00.000Z", + "device_custom_metadata": {}, + "device_id": "00000000-0000-0000-0000-000000000000", + "event_id": "00000000-0000-0000-0000-000000000000", + "event_type": "access_code.mutations_requested", + "occurred_at": "2025-01-01T00:00:00.000Z", + "requested_mutations": [], + "workspace_id": "00000000-0000-0000-0000-000000000000" +} +``` + + + + + + + ID of the affected access code. + + + + Custom metadata of the connected account, present when connected_account_id is provided. + + + + ID of the connected account associated with the affected access code. + + + + Date and time at which the event was created. + + + + Custom metadata of the device, present when device_id is provided. + + + + ID of the device associated with the affected access code. + + + + ID of the event. + + + + Value: `access_code.mutations_requested` + + + + Date and time at which the event occurred. + + + + Array of mutations requested on the access code, each containing the mutation type and from/to values. + + + + ID of the workspace associated with the event. + + + + ## `access_code.scheduled_on_device` An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was [scheduled natively](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) on a device. diff --git a/mintlify-docs/api/events/object.mdx b/mintlify-docs/api/events/object.mdx index 57b97a5e9..d03a53dd6 100644 --- a/mintlify-docs/api/events/object.mdx +++ b/mintlify-docs/api/events/object.mdx @@ -45,6 +45,7 @@ description: 'Learn how the event object represents an occurrence in your worksp - `access_code.name_changed` - `access_code.code_changed` - `access_code.time_frame_changed` + - `access_code.mutations_requested` - `access_code.scheduled_on_device` - `access_code.set_on_device` - `access_code.removed_from_device` diff --git a/mintlify-docs/openapi.json b/mintlify-docs/openapi.json index 4a50a7749..7061898d8 100644 --- a/mintlify-docs/openapi.json +++ b/mintlify-docs/openapi.json @@ -8965,6 +8965,128 @@ "type": "object", "x-route-path": "/access_codes" }, + { + "description": "Mutations were requested on an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). This event fires at request time, before the change is confirmed on the device.", + "properties": { + "access_code_id": { + "description": "ID of the affected access code.", + "format": "uuid", + "type": "string" + }, + "connected_account_custom_metadata": { + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "description": "Custom metadata of the connected account, present when connected_account_id is provided.", + "type": "object" + }, + "connected_account_id": { + "description": "ID of the connected account associated with the affected access code.", + "format": "uuid", + "type": "string" + }, + "created_at": { + "description": "Date and time at which the event was created.", + "format": "date-time", + "type": "string" + }, + "device_custom_metadata": { + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "description": "Custom metadata of the device, present when device_id is provided.", + "type": "object" + }, + "device_id": { + "description": "ID of the device associated with the affected access code.", + "format": "uuid", + "type": "string" + }, + "event_id": { + "description": "ID of the event.", + "format": "uuid", + "type": "string" + }, + "event_type": { + "enum": [ + "access_code.mutations_requested" + ], + "type": "string" + }, + "occurred_at": { + "description": "Date and time at which the event occurred.", + "format": "date-time", + "type": "string" + }, + "requested_mutations": { + "description": "Array of mutations requested on the access code, each containing the mutation type and from/to values.", + "items": { + "description": "Record describing a single requested mutation.", + "properties": { + "from": { + "additionalProperties": {}, + "description": "Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`.", + "type": "object" + }, + "mutation_code": { + "description": "Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`.", + "enum": [ + "updating_name", + "updating_code", + "updating_time_frame", + "deleting", + "creating", + "deferring_creation" + ], + "type": "string" + }, + "to": { + "additionalProperties": {}, + "description": "New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`.", + "type": "object" + } + }, + "required": [ + "mutation_code" + ], + "type": "object" + }, + "type": "array" + }, + "workspace_id": { + "description": "ID of the workspace associated with the event.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "event_id", + "workspace_id", + "created_at", + "occurred_at", + "access_code_id", + "device_id", + "connected_account_id", + "event_type", + "requested_mutations" + ], + "type": "object", + "x-route-path": "/access_codes" + }, { "description": "An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was [scheduled natively](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) on a device.", "properties": { @@ -55087,6 +55209,7 @@ "access_code.name_changed", "access_code.code_changed", "access_code.time_frame_changed", + "access_code.mutations_requested", "access_code.scheduled_on_device", "access_code.set_on_device", "access_code.removed_from_device", @@ -55204,6 +55327,7 @@ "access_code.name_changed", "access_code.code_changed", "access_code.time_frame_changed", + "access_code.mutations_requested", "access_code.scheduled_on_device", "access_code.set_on_device", "access_code.removed_from_device", @@ -55681,6 +55805,7 @@ "access_code.name_changed", "access_code.code_changed", "access_code.time_frame_changed", + "access_code.mutations_requested", "access_code.scheduled_on_device", "access_code.set_on_device", "access_code.removed_from_device", @@ -55794,6 +55919,7 @@ "access_code.name_changed", "access_code.code_changed", "access_code.time_frame_changed", + "access_code.mutations_requested", "access_code.scheduled_on_device", "access_code.set_on_device", "access_code.removed_from_device", diff --git a/package-lock.json b/package-lock.json index bce4a0989..24deb04c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@prettier/plugin-ruby": "^4.0.4", "@seamapi/blueprint": "^0.55.0", "@seamapi/smith": "^0.5.2", - "@seamapi/types": "1.919.0", + "@seamapi/types": "1.920.0", "@types/command-exists": "^1.2.3", "change-case": "^5.4.4", "command-exists": "^1.2.9", @@ -984,9 +984,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.919.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.919.0.tgz", - "integrity": "sha512-KPWarW9iOD6lKCabXFfq0WhDSNuGTCzPWpAuOFl59ivmVOG6hM37XRyAchv6Stbwo/E6r9rUZHpJ0+KTRVqkgg==", + "version": "1.920.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.920.0.tgz", + "integrity": "sha512-u01o6184wDWU7rUu+ZV/n7K1YSEjb+CxjSd6pDGzMVlEKOW9D5v4HYqpku8r8/ePGqrA6emzTIaFiCozM8CbZA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index fc906a06e..d50d5bce0 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@prettier/plugin-ruby": "^4.0.4", "@seamapi/blueprint": "^0.55.0", "@seamapi/smith": "^0.5.2", - "@seamapi/types": "1.919.0", + "@seamapi/types": "1.920.0", "@types/command-exists": "^1.2.3", "change-case": "^5.4.4", "command-exists": "^1.2.9",