diff --git a/src/lib/infrastructure/ioc/features/list-did-contents-feature.ts b/src/lib/infrastructure/ioc/features/list-did-contents-feature.ts new file mode 100644 index 00000000..8ae6839b --- /dev/null +++ b/src/lib/infrastructure/ioc/features/list-did-contents-feature.ts @@ -0,0 +1,55 @@ +import DIDGatewayOutputPort from "@/lib/core/port/secondary/did-gateway-output-port" +import { + ListDIDContentsError, + ListDIDContentsRequest, + ListDIDContentsResponse, +} from "@/lib/core/usecase-models/list-did-contents-usecase-models" +import { ListDIDContentsControllerParameters } from "@/lib/infrastructure/controller/list-did-contents-controller" +import ListDIDContentsController from "@/lib/infrastructure/controller/list-did-contents-controller" +import { DIDViewModel } from "@/lib/infrastructure/data/view-model/did" +import { + BaseStreamableFeature, + IOCSymbols, +} from "@/lib/sdk/ioc-helpers" +import GATEWAYS from "@/lib/infrastructure/ioc/ioc-symbols-gateway" +import CONTROLLERS from "@/lib/infrastructure/ioc/ioc-symbols-controllers" +import INPUT_PORT from "@/lib/infrastructure/ioc/ioc-symbols-input-port" +import USECASE_FACTORY from "@/lib/infrastructure/ioc/ioc-symbols-usecase-factory" +import { Container } from 'inversify' + +import ListDIDContentsUseCase from "@/lib/core/use-case/list-did-contents-usecase" + +import ListDIDContentsPresenter from "@/lib/infrastructure/presenter/list-did-contents-presenter" + + + +export default class ListDIDContentsFeature extends BaseStreamableFeature< + ListDIDContentsControllerParameters, + ListDIDContentsRequest, + ListDIDContentsResponse, + ListDIDContentsError, + DIDViewModel +> { + constructor(appContainer: Container) { + const didGateway = appContainer.get(GATEWAYS.DID) + + const symbols: IOCSymbols = { + CONTROLLER: CONTROLLERS.LIST_DID_CONTENTS, + USECASE_FACTORY: USECASE_FACTORY.LIST_DID_CONTENTS, + INPUT_PORT: INPUT_PORT.LIST_DID_CONTENTS, + } + const useCaseConstructorArgs = [ + didGateway, + + ] + super( + 'ListDIDContents', + ListDIDContentsController, + ListDIDContentsUseCase, + useCaseConstructorArgs, + ListDIDContentsPresenter, + false, + symbols + ) + } +} \ No newline at end of file diff --git a/src/lib/infrastructure/ioc/ioc-symbols-controllers.ts b/src/lib/infrastructure/ioc/ioc-symbols-controllers.ts index 12915bb2..cb9bcb17 100644 --- a/src/lib/infrastructure/ioc/ioc-symbols-controllers.ts +++ b/src/lib/infrastructure/ioc/ioc-symbols-controllers.ts @@ -10,6 +10,7 @@ const CONTROLLERS = { GET_SUBSCRIPTION: Symbol.for("GetSubscriptionController"), LOGIN_CONFIG: Symbol.for("LoginConfigController"), LIST_DIDS: Symbol.for("ListDIDsController"), + LIST_DID_CONTENTS: Symbol.for("ListDIDContentsController"), LIST_DID_PARENTS: Symbol.for("ListDIDParentsController"), LIST_DID_RULES: Symbol.for("ListDIDRulesController"), LIST_DATASET_REPLICAS: Symbol.for("ListDatasetReplicasController"), diff --git a/src/lib/infrastructure/ioc/ioc-symbols-input-port.ts b/src/lib/infrastructure/ioc/ioc-symbols-input-port.ts index 81549df3..6e317585 100644 --- a/src/lib/infrastructure/ioc/ioc-symbols-input-port.ts +++ b/src/lib/infrastructure/ioc/ioc-symbols-input-port.ts @@ -8,6 +8,7 @@ const INPUT_PORT = { GET_SUBSCRIPTION: Symbol.for("GetSubscriptionInputPort"), LOGIN_CONFIG: Symbol.for("LoginConfigInputPort"), LIST_DIDS: Symbol.for("ListDIDsInputPort"), + LIST_DID_CONTENTS: Symbol.for("ListDIDContentsInputPort"), LIST_DID_PARENTS: Symbol.for("ListDIDParentsInputPort"), LIST_DID_RULES: Symbol.for("ListDIDRulesInputPort"), LIST_DATASET_REPLICAS: Symbol.for("ListDatasetReplicasInputPort"),