import type * as servezoneInterfaces from '@serve.zone/interfaces';
import * as plugins from '../plugins.js';
import * as data from '../data/index.js';

export type IReq_HostedApp_ReportLifecycleState = servezoneInterfaces.requests.hostedapp.IReq_HostedApp_ReportLifecycleState;
export type IReq_HostedApp_GetLifecycleState = servezoneInterfaces.requests.hostedapp.IReq_HostedApp_GetLifecycleState;
export type IReq_HostedApp_RequestBootstrapAction = servezoneInterfaces.requests.hostedapp.IReq_HostedApp_RequestBootstrapAction;
export type IReq_HostedApp_CompleteBootstrapAction = servezoneInterfaces.requests.hostedapp.IReq_HostedApp_CompleteBootstrapAction;
export type IReq_HostedApp_StartManagedUpgrade = servezoneInterfaces.requests.hostedapp.IReq_HostedApp_StartManagedUpgrade;
export type IReq_HostedApp_GetManagedUpgradeStatus = servezoneInterfaces.requests.hostedapp.IReq_HostedApp_GetManagedUpgradeStatus;

export interface IReq_GetHostedAppLifecycleForService extends plugins.typedrequestInterfaces.implementsTR<
  plugins.typedrequestInterfaces.ITypedRequest,
  IReq_GetHostedAppLifecycleForService
> {
  method: 'getHostedAppLifecycleForService';
  request: {
    identity: data.IIdentity;
    serviceName: string;
  };
  response: {
    state?: data.IHostedAppLifecycleState;
  };
}

export interface IReq_DismissHostedAppBootstrapAction extends plugins.typedrequestInterfaces.implementsTR<
  plugins.typedrequestInterfaces.ITypedRequest,
  IReq_DismissHostedAppBootstrapAction
> {
  method: 'dismissHostedAppBootstrapAction';
  request: {
    identity: data.IIdentity;
    serviceName: string;
  };
  response: {
    state?: data.IHostedAppLifecycleState;
  };
}
