@navios/openapi 0.7.0 → 0.9.1

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/dist/legacy-compat/__type-tests__/legacy-decorators.spec-d.d.mts +2 -0
  3. package/dist/legacy-compat/__type-tests__/legacy-decorators.spec-d.d.mts.map +1 -0
  4. package/dist/legacy-compat/__type-tests__/tsconfig.tsbuildinfo +1 -0
  5. package/dist/src/legacy-compat/decorators/api-deprecated.decorator.d.mts +35 -0
  6. package/dist/src/legacy-compat/decorators/api-deprecated.decorator.d.mts.map +1 -0
  7. package/dist/src/legacy-compat/decorators/api-exclude.decorator.d.mts +28 -0
  8. package/dist/src/legacy-compat/decorators/api-exclude.decorator.d.mts.map +1 -0
  9. package/dist/src/legacy-compat/decorators/api-operation.decorator.d.mts +60 -0
  10. package/dist/src/legacy-compat/decorators/api-operation.decorator.d.mts.map +1 -0
  11. package/dist/src/legacy-compat/decorators/api-security.decorator.d.mts +38 -0
  12. package/dist/src/legacy-compat/decorators/api-security.decorator.d.mts.map +1 -0
  13. package/dist/src/legacy-compat/decorators/api-stream.decorator.d.mts +52 -0
  14. package/dist/src/legacy-compat/decorators/api-stream.decorator.d.mts.map +1 -0
  15. package/dist/src/legacy-compat/decorators/api-summary.decorator.d.mts +26 -0
  16. package/dist/src/legacy-compat/decorators/api-summary.decorator.d.mts.map +1 -0
  17. package/dist/src/legacy-compat/decorators/api-tag.decorator.d.mts +44 -0
  18. package/dist/src/legacy-compat/decorators/api-tag.decorator.d.mts.map +1 -0
  19. package/dist/src/legacy-compat/decorators/index.d.mts +8 -0
  20. package/dist/src/legacy-compat/decorators/index.d.mts.map +1 -0
  21. package/dist/src/legacy-compat/index.d.mts +24 -0
  22. package/dist/src/legacy-compat/index.d.mts.map +1 -0
  23. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  24. package/dist/tsconfig.spec.tsbuildinfo +1 -1
  25. package/dist/tsconfig.tsbuildinfo +1 -1
  26. package/dist/vitest.config.d.mts.map +1 -1
  27. package/lib/index-BYd1gzJQ.d.cts +594 -0
  28. package/lib/index-BYd1gzJQ.d.cts.map +1 -0
  29. package/lib/index-KzCwlPFD.d.mts +594 -0
  30. package/lib/index-KzCwlPFD.d.mts.map +1 -0
  31. package/lib/index.cjs +20 -1840
  32. package/lib/index.cjs.map +1 -1
  33. package/lib/index.d.cts +2 -594
  34. package/lib/index.d.mts +2 -594
  35. package/lib/index.mjs +2 -1822
  36. package/lib/index.mjs.map +1 -1
  37. package/lib/legacy-compat/index.cjs +314 -0
  38. package/lib/legacy-compat/index.cjs.map +1 -0
  39. package/lib/legacy-compat/index.d.cts +285 -0
  40. package/lib/legacy-compat/index.d.cts.map +1 -0
  41. package/lib/legacy-compat/index.d.mts +285 -0
  42. package/lib/legacy-compat/index.d.mts.map +1 -0
  43. package/lib/legacy-compat/index.mjs +271 -0
  44. package/lib/legacy-compat/index.mjs.map +1 -0
  45. package/lib/services-MFCyRMd8.mjs +1825 -0
  46. package/lib/services-MFCyRMd8.mjs.map +1 -0
  47. package/lib/services-kEHEZqLZ.cjs +1896 -0
  48. package/lib/services-kEHEZqLZ.cjs.map +1 -0
  49. package/package.json +15 -5
  50. package/src/__tests__/metadata.spec.mts +5 -7
  51. package/src/__tests__/services.spec.mts +6 -7
  52. package/src/legacy-compat/__type-tests__/legacy-decorators.spec-d.mts +347 -0
  53. package/src/legacy-compat/__type-tests__/tsconfig.json +15 -0
  54. package/src/legacy-compat/decorators/api-deprecated.decorator.mts +46 -0
  55. package/src/legacy-compat/decorators/api-exclude.decorator.mts +31 -0
  56. package/src/legacy-compat/decorators/api-operation.decorator.mts +60 -0
  57. package/src/legacy-compat/decorators/api-security.decorator.mts +45 -0
  58. package/src/legacy-compat/decorators/api-stream.decorator.mts +56 -0
  59. package/src/legacy-compat/decorators/api-summary.decorator.mts +34 -0
  60. package/src/legacy-compat/decorators/api-tag.decorator.mts +52 -0
  61. package/src/legacy-compat/decorators/index.mts +7 -0
  62. package/src/legacy-compat/index.mts +58 -0
  63. package/tsconfig.spec.json +4 -1
  64. package/tsdown.config.mts +2 -2
  65. package/vitest.config.mts +5 -1
  66. package/lib/index.d.cts.map +0 -1
  67. package/lib/index.d.mts.map +0 -1
@@ -0,0 +1,285 @@
1
+ import { _ as OpenApiEndpointMetadata, a as ApiStreamToken, g as EndpointScannerService, i as ApiSecurityToken, l as OpenApiGeneratorService, m as MetadataExtractorService, n as ApiExcludeToken, o as ApiSummaryToken, p as SchemaConverterService, r as ApiOperationToken, s as ApiTagToken, t as ApiDeprecatedToken, u as PathBuilderService } from "../index-BYd1gzJQ.cjs";
2
+ import { z } from "zod/v4";
3
+ import * as _navios_core_legacy_compat0 from "@navios/core/legacy-compat";
4
+
5
+ //#region src/legacy-compat/decorators/api-tag.decorator.d.mts
6
+ declare const ApiTagSchema: z.ZodObject<{
7
+ name: z.ZodString;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ /** Options for the @ApiTag decorator, inferred from the schema */
11
+ type ApiTagOptions = z.infer<typeof ApiTagSchema>;
12
+ /**
13
+ * Groups endpoints under a specific tag/folder in the documentation.
14
+ *
15
+ * Can be applied to controllers (affects all endpoints) or individual methods.
16
+ * When applied to both, the method-level tag takes precedence.
17
+ *
18
+ * Legacy-compatible version for TypeScript experimental decorators.
19
+ *
20
+ * @param name - The tag name
21
+ * @param description - Optional tag description
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * // Apply to entire controller
26
+ * @Controller()
27
+ * @ApiTag('Users', 'User management operations')
28
+ * export class UserController {
29
+ * @Endpoint(getUser)
30
+ * async getUser() {}
31
+ * }
32
+ *
33
+ * // Apply to individual endpoint
34
+ * @Controller()
35
+ * export class MixedController {
36
+ * @Endpoint(getUser)
37
+ * @ApiTag('Users')
38
+ * async getUser() {}
39
+ *
40
+ * @Endpoint(getOrder)
41
+ * @ApiTag('Orders')
42
+ * async getOrder() {}
43
+ * }
44
+ * ```
45
+ */
46
+ declare function ApiTag(name: string, description?: string): ClassDecorator & MethodDecorator;
47
+ //#endregion
48
+ //#region src/legacy-compat/decorators/api-operation.decorator.d.mts
49
+ declare const ApiOperationSchema: z.ZodObject<{
50
+ summary: z.ZodOptional<z.ZodString>;
51
+ description: z.ZodOptional<z.ZodString>;
52
+ operationId: z.ZodOptional<z.ZodString>;
53
+ deprecated: z.ZodOptional<z.ZodBoolean>;
54
+ externalDocs: z.ZodOptional<z.ZodObject<{
55
+ url: z.ZodString;
56
+ description: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strip>>;
58
+ }, z.core.$strip>;
59
+ /** Options for the @ApiOperation decorator, inferred from the schema */
60
+ type ApiOperationOptions = z.infer<typeof ApiOperationSchema>;
61
+ /**
62
+ * Provides detailed operation metadata for an endpoint.
63
+ *
64
+ * Use this decorator when you need to specify multiple operation properties.
65
+ * For simple cases, consider using @ApiSummary instead.
66
+ *
67
+ * Legacy-compatible version for TypeScript experimental decorators.
68
+ *
69
+ * @param options - Operation configuration options
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * @Controller()
74
+ * export class UserController {
75
+ * @Endpoint(getUser)
76
+ * @ApiOperation({
77
+ * summary: 'Get user by ID',
78
+ * description: 'Retrieves a user by their unique identifier. Returns 404 if not found.',
79
+ * operationId: 'getUserById',
80
+ * })
81
+ * async getUser(params: EndpointParams<typeof getUser>) {}
82
+ *
83
+ * @Endpoint(legacyGetUser)
84
+ * @ApiOperation({
85
+ * summary: 'Get user (legacy)',
86
+ * deprecated: true,
87
+ * externalDocs: {
88
+ * url: 'https://docs.example.com/migration',
89
+ * description: 'Migration guide'
90
+ * }
91
+ * })
92
+ * async getLegacyUser() {}
93
+ * }
94
+ * ```
95
+ */
96
+ declare const ApiOperation: _navios_core_legacy_compat0.LegacyClassSchemaAttribute<z.ZodObject<{
97
+ summary: z.ZodOptional<z.ZodString>;
98
+ description: z.ZodOptional<z.ZodString>;
99
+ operationId: z.ZodOptional<z.ZodString>;
100
+ deprecated: z.ZodOptional<z.ZodBoolean>;
101
+ externalDocs: z.ZodOptional<z.ZodObject<{
102
+ url: z.ZodString;
103
+ description: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>>;
105
+ }, z.core.$strip>>;
106
+ //#endregion
107
+ //#region src/legacy-compat/decorators/api-summary.decorator.d.mts
108
+ /**
109
+ * Shorthand decorator for adding just a summary to an endpoint.
110
+ *
111
+ * This is equivalent to `@ApiOperation({ summary: '...' })` but more concise.
112
+ *
113
+ * Legacy-compatible version for TypeScript experimental decorators.
114
+ *
115
+ * @param summary - Short summary text for the endpoint
116
+ *
117
+ * @example
118
+ * ```typescript
119
+ * @Controller()
120
+ * export class UserController {
121
+ * @Endpoint(getUser)
122
+ * @ApiSummary('Get user by ID')
123
+ * async getUser() {}
124
+ *
125
+ * @Endpoint(createUser)
126
+ * @ApiSummary('Create a new user')
127
+ * async createUser() {}
128
+ * }
129
+ * ```
130
+ */
131
+ declare const ApiSummary: _navios_core_legacy_compat0.LegacyClassSchemaAttribute<z.ZodString>;
132
+ //#endregion
133
+ //#region src/legacy-compat/decorators/api-deprecated.decorator.d.mts
134
+ declare const ApiDeprecatedSchema: z.ZodObject<{
135
+ message: z.ZodOptional<z.ZodString>;
136
+ }, z.core.$strip>;
137
+ /** Options for the @ApiDeprecated decorator, inferred from the schema */
138
+ type ApiDeprecatedOptions = z.infer<typeof ApiDeprecatedSchema>;
139
+ /**
140
+ * Marks an endpoint as deprecated.
141
+ *
142
+ * Deprecated endpoints are shown with a visual indicator in documentation
143
+ * and may include a migration message.
144
+ *
145
+ * Legacy-compatible version for TypeScript experimental decorators.
146
+ *
147
+ * @param message - Optional deprecation message
148
+ *
149
+ * @example
150
+ * ```typescript
151
+ * @Controller()
152
+ * export class UserController {
153
+ * // Simple deprecation
154
+ * @Endpoint(legacyGetUser)
155
+ * @ApiDeprecated()
156
+ * async getLegacyUser() {}
157
+ *
158
+ * // With migration message
159
+ * @Endpoint(oldCreateUser)
160
+ * @ApiDeprecated('Use POST /v2/users instead')
161
+ * async oldCreateUser() {}
162
+ * }
163
+ * ```
164
+ */
165
+ declare function ApiDeprecated(message?: string): ClassDecorator & MethodDecorator;
166
+ //#endregion
167
+ //#region src/legacy-compat/decorators/api-security.decorator.d.mts
168
+ declare const ApiSecuritySchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
169
+ /** Security requirement for an endpoint, inferred from the schema */
170
+ type ApiSecurityRequirement = z.infer<typeof ApiSecuritySchema>;
171
+ /**
172
+ * Specifies security requirements for an endpoint.
173
+ *
174
+ * The security requirement object maps security scheme names to their scopes.
175
+ * For schemes that don't use scopes (like API keys), use an empty array.
176
+ *
177
+ * Legacy-compatible version for TypeScript experimental decorators.
178
+ *
179
+ * @param requirements - Security requirements object
180
+ *
181
+ * @example
182
+ * ```typescript
183
+ * @Controller()
184
+ * export class UserController {
185
+ * // Require bearer token authentication
186
+ * @Endpoint(getUser)
187
+ * @ApiSecurity({ bearerAuth: [] })
188
+ * async getUser() {}
189
+ *
190
+ * // Require multiple authentication methods
191
+ * @Endpoint(adminEndpoint)
192
+ * @ApiSecurity({ bearerAuth: [], apiKey: [] })
193
+ * async adminAction() {}
194
+ *
195
+ * // OAuth2 with specific scopes
196
+ * @Endpoint(writeUser)
197
+ * @ApiSecurity({ oauth2: ['users:write', 'users:read'] })
198
+ * async writeUser() {}
199
+ * }
200
+ * ```
201
+ */
202
+ declare const ApiSecurity: _navios_core_legacy_compat0.LegacyClassSchemaAttribute<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
203
+ //#endregion
204
+ //#region src/legacy-compat/decorators/api-exclude.decorator.d.mts
205
+ /**
206
+ * Excludes an endpoint from OpenAPI documentation.
207
+ *
208
+ * Use this decorator for internal endpoints that should not be visible
209
+ * in the public API documentation.
210
+ *
211
+ * Legacy-compatible version for TypeScript experimental decorators.
212
+ *
213
+ * @example
214
+ * ```typescript
215
+ * @Controller()
216
+ * export class HealthController {
217
+ * @Endpoint(healthCheck)
218
+ * @ApiExclude()
219
+ * async healthCheck() {
220
+ * return { status: 'ok' }
221
+ * }
222
+ *
223
+ * @Endpoint(internalMetrics)
224
+ * @ApiExclude()
225
+ * async internalMetrics() {
226
+ * return { ... }
227
+ * }
228
+ * }
229
+ * ```
230
+ */
231
+ declare const ApiExclude: _navios_core_legacy_compat0.LegacyClassAttribute;
232
+ //#endregion
233
+ //#region src/legacy-compat/decorators/api-stream.decorator.d.mts
234
+ declare const ApiStreamSchema: z.ZodObject<{
235
+ contentType: z.ZodString;
236
+ description: z.ZodOptional<z.ZodString>;
237
+ }, z.core.$strip>;
238
+ /** Options for the @ApiStream decorator, inferred from the schema */
239
+ type ApiStreamOptions = z.infer<typeof ApiStreamSchema>;
240
+ /**
241
+ * Specifies content type and description for stream endpoints.
242
+ *
243
+ * Stream endpoints don't have a responseSchema, so this decorator provides
244
+ * the necessary metadata for OpenAPI documentation.
245
+ *
246
+ * Legacy-compatible version for TypeScript experimental decorators.
247
+ *
248
+ * @param options - Stream response options
249
+ *
250
+ * @example
251
+ * ```typescript
252
+ * @Controller()
253
+ * export class FileController {
254
+ * // Binary file download
255
+ * @Stream(downloadFile)
256
+ * @ApiStream({
257
+ * contentType: 'application/octet-stream',
258
+ * description: 'Download file as binary stream'
259
+ * })
260
+ * async download(params: StreamParams<typeof downloadFile>, reply: Reply) {
261
+ * // Stream implementation
262
+ * }
263
+ * }
264
+ *
265
+ * @Controller()
266
+ * export class EventController {
267
+ * // Server-Sent Events
268
+ * @Stream(streamEvents)
269
+ * @ApiStream({
270
+ * contentType: 'text/event-stream',
271
+ * description: 'Real-time event stream'
272
+ * })
273
+ * async stream(params: StreamParams<typeof streamEvents>, reply: Reply) {
274
+ * // SSE implementation
275
+ * }
276
+ * }
277
+ * ```
278
+ */
279
+ declare const ApiStream: _navios_core_legacy_compat0.LegacyClassSchemaAttribute<z.ZodObject<{
280
+ contentType: z.ZodString;
281
+ description: z.ZodOptional<z.ZodString>;
282
+ }, z.core.$strip>>;
283
+ //#endregion
284
+ export { ApiDeprecated, type ApiDeprecatedOptions, ApiDeprecatedToken, ApiExclude, ApiExcludeToken, ApiOperation, type ApiOperationOptions, ApiOperationToken, ApiSecurity, type ApiSecurityRequirement, ApiSecurityToken, ApiStream, type ApiStreamOptions, ApiStreamToken, ApiSummary, ApiSummaryToken, ApiTag, type ApiTagOptions, ApiTagToken, EndpointScannerService, MetadataExtractorService, type OpenApiEndpointMetadata, OpenApiGeneratorService, PathBuilderService, SchemaConverterService };
285
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/legacy-compat/decorators/api-tag.decorator.mts","../../src/legacy-compat/decorators/api-operation.decorator.mts","../../src/legacy-compat/decorators/api-summary.decorator.mts","../../src/legacy-compat/decorators/api-deprecated.decorator.mts","../../src/legacy-compat/decorators/api-security.decorator.mts","../../src/legacy-compat/decorators/api-exclude.decorator.mts","../../src/legacy-compat/decorators/api-stream.decorator.mts"],"sourcesContent":[],"mappings":";;;;;cAKM,cAAY,CAAA,CAAA;;;;AAJQ;KAUd,aAAA,GAAgB,CAAA,CAAE,aAAa;;;;;;AAA3C;AAsCA;;;;AChD0B;;;;;;;;;;;;;;;;;;AAkB1B;AAqCA;;;;;iBDPgB,MAAA,sCAAyC,iBAAA;;;cC5CnD,oBAAkB,CAAA,CAAA;;;;EDAlB,UAAA,eAGJ,aAAA,CAAA;;;;;CAHgB,eAAA,CAAA;;AAMN,KCQA,mBAAA,GAAsB,CAAA,CAAE,KDRO,CAAA,OCQM,kBDRd,CAAA;AAsCnC;;;;AChD0B;;;;;;;;;;;;;;;;;;AAkB1B;AAqCA;;;;;;;;;;;;cAAa,cAAY,2BAAA,CAAA,2BAAA,CAAA,CAAA;;;;EAAA,UAAA,eAAA,aAAA,CAAA;EAAA,YAAA,eAAA,YAAA,CAAA;IAAA,GAAA,aAAA;;;;;;;;;;ADvDC;;;;;;;AAU1B;AAsCA;;;;AChD0B;;;;;;;cC6Bb,YAAU,2BAAA,CAAA,2BAAA,CAAA,CAAA;;;cCzBjB,qBAAmB,CAAA,CAAA;;;;AHAnB,KGKM,oBAAA,GAAuB,CAAA,CAAE,KHFnC,CAAA,OGEgD,mBHFhD,CAAA;;;;;;;AAGF;AAsCA;;;;AChD0B;;;;;;;;;;;;;;;iBE0CV,aAAA,oBAA8B,iBAAA;;;cCtCxC,mBAAiB,CAAA,CAAA,UAAA,CAAA,CAAA,WAAA,CAAA,CAAA,SAAA,CAAA,CAAA;;KAGX,sBAAA,GAAyB,CAAA,CAAE,aAAa;;AJP1B;;;;;;;AAU1B;AAsCA;;;;AChD0B;;;;;;;;;;;;;;;;;;AAkBd,cGsBC,WHtBkB,EGsBP,2BAAA,CAAA,0BHtBiB,CGsBjB,CAAA,CAAA,SHtBiB,CGsBjB,CAAA,CAAA,SHtBiB,EGsBjB,CAAA,CAAA,QHtBiB,CGsBjB,CAAA,CAAA,SHtBiB,CAAA,CAAA,CAAA;;;;;;;;ADlBf;;;;;;;AAU1B;AAsCA;;;;AChD0B;;;;;;;;;cI6Bb,YAAoE,2BAAA,CAA1D;;;cCzBjB,iBAAe,CAAA,CAAA;;;;ANJK;KMUd,gBAAA,GAAmB,CAAA,CAAE,aAAa;;;;;;ANA9C;AAsCA;;;;AChD0B;;;;;;;;;;;;;;;;;;AAkB1B;AAqCA;;;;;;;;;;cKJa,WAAS,2BAAA,CAAA,2BAAA,CAAA,CAAA"}
@@ -0,0 +1,285 @@
1
+ import { _ as OpenApiEndpointMetadata, a as ApiStreamToken, g as EndpointScannerService, i as ApiSecurityToken, l as OpenApiGeneratorService, m as MetadataExtractorService, n as ApiExcludeToken, o as ApiSummaryToken, p as SchemaConverterService, r as ApiOperationToken, s as ApiTagToken, t as ApiDeprecatedToken, u as PathBuilderService } from "../index-KzCwlPFD.mjs";
2
+ import { z } from "zod/v4";
3
+ import * as _navios_core_legacy_compat0 from "@navios/core/legacy-compat";
4
+
5
+ //#region src/legacy-compat/decorators/api-tag.decorator.d.mts
6
+ declare const ApiTagSchema: z.ZodObject<{
7
+ name: z.ZodString;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ /** Options for the @ApiTag decorator, inferred from the schema */
11
+ type ApiTagOptions = z.infer<typeof ApiTagSchema>;
12
+ /**
13
+ * Groups endpoints under a specific tag/folder in the documentation.
14
+ *
15
+ * Can be applied to controllers (affects all endpoints) or individual methods.
16
+ * When applied to both, the method-level tag takes precedence.
17
+ *
18
+ * Legacy-compatible version for TypeScript experimental decorators.
19
+ *
20
+ * @param name - The tag name
21
+ * @param description - Optional tag description
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * // Apply to entire controller
26
+ * @Controller()
27
+ * @ApiTag('Users', 'User management operations')
28
+ * export class UserController {
29
+ * @Endpoint(getUser)
30
+ * async getUser() {}
31
+ * }
32
+ *
33
+ * // Apply to individual endpoint
34
+ * @Controller()
35
+ * export class MixedController {
36
+ * @Endpoint(getUser)
37
+ * @ApiTag('Users')
38
+ * async getUser() {}
39
+ *
40
+ * @Endpoint(getOrder)
41
+ * @ApiTag('Orders')
42
+ * async getOrder() {}
43
+ * }
44
+ * ```
45
+ */
46
+ declare function ApiTag(name: string, description?: string): ClassDecorator & MethodDecorator;
47
+ //#endregion
48
+ //#region src/legacy-compat/decorators/api-operation.decorator.d.mts
49
+ declare const ApiOperationSchema: z.ZodObject<{
50
+ summary: z.ZodOptional<z.ZodString>;
51
+ description: z.ZodOptional<z.ZodString>;
52
+ operationId: z.ZodOptional<z.ZodString>;
53
+ deprecated: z.ZodOptional<z.ZodBoolean>;
54
+ externalDocs: z.ZodOptional<z.ZodObject<{
55
+ url: z.ZodString;
56
+ description: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strip>>;
58
+ }, z.core.$strip>;
59
+ /** Options for the @ApiOperation decorator, inferred from the schema */
60
+ type ApiOperationOptions = z.infer<typeof ApiOperationSchema>;
61
+ /**
62
+ * Provides detailed operation metadata for an endpoint.
63
+ *
64
+ * Use this decorator when you need to specify multiple operation properties.
65
+ * For simple cases, consider using @ApiSummary instead.
66
+ *
67
+ * Legacy-compatible version for TypeScript experimental decorators.
68
+ *
69
+ * @param options - Operation configuration options
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * @Controller()
74
+ * export class UserController {
75
+ * @Endpoint(getUser)
76
+ * @ApiOperation({
77
+ * summary: 'Get user by ID',
78
+ * description: 'Retrieves a user by their unique identifier. Returns 404 if not found.',
79
+ * operationId: 'getUserById',
80
+ * })
81
+ * async getUser(params: EndpointParams<typeof getUser>) {}
82
+ *
83
+ * @Endpoint(legacyGetUser)
84
+ * @ApiOperation({
85
+ * summary: 'Get user (legacy)',
86
+ * deprecated: true,
87
+ * externalDocs: {
88
+ * url: 'https://docs.example.com/migration',
89
+ * description: 'Migration guide'
90
+ * }
91
+ * })
92
+ * async getLegacyUser() {}
93
+ * }
94
+ * ```
95
+ */
96
+ declare const ApiOperation: _navios_core_legacy_compat0.LegacyClassSchemaAttribute<z.ZodObject<{
97
+ summary: z.ZodOptional<z.ZodString>;
98
+ description: z.ZodOptional<z.ZodString>;
99
+ operationId: z.ZodOptional<z.ZodString>;
100
+ deprecated: z.ZodOptional<z.ZodBoolean>;
101
+ externalDocs: z.ZodOptional<z.ZodObject<{
102
+ url: z.ZodString;
103
+ description: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>>;
105
+ }, z.core.$strip>>;
106
+ //#endregion
107
+ //#region src/legacy-compat/decorators/api-summary.decorator.d.mts
108
+ /**
109
+ * Shorthand decorator for adding just a summary to an endpoint.
110
+ *
111
+ * This is equivalent to `@ApiOperation({ summary: '...' })` but more concise.
112
+ *
113
+ * Legacy-compatible version for TypeScript experimental decorators.
114
+ *
115
+ * @param summary - Short summary text for the endpoint
116
+ *
117
+ * @example
118
+ * ```typescript
119
+ * @Controller()
120
+ * export class UserController {
121
+ * @Endpoint(getUser)
122
+ * @ApiSummary('Get user by ID')
123
+ * async getUser() {}
124
+ *
125
+ * @Endpoint(createUser)
126
+ * @ApiSummary('Create a new user')
127
+ * async createUser() {}
128
+ * }
129
+ * ```
130
+ */
131
+ declare const ApiSummary: _navios_core_legacy_compat0.LegacyClassSchemaAttribute<z.ZodString>;
132
+ //#endregion
133
+ //#region src/legacy-compat/decorators/api-deprecated.decorator.d.mts
134
+ declare const ApiDeprecatedSchema: z.ZodObject<{
135
+ message: z.ZodOptional<z.ZodString>;
136
+ }, z.core.$strip>;
137
+ /** Options for the @ApiDeprecated decorator, inferred from the schema */
138
+ type ApiDeprecatedOptions = z.infer<typeof ApiDeprecatedSchema>;
139
+ /**
140
+ * Marks an endpoint as deprecated.
141
+ *
142
+ * Deprecated endpoints are shown with a visual indicator in documentation
143
+ * and may include a migration message.
144
+ *
145
+ * Legacy-compatible version for TypeScript experimental decorators.
146
+ *
147
+ * @param message - Optional deprecation message
148
+ *
149
+ * @example
150
+ * ```typescript
151
+ * @Controller()
152
+ * export class UserController {
153
+ * // Simple deprecation
154
+ * @Endpoint(legacyGetUser)
155
+ * @ApiDeprecated()
156
+ * async getLegacyUser() {}
157
+ *
158
+ * // With migration message
159
+ * @Endpoint(oldCreateUser)
160
+ * @ApiDeprecated('Use POST /v2/users instead')
161
+ * async oldCreateUser() {}
162
+ * }
163
+ * ```
164
+ */
165
+ declare function ApiDeprecated(message?: string): ClassDecorator & MethodDecorator;
166
+ //#endregion
167
+ //#region src/legacy-compat/decorators/api-security.decorator.d.mts
168
+ declare const ApiSecuritySchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
169
+ /** Security requirement for an endpoint, inferred from the schema */
170
+ type ApiSecurityRequirement = z.infer<typeof ApiSecuritySchema>;
171
+ /**
172
+ * Specifies security requirements for an endpoint.
173
+ *
174
+ * The security requirement object maps security scheme names to their scopes.
175
+ * For schemes that don't use scopes (like API keys), use an empty array.
176
+ *
177
+ * Legacy-compatible version for TypeScript experimental decorators.
178
+ *
179
+ * @param requirements - Security requirements object
180
+ *
181
+ * @example
182
+ * ```typescript
183
+ * @Controller()
184
+ * export class UserController {
185
+ * // Require bearer token authentication
186
+ * @Endpoint(getUser)
187
+ * @ApiSecurity({ bearerAuth: [] })
188
+ * async getUser() {}
189
+ *
190
+ * // Require multiple authentication methods
191
+ * @Endpoint(adminEndpoint)
192
+ * @ApiSecurity({ bearerAuth: [], apiKey: [] })
193
+ * async adminAction() {}
194
+ *
195
+ * // OAuth2 with specific scopes
196
+ * @Endpoint(writeUser)
197
+ * @ApiSecurity({ oauth2: ['users:write', 'users:read'] })
198
+ * async writeUser() {}
199
+ * }
200
+ * ```
201
+ */
202
+ declare const ApiSecurity: _navios_core_legacy_compat0.LegacyClassSchemaAttribute<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
203
+ //#endregion
204
+ //#region src/legacy-compat/decorators/api-exclude.decorator.d.mts
205
+ /**
206
+ * Excludes an endpoint from OpenAPI documentation.
207
+ *
208
+ * Use this decorator for internal endpoints that should not be visible
209
+ * in the public API documentation.
210
+ *
211
+ * Legacy-compatible version for TypeScript experimental decorators.
212
+ *
213
+ * @example
214
+ * ```typescript
215
+ * @Controller()
216
+ * export class HealthController {
217
+ * @Endpoint(healthCheck)
218
+ * @ApiExclude()
219
+ * async healthCheck() {
220
+ * return { status: 'ok' }
221
+ * }
222
+ *
223
+ * @Endpoint(internalMetrics)
224
+ * @ApiExclude()
225
+ * async internalMetrics() {
226
+ * return { ... }
227
+ * }
228
+ * }
229
+ * ```
230
+ */
231
+ declare const ApiExclude: _navios_core_legacy_compat0.LegacyClassAttribute;
232
+ //#endregion
233
+ //#region src/legacy-compat/decorators/api-stream.decorator.d.mts
234
+ declare const ApiStreamSchema: z.ZodObject<{
235
+ contentType: z.ZodString;
236
+ description: z.ZodOptional<z.ZodString>;
237
+ }, z.core.$strip>;
238
+ /** Options for the @ApiStream decorator, inferred from the schema */
239
+ type ApiStreamOptions = z.infer<typeof ApiStreamSchema>;
240
+ /**
241
+ * Specifies content type and description for stream endpoints.
242
+ *
243
+ * Stream endpoints don't have a responseSchema, so this decorator provides
244
+ * the necessary metadata for OpenAPI documentation.
245
+ *
246
+ * Legacy-compatible version for TypeScript experimental decorators.
247
+ *
248
+ * @param options - Stream response options
249
+ *
250
+ * @example
251
+ * ```typescript
252
+ * @Controller()
253
+ * export class FileController {
254
+ * // Binary file download
255
+ * @Stream(downloadFile)
256
+ * @ApiStream({
257
+ * contentType: 'application/octet-stream',
258
+ * description: 'Download file as binary stream'
259
+ * })
260
+ * async download(params: StreamParams<typeof downloadFile>, reply: Reply) {
261
+ * // Stream implementation
262
+ * }
263
+ * }
264
+ *
265
+ * @Controller()
266
+ * export class EventController {
267
+ * // Server-Sent Events
268
+ * @Stream(streamEvents)
269
+ * @ApiStream({
270
+ * contentType: 'text/event-stream',
271
+ * description: 'Real-time event stream'
272
+ * })
273
+ * async stream(params: StreamParams<typeof streamEvents>, reply: Reply) {
274
+ * // SSE implementation
275
+ * }
276
+ * }
277
+ * ```
278
+ */
279
+ declare const ApiStream: _navios_core_legacy_compat0.LegacyClassSchemaAttribute<z.ZodObject<{
280
+ contentType: z.ZodString;
281
+ description: z.ZodOptional<z.ZodString>;
282
+ }, z.core.$strip>>;
283
+ //#endregion
284
+ export { ApiDeprecated, type ApiDeprecatedOptions, ApiDeprecatedToken, ApiExclude, ApiExcludeToken, ApiOperation, type ApiOperationOptions, ApiOperationToken, ApiSecurity, type ApiSecurityRequirement, ApiSecurityToken, ApiStream, type ApiStreamOptions, ApiStreamToken, ApiSummary, ApiSummaryToken, ApiTag, type ApiTagOptions, ApiTagToken, EndpointScannerService, MetadataExtractorService, type OpenApiEndpointMetadata, OpenApiGeneratorService, PathBuilderService, SchemaConverterService };
285
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/legacy-compat/decorators/api-tag.decorator.mts","../../src/legacy-compat/decorators/api-operation.decorator.mts","../../src/legacy-compat/decorators/api-summary.decorator.mts","../../src/legacy-compat/decorators/api-deprecated.decorator.mts","../../src/legacy-compat/decorators/api-security.decorator.mts","../../src/legacy-compat/decorators/api-exclude.decorator.mts","../../src/legacy-compat/decorators/api-stream.decorator.mts"],"sourcesContent":[],"mappings":";;;;;cAKM,cAAY,CAAA,CAAA;;;;AAJQ;KAUd,aAAA,GAAgB,CAAA,CAAE,aAAa;;;;;;AAA3C;AAsCA;;;;AChD0B;;;;;;;;;;;;;;;;;;AAkB1B;AAqCA;;;;;iBDPgB,MAAA,sCAAyC,iBAAA;;;cC5CnD,oBAAkB,CAAA,CAAA;;;;EDAlB,UAAA,eAGJ,aAAA,CAAA;;;;;CAHgB,eAAA,CAAA;;AAMN,KCQA,mBAAA,GAAsB,CAAA,CAAE,KDRO,CAAA,OCQM,kBDRd,CAAA;AAsCnC;;;;AChD0B;;;;;;;;;;;;;;;;;;AAkB1B;AAqCA;;;;;;;;;;;;cAAa,cAAY,2BAAA,CAAA,2BAAA,CAAA,CAAA;;;;EAAA,UAAA,eAAA,aAAA,CAAA;EAAA,YAAA,eAAA,YAAA,CAAA;IAAA,GAAA,aAAA;;;;;;;;;;ADvDC;;;;;;;AAU1B;AAsCA;;;;AChD0B;;;;;;;cC6Bb,YAAU,2BAAA,CAAA,2BAAA,CAAA,CAAA;;;cCzBjB,qBAAmB,CAAA,CAAA;;;;AHAnB,KGKM,oBAAA,GAAuB,CAAA,CAAE,KHFnC,CAAA,OGEgD,mBHFhD,CAAA;;;;;;;AAGF;AAsCA;;;;AChD0B;;;;;;;;;;;;;;;iBE0CV,aAAA,oBAA8B,iBAAA;;;cCtCxC,mBAAiB,CAAA,CAAA,UAAA,CAAA,CAAA,WAAA,CAAA,CAAA,SAAA,CAAA,CAAA;;KAGX,sBAAA,GAAyB,CAAA,CAAE,aAAa;;AJP1B;;;;;;;AAU1B;AAsCA;;;;AChD0B;;;;;;;;;;;;;;;;;;AAkBd,cGsBC,WHtBkB,EGsBP,2BAAA,CAAA,0BHtBiB,CGsBjB,CAAA,CAAA,SHtBiB,CGsBjB,CAAA,CAAA,SHtBiB,EGsBjB,CAAA,CAAA,QHtBiB,CGsBjB,CAAA,CAAA,SHtBiB,CAAA,CAAA,CAAA;;;;;;;;ADlBf;;;;;;;AAU1B;AAsCA;;;;AChD0B;;;;;;;;;cI6Bb,YAAoE,2BAAA,CAA1D;;;cCzBjB,iBAAe,CAAA,CAAA;;;;ANJK;KMUd,gBAAA,GAAmB,CAAA,CAAE,aAAa;;;;;;ANA9C;AAsCA;;;;AChD0B;;;;;;;;;;;;;;;;;;AAkB1B;AAqCA;;;;;;;;;;cKJa,WAAS,2BAAA,CAAA,2BAAA,CAAA,CAAA"}