| 1 | import type * as mi from "@distilled.cloud/aws/iot-managed-integrations"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Request for {@link StartDeviceDiscovery}. |
| 7 | */ |
| 8 | export interface StartDeviceDiscoveryRequest |
| 9 | extends mi.StartDeviceDiscoveryRequest {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `iotmanagedintegrations:StartDeviceDiscovery` |
| 13 | * (account-level). |
| 14 | * |
| 15 | * Starts a discovery scan for devices reachable through a controller |
| 16 | * (`ZWAVE`/`ZIGBEE`), a cloud-to-cloud connector (`CLOUD`), or a custom |
| 17 | * protocol. Provide the implementation with |
| 18 | * `Effect.provide(AWS.IoTManagedIntegrations.StartDeviceDiscoveryHttp)`. |
| 19 | * |
| 20 | * ### Discovering Devices |
| 21 | * **Example:** Start a Zigbee Discovery Scan |
| 22 | * ```typescript |
| 23 | * // init — account-level binding takes no resource |
| 24 | * const startDiscovery = yield* IoTManagedIntegrations.StartDeviceDiscovery(); |
| 25 | * |
| 26 | * // runtime |
| 27 | * const { Id } = yield* startDiscovery({ |
| 28 | * DiscoveryType: "ZIGBEE", |
| 29 | * ControllerIdentifier: controllerManagedThingId, |
| 30 | * }); |
| 31 | * ``` |
| 32 | * |
| 33 | * @binding |
| 34 | */ |
| 35 | export interface StartDeviceDiscovery extends Binding.Service< |
| 36 | StartDeviceDiscovery, |
| 37 | "AWS.IoTManagedIntegrations.StartDeviceDiscovery", |
| 38 | () => Effect.Effect< |
| 39 | ( |
| 40 | request: StartDeviceDiscoveryRequest, |
| 41 | ) => Effect.Effect< |
| 42 | mi.StartDeviceDiscoveryResponse, |
| 43 | mi.StartDeviceDiscoveryError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | export const StartDeviceDiscovery = Binding.Service<StartDeviceDiscovery>( |
| 48 | "AWS.IoTManagedIntegrations.StartDeviceDiscovery", |
| 49 | ); |