typedrest 0.4.1 → 0.6.0
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/README.md +42 -4
- package/endpoints/{CachingEndpoint.ts → CachingEndpoint.d.ts} +0 -1
- package/endpoints/Endpoint.d.ts +121 -0
- package/endpoints/Endpoint.js +9 -22
- package/endpoints/{EntryEndpoint.ts → EntryEndpoint.d.ts} +7 -27
- package/endpoints/EntryEndpoint.js +3 -14
- package/endpoints/generic/{CollectionEndpoint.ts → CollectionEndpoint.d.ts} +2 -5
- package/endpoints/generic/{ETagEndpointBase.ts → ETagEndpointBase.d.ts} +7 -38
- package/endpoints/generic/ETagEndpointBase.js +27 -42
- package/endpoints/generic/{ElementEndpoint.ts → ElementEndpoint.d.ts} +12 -70
- package/endpoints/generic/ElementEndpoint.js +39 -60
- package/endpoints/generic/{GenericCollectionEndpoint.ts → GenericCollectionEndpoint.d.ts} +43 -75
- package/endpoints/generic/GenericCollectionEndpoint.js +70 -44
- package/endpoints/generic/{IndexerEndpoint.ts → IndexerEndpoint.d.ts} +4 -11
- package/endpoints/generic/PartialResponse.d.ts +19 -0
- package/endpoints/generic/PartialResponse.js +33 -0
- package/endpoints/generic/{index.ts → index.d.ts} +1 -0
- package/endpoints/generic/index.js +2 -1
- package/endpoints/{index.ts → index.d.ts} +2 -2
- package/endpoints/index.js +3 -2
- package/endpoints/raw/{BlobEndpoint.ts → BlobEndpoint.d.ts} +9 -29
- package/endpoints/raw/BlobEndpoint.js +10 -27
- package/endpoints/raw/{UploadEndpoint.ts → UploadEndpoint.d.ts} +4 -18
- package/endpoints/raw/UploadEndpoint.js +11 -22
- package/endpoints/reactive/Delay.d.ts +7 -0
- package/endpoints/reactive/Delay.js +27 -0
- package/endpoints/reactive/GenericStreamingCollectionEndpoint.d.ts +32 -0
- package/endpoints/reactive/GenericStreamingCollectionEndpoint.js +79 -0
- package/endpoints/reactive/PollingEndpoint.d.ts +39 -0
- package/endpoints/reactive/PollingEndpoint.js +67 -0
- package/endpoints/reactive/SseStreamingEndpoint.d.ts +50 -0
- package/endpoints/reactive/SseStreamingEndpoint.js +120 -0
- package/endpoints/reactive/StreamingCollectionEndpoint.d.ts +17 -0
- package/endpoints/reactive/StreamingCollectionEndpoint.js +23 -0
- package/endpoints/reactive/StreamingEndpoint.d.ts +28 -0
- package/endpoints/reactive/StreamingEndpoint.js +56 -0
- package/endpoints/reactive/index.d.ts +5 -0
- package/endpoints/reactive/index.js +22 -0
- package/endpoints/rpc/{ActionEndpoint.ts → ActionEndpoint.d.ts} +3 -10
- package/endpoints/rpc/ActionEndpoint.js +3 -14
- package/endpoints/rpc/{ConsumerEndpoint.ts → ConsumerEndpoint.d.ts} +3 -12
- package/endpoints/rpc/ConsumerEndpoint.js +5 -16
- package/endpoints/rpc/{FunctionEndpoint.ts → FunctionEndpoint.d.ts} +3 -14
- package/endpoints/rpc/FunctionEndpoint.js +6 -17
- package/endpoints/rpc/{ProducerEndpoint.ts → ProducerEndpoint.d.ts} +3 -11
- package/endpoints/rpc/ProducerEndpoint.js +4 -15
- package/endpoints/rpc/{RpcEndpointBase.ts → RpcEndpointBase.d.ts} +4 -12
- package/endpoints/rpc/RpcEndpointBase.js +3 -14
- package/errors/DefaultErrorHandler.d.ts +21 -0
- package/errors/DefaultErrorHandler.js +19 -27
- package/errors/{Errors.ts → Errors.d.ts} +23 -19
- package/errors/Errors.js +8 -2
- package/http/EntityStream.d.ts +10 -0
- package/http/EntityStream.js +42 -0
- package/http/FetchHttpClient.d.ts +15 -0
- package/http/FetchHttpClient.js +1 -1
- package/http/{HttpClient.ts → HttpClient.d.ts} +1 -3
- package/http/HttpContentRange.d.ts +23 -0
- package/http/HttpContentRange.js +39 -0
- package/http/HttpHeader.d.ts +16 -0
- package/http/HttpHeader.js +6 -1
- package/http/{HttpMethod.ts → HttpMethod.d.ts} +1 -1
- package/http/{HttpStatusCode.ts → HttpStatusCode.d.ts} +5 -2
- package/http/HttpStatusCode.js +4 -1
- package/http/ResponseCache.d.ts +19 -0
- package/http/ResponseCache.js +4 -15
- package/http/RetryAfter.d.ts +6 -0
- package/http/RetryAfter.js +24 -0
- package/http/ServerSentEvents.d.ts +50 -0
- package/http/ServerSentEvents.js +140 -0
- package/http/{index.ts → index.d.ts} +4 -0
- package/http/index.js +5 -1
- package/links/AggregateLinkExtractor.d.ts +17 -0
- package/links/AggregateLinkExtractor.js +7 -18
- package/links/HalLinkExtractor.d.ts +13 -0
- package/links/HalLinkExtractor.js +9 -20
- package/links/HeaderLinkExtractor.d.ts +13 -0
- package/links/HeaderLinkExtractor.js +4 -15
- package/links/{Link.ts → Link.d.ts} +6 -2
- package/links/{LinkExtractor.ts → LinkExtractor.d.ts} +0 -1
- package/package.json +66 -16
- package/serializers/JsonSerializer.d.ts +18 -0
- package/serializers/{Serializer.ts → Serializer.d.ts} +0 -2
- package/endpoints/Endpoint.test.ts +0 -300
- package/endpoints/Endpoint.ts +0 -247
- package/endpoints/generic/CollectionEndpoint.test.ts +0 -215
- package/endpoints/generic/ElementEndpoint.test.ts +0 -262
- package/endpoints/generic/IndexerEndpoint.test.ts +0 -12
- package/endpoints/raw/BlobEndpoint.test.ts +0 -52
- package/endpoints/raw/UploadEndpoint.test.ts +0 -47
- package/endpoints/rpc/ActionEndpoint.test.ts +0 -36
- package/endpoints/rpc/ConsumerEndpoint.test.ts +0 -29
- package/endpoints/rpc/FunctionEndpoint.test.ts +0 -29
- package/endpoints/rpc/ProducerEndpoint.test.ts +0 -32
- package/errors/DefaultErrorHandler.ts +0 -62
- package/http/FetchHttpClient.ts +0 -26
- package/http/HttpHeader.ts +0 -11
- package/http/ResponseCache.ts +0 -25
- package/jest.config.js +0 -12
- package/links/AggregateLinkExtractor.ts +0 -28
- package/links/HalLinkExtractor.ts +0 -45
- package/links/HeaderLinkExtractor.ts +0 -56
- package/serializers/JsonSerializer.ts +0 -25
- /package/endpoints/raw/{index.ts → index.d.ts} +0 -0
- /package/endpoints/rpc/{index.ts → index.d.ts} +0 -0
- /package/errors/{ErrorHandler.ts → ErrorHandler.d.ts} +0 -0
- /package/errors/{index.ts → index.d.ts} +0 -0
- /package/{index.ts → index.d.ts} +0 -0
- /package/links/{index.ts → index.d.ts} +0 -0
- /package/serializers/{index.ts → index.d.ts} +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import fetchMock from 'jest-fetch-mock';
|
|
2
|
-
import { ProducerEndpoint } from '.';
|
|
3
|
-
import { EntryEndpoint } from '..';
|
|
4
|
-
import { HttpMethod, HttpHeader } from '../../http';
|
|
5
|
-
|
|
6
|
-
class MockEntity {
|
|
7
|
-
constructor(public id: number, public name: string) { }
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
fetchMock.enableMocks();
|
|
11
|
-
let endpoint: ProducerEndpoint<MockEntity>;
|
|
12
|
-
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
fetchMock.resetMocks();
|
|
15
|
-
endpoint = new ProducerEndpoint(new EntryEndpoint('http://localhost/'), 'endpoint');
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
test('invoke', async () => {
|
|
19
|
-
fetchMock.mockOnceIf(
|
|
20
|
-
req => req.method === HttpMethod.Post && req.url === 'http://localhost/endpoint',
|
|
21
|
-
async req => {
|
|
22
|
-
expect(req.headers.get(HttpHeader.Accept)).toBe('application/json');
|
|
23
|
-
return {
|
|
24
|
-
headers: { [HttpHeader.ContentType]: 'application/json' },
|
|
25
|
-
body: '{"id":1,"name":"input"}'
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
const result = await endpoint.invoke();
|
|
31
|
-
expect(result).toEqual(new MockEntity(1, 'input'));
|
|
32
|
-
});
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ErrorHandler } from "./ErrorHandler";
|
|
2
|
-
import { HttpError, BadRequestError, AuthenticationError, AuthorizationError, NotFoundError, TimeoutError, ConflictError, ConcurrencyError } from "./Errors";
|
|
3
|
-
import { HttpStatusCode, HttpHeader } from "../http";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Handles errors in HTTP responses by mapping status codes to common error types.
|
|
7
|
-
*/
|
|
8
|
-
export class DefaultErrorHandler implements ErrorHandler {
|
|
9
|
-
/**
|
|
10
|
-
* Throws appropriate `Error`s based on HTTP status codes and response bodies.
|
|
11
|
-
*
|
|
12
|
-
* @throws {@link errors!BadRequestError}: {@link http!HttpStatusCode.BadRequest}
|
|
13
|
-
* @throws {@link errors!AuthenticationError}: {@link http!HttpStatusCode.Unauthorized}
|
|
14
|
-
* @throws {@link errors!AuthorizationError}: {@link http!HttpStatusCode.Forbidden}
|
|
15
|
-
* @throws {@link errors!NotFoundError}: {@link http!HttpStatusCode.NotFound} or {@link http!HttpStatusCode.Gone}
|
|
16
|
-
* @throws {@link errors!TimeoutError}: {@link http!HttpStatusCode.RequestTimeout}
|
|
17
|
-
* @throws {@link errors!ConflictError}: {@link http!HttpStatusCode.Conflict}
|
|
18
|
-
* @throws {@link errors!ConcurrencyError}: {@link http!HttpStatusCode.PreconditionFailed}
|
|
19
|
-
* @throws {@link errors!HttpError}: Other non-success status code
|
|
20
|
-
*/
|
|
21
|
-
async handle(response: Response) {
|
|
22
|
-
if (response.ok) return;
|
|
23
|
-
|
|
24
|
-
const contentType = response.headers.get(HttpHeader.ContentType);
|
|
25
|
-
let jsonBody: any;
|
|
26
|
-
if (contentType?.startsWith("application/json") || contentType?.includes("+json")) {
|
|
27
|
-
try {
|
|
28
|
-
jsonBody = await response.json();
|
|
29
|
-
} catch {
|
|
30
|
-
jsonBody = undefined;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const errorType = DefaultErrorHandler.errorType(response.status);
|
|
35
|
-
throw new errorType(
|
|
36
|
-
jsonBody?.message ?? jsonBody?.details ?? `HTTP ${response.status} ${response.statusText}`,
|
|
37
|
-
response.status,
|
|
38
|
-
jsonBody);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
private static errorType(status: HttpStatusCode): new (message: string, status: HttpStatusCode, data?: any) => Error {
|
|
42
|
-
switch (status) {
|
|
43
|
-
case HttpStatusCode.BadRequest:
|
|
44
|
-
return BadRequestError;
|
|
45
|
-
case HttpStatusCode.Unauthorized:
|
|
46
|
-
return AuthenticationError;
|
|
47
|
-
case HttpStatusCode.Forbidden:
|
|
48
|
-
return AuthorizationError;
|
|
49
|
-
case HttpStatusCode.NotFound:
|
|
50
|
-
case HttpStatusCode.Gone:
|
|
51
|
-
return NotFoundError;
|
|
52
|
-
case HttpStatusCode.RequestTimeout:
|
|
53
|
-
return TimeoutError;
|
|
54
|
-
case HttpStatusCode.Conflict:
|
|
55
|
-
return ConflictError;
|
|
56
|
-
case HttpStatusCode.PreconditionFailed:
|
|
57
|
-
return ConcurrencyError;
|
|
58
|
-
default:
|
|
59
|
-
return HttpError;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
package/http/FetchHttpClient.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { HttpMethod } from "./HttpMethod";
|
|
2
|
-
import { HttpClient } from "./HttpClient";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Communicates with remote resources using JavaScript's standard Fetch API.
|
|
6
|
-
*/
|
|
7
|
-
export class FetchHttpClient implements HttpClient {
|
|
8
|
-
/**
|
|
9
|
-
* @inheritDoc
|
|
10
|
-
*/
|
|
11
|
-
defaultHeaders = new Headers();
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @inheritDoc
|
|
15
|
-
*/
|
|
16
|
-
send(uri: URL, method: HttpMethod, signal?: AbortSignal, headers?: HeadersInit, body?: BodyInit) {
|
|
17
|
-
const mergedHeaders = new Headers(headers);
|
|
18
|
-
this.defaultHeaders.forEach((value, key) => {
|
|
19
|
-
if (!mergedHeaders.has(key)) {
|
|
20
|
-
mergedHeaders.set(key, value);
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
return fetch(uri.href, { method, signal, headers: mergedHeaders, body });
|
|
25
|
-
}
|
|
26
|
-
}
|
package/http/HttpHeader.ts
DELETED
package/http/ResponseCache.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { HttpHeader } from "./HttpHeader";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Caches the contents of a `Response`.
|
|
5
|
-
*/
|
|
6
|
-
export class ResponseCache {
|
|
7
|
-
/**
|
|
8
|
-
* Creates a new cache.
|
|
9
|
-
* @param content The content of the `Response`.
|
|
10
|
-
* @param contentType The MIME type of the `content`.
|
|
11
|
-
* @param eTag The E-Tag associated with the `content`.
|
|
12
|
-
*/
|
|
13
|
-
constructor(public readonly content: string, public readonly contentType?: string, public readonly eTag?: string) {
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Creates a new cache from a `Response`.
|
|
18
|
-
*/
|
|
19
|
-
static async from(response: Response) {
|
|
20
|
-
return new ResponseCache(
|
|
21
|
-
await response.text(),
|
|
22
|
-
response.headers.get(HttpHeader.ContentType) ?? undefined,
|
|
23
|
-
response.headers.get(HttpHeader.ETag) ?? undefined);
|
|
24
|
-
}
|
|
25
|
-
}
|
package/jest.config.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
preset: 'ts-jest',
|
|
4
|
-
// jsdom is required for Blob() constructor and fetch()!
|
|
5
|
-
testEnvironment: 'jsdom',
|
|
6
|
-
testMatch: [
|
|
7
|
-
"**/?(*.)+(spec|test).ts"
|
|
8
|
-
],
|
|
9
|
-
transform: {
|
|
10
|
-
"\\.ts$": ["ts-jest", { tsconfig: "tsconfig.test.json" }]
|
|
11
|
-
},
|
|
12
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Link } from "./Link";
|
|
2
|
-
import { LinkExtractor } from "./LinkExtractor";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Combines the results of multiple {@link LinkExtractor}s.
|
|
6
|
-
*/
|
|
7
|
-
export class AggregateLinkExtractor implements LinkExtractor {
|
|
8
|
-
private extractors: LinkExtractor[];
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Creates a new aggregate link extractor.
|
|
12
|
-
* @param extractors The link extractors to aggregate.
|
|
13
|
-
*/
|
|
14
|
-
constructor(...extractors: LinkExtractor[]) {
|
|
15
|
-
this.extractors = extractors;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @inheritDoc
|
|
20
|
-
*/
|
|
21
|
-
async getLinks(response: Response) {
|
|
22
|
-
let result: Link[] = [];
|
|
23
|
-
for (const extractor of this.extractors) {
|
|
24
|
-
result = result.concat(await extractor.getLinks(response));
|
|
25
|
-
}
|
|
26
|
-
return result;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Link } from "./Link";
|
|
2
|
-
import { LinkExtractor } from "./LinkExtractor";
|
|
3
|
-
import { HttpHeader } from "../http";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Extracts links from JSON bodies according to the Hypertext Application Language (HAL) specification.
|
|
7
|
-
*/
|
|
8
|
-
export class HalLinkExtractor implements LinkExtractor {
|
|
9
|
-
/**
|
|
10
|
-
* @inheritDoc
|
|
11
|
-
*/
|
|
12
|
-
async getLinks(response: Response): Promise<Link[]> {
|
|
13
|
-
const contentType = response.headers.get(HttpHeader.ContentType);
|
|
14
|
-
if (contentType?.startsWith("application/hal+json")) {
|
|
15
|
-
return this.parseJsonBody(await response.clone().json());
|
|
16
|
-
} else {
|
|
17
|
-
return [];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
private parseJsonBody(body: any) {
|
|
22
|
-
const links: Link[] = [];
|
|
23
|
-
|
|
24
|
-
const linkContainer: { [key: string]: any; } = body._links;
|
|
25
|
-
if (linkContainer) {
|
|
26
|
-
for (const rel in linkContainer) {
|
|
27
|
-
if (Array.isArray(linkContainer[rel])) {
|
|
28
|
-
for (const link of linkContainer[rel]) {
|
|
29
|
-
links.push(this.parseLink(rel, link));
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
links.push(this.parseLink(rel, linkContainer[rel]));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return links;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
private parseLink(rel: string, obj: any) {
|
|
41
|
-
if (!obj.href)
|
|
42
|
-
throw new Error("The link header is lacking the mandatory 'href' field.");
|
|
43
|
-
return new Link(rel, obj.href, obj.title, obj.templated ? true : false);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Link } from "./Link";
|
|
2
|
-
import { LinkExtractor } from "./LinkExtractor";
|
|
3
|
-
import { HttpHeader } from "../http";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Extracts links from HTTP headers.
|
|
7
|
-
*/
|
|
8
|
-
export class HeaderLinkExtractor implements LinkExtractor {
|
|
9
|
-
/**
|
|
10
|
-
* @inheritDoc
|
|
11
|
-
*/
|
|
12
|
-
async getLinks(response: Response) {
|
|
13
|
-
return response.headers.get(HttpHeader.Link)
|
|
14
|
-
?.match(/<[^>]*>\s*(\s*;\s*[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g)
|
|
15
|
-
?.map(value => this.parseLink(value))
|
|
16
|
-
?? [];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private parseLink(value: string) {
|
|
20
|
-
const split = this.split(value, ">");
|
|
21
|
-
const href = split.left.substring(1);
|
|
22
|
-
let rel: string | undefined;
|
|
23
|
-
let title: string | undefined;
|
|
24
|
-
let templated = false;
|
|
25
|
-
|
|
26
|
-
split.right.match(/[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g)?.forEach(param => {
|
|
27
|
-
const paramSplit = this.split(param, "=");
|
|
28
|
-
if (paramSplit.left === "rel") {
|
|
29
|
-
rel = paramSplit.right;
|
|
30
|
-
} else if (paramSplit.left === "title") {
|
|
31
|
-
title = paramSplit.right;
|
|
32
|
-
if (title.startsWith('"') && title.endsWith('"')) {
|
|
33
|
-
title = title.substring(1, title.length - 1);
|
|
34
|
-
}
|
|
35
|
-
} else if (paramSplit.left === "templated" && paramSplit.right === "true") {
|
|
36
|
-
templated = true;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
if (!rel) throw new Error("The link header is lacking the mandatory 'rel' field.");
|
|
41
|
-
return new Link(rel, href, title, templated);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
private split(str: string, separator: string): { left: string, right: string } {
|
|
45
|
-
const result = str.split(separator, 2);
|
|
46
|
-
return (result.length === 2)
|
|
47
|
-
? {
|
|
48
|
-
left: result[0],
|
|
49
|
-
right: result[1] + str.slice(result.join(separator).length)
|
|
50
|
-
}
|
|
51
|
-
: {
|
|
52
|
-
left: result[0],
|
|
53
|
-
right: ''
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Serializer } from "./Serializer";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Serializes and deserializes entities as JSON.
|
|
5
|
-
*/
|
|
6
|
-
export class JsonSerializer implements Serializer {
|
|
7
|
-
/**
|
|
8
|
-
* @inheritDoc
|
|
9
|
-
*/
|
|
10
|
-
readonly supportedMediaTypes = ["application/json"];
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
serialize<T>(entity: T) {
|
|
16
|
-
return JSON.stringify(entity);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @inheritDoc
|
|
21
|
-
*/
|
|
22
|
-
deserialize<T>(text: string) {
|
|
23
|
-
return JSON.parse(text) as T;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{index.ts → index.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|