Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion mintlify-codegen/generate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
import { readFile, writeFile } from 'node:fs/promises'
import { readdir, readFile, writeFile } from 'node:fs/promises'
import { join } from 'node:path'
import { env } from 'node:process'

Expand Down Expand Up @@ -67,6 +67,14 @@ if (updatedObjects.length > 0) {
)
}

// Phase G: strip any legacy `/latest` from generated docs links. Guards against
// upstream @seamapi/types regressions reintroducing `docs.seam.co/latest` into
// generated descriptions. The docs site serves at the root (no `/latest`); a
// `/latest/:path*` redirect handles old inbound URLs. See DOC-206 / DOC-199.
console.log('Sanitizing legacy /latest links in generated output...')
const sanitizedCount = await stripLatestLinks(outputDir)
console.log(` Sanitized ${sanitizedCount} generated file(s)`)

console.log(`\nDone!`)
console.log(` Removed undocumented paths: ${stats.removedPaths}`)
console.log(` Total documented endpoints: ${stats.totalEndpoints}`)
Expand All @@ -81,6 +89,37 @@ if (stats.withoutCodeSamples.length > 0) {
)
}

/**
* Strip the legacy `/latest` path segment from `docs.seam.co` links in the
* generated output (openapi.json + the API `object.mdx` pages). These links
* originate in `@seamapi/types` descriptions; this guard keeps the docs
* `/latest`-free regardless of the upstream package version.
*/
async function stripLatestLinks(docsDir: string): Promise<number> {
const files = [join(docsDir, 'openapi.json')]
const apiDir = join(docsDir, 'api')
const entries = await readdir(apiDir, { recursive: true })
for (const entry of entries) {
if (entry.endsWith('.mdx')) files.push(join(apiDir, entry))
}

let count = 0
for (const file of files) {
let content: string
try {
content = await readFile(file, 'utf8')
} catch {
continue
}
const replaced = content.split('docs.seam.co/latest').join('docs.seam.co')
if (replaced !== content) {
await writeFile(file, replaced)
count++
}
}
return count
}

function renderCodeGroup(
samples: Array<{
title: string
Expand Down
12 changes: 6 additions & 6 deletions mintlify-docs/api/access_codes/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ description: 'Learn how the access_code object represents a smart lock PIN code

## The access_code Object

Represents a smart lock [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).
Represents a smart lock [access code](https://docs.seam.co/capability-guides/smart-locks/access-codes).

An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate.

Seam supports programming two types of access codes: [ongoing](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time.
Seam supports programming two types of access codes: [ongoing](https://docs.seam.co/capability-guides/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://docs.seam.co/capability-guides/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time.

In addition, for certain devices, Seam also supports [offline access codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code.
In addition, for certain devices, Seam also supports [offline access codes](https://docs.seam.co/capability-guides/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code.

<ResponseExample>

Expand Down Expand Up @@ -188,7 +188,7 @@ In addition, for certain devices, Seam also supports [offline access codes](http
</ResponseField>

<ResponseField name="errors" type="Array">
Errors associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).
Errors associated with the [access code](https://docs.seam.co/capability-guides/smart-locks/access-codes).
</ResponseField>

<ResponseField name="is_backup" type="Boolean">
Expand Down Expand Up @@ -240,15 +240,15 @@ In addition, for certain devices, Seam also supports [offline access codes](http
</ResponseField>

<ResponseField name="status" type="Enum (String)">
Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/lifecycle-of-access-codes).
Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/capability-guides/smart-locks/access-codes/lifecycle-of-access-codes).
</ResponseField>

<ResponseField name="type" type="Enum (String)">
Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration.
</ResponseField>

<ResponseField name="warnings" type="Array">
Warnings associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).
Warnings associated with the [access code](https://docs.seam.co/capability-guides/smart-locks/access-codes).
</ResponseField>

<ResponseField name="workspace_id" type="String (UUID)">
Expand Down
8 changes: 4 additions & 4 deletions mintlify-docs/api/access_codes/unmanaged/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: 'Learn how the unmanaged_access_code object represents an existing

## The unmanaged_access_code Object

Represents an [unmanaged smart lock access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/migrating-existing-access-codes).
Represents an [unmanaged smart lock access code](https://docs.seam.co/capability-guides/smart-locks/access-codes/migrating-existing-access-codes).

An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly.

Expand All @@ -15,7 +15,7 @@ Prior to using Seam to manage your devices, you may have used another lock manag

Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes:

- [Kwikset](https://docs.seam.co/latest/device-and-system-integration-guides/kwikset-locks)
- [Kwikset](https://docs.seam.co/device-and-system-integration-guides/kwikset-locks)

<ResponseExample>

Expand Down Expand Up @@ -102,7 +102,7 @@ Not all providers support unmanaged access codes. The following providers do not
</ResponseField>

<ResponseField name="errors" type="Array">
Errors associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).
Errors associated with the [access code](https://docs.seam.co/capability-guides/smart-locks/access-codes).
</ResponseField>

<ResponseField name="is_managed" type="Boolean">
Expand All @@ -126,7 +126,7 @@ Not all providers support unmanaged access codes. The following providers do not
</ResponseField>

<ResponseField name="warnings" type="Array">
Warnings associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).
Warnings associated with the [access code](https://docs.seam.co/capability-guides/smart-locks/access-codes).
</ResponseField>

<ResponseField name="workspace_id" type="String (UUID)">
Expand Down
4 changes: 2 additions & 2 deletions mintlify-docs/api/access_grants/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Represents an Access Grant. Access Grants enable you to grant a user identity ac
</ResponseField>

<ResponseField name="errors" type="Array">
Errors associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants).
Errors associated with the [access grant](https://docs.seam.co/capability-guides/access-grants).
</ResponseField>

<ResponseField name="instant_key_url" type="String">
Expand Down Expand Up @@ -136,7 +136,7 @@ Represents an Access Grant. Access Grants enable you to grant a user identity ac
</ResponseField>

<ResponseField name="warnings" type="Array">
Warnings associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants).
Warnings associated with the [access grant](https://docs.seam.co/capability-guides/access-grants).
</ResponseField>

<ResponseField name="workspace_id" type="String (UUID)">
Expand Down
4 changes: 2 additions & 2 deletions mintlify-docs/api/access_methods/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ Represents an access method for an Access Grant. Access methods describe the mod
</ResponseField>

<ResponseField name="pending_mutations" type="Array">
Pending mutations for the [access method](https://docs.seam.co/latest/capability-guides/access-grants/delivering-access-methods). Indicates operations that are in progress.
Pending mutations for the [access method](https://docs.seam.co/capability-guides/access-grants/delivering-access-methods). Indicates operations that are in progress.
</ResponseField>

<ResponseField name="warnings" type="Array">
Warnings associated with the [access method](https://docs.seam.co/latest/capability-guides/access-grants/delivering-access-methods).
Warnings associated with the [access method](https://docs.seam.co/capability-guides/access-grants/delivering-access-methods).
</ResponseField>

<ResponseField name="workspace_id" type="String (UUID)">
Expand Down
8 changes: 4 additions & 4 deletions mintlify-docs/api/acs/access_groups/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ description: 'Learn how the acs_access_group object defines the entrances a set

Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users.

Some access control systems use [access group](https://docs.seam.co/latest/capability-guides/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes.
Some access control systems use [access group](https://docs.seam.co/capability-guides/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes.

To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/latest/device-and-system-integration-guides#access-control-systems).
To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems).

<ResponseExample>

Expand Down Expand Up @@ -68,7 +68,7 @@ To learn whether your access control system supports access groups, see the corr
</ResponseField>

<ResponseField name="connected_account_id" type="String (UUID)">
ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) that contains the access group.
ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) that contains the access group.
</ResponseField>

<ResponseField name="created_at" type="String (ISO 8601)">
Expand Down Expand Up @@ -108,5 +108,5 @@ To learn whether your access control system supports access groups, see the corr
</ResponseField>

<ResponseField name="workspace_id" type="String (UUID)">
ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the access group.
ID of the [workspace](https://docs.seam.co/core-concepts/workspaces) that contains the access group.
</ResponseField>
Loading
Loading