@daiso-tech/core 0.32.0 → 0.32.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 (79) hide show
  1. package/dist/async/async.errors.d.ts +14 -0
  2. package/dist/async/async.errors.js +14 -0
  3. package/dist/async/async.errors.js.map +1 -1
  4. package/dist/async/async.events.d.ts +23 -0
  5. package/dist/async/async.events.js +23 -0
  6. package/dist/async/async.events.js.map +1 -1
  7. package/dist/async/backof-policies/_shared.d.ts +1 -1
  8. package/dist/async/backof-policies/constant-backoff-policy/constant-backoff-policy.d.ts +2 -2
  9. package/dist/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js +1 -1
  10. package/dist/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.d.ts +2 -2
  11. package/dist/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js +1 -1
  12. package/dist/async/backof-policies/linear-backoff-policy/linear-backoff-policy.d.ts +2 -2
  13. package/dist/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js +1 -1
  14. package/dist/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.d.ts +2 -2
  15. package/dist/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js +1 -1
  16. package/dist/async/utilities/lazy-promise/lazy-promise.d.ts +7 -41
  17. package/dist/async/utilities/lazy-promise/lazy-promise.js +7 -8
  18. package/dist/async/utilities/lazy-promise/lazy-promise.js.map +1 -1
  19. package/dist/cache/contracts/cache.errors.d.ts +13 -0
  20. package/dist/cache/contracts/cache.errors.js +13 -0
  21. package/dist/cache/contracts/cache.errors.js.map +1 -1
  22. package/dist/cache/contracts/cache.events.d.ts +26 -2
  23. package/dist/cache/contracts/cache.events.js +26 -2
  24. package/dist/cache/contracts/cache.events.js.map +1 -1
  25. package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.js +3 -3
  26. package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.js.map +1 -1
  27. package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.js +3 -3
  28. package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.js.map +1 -1
  29. package/dist/cache/implementations/derivables/cache/cache.js +10 -10
  30. package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.d.ts +2 -2
  31. package/dist/cache/implementations/test-utilities/cache-adapter.test-suite.js +1 -1
  32. package/dist/cache/implementations/test-utilities/cache.test-suite.d.ts +2 -2
  33. package/dist/cache/implementations/test-utilities/cache.test-suite.js +1 -1
  34. package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.d.ts +2 -2
  35. package/dist/cache/implementations/test-utilities/database-cache-dapter.test-suite.js +1 -1
  36. package/dist/collection/contracts/collection.errors.d.ts +17 -0
  37. package/dist/collection/contracts/collection.errors.js +17 -0
  38. package/dist/collection/contracts/collection.errors.js.map +1 -1
  39. package/dist/event-bus/contracts/event-bus.errors.d.ts +15 -0
  40. package/dist/event-bus/contracts/event-bus.errors.js +15 -0
  41. package/dist/event-bus/contracts/event-bus.errors.js.map +1 -1
  42. package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.d.ts +2 -2
  43. package/dist/event-bus/implementations/test-utilities/event-bus-adapter.test-suite.js +1 -1
  44. package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.d.ts +2 -2
  45. package/dist/event-bus/implementations/test-utilities/event-bus.test-suite.js +1 -1
  46. package/dist/lock/contracts/lock.errors.d.ts +18 -0
  47. package/dist/lock/contracts/lock.errors.js +18 -0
  48. package/dist/lock/contracts/lock.errors.js.map +1 -1
  49. package/dist/lock/contracts/lock.events.d.ts +22 -0
  50. package/dist/lock/contracts/lock.events.js +22 -0
  51. package/dist/lock/contracts/lock.events.js.map +1 -1
  52. package/dist/serde/contracts/deserializer.contract.d.ts +1 -1
  53. package/dist/serde/contracts/deserializer.contract.js +1 -1
  54. package/dist/serde/contracts/deserializer.contract.js.map +1 -1
  55. package/dist/serde/contracts/serde.errors.d.ts +14 -2
  56. package/dist/serde/contracts/serde.errors.js +16 -4
  57. package/dist/serde/contracts/serde.errors.js.map +1 -1
  58. package/dist/serde/contracts/serializer.contract.d.ts +1 -1
  59. package/dist/serde/contracts/serializer.contract.js +1 -1
  60. package/dist/serde/contracts/serializer.contract.js.map +1 -1
  61. package/dist/serde/implementations/adapters/mongodb-serde/mongodb-serde.js +3 -3
  62. package/dist/serde/implementations/adapters/mongodb-serde/mongodb-serde.js.map +1 -1
  63. package/dist/serde/implementations/adapters/redis-serde/redis-serde.js +3 -3
  64. package/dist/serde/implementations/adapters/redis-serde/redis-serde.js.map +1 -1
  65. package/dist/serde/implementations/adapters/sql-serde/sql-serde.js +3 -3
  66. package/dist/serde/implementations/adapters/sql-serde/sql-serde.js.map +1 -1
  67. package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.js +3 -3
  68. package/dist/serde/implementations/adapters/super-json-serde-adapter/super-json-serde-adapter.js.map +1 -1
  69. package/dist/serde/implementations/test-utilities/flexible-serde-adapter.test-suite.d.ts +2 -2
  70. package/dist/serde/implementations/test-utilities/flexible-serde-adapter.test-suite.js +1 -1
  71. package/dist/serde/implementations/test-utilities/flexible-serde.test-suite.d.ts +2 -2
  72. package/dist/serde/implementations/test-utilities/flexible-serde.test-suite.js +1 -1
  73. package/dist/utilities/classes/key-prefixer/key-prefixer.d.ts +20 -2
  74. package/dist/utilities/classes/key-prefixer/key-prefixer.js +20 -2
  75. package/dist/utilities/classes/key-prefixer/key-prefixer.js.map +1 -1
  76. package/dist/utilities/errors.d.ts +2 -0
  77. package/dist/utilities/errors.js +2 -0
  78. package/dist/utilities/errors.js.map +1 -1
  79. package/package.json +3 -4
@@ -5,6 +5,7 @@ import { BaseEvent } from "../../event-bus/contracts/_module-exports.js";
5
5
  import type { IFlexibleSerde } from "../../serde/contracts/_module-exports.js";
6
6
  import { type OneOrMore, type TimeSpan } from "../../utilities/_module-exports.js";
7
7
  /**
8
+ * The event is dispatched when key is found.
8
9
  *
9
10
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
10
11
  * @group Events
@@ -16,6 +17,7 @@ export declare class KeyFoundCacheEvent<TType = unknown> extends BaseEvent<{
16
17
  }> {
17
18
  }
18
19
  /**
20
+ * The event is dispatched when key is not found.
19
21
  *
20
22
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
21
23
  * @group Events
@@ -26,6 +28,7 @@ export declare class KeyNotFoundCacheEvent extends BaseEvent<{
26
28
  }> {
27
29
  }
28
30
  /**
31
+ * The event is dispatched when key is added.
29
32
  *
30
33
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
31
34
  * @group Events
@@ -38,6 +41,7 @@ export declare class KeyAddedCacheEvent<TType = unknown> extends BaseEvent<{
38
41
  }> {
39
42
  }
40
43
  /**
44
+ * The event is dispatched when key is updated.
41
45
  *
42
46
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
43
47
  * @group Events
@@ -49,6 +53,7 @@ export declare class KeyUpdatedCacheEvent<TType = unknown> extends BaseEvent<{
49
53
  }> {
50
54
  }
51
55
  /**
56
+ * The event is dispatched when key is removed.
52
57
  *
53
58
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
54
59
  * @group Events
@@ -59,6 +64,7 @@ export declare class KeyRemovedCacheEvent extends BaseEvent<{
59
64
  }> {
60
65
  }
61
66
  /**
67
+ * The event is dispatched when key is incremented.
62
68
  *
63
69
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
64
70
  * @group Events
@@ -70,6 +76,7 @@ export declare class KeyIncrementedCacheEvent extends BaseEvent<{
70
76
  }> {
71
77
  }
72
78
  /**
79
+ * The event is dispatched when key is decremented.
73
80
  *
74
81
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
75
82
  * @group Events
@@ -81,6 +88,7 @@ export declare class KeyDecrementedCacheEvent extends BaseEvent<{
81
88
  }> {
82
89
  }
83
90
  /**
91
+ * The event is dispatched when all keys all cleared.
84
92
  *
85
93
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
86
94
  * @group Events
@@ -94,7 +102,7 @@ export declare class KeysClearedCacheEvent extends BaseEvent<{
94
102
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
95
103
  * @group Events
96
104
  */
97
- export declare class UnexpectedCacheErrorEvent extends BaseEvent<{
105
+ export declare class UnexpectedErrorCacheEvent extends BaseEvent<{
98
106
  group: string | null;
99
107
  keys?: string[];
100
108
  value?: unknown;
@@ -107,7 +115,23 @@ export declare class UnexpectedCacheErrorEvent extends BaseEvent<{
107
115
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
108
116
  * @group Events
109
117
  */
110
- export type CacheEvents<TType = unknown> = KeyFoundCacheEvent<TType> | KeyNotFoundCacheEvent | KeyAddedCacheEvent<TType> | KeyUpdatedCacheEvent<TType> | KeyRemovedCacheEvent | KeyIncrementedCacheEvent | KeyDecrementedCacheEvent | KeysClearedCacheEvent | UnexpectedCacheErrorEvent;
118
+ export declare const CACHE_EVENTS: {
119
+ KeyFound: typeof KeyFoundCacheEvent;
120
+ KeyNotFound: typeof KeyNotFoundCacheEvent;
121
+ KeyAdded: typeof KeyAddedCacheEvent;
122
+ KeyUpdated: typeof KeyUpdatedCacheEvent;
123
+ KeyRemoved: typeof KeyRemovedCacheEvent;
124
+ KeyIncremented: typeof KeyIncrementedCacheEvent;
125
+ KeyDecremented: typeof KeyDecrementedCacheEvent;
126
+ KeysCleared: typeof KeysClearedCacheEvent;
127
+ UnexpectedError: typeof UnexpectedErrorCacheEvent;
128
+ };
129
+ /**
130
+ *
131
+ * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
132
+ * @group Events
133
+ */
134
+ export type CacheEvents<TType = unknown> = KeyFoundCacheEvent<TType> | KeyNotFoundCacheEvent | KeyAddedCacheEvent<TType> | KeyUpdatedCacheEvent<TType> | KeyRemovedCacheEvent | KeyIncrementedCacheEvent | KeyDecrementedCacheEvent | KeysClearedCacheEvent | UnexpectedErrorCacheEvent;
111
135
  /**
112
136
  * The <i>registerCacheEventsToSerde</i> function registers all <i>{@link IGroupableCache}</i> related events with <i>IFlexibleSerde</i>, ensuring they will properly be serialized and deserialized.
113
137
  *
@@ -4,6 +4,7 @@
4
4
  import { BaseEvent } from "../../event-bus/contracts/_module-exports.js";
5
5
  import { CORE, resolveOneOrMore, } from "../../utilities/_module-exports.js";
6
6
  /**
7
+ * The event is dispatched when key is found.
7
8
  *
8
9
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
9
10
  * @group Events
@@ -11,6 +12,7 @@ import { CORE, resolveOneOrMore, } from "../../utilities/_module-exports.js";
11
12
  export class KeyFoundCacheEvent extends BaseEvent {
12
13
  }
13
14
  /**
15
+ * The event is dispatched when key is not found.
14
16
  *
15
17
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
16
18
  * @group Events
@@ -18,6 +20,7 @@ export class KeyFoundCacheEvent extends BaseEvent {
18
20
  export class KeyNotFoundCacheEvent extends BaseEvent {
19
21
  }
20
22
  /**
23
+ * The event is dispatched when key is added.
21
24
  *
22
25
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
23
26
  * @group Events
@@ -25,6 +28,7 @@ export class KeyNotFoundCacheEvent extends BaseEvent {
25
28
  export class KeyAddedCacheEvent extends BaseEvent {
26
29
  }
27
30
  /**
31
+ * The event is dispatched when key is updated.
28
32
  *
29
33
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
30
34
  * @group Events
@@ -32,6 +36,7 @@ export class KeyAddedCacheEvent extends BaseEvent {
32
36
  export class KeyUpdatedCacheEvent extends BaseEvent {
33
37
  }
34
38
  /**
39
+ * The event is dispatched when key is removed.
35
40
  *
36
41
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
37
42
  * @group Events
@@ -39,6 +44,7 @@ export class KeyUpdatedCacheEvent extends BaseEvent {
39
44
  export class KeyRemovedCacheEvent extends BaseEvent {
40
45
  }
41
46
  /**
47
+ * The event is dispatched when key is incremented.
42
48
  *
43
49
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
44
50
  * @group Events
@@ -46,6 +52,7 @@ export class KeyRemovedCacheEvent extends BaseEvent {
46
52
  export class KeyIncrementedCacheEvent extends BaseEvent {
47
53
  }
48
54
  /**
55
+ * The event is dispatched when key is decremented.
49
56
  *
50
57
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
51
58
  * @group Events
@@ -53,6 +60,7 @@ export class KeyIncrementedCacheEvent extends BaseEvent {
53
60
  export class KeyDecrementedCacheEvent extends BaseEvent {
54
61
  }
55
62
  /**
63
+ * The event is dispatched when all keys all cleared.
56
64
  *
57
65
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
58
66
  * @group Events
@@ -64,8 +72,24 @@ export class KeysClearedCacheEvent extends BaseEvent {
64
72
  * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
65
73
  * @group Events
66
74
  */
67
- export class UnexpectedCacheErrorEvent extends BaseEvent {
75
+ export class UnexpectedErrorCacheEvent extends BaseEvent {
68
76
  }
77
+ /**
78
+ *
79
+ * IMPORT_PATH: ```"@daiso-tech/core/cache/contracts"```
80
+ * @group Events
81
+ */
82
+ export const CACHE_EVENTS = {
83
+ KeyFound: KeyFoundCacheEvent,
84
+ KeyNotFound: KeyNotFoundCacheEvent,
85
+ KeyAdded: KeyAddedCacheEvent,
86
+ KeyUpdated: KeyUpdatedCacheEvent,
87
+ KeyRemoved: KeyRemovedCacheEvent,
88
+ KeyIncremented: KeyIncrementedCacheEvent,
89
+ KeyDecremented: KeyDecrementedCacheEvent,
90
+ KeysCleared: KeysClearedCacheEvent,
91
+ UnexpectedError: UnexpectedErrorCacheEvent,
92
+ };
69
93
  /**
70
94
  * The <i>registerCacheEventsToSerde</i> function registers all <i>{@link IGroupableCache}</i> related events with <i>IFlexibleSerde</i>, ensuring they will properly be serialized and deserialized.
71
95
  *
@@ -83,7 +107,7 @@ export function registerCacheEventsToSerde(serde) {
83
107
  .registerEvent(KeyIncrementedCacheEvent, CORE)
84
108
  .registerEvent(KeyDecrementedCacheEvent, CORE)
85
109
  .registerEvent(KeysClearedCacheEvent, CORE)
86
- .registerEvent(UnexpectedCacheErrorEvent, CORE);
110
+ .registerEvent(UnexpectedErrorCacheEvent, CORE);
87
111
  }
88
112
  }
89
113
  //# sourceMappingURL=cache.events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.events.js","sourceRoot":"","sources":["../../../src/cache/contracts/cache.events.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAErE,OAAO,EACH,IAAI,EACJ,gBAAgB,GAGnB,MAAM,gCAAgC,CAAC;AAExC;;;;GAIG;AACH,MAAM,OAAO,kBAAoC,SAAQ,SAIvD;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,qBAAsB,SAAQ,SAGzC;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,kBAAoC,SAAQ,SAKvD;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,oBAAsC,SAAQ,SAIzD;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,SAGxC;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,wBAAyB,SAAQ,SAI5C;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,wBAAyB,SAAQ,SAI5C;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,qBAAsB,SAAQ,SAEzC;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,yBAA0B,SAAQ,SAM7C;CAAG;AAkBL;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CACtC,KAAgC;IAEhC,KAAK,MAAM,MAAM,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3C,MAAM;aACD,aAAa,CAAC,kBAAkB,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ACxB,QAAQ,EAAE,kBAAkB;IAC5B,WAAW,EAAE,qBAAqB;IAClC,QAAQ,EAAE,kBAAkB;IAC5B,UAAU,EAAE,oBAAoB;IAChC,UAAU,EAAE,oBAAoB;IAChC,cAAc,EAAE,wBAAwB;IACxC,cAAc,EAAE,wBAAwB;IACxC,WAAW,EAAE,qBAAqB;IAClC,eAAe,EAAE,yBAAyB;CAC7C,CAAC;AAkBF;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CACtC,KAAgC;IAEhC,KAAK,MAAM,MAAM,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3C,MAAM;aACD,aAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC;aACvC,aAAa,CAAC,qBAAqB,EAAE,IAAI,CAAC;aAC1C,aAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC;aACvC,aAAa,CAAC,oBAAoB,EAAE,IAAI,CAAC;aACzC,aAAa,CAAC,oBAAoB,EAAE,IAAI,CAAC;aACzC,aAAa,CAAC,wBAAwB,EAAE,IAAI,CAAC;aAC7C,aAAa,CAAC,wBAAwB,EAAE,IAAI,CAAC;aAC7C,aAAa,CAAC,qBAAqB,EAAE,IAAI,CAAC;aAC1C,aAAa,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;AACL,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @module Serde
3
3
  */
4
- import { DeserializationError, SerializationError, } from "../../../../serde/contracts/_module-exports.js";
4
+ import { DeserializationSerdeError, SerializationSerdeError, } from "../../../../serde/contracts/_module-exports.js";
5
5
  /**
6
6
  * @internal
7
7
  */
@@ -20,7 +20,7 @@ export class MongodbCacheAdapterSerde {
20
20
  return this.serde.serialize(value);
21
21
  }
22
22
  catch (error) {
23
- throw new SerializationError(`Serialization error "${String(error)}" occured`, error);
23
+ throw new SerializationSerdeError(`Serialization error "${String(error)}" occured`, error);
24
24
  }
25
25
  }
26
26
  deserialize(value) {
@@ -31,7 +31,7 @@ export class MongodbCacheAdapterSerde {
31
31
  return this.serde.deserialize(value);
32
32
  }
33
33
  catch (error) {
34
- throw new DeserializationError(`Serialization error "${String(error)}" occured`, error);
34
+ throw new DeserializationSerdeError(`Serialization error "${String(error)}" occured`, error);
35
35
  }
36
36
  }
37
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mongodb-cache-adapter-serde.js","sourceRoot":"","sources":["../../../../../src/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEH,oBAAoB,EACpB,kBAAkB,GACrB,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,OAAO,wBAAwB;IACJ;IAA7B,YAA6B,KAAqB;QAArB,UAAK,GAAL,KAAK,CAAgB;IAAG,CAAC;IAEtD,SAAS,CAAS,KAAa;QAC3B,IAAI,CAAC;YACD,IACI,OAAO,KAAK,KAAK,QAAQ;gBACzB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;gBACpB,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EACxB,CAAC;gBACC,OAAO,KAAK,CAAC;YACjB,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,MAAM,IAAI,kBAAkB,CACxB,wBAAwB,MAAM,CAAC,KAAK,CAAC,WAAW,EAChD,KAAK,CACR,CAAC;QACN,CAAC;IACL,CAAC;IAED,WAAW,CAAS,KAAsB;QACtC,IAAI,CAAC;YACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC5B,OAAO,KAAe,CAAC;YAC3B,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,MAAM,IAAI,oBAAoB,CAC1B,wBAAwB,MAAM,CAAC,KAAK,CAAC,WAAW,EAChD,KAAK,CACR,CAAC;QACN,CAAC;IACL,CAAC;CACJ"}
1
+ {"version":3,"file":"mongodb-cache-adapter-serde.js","sourceRoot":"","sources":["../../../../../src/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter-serde.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEH,yBAAyB,EACzB,uBAAuB,GAC1B,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,OAAO,wBAAwB;IACJ;IAA7B,YAA6B,KAAqB;QAArB,UAAK,GAAL,KAAK,CAAgB;IAAG,CAAC;IAEtD,SAAS,CAAS,KAAa;QAC3B,IAAI,CAAC;YACD,IACI,OAAO,KAAK,KAAK,QAAQ;gBACzB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;gBACpB,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EACxB,CAAC;gBACC,OAAO,KAAK,CAAC;YACjB,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,MAAM,IAAI,uBAAuB,CAC7B,wBAAwB,MAAM,CAAC,KAAK,CAAC,WAAW,EAChD,KAAK,CACR,CAAC;QACN,CAAC;IACL,CAAC;IAED,WAAW,CAAS,KAAsB;QACtC,IAAI,CAAC;YACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC5B,OAAO,KAAe,CAAC;YAC3B,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,MAAM,IAAI,yBAAyB,CAC/B,wBAAwB,MAAM,CAAC,KAAK,CAAC,WAAW,EAChD,KAAK,CACR,CAAC;QACN,CAAC;IACL,CAAC;CACJ"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @module Serde
3
3
  */
4
- import { DeserializationError, SerializationError, } from "../../../../serde/contracts/_module-exports.js";
4
+ import { DeserializationSerdeError, SerializationSerdeError, } from "../../../../serde/contracts/_module-exports.js";
5
5
  /**
6
6
  * @internal
7
7
  */
@@ -20,7 +20,7 @@ export class RedisCacheAdapterSerde {
20
20
  return this.serde.serialize(value);
21
21
  }
22
22
  catch (error) {
23
- throw new SerializationError(`Serialization error "${String(error)}" occured`, error);
23
+ throw new SerializationSerdeError(`Serialization error "${String(error)}" occured`, error);
24
24
  }
25
25
  }
26
26
  deserialize(value) {
@@ -32,7 +32,7 @@ export class RedisCacheAdapterSerde {
32
32
  return this.serde.deserialize(value);
33
33
  }
34
34
  catch (error) {
35
- throw new DeserializationError(`Deserialization error "${String(error)}" occured`, error);
35
+ throw new DeserializationSerdeError(`Deserialization error "${String(error)}" occured`, error);
36
36
  }
37
37
  }
38
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"redis-cache-adapter-serde.js","sourceRoot":"","sources":["../../../../../src/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEH,oBAAoB,EACpB,kBAAkB,GACrB,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,OAAO,sBAAsB;IACF;IAA7B,YAA6B,KAAqB;QAArB,UAAK,GAAL,KAAK,CAAgB;IAAG,CAAC;IAEtD,SAAS,CAAS,KAAa;QAC3B,IAAI,CAAC;YACD,IACI,OAAO,KAAK,KAAK,QAAQ;gBACzB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;gBACpB,QAAQ,CAAC,KAAK,CAAC,EACjB,CAAC;gBACC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,MAAM,IAAI,kBAAkB,CACxB,wBAAwB,MAAM,CAAC,KAAK,CAAC,WAAW,EAChD,KAAK,CACR,CAAC;QACN,CAAC;IACL,CAAC;IAED,WAAW,CAAS,KAAa;QAC7B,IAAI,CAAC;YACD,MAAM,aAAa,GAAG,4BAA4B,CAAC;YACnD,IAAI,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC5B,OAAO,MAAM,CAAC,KAAK,CAAW,CAAC;YACnC,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,MAAM,IAAI,oBAAoB,CAC1B,0BAA0B,MAAM,CAAC,KAAK,CAAC,WAAW,EAClD,KAAK,CACR,CAAC;QACN,CAAC;IACL,CAAC;CACJ"}
1
+ {"version":3,"file":"redis-cache-adapter-serde.js","sourceRoot":"","sources":["../../../../../src/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter-serde.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEH,yBAAyB,EACzB,uBAAuB,GAC1B,MAAM,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,OAAO,sBAAsB;IACF;IAA7B,YAA6B,KAAqB;QAArB,UAAK,GAAL,KAAK,CAAgB;IAAG,CAAC;IAEtD,SAAS,CAAS,KAAa;QAC3B,IAAI,CAAC;YACD,IACI,OAAO,KAAK,KAAK,QAAQ;gBACzB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;gBACpB,QAAQ,CAAC,KAAK,CAAC,EACjB,CAAC;gBACC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,MAAM,IAAI,uBAAuB,CAC7B,wBAAwB,MAAM,CAAC,KAAK,CAAC,WAAW,EAChD,KAAK,CACR,CAAC;QACN,CAAC;IACL,CAAC;IAED,WAAW,CAAS,KAAa;QAC7B,IAAI,CAAC;YACD,MAAM,aAAa,GAAG,4BAA4B,CAAC;YACnD,IAAI,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC5B,OAAO,MAAM,CAAC,KAAK,CAAW,CAAC;YACnC,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,MAAM,IAAI,yBAAyB,CAC/B,0BAA0B,MAAM,CAAC,KAAK,CAAC,WAAW,EAClD,KAAK,CACR,CAAC;QACN,CAAC;IACL,CAAC;CACJ"}
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @module Cache
4
4
  */
5
- import { KeyFoundCacheEvent, KeyNotFoundCacheEvent, KeyAddedCacheEvent, KeyUpdatedCacheEvent, KeyRemovedCacheEvent, KeyIncrementedCacheEvent, KeyDecrementedCacheEvent, KeysClearedCacheEvent, UnexpectedCacheErrorEvent, } from "../../../../cache/contracts/_module-exports.js";
5
+ import { KeyFoundCacheEvent, KeyNotFoundCacheEvent, KeyAddedCacheEvent, KeyUpdatedCacheEvent, KeyRemovedCacheEvent, KeyIncrementedCacheEvent, KeyDecrementedCacheEvent, KeysClearedCacheEvent, UnexpectedErrorCacheEvent, } from "../../../../cache/contracts/_module-exports.js";
6
6
  import { KeyNotFoundCacheError, TypeCacheError, } from "../../../../cache/contracts/_module-exports.js";
7
7
  import {} from "../../../../cache/contracts/_module-exports.js";
8
8
  import { isAsyncFactory, resolveAsyncFactoryable, resolveAsyncLazyable, resolveFactory, } from "../../../../utilities/_module-exports.js";
@@ -256,7 +256,7 @@ export class Cache {
256
256
  }
257
257
  catch (error) {
258
258
  this.eventBus
259
- .dispatch(new UnexpectedCacheErrorEvent({
259
+ .dispatch(new UnexpectedErrorCacheEvent({
260
260
  group: this.getGroup(),
261
261
  keys: [keyObj.resolved],
262
262
  method: this.get.name,
@@ -309,7 +309,7 @@ export class Cache {
309
309
  }
310
310
  catch (error) {
311
311
  this.eventBus
312
- .dispatch(new UnexpectedCacheErrorEvent({
312
+ .dispatch(new UnexpectedErrorCacheEvent({
313
313
  group: this.getGroup(),
314
314
  keys: [keyObj.resolved],
315
315
  method: this.get.name,
@@ -361,7 +361,7 @@ export class Cache {
361
361
  }
362
362
  catch (error) {
363
363
  this.eventBus
364
- .dispatch(new UnexpectedCacheErrorEvent({
364
+ .dispatch(new UnexpectedErrorCacheEvent({
365
365
  group: this.getGroup(),
366
366
  keys: [keyObj.resolved],
367
367
  value,
@@ -402,7 +402,7 @@ export class Cache {
402
402
  }
403
403
  catch (error) {
404
404
  this.eventBus
405
- .dispatch(new UnexpectedCacheErrorEvent({
405
+ .dispatch(new UnexpectedErrorCacheEvent({
406
406
  group: this.getGroup(),
407
407
  keys: [keyObj.resolved],
408
408
  value,
@@ -441,7 +441,7 @@ export class Cache {
441
441
  }
442
442
  catch (error) {
443
443
  this.eventBus
444
- .dispatch(new UnexpectedCacheErrorEvent({
444
+ .dispatch(new UnexpectedErrorCacheEvent({
445
445
  group: this.getGroup(),
446
446
  keys: [keyObj.resolved],
447
447
  value,
@@ -489,7 +489,7 @@ export class Cache {
489
489
  }
490
490
  catch (error) {
491
491
  this.eventBus
492
- .dispatch(new UnexpectedCacheErrorEvent({
492
+ .dispatch(new UnexpectedErrorCacheEvent({
493
493
  group: this.getGroup(),
494
494
  keys: [keyObj.resolved],
495
495
  value,
@@ -532,7 +532,7 @@ export class Cache {
532
532
  }
533
533
  catch (error) {
534
534
  this.eventBus
535
- .dispatch(new UnexpectedCacheErrorEvent({
535
+ .dispatch(new UnexpectedErrorCacheEvent({
536
536
  group: this.getGroup(),
537
537
  keys: [keyObj.resolved],
538
538
  method: this.remove.name,
@@ -571,7 +571,7 @@ export class Cache {
571
571
  }
572
572
  catch (error) {
573
573
  this.eventBus
574
- .dispatch(new UnexpectedCacheErrorEvent({
574
+ .dispatch(new UnexpectedErrorCacheEvent({
575
575
  group: this.getGroup(),
576
576
  keys: keyObjArr.map((keyObj) => keyObj.resolved),
577
577
  method: this.remove.name,
@@ -599,7 +599,7 @@ export class Cache {
599
599
  }
600
600
  catch (error) {
601
601
  this.eventBus
602
- .dispatch(new UnexpectedCacheErrorEvent({
602
+ .dispatch(new UnexpectedErrorCacheEvent({
603
603
  group: this.getGroup(),
604
604
  method: this.clear.name,
605
605
  error,
@@ -7,7 +7,7 @@ import { type Promisable } from "../../../utilities/_module-exports.js";
7
7
  /**
8
8
  *
9
9
  * IMPORT_PATH: ```"@daiso-tech/core/cache/test-utilities"```
10
- * @group Test utilities
10
+ * @group TestUtilities
11
11
  */
12
12
  export type CacheAdapterTestSuiteSettings = {
13
13
  expect: ExpectStatic;
@@ -20,7 +20,7 @@ export type CacheAdapterTestSuiteSettings = {
20
20
  * The <i>cacheAdapterTestSuite</i> function simplifies the process of testing your custom implementation of <i>{@link ICacheAdapter}</i> with <i>vitest</i>.
21
21
  *
22
22
  * IMPORT_PATH: ```"@daiso-tech/core/cache/test-utilities"```
23
- * @group Test utilities
23
+ * @group TestUtilities
24
24
  * @example
25
25
  * ```ts
26
26
  * import { afterEach, beforeEach, describe, expect, test } from "vitest";
@@ -10,7 +10,7 @@ import { LazyPromise } from "../../../async/_module-exports.js";
10
10
  * The <i>cacheAdapterTestSuite</i> function simplifies the process of testing your custom implementation of <i>{@link ICacheAdapter}</i> with <i>vitest</i>.
11
11
  *
12
12
  * IMPORT_PATH: ```"@daiso-tech/core/cache/test-utilities"```
13
- * @group Test utilities
13
+ * @group TestUtilities
14
14
  * @example
15
15
  * ```ts
16
16
  * import { afterEach, beforeEach, describe, expect, test } from "vitest";
@@ -7,7 +7,7 @@ import { type Promisable } from "../../../utilities/_module-exports.js";
7
7
  /**
8
8
  *
9
9
  * IMPORT_PATH: ```"@daiso-tech/core/cache/test-utilities"```
10
- * @group Test utilities
10
+ * @group TestUtilities
11
11
  */
12
12
  export type CacheTestSuiteSettings = {
13
13
  expect: ExpectStatic;
@@ -20,7 +20,7 @@ export type CacheTestSuiteSettings = {
20
20
  * The <i>cacheTestSuite</i> function simplifies the process of testing your custom implementation of <i>{@link ICache}</i> with <i>vitest</i>.
21
21
  *
22
22
  * IMPORT_PATH: ```"@daiso-tech/core/cache/test-utilities"```
23
- * @group Test utilities
23
+ * @group TestUtilities
24
24
  * @example
25
25
  * ```ts
26
26
  * import { beforeEach, describe, expect, test } from "vitest";
@@ -10,7 +10,7 @@ import { LazyPromise } from "../../../async/_module-exports.js";
10
10
  * The <i>cacheTestSuite</i> function simplifies the process of testing your custom implementation of <i>{@link ICache}</i> with <i>vitest</i>.
11
11
  *
12
12
  * IMPORT_PATH: ```"@daiso-tech/core/cache/test-utilities"```
13
- * @group Test utilities
13
+ * @group TestUtilities
14
14
  * @example
15
15
  * ```ts
16
16
  * import { beforeEach, describe, expect, test } from "vitest";
@@ -7,7 +7,7 @@ import { type Promisable } from "../../../utilities/_module-exports.js";
7
7
  /**
8
8
  *
9
9
  * IMPORT_PATH: ```"@daiso-tech/core/cache/test-utilities"```
10
- * @group Test utilities
10
+ * @group TestUtilities
11
11
  */
12
12
  export type DatabaseCacheAdapterTestSuiteSettings = {
13
13
  expect: ExpectStatic;
@@ -20,7 +20,7 @@ export type DatabaseCacheAdapterTestSuiteSettings = {
20
20
  * The <i>databaseCacheAdapterTestSuite</i> function simplifies the process of testing your custom implementation of <i>{@link IDatabaseCacheAdapter}</i> with <i>vitest</i>.
21
21
  *
22
22
  * IMPORT_PATH: ```"@daiso-tech/core/cache/test-utilities"```
23
- * @group Test utilities
23
+ * @group TestUtilities
24
24
  * @example
25
25
  * ```ts
26
26
  * import { afterEach, beforeEach, describe, expect, test } from "vitest";
@@ -8,7 +8,7 @@ import { TimeSpan } from "../../../utilities/_module-exports.js";
8
8
  * The <i>databaseCacheAdapterTestSuite</i> function simplifies the process of testing your custom implementation of <i>{@link IDatabaseCacheAdapter}</i> with <i>vitest</i>.
9
9
  *
10
10
  * IMPORT_PATH: ```"@daiso-tech/core/cache/test-utilities"```
11
- * @group Test utilities
11
+ * @group TestUtilities
12
12
  * @example
13
13
  * ```ts
14
14
  * import { afterEach, beforeEach, describe, expect, test } from "vitest";
@@ -23,6 +23,7 @@ export declare class UnexpectedCollectionError extends CollectionError {
23
23
  constructor(message: string, cause?: unknown);
24
24
  }
25
25
  /**
26
+ * The error is thrown when the item is not found.
26
27
  *
27
28
  * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
28
29
  * @group Errors
@@ -32,6 +33,7 @@ export declare class ItemNotFoundCollectionError extends CollectionError {
32
33
  constructor(message: string, cause?: unknown);
33
34
  }
34
35
  /**
36
+ * The error is thrown when multiple items are found.
35
37
  *
36
38
  * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
37
39
  * @group Errors
@@ -41,6 +43,7 @@ export declare class MultipleItemsFoundCollectionError extends CollectionError {
41
43
  constructor(message: string, cause?: unknown);
42
44
  }
43
45
  /**
46
+ * The error is thrown when calling a method that needs all items to be of a specific type. For example, the <i>sum</i> method requires all items to be numbers.
44
47
  *
45
48
  * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
46
49
  * @group Errors
@@ -50,6 +53,7 @@ export declare class TypeCollectionError extends CollectionError {
50
53
  constructor(message: string, cause?: unknown);
51
54
  }
52
55
  /**
56
+ * The error is thrown when calling a method that needs the collection not to be empty. For example, the <i>average</i> method requires the collection not to be empty.
53
57
  *
54
58
  * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
55
59
  * @group Errors
@@ -58,6 +62,19 @@ export declare class EmptyCollectionError extends CollectionError {
58
62
  static deserialize(deserializedValue: ISerializedError): CollectionError;
59
63
  constructor(message: string, cause?: unknown);
60
64
  }
65
+ /**
66
+ *
67
+ * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
68
+ * @group Errors
69
+ */
70
+ export declare const COLLECTION_ERRORS: {
71
+ readonly Base: typeof CollectionError;
72
+ readonly Unexpected: typeof UnexpectedCollectionError;
73
+ readonly ItemNotFound: typeof ItemNotFoundCollectionError;
74
+ readonly MultipleItemsFound: typeof MultipleItemsFoundCollectionError;
75
+ readonly Type: typeof TypeCollectionError;
76
+ readonly Empty: typeof EmptyCollectionError;
77
+ };
61
78
  /**
62
79
  * The <i>registerCollectionErrorsToSerde</i> function registers all <i>ICollection</i> related errors with <i>IFlexibleSerde</i>, ensuring they will properly be serialized and deserialized.
63
80
  *
@@ -38,6 +38,7 @@ export class UnexpectedCollectionError extends CollectionError {
38
38
  }
39
39
  }
40
40
  /**
41
+ * The error is thrown when the item is not found.
41
42
  *
42
43
  * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
43
44
  * @group Errors
@@ -52,6 +53,7 @@ export class ItemNotFoundCollectionError extends CollectionError {
52
53
  }
53
54
  }
54
55
  /**
56
+ * The error is thrown when multiple items are found.
55
57
  *
56
58
  * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
57
59
  * @group Errors
@@ -66,6 +68,7 @@ export class MultipleItemsFoundCollectionError extends CollectionError {
66
68
  }
67
69
  }
68
70
  /**
71
+ * The error is thrown when calling a method that needs all items to be of a specific type. For example, the <i>sum</i> method requires all items to be numbers.
69
72
  *
70
73
  * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
71
74
  * @group Errors
@@ -80,6 +83,7 @@ export class TypeCollectionError extends CollectionError {
80
83
  }
81
84
  }
82
85
  /**
86
+ * The error is thrown when calling a method that needs the collection not to be empty. For example, the <i>average</i> method requires the collection not to be empty.
83
87
  *
84
88
  * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
85
89
  * @group Errors
@@ -93,6 +97,19 @@ export class EmptyCollectionError extends CollectionError {
93
97
  this.name = EmptyCollectionError.name;
94
98
  }
95
99
  }
100
+ /**
101
+ *
102
+ * IMPORT_PATH: ```"@daiso-tech/core/collection/contracts"```
103
+ * @group Errors
104
+ */
105
+ export const COLLECTION_ERRORS = {
106
+ Base: CollectionError,
107
+ Unexpected: UnexpectedCollectionError,
108
+ ItemNotFound: ItemNotFoundCollectionError,
109
+ MultipleItemsFound: MultipleItemsFoundCollectionError,
110
+ Type: TypeCollectionError,
111
+ Empty: EmptyCollectionError,
112
+ };
96
113
  /**
97
114
  * The <i>registerCollectionErrorsToSerde</i> function registers all <i>ICollection</i> related errors with <i>IFlexibleSerde</i>, ensuring they will properly be serialized and deserialized.
98
115
  *
@@ -1 +1 @@
1
- {"version":3,"file":"collection.errors.js","sourceRoot":"","sources":["../../../src/collection/contracts/collection.errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,EACH,IAAI,EACJ,gBAAgB,GAGnB,MAAM,gCAAgC,CAAC;AAExC;;;;GAIG;AACH,MAAM,OAAO,eACT,SAAQ,KAAK;IAGb,MAAM,CAAC,WAAW,CAAC,iBAAmC;QAClD,OAAO,IAAI,eAAe,CACtB,iBAAiB,CAAC,OAAO,EACzB,iBAAiB,CAAC,KAAK,CAC1B,CAAC;IACN,CAAC;IAED,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;IACrC,CAAC;IAED,SAAS;QACL,OAAO;YACH,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;SACpB,CAAC;IACN,CAAC;CACJ;AAED;;;;GAIG;AACH,MAAM,OAAO,yBAA0B,SAAQ,eAAe;IAC1D,MAAM,CAAU,WAAW,CACvB,iBAAmC;QAEnC,OAAO,IAAI,yBAAyB,CAChC,iBAAiB,CAAC,OAAO,EACzB,iBAAiB,CAAC,KAAK,CAC1B,CAAC;IACN,CAAC;IAED,YAAY,OAAe,EAAE,KAAe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GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,eAAe;IACrD,MAAM,CAAU,WAAW,CACvB,iBAAmC;QAEnC,OAAO,IAAI,oBAAoB,CAC3B,iBAAiB,CAAC,OAAO,EACzB,iBAAiB,CAAC,KAAK,CAC1B,CAAC;IACN,CAAC;IAED,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAC1C,CAAC;CACJ;AAED;;;;;GAKG;AACH,MAAM,UAAU,+BAA+B,CAC3C,KAAgC;IAEhC,KAAK,MAAM,MAAM,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3C,MAAM;aACD,aAAa,CAAC,eAAe,EAAE,IAAI,CAAC;aACpC,aAAa,CAAC,yBAAyB,EAAE,IAAI,CAAC;aAC9C,aAAa,CAAC,2BAA2B,EAAE,IAAI,CAAC;aAChD,aAAa,CAAC,iCAAiC,EAAE,IAAI,CAAC;aACtD,aAAa,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACxC,aAAa,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"collection.errors.js","sourceRoot":"","sources":["../../../src/collection/contracts/collection.errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,EACH,IAAI,EACJ,gBAAgB,GAGnB,MAAM,gCAAgC,CAAC;AAExC;;;;GAIG;AACH,MAAM,OAAO,eACT,SAAQ,KAAK;IAGb,MAAM,CAAC,WAAW,CAAC,iBAAmC;QAClD,OAAO,IAAI,eAAe,CACtB,iBAAiB,CAAC,OAAO,EACzB,iBAAiB,CAAC,KAAK,CAC1B,CAAC;IACN,CAAC;IAED,YAAY,OAAe,EAAE,KAAe;QACxC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC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yB,EAAE,IAAI,CAAC;aAC9C,aAAa,CAAC,2BAA2B,EAAE,IAAI,CAAC;aAChD,aAAa,CAAC,iCAAiC,EAAE,IAAI,CAAC;aACtD,aAAa,CAAC,mBAAmB,EAAE,IAAI,CAAC;aACxC,aAAa,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;AACL,CAAC"}
@@ -23,6 +23,7 @@ export declare class UnexpectedEventBusError extends EventBusError {
23
23
  constructor(message: string, cause?: unknown);
24
24
  }
25
25
  /**
26
+ * The error is thrown when an unexpected error occurs while removing a listener.
26
27
  *
27
28
  * IMPORT_PATH: ```"@daiso-tech/core/event-bus/contracts"```
28
29
  * @group Errors
@@ -32,6 +33,7 @@ export declare class UnableToRemoveListenerEventBusError extends UnexpectedEvent
32
33
  constructor(message: string, cause?: unknown);
33
34
  }
34
35
  /**
36
+ * The error is thrown when an unexpected error occurs while adding a listener.
35
37
  *
36
38
  * IMPORT_PATH: ```"@daiso-tech/core/event-bus/contracts"```
37
39
  * @group Errors
@@ -41,6 +43,7 @@ export declare class UnableToAddListenerEventBusError extends UnexpectedEventBus
41
43
  constructor(message: string, cause?: unknown);
42
44
  }
43
45
  /**
46
+ * The error is thrown when an unexpected error occurs while dispatching an event.
44
47
  *
45
48
  * IMPORT_PATH: ```"@daiso-tech/core/event-bus/contracts"```
46
49
  * @group Errors
@@ -48,6 +51,18 @@ export declare class UnableToAddListenerEventBusError extends UnexpectedEventBus
48
51
  export declare class UnableToDispatchEventBusError extends UnexpectedEventBusError {
49
52
  constructor(message: string, cause?: unknown);
50
53
  }
54
+ /**
55
+ *
56
+ * IMPORT_PATH: ```"@daiso-tech/core/event-bus/contracts"```
57
+ * @group Errors
58
+ */
59
+ export declare const EVENT_BUS_ERRORS: {
60
+ Base: typeof EventBusError;
61
+ Unexpected: typeof UnexpectedEventBusError;
62
+ UnableToRemoveListener: typeof UnableToRemoveListenerEventBusError;
63
+ UnableToAddListener: typeof UnableToAddListenerEventBusError;
64
+ UnableToDispatch: typeof UnableToDispatchEventBusError;
65
+ };
51
66
  /**
52
67
  * The <i>registerEventBusErrorsToSerde</i> function registers all <i>{@link IGroupableEventBus}</i> related errors with <i>IFlexibleSerde</i>, ensuring they will properly be serialized and deserialized.
53
68
  *
@@ -38,6 +38,7 @@ export class UnexpectedEventBusError extends EventBusError {
38
38
  }
39
39
  }
40
40
  /**
41
+ * The error is thrown when an unexpected error occurs while removing a listener.
41
42
  *
42
43
  * IMPORT_PATH: ```"@daiso-tech/core/event-bus/contracts"```
43
44
  * @group Errors
@@ -52,6 +53,7 @@ export class UnableToRemoveListenerEventBusError extends UnexpectedEventBusError
52
53
  }
53
54
  }
54
55
  /**
56
+ * The error is thrown when an unexpected error occurs while adding a listener.
55
57
  *
56
58
  * IMPORT_PATH: ```"@daiso-tech/core/event-bus/contracts"```
57
59
  * @group Errors
@@ -66,6 +68,7 @@ export class UnableToAddListenerEventBusError extends UnexpectedEventBusError {
66
68
  }
67
69
  }
68
70
  /**
71
+ * The error is thrown when an unexpected error occurs while dispatching an event.
69
72
  *
70
73
  * IMPORT_PATH: ```"@daiso-tech/core/event-bus/contracts"```
71
74
  * @group Errors
@@ -76,6 +79,18 @@ export class UnableToDispatchEventBusError extends UnexpectedEventBusError {
76
79
  this.name = UnableToDispatchEventBusError.name;
77
80
  }
78
81
  }
82
+ /**
83
+ *
84
+ * IMPORT_PATH: ```"@daiso-tech/core/event-bus/contracts"```
85
+ * @group Errors
86
+ */
87
+ export const EVENT_BUS_ERRORS = {
88
+ Base: EventBusError,
89
+ Unexpected: UnexpectedEventBusError,
90
+ UnableToRemoveListener: UnableToRemoveListenerEventBusError,
91
+ UnableToAddListener: UnableToAddListenerEventBusError,
92
+ UnableToDispatch: UnableToDispatchEventBusError,
93
+ };
79
94
  /**
80
95
  * The <i>registerEventBusErrorsToSerde</i> function registers all <i>{@link IGroupableEventBus}</i> related errors with <i>IFlexibleSerde</i>, ensuring they will properly be serialized and deserialized.
81
96
  *