@leancodepl/rx-cqrs-client 7.3.7 → 7.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/index.cjs.js +1 -1
- package/index.esm.d.ts +1 -0
- package/index.esm.js +1 -1
- package/package.json +6 -2
- package/src/lib/authGuard.d.ts +1 -1
- package/src/lib/handleCommandResponse.d.ts +1 -1
- package/src/lib/mkCqrsClient.d.ts +2 -2
package/index.cjs.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var rxjs = require('rxjs');
|
|
6
6
|
var operators = require('rxjs/operators');
|
|
7
|
-
var validation = require('@leancodepl/validation');
|
|
8
7
|
var ajax = require('rxjs/ajax');
|
|
8
|
+
var validation = require('@leancodepl/validation');
|
|
9
9
|
|
|
10
10
|
function handleCommandResponse(handlerFunc) {
|
|
11
11
|
return (source)=>source.pipe(operators.concatMap((handler)=>{
|
package/index.esm.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReplaySubject, from, of, throwError, catchError, reduce } from 'rxjs';
|
|
2
2
|
import { concatMap, retryWhen, mergeMap, map } from 'rxjs/operators';
|
|
3
|
-
import { handleResponse } from '@leancodepl/validation';
|
|
4
3
|
import { AjaxError, ajax } from 'rxjs/ajax';
|
|
4
|
+
import { handleResponse } from '@leancodepl/validation';
|
|
5
5
|
|
|
6
6
|
function handleCommandResponse(handlerFunc) {
|
|
7
7
|
return (source)=>source.pipe(concatMap((handler)=>{
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leancodepl/rx-cqrs-client",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@leancodepl/
|
|
6
|
+
"@leancodepl/cqrs-client-base": "7.5.0",
|
|
7
|
+
"@leancodepl/validation": "7.5.0",
|
|
7
8
|
"rxjs": ">=7.0.0"
|
|
8
9
|
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"xhr-mock": "2.5.1"
|
|
12
|
+
},
|
|
9
13
|
"exports": {
|
|
10
14
|
"./package.json": "./package.json",
|
|
11
15
|
".": {
|
package/src/lib/authGuard.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TokenProvider } from "@leancodepl/cqrs-client-base";
|
|
2
1
|
import { MonoTypeOperatorFunction } from "rxjs";
|
|
2
|
+
import { TokenProvider } from "@leancodepl/cqrs-client-base";
|
|
3
3
|
export default function authGuard<T>(tokenProvider: TokenProvider): MonoTypeOperatorFunction<T>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ReducerDescription, ValidationErrorsHandler } from "@leancodepl/validation";
|
|
2
1
|
import { OperatorFunction } from "rxjs";
|
|
2
|
+
import type { ReducerDescription, ValidationErrorsHandler } from "@leancodepl/validation";
|
|
3
3
|
export declare function handleCommandResponse<TErrorCodes extends Record<string, number>, THandlerResult>(handlerFunc: (handler: ValidationErrorsHandler<TErrorCodes, never>) => (reducer: ReducerDescription<THandlerResult, any>) => any): OperatorFunction<ValidationErrorsHandler<TErrorCodes, never>, THandlerResult>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CommandResult, TokenProvider } from "@leancodepl/cqrs-client-base";
|
|
2
1
|
import { AjaxConfig } from "rxjs/ajax";
|
|
2
|
+
import { CommandResult, TokenProvider } from "@leancodepl/cqrs-client-base";
|
|
3
3
|
export declare function mkCqrsClient({ cqrsEndpoint, tokenProvider, ajaxOptions, }: {
|
|
4
4
|
cqrsEndpoint: string;
|
|
5
5
|
tokenProvider?: TokenProvider;
|
|
6
|
-
ajaxOptions?: Omit<AjaxConfig, "
|
|
6
|
+
ajaxOptions?: Omit<AjaxConfig, "body" | "headers" | "method" | "responseType" | "url">;
|
|
7
7
|
}): {
|
|
8
8
|
createQuery<TQuery, TResult>(type: string): (dto: TQuery) => import("rxjs").Observable<TResult>;
|
|
9
9
|
createOperation<TOperation, TResult_1>(type: string): (dto: TOperation) => import("rxjs").Observable<TResult_1>;
|