@creator.co/wapi 1.2.0-alpha2 → 1.2.0-alpha4

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.
package/dist/index.d.ts CHANGED
@@ -6,5 +6,5 @@ import Transaction from "./src/BaseEvent/Transaction";
6
6
  import Configuration from "./src/Config/Configuration";
7
7
  import Crypto from "./src/Crypto/Crypto";
8
8
  import Mailer from "./src/Mailer/Mailer";
9
- import Router from "./src/Server/Router";
10
- export { Transaction, Process, EventProcessor, Router, Mailer, Crypto, Configuration, Response, Utils, };
9
+ import Router, { Route } from "./src/Server/Router";
10
+ export { Transaction, Process, EventProcessor, Router, Mailer, Crypto, Configuration, Response, Utils, Route, };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AAqBvC,mBArBK,kBAAQ,CAqBL;AApBV,yCAAmC;AAsBjC,gBAtBK,eAAK,CAsBL;AArBP,iEAA2D;AAYzD,yBAZK,wBAAc,CAYL;AAXhB,mDAA6C;AAU3C,kBAVK,iBAAO,CAUL;AATT,2DAAqD;AAQnD,sBARK,qBAAW,CAQL;AAPb,4DAAsD;AAcpD,wBAdK,uBAAa,CAcL;AAbf,8CAAwC;AAYtC,iBAZK,gBAAM,CAYL;AAXR,8CAAwC;AAUtC,iBAVK,gBAAM,CAUL;AATR,8CAAwC;AAOtC,iBAPK,gBAAM,CAOL"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AAqBvC,mBArBK,kBAAQ,CAqBL;AApBV,yCAAmC;AAsBjC,gBAtBK,eAAK,CAsBL;AArBP,iEAA2D;AAYzD,yBAZK,wBAAc,CAYL;AAXhB,mDAA6C;AAU3C,kBAVK,iBAAO,CAUL;AATT,2DAAqD;AAQnD,sBARK,qBAAW,CAQL;AAPb,4DAAsD;AAcpD,wBAdK,uBAAa,CAcL;AAbf,8CAAwC;AAYtC,iBAZK,gBAAM,CAYL;AAXR,8CAAwC;AAUtC,iBAVK,gBAAM,CAUL;AATR,8CAAmD;AAOjD,iBAPK,gBAAM,CAOL"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator.co/wapi",
3
- "version": "1.2.0-alpha2",
3
+ "version": "1.2.0-alpha3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import Transaction, { TransactionConfig, TransactionExecution } from "../BaseEvent/Transaction";
3
- export type Route<InputType = object> = {
3
+ export interface Route<InputType = object> {
4
4
  path: string;
5
5
  method: string;
6
6
  handler: TransactionExecution<Transaction<InputType>>;
@@ -9,7 +9,7 @@ export type Route<InputType = object> = {
9
9
  type: any;
10
10
  validationSchema: z.ZodObject<any>;
11
11
  };
12
- };
12
+ }
13
13
  export type RouterConfig = TransactionConfig & {
14
14
  routes: Route[];
15
15
  port?: number;
package/index.ts CHANGED
@@ -6,7 +6,7 @@ import Transaction from "./src/BaseEvent/Transaction"
6
6
  import Configuration from "./src/Config/Configuration"
7
7
  import Crypto from "./src/Crypto/Crypto"
8
8
  import Mailer from "./src/Mailer/Mailer"
9
- import Router from "./src/Server/Router"
9
+ import Router, { Route } from "./src/Server/Router"
10
10
 
11
11
  export {
12
12
  // Base Events
@@ -22,4 +22,5 @@ export {
22
22
  Response,
23
23
  // Helpers
24
24
  Utils,
25
+ Route,
25
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator.co/wapi",
3
- "version": "1.2.0-alpha2",
3
+ "version": "1.2.0-alpha4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,7 @@ import Transaction, {
8
8
  } from "../BaseEvent/Transaction"
9
9
 
10
10
  // Route
11
- export type Route<InputType = object> = {
11
+ export interface Route<InputType = object> {
12
12
  path: string
13
13
  method: string
14
14
  handler: TransactionExecution<Transaction<InputType>>