@arkyn/server 1.4.28 → 1.4.30

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.
@@ -0,0 +1,5 @@
1
+ declare class Created extends Response {
2
+ constructor(body?: any, init?: ResponseInit);
3
+ }
4
+ export { Created };
5
+ //# sourceMappingURL=created.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"created.d.ts","sourceRoot":"","sources":["../../src/httpResponses/created.ts"],"names":[],"mappings":"AAAA,cAAM,OAAQ,SAAQ,QAAQ;gBAChB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAU5C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ class Created extends Response {
2
+ constructor(body, init) {
3
+ super(body, {
4
+ ...init,
5
+ status: 201,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
11
+ }
12
+ }
13
+ export { Created };
@@ -0,0 +1,5 @@
1
+ declare class NoContent extends Response {
2
+ constructor(init?: ResponseInit);
3
+ }
4
+ export { NoContent };
5
+ //# sourceMappingURL=noContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noContent.d.ts","sourceRoot":"","sources":["../../src/httpResponses/noContent.ts"],"names":[],"mappings":"AAAA,cAAM,SAAU,SAAQ,QAAQ;gBAClB,IAAI,CAAC,EAAE,YAAY;CAGhC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ class NoContent extends Response {
2
+ constructor(init) {
3
+ super(null, init);
4
+ }
5
+ }
6
+ export { NoContent };
@@ -0,0 +1,5 @@
1
+ declare class Success extends Response {
2
+ constructor(body?: any, init?: ResponseInit);
3
+ }
4
+ export { Success };
5
+ //# sourceMappingURL=success.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../src/httpResponses/success.ts"],"names":[],"mappings":"AAAA,cAAM,OAAQ,SAAQ,QAAQ;gBAChB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAU5C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ class Success extends Response {
2
+ constructor(body, init) {
3
+ super(body, {
4
+ ...init,
5
+ status: 200,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
11
+ }
12
+ }
13
+ export { Success };
@@ -0,0 +1,5 @@
1
+ declare class Updated extends Response {
2
+ constructor(body?: any, init?: ResponseInit);
3
+ }
4
+ export { Updated };
5
+ //# sourceMappingURL=updated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updated.d.ts","sourceRoot":"","sources":["../../src/httpResponses/updated.ts"],"names":[],"mappings":"AAAA,cAAM,OAAQ,SAAQ,QAAQ;gBAChB,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY;CAU5C;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ class Updated extends Response {
2
+ constructor(body, init) {
3
+ super(body, {
4
+ ...init,
5
+ status: 200,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
11
+ }
12
+ }
13
+ export { Updated };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,10 @@ export { NotFoundError } from "./httpBadResponses/notFound";
5
5
  export { ServerError } from "./httpBadResponses/serverError";
6
6
  export { UnauthorizedError } from "./httpBadResponses/unauthorized";
7
7
  export { UnprocessableEntityError } from "./httpBadResponses/unprocessableEntity";
8
+ export { Created } from "./httpResponses/created";
9
+ export { NoContent } from "./httpResponses/noContent";
10
+ export { Success } from "./httpResponses/success";
11
+ export { Updated } from "./httpResponses/updated";
8
12
  export { globalErrorHandler } from "./helpers/globalErrorHandler";
9
13
  export { extractJsonFromRequest } from "./services/extractJsonFromRequest";
10
14
  export { formParse } from "./services/formParse";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAGlF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAGlF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -6,6 +6,11 @@ export { NotFoundError } from "./httpBadResponses/notFound";
6
6
  export { ServerError } from "./httpBadResponses/serverError";
7
7
  export { UnauthorizedError } from "./httpBadResponses/unauthorized";
8
8
  export { UnprocessableEntityError } from "./httpBadResponses/unprocessableEntity";
9
+ // http responses
10
+ export { Created } from "./httpResponses/created";
11
+ export { NoContent } from "./httpResponses/noContent";
12
+ export { Success } from "./httpResponses/success";
13
+ export { Updated } from "./httpResponses/updated";
9
14
  // helpers
10
15
  export { globalErrorHandler } from "./helpers/globalErrorHandler";
11
16
  // services
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/server",
3
- "version": "1.4.28",
3
+ "version": "1.4.30",
4
4
  "main": "./dist/bundle.js",
5
5
  "module": "./src/index.ts",
6
6
  "type": "module",
@@ -0,0 +1,14 @@
1
+ class Created extends Response {
2
+ constructor(body?: any, init?: ResponseInit) {
3
+ super(body, {
4
+ ...init,
5
+ status: 201,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
11
+ }
12
+ }
13
+
14
+ export { Created };
@@ -0,0 +1,7 @@
1
+ class NoContent extends Response {
2
+ constructor(init?: ResponseInit) {
3
+ super(null, init);
4
+ }
5
+ }
6
+
7
+ export { NoContent };
@@ -0,0 +1,14 @@
1
+ class Success extends Response {
2
+ constructor(body?: any, init?: ResponseInit) {
3
+ super(body, {
4
+ ...init,
5
+ status: 200,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
11
+ }
12
+ }
13
+
14
+ export { Success };
@@ -0,0 +1,14 @@
1
+ class Updated extends Response {
2
+ constructor(body?: any, init?: ResponseInit) {
3
+ super(body, {
4
+ ...init,
5
+ status: 200,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
11
+ }
12
+ }
13
+
14
+ export { Updated };
package/src/index.ts CHANGED
@@ -7,6 +7,12 @@ export { ServerError } from "./httpBadResponses/serverError";
7
7
  export { UnauthorizedError } from "./httpBadResponses/unauthorized";
8
8
  export { UnprocessableEntityError } from "./httpBadResponses/unprocessableEntity";
9
9
 
10
+ // http responses
11
+ export { Created } from "./httpResponses/created";
12
+ export { NoContent } from "./httpResponses/noContent";
13
+ export { Success } from "./httpResponses/success";
14
+ export { Updated } from "./httpResponses/updated";
15
+
10
16
  // helpers
11
17
  export { globalErrorHandler } from "./helpers/globalErrorHandler";
12
18