@zeniai/client-epic-state 4.19.67-betaRR0 → 4.19.67
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/lib/esm/init.js +2 -5
- package/lib/init.d.ts +1 -2
- package/lib/init.js +3 -6
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/package.json +1 -1
package/lib/esm/init.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Pusher from 'pusher-js
|
|
1
|
+
import Pusher from 'pusher-js';
|
|
2
2
|
import configureNewStore from './configureStore';
|
|
3
3
|
import { ZeniAPIClient } from './zeniAPI';
|
|
4
4
|
export let zeniAPI;
|
|
@@ -64,10 +64,7 @@ const customHandler = async (params, headers, callback) => {
|
|
|
64
64
|
.toPromise()
|
|
65
65
|
.then((response) => {
|
|
66
66
|
if (response.data != null) {
|
|
67
|
-
callback(null, {
|
|
68
|
-
auth: response.data.auth,
|
|
69
|
-
shared_secret: response.data.shared_secret,
|
|
70
|
-
});
|
|
67
|
+
callback(null, { auth: response.data.auth });
|
|
71
68
|
isPusherInitialized = true;
|
|
72
69
|
}
|
|
73
70
|
})
|
package/lib/init.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Pusher, { Options } from 'pusher-js
|
|
1
|
+
import Pusher, { Options } from 'pusher-js';
|
|
2
2
|
import { Store } from 'redux';
|
|
3
3
|
import { ID } from './commonStateTypes/common';
|
|
4
4
|
import { RootState } from './reducer';
|
|
@@ -16,7 +16,6 @@ declare let pusher: Pusher;
|
|
|
16
16
|
export default function initialize(restEndPoints: RESTAPIEndpoints, userId?: string, sessionId?: string, tenantId?: string, isSandboxEnv?: boolean, onSessionInvalidated?: () => void): ZeniStore;
|
|
17
17
|
export interface PusherAuthPayload {
|
|
18
18
|
auth: ID;
|
|
19
|
-
shared_secret: ID;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* Call initializePusher before using pusher in web-app
|
package/lib/init.js
CHANGED
|
@@ -44,7 +44,7 @@ exports.updateZeniAPIClientConfig = updateZeniAPIClientConfig;
|
|
|
44
44
|
exports.zeniAPIClientConfig = zeniAPIClientConfig;
|
|
45
45
|
exports.initializeWithNewStore = initializeWithNewStore;
|
|
46
46
|
exports.initialize3rdPartyExtensions = initialize3rdPartyExtensions;
|
|
47
|
-
const
|
|
47
|
+
const pusher_js_1 = __importDefault(require("pusher-js"));
|
|
48
48
|
const configureStore_1 = __importDefault(require("./configureStore"));
|
|
49
49
|
const zeniAPI_1 = require("./zeniAPI");
|
|
50
50
|
let pusher;
|
|
@@ -83,7 +83,7 @@ function initializePusher(pusherClientSecret, options, headers, reInitialize = f
|
|
|
83
83
|
return pusher;
|
|
84
84
|
}
|
|
85
85
|
const endpoint = `${exports.zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/notifications/push_notification/auth`;
|
|
86
|
-
exports.pusher = pusher = new
|
|
86
|
+
exports.pusher = pusher = new pusher_js_1.default(pusherClientSecret, {
|
|
87
87
|
...options,
|
|
88
88
|
channelAuthorization: {
|
|
89
89
|
endpoint,
|
|
@@ -108,10 +108,7 @@ const customHandler = async (params, headers, callback) => {
|
|
|
108
108
|
.toPromise()
|
|
109
109
|
.then((response) => {
|
|
110
110
|
if (response.data != null) {
|
|
111
|
-
callback(null, {
|
|
112
|
-
auth: response.data.auth,
|
|
113
|
-
shared_secret: response.data.shared_secret,
|
|
114
|
-
});
|
|
111
|
+
callback(null, { auth: response.data.auth });
|
|
115
112
|
isPusherInitialized = true;
|
|
116
113
|
}
|
|
117
114
|
})
|