diff --git a/src/ts/@overflow/sensor/redux/action/sensor_item_read.ts b/src/ts/@overflow/sensor/redux/action/item_read.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_item_read.ts rename to src/ts/@overflow/sensor/redux/action/item_read.ts diff --git a/src/ts/@overflow/sensor/redux/action/sensor_item_read_by_sensor.ts b/src/ts/@overflow/sensor/redux/action/item_read_by_sensor.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_item_read_by_sensor.ts rename to src/ts/@overflow/sensor/redux/action/item_read_by_sensor.ts diff --git a/src/ts/@overflow/sensor/redux/action/sensor_item_regist.ts b/src/ts/@overflow/sensor/redux/action/item_regist.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_item_regist.ts rename to src/ts/@overflow/sensor/redux/action/item_regist.ts diff --git a/src/ts/@overflow/sensor/redux/action/sensor_item_remove.ts b/src/ts/@overflow/sensor/redux/action/item_remove.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_item_remove.ts rename to src/ts/@overflow/sensor/redux/action/item_remove.ts diff --git a/src/ts/@overflow/sensor/redux/action/sensor_read.ts b/src/ts/@overflow/sensor/redux/action/read.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_read.ts rename to src/ts/@overflow/sensor/redux/action/read.ts diff --git a/src/ts/@overflow/sensor/redux/action/sensor_read_by_target.ts b/src/ts/@overflow/sensor/redux/action/read_by_target.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_read_by_target.ts rename to src/ts/@overflow/sensor/redux/action/read_by_target.ts diff --git a/src/ts/@overflow/sensor/redux/action/sensor_regist.ts b/src/ts/@overflow/sensor/redux/action/regist.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_regist.ts rename to src/ts/@overflow/sensor/redux/action/regist.ts diff --git a/src/ts/@overflow/sensor/redux/action/sensor_remove.ts b/src/ts/@overflow/sensor/redux/action/remove.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_remove.ts rename to src/ts/@overflow/sensor/redux/action/remove.ts diff --git a/src/ts/@overflow/sensor/redux/action/sensor_start.ts b/src/ts/@overflow/sensor/redux/action/start.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_start.ts rename to src/ts/@overflow/sensor/redux/action/start.ts diff --git a/src/ts/@overflow/sensor/redux/action/sensor_stop.ts b/src/ts/@overflow/sensor/redux/action/stop.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/action/sensor_stop.ts rename to src/ts/@overflow/sensor/redux/action/stop.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorItemReadBySensorPayload.ts b/src/ts/@overflow/sensor/redux/payload/ItemReadBySensorPayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorItemReadBySensorPayload.ts rename to src/ts/@overflow/sensor/redux/payload/ItemReadBySensorPayload.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorItemReadPayload.ts b/src/ts/@overflow/sensor/redux/payload/ItemReadPayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorItemReadPayload.ts rename to src/ts/@overflow/sensor/redux/payload/ItemReadPayload.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorItemRegistPayload.ts b/src/ts/@overflow/sensor/redux/payload/ItemRegistPayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorItemRegistPayload.ts rename to src/ts/@overflow/sensor/redux/payload/ItemRegistPayload.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorItemRemovePayload.ts b/src/ts/@overflow/sensor/redux/payload/ItemRemovePayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorItemRemovePayload.ts rename to src/ts/@overflow/sensor/redux/payload/ItemRemovePayload.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorReadByTargetPayload.ts b/src/ts/@overflow/sensor/redux/payload/ReadByTargetPayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorReadByTargetPayload.ts rename to src/ts/@overflow/sensor/redux/payload/ReadByTargetPayload.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorReadPayload.ts b/src/ts/@overflow/sensor/redux/payload/ReadPayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorReadPayload.ts rename to src/ts/@overflow/sensor/redux/payload/ReadPayload.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorRegistPayload.ts b/src/ts/@overflow/sensor/redux/payload/RegistPayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorRegistPayload.ts rename to src/ts/@overflow/sensor/redux/payload/RegistPayload.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorRemovePayload.ts b/src/ts/@overflow/sensor/redux/payload/RemovePayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorRemovePayload.ts rename to src/ts/@overflow/sensor/redux/payload/RemovePayload.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorSatartPayload.ts b/src/ts/@overflow/sensor/redux/payload/SatartPayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorSatartPayload.ts rename to src/ts/@overflow/sensor/redux/payload/SatartPayload.ts diff --git a/src/ts/@overflow/sensor/redux/payload/SensorStopPayload.ts b/src/ts/@overflow/sensor/redux/payload/StopPayload.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/payload/SensorStopPayload.ts rename to src/ts/@overflow/sensor/redux/payload/StopPayload.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_item_read.ts b/src/ts/@overflow/sensor/redux/reducer/item_read.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_item_read.ts rename to src/ts/@overflow/sensor/redux/reducer/item_read.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_item_read_by_sensor.ts b/src/ts/@overflow/sensor/redux/reducer/item_read_by_sensor.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_item_read_by_sensor.ts rename to src/ts/@overflow/sensor/redux/reducer/item_read_by_sensor.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_item_regist.ts b/src/ts/@overflow/sensor/redux/reducer/item_regist.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_item_regist.ts rename to src/ts/@overflow/sensor/redux/reducer/item_regist.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_item_remove.ts b/src/ts/@overflow/sensor/redux/reducer/item_remove.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_item_remove.ts rename to src/ts/@overflow/sensor/redux/reducer/item_remove.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_read.ts b/src/ts/@overflow/sensor/redux/reducer/read.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_read.ts rename to src/ts/@overflow/sensor/redux/reducer/read.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_read_by_target.ts b/src/ts/@overflow/sensor/redux/reducer/read_by_target.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_read_by_target.ts rename to src/ts/@overflow/sensor/redux/reducer/read_by_target.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_regist.ts b/src/ts/@overflow/sensor/redux/reducer/regist.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_regist.ts rename to src/ts/@overflow/sensor/redux/reducer/regist.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_remove.ts b/src/ts/@overflow/sensor/redux/reducer/remove.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_remove.ts rename to src/ts/@overflow/sensor/redux/reducer/remove.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_start.ts b/src/ts/@overflow/sensor/redux/reducer/start.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_start.ts rename to src/ts/@overflow/sensor/redux/reducer/start.ts diff --git a/src/ts/@overflow/sensor/redux/reducer/sensor_stop.ts b/src/ts/@overflow/sensor/redux/reducer/stop.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/reducer/sensor_stop.ts rename to src/ts/@overflow/sensor/redux/reducer/stop.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_item_read.ts b/src/ts/@overflow/sensor/redux/saga/item_read.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_item_read.ts rename to src/ts/@overflow/sensor/redux/saga/item_read.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_item_read_by_sensor.ts b/src/ts/@overflow/sensor/redux/saga/item_read_by_sensor.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_item_read_by_sensor.ts rename to src/ts/@overflow/sensor/redux/saga/item_read_by_sensor.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_item_regist.ts b/src/ts/@overflow/sensor/redux/saga/item_regist.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_item_regist.ts rename to src/ts/@overflow/sensor/redux/saga/item_regist.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_item_remove.ts b/src/ts/@overflow/sensor/redux/saga/item_remove.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_item_remove.ts rename to src/ts/@overflow/sensor/redux/saga/item_remove.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_read.ts b/src/ts/@overflow/sensor/redux/saga/read.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_read.ts rename to src/ts/@overflow/sensor/redux/saga/read.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_read_by_target.ts b/src/ts/@overflow/sensor/redux/saga/read_by_target.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_read_by_target.ts rename to src/ts/@overflow/sensor/redux/saga/read_by_target.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_regist.ts b/src/ts/@overflow/sensor/redux/saga/regist.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_regist.ts rename to src/ts/@overflow/sensor/redux/saga/regist.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_remove.ts b/src/ts/@overflow/sensor/redux/saga/remove.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_remove.ts rename to src/ts/@overflow/sensor/redux/saga/remove.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_start.ts b/src/ts/@overflow/sensor/redux/saga/start.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_start.ts rename to src/ts/@overflow/sensor/redux/saga/start.ts diff --git a/src/ts/@overflow/sensor/redux/saga/sensor_stop.ts b/src/ts/@overflow/sensor/redux/saga/stop.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/saga/sensor_stop.ts rename to src/ts/@overflow/sensor/redux/saga/stop.ts diff --git a/src/ts/@overflow/sensor/redux/state/SensorItemRead.ts b/src/ts/@overflow/sensor/redux/state/ItemRead.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/state/SensorItemRead.ts rename to src/ts/@overflow/sensor/redux/state/ItemRead.ts diff --git a/src/ts/@overflow/sensor/redux/state/SensorItemReadBySensor.ts b/src/ts/@overflow/sensor/redux/state/ItemReadBySensor.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/state/SensorItemReadBySensor.ts rename to src/ts/@overflow/sensor/redux/state/ItemReadBySensor.ts diff --git a/src/ts/@overflow/sensor/redux/state/SensorItemRegist.ts b/src/ts/@overflow/sensor/redux/state/ItemRegist.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/state/SensorItemRegist.ts rename to src/ts/@overflow/sensor/redux/state/ItemRegist.ts diff --git a/src/ts/@overflow/sensor/redux/state/SensorItemRemove.ts b/src/ts/@overflow/sensor/redux/state/ItemRemove.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/state/SensorItemRemove.ts rename to src/ts/@overflow/sensor/redux/state/ItemRemove.ts diff --git a/src/ts/@overflow/sensor/redux/state/SensorRead.ts b/src/ts/@overflow/sensor/redux/state/Read.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/state/SensorRead.ts rename to src/ts/@overflow/sensor/redux/state/Read.ts diff --git a/src/ts/@overflow/sensor/redux/state/SensorRegist.ts b/src/ts/@overflow/sensor/redux/state/Regist.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/state/SensorRegist.ts rename to src/ts/@overflow/sensor/redux/state/Regist.ts diff --git a/src/ts/@overflow/sensor/redux/state/SensorRemove.ts b/src/ts/@overflow/sensor/redux/state/Remove.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/state/SensorRemove.ts rename to src/ts/@overflow/sensor/redux/state/Remove.ts diff --git a/src/ts/@overflow/sensor/redux/state/SensorStart.ts b/src/ts/@overflow/sensor/redux/state/Start.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/state/SensorStart.ts rename to src/ts/@overflow/sensor/redux/state/Start.ts diff --git a/src/ts/@overflow/sensor/redux/state/SensorStop.ts b/src/ts/@overflow/sensor/redux/state/Stop.ts similarity index 100% rename from src/ts/@overflow/sensor/redux/state/SensorStop.ts rename to src/ts/@overflow/sensor/redux/state/Stop.ts diff --git a/src/ts/@overflow/target/redux/action/regist.ts b/src/ts/@overflow/target/redux/action/regist.ts index e69de29..8dca3c8 100644 --- a/src/ts/@overflow/target/redux/action/regist.ts +++ b/src/ts/@overflow/target/redux/action/regist.ts @@ -0,0 +1,45 @@ +import Action from '@overflow/commons/redux/Action'; +import Target from '../../api/model/Target'; +import RegistPayload from '../payload/RegistPayload'; +import Infra from '@overflow/infra/api/model/Infra'; +import Probe from '@overflow/probe/api/model/Probe'; + +// Action Type +export type REQUEST = '@overflow/target/regist/REQUEST'; +export type REQUEST_SUCCESS = '@overflow/target/regist/REQUEST_SUCCESS'; +export type REQUEST_FAILURE = '@overflow/target/regist/REQUEST_FAILURE'; + +export const REQUEST: REQUEST = '@overflow/target/regist/REQUEST'; +export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/target/regist/REQUEST_SUCCESS'; +export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/target/regist/REQUEST_FAILURE'; + +// Action Creater +export type request = (probe: Probe, infra: Infra) => Action; +export type requestSuccess = (target: Target) => Action; +export type requestFailure = (error: Error) => Action; + + + +export const request: request = (probe: Probe, infra: Infra): Action => { + return { + type: REQUEST, + payload: { + probe: probe, + infra: infra, + }, + }; +}; + +export const requestSuccess: requestSuccess = (apiKey: ApiKey): Action => { + return { + type: REQUEST_SUCCESS, + payload: apiKey, + }; +}; + +export const requestFailure: requestFailure = (error: Error): Action => { + return { + type: REQUEST_FAILURE, + error: error, + }; +}; diff --git a/src/ts/@overflow/target/redux/payload/RegistPayload.ts b/src/ts/@overflow/target/redux/payload/RegistPayload.ts index 5c15c15..a11c90d 100644 --- a/src/ts/@overflow/target/redux/payload/RegistPayload.ts +++ b/src/ts/@overflow/target/redux/payload/RegistPayload.ts @@ -1,3 +1,9 @@ -/** - * Created by geek on 17. 7. 3. - */ +import Infra from '@overflow/infra/api/model/Infra'; +import Probe from '@overflow/probe/api/model/Probe'; + +interface RegistPayload { + infra: Infra; + probe: Probe; +} + +export default RegistPayload;