@leancodepl/cqrs-client-base 8.3.4 → 8.3.5

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leancodepl/cqrs-client-base",
3
- "version": "8.3.4",
3
+ "version": "8.3.5",
4
4
  "license": "Apache-2.0",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
package/src/index.d.ts CHANGED
@@ -8,10 +8,12 @@ export type ValidationError<TErrorCodes extends Record<string, number>> = {
8
8
  readonly AttemptedValue: unknown;
9
9
  readonly ErrorCode: TErrorCodes[keyof TErrorCodes];
10
10
  };
11
- export type CommandResult<TErrorCodes extends Record<string, number>> = {
11
+ export type CommandResult<TErrorCodes extends Record<string, number>> = FailedCommandResult<TErrorCodes> | SuccessfulCommandResult;
12
+ export type FailedCommandResult<TErrorCodes extends Record<string, number>> = {
12
13
  readonly WasSuccessful: false;
13
14
  readonly ValidationErrors: ValidationError<TErrorCodes>[];
14
- } | {
15
+ };
16
+ export type SuccessfulCommandResult = {
15
17
  readonly WasSuccessful: true;
16
18
  };
17
19
  export type ApiSuccess<TResult> = {