sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ LicenseManager/ CheckInLicense.ts

import type * as licensemanager from "@distilled.cloud/aws/license-manager";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Request for {@link CheckInLicense}.
 */
export interface CheckInLicenseRequest extends licensemanager.CheckInLicenseRequest {}

/**
 * Runtime binding for `license-manager:CheckInLicense` — return a
 * previously checked-out entitlement to the license pool using the
 * consumption token from {@link CheckoutLicense}.
 *
 * Provide the implementation with
 * `Effect.provide(AWS.LicenseManager.CheckInLicenseHttp)`.
 * ### License Checkout Data Plane
 * **Example:** Check an Entitlement Back In
 * ```typescript
 * // init
 * const checkInLicense = yield* AWS.LicenseManager.CheckInLicense();
 *
 * // runtime
 * yield* checkInLicense({ LicenseConsumptionToken: token });
 * ```
 *
 * @binding
 */
export interface CheckInLicense extends Binding.Service<
  CheckInLicense,
  "AWS.LicenseManager.CheckInLicense",
  () => Effect.Effect<
    (
      request: CheckInLicenseRequest,
    ) => Effect.Effect<licensemanager.CheckInLicenseResponse, licensemanager.CheckInLicenseError>
  >
> {}
export const CheckInLicense = Binding.Service<CheckInLicense>("AWS.LicenseManager.CheckInLicense");