topsyde-utils 2.0.0 → 2.0.1

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 (59) hide show
  1. package/dist/index.d.ts +0 -12
  2. package/dist/index.js +0 -11
  3. package/dist/index.js.map +1 -1
  4. package/dist/utils/index.d.ts +0 -3
  5. package/dist/utils/index.js +0 -3
  6. package/dist/utils/index.js.map +1 -1
  7. package/package.json +12 -45
  8. package/src/__tests__/singleton.test.ts +0 -143
  9. package/src/index.ts +0 -32
  10. package/src/utils/index.ts +0 -3
  11. package/dist/client/api/base.api.d.ts +0 -63
  12. package/dist/client/api/base.api.js +0 -61
  13. package/dist/client/api/base.api.js.map +0 -1
  14. package/dist/client/api/index.d.ts +0 -2
  15. package/dist/client/api/index.js +0 -5
  16. package/dist/client/api/index.js.map +0 -1
  17. package/dist/client/rxjs/index.d.ts +0 -1
  18. package/dist/client/rxjs/index.js +0 -4
  19. package/dist/client/rxjs/index.js.map +0 -1
  20. package/dist/client/rxjs/useRxjs.d.ts +0 -17
  21. package/dist/client/rxjs/useRxjs.js +0 -87
  22. package/dist/client/rxjs/useRxjs.js.map +0 -1
  23. package/dist/client/vite/plugins/index.d.ts +0 -2
  24. package/dist/client/vite/plugins/index.js +0 -5
  25. package/dist/client/vite/plugins/index.js.map +0 -1
  26. package/dist/client/vite/plugins/topsydeUtilsVitePlugin.d.ts +0 -9
  27. package/dist/client/vite/plugins/topsydeUtilsVitePlugin.js +0 -74
  28. package/dist/client/vite/plugins/topsydeUtilsVitePlugin.js.map +0 -1
  29. package/dist/external/index.d.ts +0 -1
  30. package/dist/external/index.js +0 -4
  31. package/dist/external/index.js.map +0 -1
  32. package/dist/external/re-exports.d.ts +0 -16
  33. package/dist/external/re-exports.js +0 -24
  34. package/dist/external/re-exports.js.map +0 -1
  35. package/dist/utils/BaseDto.d.ts +0 -33
  36. package/dist/utils/BaseDto.js +0 -69
  37. package/dist/utils/BaseDto.js.map +0 -1
  38. package/dist/utils/BaseEntity.d.ts +0 -31
  39. package/dist/utils/BaseEntity.js +0 -37
  40. package/dist/utils/BaseEntity.js.map +0 -1
  41. package/dist/utils/dto_validators/IsNumberOrRangeConstraint.d.ts +0 -9
  42. package/dist/utils/dto_validators/IsNumberOrRangeConstraint.js +0 -85
  43. package/dist/utils/dto_validators/IsNumberOrRangeConstraint.js.map +0 -1
  44. package/dist/utils/dto_validators/index.d.ts +0 -1
  45. package/dist/utils/dto_validators/index.js +0 -4
  46. package/dist/utils/dto_validators/index.js.map +0 -1
  47. package/src/__tests__/app.test.ts +0 -206
  48. package/src/client/api/base.api.ts +0 -111
  49. package/src/client/api/index.ts +0 -5
  50. package/src/client/rxjs/index.ts +0 -4
  51. package/src/client/rxjs/useRxjs.ts +0 -113
  52. package/src/client/vite/plugins/index.ts +0 -5
  53. package/src/client/vite/plugins/topsydeUtilsVitePlugin.ts +0 -80
  54. package/src/external/index.ts +0 -4
  55. package/src/external/re-exports.ts +0 -54
  56. package/src/utils/BaseDto.ts +0 -77
  57. package/src/utils/BaseEntity.ts +0 -49
  58. package/src/utils/dto_validators/IsNumberOrRangeConstraint.ts +0 -32
  59. package/src/utils/dto_validators/index.ts +0 -4
package/dist/index.d.ts CHANGED
@@ -6,25 +6,15 @@ export * from "./types";
6
6
  export * from "./websocket.shared.types";
7
7
  export * from "./throwable";
8
8
  export * from "./enums";
9
- export * from "./client/api/base.api";
10
- export * from "./client/rxjs/useRxjs";
11
- export * from "./client/vite/plugins/topsydeUtilsVitePlugin";
12
- export * from "./external/re-exports";
13
9
  export * from "./utils/Rxjs";
14
10
  export * from "./utils/Lib";
15
11
  export * from "./utils/Guards";
16
- export * from "./utils/BaseEntity";
17
12
  export * from "./utils/Console";
18
- export * from "./utils/BaseDto";
19
- export * from "./utils/dto_validators/IsNumberOrRangeConstraint";
20
13
  export { default as Singleton } from "./singleton";
21
14
  export { default as Initializable } from "./initializable";
22
15
  export { default as Throwable } from "./throwable";
23
- export { default as BaseAPI } from "./client/api/base.api";
24
- export { default as TopsydeUtilsVitePlugin } from "./client/vite/plugins/topsydeUtilsVitePlugin";
25
16
  export { default as Lib } from "./utils/Lib";
26
17
  export { default as Guards } from "./utils/Guards";
27
- export { default as BaseEntity } from "./utils/BaseEntity";
28
18
  export { default as Console } from "./utils/Console";
29
19
  export { ERROR_CODE, HTTP_ERROR_CODE, WS_ERROR_CODE } from "./errors";
30
20
  export { InitializableOptions, InitializableEvent } from "./initializable";
@@ -32,6 +22,4 @@ export { DEFAULT_FALSE_RESPONSE, LOG_COLORS, LOG_ICONS } from "./consts";
32
22
  export { ClassConstructor, NonNullableType, ObjectKeys, KVObj, I_ApplicationResponse } from "./types";
33
23
  export { WebsocketEntityId, WebsocketEntityName, WebsocketEntityData, WebsocketMessage, WebsocketStructuredMessage } from "./websocket.shared.types";
34
24
  export { E_IS, E_ENVIRONMENTS } from "./enums";
35
- export { RxjsDataType, NamespaceActions, MultiNamespaceActions } from "./client/rxjs/useRxjs";
36
- export { Expose, ValidationError, IsArray, IsBoolean, IsDate, IsEnum, IsNumber, IsObject, IsOptional, IsString, Validate, IsAlphanumeric, IsBooleanString, IsDateString, IsDecimal, IsDefined, IsNumberString, IsNotEmpty, IsNotEmptyObject, } from "./external/re-exports";
37
25
  export { E_SUBJET_TYPE, I_RxjsPayload, RxjsNamespaces, AsyncSubject, BehaviorSubject, ReplaySubject, Subject, Subscription } from "./utils/Rxjs";
package/dist/index.js CHANGED
@@ -9,31 +9,20 @@ export * from "./types.js";
9
9
  export * from "./websocket.shared.types.js";
10
10
  export * from "./throwable.js";
11
11
  export * from "./enums.js";
12
- export * from "./client/api/base.api.js";
13
- export * from "./client/rxjs/useRxjs.js";
14
- export * from "./client/vite/plugins/topsydeUtilsVitePlugin.js";
15
- export * from "./external/re-exports.js";
16
12
  export * from "./utils/Rxjs.js";
17
13
  export * from "./utils/Lib.js";
18
14
  export * from "./utils/Guards.js";
19
- export * from "./utils/BaseEntity.js";
20
15
  export * from "./utils/Console.js";
21
- export * from "./utils/BaseDto.js";
22
- export * from "./utils/dto_validators/IsNumberOrRangeConstraint.js";
23
16
  // Export default classes
24
17
  export { default as Singleton } from "./singleton.js";
25
18
  export { default as Initializable } from "./initializable.js";
26
19
  export { default as Throwable } from "./throwable.js";
27
- export { default as BaseAPI } from "./client/api/base.api.js";
28
- export { default as TopsydeUtilsVitePlugin } from "./client/vite/plugins/topsydeUtilsVitePlugin.js";
29
20
  export { default as Lib } from "./utils/Lib.js";
30
21
  export { default as Guards } from "./utils/Guards.js";
31
- export { default as BaseEntity } from "./utils/BaseEntity.js";
32
22
  export { default as Console } from "./utils/Console.js";
33
23
  // Re-export specific items for backward compatibility
34
24
  export { ERROR_CODE, HTTP_ERROR_CODE, WS_ERROR_CODE } from "./errors.js";
35
25
  export { DEFAULT_FALSE_RESPONSE, LOG_COLORS, LOG_ICONS } from "./consts.js";
36
26
  export { E_IS, E_ENVIRONMENTS } from "./enums.js";
37
- export { Expose, ValidationError, IsArray, IsBoolean, IsDate, IsEnum, IsNumber, IsObject, IsOptional, IsString, Validate, IsAlphanumeric, IsBooleanString, IsDateString, IsDecimal, IsDefined, IsNumberString, IsNotEmpty, IsNotEmptyObject, } from "./external/re-exports.js";
38
27
  export { E_SUBJET_TYPE, AsyncSubject, BehaviorSubject, ReplaySubject, Subject, Subscription } from "./utils/Rxjs.js";
39
28
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,iCAAiC;AAEjC,qBAAqB;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kDAAkD,CAAC;AAEjE,yBAAyB;AACzB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAErD,sDAAsD;AACtD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGzE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EACN,MAAM,EACN,eAAe,EACf,OAAO,EACP,SAAS,EACT,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,eAAe,EACf,YAAY,EACZ,SAAS,EACT,SAAS,EACT,cAAc,EACd,UAAU,EACV,gBAAgB,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAiC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-indexes.ts\n// Do not edit this file directly\n\n// Export all modules\nexport * from \"./errors\";\nexport * from \"./singleton\";\nexport * from \"./initializable\";\nexport * from \"./consts\";\nexport * from \"./types\";\nexport * from \"./websocket.shared.types\";\nexport * from \"./throwable\";\nexport * from \"./enums\";\nexport * from \"./client/api/base.api\";\nexport * from \"./client/rxjs/useRxjs\";\nexport * from \"./client/vite/plugins/topsydeUtilsVitePlugin\";\nexport * from \"./external/re-exports\";\nexport * from \"./utils/Rxjs\";\nexport * from \"./utils/Lib\";\nexport * from \"./utils/Guards\";\nexport * from \"./utils/BaseEntity\";\nexport * from \"./utils/Console\";\nexport * from \"./utils/BaseDto\";\nexport * from \"./utils/dto_validators/IsNumberOrRangeConstraint\";\n\n// Export default classes\nexport { default as Singleton } from \"./singleton\";\nexport { default as Initializable } from \"./initializable\";\nexport { default as Throwable } from \"./throwable\";\nexport { default as BaseAPI } from \"./client/api/base.api\";\nexport { default as TopsydeUtilsVitePlugin } from \"./client/vite/plugins/topsydeUtilsVitePlugin\";\nexport { default as Lib } from \"./utils/Lib\";\nexport { default as Guards } from \"./utils/Guards\";\nexport { default as BaseEntity } from \"./utils/BaseEntity\";\nexport { default as Console } from \"./utils/Console\";\n\n// Re-export specific items for backward compatibility\nexport { ERROR_CODE, HTTP_ERROR_CODE, WS_ERROR_CODE } from \"./errors\";\nexport { InitializableOptions, InitializableEvent } from \"./initializable\";\nexport { DEFAULT_FALSE_RESPONSE, LOG_COLORS, LOG_ICONS } from \"./consts\";\nexport { ClassConstructor, NonNullableType, ObjectKeys, KVObj, I_ApplicationResponse } from \"./types\";\nexport { WebsocketEntityId, WebsocketEntityName, WebsocketEntityData, WebsocketMessage, WebsocketStructuredMessage } from \"./websocket.shared.types\";\nexport { E_IS, E_ENVIRONMENTS } from \"./enums\";\nexport { RxjsDataType, NamespaceActions, MultiNamespaceActions } from \"./client/rxjs/useRxjs\";\nexport {\n\tExpose,\n\tValidationError,\n\tIsArray,\n\tIsBoolean,\n\tIsDate,\n\tIsEnum,\n\tIsNumber,\n\tIsObject,\n\tIsOptional,\n\tIsString,\n\tValidate,\n\tIsAlphanumeric,\n\tIsBooleanString,\n\tIsDateString,\n\tIsDecimal,\n\tIsDefined,\n\tIsNumberString,\n\tIsNotEmpty,\n\tIsNotEmptyObject,\n} from \"./external/re-exports\";\nexport { E_SUBJET_TYPE, I_RxjsPayload, RxjsNamespaces, AsyncSubject, BehaviorSubject, ReplaySubject, Subject, Subscription } from \"./utils/Rxjs\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,iCAAiC;AAEjC,qBAAqB;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAEhC,yBAAyB;AACzB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAErD,sDAAsD;AACtD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGzE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAiC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-indexes.ts\n// Do not edit this file directly\n\n// Export all modules\nexport * from \"./errors\";\nexport * from \"./singleton\";\nexport * from \"./initializable\";\nexport * from \"./consts\";\nexport * from \"./types\";\nexport * from \"./websocket.shared.types\";\nexport * from \"./throwable\";\nexport * from \"./enums\";\nexport * from \"./utils/Rxjs\";\nexport * from \"./utils/Lib\";\nexport * from \"./utils/Guards\";\nexport * from \"./utils/Console\";\n\n// Export default classes\nexport { default as Singleton } from \"./singleton\";\nexport { default as Initializable } from \"./initializable\";\nexport { default as Throwable } from \"./throwable\";\nexport { default as Lib } from \"./utils/Lib\";\nexport { default as Guards } from \"./utils/Guards\";\nexport { default as Console } from \"./utils/Console\";\n\n// Re-export specific items for backward compatibility\nexport { ERROR_CODE, HTTP_ERROR_CODE, WS_ERROR_CODE } from \"./errors\";\nexport { InitializableOptions, InitializableEvent } from \"./initializable\";\nexport { DEFAULT_FALSE_RESPONSE, LOG_COLORS, LOG_ICONS } from \"./consts\";\nexport { ClassConstructor, NonNullableType, ObjectKeys, KVObj, I_ApplicationResponse } from \"./types\";\nexport { WebsocketEntityId, WebsocketEntityName, WebsocketEntityData, WebsocketMessage, WebsocketStructuredMessage } from \"./websocket.shared.types\";\nexport { E_IS, E_ENVIRONMENTS } from \"./enums\";\nexport { E_SUBJET_TYPE, I_RxjsPayload, RxjsNamespaces, AsyncSubject, BehaviorSubject, ReplaySubject, Subject, Subscription } from \"./utils/Rxjs\";\n"]}
@@ -1,10 +1,7 @@
1
1
  export * from './Rxjs';
2
2
  export * from './Lib';
3
3
  export * from './Guards';
4
- export * from './BaseEntity';
5
4
  export * from './Console';
6
- export * from './BaseDto';
7
5
  export { default as Lib } from './Lib';
8
6
  export { default as Guards } from './Guards';
9
- export { default as BaseEntity } from './BaseEntity';
10
7
  export { default as Console } from './Console';
@@ -3,11 +3,8 @@
3
3
  export * from './Rxjs.js';
4
4
  export * from './Lib.js';
5
5
  export * from './Guards.js';
6
- export * from './BaseEntity.js';
7
6
  export * from './Console.js';
8
- export * from './BaseDto.js';
9
7
  export { default as Lib } from './Lib.js';
10
8
  export { default as Guards } from './Guards.js';
11
- export { default as BaseEntity } from './BaseEntity.js';
12
9
  export { default as Console } from './Console.js';
13
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,iCAAiC;AAEjC,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-indexes.ts\n// Do not edit this file directly\n\nexport * from './Rxjs';\nexport * from './Lib';\nexport * from './Guards';\nexport * from './BaseEntity';\nexport * from './Console';\nexport * from './BaseDto';\nexport { default as Lib } from './Lib';\nexport { default as Guards } from './Guards';\nexport { default as BaseEntity } from './BaseEntity';\nexport { default as Console } from './Console';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,iCAAiC;AAEjC,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-indexes.ts\n// Do not edit this file directly\n\nexport * from './Rxjs';\nexport * from './Lib';\nexport * from './Guards';\nexport * from './Console';\nexport { default as Lib } from './Lib';\nexport { default as Guards } from './Guards';\nexport { default as Console } from './Console';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "topsyde-utils",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "A bundle of TypeScript utility classes and functions",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,44 +32,9 @@
32
32
  "types": "./dist/index.d.ts",
33
33
  "default": "./dist/index.js"
34
34
  },
35
- "./client/api": {
36
- "types": "./dist/client/api/index.d.ts",
37
- "default": "./dist/client/api/index.js"
38
- },
39
- "./client/rxjs": {
40
- "types": "./dist/client/rxjs/index.d.ts",
41
- "default": "./dist/client/rxjs/index.js"
42
- },
43
- "./client/vite/plugins": {
44
- "types": "./dist/client/vite/plugins/index.d.ts",
45
- "default": "./dist/client/vite/plugins/index.js"
46
- },
47
- "./external": {
48
- "types": "./dist/external/index.d.ts",
49
- "default": "./dist/external/index.js"
50
- },
51
- "./utils/dto_validators": {
52
- "types": "./dist/utils/dto_validators/index.d.ts",
53
- "default": "./dist/utils/dto_validators/index.js"
54
- }
55
- },
56
- "typesVersions": {
57
- "*": {
58
- "client/api": [
59
- "./dist/client/api/index.d.ts"
60
- ],
61
- "client/rxjs": [
62
- "./dist/client/rxjs/index.d.ts"
63
- ],
64
- "client/vite/plugins": [
65
- "./dist/client/vite/plugins/index.d.ts"
66
- ],
67
- "external": [
68
- "./dist/external/index.d.ts"
69
- ],
70
- "utils/dto_validators": [
71
- "./dist/utils/dto_validators/index.d.ts"
72
- ]
35
+ "./utils": {
36
+ "types": "./dist/utils/index.d.ts",
37
+ "default": "./dist/utils/index.js"
73
38
  }
74
39
  },
75
40
  "keywords": [
@@ -103,11 +68,13 @@
103
68
  "node": ">=14.0.0"
104
69
  },
105
70
  "dependencies": {
106
- "axios": "^1.12.2",
107
- "class-transformer": "^0.5.1",
108
- "class-validator": "^0.14.2",
109
- "rxjs": "^7.8.2",
110
- "vite": "^6.2.0",
111
- "vue": "^3.5.13"
71
+ "rxjs": "^7.8.2"
72
+ },
73
+ "typesVersions": {
74
+ "*": {
75
+ "utils": [
76
+ "./dist/utils/index.d.ts"
77
+ ]
78
+ }
112
79
  }
113
80
  }
@@ -1,9 +1,4 @@
1
1
  import Singleton from "../singleton";
2
- import Channel from "../server/bun/websocket/Channel";
3
- import { BroadcastOptions, WebsocketStructuredMessage } from "../server/bun/websocket/websocket.types";
4
- import * as app from "../server/bun/websocket";
5
- import { Client } from "../server/bun/websocket";
6
- import { Server } from "bun";
7
2
 
8
3
  // Base class that extends Singleton
9
4
  class BaseClass extends Singleton {
@@ -263,142 +258,4 @@ describe("Singleton", () => {
263
258
  expect(instance).toBeDefined();
264
259
  });
265
260
 
266
- it("should allow custom channel map implementation", () => {
267
- class CustomChannel extends Channel {
268
- public broadcast(message: WebsocketStructuredMessage) {
269
- console.log("CONSOLE LOG");
270
- }
271
- }
272
-
273
- // Create a map with our custom channel
274
- // Create a new Websocket instance with our custom channels
275
- const ws = app.Websocket.GetInstance<app.Websocket>({
276
- channelClass: CustomChannel, // Explicitly set the channel class
277
- });
278
-
279
- // Create a new channel - it should be a CustomChannel instance
280
- const newChannel = ws.createChannel("test", "Test Channel", 5);
281
- expect(newChannel).toBeInstanceOf(CustomChannel);
282
-
283
- // Verify that broadcast uses our custom implementation
284
- const spy = jest.spyOn(console, "log");
285
- newChannel.broadcast({ type: "test", content: { message: "test message" } });
286
- expect(spy).toHaveBeenCalledWith("CONSOLE LOG");
287
- spy.mockRestore();
288
-
289
- // Verify that the global channel is also a CustomChannel
290
- const globalChannel = app.Websocket.GetChannel("global");
291
- expect(globalChannel).toBeInstanceOf(CustomChannel);
292
- });
293
- it("should allow custom client implementation", () => {
294
- class CustomClient extends Client {
295
- public send(message: string, options?: app.WebsocketMessageOptions): void;
296
- public send(message: WebsocketStructuredMessage): void;
297
- public send(message: WebsocketStructuredMessage | string, options?: app.WebsocketMessageOptions): void {
298
- console.log("CUSTOM SEND");
299
- }
300
- }
301
- const ws = app.Websocket.GetInstance<app.Websocket>({ clientClass: CustomClient });
302
- const client = app.Websocket.CreateClient({ id: "test", name: "Test Client", ws: {} as any });
303
- expect(client).toBeInstanceOf(CustomClient);
304
- });
305
- it("should allow custom channel implementation", () => {
306
- class CustomChannel extends Channel {
307
- public broadcast(message: WebsocketStructuredMessage) {
308
- console.log("CONSOLE LOG");
309
- }
310
- }
311
-
312
- // Create a map with our custom channel
313
- const ws = app.Websocket.GetInstance<app.Websocket>({ channelClass: CustomChannel });
314
-
315
- // Create a new channel - it should be a CustomChannel instance
316
- const newChannel = ws.createChannel("test", "Test Channel", 5);
317
- expect(newChannel).toBeInstanceOf(CustomChannel);
318
-
319
- // Verify that broadcast uses our custom implementation
320
- const spy = jest.spyOn(console, "log");
321
- newChannel.broadcast({ type: "test", content: { message: "test message" } });
322
- expect(spy).toHaveBeenCalledWith("CONSOLE LOG");
323
- spy.mockRestore();
324
-
325
- // Verify that the global channel is also a CustomChannel
326
- const globalChannel = app.Websocket.GetChannel("global");
327
- expect(globalChannel).toBeInstanceOf(CustomChannel);
328
- });
329
-
330
- it("should handle derived channel broadcast with server correctly", () => {
331
- // Mock server setup
332
- const mockPublish = jest.fn();
333
- const server = {
334
- publish: mockPublish,
335
- } as unknown as Server;
336
-
337
- // Create derived channel class
338
- class GameChannel<T extends app.Websocket = GameWebsocket> extends Channel<T> {
339
- public override broadcast(message: WebsocketStructuredMessage, options?: BroadcastOptions): void {
340
- // Log the message and options for testing
341
- console.log("GameChannel");
342
- // Call the parent implementation
343
- super.broadcast(message, options);
344
- }
345
- }
346
-
347
- class GameWebsocket extends app.Websocket {
348
- constructor() {
349
- super({
350
- channelClass: GameChannel,
351
- });
352
- }
353
- }
354
-
355
- // Create and configure the Websocket instance
356
- const ws = GameWebsocket.GetInstance<GameWebsocket>({
357
- channelClass: GameChannel,
358
- });
359
-
360
- ws.set(server);
361
-
362
- // Create and test channel
363
- const channel = ws.createChannel("game", "Game Channel");
364
- expect(channel).toBeInstanceOf(GameChannel);
365
-
366
- // Test broadcast
367
- const spy = jest.spyOn(console, "log");
368
- const message = { type: "test", content: { message: "test message" } };
369
- const extraData = { param1: "param1", extra: { data: "data" } };
370
-
371
- // Call broadcast with the new options-based API
372
- channel.broadcast(message, { data: extraData, client: { id: "test", name: "Test Client" } });
373
-
374
- // Verify console.log was called
375
- expect(spy).toHaveBeenCalled();
376
-
377
- // Verify server publish was called correctly
378
- expect(mockPublish).toHaveBeenCalledWith(channel.id, expect.any(String));
379
-
380
- // Verify the JSON structure
381
- const lastCall = mockPublish.mock.calls[0];
382
- const parsedJson = JSON.parse(lastCall[1]);
383
-
384
- // Update expectations to match actual structure - we don't care about exact format
385
- // as long as it contains the message
386
- expect(parsedJson).toHaveProperty("type", message.type);
387
- expect(parsedJson).toHaveProperty("channel", channel.id);
388
-
389
- spy.mockRestore();
390
- });
391
- it("should make sure broadcast structured message is correct", () => {
392
- const mockPublish = jest.fn();
393
- const server = {
394
- publish: mockPublish,
395
- } as unknown as Server;
396
- const ws = app.Websocket.GetInstance<app.Websocket>();
397
- ws.set(server);
398
-
399
- const channel = ws.createChannel("test", "Test Channel");
400
- const message = { type: "test", content: { message: "test message" } };
401
- channel.broadcast(message, { debug: true, client: { id: "test", name: "Test Client" } });
402
- expect(mockPublish).toHaveBeenCalledWith(channel.id, expect.any(String));
403
- });
404
261
  });
package/src/index.ts CHANGED
@@ -10,27 +10,17 @@ export * from "./types";
10
10
  export * from "./websocket.shared.types";
11
11
  export * from "./throwable";
12
12
  export * from "./enums";
13
- export * from "./client/api/base.api";
14
- export * from "./client/rxjs/useRxjs";
15
- export * from "./client/vite/plugins/topsydeUtilsVitePlugin";
16
- export * from "./external/re-exports";
17
13
  export * from "./utils/Rxjs";
18
14
  export * from "./utils/Lib";
19
15
  export * from "./utils/Guards";
20
- export * from "./utils/BaseEntity";
21
16
  export * from "./utils/Console";
22
- export * from "./utils/BaseDto";
23
- export * from "./utils/dto_validators/IsNumberOrRangeConstraint";
24
17
 
25
18
  // Export default classes
26
19
  export { default as Singleton } from "./singleton";
27
20
  export { default as Initializable } from "./initializable";
28
21
  export { default as Throwable } from "./throwable";
29
- export { default as BaseAPI } from "./client/api/base.api";
30
- export { default as TopsydeUtilsVitePlugin } from "./client/vite/plugins/topsydeUtilsVitePlugin";
31
22
  export { default as Lib } from "./utils/Lib";
32
23
  export { default as Guards } from "./utils/Guards";
33
- export { default as BaseEntity } from "./utils/BaseEntity";
34
24
  export { default as Console } from "./utils/Console";
35
25
 
36
26
  // Re-export specific items for backward compatibility
@@ -40,26 +30,4 @@ export { DEFAULT_FALSE_RESPONSE, LOG_COLORS, LOG_ICONS } from "./consts";
40
30
  export { ClassConstructor, NonNullableType, ObjectKeys, KVObj, I_ApplicationResponse } from "./types";
41
31
  export { WebsocketEntityId, WebsocketEntityName, WebsocketEntityData, WebsocketMessage, WebsocketStructuredMessage } from "./websocket.shared.types";
42
32
  export { E_IS, E_ENVIRONMENTS } from "./enums";
43
- export { RxjsDataType, NamespaceActions, MultiNamespaceActions } from "./client/rxjs/useRxjs";
44
- export {
45
- Expose,
46
- ValidationError,
47
- IsArray,
48
- IsBoolean,
49
- IsDate,
50
- IsEnum,
51
- IsNumber,
52
- IsObject,
53
- IsOptional,
54
- IsString,
55
- Validate,
56
- IsAlphanumeric,
57
- IsBooleanString,
58
- IsDateString,
59
- IsDecimal,
60
- IsDefined,
61
- IsNumberString,
62
- IsNotEmpty,
63
- IsNotEmptyObject,
64
- } from "./external/re-exports";
65
33
  export { E_SUBJET_TYPE, I_RxjsPayload, RxjsNamespaces, AsyncSubject, BehaviorSubject, ReplaySubject, Subject, Subscription } from "./utils/Rxjs";
@@ -4,10 +4,7 @@
4
4
  export * from './Rxjs';
5
5
  export * from './Lib';
6
6
  export * from './Guards';
7
- export * from './BaseEntity';
8
7
  export * from './Console';
9
- export * from './BaseDto';
10
8
  export { default as Lib } from './Lib';
11
9
  export { default as Guards } from './Guards';
12
- export { default as BaseEntity } from './BaseEntity';
13
10
  export { default as Console } from './Console';
@@ -1,63 +0,0 @@
1
- import { AxiosResponse } from "axios";
2
- declare class BaseAPI {
3
- private api;
4
- protected controller: string;
5
- protected base_url: string;
6
- constructor(controller: string, base_url?: string);
7
- private initAxios;
8
- static Status(response: AxiosResponse<{
9
- status: boolean;
10
- }>): void;
11
- /**
12
- * @description Axios GET request wrapper
13
- * @param endpoint string
14
- * @generic T
15
- * @returns Promise<AxiosResponse<T>>
16
- */
17
- get<T extends {
18
- status: boolean;
19
- }>(endpoint: string): Promise<AxiosResponse<T>>;
20
- /**
21
- * @description Axios GET request wrapper
22
- * @param controller string - which controller to use
23
- * @param endpoint string - controller action to call
24
- * @generic T
25
- * @returns Promise<AxiosResponse<T>>
26
- */
27
- get<T extends {
28
- status: boolean;
29
- }>(controller: string, endpoint: string): Promise<AxiosResponse<T>>;
30
- /**
31
- * @description Axios GET request wrapper
32
- * @param controller string - which controller to use
33
- * @param endpoint string - controller action to call
34
- * @param debounceDelay number - debounce delay
35
- * @generic T
36
- * @returns Promise<AxiosResponse<T>>
37
- */
38
- get<T extends {
39
- status: boolean;
40
- }>(controller: string, endpoint: string, debounceDelay?: number): Promise<AxiosResponse<T>>;
41
- /**
42
- * @description Axios POST request wrapper
43
- * @param endpoint string - controller action to call
44
- * @param payload any
45
- * @generic T
46
- * @returns Promise<AxiosResponse<T>>
47
- */
48
- post<T extends {
49
- status: boolean;
50
- }>(endpoint: string, payload: any): Promise<AxiosResponse<T>>;
51
- /**
52
- * @description Axios POST request wrapper
53
- * @param controller string - which controller to use
54
- * @param endpoint string - controller action to call
55
- * @param payload any
56
- * @generic T
57
- * @returns Promise<AxiosResponse<T>>
58
- */
59
- post<T extends {
60
- status: boolean;
61
- }>(controller: string, endpoint: string, payload: any): Promise<AxiosResponse<T>>;
62
- }
63
- export default BaseAPI;
@@ -1,61 +0,0 @@
1
- import Axios, { isAxiosError } from "axios";
2
- class BaseAPI {
3
- constructor(controller, base_url) {
4
- this.controller = controller;
5
- this.base_url = base_url || import.meta.env.VITE_HOST || "";
6
- this.api = this.initAxios();
7
- }
8
- initAxios() {
9
- const config = {
10
- headers: {
11
- "Content-Type": "application/json",
12
- },
13
- };
14
- const instance = Axios.create(config);
15
- // Add interceptor to modify request config
16
- instance.interceptors.request.use((config) => {
17
- // Ensure the correct content type
18
- config.headers["Content-Type"] = "application/json";
19
- return config;
20
- });
21
- return instance;
22
- }
23
- static Status(response) {
24
- if (!response.data.status)
25
- throw new Error("Something went wrong");
26
- }
27
- async get(controllerOrEndpoint, endpoint, _debounceDelay) {
28
- let controller = endpoint ? controllerOrEndpoint : this.controller;
29
- let action = endpoint ? endpoint : controllerOrEndpoint;
30
- return this.api.get(`${this.base_url}/${controller}/${action}`).catch((err) => {
31
- if (isAxiosError(err))
32
- throw err.response;
33
- throw err;
34
- });
35
- }
36
- async post(controllerOrEndpoint, endpointOrPayload, payload) {
37
- let controller;
38
- let action;
39
- let data;
40
- if (payload !== null && payload !== undefined) {
41
- controller = controllerOrEndpoint;
42
- action = endpointOrPayload;
43
- data = payload;
44
- }
45
- else {
46
- controller = this.controller;
47
- action = controllerOrEndpoint;
48
- data = endpointOrPayload;
49
- }
50
- const response = await this.api.post(`${this.base_url}/${controller}/${action}`, data).catch((err) => {
51
- if (isAxiosError(err))
52
- throw err.response;
53
- throw err;
54
- });
55
- if (!response.data.status)
56
- throw new Error("Something went wrong");
57
- return response;
58
- }
59
- }
60
- export default BaseAPI;
61
- //# sourceMappingURL=base.api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.api.js","sourceRoot":"","sources":["../../../src/client/api/base.api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoD,YAAY,EAAE,MAAM,OAAO,CAAC;AAC9F,MAAM,OAAO;IAKZ,YAAY,UAAkB,EAAE,QAAiB;QAChD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;QAC5D,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;IAC7B,CAAC;IAEO,SAAS;QAChB,MAAM,MAAM,GAAuB;YAClC,OAAO,EAAE;gBACR,cAAc,EAAE,kBAAkB;aAClC;SACD,CAAC;QAEF,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEtC,2CAA2C;QAC3C,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC5C,kCAAkC;YAClC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;YAEpD,OAAO,MAAM,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,QAA4C;QAChE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACpE,CAAC;IA0BD,KAAK,CAAC,GAAG,CAAgC,oBAA4B,EAAE,QAA6B,EAAE,cAAuB;QAC5H,IAAI,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;QACnE,IAAI,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC;QAExD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,IAAI,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YAChF,IAAI,YAAY,CAAC,GAAG,CAAC;gBAAE,MAAM,GAAG,CAAC,QAAQ,CAAC;YAC1C,MAAM,GAAG,CAAC;QACX,CAAC,CAAC,CAAC;IACJ,CAAC;IAmBD,KAAK,CAAC,IAAI,CAAgC,oBAA4B,EAAE,iBAA+B,EAAE,OAAa;QACrH,IAAI,UAAkB,CAAC;QACvB,IAAI,MAAc,CAAC;QACnB,IAAI,IAAS,CAAC;QAEd,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC/C,UAAU,GAAG,oBAAoB,CAAC;YAClC,MAAM,GAAG,iBAAiB,CAAC;YAC3B,IAAI,GAAG,OAAO,CAAC;QAChB,CAAC;aAAM,CAAC;YACP,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YAC7B,MAAM,GAAG,oBAAoB,CAAC;YAC9B,IAAI,GAAG,iBAAiB,CAAC;QAC1B,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,IAAI,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACvG,IAAI,YAAY,CAAC,GAAG,CAAC;gBAAE,MAAM,GAAG,CAAC,QAAQ,CAAC;YAC1C,MAAM,GAAG,CAAC;QACX,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACnE,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD;AAED,eAAe,OAAO,CAAC","sourcesContent":["import Axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, isAxiosError } from \"axios\";\nclass BaseAPI {\n\tprivate api: AxiosInstance;\n\tprotected controller: string;\n\tprotected base_url: string;\n\n\tconstructor(controller: string, base_url?: string) {\n\t\tthis.controller = controller;\n\t\tthis.base_url = base_url || import.meta.env.VITE_HOST || \"\";\n\t\tthis.api = this.initAxios();\n\t}\n\n\tprivate initAxios(): AxiosInstance {\n\t\tconst config: AxiosRequestConfig = {\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t};\n\n\t\tconst instance = Axios.create(config);\n\n\t\t// Add interceptor to modify request config\n\t\tinstance.interceptors.request.use((config) => {\n\t\t\t// Ensure the correct content type\n\t\t\tconfig.headers[\"Content-Type\"] = \"application/json\";\n\n\t\t\treturn config;\n\t\t});\n\n\t\treturn instance;\n\t}\n\n\tpublic static Status(response: AxiosResponse<{ status: boolean }>) {\n\t\tif (!response.data.status) throw new Error(\"Something went wrong\");\n\t}\n\n\t/**\n\t * @description Axios GET request wrapper\n\t * @param endpoint string\n\t * @generic T\n\t * @returns Promise<AxiosResponse<T>>\n\t */\n\tasync get<T extends { status: boolean }>(endpoint: string): Promise<AxiosResponse<T>>;\n\t/**\n\t * @description Axios GET request wrapper\n\t * @param controller string - which controller to use\n\t * @param endpoint string - controller action to call\n\t * @generic T\n\t * @returns Promise<AxiosResponse<T>>\n\t */\n\tasync get<T extends { status: boolean }>(controller: string, endpoint: string): Promise<AxiosResponse<T>>;\n\t/**\n\t * @description Axios GET request wrapper\n\t * @param controller string - which controller to use\n\t * @param endpoint string - controller action to call\n\t * @param debounceDelay number - debounce delay\n\t * @generic T\n\t * @returns Promise<AxiosResponse<T>>\n\t */\n\tasync get<T extends { status: boolean }>(controller: string, endpoint: string, debounceDelay?: number): Promise<AxiosResponse<T>>;\n\tasync get<T extends { status: boolean }>(controllerOrEndpoint: string, endpoint?: string | undefined, _debounceDelay?: number): Promise<AxiosResponse<T>> {\n\t\tlet controller = endpoint ? controllerOrEndpoint : this.controller;\n\t\tlet action = endpoint ? endpoint : controllerOrEndpoint;\n\n\t\treturn this.api.get<T>(`${this.base_url}/${controller}/${action}`).catch((err) => {\n\t\t\tif (isAxiosError(err)) throw err.response;\n\t\t\tthrow err;\n\t\t});\n\t}\n\n\t/**\n\t * @description Axios POST request wrapper\n\t * @param endpoint string - controller action to call\n\t * @param payload any\n\t * @generic T\n\t * @returns Promise<AxiosResponse<T>>\n\t */\n\tasync post<T extends { status: boolean }>(endpoint: string, payload: any): Promise<AxiosResponse<T>>;\n\t/**\n\t * @description Axios POST request wrapper\n\t * @param controller string - which controller to use\n\t * @param endpoint string - controller action to call\n\t * @param payload any\n\t * @generic T\n\t * @returns Promise<AxiosResponse<T>>\n\t */\n\tasync post<T extends { status: boolean }>(controller: string, endpoint: string, payload: any): Promise<AxiosResponse<T>>;\n\tasync post<T extends { status: boolean }>(controllerOrEndpoint: string, endpointOrPayload: string | any, payload?: any): Promise<AxiosResponse<T>> {\n\t\tlet controller: string;\n\t\tlet action: string;\n\t\tlet data: any;\n\n\t\tif (payload !== null && payload !== undefined) {\n\t\t\tcontroller = controllerOrEndpoint;\n\t\t\taction = endpointOrPayload;\n\t\t\tdata = payload;\n\t\t} else {\n\t\t\tcontroller = this.controller;\n\t\t\taction = controllerOrEndpoint;\n\t\t\tdata = endpointOrPayload;\n\t\t}\n\t\tconst response = await this.api.post<T>(`${this.base_url}/${controller}/${action}`, data).catch((err) => {\n\t\t\tif (isAxiosError(err)) throw err.response;\n\t\t\tthrow err;\n\t\t});\n\t\tif (!response.data.status) throw new Error(\"Something went wrong\");\n\t\treturn response;\n\t}\n}\n\nexport default BaseAPI;\n"]}
@@ -1,2 +0,0 @@
1
- export * from './base.api';
2
- export { default as BaseAPI } from './base.api';
@@ -1,5 +0,0 @@
1
- // This file is auto-generated by scripts/generate-indexes.ts
2
- // Do not edit this file directly
3
- export * from './base.api.js';
4
- export { default as BaseAPI } from './base.api.js';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/api/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,iCAAiC;AAEjC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,YAAY,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-indexes.ts\n// Do not edit this file directly\n\nexport * from './base.api';\nexport { default as BaseAPI } from './base.api';\n"]}
@@ -1 +0,0 @@
1
- export * from './useRxjs';
@@ -1,4 +0,0 @@
1
- // This file is auto-generated by scripts/generate-indexes.ts
2
- // Do not edit this file directly
3
- export * from './useRxjs.js';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/rxjs/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,iCAAiC;AAEjC,cAAc,WAAW,CAAC","sourcesContent":["// This file is auto-generated by scripts/generate-indexes.ts\n// Do not edit this file directly\n\nexport * from './useRxjs';\n"]}
@@ -1,17 +0,0 @@
1
- import { I_RxjsPayload, RxjsNamespaces } from "../../utils/Rxjs";
2
- export type RxjsDataType = string | Record<string, any>;
3
- export type NamespaceActions = Record<string, (data: any) => void>;
4
- export type MultiNamespaceActions<T extends string> = Partial<Record<RxjsNamespaces<T>, NamespaceActions>>;
5
- export declare const useRxjs: <T extends string>(_namespace: RxjsNamespaces<T> | RxjsNamespaces<T>[], actions?: NamespaceActions | MultiNamespaceActions<T>, options?: {
6
- static_instance: boolean;
7
- }) => {
8
- $next: {
9
- (namespace: RxjsNamespaces<T>, payload: I_RxjsPayload<any>): void;
10
- (cta: string, data: RxjsDataType): void;
11
- };
12
- $clear: (namespace: RxjsNamespaces<T>) => void;
13
- $subscribe: (actions: NamespaceActions | MultiNamespaceActions<T>) => void;
14
- $unsubscribe: () => void;
15
- $mount: () => void;
16
- $unmount: () => void;
17
- };