@basmilius/http-client 1.5.3 → 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
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './adapter';
2
- export * from './decorator';
3
- export * from './dto';
4
- export * from './http';
5
- export type * from './type';
1
+ export * from "@/adapter";
2
+ export * from "@/decorator";
3
+ export * from "@/dto";
4
+ export * from "@/http";
5
+ export type * from "@/type";
package/package.json CHANGED
@@ -1,59 +1,58 @@
1
1
  {
2
- "name": "@basmilius/http-client",
3
- "description": "Http client for Vue projects.",
4
- "version": "1.5.3",
5
- "license": "MIT",
6
- "funding": "https://github.com/sponsors/basmilius",
7
- "homepage": "https://github.com/basmilius/http-client",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/basmilius/http-client.git"
11
- },
12
- "keywords": [
13
- "http",
14
- "http client",
15
- "http dto",
16
- "dto",
17
- "vue",
18
- "vue 3"
19
- ],
20
- "engines": {
21
- "node": ">=22"
22
- },
23
- "files": [
24
- "dist/*"
25
- ],
26
- "type": "module",
27
- "main": "./dist/http-client.js",
28
- "module": "./dist/http-client.js",
29
- "types": "./dist/index.d.ts",
30
- "exports": {
31
- ".": {
32
- "types": "./dist/index.d.ts",
33
- "default": "./dist/http-client.js"
2
+ "name": "@basmilius/http-client",
3
+ "description": "Http client for Vue projects.",
4
+ "version": "1.6.0",
5
+ "license": "MIT",
6
+ "funding": "https://github.com/sponsors/basmilius",
7
+ "homepage": "https://github.com/basmilius/http-client",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/basmilius/http-client.git"
11
+ },
12
+ "keywords": [
13
+ "http",
14
+ "http client",
15
+ "http dto",
16
+ "dto",
17
+ "vue",
18
+ "vue 3"
19
+ ],
20
+ "scripts": {
21
+ "build": "bun --bun build.ts"
22
+ },
23
+ "engines": {
24
+ "node": ">=23"
25
+ },
26
+ "files": [
27
+ "dist/*"
28
+ ],
29
+ "type": "module",
30
+ "main": "./dist/http-client.js",
31
+ "module": "./dist/http-client.js",
32
+ "types": "./dist/index.d.ts",
33
+ "exports": {
34
+ ".": {
35
+ "types": "./dist/index.d.ts",
36
+ "default": "./dist/http-client.js"
37
+ }
38
+ },
39
+ "publishConfig": {
40
+ "access": "public",
41
+ "provenance": true
42
+ },
43
+ "sideEffects": false,
44
+ "dependencies": {
45
+ "@basmilius/utils": "^1.7.0"
46
+ },
47
+ "devDependencies": {
48
+ "@types/bun": "^1.2.2",
49
+ "@types/luxon": "^3.4.2",
50
+ "luxon": "^3.5.0",
51
+ "oxc-transform": "^0.48.2",
52
+ "vue": "^3.5.13"
53
+ },
54
+ "peerDependencies": {
55
+ "luxon": "^3.5.0",
56
+ "vue": "^3.5.13"
34
57
  }
35
- },
36
- "publishConfig": {
37
- "access": "public",
38
- "provenance": true
39
- },
40
- "sideEffects": false,
41
- "devDependencies": {
42
- "@types/luxon": "^3.4.2",
43
- "esbuild": "^0.24.0",
44
- "luxon": "^3.5.0",
45
- "tsc-alias": "^1.8.10",
46
- "typescript": "^5.7.2",
47
- "vue": "^3.5.13"
48
- },
49
- "peerDependencies": {
50
- "luxon": "^3.5.0",
51
- "vue": "^3.5.12"
52
- },
53
- "scripts": {
54
- "build": "pnpm esbuild && pnpm gentypes",
55
- "dev": "pnpm esbuild --watch",
56
- "esbuild": "esbuild src/index.ts --bundle --minify --sourcemap --target=esnext --external:luxon --external:vue --platform=browser --format=esm --outfile=dist/http-client.js",
57
- "gentypes": "tsc --noCheck && tsc-alias"
58
- }
59
- }
58
+ }
@@ -1,31 +0,0 @@
1
- import type { Descriptors } from '../../util';
2
- import type { ARGS, CHILDREN, DESCRIPTORS, DIRTY, NAME, PARENT, PARENT_KEY, PROPERTIES, TRACK, TRIGGER } from './symbols';
3
- export default interface DtoInstance<T> extends Function {
4
- [ARGS]: any[];
5
- [CHILDREN]?: DtoInstance<unknown>[];
6
- [DESCRIPTORS]: Descriptors;
7
- [DIRTY]: boolean;
8
- [NAME]: string;
9
- [PARENT]?: DtoInstance<unknown>;
10
- [PARENT_KEY]?: string;
11
- [PROPERTIES]: string[];
12
- [TRACK]: (instance: DtoInstance<unknown>, key: string) => void;
13
- [TRIGGER]: (instance: DtoInstance<unknown>, key: string | symbol, value: unknown, oldValue?: unknown) => void;
14
- /**
15
- * Clones the DTO starting with the original arguments
16
- * and replaces them with the current values. Unfortunately
17
- * this is the only way at this point. It's a good thing
18
- * we don't need cloning a lot :)
19
- */
20
- clone(): DtoInstance<T>;
21
- /**
22
- * Fills the DTO with the given data.
23
- */
24
- fill(data: Record<string, unknown>): void;
25
- /**
26
- * Gets all getters of the DTO and returns them as
27
- * an object, so {@see JSON.stringify} knows what
28
- * to do with our DTO.
29
- */
30
- toJSON(): Record<string, unknown>;
31
- }
@@ -1,3 +0,0 @@
1
- export type SerializedDateTime = [0xBF2, string];
2
- export type SerializedDto = [0xBF1, string, string, Record<string, unknown>, any[]];
3
- export type Serialized = boolean | number | string | Record<string, unknown> | SerializedDateTime | SerializedDto | Serialized[];
@@ -1,2 +0,0 @@
1
- export type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
2
- export type HttpStatusCode = 100 | 101 | 102 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
@@ -1,2 +0,0 @@
1
- import { DateTime } from 'luxon';
2
- export declare function formatFileDateTime(dateTime?: DateTime): string;
@@ -1,2 +0,0 @@
1
- export * from './datetime';
2
- export * from './reflection';
@@ -1,5 +0,0 @@
1
- export type Constructor<T = {}> = new (...args: any[]) => T;
2
- export type Descriptors = Record<string | symbol, TypedPropertyDescriptor<unknown> | PropertyDescriptor>;
3
- export declare function getPrototypeChain(obj: Function): Descriptors;
4
- export declare function setObjectMethod(obj: Function, key: string, fn: Function): void;
5
- export declare function setObjectValue(obj: object, key: symbol | string, value: unknown): void;