@creator.co/wapi 1.7.8-alpha1 → 1.7.8-alpha2

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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@creator.co/wapi",
3
- "version": "1.7.8-alpha1",
3
+ "version": "1.7.8-alpha",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@creator.co/wapi",
9
- "version": "1.7.8-alpha1",
9
+ "version": "1.7.8-alpha",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-dynamodb": "^3.574.0",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator.co/wapi",
3
- "version": "1.7.8-alpha1",
3
+ "version": "1.7.8-alpha",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -56,13 +56,14 @@ export interface Route<InputType = never, OutputType = never, PathParamsType = S
56
56
  * An optional openApi object with extra metadata for docs generation.
57
57
  */
58
58
  openApi?: {
59
- security?: {
60
- [key: string]: string[];
61
- };
62
- tags?: string[];
63
59
  summary: string;
64
60
  description: string;
65
- outputSchema?: z.ZodObject<any> | z.ZodUnion<any> | z.ZodIntersection<any, any>;
61
+ tags?: string[];
62
+ outputSchema?: z.ZodObject<any> | z.ZodUnion<any> | z.ZodIntersection<any, any> | z.ZodType<any>;
63
+ successCode?: number;
64
+ security?: {
65
+ [key: string]: string[] | never[];
66
+ }[];
66
67
  };
67
68
  }
68
69
  export type AnyRoute = Route<any | never, any | never, any | never, any | never>;
@@ -1 +1 @@
1
- {"version":3,"file":"Router.js","sourceRoot":"","sources":["../../../src/Server/Router.ts"],"names":[],"mappings":"AAKA,OAAO,eAAe,MAAM,0BAA0B,CAAA;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAQpC,OAAO,KAAK,MAAM,kBAAkB,CAAA;AAoIpC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IAUzB;;;;OAIG;IACH,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;IACrF,CAAC;IAED;;;OAGG;IACI,SAAS;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAA;IAChC,CAAC;IAED;;;OAGG;IACK,WAAW;QACjB,OAAO,KAAK,CAAC,qBAAqB,EAAE,CAAA;IACtC,CAAC;CACF"}
1
+ {"version":3,"file":"Router.js","sourceRoot":"","sources":["../../../src/Server/Router.ts"],"names":[],"mappings":"AAKA,OAAO,eAAe,MAAM,0BAA0B,CAAA;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAA;AAQpC,OAAO,KAAK,MAAM,kBAAkB,CAAA;AA0IpC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IAUzB;;;;OAIG;IACH,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;IACrF,CAAC;IAED;;;OAGG;IACI,SAAS;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAA;IAChC,CAAC;IAED;;;OAGG;IACK,WAAW;QACjB,OAAO,KAAK,CAAC,qBAAqB,EAAE,CAAA;IACtC,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator.co/wapi",
3
- "version": "1.7.8-alpha1",
3
+ "version": "1.7.8-alpha2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -82,11 +82,17 @@ export interface Route<
82
82
  * An optional openApi object with extra metadata for docs generation.
83
83
  */
84
84
  openApi?: {
85
- security?: { [key: string]: string[] }
86
- tags?: string[]
85
+ // Descriptive
87
86
  summary: string
88
87
  description: string
89
- outputSchema?: z.ZodObject<any> | z.ZodUnion<any> | z.ZodIntersection<any, any>
88
+ tags?: string[]
89
+ // Response
90
+ outputSchema?: z.ZodObject<any> | z.ZodUnion<any> | z.ZodIntersection<any, any> | z.ZodType<any>
91
+ successCode?: number /* defaults to 200 */
92
+ // Sec
93
+ security?: {
94
+ [key: string]: string[] | never[]
95
+ }[]
90
96
  }
91
97
  }
92
98