@arkyn/server 1.4.50 → 1.4.52
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 +5 -3
- package/dist/httpResponses/created.d.ts.map +1 -1
- package/dist/httpResponses/created.js +14 -0
- package/dist/httpResponses/noContent.d.ts +2 -0
- package/dist/httpResponses/noContent.d.ts.map +1 -1
- package/dist/httpResponses/noContent.js +14 -0
- package/dist/httpResponses/success.d.ts +5 -3
- package/dist/httpResponses/success.d.ts.map +1 -1
- package/dist/httpResponses/success.js +14 -0
- package/dist/httpResponses/updated.d.ts +5 -3
- package/dist/httpResponses/updated.d.ts.map +1 -1
- package/dist/httpResponses/updated.js +14 -0
- package/package.json +1 -1
- package/src/httpResponses/created.ts +19 -3
- package/src/httpResponses/noContent.ts +16 -0
- package/src/httpResponses/success.ts +19 -3
- package/src/httpResponses/updated.ts +19 -3
|
@@ -1,8 +1,10 @@
|
|
|
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
|
+
response(): Response;
|
|
7
|
+
json(): Promise<any>;
|
|
6
8
|
}
|
|
7
9
|
export { created, Created };
|
|
8
10
|
//# 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,QAAQ;IAQR,IAAI;CAOL;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -12,5 +12,19 @@ class Created {
|
|
|
12
12
|
this.body = body;
|
|
13
13
|
this.init = init || {};
|
|
14
14
|
}
|
|
15
|
+
response() {
|
|
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
|
+
}
|
|
22
|
+
json() {
|
|
23
|
+
return new Response(JSON.stringify(this.body), {
|
|
24
|
+
...this.init,
|
|
25
|
+
status: 201,
|
|
26
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
27
|
+
}).json();
|
|
28
|
+
}
|
|
15
29
|
}
|
|
16
30
|
export { created, Created };
|
|
@@ -2,6 +2,8 @@ declare function noContent(init?: ResponseInit): Response;
|
|
|
2
2
|
declare class NoContent {
|
|
3
3
|
init: ResponseInit;
|
|
4
4
|
constructor(init?: ResponseInit);
|
|
5
|
+
response(): Response;
|
|
6
|
+
json(): Promise<any>;
|
|
5
7
|
}
|
|
6
8
|
export { noContent, NoContent };
|
|
7
9
|
//# sourceMappingURL=noContent.d.ts.map
|
|
@@ -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,QAAQ;IAQR,IAAI;CAOL;AAED,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -10,5 +10,19 @@ class NoContent {
|
|
|
10
10
|
constructor(init) {
|
|
11
11
|
this.init = init || {};
|
|
12
12
|
}
|
|
13
|
+
response() {
|
|
14
|
+
return new Response(null, {
|
|
15
|
+
...this.init,
|
|
16
|
+
status: 200,
|
|
17
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
json() {
|
|
21
|
+
return new Response(null, {
|
|
22
|
+
...this.init,
|
|
23
|
+
status: 200,
|
|
24
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
25
|
+
}).json();
|
|
26
|
+
}
|
|
13
27
|
}
|
|
14
28
|
export { noContent, NoContent };
|
|
@@ -1,8 +1,10 @@
|
|
|
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
|
+
response(): Response;
|
|
7
|
+
json(): Promise<any>;
|
|
6
8
|
}
|
|
7
9
|
export { success, Success };
|
|
8
10
|
//# 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,QAAQ;IAQR,IAAI;CAOL;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -12,5 +12,19 @@ class Success {
|
|
|
12
12
|
this.body = body;
|
|
13
13
|
this.init = init || {};
|
|
14
14
|
}
|
|
15
|
+
response() {
|
|
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
|
+
}
|
|
22
|
+
json() {
|
|
23
|
+
return new Response(JSON.stringify(this.body), {
|
|
24
|
+
...this.init,
|
|
25
|
+
status: 200,
|
|
26
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
27
|
+
}).json();
|
|
28
|
+
}
|
|
15
29
|
}
|
|
16
30
|
export { success, Success };
|
|
@@ -1,8 +1,10 @@
|
|
|
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
|
+
response(): Response;
|
|
7
|
+
json(): Promise<any>;
|
|
6
8
|
}
|
|
7
9
|
export { updated, Updated };
|
|
8
10
|
//# 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,QAAQ;IAQR,IAAI;CAOL;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -12,5 +12,19 @@ class Updated {
|
|
|
12
12
|
this.body = body;
|
|
13
13
|
this.init = init || {};
|
|
14
14
|
}
|
|
15
|
+
response() {
|
|
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
|
+
}
|
|
22
|
+
json() {
|
|
23
|
+
return new Response(JSON.stringify(this.body), {
|
|
24
|
+
...this.init,
|
|
25
|
+
status: 200,
|
|
26
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
27
|
+
}).json();
|
|
28
|
+
}
|
|
15
29
|
}
|
|
16
30
|
export { updated, Updated };
|
package/package.json
CHANGED
|
@@ -6,14 +6,30 @@ 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
|
+
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
|
+
}
|
|
25
|
+
|
|
26
|
+
json() {
|
|
27
|
+
return new Response(JSON.stringify(this.body), {
|
|
28
|
+
...this.init,
|
|
29
|
+
status: 201,
|
|
30
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
31
|
+
}).json();
|
|
32
|
+
}
|
|
17
33
|
}
|
|
18
34
|
|
|
19
35
|
export { created, Created };
|
|
@@ -12,6 +12,22 @@ class NoContent {
|
|
|
12
12
|
constructor(init?: ResponseInit) {
|
|
13
13
|
this.init = init || {};
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
response() {
|
|
17
|
+
return new Response(null, {
|
|
18
|
+
...this.init,
|
|
19
|
+
status: 200,
|
|
20
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
json() {
|
|
25
|
+
return new Response(null, {
|
|
26
|
+
...this.init,
|
|
27
|
+
status: 200,
|
|
28
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
29
|
+
}).json();
|
|
30
|
+
}
|
|
15
31
|
}
|
|
16
32
|
|
|
17
33
|
export { noContent, NoContent };
|
|
@@ -6,14 +6,30 @@ 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
|
+
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
|
+
}
|
|
25
|
+
|
|
26
|
+
json() {
|
|
27
|
+
return new Response(JSON.stringify(this.body), {
|
|
28
|
+
...this.init,
|
|
29
|
+
status: 200,
|
|
30
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
31
|
+
}).json();
|
|
32
|
+
}
|
|
17
33
|
}
|
|
18
34
|
|
|
19
35
|
export { success, Success };
|
|
@@ -6,14 +6,30 @@ 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
|
+
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
|
+
}
|
|
25
|
+
|
|
26
|
+
json() {
|
|
27
|
+
return new Response(JSON.stringify(this.body), {
|
|
28
|
+
...this.init,
|
|
29
|
+
status: 200,
|
|
30
|
+
headers: { "Content-Type": "application/json", ...this.init.headers },
|
|
31
|
+
}).json();
|
|
32
|
+
}
|
|
17
33
|
}
|
|
18
34
|
|
|
19
35
|
export { updated, Updated };
|