@basmilius/http-client 1.5.5 → 1.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.
Files changed (72) hide show
  1. package/dist/adapter/HttpAdapter.d.ts +3 -3
  2. package/dist/adapter/index.d.ts +1 -1
  3. package/dist/decorator/adapter.d.ts +2 -2
  4. package/dist/decorator/bound.d.ts +1 -1
  5. package/dist/decorator/debounce.d.ts +1 -1
  6. package/dist/decorator/dto/arrayProxy.d.ts +15 -15
  7. package/dist/decorator/dto/classProxy.d.ts +8 -8
  8. package/dist/decorator/dto/clone.d.ts +4 -4
  9. package/dist/decorator/dto/constant.d.ts +7 -7
  10. package/dist/decorator/dto/fill.d.ts +4 -4
  11. package/dist/decorator/dto/helper/areEqual.d.ts +4 -4
  12. package/dist/decorator/dto/helper/assertDto.d.ts +4 -4
  13. package/dist/decorator/dto/helper/circularProtect.d.ts +1 -1
  14. package/dist/decorator/dto/helper/cloneDto.d.ts +3 -3
  15. package/dist/decorator/dto/helper/executeIfDtoDirtyAndMarkClean.d.ts +7 -4
  16. package/dist/decorator/dto/helper/index.d.ts +17 -17
  17. package/dist/decorator/dto/helper/instance.d.ts +2 -2
  18. package/dist/decorator/dto/helper/isDto.d.ts +4 -4
  19. package/dist/decorator/dto/helper/isDtoClean.d.ts +3 -3
  20. package/dist/decorator/dto/helper/isDtoDirty.d.ts +3 -3
  21. package/dist/decorator/dto/helper/markDtoClean.d.ts +3 -3
  22. package/dist/decorator/dto/helper/markDtoDirty.d.ts +3 -3
  23. package/dist/decorator/dto/helper/relateDtoTo.d.ts +4 -4
  24. package/dist/decorator/dto/helper/relateValueTo.d.ts +4 -4
  25. package/dist/decorator/dto/helper/trackDto.d.ts +3 -3
  26. package/dist/decorator/dto/helper/triggerDto.d.ts +3 -4
  27. package/dist/decorator/dto/helper/unrelateDtoFrom.d.ts +4 -4
  28. package/dist/decorator/dto/helper/unrelateValueFrom.d.ts +4 -4
  29. package/dist/decorator/dto/index.d.ts +6 -6
  30. package/dist/decorator/dto/instanceProxy.d.ts +21 -21
  31. package/dist/decorator/dto/map.d.ts +2 -2
  32. package/dist/decorator/dto/refProxy.d.ts +30 -30
  33. package/dist/decorator/dto/serialize/deserialize.d.ts +1 -1
  34. package/dist/decorator/dto/serialize/deserializeArray.d.ts +1 -1
  35. package/dist/decorator/dto/serialize/deserializeDateTime.d.ts +3 -3
  36. package/dist/decorator/dto/serialize/deserializeDto.d.ts +3 -3
  37. package/dist/decorator/dto/serialize/deserializeObject.d.ts +1 -1
  38. package/dist/decorator/dto/serialize/deserializeUnknown.d.ts +1 -1
  39. package/dist/decorator/dto/serialize/index.d.ts +2 -2
  40. package/dist/decorator/dto/serialize/isSerializedDateTime.d.ts +2 -2
  41. package/dist/decorator/dto/serialize/isSerializedDto.d.ts +2 -2
  42. package/dist/decorator/dto/serialize/serialize.d.ts +1 -1
  43. package/dist/decorator/dto/serialize/serializeArray.d.ts +2 -2
  44. package/dist/decorator/dto/serialize/serializeDateTime.d.ts +3 -3
  45. package/dist/decorator/dto/serialize/serializeDto.d.ts +3 -3
  46. package/dist/decorator/dto/serialize/serializeObject.d.ts +1 -1
  47. package/dist/decorator/dto/serialize/serializeUnknown.d.ts +2 -2
  48. package/dist/decorator/dto/serialize/uuid.d.ts +1 -1
  49. package/dist/decorator/dto/symbols.d.ts +11 -11
  50. package/dist/decorator/dto/toJSON.d.ts +4 -4
  51. package/dist/decorator/index.d.ts +7 -7
  52. package/dist/dto/BlobResponse.d.ts +4 -4
  53. package/dist/dto/Paginated.d.ts +7 -7
  54. package/dist/dto/index.d.ts +2 -2
  55. package/dist/http/BaseResponse.d.ts +8 -8
  56. package/dist/http/BaseService.d.ts +3 -3
  57. package/dist/http/HttpClient.d.ts +8 -8
  58. package/dist/http/QueryString.d.ts +11 -12
  59. package/dist/http/RequestBuilder.d.ts +31 -28
  60. package/dist/http/RequestError.d.ts +7 -7
  61. package/dist/http/helpers.d.ts +1 -1
  62. package/dist/http/index.d.ts +7 -7
  63. package/dist/http-client.js +3638 -1
  64. package/dist/http-client.js.map +68 -5
  65. package/dist/index.d.ts +5 -5
  66. package/package.json +56 -57
  67. package/dist/decorator/dto/instance.d.ts +0 -31
  68. package/dist/decorator/dto/serialize/types.d.ts +0 -3
  69. package/dist/type/index.d.ts +0 -2
  70. package/dist/util/datetime.d.ts +0 -2
  71. package/dist/util/index.d.ts +0 -2
  72. package/dist/util/reflection.d.ts +0 -5
@@ -1,5 +1,5 @@
1
- import { Paginated } from '../dto';
1
+ import { Paginated } from "@/dto";
2
2
  export declare class HttpAdapter {
3
- static parsePaginatedAdapter<T>(response: object, adapterMethod: (item: object) => T): Paginated<T>;
4
- static parseFileNameFromContentDispositionHeader(header: string): string;
3
+ static parsePaginatedAdapter<T>(response: object, adapterMethod: (item: object) => T): Paginated<T>;
4
+ static parseFileNameFromContentDispositionHeader(header: string): string;
5
5
  }
@@ -1 +1 @@
1
- export { HttpAdapter } from './HttpAdapter';
1
+ export { HttpAdapter } from "./HttpAdapter";
@@ -1,2 +1,2 @@
1
- import type { Constructor } from '../util';
2
- export default function <T extends Constructor>(Parent: T): T;
1
+ import type { Constructor } from "@basmilius/utils";
2
+ export default function<T extends Constructor>(Parent: T): T;
@@ -1 +1 @@
1
- export default function (): (target: object, method: string) => void;
1
+ export default function(): (target: object, method: string) => void;
@@ -1 +1 @@
1
- export default function (interval: number): (target: object, _: string, descriptor: PropertyDescriptor) => void;
1
+ export default function(interval: number): unknown;
@@ -1,18 +1,18 @@
1
1
  declare const _default: {
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): boolean;
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 '../../util';
2
- import type DtoInstance from './instance';
1
+ import type { Constructor } from "@basmilius/utils";
2
+ import type DtoInstance from "./instance";
3
3
  declare const _default: {
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>;
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 './instance';
1
+ import type DtoInstance from "./instance";
2
2
  /**
3
- * Returns a clone of the dto.
4
- */
5
- export default function <T>(this: DtoInstance<T>): DtoInstance<T>;
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 = false;
2
- export declare const ENABLE_DIRTY_LOGGING = false;
3
- export declare const ENABLE_REACTIVE_LOGGING = false;
4
- export declare const ENABLE_GET_LOGGING = false;
5
- export declare const ENABLE_SET_LOGGING = false;
6
- export declare const ENABLE_SERIALIZATION_LOGGING = false;
7
- export declare const OVERRIDE_CONSOLE_LOG = false;
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 './instance';
1
+ import type DtoInstance from "./instance";
2
2
  /**
3
- * Fills the dto with the given data.
4
- */
5
- export default function (this: DtoInstance<unknown>, data: Record<string, unknown>): void;
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
- * 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;
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 '../instance';
1
+ import type DtoInstance from "../instance";
2
2
  /**
3
- * Asserts that the given object is a dto.
4
- */
5
- export default function (obj: unknown): asserts obj is DtoInstance<never>;
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 <T extends (...args: any[]) => unknown>(fn: T, arg1?: number, arg2?: number): T;
1
+ export default function<T extends (...args: any[]) => unknown>(fn: T, arg1?: number, arg2?: number): T;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Clones the given dto.
3
- */
4
- export default function <T>(obj: T): T;
2
+ * Clones the given dto.
3
+ */
4
+ export default function<T>(obj: T): T;
@@ -1,5 +1,8 @@
1
- import type DtoInstance from '../instance';
1
+ import type DtoInstance from "../instance";
2
2
  /**
3
- * Executes the given function if the given dto is marked dirty.
4
- */
5
- export default function <T, R = void>(obj: T, fn: (dto: T & DtoInstance<T>) => Promise<R>): Promise<void>;
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 './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';
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 '../instance';
2
- export default function <T>(dto: DtoInstance<T>): DtoInstance<T>;
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 '../instance';
1
+ import type DtoInstance from "../instance";
2
2
  /**
3
- * Checks if the given object is a dto.
4
- */
5
- export default function (obj: unknown): obj is DtoInstance<unknown>;
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
- * Checks if the given dto is clean.
3
- */
4
- export default function (obj: unknown): boolean;
2
+ * Checks if the given dto is clean.
3
+ */
4
+ export default function(obj: unknown): boolean;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Checks if the given dto is dirty.
3
- */
4
- export default function (obj: unknown): boolean;
2
+ * Checks if the given dto is dirty.
3
+ */
4
+ export default function(obj: unknown): boolean;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Marks the given dto clean.
3
- */
4
- declare const markDtoClean: (obj: unknown) => void;
2
+ * Marks the given dto clean.
3
+ */
4
+ declare const markDtoClean: unknown;
5
5
  export default markDtoClean;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Marks the given dto dirty.
3
- */
4
- declare const markDtoDirty: (obj: unknown, key?: string | number) => void;
2
+ * Marks the given dto dirty.
3
+ */
4
+ declare const markDtoDirty: unknown;
5
5
  export default markDtoDirty;
@@ -1,5 +1,5 @@
1
- import type DtoInstance from '../instance';
1
+ import type DtoInstance from "../instance";
2
2
  /**
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;
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 '../instance';
1
+ import type DtoInstance from "../instance";
2
2
  /**
3
- * Creates relationships between the given value and dto.
4
- */
5
- export default function (dto: DtoInstance<unknown>, key: string, value: unknown): void;
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 '../instance';
1
+ import type DtoInstance from "../instance";
2
2
  /**
3
- * Tracking for when a dto property is being accessed.
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,5 @@
1
- import type DtoInstance from '../instance';
2
1
  /**
3
- * Trigger for when a dto property is being updated.
4
- */
5
- declare const triggerDto: (dto: DtoInstance<unknown>, key: string | symbol, value: unknown, oldValue?: unknown) => void;
2
+ * Trigger for when a dto property is being updated.
3
+ */
4
+ declare const triggerDto: unknown;
6
5
  export default triggerDto;
@@ -1,5 +1,5 @@
1
- import type DtoInstance from '../instance';
1
+ import type DtoInstance from "../instance";
2
2
  /**
3
- * Removes a parent-child relationship between the given two dtos.
4
- */
5
- export default function (dto: DtoInstance<unknown>, parent: DtoInstance<unknown>): void;
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 '../instance';
1
+ import type DtoInstance from "../instance";
2
2
  /**
3
- * Removes relationships between the given value and dto.
4
- */
5
- export default function (dto: DtoInstance<unknown>, value: unknown): void;
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 { Constructor } from '../../util';
2
- import type DtoInstance from './instance';
1
+ import { type Constructor } from "@basmilius/utils";
2
+ import type DtoInstance from "./instance";
3
3
  /**
4
- * Provides reactivity to the decorated class.
5
- */
6
- export default function <T extends Constructor>(clazz: T): T;
7
- export type { DtoInstance };
4
+ * Provides reactivity to the decorated class.
5
+ */
6
+ export default function<T extends Constructor>(clazz: T): T;
7
+ export type { DtoInstance };
@@ -1,24 +1,24 @@
1
- import type DtoInstance from './instance';
1
+ import type DtoInstance from "./instance";
2
2
  declare const _default: {
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>): string[];
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;
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 '../../util';
2
- import type DtoInstance from './instance';
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 'vue';
2
- import type DtoInstance from './instance';
1
+ import type { Ref } from "vue";
2
+ import type DtoInstance from "./instance";
3
3
  declare const _default: {
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>>): (string | symbol)[];
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;
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 (serialized: string): unknown;
1
+ export default function(serialized: string): unknown;
@@ -1 +1 @@
1
- export default function (obj: unknown[]): unknown[];
1
+ export default function(obj: unknown[]): unknown[];
@@ -1,3 +1,3 @@
1
- import { DateTime } from 'luxon';
2
- import type { SerializedDateTime } from './types';
3
- export default function ([, iso]: SerializedDateTime): DateTime;
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 './types';
2
- import type DtoInstance from '../instance';
3
- export default function ([, id, name, state, args]: SerializedDto): DtoInstance<unknown>;
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 (obj: object): Record<string, unknown>;
1
+ export default function(obj: object): Record<string, unknown>;
@@ -1 +1 @@
1
- export default function (obj: unknown): unknown;
1
+ export default function(obj: unknown): unknown;
@@ -1,3 +1,3 @@
1
- import deserialize from './deserialize';
2
- import serialize from './serialize';
1
+ import deserialize from "./deserialize";
2
+ import serialize from "./serialize";
3
3
  export { deserialize, serialize };
@@ -1,2 +1,2 @@
1
- import type { SerializedDateTime } from './types';
2
- export default function (obj: unknown): obj is SerializedDateTime;
1
+ import type { SerializedDateTime } from "./types";
2
+ export default function(obj: unknown): obj is SerializedDateTime;
@@ -1,2 +1,2 @@
1
- import type { SerializedDto } from './types';
2
- export default function (obj: unknown): obj is SerializedDto;
1
+ import type { SerializedDto } from "./types";
2
+ export default function(obj: unknown): obj is SerializedDto;
@@ -1 +1 @@
1
- export default function (obj: unknown): string;
1
+ export default function(obj: unknown): string;
@@ -1,2 +1,2 @@
1
- import type { Serialized } from './types';
2
- export default function (obj: unknown[]): Serialized[];
1
+ import type { Serialized } from "./types";
2
+ export default function(obj: unknown[]): Serialized[];
@@ -1,3 +1,3 @@
1
- import type { DateTime } from 'luxon';
2
- import type { SerializedDateTime } from './types';
3
- export default function (obj: DateTime): SerializedDateTime;
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 './types';
2
- import type DtoInstance from '../instance';
3
- export default function (obj: DtoInstance<unknown>): SerializedDto;
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 (obj: object): Record<string, unknown>;
1
+ export default function(obj: object): Record<string, unknown>;
@@ -1,2 +1,2 @@
1
- import type { Serialized } from './types';
2
- export default function (obj: unknown): Serialized | undefined;
1
+ import type { Serialized } from "./types";
2
+ export default function(obj: unknown): Serialized | undefined;
@@ -1 +1 @@
1
- export default function (): string;
1
+ export default function();
@@ -1,11 +1,11 @@
1
- export declare const ARGS: unique symbol;
2
- export declare const CHILDREN: unique symbol;
3
- export declare const DESCRIPTORS: unique symbol;
4
- export declare const DIRTY: unique symbol;
5
- export declare const NAME: unique symbol;
6
- export declare const PARENT: unique symbol;
7
- export declare const PARENT_KEY: unique symbol;
8
- export declare const PROPERTIES: unique symbol;
9
- export declare const PROXY: unique symbol;
10
- export declare const TRACK: unique symbol;
11
- export declare const TRIGGER: unique symbol;
1
+ export declare const ARGS: unknown;
2
+ export declare const CHILDREN: unknown;
3
+ export declare const DESCRIPTORS: unknown;
4
+ export declare const DIRTY: unknown;
5
+ export declare const NAME: unknown;
6
+ export declare const PARENT: unknown;
7
+ export declare const PARENT_KEY: unknown;
8
+ export declare const PROPERTIES: unknown;
9
+ export declare const PROXY: unknown;
10
+ export declare const TRACK: unknown;
11
+ export declare const TRIGGER: unknown;
@@ -1,5 +1,5 @@
1
- import type DtoInstance from './instance';
1
+ import type DtoInstance from "./instance";
2
2
  /**
3
- * Returns the json object representation of the dto.
4
- */
5
- export default function (this: DtoInstance<unknown>): Record<string, unknown>;
3
+ * Returns the json object representation of the dto.
4
+ */
5
+ export default function(this: DtoInstance<unknown>): Record<string, unknown>;