@basmilius/http-client 1.10.0 → 1.12.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/dist/adapter/HttpAdapter.d.ts +6 -3
- package/dist/adapter/index.d.ts +1 -1
- package/dist/decorator/adapter.d.ts +2 -2
- package/dist/decorator/bound.d.ts +1 -1
- package/dist/decorator/debounce.d.ts +1 -1
- package/dist/decorator/dto/arrayProxy.d.ts +15 -15
- package/dist/decorator/dto/classProxy.d.ts +8 -8
- package/dist/decorator/dto/clone.d.ts +4 -4
- package/dist/decorator/dto/constant.d.ts +7 -7
- package/dist/decorator/dto/fill.d.ts +4 -4
- package/dist/decorator/dto/helper/areEqual.d.ts +4 -4
- package/dist/decorator/dto/helper/assertDto.d.ts +4 -4
- package/dist/decorator/dto/helper/circularProtect.d.ts +1 -1
- package/dist/decorator/dto/helper/cloneDto.d.ts +3 -3
- package/dist/decorator/dto/helper/executeIfDtoDirtyAndMarkClean.d.ts +7 -4
- package/dist/decorator/dto/helper/index.d.ts +17 -17
- package/dist/decorator/dto/helper/instance.d.ts +2 -2
- package/dist/decorator/dto/helper/isDto.d.ts +4 -4
- package/dist/decorator/dto/helper/isDtoClean.d.ts +3 -3
- package/dist/decorator/dto/helper/isDtoDirty.d.ts +3 -3
- package/dist/decorator/dto/helper/markDtoClean.d.ts +2 -2
- package/dist/decorator/dto/helper/markDtoDirty.d.ts +2 -2
- package/dist/decorator/dto/helper/relateDtoTo.d.ts +4 -4
- package/dist/decorator/dto/helper/relateValueTo.d.ts +4 -4
- package/dist/decorator/dto/helper/trackDto.d.ts +3 -3
- package/dist/decorator/dto/helper/triggerDto.d.ts +3 -3
- package/dist/decorator/dto/helper/unrelateDtoFrom.d.ts +4 -4
- package/dist/decorator/dto/helper/unrelateValueFrom.d.ts +4 -4
- package/dist/decorator/dto/index.d.ts +6 -6
- package/dist/decorator/dto/instanceProxy.d.ts +21 -21
- package/dist/decorator/dto/map.d.ts +2 -2
- package/dist/decorator/dto/refProxy.d.ts +30 -30
- package/dist/decorator/dto/serialize/deserialize.d.ts +1 -1
- package/dist/decorator/dto/serialize/deserializeArray.d.ts +1 -1
- package/dist/decorator/dto/serialize/deserializeDateTime.d.ts +3 -3
- package/dist/decorator/dto/serialize/deserializeDto.d.ts +3 -3
- package/dist/decorator/dto/serialize/deserializeObject.d.ts +1 -1
- package/dist/decorator/dto/serialize/deserializeUnknown.d.ts +1 -1
- package/dist/decorator/dto/serialize/index.d.ts +2 -2
- package/dist/decorator/dto/serialize/isSerializedDateTime.d.ts +2 -2
- package/dist/decorator/dto/serialize/isSerializedDto.d.ts +2 -2
- package/dist/decorator/dto/serialize/serialize.d.ts +1 -1
- package/dist/decorator/dto/serialize/serializeArray.d.ts +2 -2
- package/dist/decorator/dto/serialize/serializeDateTime.d.ts +3 -3
- package/dist/decorator/dto/serialize/serializeDto.d.ts +3 -3
- package/dist/decorator/dto/serialize/serializeObject.d.ts +1 -1
- package/dist/decorator/dto/serialize/serializeUnknown.d.ts +2 -2
- package/dist/decorator/dto/serialize/uuid.d.ts +1 -1
- package/dist/decorator/dto/toJSON.d.ts +4 -4
- package/dist/decorator/index.d.ts +7 -7
- package/dist/dto/BlobResponse.d.ts +5 -5
- package/dist/dto/Paginated.d.ts +8 -8
- package/dist/dto/RequestError.d.ts +9 -0
- package/dist/dto/ValidationError.d.ts +9 -0
- package/dist/dto/index.d.ts +4 -2
- package/dist/http/BaseResponse.d.ts +8 -8
- package/dist/http/BaseService.d.ts +3 -3
- package/dist/http/HttpClient.d.ts +8 -8
- package/dist/http/QueryString.d.ts +11 -12
- package/dist/http/RequestBuilder.d.ts +32 -29
- package/dist/http/helpers.d.ts +2 -1
- package/dist/http/index.d.ts +7 -8
- package/dist/http-client.js +95 -65
- package/dist/http-client.js.map +17 -17
- package/dist/index.d.ts +5 -5
- package/package.json +7 -7
- package/dist/decorator/dto/instance.d.ts +0 -29
- package/dist/decorator/dto/serialize/types.d.ts +0 -3
- package/dist/http/RequestError.d.ts +0 -9
- package/dist/type/index.d.ts +0 -2
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { Paginated } from
|
|
1
|
+
import { Paginated, RequestError, ValidationError } from "../dto";
|
|
2
|
+
import type { HttpStatusCode } from "../type";
|
|
2
3
|
export declare class HttpAdapter {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
static parsePaginatedAdapter<T>(response: object, adapterMethod: (item: object) => T): Paginated<T>;
|
|
5
|
+
static parseFileNameFromContentDispositionHeader(header: string): string;
|
|
6
|
+
static parseRequestError(response: object, statusCode: HttpStatusCode): RequestError;
|
|
7
|
+
static parseValidationError(response: object): ValidationError;
|
|
5
8
|
}
|
package/dist/adapter/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { HttpAdapter } from
|
|
1
|
+
export { HttpAdapter } from "./HttpAdapter";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Constructor } from
|
|
2
|
-
export default function
|
|
1
|
+
import type { Constructor } from "@basmilius/utils";
|
|
2
|
+
export default function<T extends Constructor>(Parent: T): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function(): (target: object, method: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function(interval: number): unknown;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Trap for when a property is deleted from the target. This
|
|
4
|
+
* will mark the parent dto as dirty and trigger an update.
|
|
5
|
+
*/
|
|
6
|
+
deleteProperty(target: unknown[], key: string | symbol): boolean
|
|
7
|
+
/**
|
|
8
|
+
* Trap for when a property of the target is being accessed. The
|
|
9
|
+
* property access is being tracked for further updates.
|
|
10
|
+
*/
|
|
11
|
+
get(target: unknown[], key: string | symbol, receiver: any): unknown
|
|
12
|
+
/**
|
|
13
|
+
* Trap for when a property of the target is being updated. This
|
|
14
|
+
* will mark the parent dto as dirty and trigger an update.
|
|
15
|
+
*/
|
|
16
|
+
set(target: unknown[], key: string | symbol, value: unknown, receiver: any)
|
|
17
17
|
};
|
|
18
18
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Constructor } from
|
|
2
|
-
import type DtoInstance from
|
|
1
|
+
import type { Constructor } from "@basmilius/utils";
|
|
2
|
+
import type DtoInstance from "./instance";
|
|
3
3
|
declare const _default: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Trap for when a dto is being constructed. Reactivity is provided
|
|
6
|
+
* to all arguments and a proxied custom ref is returned that references
|
|
7
|
+
* the actual dto instance.
|
|
8
|
+
*/
|
|
9
|
+
construct(target: Constructor, argsArray: any[], newTarget: Function): DtoInstance<unknown>
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "./instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Returns a clone of the dto.
|
|
4
|
+
*/
|
|
5
|
+
export default function<T>(this: DtoInstance<T>): DtoInstance<T>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const ENABLE_CIRCULAR_LOGGING
|
|
2
|
-
export declare const ENABLE_DIRTY_LOGGING
|
|
3
|
-
export declare const ENABLE_REACTIVE_LOGGING
|
|
4
|
-
export declare const ENABLE_GET_LOGGING
|
|
5
|
-
export declare const ENABLE_SET_LOGGING
|
|
6
|
-
export declare const ENABLE_SERIALIZATION_LOGGING
|
|
7
|
-
export declare const OVERRIDE_CONSOLE_LOG
|
|
1
|
+
export declare const ENABLE_CIRCULAR_LOGGING: boolean;
|
|
2
|
+
export declare const ENABLE_DIRTY_LOGGING: boolean;
|
|
3
|
+
export declare const ENABLE_REACTIVE_LOGGING: boolean;
|
|
4
|
+
export declare const ENABLE_GET_LOGGING: boolean;
|
|
5
|
+
export declare const ENABLE_SET_LOGGING: boolean;
|
|
6
|
+
export declare const ENABLE_SERIALIZATION_LOGGING: boolean;
|
|
7
|
+
export declare const OVERRIDE_CONSOLE_LOG: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "./instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Fills the dto with the given data.
|
|
4
|
+
*/
|
|
5
|
+
export default function(this: DtoInstance<unknown>, data: Record<string, unknown>): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
2
|
+
* Checks if the two given values are equal. When both values are a
|
|
3
|
+
* dto, the check is done by firstly converthing them to JSON.
|
|
4
|
+
*/
|
|
5
|
+
export default function(a: unknown, b: unknown): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Asserts that the given object is a dto.
|
|
4
|
+
*/
|
|
5
|
+
export default function(obj: unknown): asserts obj is DtoInstance<never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function<T extends (...args: any[]) => unknown>(fn: T, arg1?: number, arg2?: number): T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default function
|
|
2
|
+
* Clones the given dto.
|
|
3
|
+
*/
|
|
4
|
+
export default function<T>(obj: T): T;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Executes the given function if the given dto is marked dirty.
|
|
4
|
+
*/
|
|
5
|
+
export default function<
|
|
6
|
+
T,
|
|
7
|
+
R = void
|
|
8
|
+
>(obj: T, fn: (dto: T & DtoInstance<T>) => Promise<R>): Promise<void>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import areEqual from
|
|
2
|
-
import assertDto from
|
|
3
|
-
import circularProtect from
|
|
4
|
-
import cloneDto from
|
|
5
|
-
import executeIfDtoDirtyAndMarkClean from
|
|
6
|
-
import instance from
|
|
7
|
-
import isDto from
|
|
8
|
-
import isDtoClean from
|
|
9
|
-
import isDtoDirty from
|
|
10
|
-
import markDtoClean from
|
|
11
|
-
import markDtoDirty from
|
|
12
|
-
import relateDtoTo from
|
|
13
|
-
import relateValueTo from
|
|
14
|
-
import trackDto from
|
|
15
|
-
import triggerDto from
|
|
16
|
-
import unrelateDtoFrom from
|
|
17
|
-
import unrelateValueFrom from
|
|
1
|
+
import areEqual from "./areEqual";
|
|
2
|
+
import assertDto from "./assertDto";
|
|
3
|
+
import circularProtect from "./circularProtect";
|
|
4
|
+
import cloneDto from "./cloneDto";
|
|
5
|
+
import executeIfDtoDirtyAndMarkClean from "./executeIfDtoDirtyAndMarkClean";
|
|
6
|
+
import instance from "./instance";
|
|
7
|
+
import isDto from "./isDto";
|
|
8
|
+
import isDtoClean from "./isDtoClean";
|
|
9
|
+
import isDtoDirty from "./isDtoDirty";
|
|
10
|
+
import markDtoClean from "./markDtoClean";
|
|
11
|
+
import markDtoDirty from "./markDtoDirty";
|
|
12
|
+
import relateDtoTo from "./relateDtoTo";
|
|
13
|
+
import relateValueTo from "./relateValueTo";
|
|
14
|
+
import trackDto from "./trackDto";
|
|
15
|
+
import triggerDto from "./triggerDto";
|
|
16
|
+
import unrelateDtoFrom from "./unrelateDtoFrom";
|
|
17
|
+
import unrelateValueFrom from "./unrelateValueFrom";
|
|
18
18
|
export { areEqual, assertDto, circularProtect, cloneDto, executeIfDtoDirtyAndMarkClean, instance, isDto, isDtoClean, isDtoDirty, markDtoClean, markDtoDirty, relateDtoTo, relateValueTo, trackDto, triggerDto, unrelateDtoFrom, unrelateValueFrom };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
2
|
-
export default function
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
|
+
export default function<T>(dto: DtoInstance<T>): DtoInstance<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Checks if the given object is a dto.
|
|
4
|
+
*/
|
|
5
|
+
export default function(obj: unknown): obj is DtoInstance<unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default function
|
|
2
|
+
* Checks if the given dto is clean.
|
|
3
|
+
*/
|
|
4
|
+
export default function(obj: unknown): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default function
|
|
2
|
+
* Checks if the given dto is dirty.
|
|
3
|
+
*/
|
|
4
|
+
export default function(obj: unknown): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Creates a parent-child relationship between the given two dtos.
|
|
4
|
+
*/
|
|
5
|
+
export default function(dto: DtoInstance<unknown>, parent: DtoInstance<unknown>, key: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Creates relationships between the given value and dto.
|
|
4
|
+
*/
|
|
5
|
+
export default function(dto: DtoInstance<unknown>, key: string, value: unknown): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
* Tracking for when a dto property is being accessed.
|
|
4
|
+
*/
|
|
5
5
|
export default function trackDto(dto: DtoInstance<unknown>, key: string): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
* Trigger for when a dto property is being updated.
|
|
4
|
+
*/
|
|
5
5
|
declare const triggerDto: (dto: DtoInstance<unknown>, key: string | symbol, value: unknown, oldValue?: unknown) => void;
|
|
6
6
|
export default triggerDto;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Removes a parent-child relationship between the given two dtos.
|
|
4
|
+
*/
|
|
5
|
+
export default function(dto: DtoInstance<unknown>, parent: DtoInstance<unknown>): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "../instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Removes relationships between the given value and dto.
|
|
4
|
+
*/
|
|
5
|
+
export default function(dto: DtoInstance<unknown>, value: unknown): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type Constructor } from
|
|
2
|
-
import type DtoInstance from
|
|
1
|
+
import { type Constructor } from "@basmilius/utils";
|
|
2
|
+
import type DtoInstance from "./instance";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export default function
|
|
7
|
-
export
|
|
4
|
+
* Provides reactivity to the decorated class.
|
|
5
|
+
*/
|
|
6
|
+
export default function<T extends Constructor>(clazz: T): T;
|
|
7
|
+
export { DtoInstance };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "./instance";
|
|
2
2
|
declare const _default: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Trap for when a dto property is being accessed. The property
|
|
5
|
+
* access is being tracked for further updates. If the dto has
|
|
6
|
+
* any child dtos, a relationship will be added between them.
|
|
7
|
+
*/
|
|
8
|
+
get(target: DtoInstance<unknown>, key: string | symbol, receiver: any): unknown
|
|
9
|
+
/**
|
|
10
|
+
* Trap for when a descriptor of a dto property is requested.
|
|
11
|
+
*/
|
|
12
|
+
getOwnPropertyDescriptor(target: DtoInstance<unknown>, key: string | symbol): PropertyDescriptor | undefined
|
|
13
|
+
/**
|
|
14
|
+
* Trap for when the keys of a dto are requested.
|
|
15
|
+
*/
|
|
16
|
+
ownKeys(target: DtoInstance<unknown>)
|
|
17
|
+
/**
|
|
18
|
+
* Trap for when a dto property is being updated. This will
|
|
19
|
+
* mark the dto dirty and trigger an update. If an array is
|
|
20
|
+
* passed, that array will be made reactive as well.
|
|
21
|
+
*/
|
|
22
|
+
set(target: DtoInstance<unknown>, key: string | symbol, value: unknown, receiver: any): boolean
|
|
23
23
|
};
|
|
24
24
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Constructor } from
|
|
2
|
-
import type DtoInstance from
|
|
1
|
+
import type { Constructor } from "@basmilius/utils";
|
|
2
|
+
import type DtoInstance from "./instance";
|
|
3
3
|
export declare const DTO_CLASS_MAP: Record<string, Constructor<DtoInstance<unknown>>>;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import type { Ref } from
|
|
2
|
-
import type DtoInstance from
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import type DtoInstance from "./instance";
|
|
3
3
|
declare const _default: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Trap for when a ref property is being accessed. The property
|
|
6
|
+
* access is being tracked for further updates. If the requested
|
|
7
|
+
* property is not a part of {Ref}, the get is proxied to the
|
|
8
|
+
* underlying dto instance.
|
|
9
|
+
*
|
|
10
|
+
* A little trick with __v_isRef is done here, all the features
|
|
11
|
+
* of refs are used by our dto, but we don't want Vue to treat
|
|
12
|
+
* it as a ref. We return false here to trick Vue.
|
|
13
|
+
*/
|
|
14
|
+
get(target: Ref<DtoInstance<unknown>>, key: string | symbol, receiver: any): unknown
|
|
15
|
+
/**
|
|
16
|
+
* Trap for when a descriptor of a property is requested, that
|
|
17
|
+
* request is proxied to the underlying dto.
|
|
18
|
+
*/
|
|
19
|
+
getOwnPropertyDescriptor(target: Ref<DtoInstance<unknown>>, key: string | symbol): PropertyDescriptor | undefined
|
|
20
|
+
/**
|
|
21
|
+
* Trap for when the keys of the ref are requested, that request
|
|
22
|
+
* is proxied to the underlying dto.
|
|
23
|
+
*/
|
|
24
|
+
ownKeys(target: Ref<DtoInstance<unknown>>)
|
|
25
|
+
/**
|
|
26
|
+
* Trap for when a ref property is being updated. If the property
|
|
27
|
+
* is not part of {Ref}, the set is proxied to the underlying dto
|
|
28
|
+
* instance. In that proxy, the dto will be marked dirty and an
|
|
29
|
+
* update is triggered.
|
|
30
|
+
*/
|
|
31
|
+
set(target: Ref<DtoInstance<unknown>>, key: string | symbol, value: unknown, receiver: any): boolean
|
|
32
32
|
};
|
|
33
33
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function(serialized: string): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function(obj: unknown[]): unknown[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DateTime } from
|
|
2
|
-
import type { SerializedDateTime } from
|
|
3
|
-
export default function
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
import type { SerializedDateTime } from "./types";
|
|
3
|
+
export default function([, iso]: SerializedDateTime): DateTime;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SerializedDto } from
|
|
2
|
-
import type DtoInstance from
|
|
3
|
-
export default function
|
|
1
|
+
import type { SerializedDto } from "./types";
|
|
2
|
+
import type DtoInstance from "../instance";
|
|
3
|
+
export default function([, id, name, state, args]: SerializedDto): DtoInstance<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function(obj: object): Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function(obj: unknown): unknown;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import deserialize from
|
|
2
|
-
import serialize from
|
|
1
|
+
import deserialize from "./deserialize";
|
|
2
|
+
import serialize from "./serialize";
|
|
3
3
|
export { deserialize, serialize };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { SerializedDateTime } from
|
|
2
|
-
export default function
|
|
1
|
+
import type { SerializedDateTime } from "./types";
|
|
2
|
+
export default function(obj: unknown): obj is SerializedDateTime;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { SerializedDto } from
|
|
2
|
-
export default function
|
|
1
|
+
import type { SerializedDto } from "./types";
|
|
2
|
+
export default function(obj: unknown): obj is SerializedDto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function(obj: unknown): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Serialized } from
|
|
2
|
-
export default function
|
|
1
|
+
import type { Serialized } from "./types";
|
|
2
|
+
export default function(obj: unknown[]): Serialized[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { DateTime } from
|
|
2
|
-
import type { SerializedDateTime } from
|
|
3
|
-
export default function
|
|
1
|
+
import type { DateTime } from "luxon";
|
|
2
|
+
import type { SerializedDateTime } from "./types";
|
|
3
|
+
export default function(obj: DateTime): SerializedDateTime;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SerializedDto } from
|
|
2
|
-
import type DtoInstance from
|
|
3
|
-
export default function
|
|
1
|
+
import type { SerializedDto } from "./types";
|
|
2
|
+
import type DtoInstance from "../instance";
|
|
3
|
+
export default function(obj: DtoInstance<unknown>): SerializedDto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function(obj: object): Record<string, unknown>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Serialized } from
|
|
2
|
-
export default function
|
|
1
|
+
import type { Serialized } from "./types";
|
|
2
|
+
export default function(obj: unknown): Serialized | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type DtoInstance from
|
|
1
|
+
import type DtoInstance from "./instance";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default function
|
|
3
|
+
* Returns the json object representation of the dto.
|
|
4
|
+
*/
|
|
5
|
+
export default function(this: DtoInstance<unknown>): Record<string, unknown>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import adapter from
|
|
2
|
-
import bound from
|
|
3
|
-
import debounce from
|
|
4
|
-
import dto from
|
|
1
|
+
import adapter from "./adapter";
|
|
2
|
+
import bound from "./bound";
|
|
3
|
+
import debounce from "./debounce";
|
|
4
|
+
import dto from "./dto";
|
|
5
5
|
export { adapter, bound, debounce, dto };
|
|
6
|
-
export { assertDto, cloneDto, executeIfDtoDirtyAndMarkClean, isDto, isDtoClean, isDtoDirty, markDtoClean, markDtoDirty } from
|
|
7
|
-
export { deserialize, serialize } from
|
|
8
|
-
export
|
|
6
|
+
export { assertDto, cloneDto, executeIfDtoDirtyAndMarkClean, isDto, isDtoClean, isDtoDirty, markDtoClean, markDtoDirty } from "./dto/helper";
|
|
7
|
+
export { deserialize, serialize } from "./dto/serialize";
|
|
8
|
+
export { DtoInstance } from "./dto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export default class BlobResponse {
|
|
2
|
+
#private;
|
|
3
|
+
get blob(): Blob;
|
|
4
|
+
get name(): string;
|
|
5
|
+
constructor(blob: Blob, name: string);
|
|
6
6
|
}
|