@arkyn/server 1.4.50 → 1.4.51
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/httpResponses/created.d.ts +4 -3
- package/dist/httpResponses/created.d.ts.map +1 -1
- package/dist/httpResponses/created.js +7 -0
- package/dist/httpResponses/noContent.d.ts +1 -0
- package/dist/httpResponses/noContent.d.ts.map +1 -1
- package/dist/httpResponses/noContent.js +7 -0
- package/dist/httpResponses/success.d.ts +4 -3
- package/dist/httpResponses/success.d.ts.map +1 -1
- package/dist/httpResponses/success.js +7 -0
- package/dist/httpResponses/updated.d.ts +4 -3
- package/dist/httpResponses/updated.d.ts.map +1 -1
- package/dist/httpResponses/updated.js +7 -0
- package/package.json +1 -1
- package/src/httpResponses/created.ts +11 -3
- package/src/httpResponses/noContent.ts +8 -0
- package/src/httpResponses/success.ts +11 -3
- package/src/httpResponses/updated.ts +11 -3
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare function created(body: any, init?: ResponseInit): Response;
|
|
2
|
-
declare class Created {
|
|
3
|
-
body:
|
|
2
|
+
declare class Created<T> {
|
|
3
|
+
body: T;
|
|
4
4
|
init: ResponseInit;
|
|
5
|
-
constructor(body:
|
|
5
|
+
constructor(body: T, init?: ResponseInit);
|
|
6
|
+
json(): Response;
|
|
6
7
|
}
|
|
7
8
|
export { created, Created };
|
|
8
9
|
//# sourceMappingURL=created.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"created.d.ts","sourceRoot":"","sources":["../../src/httpResponses/created.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO;
|
|
1
|
+
{"version":3,"file":"created.d.ts","sourceRoot":"","sources":["../../src/httpResponses/created.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY;IAKxC,IAAI,IAAI,QAAQ;CAOjB;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -12,5 +12,12 @@ class Created {
|
|
|
12
12
|
this.body = body;
|
|
13
13
|
this.init = init || {};
|
|
14
14
|
}
|
|
15
|
+
json() {
|
|
16
|
+
return new Response(JSON.stringify(this.body), {
|
|
17
|
+
...this.init,
|
|
18
|
+
status: 201,
|
|
19
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
20
|
+
});
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
export { created, Created };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noContent.d.ts","sourceRoot":"","sources":["../../src/httpResponses/noContent.ts"],"names":[],"mappings":"AAAA,iBAAS,SAAS,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMhD;AAED,cAAM,SAAS;IACb,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,CAAC,EAAE,YAAY;
|
|
1
|
+
{"version":3,"file":"noContent.d.ts","sourceRoot":"","sources":["../../src/httpResponses/noContent.ts"],"names":[],"mappings":"AAAA,iBAAS,SAAS,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMhD;AAED,cAAM,SAAS;IACb,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,CAAC,EAAE,YAAY;IAI/B,IAAI,IAAI,QAAQ;CAOjB;AAED,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -10,5 +10,12 @@ class NoContent {
|
|
|
10
10
|
constructor(init) {
|
|
11
11
|
this.init = init || {};
|
|
12
12
|
}
|
|
13
|
+
json() {
|
|
14
|
+
return new Response(null, {
|
|
15
|
+
...this.init,
|
|
16
|
+
status: 200,
|
|
17
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
18
|
+
});
|
|
19
|
+
}
|
|
13
20
|
}
|
|
14
21
|
export { noContent, NoContent };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare function success(body: any, init?: ResponseInit): Response;
|
|
2
|
-
declare class Success {
|
|
3
|
-
body:
|
|
2
|
+
declare class Success<T> {
|
|
3
|
+
body: T;
|
|
4
4
|
init: ResponseInit;
|
|
5
|
-
constructor(body:
|
|
5
|
+
constructor(body: T, init?: ResponseInit);
|
|
6
|
+
json(): Response;
|
|
6
7
|
}
|
|
7
8
|
export { success, Success };
|
|
8
9
|
//# sourceMappingURL=success.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../src/httpResponses/success.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO;
|
|
1
|
+
{"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../src/httpResponses/success.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY;IAKxC,IAAI,IAAI,QAAQ;CAOjB;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -12,5 +12,12 @@ class Success {
|
|
|
12
12
|
this.body = body;
|
|
13
13
|
this.init = init || {};
|
|
14
14
|
}
|
|
15
|
+
json() {
|
|
16
|
+
return new Response(JSON.stringify(this.body), {
|
|
17
|
+
...this.init,
|
|
18
|
+
status: 200,
|
|
19
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
20
|
+
});
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
export { success, Success };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare function updated(body: any, init?: ResponseInit): Response;
|
|
2
|
-
declare class Updated {
|
|
3
|
-
body:
|
|
2
|
+
declare class Updated<T> {
|
|
3
|
+
body: T;
|
|
4
4
|
init: ResponseInit;
|
|
5
|
-
constructor(body:
|
|
5
|
+
constructor(body: T, init?: ResponseInit);
|
|
6
|
+
json(): Response;
|
|
6
7
|
}
|
|
7
8
|
export { updated, Updated };
|
|
8
9
|
//# sourceMappingURL=updated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updated.d.ts","sourceRoot":"","sources":["../../src/httpResponses/updated.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO;
|
|
1
|
+
{"version":3,"file":"updated.d.ts","sourceRoot":"","sources":["../../src/httpResponses/updated.ts"],"names":[],"mappings":"AAAA,iBAAS,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,QAAQ,CAMzD;AAED,cAAM,OAAO,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,YAAY,CAAC;gBAEP,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,YAAY;IAKxC,IAAI,IAAI,QAAQ;CAOjB;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -12,5 +12,12 @@ class Updated {
|
|
|
12
12
|
this.body = body;
|
|
13
13
|
this.init = init || {};
|
|
14
14
|
}
|
|
15
|
+
json() {
|
|
16
|
+
return new Response(JSON.stringify(this.body), {
|
|
17
|
+
...this.init,
|
|
18
|
+
status: 200,
|
|
19
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
20
|
+
});
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
export { updated, Updated };
|
package/package.json
CHANGED
|
@@ -6,14 +6,22 @@ function created(body: any, init?: ResponseInit): Response {
|
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
class Created {
|
|
10
|
-
body:
|
|
9
|
+
class Created<T> {
|
|
10
|
+
body: T;
|
|
11
11
|
init: ResponseInit;
|
|
12
12
|
|
|
13
|
-
constructor(body:
|
|
13
|
+
constructor(body: T, init?: ResponseInit) {
|
|
14
14
|
this.body = body;
|
|
15
15
|
this.init = init || {};
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
json(): Response {
|
|
19
|
+
return new Response(JSON.stringify(this.body), {
|
|
20
|
+
...this.init,
|
|
21
|
+
status: 201,
|
|
22
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
23
|
+
});
|
|
24
|
+
}
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
export { created, Created };
|
|
@@ -12,6 +12,14 @@ class NoContent {
|
|
|
12
12
|
constructor(init?: ResponseInit) {
|
|
13
13
|
this.init = init || {};
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
json(): Response {
|
|
17
|
+
return new Response(null, {
|
|
18
|
+
...this.init,
|
|
19
|
+
status: 200,
|
|
20
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
21
|
+
});
|
|
22
|
+
}
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
export { noContent, NoContent };
|
|
@@ -6,14 +6,22 @@ function success(body: any, init?: ResponseInit): Response {
|
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
class Success {
|
|
10
|
-
body:
|
|
9
|
+
class Success<T> {
|
|
10
|
+
body: T;
|
|
11
11
|
init: ResponseInit;
|
|
12
12
|
|
|
13
|
-
constructor(body:
|
|
13
|
+
constructor(body: T, init?: ResponseInit) {
|
|
14
14
|
this.body = body;
|
|
15
15
|
this.init = init || {};
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
json(): Response {
|
|
19
|
+
return new Response(JSON.stringify(this.body), {
|
|
20
|
+
...this.init,
|
|
21
|
+
status: 200,
|
|
22
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
23
|
+
});
|
|
24
|
+
}
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
export { success, Success };
|
|
@@ -6,14 +6,22 @@ function updated(body: any, init?: ResponseInit): Response {
|
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
class Updated {
|
|
10
|
-
body:
|
|
9
|
+
class Updated<T> {
|
|
10
|
+
body: T;
|
|
11
11
|
init: ResponseInit;
|
|
12
12
|
|
|
13
|
-
constructor(body:
|
|
13
|
+
constructor(body: T, init?: ResponseInit) {
|
|
14
14
|
this.body = body;
|
|
15
15
|
this.init = init || {};
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
json(): Response {
|
|
19
|
+
return new Response(JSON.stringify(this.body), {
|
|
20
|
+
...this.init,
|
|
21
|
+
status: 200,
|
|
22
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
23
|
+
});
|
|
24
|
+
}
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
export { updated, Updated };
|