@twin.org/api-models 0.0.1-next.16 → 0.0.1-next.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,22 @@
3
3
  var core = require('@twin.org/core');
4
4
  var web = require('@twin.org/web');
5
5
 
6
+ // Copyright 2024 IOTA Stiftung.
7
+ // SPDX-License-Identifier: Apache-2.0.
8
+ /**
9
+ * Factory for creating implementation of mime type processor types.
10
+ */
11
+ // eslint-disable-next-line @typescript-eslint/naming-convention
12
+ const MimeTypeProcessorFactory = core.Factory.createFactory("mime-type-processor");
13
+
14
+ // Copyright 2024 IOTA Stiftung.
15
+ // SPDX-License-Identifier: Apache-2.0.
16
+ /**
17
+ * Factory for creating implementation of route processor types.
18
+ */
19
+ // eslint-disable-next-line @typescript-eslint/naming-convention
20
+ const RouteProcessorFactory = core.Factory.createFactory("route-processor");
21
+
6
22
  // Copyright 2024 IOTA Stiftung.
7
23
  // SPDX-License-Identifier: Apache-2.0.
8
24
  /**
@@ -129,3 +145,5 @@ const HealthStatus = {
129
145
  exports.HealthStatus = HealthStatus;
130
146
  exports.HttpErrorHelper = HttpErrorHelper;
131
147
  exports.HttpParameterHelper = HttpParameterHelper;
148
+ exports.MimeTypeProcessorFactory = MimeTypeProcessorFactory;
149
+ exports.RouteProcessorFactory = RouteProcessorFactory;
@@ -1,6 +1,22 @@
1
- import { BaseError, GuardError, ConflictError, NotFoundError, AlreadyExistsError, UnauthorizedError, NotImplementedError, UnprocessableError, Is } from '@twin.org/core';
1
+ import { Factory, BaseError, GuardError, ConflictError, NotFoundError, AlreadyExistsError, UnauthorizedError, NotImplementedError, UnprocessableError, Is } from '@twin.org/core';
2
2
  import { HttpStatusCode, HeaderTypes, MimeTypes } from '@twin.org/web';
3
3
 
4
+ // Copyright 2024 IOTA Stiftung.
5
+ // SPDX-License-Identifier: Apache-2.0.
6
+ /**
7
+ * Factory for creating implementation of mime type processor types.
8
+ */
9
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
+ const MimeTypeProcessorFactory = Factory.createFactory("mime-type-processor");
11
+
12
+ // Copyright 2024 IOTA Stiftung.
13
+ // SPDX-License-Identifier: Apache-2.0.
14
+ /**
15
+ * Factory for creating implementation of route processor types.
16
+ */
17
+ // eslint-disable-next-line @typescript-eslint/naming-convention
18
+ const RouteProcessorFactory = Factory.createFactory("route-processor");
19
+
4
20
  // Copyright 2024 IOTA Stiftung.
5
21
  // SPDX-License-Identifier: Apache-2.0.
6
22
  /**
@@ -124,4 +140,4 @@ const HealthStatus = {
124
140
  Error: "error"
125
141
  };
126
142
 
127
- export { HealthStatus, HttpErrorHelper, HttpParameterHelper };
143
+ export { HealthStatus, HttpErrorHelper, HttpParameterHelper, MimeTypeProcessorFactory, RouteProcessorFactory };
@@ -0,0 +1,6 @@
1
+ import { Factory } from "@twin.org/core";
2
+ import type { IMimeTypeProcessor } from "../models/server/IMimeTypeProcessor";
3
+ /**
4
+ * Factory for creating implementation of mime type processor types.
5
+ */
6
+ export declare const MimeTypeProcessorFactory: Factory<IMimeTypeProcessor>;
@@ -0,0 +1,6 @@
1
+ import { Factory } from "@twin.org/core";
2
+ import type { IBaseRouteProcessor } from "../models/server/IBaseRouteProcessor";
3
+ /**
4
+ * Factory for creating implementation of route processor types.
5
+ */
6
+ export declare const RouteProcessorFactory: Factory<IBaseRouteProcessor<import("..").IBaseRoute>>;
@@ -1,3 +1,5 @@
1
+ export * from "./factories/mimeTypeProcessorFactory";
2
+ export * from "./factories/routeProcessorFactory";
1
3
  export * from "./helpers/httpErrorHelper";
2
4
  export * from "./helpers/httpParameterHelper";
3
5
  export * from "./models/api/IServerHealthResponse";
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/api-models - Changelog
2
2
 
3
- ## v0.0.1-next.16
3
+ ## v0.0.1-next.18
4
4
 
5
5
  - Initial Release
@@ -59,4 +59,6 @@
59
59
 
60
60
  ## Variables
61
61
 
62
+ - [MimeTypeProcessorFactory](variables/MimeTypeProcessorFactory.md)
63
+ - [RouteProcessorFactory](variables/RouteProcessorFactory.md)
62
64
  - [HealthStatus](variables/HealthStatus.md)
@@ -0,0 +1,5 @@
1
+ # Variable: MimeTypeProcessorFactory
2
+
3
+ > `const` **MimeTypeProcessorFactory**: `Factory`\<[`IMimeTypeProcessor`](../interfaces/IMimeTypeProcessor.md)\>
4
+
5
+ Factory for creating implementation of mime type processor types.
@@ -0,0 +1,5 @@
1
+ # Variable: RouteProcessorFactory
2
+
3
+ > `const` **RouteProcessorFactory**: `Factory`\<[`IBaseRouteProcessor`](../interfaces/IBaseRouteProcessor.md)\<[`IBaseRoute`](../interfaces/IBaseRoute.md)\>\>
4
+
5
+ Factory for creating implementation of route processor types.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/api-models",
3
- "version": "0.0.1-next.16",
3
+ "version": "0.0.1-next.18",
4
4
  "description": "Contains models and classes for use with APIs",
5
5
  "repository": {
6
6
  "type": "git",