core-3nweb-client-lib 0.35.2 → 0.35.3
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.
|
@@ -34,7 +34,7 @@ class ConfigOfASMailServer {
|
|
|
34
34
|
getOnServer: this.serverConfig.getParam.bind(this.serverConfig),
|
|
35
35
|
setOnServer: async (param, value) => {
|
|
36
36
|
ensureParameterCanBeSetDirectly(param);
|
|
37
|
-
this.serverConfig.setParam(param, value);
|
|
37
|
+
await this.serverConfig.setParam(param, value);
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
return Object.freeze(w);
|
|
@@ -9,8 +9,7 @@ export interface ParamOnServer<P extends keyof ASMailConfigParams> {
|
|
|
9
9
|
getFromServer: () => Promise<ASMailConfigParams[P] | null>;
|
|
10
10
|
}
|
|
11
11
|
export declare class MailConfigurator extends ServiceUser {
|
|
12
|
-
|
|
13
|
-
constructor(userId: string, getSigner: IGetMailerIdSigner, mainUrlGetter: () => Promise<string>, net: NetClient, sleepMillisAfterParamSetting?: number);
|
|
12
|
+
constructor(userId: string, getSigner: IGetMailerIdSigner, mainUrlGetter: () => Promise<string>, net: NetClient);
|
|
14
13
|
getParam<P extends keyof ASMailConfigParams>(param: P): Promise<ASMailConfigParams[P] | null>;
|
|
15
14
|
setParam<P extends keyof ASMailConfigParams>(param: P, value: ASMailConfigParams[P] | null): Promise<void>;
|
|
16
15
|
makeParamSetterAndGetter<P extends keyof ASMailConfigParams>(param: P): ParamOnServer<P>;
|
|
@@ -23,16 +23,14 @@ const request_utils_1 = require("../request-utils");
|
|
|
23
23
|
const api = require("../../lib-common/service-api/asmail/config");
|
|
24
24
|
const user_with_mid_session_1 = require("../user-with-mid-session");
|
|
25
25
|
const service_locator_1 = require("../service-locator");
|
|
26
|
-
const sleep_1 = require("../../lib-common/processes/sleep");
|
|
27
26
|
const configAccessParams = {
|
|
28
27
|
login: api.midLogin.MID_URL_PART,
|
|
29
28
|
logout: api.closeSession.URL_END,
|
|
30
29
|
canBeRedirected: true
|
|
31
30
|
};
|
|
32
31
|
class MailConfigurator extends user_with_mid_session_1.ServiceUser {
|
|
33
|
-
constructor(userId, getSigner, mainUrlGetter, net
|
|
32
|
+
constructor(userId, getSigner, mainUrlGetter, net) {
|
|
34
33
|
super(userId, configAccessParams, getSigner, serviceUriGetter(net, mainUrlGetter), net);
|
|
35
|
-
this.sleepMillisAfterParamSetting = sleepMillisAfterParamSetting;
|
|
36
34
|
Object.seal(this);
|
|
37
35
|
}
|
|
38
36
|
async getParam(param) {
|
|
@@ -56,8 +54,6 @@ class MailConfigurator extends user_with_mid_session_1.ServiceUser {
|
|
|
56
54
|
if (rep.status !== api.PARAM_SC.ok) {
|
|
57
55
|
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|
|
58
56
|
}
|
|
59
|
-
// wait to let possibly distributed system to propagate updates internally
|
|
60
|
-
await (0, sleep_1.sleep)(this.sleepMillisAfterParamSetting);
|
|
61
57
|
}
|
|
62
58
|
makeParamSetterAndGetter(param) {
|
|
63
59
|
return {
|