@agendize/js-agendize-api 1.41.0 → 1.41.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/agendizeApi.d.ts +5 -3
- package/dist/data/Account.d.ts +2 -0
- package/dist/js-agendize-api.es.js +31 -27
- package/dist/repository/index.d.ts +2 -1
- package/dist/repository/secured/serviceSecuredRepository.d.ts +3 -3
- package/dist/service/secured/serviceSecuredService.d.ts +2 -2
- package/package.json +1 -1
package/dist/agendizeApi.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ export interface ApiOptions {
|
|
|
87
87
|
widgetBaseURL: string;
|
|
88
88
|
clientId: string;
|
|
89
89
|
logger?: Logger;
|
|
90
|
+
debug?: boolean;
|
|
90
91
|
}
|
|
91
92
|
export declare class AgendizeApi {
|
|
92
93
|
private authenticationService;
|
|
@@ -181,11 +182,12 @@ export declare class AgendizeApi {
|
|
|
181
182
|
private formIdsAccount;
|
|
182
183
|
private queueIdsAccount;
|
|
183
184
|
private logger?;
|
|
185
|
+
private debug?;
|
|
184
186
|
private baseURL;
|
|
185
187
|
private widgetBaseUrl;
|
|
186
188
|
private clientId;
|
|
187
189
|
private bearer;
|
|
188
|
-
constructor({ baseURL, widgetBaseURL, clientId, logger }: ApiOptions);
|
|
190
|
+
constructor({ baseURL, widgetBaseURL, clientId, logger, debug }: ApiOptions);
|
|
189
191
|
getBaseURL(): string;
|
|
190
192
|
getWidgetBaseURL(): string;
|
|
191
193
|
isAuthenticated(): boolean;
|
|
@@ -267,12 +269,12 @@ export declare class AgendizeApi {
|
|
|
267
269
|
local: boolean;
|
|
268
270
|
}>;
|
|
269
271
|
deleteStaff(organisation: string, companyId: string, staffId: string): Promise<void>;
|
|
270
|
-
getAllServices(companyId: string, account?: string,
|
|
272
|
+
getAllServices(companyId: string, account?: string, showDeletedDeployment?: boolean, mode?: QUERY_TYPE): Promise<{
|
|
271
273
|
results: ServiceEntity[] | undefined;
|
|
272
274
|
local: boolean;
|
|
273
275
|
}>;
|
|
274
276
|
getAllServicesAndGroups(accountId?: string, filterOptions?: ServicesFilterOptions): Promise<ServicesListEntity | undefined>;
|
|
275
|
-
getServiceById(companyId: string, serviceId: string, account?: string,
|
|
277
|
+
getServiceById(companyId: string, serviceId: string, account?: string, showDeletedDeployment?: boolean, mode?: QUERY_TYPE): Promise<{
|
|
276
278
|
result: ServiceEntity | undefined;
|
|
277
279
|
local: boolean;
|
|
278
280
|
}>;
|
package/dist/data/Account.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ export declare class AccountSecuredEntity extends SecuredBodyEntity {
|
|
|
91
91
|
userDomain?: string;
|
|
92
92
|
userWidgetDomain: string;
|
|
93
93
|
languageVariant?: string;
|
|
94
|
+
appointmentPanelVersion?: string;
|
|
94
95
|
acls?: AclEntity[];
|
|
95
96
|
profileSettings?: ProfileSettingsEntity;
|
|
96
97
|
calendarSettings?: CalendarSettingsEntity;
|
|
@@ -157,6 +158,7 @@ export declare class AccountDto {
|
|
|
157
158
|
userDomain?: string;
|
|
158
159
|
userWidgetDomain?: string;
|
|
159
160
|
languageVariant?: string;
|
|
161
|
+
appointmentPanelVersion?: string;
|
|
160
162
|
picture?: ImageEntity;
|
|
161
163
|
profileSettings?: {
|
|
162
164
|
country?: string;
|
|
@@ -8772,6 +8772,7 @@ class Hr extends st {
|
|
|
8772
8772
|
a(this, "userDomain");
|
|
8773
8773
|
a(this, "userWidgetDomain");
|
|
8774
8774
|
a(this, "languageVariant");
|
|
8775
|
+
a(this, "appointmentPanelVersion");
|
|
8775
8776
|
a(this, "acls");
|
|
8776
8777
|
a(this, "profileSettings");
|
|
8777
8778
|
a(this, "calendarSettings");
|
|
@@ -8784,7 +8785,7 @@ class Hr extends st {
|
|
|
8784
8785
|
static fromAccountDto(e) {
|
|
8785
8786
|
var n, i, o;
|
|
8786
8787
|
const r = new Hr();
|
|
8787
|
-
if (r.id = e.id, r.firstName = sr(e.firstName), r.lastName = sr(e.lastName), r.email = e.email, r.userDomain = ((n = e.userDomain) == null ? void 0 : n.replace("http://", "https://")) ?? "", r.userWidgetDomain = ((i = e.userWidgetDomain) == null ? void 0 : i.replace("http://", "https://")) ?? "", r.languageVariant = e.languageVariant, r.picture = Ie.fromImageDto(e.picture), e.profileSettings) {
|
|
8788
|
+
if (r.id = e.id, r.firstName = sr(e.firstName), r.lastName = sr(e.lastName), r.email = e.email, r.userDomain = ((n = e.userDomain) == null ? void 0 : n.replace("http://", "https://")) ?? "", r.userWidgetDomain = ((i = e.userWidgetDomain) == null ? void 0 : i.replace("http://", "https://")) ?? "", r.languageVariant = e.languageVariant, r.appointmentPanelVersion = e.appointmentPanelVersion, r.picture = Ie.fromImageDto(e.picture), e.profileSettings) {
|
|
8788
8789
|
const c = new Bf();
|
|
8789
8790
|
c.locale = e.profileSettings.language, c.timeZone = e.profileSettings.timeZone, c.country = e.profileSettings.country, c.defaultAccount = e.profileSettings.defaultAccount, c.homePage = e.profileSettings.homePage, c.accountName = e.profileSettings.accountName, c.betaNh = e.profileSettings.betaNh, c.hasSyncModule = e.profileSettings.hasSyncModule, c.externalLinks = e.profileSettings.externalLinks, c.realm = e.profileSettings.realm, c.hasVisio = e.profileSettings.hasVisio, c.onlyOwnedNotification = e.profileSettings.onlyOwnedNotification, r.profileSettings = c;
|
|
8790
8791
|
}
|
|
@@ -8846,7 +8847,7 @@ class Hr extends st {
|
|
|
8846
8847
|
static toAccountDto2(e) {
|
|
8847
8848
|
var n, i, o, c, l, u, d, f, h, m, y, x, p, w, g;
|
|
8848
8849
|
const r = new Ff();
|
|
8849
|
-
return r.id = e.id, r.firstName = sr(e.firstName), r.lastName = sr(e.lastName), r.email = e.email, e.userDomain !== "" && (r.userDomain = e.userDomain), r.languageVariant = e.languageVariant, e.userWidgetDomain !== "" && (r.userWidgetDomain = e.userWidgetDomain), r.picture = Ie.toImageDto(e.picture), e.profileSettings && (r.profileSettings = {
|
|
8850
|
+
return r.id = e.id, r.firstName = sr(e.firstName), r.lastName = sr(e.lastName), r.email = e.email, e.userDomain !== "" && (r.userDomain = e.userDomain), r.languageVariant = e.languageVariant, r.appointmentPanelVersion = e.appointmentPanelVersion, e.userWidgetDomain !== "" && (r.userWidgetDomain = e.userWidgetDomain), r.picture = Ie.toImageDto(e.picture), e.profileSettings && (r.profileSettings = {
|
|
8850
8851
|
language: (n = e.profileSettings) == null ? void 0 : n.locale,
|
|
8851
8852
|
timeZone: (i = e.profileSettings) == null ? void 0 : i.timeZone,
|
|
8852
8853
|
country: (o = e.profileSettings) == null ? void 0 : o.country,
|
|
@@ -8935,6 +8936,7 @@ class Ff {
|
|
|
8935
8936
|
a(this, "userDomain");
|
|
8936
8937
|
a(this, "userWidgetDomain");
|
|
8937
8938
|
a(this, "languageVariant");
|
|
8939
|
+
a(this, "appointmentPanelVersion");
|
|
8938
8940
|
a(this, "picture");
|
|
8939
8941
|
a(this, "profileSettings");
|
|
8940
8942
|
a(this, "calendarSettings");
|
|
@@ -13765,11 +13767,12 @@ new z.Channel();
|
|
|
13765
13767
|
const ei = new z.Channel(), ti = new z.Channel();
|
|
13766
13768
|
new z.Channel();
|
|
13767
13769
|
const Ql = new z.Channel(), Sn = class Sn {
|
|
13768
|
-
constructor(t, e, r) {
|
|
13770
|
+
constructor(t, e, r, n) {
|
|
13769
13771
|
a(this, "repositoryName");
|
|
13770
13772
|
a(this, "logger");
|
|
13773
|
+
a(this, "debug");
|
|
13771
13774
|
a(this, "cacheDuration");
|
|
13772
|
-
this.logger = e, this.repositoryName = t, this.cacheDuration = r;
|
|
13775
|
+
this.logger = e, this.repositoryName = t, this.cacheDuration = r, this.debug = n;
|
|
13773
13776
|
}
|
|
13774
13777
|
static cleanLastRemoteList() {
|
|
13775
13778
|
Sn.lastRemoteList = {};
|
|
@@ -13784,7 +13787,7 @@ const Ql = new z.Channel(), Sn = class Sn {
|
|
|
13784
13787
|
case 0:
|
|
13785
13788
|
return this._listRemoteFirstThenLocal(t, r);
|
|
13786
13789
|
case 1:
|
|
13787
|
-
return this._isExpired(Sn.lastRemoteList[this.repositoryName]) ? ((o = this.logger) == null || o.fine("js-agendize-api", "LocalThenRemote has expired => execute RemoteThenLocal instead"), this._listRemoteFirstThenLocal(t, r)) : this._listLocalFirstThenRemote(t, r);
|
|
13790
|
+
return this._isExpired(Sn.lastRemoteList[this.repositoryName]) ? (this.debug && ((o = this.logger) == null || o.fine("js-agendize-api", "LocalThenRemote has expired => execute RemoteThenLocal instead")), this._listRemoteFirstThenLocal(t, r)) : this._listLocalFirstThenRemote(t, r);
|
|
13788
13791
|
case 2:
|
|
13789
13792
|
return i = await this.localList(r), { local: !0, results: i };
|
|
13790
13793
|
case 3:
|
|
@@ -13825,7 +13828,7 @@ const Ql = new z.Channel(), Sn = class Sn {
|
|
|
13825
13828
|
try {
|
|
13826
13829
|
await this.localSave(r, o);
|
|
13827
13830
|
} catch (f) {
|
|
13828
|
-
(c = this.logger) == null || c.debug("js-agendize-api", "Failed to save local after REMOTE_ONLY", f);
|
|
13831
|
+
this.debug && ((c = this.logger) == null || c.debug("js-agendize-api", "Failed to save local after REMOTE_ONLY", f));
|
|
13829
13832
|
}
|
|
13830
13833
|
break;
|
|
13831
13834
|
case 2:
|
|
@@ -13837,7 +13840,7 @@ const Ql = new z.Channel(), Sn = class Sn {
|
|
|
13837
13840
|
} catch (f) {
|
|
13838
13841
|
(l = this.logger) == null || l.debug("js-agendize-api", "LocalThenRemote localGet error", f);
|
|
13839
13842
|
}
|
|
13840
|
-
return !o || !o.lastRemote || this._isExpired(o.lastRemote) ? ((u = this.logger) == null || u.fine("js-agendize-api", "LocalThenRemote has expired => execute RemoteThenLocal instead"), this._getRemoteFirstThenLocal(t, r)) : this._getLocalFirstThenRemote(t, r);
|
|
13843
|
+
return !o || !o.lastRemote || this._isExpired(o.lastRemote) ? (this.debug && ((u = this.logger) == null || u.fine("js-agendize-api", "LocalThenRemote has expired => execute RemoteThenLocal instead")), this._getRemoteFirstThenLocal(t, r)) : this._getLocalFirstThenRemote(t, r);
|
|
13841
13844
|
default:
|
|
13842
13845
|
throw new Error("Not implemented");
|
|
13843
13846
|
}
|
|
@@ -13865,14 +13868,14 @@ const Ql = new z.Channel(), Sn = class Sn {
|
|
|
13865
13868
|
try {
|
|
13866
13869
|
r = await this.localGet(e);
|
|
13867
13870
|
} catch (c) {
|
|
13868
|
-
(i = this.logger) == null || i.debug("js-agendize-api", `Get ${this.repositoryName} local failed: `, c);
|
|
13871
|
+
this.debug && ((i = this.logger) == null || i.debug("js-agendize-api", `Get ${this.repositoryName} local failed: `, c));
|
|
13869
13872
|
}
|
|
13870
13873
|
if (!r) {
|
|
13871
13874
|
n = !1;
|
|
13872
13875
|
try {
|
|
13873
13876
|
r = await this.remoteGet(t, e), await this.localSave(e, r);
|
|
13874
13877
|
} catch (c) {
|
|
13875
|
-
throw (o = this.logger) == null || o.error("js-agendize-api", `Get ${this.repositoryName} local then remote failed: `, c), this.getError(c);
|
|
13878
|
+
throw this.debug && ((o = this.logger) == null || o.error("js-agendize-api", `Get ${this.repositoryName} local then remote failed: `, c)), this.getError(c);
|
|
13876
13879
|
}
|
|
13877
13880
|
}
|
|
13878
13881
|
return { result: r, local: n };
|
|
@@ -13883,12 +13886,12 @@ const Ql = new z.Channel(), Sn = class Sn {
|
|
|
13883
13886
|
try {
|
|
13884
13887
|
r = await this.remoteGet(t, e), await this.localSave(e, r);
|
|
13885
13888
|
} catch (c) {
|
|
13886
|
-
n = !0, (i = this.logger) == null || i.warn("js-agendize-api", `Get ${this.repositoryName} remote failed: `, c);
|
|
13889
|
+
n = !0, this.debug && ((i = this.logger) == null || i.warn("js-agendize-api", `Get ${this.repositoryName} remote failed: `, c));
|
|
13887
13890
|
try {
|
|
13888
13891
|
if (r = await this.localGet(e), r === void 0)
|
|
13889
13892
|
throw c;
|
|
13890
13893
|
} catch (l) {
|
|
13891
|
-
throw (o = this.logger) == null || o.error("js-agendize-api", `Get ${this.repositoryName} remote then local failed: `, l), this.getError(l);
|
|
13894
|
+
throw this.debug && ((o = this.logger) == null || o.error("js-agendize-api", `Get ${this.repositoryName} remote then local failed: `, l)), this.getError(l);
|
|
13892
13895
|
}
|
|
13893
13896
|
}
|
|
13894
13897
|
return {
|
|
@@ -13902,12 +13905,12 @@ const Ql = new z.Channel(), Sn = class Sn {
|
|
|
13902
13905
|
try {
|
|
13903
13906
|
r = await this.remoteList(t, e), await this.localSaveList(e, r);
|
|
13904
13907
|
} catch (c) {
|
|
13905
|
-
n = !0, (i = this.logger) == null || i.warn("js-agendize-api", `Get ${this.repositoryName} remote failed: `, c);
|
|
13908
|
+
n = !0, this.debug && ((i = this.logger) == null || i.warn("js-agendize-api", `Get ${this.repositoryName} remote failed: `, c));
|
|
13906
13909
|
try {
|
|
13907
13910
|
if (r = await this.localList(e), r === void 0 || r.length === 0)
|
|
13908
13911
|
throw c;
|
|
13909
13912
|
} catch (l) {
|
|
13910
|
-
throw (o = this.logger) == null || o.error("js-agendize-api", `List ${this.repositoryName} remote then local failed: `, l), this.getError(l);
|
|
13913
|
+
throw this.debug && ((o = this.logger) == null || o.error("js-agendize-api", `List ${this.repositoryName} remote then local failed: `, l)), this.getError(l);
|
|
13911
13914
|
}
|
|
13912
13915
|
}
|
|
13913
13916
|
return {
|
|
@@ -13921,14 +13924,14 @@ const Ql = new z.Channel(), Sn = class Sn {
|
|
|
13921
13924
|
try {
|
|
13922
13925
|
r = await this.localList(e);
|
|
13923
13926
|
} catch (c) {
|
|
13924
|
-
(i = this.logger) == null || i.debug("js-agendize-api", `Get ${this.repositoryName} local failed: `, c);
|
|
13927
|
+
this.debug && ((i = this.logger) == null || i.debug("js-agendize-api", `Get ${this.repositoryName} local failed: `, c));
|
|
13925
13928
|
}
|
|
13926
13929
|
if (r === void 0 || r.length === 0) {
|
|
13927
13930
|
n = !1;
|
|
13928
13931
|
try {
|
|
13929
13932
|
r = await this.remoteList(t, e), await this.localSaveList(e, r);
|
|
13930
13933
|
} catch (c) {
|
|
13931
|
-
throw (o = this.logger) == null || o.error("js-agendize-api", `List ${this.repositoryName} local then remote failed: `, c), this.getError(c);
|
|
13934
|
+
throw this.debug && ((o = this.logger) == null || o.error("js-agendize-api", `List ${this.repositoryName} local then remote failed: `, c)), this.getError(c);
|
|
13932
13935
|
}
|
|
13933
13936
|
}
|
|
13934
13937
|
return {
|
|
@@ -13942,7 +13945,7 @@ const Ql = new z.Channel(), Sn = class Sn {
|
|
|
13942
13945
|
try {
|
|
13943
13946
|
n = await this.remoteCreate(t, e, r), await this.localSave(e, n);
|
|
13944
13947
|
} catch (o) {
|
|
13945
|
-
throw (i = this.logger) == null || i.error("js-agendize-api", `Create ${this.repositoryName} remote then local failed: `, o), this.getError(o);
|
|
13948
|
+
throw this.debug && ((i = this.logger) == null || i.error("js-agendize-api", `Create ${this.repositoryName} remote then local failed: `, o)), this.getError(o);
|
|
13946
13949
|
}
|
|
13947
13950
|
return n;
|
|
13948
13951
|
}
|
|
@@ -13952,7 +13955,7 @@ const Ql = new z.Channel(), Sn = class Sn {
|
|
|
13952
13955
|
try {
|
|
13953
13956
|
n = await this.remoteUpdate(t, e, r), await this.localSave(e, n);
|
|
13954
13957
|
} catch (o) {
|
|
13955
|
-
throw (i = this.logger) == null || i.error("js-agendize-api", `Update ${this.repositoryName} remote then local failed: `, o), this.getError(o);
|
|
13958
|
+
throw this.debug && ((i = this.logger) == null || i.error("js-agendize-api", `Update ${this.repositoryName} remote then local failed: `, o)), this.getError(o);
|
|
13956
13959
|
}
|
|
13957
13960
|
return n;
|
|
13958
13961
|
}
|
|
@@ -18585,7 +18588,7 @@ Ni = Md([
|
|
|
18585
18588
|
class mR extends Y {
|
|
18586
18589
|
async getAllServices(t, e, r, n) {
|
|
18587
18590
|
const i = this.getAxiosConfig(t, e);
|
|
18588
|
-
n && (i.params.
|
|
18591
|
+
n && (i.params.showDeletedDeployment = n);
|
|
18589
18592
|
const o = this.instance.get(`/api/2.1/scheduling/companies/${r}/services`, i);
|
|
18590
18593
|
if (o !== null)
|
|
18591
18594
|
try {
|
|
@@ -18599,7 +18602,7 @@ class mR extends Y {
|
|
|
18599
18602
|
async getById(t, e, r, n, i) {
|
|
18600
18603
|
let o = `/api/2.1/scheduling/companies/${r}/services/${n}`;
|
|
18601
18604
|
const c = this.getAxiosConfig(t, e);
|
|
18602
|
-
i && (c.params.
|
|
18605
|
+
i && (c.params.showDeletedDeployment = i);
|
|
18603
18606
|
const l = this.instance.get(o, c);
|
|
18604
18607
|
if (l !== null)
|
|
18605
18608
|
return l;
|
|
@@ -18739,10 +18742,10 @@ let _i = class extends Z {
|
|
|
18739
18742
|
}) : r === ft && await this.cascadeDelete({ account: t.organisation, companyId: t.companyId }, () => !0);
|
|
18740
18743
|
}
|
|
18741
18744
|
async getAllServices(t, e, r, n, i = N.LOCAL_THEN_REMOTE) {
|
|
18742
|
-
return this.list(t, i, { account: e, companyId: r,
|
|
18745
|
+
return this.list(t, i, { account: e, companyId: r, showDeletedDeployment: n });
|
|
18743
18746
|
}
|
|
18744
18747
|
async getService(t, e, r, n, i, o = N.LOCAL_THEN_REMOTE) {
|
|
18745
|
-
return this.getById(t, o, { account: e, companyId: r, serviceId: n,
|
|
18748
|
+
return this.getById(t, o, { account: e, companyId: r, serviceId: n, showDeletedDeployment: i });
|
|
18746
18749
|
}
|
|
18747
18750
|
async createService(t, e, r, n) {
|
|
18748
18751
|
const i = await super.create(t, N.REMOTE_THEN_LOCAL, {
|
|
@@ -18763,11 +18766,11 @@ let _i = class extends Z {
|
|
|
18763
18766
|
await this.deleteById(t, { account: e, companyId: r, serviceId: n }), Wr.publish(ne.DELETE, { account: e, companyId: r, serviceId: n });
|
|
18764
18767
|
}
|
|
18765
18768
|
async remoteList(t, e) {
|
|
18766
|
-
return (await this.serviceService.getAllServices(t, e.account, e.companyId, e.
|
|
18769
|
+
return (await this.serviceService.getAllServices(t, e.account, e.companyId, e.showDeletedDeployment)).map((n) => Er.fromServiceDto(n));
|
|
18767
18770
|
}
|
|
18768
18771
|
async remoteGet(t, e) {
|
|
18769
18772
|
this.checkNullable(e);
|
|
18770
|
-
const r = await this.serviceService.getById(t, e.account, e.companyId, e.serviceId, e.
|
|
18773
|
+
const r = await this.serviceService.getById(t, e.account, e.companyId, e.serviceId, e.showDeletedDeployment ?? !1);
|
|
18771
18774
|
return Er.fromServiceDto(r);
|
|
18772
18775
|
}
|
|
18773
18776
|
async remoteCreate(t, e, r) {
|
|
@@ -18784,7 +18787,7 @@ let _i = class extends Z {
|
|
|
18784
18787
|
}
|
|
18785
18788
|
async localList(t) {
|
|
18786
18789
|
let e = await this.serviceDb.getAllServices(t.companyId);
|
|
18787
|
-
if (!t.
|
|
18790
|
+
if (!t.showDeletedDeployment)
|
|
18788
18791
|
try {
|
|
18789
18792
|
e = e.filter((r) => r.availability !== "waitDelete");
|
|
18790
18793
|
} catch {
|
|
@@ -18794,7 +18797,7 @@ let _i = class extends Z {
|
|
|
18794
18797
|
async localGet(t) {
|
|
18795
18798
|
this.checkNullable(t);
|
|
18796
18799
|
const e = await this.serviceDb.getById(t.companyId, t.serviceId);
|
|
18797
|
-
if (!t.
|
|
18800
|
+
if (!t.showDeletedDeployment && e.availability === "waitDelete")
|
|
18798
18801
|
throw new kr(`service ${t.companyId}-${t.serviceId}`);
|
|
18799
18802
|
return this.serviceDb.getById(t.companyId, t.serviceId);
|
|
18800
18803
|
}
|
|
@@ -32459,7 +32462,7 @@ Uo = By([
|
|
|
32459
32462
|
z.Subscriber({ channel: ft })
|
|
32460
32463
|
], Uo);
|
|
32461
32464
|
class F_ {
|
|
32462
|
-
constructor({ baseURL: t, widgetBaseURL: e, clientId: r, logger: n }) {
|
|
32465
|
+
constructor({ baseURL: t, widgetBaseURL: e, clientId: r, logger: n, debug: i }) {
|
|
32463
32466
|
a(this, "authenticationService");
|
|
32464
32467
|
a(this, "accountSecuredService");
|
|
32465
32468
|
a(this, "batchService");
|
|
@@ -32552,11 +32555,12 @@ class F_ {
|
|
|
32552
32555
|
a(this, "formIdsAccount", {});
|
|
32553
32556
|
a(this, "queueIdsAccount", {});
|
|
32554
32557
|
a(this, "logger");
|
|
32558
|
+
a(this, "debug");
|
|
32555
32559
|
a(this, "baseURL");
|
|
32556
32560
|
a(this, "widgetBaseUrl");
|
|
32557
32561
|
a(this, "clientId");
|
|
32558
32562
|
a(this, "bearer");
|
|
32559
|
-
this.baseURL = t, this.widgetBaseUrl = e, this.clientId = r, this.logger = n, this.initIndexedDb(), this.authenticationService = new XA(this.indexedDb, t, this.clientId, this.logger), this.accountSecuredService = new Ey(t, this.authenticationService, this.logger), this.availabilityPublicRepository = new LN(e, this.logger), this.availabilitySecuredRepository = new BN(this.authenticationService, this.indexedDb, t, this.logger), this.batchService = new VC(t, this.authenticationService, this.logger), this.freeStaffService = new zI(t, this.authenticationService, this.logger), this.accountSecuredRepository = new z1(this.authenticationService, this.indexedDb, t, this.logger), this.accountPublicRepository = new vN(e, this.logger), this.calendarSecuredRepository = new Bo(this.authenticationService, this.indexedDb, t, this.logger), this.companySecuredRepository = new uR(this.authenticationService, this.indexedDb, t, this.logger), this.companyPublicRepository = new YI(e, this.logger), this.serviceSecuredRepository = new _i(this.authenticationService, this.indexedDb, t, this.logger), this.servicePublicRepository = new QI(e, this.logger), this.staffSecuredRepository = new Ni(this.authenticationService, this.indexedDb, t, this.logger), this.staffPublicRepository = new XI(this.baseURL, this.logger), this.staffGroupPublicRepository = new tN(this.baseURL, this.logger), this.contactSecuredRepository = new Lo(this.authenticationService, this.indexedDb, t, this.logger), this.externalContactSecuredRepository = new lI(this.authenticationService, t, this.logger), this.externalEventSecuredRepository = new Ti(this.authenticationService, this.indexedDb, t, this.logger), this.icsEventSecuredRepository = new NR(this.authenticationService, this.indexedDb, t, this.logger), this.eventSecuredRepository = new Oi(this.authenticationService, this.batchService, this.indexedDb, t, this.logger), this.eventPublicRepository = new wN(t, this.logger), this.userSecuredRepository = new du(this.authenticationService, this.indexedDb, t, this.logger), this.userDefaultSecuredRepository = new mu(this.authenticationService, this.indexedDb, t, this.logger), this.widgetFormSecuredRepository = new SR(this.authenticationService, this.indexedDb, t, this.logger), this.formBuilderSecuredRepository = new D1(this.authenticationService, this.indexedDb, t, this.logger), this.formPublicRepository = new fN(this.widgetBaseUrl, this.logger), this.freeSlotSecuredRepository = new t1(this.authenticationService, this.indexedDb, t, this.logger), this.freeSlotPublicRepository = new DN(this.widgetBaseUrl, this.logger), this.planningSecuredRepository = new eC(this.authenticationService, this.indexedDb, t, this.logger), this.privacyPolicySecuredRepository = new s1(this.authenticationService, this.indexedDb, t, this.logger), this.promoteFieldSecuredRepository = new j1(this.authenticationService, this.indexedDb, t, this.logger), this.serviceGroupSecuredRepository = new ki(this.authenticationService, this.indexedDb, t, this.logger), this.serviceResourceSecuredRepository = new Li(this.authenticationService, this.indexedDb, t, this.logger), this.staffGroupSecuredRepository = new Bi(this.authenticationService, this.indexedDb, t, this.logger), this.staffFormsSecuredRepository = new m1(this.authenticationService, this.indexedDb, t, this.logger), this.rightsSecuredRepository = new y1(this.authenticationService, this.indexedDb, t, this.logger), this.schedulingRightsSecuredRepository = new oC(this.authenticationService, t, this.logger), this.activitySecuredRepository = new v1(this.authenticationService, this.indexedDb, t, this.logger), this.noteSecuredRepository = new E1(this.authenticationService, this.indexedDb, t, this.logger), this.notificationStatusSecuredRepository = new sy(this.indexedDb, this.logger), this.queueSecuredRepository = new C1(this.authenticationService, this.indexedDb, t, this.logger), this.queuePublicRepository = new nN(this.widgetBaseUrl, this.logger), this.queueRegistrationSecuredRepository = new k1(this.authenticationService, this.indexedDb, t, this.logger), this.queueRegistrationPublicRepository = new iN(this.widgetBaseUrl, this.logger), this.formResultSecuredRepository = new N1(this.authenticationService, this.indexedDb, t, this.logger), this.formResultStatusSecuredRepository = new T1(this.authenticationService, this.indexedDb, t, this.logger), this.tagSecuredRepository = new L1(this.authenticationService, this.indexedDb, t, this.logger), this.additionalFieldsSecuredRepository = new M1(this.authenticationService, this.indexedDb, t, this.logger), this.widgetUrlCipherSecuredRepository = new W1(this.authenticationService, this.indexedDb, t, this.logger), this.reportingSecuredRepository = new Y1(this.authenticationService, this.indexedDb, t, this.logger), this.companyPerformanceSecuredRepository = new Q1(this.authenticationService, t, this.logger), this.scheduleSecuredRepository = new rC(this.authenticationService, t, this.logger), this.exportCalendarSecuredRepository = new nC(this.authenticationService, t, this.logger), this.exportAppointmentsSecuredRepository = new iC(this.authenticationService, t, this.logger), this.notificationSecuredRepository = new hC(this.authenticationService, this.indexedDb, t, this.logger), this.logSecuredRepository = new uC(this.authenticationService, this.indexedDb, t, this.logger), this.workingPlanningSecuredRepository = new hu(this.authenticationService, t, this.logger), this.changelogSecuredRepository = new vC(this.authenticationService, t, this.logger), this.shortenerSecuredRepository = new DC(this.authenticationService, t, this.logger), this.conferenceSecuredRepository = new Po(this.authenticationService, this.indexedDb, t, this.logger), this.conferencePublicRepository = new yN(this.authenticationService, t, this.logger), this.conferenceSpeakerSecuredRepository = new kC(this.authenticationService, this.batchService, this.indexedDb, t, this.logger), this.conferenceInviteeSecuredRepository = new FC(this.authenticationService, this.indexedDb, t, this.logger), this.customStatusSecuredRepository = new CC(this.authenticationService, this.indexedDb, t, this.logger), this.customStatusPublicRepository = new SN(t, this.logger), this.conferenceSessionSecuredRepository = new UC(this.authenticationService, this.indexedDb, t, this.logger), this.conferenceSessionPublicRepository = new uN(this.authenticationService, t, this.logger), this.conferenceRegistrationSecuredRepository = new WC(this.authenticationService, this.indexedDb, t, this.logger), this.conferenceRegistrationPublicRepository = new mN(this.authenticationService, t, this.logger), this.conferenceTagSecuredRepository = new jC(this.authenticationService, this.indexedDb, t, this.logger), this.widgetPublicRepository = new cN(this.authenticationService, t, this.logger), this.userDirectorySecuredRepository = new YC(this.authenticationService, this.indexedDb, t, this.logger), this.shortPollingNotificationSecuredRepository = new QC(this.authenticationService, this.indexedDb, t, this.logger), this.settingsSecuredRepository = new eI(this.authenticationService, this.indexedDb, t, this.logger), this.integrationsSecuredRepository = new rI(this.authenticationService, t, this.logger), this.connectorsSecuredRepository = new sI(this.authenticationService, t, this.logger), this.dashboardSecuredRepository = new jI(this.authenticationService, this.indexedDb, t, this.logger), this.dashboardStructureSecuredRepository = new oI(this.authenticationService, this.indexedDb, t, this.logger), this.crmSettingsSecuredRepository = new fI(this.authenticationService, this.indexedDb, t, this.logger), this.companySettingsSecuredRepository = new CN(this.authenticationService, this.indexedDb, t, this.logger), this.permissionsSecuredRepository = new NN(this.authenticationService, this.indexedDb, t, this.logger), this.shareLinkSecuredRepository = new TN(this.authenticationService, t, this.logger), this.clientMessageSecuredRepository = new PN(this.authenticationService, this.indexedDb, t, this.logger), this.appointmentAttendeeSecuredRepository = new ky(this.authenticationService, t, this.logger), this.staffActionsSecuredRepository = new GN(this.authenticationService, t, this.logger), this.vacationSecuredRepository = new Uo(this.authenticationService, this.indexedDb, t, this.logger);
|
|
32563
|
+
this.baseURL = t, this.widgetBaseUrl = e, this.clientId = r, this.logger = n, this.debug = i, this.initIndexedDb(), this.authenticationService = new XA(this.indexedDb, t, this.clientId, this.logger), this.accountSecuredService = new Ey(t, this.authenticationService, this.logger), this.availabilityPublicRepository = new LN(e, this.logger), this.availabilitySecuredRepository = new BN(this.authenticationService, this.indexedDb, t, this.logger), this.batchService = new VC(t, this.authenticationService, this.logger), this.freeStaffService = new zI(t, this.authenticationService, this.logger), this.accountSecuredRepository = new z1(this.authenticationService, this.indexedDb, t, this.logger), this.accountPublicRepository = new vN(e, this.logger), this.calendarSecuredRepository = new Bo(this.authenticationService, this.indexedDb, t, this.logger), this.companySecuredRepository = new uR(this.authenticationService, this.indexedDb, t, this.logger), this.companyPublicRepository = new YI(e, this.logger), this.serviceSecuredRepository = new _i(this.authenticationService, this.indexedDb, t, this.logger), this.servicePublicRepository = new QI(e, this.logger), this.staffSecuredRepository = new Ni(this.authenticationService, this.indexedDb, t, this.logger), this.staffPublicRepository = new XI(this.baseURL, this.logger), this.staffGroupPublicRepository = new tN(this.baseURL, this.logger), this.contactSecuredRepository = new Lo(this.authenticationService, this.indexedDb, t, this.logger), this.externalContactSecuredRepository = new lI(this.authenticationService, t, this.logger), this.externalEventSecuredRepository = new Ti(this.authenticationService, this.indexedDb, t, this.logger), this.icsEventSecuredRepository = new NR(this.authenticationService, this.indexedDb, t, this.logger), this.eventSecuredRepository = new Oi(this.authenticationService, this.batchService, this.indexedDb, t, this.logger), this.eventPublicRepository = new wN(t, this.logger), this.userSecuredRepository = new du(this.authenticationService, this.indexedDb, t, this.logger), this.userDefaultSecuredRepository = new mu(this.authenticationService, this.indexedDb, t, this.logger), this.widgetFormSecuredRepository = new SR(this.authenticationService, this.indexedDb, t, this.logger), this.formBuilderSecuredRepository = new D1(this.authenticationService, this.indexedDb, t, this.logger), this.formPublicRepository = new fN(this.widgetBaseUrl, this.logger), this.freeSlotSecuredRepository = new t1(this.authenticationService, this.indexedDb, t, this.logger), this.freeSlotPublicRepository = new DN(this.widgetBaseUrl, this.logger), this.planningSecuredRepository = new eC(this.authenticationService, this.indexedDb, t, this.logger), this.privacyPolicySecuredRepository = new s1(this.authenticationService, this.indexedDb, t, this.logger), this.promoteFieldSecuredRepository = new j1(this.authenticationService, this.indexedDb, t, this.logger), this.serviceGroupSecuredRepository = new ki(this.authenticationService, this.indexedDb, t, this.logger), this.serviceResourceSecuredRepository = new Li(this.authenticationService, this.indexedDb, t, this.logger), this.staffGroupSecuredRepository = new Bi(this.authenticationService, this.indexedDb, t, this.logger), this.staffFormsSecuredRepository = new m1(this.authenticationService, this.indexedDb, t, this.logger), this.rightsSecuredRepository = new y1(this.authenticationService, this.indexedDb, t, this.logger), this.schedulingRightsSecuredRepository = new oC(this.authenticationService, t, this.logger), this.activitySecuredRepository = new v1(this.authenticationService, this.indexedDb, t, this.logger), this.noteSecuredRepository = new E1(this.authenticationService, this.indexedDb, t, this.logger), this.notificationStatusSecuredRepository = new sy(this.indexedDb, this.logger), this.queueSecuredRepository = new C1(this.authenticationService, this.indexedDb, t, this.logger), this.queuePublicRepository = new nN(this.widgetBaseUrl, this.logger), this.queueRegistrationSecuredRepository = new k1(this.authenticationService, this.indexedDb, t, this.logger), this.queueRegistrationPublicRepository = new iN(this.widgetBaseUrl, this.logger), this.formResultSecuredRepository = new N1(this.authenticationService, this.indexedDb, t, this.logger), this.formResultStatusSecuredRepository = new T1(this.authenticationService, this.indexedDb, t, this.logger), this.tagSecuredRepository = new L1(this.authenticationService, this.indexedDb, t, this.logger), this.additionalFieldsSecuredRepository = new M1(this.authenticationService, this.indexedDb, t, this.logger), this.widgetUrlCipherSecuredRepository = new W1(this.authenticationService, this.indexedDb, t, this.logger), this.reportingSecuredRepository = new Y1(this.authenticationService, this.indexedDb, t, this.logger), this.companyPerformanceSecuredRepository = new Q1(this.authenticationService, t, this.logger), this.scheduleSecuredRepository = new rC(this.authenticationService, t, this.logger), this.exportCalendarSecuredRepository = new nC(this.authenticationService, t, this.logger), this.exportAppointmentsSecuredRepository = new iC(this.authenticationService, t, this.logger), this.notificationSecuredRepository = new hC(this.authenticationService, this.indexedDb, t, this.logger), this.logSecuredRepository = new uC(this.authenticationService, this.indexedDb, t, this.logger), this.workingPlanningSecuredRepository = new hu(this.authenticationService, t, this.logger), this.changelogSecuredRepository = new vC(this.authenticationService, t, this.logger), this.shortenerSecuredRepository = new DC(this.authenticationService, t, this.logger), this.conferenceSecuredRepository = new Po(this.authenticationService, this.indexedDb, t, this.logger), this.conferencePublicRepository = new yN(this.authenticationService, t, this.logger), this.conferenceSpeakerSecuredRepository = new kC(this.authenticationService, this.batchService, this.indexedDb, t, this.logger), this.conferenceInviteeSecuredRepository = new FC(this.authenticationService, this.indexedDb, t, this.logger), this.customStatusSecuredRepository = new CC(this.authenticationService, this.indexedDb, t, this.logger), this.customStatusPublicRepository = new SN(t, this.logger), this.conferenceSessionSecuredRepository = new UC(this.authenticationService, this.indexedDb, t, this.logger), this.conferenceSessionPublicRepository = new uN(this.authenticationService, t, this.logger), this.conferenceRegistrationSecuredRepository = new WC(this.authenticationService, this.indexedDb, t, this.logger), this.conferenceRegistrationPublicRepository = new mN(this.authenticationService, t, this.logger), this.conferenceTagSecuredRepository = new jC(this.authenticationService, this.indexedDb, t, this.logger), this.widgetPublicRepository = new cN(this.authenticationService, t, this.logger), this.userDirectorySecuredRepository = new YC(this.authenticationService, this.indexedDb, t, this.logger), this.shortPollingNotificationSecuredRepository = new QC(this.authenticationService, this.indexedDb, t, this.logger), this.settingsSecuredRepository = new eI(this.authenticationService, this.indexedDb, t, this.logger), this.integrationsSecuredRepository = new rI(this.authenticationService, t, this.logger), this.connectorsSecuredRepository = new sI(this.authenticationService, t, this.logger), this.dashboardSecuredRepository = new jI(this.authenticationService, this.indexedDb, t, this.logger), this.dashboardStructureSecuredRepository = new oI(this.authenticationService, this.indexedDb, t, this.logger), this.crmSettingsSecuredRepository = new fI(this.authenticationService, this.indexedDb, t, this.logger), this.companySettingsSecuredRepository = new CN(this.authenticationService, this.indexedDb, t, this.logger), this.permissionsSecuredRepository = new NN(this.authenticationService, this.indexedDb, t, this.logger), this.shareLinkSecuredRepository = new TN(this.authenticationService, t, this.logger), this.clientMessageSecuredRepository = new PN(this.authenticationService, this.indexedDb, t, this.logger), this.appointmentAttendeeSecuredRepository = new ky(this.authenticationService, t, this.logger), this.staffActionsSecuredRepository = new GN(this.authenticationService, t, this.logger), this.vacationSecuredRepository = new Uo(this.authenticationService, this.indexedDb, t, this.logger);
|
|
32560
32564
|
}
|
|
32561
32565
|
getBaseURL() {
|
|
32562
32566
|
return this.baseURL;
|
|
@@ -49,11 +49,12 @@ export declare const VACATION_CHANNEL: Channel<EMITTER_TYPE>;
|
|
|
49
49
|
export declare abstract class Repository<T, A> {
|
|
50
50
|
readonly repositoryName: string;
|
|
51
51
|
readonly logger?: Logger;
|
|
52
|
+
readonly debug?: boolean;
|
|
52
53
|
readonly cacheDuration?: number;
|
|
53
54
|
protected static lastRemoteList: {
|
|
54
55
|
[key: string]: number;
|
|
55
56
|
};
|
|
56
|
-
constructor(repositoryName: string, logger?: Logger, cacheDuration?: number);
|
|
57
|
+
constructor(repositoryName: string, logger?: Logger, cacheDuration?: number, debug?: boolean);
|
|
57
58
|
protected abstract remoteGet(bearer: string, args: A): Promise<T>;
|
|
58
59
|
protected abstract remoteList(bearer: string, args: A): Promise<T[]>;
|
|
59
60
|
protected abstract remoteCreate(bearer: string, args: A, item: T): Promise<T>;
|
|
@@ -9,7 +9,7 @@ interface Args {
|
|
|
9
9
|
companyId: string;
|
|
10
10
|
serviceId?: string;
|
|
11
11
|
lang?: string;
|
|
12
|
-
|
|
12
|
+
showDeletedDeployment?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare class ServiceSecuredRepository extends Repository<ServiceSecuredEntity, Args> {
|
|
15
15
|
private serviceDb;
|
|
@@ -17,8 +17,8 @@ export declare class ServiceSecuredRepository extends Repository<ServiceSecuredE
|
|
|
17
17
|
constructor(authenticationSecuredService: AuthenticationSecuredService, indexedDb: IndexedDb, baseURL: string, logger?: Logger);
|
|
18
18
|
dispose(): void;
|
|
19
19
|
protected onCascadeDelete(data: any, message: EMITTER_TYPE, channel: PubSubService<EMITTER_TYPE>, handler: any): Promise<void>;
|
|
20
|
-
getAllServices(bearer: string, account: string, companyId: string,
|
|
21
|
-
getService(bearer: string, account: string, companyId: string, serviceId: string,
|
|
20
|
+
getAllServices(bearer: string, account: string, companyId: string, showDeletedDeployment: boolean, mode?: QUERY_TYPE): Promise<QUERY_RESULTS<ServiceSecuredEntity>>;
|
|
21
|
+
getService(bearer: string, account: string, companyId: string, serviceId: string, showDeletedDeployment: boolean, mode?: QUERY_TYPE): Promise<QUERY_RESULT<ServiceSecuredEntity>>;
|
|
22
22
|
createService(bearer: string, account: string, companyId: string, service: ServiceSecuredEntity): Promise<ServiceSecuredEntity>;
|
|
23
23
|
updateService(bearer: string, account: string, companyId: string, serviceId: string, service: ServiceSecuredEntity): Promise<ServiceSecuredEntity>;
|
|
24
24
|
deleteService(bearer: string, account: string, companyId: string, serviceId: string): Promise<void>;
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
import HttpClient from '@/service/index';
|
|
17
17
|
import { ServiceSecuredDto } from '@/data/Service';
|
|
18
18
|
export declare class ServiceSecuredService extends HttpClient {
|
|
19
|
-
getAllServices(bearer: string, account: string, companyId: string,
|
|
20
|
-
getById(bearer: string, account: string, companyId: string, serviceId: string,
|
|
19
|
+
getAllServices(bearer: string, account: string, companyId: string, showDeletedDeployment?: boolean): Promise<ServiceSecuredDto[]>;
|
|
20
|
+
getById(bearer: string, account: string, companyId: string, serviceId: string, showDeletedDeployment?: boolean): Promise<ServiceSecuredDto>;
|
|
21
21
|
createService(bearer: string, account: string, companyId: string, service: ServiceSecuredDto): Promise<ServiceSecuredDto>;
|
|
22
22
|
updateService(bearer: string, account: string, companyId: string, serviceId: string, service: ServiceSecuredDto): Promise<ServiceSecuredDto>;
|
|
23
23
|
delete(bearer: string, account: string, companyId: string, serviceId: string): Promise<void>;
|