@leancodepl/cqrs-client-base 8.4.0 → 8.5.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.
- package/package.json +38 -3
- package/index.cjs.d.ts +0 -1
- package/index.cjs.default.js +0 -1
- package/index.cjs.js +0 -2
- package/index.cjs.mjs +0 -2
- package/index.esm.d.ts +0 -1
- package/index.esm.js +0 -1
- package/src/index.d.ts +0 -27
package/package.json
CHANGED
|
@@ -1,17 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leancodepl/cqrs-client-base",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public",
|
|
7
|
+
"registry": "https://registry.npmjs.org/"
|
|
8
|
+
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=18.0.0"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/leancodepl/js_corelibrary.git",
|
|
15
|
+
"directory": "packages/cqrs-clients/cqrs-client-base"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/leancodepl/js_corelibrary",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/leancodepl/js_corelibrary/issues"
|
|
20
|
+
},
|
|
21
|
+
"description": "Base types and interfaces for CQRS client implementations",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"cqrs",
|
|
24
|
+
"types",
|
|
25
|
+
"interfaces",
|
|
26
|
+
"typescript",
|
|
27
|
+
"javascript",
|
|
28
|
+
"leancode"
|
|
29
|
+
],
|
|
30
|
+
"author": {
|
|
31
|
+
"name": "LeanCode",
|
|
32
|
+
"url": "https://leancode.co"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"README.md",
|
|
37
|
+
"CHANGELOG.md"
|
|
38
|
+
],
|
|
39
|
+
"sideEffects": false,
|
|
5
40
|
"exports": {
|
|
6
41
|
"./package.json": "./package.json",
|
|
7
42
|
".": {
|
|
8
43
|
"module": "./index.esm.js",
|
|
9
|
-
"types": "./index.
|
|
44
|
+
"types": "./index.d.ts",
|
|
10
45
|
"import": "./index.cjs.mjs",
|
|
11
46
|
"default": "./index.cjs.js"
|
|
12
47
|
}
|
|
13
48
|
},
|
|
14
49
|
"module": "./index.esm.js",
|
|
15
50
|
"main": "./index.cjs.js",
|
|
16
|
-
"types": "./index.
|
|
51
|
+
"types": "./index.d.ts"
|
|
17
52
|
}
|
package/index.cjs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/index";
|
package/index.cjs.default.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports._default = require('./index.cjs.js').default;
|
package/index.cjs.js
DELETED
package/index.cjs.mjs
DELETED
package/index.esm.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/index";
|
package/index.esm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/src/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export type TokenProvider = {
|
|
2
|
-
getToken: () => Promise<string | undefined>;
|
|
3
|
-
invalidateToken: () => Promise<boolean>;
|
|
4
|
-
};
|
|
5
|
-
export type ValidationError<TErrorCodes extends Record<string, number>> = {
|
|
6
|
-
readonly PropertyName: string;
|
|
7
|
-
readonly ErrorMessage: string;
|
|
8
|
-
readonly AttemptedValue: unknown;
|
|
9
|
-
readonly ErrorCode: TErrorCodes[keyof TErrorCodes];
|
|
10
|
-
};
|
|
11
|
-
export type CommandResult<TErrorCodes extends Record<string, number>> = FailedCommandResult<TErrorCodes> | SuccessfulCommandResult;
|
|
12
|
-
export type FailedCommandResult<TErrorCodes extends Record<string, number>> = {
|
|
13
|
-
readonly WasSuccessful: false;
|
|
14
|
-
readonly ValidationErrors: ValidationError<TErrorCodes>[];
|
|
15
|
-
};
|
|
16
|
-
export type SuccessfulCommandResult = {
|
|
17
|
-
readonly WasSuccessful: true;
|
|
18
|
-
};
|
|
19
|
-
export type ApiSuccess<TResult> = {
|
|
20
|
-
readonly isSuccess: true;
|
|
21
|
-
readonly result: TResult;
|
|
22
|
-
};
|
|
23
|
-
export type ApiError = {
|
|
24
|
-
readonly isSuccess: false;
|
|
25
|
-
readonly error: any;
|
|
26
|
-
};
|
|
27
|
-
export type ApiResponse<TResult> = ApiError | ApiSuccess<TResult>;
|