@nattyjs/types 0.0.1-beta.63 → 0.0.1-beta.65

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 (2) hide show
  1. package/dist/index.d.ts +22 -32
  2. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ interface TypeInfo {
7
7
  name: string;
8
8
  documentation?: string;
9
9
  type?: string;
10
+ tokenKey?: string;
10
11
  }
11
12
 
12
13
  interface ParameterInfo {
@@ -34,9 +35,9 @@ interface BuildOptions {
34
35
  rootDir: string;
35
36
  port: number;
36
37
  commandName: string;
37
- outDir: string;
38
- startupFilePath: string;
39
- clearScreen: boolean;
38
+ outDir?: string;
39
+ startupFilePath?: string;
40
+ clearScreen?: boolean;
40
41
  }
41
42
 
42
43
  type HttpRequestBodyInfo = {
@@ -119,47 +120,32 @@ type ExceptionTypeInfo = string | number | boolean | {
119
120
 
120
121
  interface RouteConfig {
121
122
  controller: Function;
122
- parameters: Array<{
123
- name: string;
124
- type: string;
125
- }>;
123
+ parameters: TypeInfo[];
126
124
  get: {
127
125
  [key: string]: {
128
126
  name: string;
129
- parameters: Array<{
130
- name: string;
131
- type: string;
132
- }>;
127
+ parameters: TypeInfo[];
133
128
  returnType: string;
134
129
  };
135
130
  };
136
131
  post: {
137
132
  [key: string]: {
138
133
  name: string;
139
- parameters: Array<{
140
- name: string;
141
- type: string;
142
- }>;
134
+ parameters: TypeInfo[];
143
135
  returnType: string;
144
136
  };
145
137
  };
146
138
  put: {
147
139
  [key: string]: {
148
140
  name: string;
149
- parameters: Array<{
150
- name: string;
151
- type: string;
152
- }>;
141
+ parameters: TypeInfo[];
153
142
  returnType: string;
154
143
  };
155
144
  };
156
145
  delete: {
157
146
  [key: string]: {
158
147
  name: string;
159
- parameters: Array<{
160
- name: string;
161
- type: string;
162
- }>;
148
+ parameters: TypeInfo[];
163
149
  returnType: string;
164
150
  };
165
151
  };
@@ -255,10 +241,7 @@ interface RequestRouteInfo {
255
241
  path: string;
256
242
  methodInfo: MethodInfo;
257
243
  controller: any;
258
- parameters: Array<{
259
- name: string;
260
- type: string;
261
- }>;
244
+ parameters: TypeInfo[];
262
245
  configuredRoutePath: string;
263
246
  queryParams: {
264
247
  [key: string]: any;
@@ -326,6 +309,11 @@ type TypeMeta = {
326
309
  enumValues: (string | number)[];
327
310
  };
328
311
 
312
+ type JsDocExample = {
313
+ kind: "request" | "response";
314
+ value: string;
315
+ };
316
+
329
317
  type JsDocHeader = {
330
318
  name: string;
331
319
  required: boolean;
@@ -345,6 +333,11 @@ type JsDocResponse = {
345
333
  type?: string;
346
334
  };
347
335
 
336
+ type JsDocThrow = {
337
+ status?: number;
338
+ description?: string;
339
+ };
340
+
348
341
  type JsDocInfo = {
349
342
  summary?: string;
350
343
  description?: string;
@@ -354,15 +347,12 @@ type JsDocInfo = {
354
347
  headers?: JsDocHeader[];
355
348
  security?: string[];
356
349
  responses?: JsDocResponse[];
350
+ throws?: JsDocThrow[];
351
+ examples?: JsDocExample[];
357
352
  deprecated?: string | true;
358
353
  custom?: Record<string, string[]>;
359
354
  };
360
355
 
361
- type JsDocThrow = {
362
- status?: number;
363
- description?: string;
364
- };
365
-
366
356
  type RouteParamMeta = {
367
357
  name: string;
368
358
  in: "path" | "query";
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@nattyjs/types",
3
- "version": "0.0.1-beta.63",
3
+ "version": "0.0.1-beta.65",
4
4
  "keywords": [],
5
5
  "author": "ajayojha <ojhaajay@outlook.com>",
6
6
  "license": "ISC",
7
7
  "description": "",
8
- "main": "./dist/index.d.ts",
8
+ "module": "./dist/index.mjs",
9
+ "main": "./dist/index.cjs",
9
10
  "types": "./dist/index.d.ts",
10
11
  "files": [
11
12
  "dist"