diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index d45d6dfee..3554c3085 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -82,3 +82,5 @@ jobs: run: npm run validate-paths - name: Validate cross-site links run: npm run validate-links + - name: Validate all pages are in SUMMARY.md + run: npm run validate-orphan-pages diff --git a/codegen/validate-orphan-pages.ts b/codegen/validate-orphan-pages.ts new file mode 100644 index 000000000..ab9bf1bbc --- /dev/null +++ b/codegen/validate-orphan-pages.ts @@ -0,0 +1,93 @@ +import { readdirSync, readFileSync } from 'node:fs' +import { join, relative } from 'node:path' + +import { siteSections } from './lib/config.js' + +// Matches markdown links in SUMMARY.md: [Title](path/to/file.md) +const summaryLinkPattern = /\[([^\]]*)\]\(([^)]+)\)/g + +function walkDir(dir: string): string[] { + const files: string[] = [] + for (const entry of readdirSync(dir, { withFileTypes: true })) { + const fullPath = join(dir, entry.name) + if (entry.isDirectory()) { + // Skip .gitbook directories (assets, includes, etc.) + if (entry.name === '.gitbook') continue + files.push(...walkDir(fullPath)) + } else if (entry.name.endsWith('.md')) { + // Skip underscore-prefixed files (e.g., _report.md) + if (entry.name.startsWith('_')) continue + // Skip SUMMARY.md itself + if (entry.name === 'SUMMARY.md') continue + files.push(fullPath) + } + } + return files +} + +interface OrphanPage { + section: string + path: string +} + +const orphans: OrphanPage[] = [] + +for (const section of siteSections) { + const summaryPath = join(section.root, 'SUMMARY.md') + const contents = readFileSync(summaryPath, 'utf-8') + + // Collect all file paths referenced in SUMMARY.md + const referencedPaths = new Set() + for (const match of contents.matchAll(summaryLinkPattern)) { + const linkPath = match[2] ?? '' + if (linkPath.startsWith('http') || linkPath.startsWith('#')) continue + // Strip anchor fragments + const cleanPath = linkPath.split('#')[0] ?? '' + if (cleanPath !== '') { + referencedPaths.add(cleanPath) + } + } + + // Walk all markdown files in this section + const allPages = walkDir(section.root) + + for (const fullPath of allPages) { + const relPath = relative(section.root, fullPath) + if (!referencedPaths.has(relPath)) { + orphans.push({ section: section.name, path: relPath }) + } + } +} + +if (orphans.length > 0) { + // Group by section + const bySection = new Map() + for (const { section, path } of orphans) { + const existing = bySection.get(section) ?? [] + existing.push(path) + bySection.set(section, existing) + } + + // eslint-disable-next-line no-console + console.error( + `Found ${orphans.length} page(s) not referenced in SUMMARY.md:\n`, + ) + for (const [section, paths] of bySection) { + // eslint-disable-next-line no-console + console.error(` [${section}]`) + for (const p of paths) { + // eslint-disable-next-line no-console + console.error(` ${p}`) + } + // eslint-disable-next-line no-console + console.error('') + } + // eslint-disable-next-line no-console + console.error( + 'Either add these pages to SUMMARY.md or move them to the trash/ folder.', + ) + process.exit(1) +} else { + // eslint-disable-next-line no-console + console.log('All pages are referenced in SUMMARY.md.') +} diff --git a/docs/guides/ui-components/seam-mobile-components/README.md b/docs/guides/ui-components/seam-mobile-components/README.md index af23b91f5..58b065aac 100644 --- a/docs/guides/ui-components/seam-mobile-components/README.md +++ b/docs/guides/ui-components/seam-mobile-components/README.md @@ -22,4 +22,4 @@ Seam Mobile Components are pre-built views that let you deliver end-user access ### Platform Guides -
Cover image
iOS Guide
Integrate Seam Mobile Components into your iOS app
image (35).pngseam-mobile-components-for-ios
Android Guide
Integrate Seam Mobile Components into your Android app
android_logo.pngseam-mobile-components-for-android
+
Cover image
iOS Guide
Integrate Seam Mobile Components into your iOS app
image (35).pngseam-mobile-components-for-ios
diff --git a/package.json b/package.json index d9d85e412..a4135399c 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "postgenerate": "npm run format", "validate-paths": "tsx codegen/validate-paths.ts", "validate-links": "tsx codegen/validate-links.ts", + "validate-orphan-pages": "tsx codegen/validate-orphan-pages.ts", "typecheck": "tsc", "lint": "eslint .", "postlint": "prettier --check --ignore-path .prettierignore .", diff --git a/docs/brand-guides/smartthings-hubs-+-smart-locks.md b/trash/brand-guides/smartthings-hubs-+-smart-locks.md similarity index 95% rename from docs/brand-guides/smartthings-hubs-+-smart-locks.md rename to trash/brand-guides/smartthings-hubs-+-smart-locks.md index af0d3ba0e..b0a530ef8 100644 --- a/docs/brand-guides/smartthings-hubs-+-smart-locks.md +++ b/trash/brand-guides/smartthings-hubs-+-smart-locks.md @@ -8,7 +8,7 @@ description: Guide for using SmartThings hubs + smart locks with Seam [SmartThings Hubs](https://www.samsung.com/fr/smartthings/) are connected to your local network using either Wi-Fi or Ethernet. You pair smart locks to SmartThings hubs using Zigbee or Z-Wave. Them, you can unlock and lock these smart locks remotely, and you can program access codes on them for keyless entry. -*** +--- ## Supported Devices @@ -16,22 +16,22 @@ This integration supports the SmartThings hub and door locks paired with it. For detailed information about the SmartThings hubs that Seam supports, see our [SmartThings Supported Devices page](https://www.seam.co/manufacturers/smartthings). -*** +--- ## Supported Features We support the following features: -* [Triggering web lock and unlock actions](https://docs.seam.co/latest/capability-guides/smart-locks/lock-and-unlock) on paired smart locks that support this feature -* [Programming access codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes) on paired smart locks that support this feature +- [Triggering web lock and unlock actions](https://docs.seam.co/latest/capability-guides/smart-locks/lock-and-unlock) on paired smart locks that support this feature +- [Programming access codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes) on paired smart locks that support this feature -*** +--- ### Device Provider Key To create a [Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews) that enables your users to connect their August devices to Seam, include the `smartthings` device provider key in the `accepted_providers` list. For more information, see [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). -*** +--- ## Setup Instructions @@ -41,7 +41,7 @@ To control SmartThings-connected devices using Seam, you must prompt owners of t 2. Follow [these instructions](https://www.samsung.com/ca/support/mobile-devices/smartthings-how-to-set-up-your-hub/) to pair your devices to the SmartThings hub. 3. Note your login credentials for the SmartThings app, and use these credentials to log in to the [Seam Connect Webview](https://docs.seam.co/latest/core-concepts/connect-webviews) to add your devices to Seam. -*** +--- ## Brand-Specific Features @@ -51,7 +51,7 @@ Note the following SmartThings-specific features: For SmartThings-connected devices, you can report the set of supported access code lengths or the minimum and maximum supported code lengths. For details, see [Report Device Access Code Constraints](https://docs.seam.co/latest/api/access_codes/report_device_constraints). -*** +--- ## Where to Order @@ -59,4 +59,4 @@ To order SmartThings hubs, see the Aeotec **Where to buy** page.
Aeotec Where to buy pagehttps://aeotec.com/where-to-buy/smartthings-logo.png
-*** +--- diff --git a/docs/guides/contact-us.md b/trash/guides/contact-us.md similarity index 99% rename from docs/guides/contact-us.md rename to trash/guides/contact-us.md index aca58c641..442e6b507 100644 --- a/docs/guides/contact-us.md +++ b/trash/guides/contact-us.md @@ -10,4 +10,3 @@ We're here for you every step of the way! :computer: [Contact Support](mailto:support@seam.co) :wave: [Contact Sales](https://www.seam.co/contact-us) - diff --git a/docs/guides/core-concepts/device-capabilities.md b/trash/guides/core-concepts/device-capabilities.md similarity index 83% rename from docs/guides/core-concepts/device-capabilities.md rename to trash/guides/core-concepts/device-capabilities.md index 204fa29b4..739a35d16 100644 --- a/docs/guides/core-concepts/device-capabilities.md +++ b/trash/guides/core-concepts/device-capabilities.md @@ -8,23 +8,21 @@ For example, a battery-powered door lock with a pin-pad such as Yale Assure woul Seam exposes each capability as a set of APIs. Furthermore, those APIs are standardized across brands for ease of integration. - - ![](<../.gitbook/assets/image (10).png>) ### Capabilities -> Actions, Properties, and Events Each device capability decomposes into 3 sets of affordances: -* **Actions** — things you can do to it. -* **Properties** — the current state of the device. -* **Events** — reports from the device describing state transitions. +- **Actions** — things you can do to it. +- **Properties** — the current state of the device. +- **Events** — reports from the device describing state transitions. For example, the `lock` capability decomposes in the following manner: -* **Actions:** `UNLOCK` and `LOCK` -* **Properties:** a `locked` status to determine the lock's current status -* **Events:** a list of lock/unlock events logging all of the lock's transitions. +- **Actions:** `UNLOCK` and `LOCK` +- **Properties:** a `locked` status to determine the lock's current status +- **Events:** a list of lock/unlock events logging all of the lock's transitions. ### Standardizing Capabilities Across Device Brands @@ -36,9 +34,4 @@ For example, some door locks with the `access_codes` capability require differen In those instances, we attempt to handle these differences for you. For example, we will generate and set a pin code of the appropriate length. However, you may wish to set your own code. We let you do so, but it must meet the constraints set by the device. - - - - \[1] This device interaction model leans heavily on the wonderful work done by the [W3C WoT](https://www.w3.org/TR/wot-architecture/#sec-interaction-model). - diff --git a/docs/guides/developer-tools/sandbox-and-sample-data/hubitat-hub-sample-data.md b/trash/guides/developer-tools/sandbox-and-sample-data/hubitat-hub-sample-data.md similarity index 100% rename from docs/guides/developer-tools/sandbox-and-sample-data/hubitat-hub-sample-data.md rename to trash/guides/developer-tools/sandbox-and-sample-data/hubitat-hub-sample-data.md diff --git a/docs/guides/developer-tools/sandbox-and-sample-data/lockly-sample-data.md b/trash/guides/developer-tools/sandbox-and-sample-data/lockly-sample-data.md similarity index 100% rename from docs/guides/developer-tools/sandbox-and-sample-data/lockly-sample-data.md rename to trash/guides/developer-tools/sandbox-and-sample-data/lockly-sample-data.md diff --git a/docs/guides/developer-tools/sandbox-and-sample-data/minut-sample-data.md b/trash/guides/developer-tools/sandbox-and-sample-data/minut-sample-data.md similarity index 100% rename from docs/guides/developer-tools/sandbox-and-sample-data/minut-sample-data.md rename to trash/guides/developer-tools/sandbox-and-sample-data/minut-sample-data.md diff --git a/docs/guides/device-guides/hubitat-elevation-hub.md b/trash/guides/device-guides/hubitat-elevation-hub.md similarity index 68% rename from docs/guides/device-guides/hubitat-elevation-hub.md rename to trash/guides/device-guides/hubitat-elevation-hub.md index c8f205aa5..4a0776385 100644 --- a/docs/guides/device-guides/hubitat-elevation-hub.md +++ b/trash/guides/device-guides/hubitat-elevation-hub.md @@ -6,7 +6,7 @@ description: Guide for using Hubitat Elevation Hubs with Seam This integration uses [Hubitat’s Maker API](https://docs2.hubitat.com/en/apps/maker-api) to make devices connected to a Hubitat Hub available for use with Seam. -*** +--- ## Supported Devices @@ -16,16 +16,16 @@ For detailed information about the Hubitat-connected devices that Seam supports, We support the following features: -* [Triggering web lock and unlock actions](../capability-guides/smart-locks/lock-and-unlock.md) for devices with this capability -* [Programming access codes](../capability-guides/smart-locks/access-codes/) on devices with this capability +- [Triggering web lock and unlock actions](../capability-guides/smart-locks/lock-and-unlock.md) for devices with this capability +- [Programming access codes](../capability-guides/smart-locks/access-codes/) on devices with this capability -*** +--- ### Device Provider Key To create a [Connect Webview](../core-concepts/connect-webviews/) that enables you to connect your Hubitat Hub and devices to Seam, include the `hubitat` device provider key as the `selected_provider` or in the `accepted_providers` list. For more information, see [Customize the Brands to Display in Your Connect Webview](../core-concepts/connect-webviews/customizing-connect-webviews.md#customize-the-brands-to-display-in-your-connect-webviews). -*** +--- ## Setup Instructions @@ -33,32 +33,32 @@ To control Hubitat Hub-connected devices using Seam, you must prompt owners of t ### 1. Access the Hubitat Hub Dashboard -* [Follow these instructions to get access to the Hubitat Hub's Dashboard.](https://docs2.hubitat.com/getting-started/registration-and-setup) +- [Follow these instructions to get access to the Hubitat Hub's Dashboard.](https://docs2.hubitat.com/getting-started/registration-and-setup) ### 2. Configure the "Type" of the Device -* From the Hubitat Hub dashboard, click on "Devices" in the left navigation. -* In the "Device Information" section, click on "Type", and select the correct device type of the device. +- From the Hubitat Hub dashboard, click on "Devices" in the left navigation. +- In the "Device Information" section, click on "Type", and select the correct device type of the device. ### 3. Turn on Hub Login Security (IMPORTANT) This prevents other people on the same network as that of the hub from being able to log in to the dashboard and modify your settings. -* From the Hubitat Hub dashboard, click on "Settings" in the left navigation -* In the "Admin Settings" section, click on "Hub Login Security". -* Click on "Add User" -* Fill in the form with a username, email, and password, and make sure to save this information somewhere. You'll be using these credentials to log in to your dashboard in the future. +- From the Hubitat Hub dashboard, click on "Settings" in the left navigation +- In the "Admin Settings" section, click on "Hub Login Security". +- Click on "Add User" +- Fill in the form with a username, email, and password, and make sure to save this information somewhere. You'll be using these credentials to log in to your dashboard in the future. -### 4. Adding the Maker API App for Seam access +### 4. Adding the Maker API App for Seam access -* From the Hubitat Hub dashboard, click on "Apps" in the left navigation -* Click on "Add Built-In App" on the top right corner -* Click on the "Maker API" app to install it -* Under the "Security" section: - * Enable "Allow Access via Remote / Cloud" - * Disable "Allow Access via Local IP / Address" -* Under "Select Devices", check the checkboxes of all the devices you want to connect with Seam -* Under the "Cloud URLS:" section, copy the "Get Device Info" Cloud URL, and save it. You'll be using this URL to connect the hub to Seam. +- From the Hubitat Hub dashboard, click on "Apps" in the left navigation +- Click on "Add Built-In App" on the top right corner +- Click on the "Maker API" app to install it +- Under the "Security" section: + - Enable "Allow Access via Remote / Cloud" + - Disable "Allow Access via Local IP / Address" +- Under "Select Devices", check the checkboxes of all the devices you want to connect with Seam +- Under the "Cloud URLS:" section, copy the "Get Device Info" Cloud URL, and save it. You'll be using this URL to connect the hub to Seam. ### 5. Adding your account via Seam Connect Webview @@ -66,23 +66,23 @@ Use the Cloud URL you collected in the previous step to connect your account.
-*** +--- ## Where to Order You can purchase Hubitat Hubs from [their website](https://hubitat.com/products). They offer Zigbee and Z-Wave hubs that work in the following regions (with the associated Z-Wave frequencies): -* North America and United States (908.4 MHz) -* Europe (868.4 MHz) -* United Kingdom / Ireland (868.4 MHz) -* Australia, New Zealand (921.4/919.8 MHz) -* Korea/Thailand (920.9, 921.7, 923.1) -* Malaysia (919.8, 921.4) -* India (865.2) -* Israel (916) -* Japan (922.5, 923.9, 926.3) -* Russia (869.0) -* Hong Kong (919.8) -* China (868.4) +- North America and United States (908.4 MHz) +- Europe (868.4 MHz) +- United Kingdom / Ireland (868.4 MHz) +- Australia, New Zealand (921.4/919.8 MHz) +- Korea/Thailand (920.9, 921.7, 923.1) +- Malaysia (919.8, 921.4) +- India (865.2) +- Israel (916) +- Japan (922.5, 923.9, 926.3) +- Russia (869.0) +- Hong Kong (919.8) +- China (868.4)
Hubitat Hub Storehttps://hubitat.com/products61-5mM-Np1L._AC_SL1500_.jpg
diff --git a/docs/guides/device-guides/implementing-robust-access-code-management-for-guests.md b/trash/guides/device-guides/implementing-robust-access-code-management-for-guests.md similarity index 98% rename from docs/guides/device-guides/implementing-robust-access-code-management-for-guests.md rename to trash/guides/device-guides/implementing-robust-access-code-management-for-guests.md index af2688065..b45d8446f 100644 --- a/docs/guides/device-guides/implementing-robust-access-code-management-for-guests.md +++ b/trash/guides/device-guides/implementing-robust-access-code-management-for-guests.md @@ -55,14 +55,14 @@ Seam's official backup access code pool can be enabled by adding `use_backup_acc ```javascript // Time of Creation await seam.accessCodes.create({ - name: "My Access Code", - code: "1234", + name: 'My Access Code', + code: '1234', use_backup_access_code_pool: true, }) // Time of Reservation async function getGuestMessage() { - const access_code = await seam.accessCodes.get({ name: "My Access Code" }) + const access_code = await seam.accessCodes.get({ name: 'My Access Code' }) if (access_code.errors.length === 0) { return `Hello Guest! Your access code is: ${access_code.code}` } else { diff --git a/docs/guides/device-guides/test.md b/trash/guides/device-guides/test.md similarity index 100% rename from docs/guides/device-guides/test.md rename to trash/guides/device-guides/test.md diff --git a/docs/guides/help-center/hello.md b/trash/guides/help-center/hello.md similarity index 100% rename from docs/guides/help-center/hello.md rename to trash/guides/help-center/hello.md diff --git a/docs/guides/quickstart/authentication.md b/trash/guides/quickstart/authentication.md similarity index 92% rename from docs/guides/quickstart/authentication.md rename to trash/guides/quickstart/authentication.md index 1026f26e3..36f87a714 100644 --- a/docs/guides/quickstart/authentication.md +++ b/trash/guides/quickstart/authentication.md @@ -19,18 +19,18 @@ Next, run the code below to check you are correctly authenticated: // Replace with // const Seam = require("seam") // if not using ES6 modules and/or TypeScript. -import { Seam } from "seam"; +import { Seam } from 'seam' // Seam will automatically use the SEAM_API_KEY environment variable if you // don't provide an apiKey to `new Seam()` -const seam = new Seam(); +const seam = new Seam() const checkAuth = async () => { - const { workspace } = await seam.workspaces.get(); - console.log(workspace); + const { workspace } = await seam.workspaces.get() + console.log(workspace) } -checkAuth(); +checkAuth() /* { diff --git a/docs/guides/reference/glossary.md b/trash/guides/reference/glossary.md similarity index 100% rename from docs/guides/reference/glossary.md rename to trash/guides/reference/glossary.md diff --git a/docs/guides/reference/help-center/README.md b/trash/guides/reference/help-center/README.md similarity index 54% rename from docs/guides/reference/help-center/README.md rename to trash/guides/reference/help-center/README.md index 11a2f924d..c8196eb1d 100644 --- a/docs/guides/reference/help-center/README.md +++ b/trash/guides/reference/help-center/README.md @@ -16,10 +16,8 @@ layout: Use the search bar at the top of the page to search for any help article! +--- - -*** - -* [How often am I billed with Seam?](how-often-am-i-billed-with-seam.md) -* [Handling Recurring Access Codes](handling-recurring-access-codes.md) -* [what-is-an-action-attempt-when-is-it-used.md](what-is-an-action-attempt-when-is-it-used.md "mention") +- [How often am I billed with Seam?](how-often-am-i-billed-with-seam.md) +- [Handling Recurring Access Codes](handling-recurring-access-codes.md) +- [what-is-an-action-attempt-when-is-it-used.md](what-is-an-action-attempt-when-is-it-used.md 'mention') diff --git a/docs/guides/reference/help-center/handling-recurring-access-codes.md b/trash/guides/reference/help-center/handling-recurring-access-codes.md similarity index 89% rename from docs/guides/reference/help-center/handling-recurring-access-codes.md rename to trash/guides/reference/help-center/handling-recurring-access-codes.md index bb01f98ad..d75f3de38 100644 --- a/docs/guides/reference/help-center/handling-recurring-access-codes.md +++ b/trash/guides/reference/help-center/handling-recurring-access-codes.md @@ -20,16 +20,15 @@ There are three main steps to implementing recurring access codes: 1. Create an access code at it's first scheduled "active period" 2. Set up a webhook for `access_code.removed_from_device` -3. Whenever an access\_code is deleted, set the access code's starts\_at and ends\_at to the next active period +3. Whenever an access_code is deleted, set the access code's starts_at and ends_at to the next active period ## 1. Create an Access Code at it's First Scheduled "Active Period" First, create an access code at the first "active period". Let's say that the first active period is tomorrow from 9am to 5pm. We'll create an access code the appropriate `starts_at` and `ends_at` time, then we'll save that access code to a user's `recurring_access_code_id` property, as shown below: - - {% tabs %} {% tab title="Python" %} + ```python from datetime import datetime, timedelta @@ -47,51 +46,49 @@ access_code = seam.access_codes.create( # Let's save this access code to a user my_user.recurring_access_code_id = access_code.access_code_id ``` + {% endtab %} {% endtabs %} ## 2. Set up a webhook for `access_code.removed_from_device` -From the [Seam Console](https://console.seam.co/), set up a webhook to handle the `access_code.removed_from_device` event. This event is triggered whenever an access code is fully removed from a device, or at it's ends\_at time. By setting up a webhook, you'll receive an event every time the access code is removed. +From the [Seam Console](https://console.seam.co/), set up a webhook to handle the `access_code.removed_from_device` event. This event is triggered whenever an access code is fully removed from a device, or at it's ends_at time. By setting up a webhook, you'll receive an event every time the access code is removed.

Creating a webhook for access_code.removed_from_device from console.seam.co

-## 3. Whenever an access\_code is deleted, create a new access code with the starts\_at and ends\_at to the next active period +## 3. Whenever an access_code is deleted, create a new access code with the starts_at and ends_at to the next active period Whenever your webhook endpoint is called to indicate that the access code has been removed, you should create a new access code at the next active period and replace the access code attached to the user. {% tabs %} {% tab title="Python" %} + ```python @app.route('/handle_event', methods=['POST']) def handle_event(): event = request.json["event"] - + if event["event_type"] == "access_code.removed_from_device": user = get_db_user(recurring_access_code_id=event["access_code_id"]) - + if user.has_recurring_daily_code: # Create a new access code for the next active period tomorrow = datetime.now() + timedelta(days=1) tomorrow_9am = tomorrow.replace(hour=9, minute=0, second=0, microsecond=0) tomorrow_5pm = tomorrow.replace(hour=17, minute=0, second=0, microsecond=0) - + new_access_code = seam.access_codes.create( name="My Recurring Access Code", starts_at=tomorrow_9am.isoformat(), ends_at=tomorrow_5pm.isoformat() ) - + user.recurring_access_code_id = new_access_code.access_code_id user.save() - + ``` + {% endtab %} {% endtabs %} ## - - - - - diff --git a/docs/guides/reference/help-center/how-often-am-i-billed-with-seam.md b/trash/guides/reference/help-center/how-often-am-i-billed-with-seam.md similarity index 100% rename from docs/guides/reference/help-center/how-often-am-i-billed-with-seam.md rename to trash/guides/reference/help-center/how-often-am-i-billed-with-seam.md diff --git a/docs/guides/reference/help-center/what-is-an-action-attempt-when-is-it-used.md b/trash/guides/reference/help-center/what-is-an-action-attempt-when-is-it-used.md similarity index 100% rename from docs/guides/reference/help-center/what-is-an-action-attempt-when-is-it-used.md rename to trash/guides/reference/help-center/what-is-an-action-attempt-when-is-it-used.md diff --git a/docs/guides/seam-bridge/connecting-with-doorking.md b/trash/guides/seam-bridge/connecting-with-doorking.md similarity index 100% rename from docs/guides/seam-bridge/connecting-with-doorking.md rename to trash/guides/seam-bridge/connecting-with-doorking.md diff --git a/docs/guides/ui-components/overview/make-a-supported-devices-page-with-react.md b/trash/guides/ui-components/overview/make-a-supported-devices-page-with-react.md similarity index 87% rename from docs/guides/ui-components/overview/make-a-supported-devices-page-with-react.md rename to trash/guides/ui-components/overview/make-a-supported-devices-page-with-react.md index 483ad2d23..a3b3117af 100644 --- a/docs/guides/ui-components/overview/make-a-supported-devices-page-with-react.md +++ b/trash/guides/ui-components/overview/make-a-supported-devices-page-with-react.md @@ -27,10 +27,10 @@ Go to [console.seam.co](https://console.seam.co) and select "Client Sessions" fr ## 3 — Import and Drop In the [\ Component](https://react.seam.co/?path=/docs/components-supporteddevicetable--docs) ```javascript -import { SeamProvider, SupportedDeviceTable } from "@seamapi/react" +import { SeamProvider, SupportedDeviceTable } from '@seamapi/react' export const App = () => ( - + ) @@ -40,11 +40,9 @@ You should see a list of device models like what's shown below:
- - ## Next Steps -* View and play with other components in the [interactive storybook component library](https://react.seam.co/) -* Check out some [Full Example Apps](https://github.com/seamapi/react/tree/main/examples) +- View and play with other components in the [interactive storybook component library](https://react.seam.co/) +- Check out some [Full Example Apps](https://github.com/seamapi/react/tree/main/examples) If you have any questions or want to report an issue, email us at support@seam.co. diff --git a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/README.md b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/README.md similarity index 93% rename from docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/README.md rename to trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/README.md index 33c17c51d..342c09f8f 100644 --- a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/README.md +++ b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/README.md @@ -9,20 +9,19 @@ description: >- #### Prerequisites -* **Compile SDK:** 35 -* **Kotlin Version:** 2.1.0 or greater -* **Minimum Android SDK:** The required `minSdk` depends on the specific Seam integration modules you include: - * Base SDK (Core, API, Common, Network, Analytics): **API Level 24** (Android 7.0) - * Including `saltoks` or `saltospace`: **API Level 24** (Android 7.0) - * Including `latch`: **API Level 26** (Android 8.0) - * Including `assaabloy`: **API Level 28** (Android 9.0) - - Your application's `minSdk` must be set to the **highest** level required by any of the Seam modules you use. +- **Compile SDK:** 35 +- **Kotlin Version:** 2.1.0 or greater +- **Minimum Android SDK:** The required `minSdk` depends on the specific Seam integration modules you include: + - Base SDK (Core, API, Common, Network, Analytics): **API Level 24** (Android 7.0) + - Including `saltoks` or `saltospace`: **API Level 24** (Android 7.0) + - Including `latch`: **API Level 26** (Android 8.0) + - Including `assaabloy`: **API Level 28** (Android 9.0) + Your application's `minSdk` must be set to the **highest** level required by any of the Seam modules you use. You should already have a Seam workspace and API key set up. If you’re new to Seam, start with the [Seam Mobile SDK](https://docs.seam.co/latest/developer-tools/mobile-sdks/android-sdk). -*** +--- ### Installation @@ -31,6 +30,7 @@ Setup your project to get the Android SDK Packages form GitHub, as described [he Add the Seam Components library and required SDK modules to your app's `build.gradle.kts` (or `build.gradle` for Groovy): **Kotlin DSL (`build.gradle.kts`):** + ```kotlin dependencies { val seamVersion = "3.1.1" // Check for latest version @@ -50,6 +50,7 @@ dependencies { ``` **Groovy (`build.gradle`):** + ```groovy dependencies { def seamVersion = "3.1.1" // Check for latest version @@ -77,6 +78,7 @@ dependencies { `SeamAccessView` is the main entry point composable for the Seam access management interface. This powerful component manages the entire user flow for accessing and managing credentials through the Seam SDK, making it the perfect choice for most applications. **What SeamAccessView handles for you:** + - **SDK Initialization**: Automatically initializes the Seam SDK with your session token - **Navigation Management**: Handles screen transitions and navigation state - **UI State Management**: Manages loading, error handling, and different application states @@ -85,6 +87,7 @@ dependencies { **Screen Orchestration:** SeamAccessView automatically navigates between these screens based on application state: + - **Credentials List Screen**: For viewing available keys with pull-to-refresh functionality - **OTP Authorization Screen**: For completing authentication flows in a WebView - **Bluetooth Redirect Screen**: For handling Bluetooth permission and setup @@ -125,6 +128,7 @@ fun MyApp() { ``` **Parameters:** + - `clientSessionToken`: Required session token for SDK authentication and initialization - `context`: Android context (defaults to current composition's local context) - `navController`: Navigation controller for screen transitions (defaults to a new instance) @@ -136,10 +140,10 @@ fun MyApp() { Client Session Tokens authenticate your mobile app with Seam's backend. These tokens should be generated by your backend server using Seam's API. #### Obtaining a CST + Ask Seam about how to obtain a CST. For more details see [Seam's Client Session Token documentation](https://docs.seam.co/latest/core-concepts/authentication/client-session-tokens). - #### SDK Initialization When using individual components instead of `SeamAccessView`, you must manually initialize the Seam SDK: @@ -179,6 +183,7 @@ When you need more granular control than `SeamAccessView` provides, you can use **What it does:** A composable screen that displays cards for user credentials (keys) with comprehensive state management and user interaction support. **Key Features:** + - **State Management**: Automatically handles loading, success with data, and empty states - **Pull-to-Refresh**: Built-in refresh functionality for updating credential data - **Error Handling**: Displays appropriate user feedback for error states @@ -209,6 +214,7 @@ fun CredentialsScreen() { **What it does:** A modal bottom sheet composable that provides a complete user interface for unlocking credentials with phase-based state management. **Key Features:** + - **Modal Presentation**: Displays as an overlay bottom sheet that doesn't disrupt the main UI - **Unlock Phases**: Manages different states (idle, scanning, success, failed) with appropriate UI feedback - **Theme Integration**: Supports customization through SeamUnlockCardStyle theming @@ -251,6 +257,7 @@ fun UnlockModal(keyCard: KeyCard) { **What it does:** A full-screen dialog composable that displays an OTP (One-Time Password) verification interface using a WebView for interactive authentication flows. **Key Features:** + - **Full-Screen Presentation**: Renders as a dialog that overlays the host app's UI completely - **WebView Integration**: Handles OTP verification flows with JavaScript enabled for interactivity - **Custom Navigation**: Includes a styled top bar with back navigation controls @@ -273,4 +280,4 @@ fun OtpScreen() { #### See Also -* Explore [Seam Mobile SDK](https://docs.seam.co/latest/developer-tools/mobile-sdks/android-sdk) +- Explore [Seam Mobile SDK](https://docs.seam.co/latest/developer-tools/mobile-sdks/android-sdk) diff --git a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/README.md b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/README.md similarity index 99% rename from docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/README.md rename to trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/README.md index 4947aa4bf..5b6f47ec0 100644 --- a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/README.md +++ b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/README.md @@ -11,7 +11,7 @@ description: >- Seam Mobile Components are fully customizable using Material 3 theming integrated with Seam's component-specific styling system. You can customize colors, typography, and detailed component styles to match your brand. -*** +--- ### How theming works diff --git a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/colors.md b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/colors.md similarity index 99% rename from docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/colors.md rename to trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/colors.md index d5cad6680..26555438b 100644 --- a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/colors.md +++ b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/colors.md @@ -8,7 +8,9 @@ description: >- Use Material 3 to customize colors. Here is a suggestion of how to customize your app colors. ### Define a data class to hold the colors values: + {% code title="AppColors.kt" %} + ```kotlin data class AppColors( val background: Color, @@ -25,13 +27,15 @@ data class AppColors( val cardBackgroundGradient: List, ) ``` + {% endcode %} ### Create instances of `AppColors` for light and dark modes: {% code title="ColorConstants.kt" %} + ```kotlin -// +// val lightAppColors = AppColors( background = Color(0xFFF8FAFC), headerBackground = Color(0xFFDADCDE), @@ -62,11 +66,13 @@ val darkAppColors = AppColors( cardBackgroundGradient = listOf(Color(0xFF1E293B), Color(0xFF334155)) ) ``` + {% endcode %} ### Set the color scheme to `SeamComponentsTheme` {% code title="MainActivity.kt" %} + ```kotlin @Composable fun MyApp() { @@ -77,7 +83,7 @@ fun MyApp() { darkTheme -> darkAppColors else -> lightAppColors } - + // Create the color scheme val colorScheme = when { darkTheme -> darkColorScheme( @@ -108,4 +114,5 @@ fun MyApp() { } } ``` -{% endcode %} \ No newline at end of file + +{% endcode %} diff --git a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/fonts.md b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/fonts.md similarity index 98% rename from docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/fonts.md rename to trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/fonts.md index b4d8bbbf7..45543a25d 100644 --- a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/fonts.md +++ b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/fonts.md @@ -7,6 +7,7 @@ description: Set typography roles with Material 3 Typography. You can integrate custom typography with Material 3's typography system: {% code title="MainActivity.kt" %} + ```kotlin @Composable fun MyApp() { @@ -40,4 +41,5 @@ fun MyApp() { } } ``` -{% endcode %} \ No newline at end of file + +{% endcode %} diff --git a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/keycard-styles.md b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/keycard-styles.md similarity index 99% rename from docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/keycard-styles.md rename to trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/keycard-styles.md index 24bee7b35..a3ebac0f3 100644 --- a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/keycard-styles.md +++ b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/keycard-styles.md @@ -29,6 +29,7 @@ data class SeamKeyCardStyle( Check [colors](./colors.md) section to understand how to create `darkAppColors` and `lightAppColors` objects. {% code title="MainActivity.kt" %} + ```kotlin @Composable fun MyApp() { @@ -39,7 +40,7 @@ fun MyApp() { darkTheme -> darkAppColors else -> lightAppColors } - + // Create the color scheme val colorScheme = when { darkTheme -> darkColorScheme( @@ -85,4 +86,5 @@ fun MyApp() { } } ``` + {% endcode %} diff --git a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/unlockcard-styles.md b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/unlockcard-styles.md similarity index 99% rename from docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/unlockcard-styles.md rename to trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/unlockcard-styles.md index 5274317eb..ef821b34d 100644 --- a/docs/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/unlockcard-styles.md +++ b/trash/guides/ui-components/seam-mobile-components/seam-mobile-components-for-android/theming/unlockcard-styles.md @@ -32,6 +32,7 @@ data class SeamUnlockCardStyle( Check [colors](./colors.md) section to understand how to create `darkAppColors` and `lightAppColors` objects. {% code title="MainActivity.kt" %} + ```kotlin @Composable fun MyApp() { @@ -42,7 +43,7 @@ fun MyApp() { darkTheme -> darkAppColors else -> lightAppColors } - + // Create the color scheme val colorScheme = when { darkTheme -> darkColorScheme( @@ -107,5 +108,5 @@ fun MyApp() { } } ``` -{% endcode %} +{% endcode %}