@pushwoosh/http-client 2.3.3 → 2.4.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.
- package/dist/http-client.errors.d.ts +1 -1
- package/dist/http-client.errors.d.ts.map +1 -1
- package/dist/http-client.main.d.ts +1 -1
- package/dist/http-client.main.d.ts.map +1 -1
- package/dist/http-client.types.d.ts +20 -20
- package/dist/http-client.types.d.ts.map +1 -1
- package/dist/http-client.utilities.d.ts +1 -1
- package/dist/http-client.utilities.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/rpc-client.d.ts +12 -12
- package/dist/rpc-client.d.ts.map +1 -1
- package/dist/rpc2-client.d.ts +10 -0
- package/dist/rpc2-client.d.ts.map +1 -0
- package/package.json +5 -2
package/dist/rpc-client.d.ts
CHANGED
|
@@ -5,25 +5,29 @@ export declare class RpcException extends Error {
|
|
|
5
5
|
readonly error: number;
|
|
6
6
|
constructor(message: string, code: number, details: any);
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type RpcCallback = (body: RpcFetchBody) => void;
|
|
9
|
+
export type RpcResponseSuccess = {
|
|
10
10
|
name: string;
|
|
11
11
|
result: any;
|
|
12
12
|
extra?: any;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type RpcResponseError = {
|
|
15
15
|
name: string;
|
|
16
16
|
error: number;
|
|
17
17
|
message: string;
|
|
18
18
|
details: any;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
21
|
-
export
|
|
20
|
+
export type RpcResponse = RpcResponseSuccess | RpcResponseError;
|
|
21
|
+
export type RpcFetchBody = {
|
|
22
22
|
auth?: {
|
|
23
23
|
logged: boolean;
|
|
24
24
|
};
|
|
25
25
|
responses: Array<RpcResponseSuccess | RpcResponseError>;
|
|
26
26
|
};
|
|
27
|
+
export type CallRemoteProcedureResult = {
|
|
28
|
+
auth: RpcFetchBody['auth'];
|
|
29
|
+
response: RpcResponseSuccess;
|
|
30
|
+
};
|
|
27
31
|
export declare class RpcClient {
|
|
28
32
|
private httpClient;
|
|
29
33
|
private options;
|
|
@@ -43,13 +47,9 @@ export declare class RpcClient {
|
|
|
43
47
|
}>(t: T) => void;
|
|
44
48
|
});
|
|
45
49
|
subscribe(callback: RpcCallback): void;
|
|
46
|
-
callRemoteProcedure(name: string, params: any,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}): Promise<{
|
|
50
|
-
auth: RpcFetchBody['auth'];
|
|
51
|
-
response: RpcResponseSuccess;
|
|
52
|
-
}>;
|
|
50
|
+
callRemoteProcedure(name: string, params: any, logInfo?: string): Promise<CallRemoteProcedureResult>;
|
|
51
|
+
callRemoteProcedureWithFiles(name: string, params: any, files: any, logInfo?: string): Promise<CallRemoteProcedureResult>;
|
|
52
|
+
callRemoteProcedureBase(url: string, body: any, logInfo: string): Promise<CallRemoteProcedureResult>;
|
|
53
53
|
callMany(calls: Array<{
|
|
54
54
|
name: string;
|
|
55
55
|
params?: any;
|
package/dist/rpc-client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-client.d.ts","sourceRoot":"","sources":["../src/rpc-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc-client.d.ts","sourceRoot":"","sources":["../src/rpc-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,qBAAa,YAAa,SAAQ,KAAK;IAGD,IAAI,EAAE,MAAM;IAAS,OAAO,EAAE,GAAG;IAFrE,SAAgB,KAAK,EAAE,MAAM,CAAC;gBAElB,OAAO,EAAE,MAAM,EAAS,IAAI,EAAE,MAAM,EAAS,OAAO,EAAE,GAAG;CAKtE;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,C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,EAAE,WAAW,GAAG,IAAI;IAItC,mBAAmB,CACxB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,GAAG,EACX,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,yBAAyB,CAAC;IAI9B,4BAA4B,CACjC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,GAAG,EACX,KAAK,EAAE,GAAG,EACV,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,yBAAyB,CAAC;IAW9B,uBAAuB,CAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,GAAG,EACT,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,yBAAyB,CAAC;IAe9B,QAAQ,CACb,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC,EAC5C,EAAE,OAAO,EAAE,EAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAChC,OAAO,CAAC,YAAY,CAAC;IAMxB,OAAO,CAAC,KAAK;CAmCd"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FiltersServiceClient } from '@pushwoosh/rpc-service-client/pushwoosh/FiltersServiceClientPb';
|
|
2
|
+
import { EventsServiceClient } from '@pushwoosh/rpc-service-client/pushwoosh/EventsServiceClientPb';
|
|
3
|
+
import { TagsServiceClient } from '@pushwoosh/rpc-service-client/pushwoosh/TagsServiceClientPb';
|
|
4
|
+
export declare class Rpc2Client {
|
|
5
|
+
filtersServiceClient: FiltersServiceClient;
|
|
6
|
+
eventsServiceClient: EventsServiceClient;
|
|
7
|
+
tagsServiceClient: TagsServiceClient;
|
|
8
|
+
constructor(hostname: string, getAccessToken: () => Promise<string>);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=rpc2-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc2-client.d.ts","sourceRoot":"","sources":["../src/rpc2-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gEAAgE,CAAC;AACtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,6DAA6D,CAAC;AAoBhG,qBAAa,UAAU;IACd,oBAAoB,EAAE,oBAAoB,CAAC;IAE3C,mBAAmB,EAAE,mBAAmB,CAAC;IAEzC,iBAAiB,EAAE,iBAAiB,CAAC;gBAEhC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC;CAUpE"}
|
package/package.json
CHANGED
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
"pre-commit": "check",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime-corejs3": "^7.17.2",
|
|
21
|
+
"@pushwoosh/rpc-service-client": "^0.1.8",
|
|
21
22
|
"axios": "^0.25.0",
|
|
22
23
|
"core-js": "^3.21.0",
|
|
24
|
+
"grpc-web": "^1.4.2",
|
|
23
25
|
"js-cookie": "^3.0.1",
|
|
24
26
|
"jwt-decode": "^3.1.2",
|
|
25
27
|
"lodash": "^4.17.21",
|
|
@@ -30,12 +32,13 @@
|
|
|
30
32
|
"@babel/core": "^7.17.2",
|
|
31
33
|
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
32
34
|
"@babel/preset-env": "^7.16.11",
|
|
35
|
+
"@types/google-protobuf": "^3.15.6",
|
|
33
36
|
"@types/jest": "^27.4.0",
|
|
34
37
|
"@types/lodash": "^4.14.182",
|
|
35
38
|
"@types/webpack-env": "^1.16.3",
|
|
36
39
|
"@typescript-eslint/eslint-plugin": "^5.11.0",
|
|
37
40
|
"@typescript-eslint/parser": "^5.11.0",
|
|
38
|
-
"babel-loader": "^
|
|
41
|
+
"babel-loader": "^9.1.0",
|
|
39
42
|
"clean-webpack-plugin": "^4.0.0",
|
|
40
43
|
"cross-env": "^7.0.3",
|
|
41
44
|
"dotenv": "^16.0.0",
|
|
@@ -69,5 +72,5 @@
|
|
|
69
72
|
"node": ">=16.0.0",
|
|
70
73
|
"npm": ">=7.0.0"
|
|
71
74
|
},
|
|
72
|
-
"version": "2.
|
|
75
|
+
"version": "2.4.1"
|
|
73
76
|
}
|