@agendize/js-agendize-api 1.30.0 → 1.32.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.
Files changed (31) hide show
  1. package/dist/agendizeApi.d.ts +14 -4
  2. package/dist/browserStorage/browserStorage.d.ts +3 -1
  3. package/dist/data/Account.d.ts +38 -0
  4. package/dist/data/Activity.d.ts +1 -0
  5. package/dist/data/Company.d.ts +4 -0
  6. package/dist/data/Event.d.ts +2 -2
  7. package/dist/data/ReportingExportBody.d.ts +4 -0
  8. package/dist/data/ReportingExportResponse.d.ts +5 -0
  9. package/dist/data/Service.d.ts +2 -0
  10. package/dist/data/Settings.d.ts +2 -0
  11. package/dist/data/ShortPollingNotification.d.ts +10 -0
  12. package/dist/data/scheduling/Availabilities.d.ts +102 -0
  13. package/dist/index.d.ts +5 -3
  14. package/dist/js-agendize-api.es.js +7766 -7494
  15. package/dist/repository/index.d.ts +2 -1
  16. package/dist/repository/public/accountPublicRepository.d.ts +2 -1
  17. package/dist/repository/public/availabilityPublicRepository.d.ts +39 -0
  18. package/dist/repository/public/companyPublicRepository.d.ts +1 -0
  19. package/dist/repository/public/eventPublicRepository.d.ts +4 -3
  20. package/dist/repository/public/servicePublicRepository.d.ts +1 -1
  21. package/dist/repository/secured/availabilitySecuredRepository.d.ts +42 -0
  22. package/dist/repository/secured/serviceSecuredRepository.d.ts +1 -0
  23. package/dist/repository/secured/shortPollingNotificationSecuredRepository.d.ts +2 -1
  24. package/dist/service/public/accountPublicService.d.ts +1 -1
  25. package/dist/service/public/availabilityPublicService.d.ts +20 -0
  26. package/dist/service/public/companyPublicService.d.ts +1 -0
  27. package/dist/service/public/eventPublicService.d.ts +3 -3
  28. package/dist/service/public/servicePublicService.d.ts +1 -1
  29. package/dist/service/secured/availabilitiesSecuredService.d.ts +20 -0
  30. package/dist/service/secured/shortPollingNotificationSecuredService.d.ts +2 -1
  31. package/package.json +1 -1
@@ -81,5 +81,6 @@ export declare abstract class Repository<T, A> {
81
81
  private localSaveList;
82
82
  private localSave;
83
83
  protected _isExpired(lastRemote: number | undefined): boolean;
84
- getError(e: unknown): AgendizeError;
84
+ getError(e: unknown, mergeError?: boolean): AgendizeError;
85
+ private mergeError;
85
86
  }
@@ -19,12 +19,13 @@ import { AccountPublicEntity } from "@/data/Account";
19
19
  interface Args {
20
20
  userId: string;
21
21
  locale?: string;
22
+ params?: string;
22
23
  }
23
24
  export declare class AccountPublicRepository extends Repository<AccountPublicEntity, Args> {
24
25
  private accountPublicService;
25
26
  constructor(baseURL: string, logger?: Logger);
26
27
  dispose(): void;
27
- getAccount(userId: string, locale?: string): Promise<QUERY_RESULT<AccountPublicEntity>>;
28
+ getAccount(userId: string, locale?: string, params?: string): Promise<QUERY_RESULT<AccountPublicEntity>>;
28
29
  protected remoteGet(bearer: string, args: Args): Promise<AccountPublicEntity>;
29
30
  protected localBulkDelete(items: AccountPublicEntity[]): Promise<void>;
30
31
  protected localBulkSave(args: Args, items: AccountPublicEntity[]): Promise<void>;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright 2022 Agendize All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at.
7
+ *
8
+ * Http://www.apache.org/licenses/LICENSE-2.0.
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { QUERY_RESULT, Repository } from "@/repository";
17
+ import { Logger } from "@/utils/logger";
18
+ import { AvailabilityEntity, AvailabilityFilterOptions } from "@/data/scheduling/Availabilities";
19
+ interface Args {
20
+ filterOptions: AvailabilityFilterOptions;
21
+ account: string;
22
+ serviceId: string;
23
+ }
24
+ export declare class AvailabilityPublicRepository extends Repository<AvailabilityEntity, Args> {
25
+ private service;
26
+ constructor(baseURL: string, logger?: Logger);
27
+ getAvailabilities(account: string, serviceIdOrExternalId: string, filterOptions: AvailabilityFilterOptions): Promise<QUERY_RESULT<AvailabilityEntity>>;
28
+ protected remoteGet(bearer: string, args: Args): Promise<AvailabilityEntity>;
29
+ protected localBulkDelete(items: AvailabilityEntity[]): Promise<void>;
30
+ protected localBulkSave(args: Args, items: AvailabilityEntity[]): Promise<void>;
31
+ protected localDelete(args: Args): Promise<void>;
32
+ protected localGet(args: Args): Promise<AvailabilityEntity>;
33
+ protected localList(args: Args): Promise<AvailabilityEntity[]>;
34
+ protected remoteCreate(bearer: string, args: Args, item: AvailabilityEntity): Promise<AvailabilityEntity>;
35
+ protected remoteDelete(bearer: string, args: Args): Promise<void>;
36
+ protected remoteList(bearer: string, args: Args): Promise<AvailabilityEntity[]>;
37
+ protected remoteUpdate(bearer: string, args: Args, item: AvailabilityEntity): Promise<AvailabilityEntity>;
38
+ }
39
+ export {};
@@ -9,6 +9,7 @@ export declare class CompanyPublicRepository extends Repository<CompanyPublicEnt
9
9
  private companyPublicService;
10
10
  constructor(baseURL: string, logger?: Logger);
11
11
  getCompany(companyId: string, companySelector?: boolean): Promise<QUERY_RESULT<CompanyPublicEntity>>;
12
+ getAllCompaniesConsiderTemplate(accountId: string, serviceId?: string, location?: string, cipherParams?: string): Promise<CompanyPublicEntity[]>;
12
13
  protected remoteGet(bearer: string, args: Args): Promise<CompanyPublicEntity>;
13
14
  protected localBulkDelete(items: CompanyPublicEntity[]): Promise<void>;
14
15
  protected localBulkSave(args: Args, items: CompanyPublicEntity[]): Promise<void>;
@@ -8,6 +8,7 @@ interface Args {
8
8
  securityKey: string;
9
9
  locale?: string;
10
10
  timeZone?: string;
11
+ widgetType?: string;
11
12
  }
12
13
  export declare class EventPublicRepository extends Repository<EventPublicEntity, Args> {
13
14
  private eventPublicService;
@@ -16,9 +17,9 @@ export declare class EventPublicRepository extends Repository<EventPublicEntity,
16
17
  updateEventStatus(accountId: string, companyId: string, eventId: string, securityKey: string, status: {
17
18
  status?: string;
18
19
  customStatus?: string;
19
- }, locale?: string): Promise<EventPublicEntity>;
20
- updateEventNotes(accountId: string, eventId: string, securityKey: string, notes: string, locale?: string): Promise<EventPublicEntity>;
21
- rescheduleEvent(accountId: string, companyId: string, eventId: string, startDate: Date, securityKey: string, timeZone?: string, locale?: string): Promise<EventPublicEntity>;
20
+ }, locale?: string, widgetType?: string): Promise<EventPublicEntity>;
21
+ updateEventNotes(accountId: string, eventId: string, securityKey: string, notes: string, locale?: string, widgetType?: string): Promise<EventPublicEntity>;
22
+ rescheduleEvent(accountId: string, companyId: string, eventId: string, startDate: Date, securityKey: string, timeZone?: string, locale?: string, widgetType?: string): Promise<EventPublicEntity>;
22
23
  protected remoteGet(bearer: string, args: Args): Promise<EventPublicEntity>;
23
24
  protected remoteUpdateStatus(args: Args, status: {
24
25
  status?: string;
@@ -9,7 +9,7 @@ export declare class ServicePublicRepository extends Repository<ServicePublicEnt
9
9
  private serviceService;
10
10
  constructor(baseURL: string, logger?: Logger);
11
11
  getService(companyId: string, serviceId: string): Promise<QUERY_RESULT<ServicePublicEntity>>;
12
- getServiceAndGroups(companyId?: string, accountId?: string, serviceId?: string, serviceGroupId?: string, staffId?: string, staffGroupId?: string, ignoreError?: boolean): Promise<ServicesListPublicEntity>;
12
+ getServiceAndGroups(companyId?: string, accountId?: string, serviceId?: string, serviceGroupId?: string, staffId?: string, staffGroupId?: string, ignoreError?: boolean, showPrivate?: boolean): Promise<ServicesListPublicEntity>;
13
13
  remoteGet(bearer: string, args: Args): Promise<ServicePublicEntity>;
14
14
  remoteCreate<R>(args: any): Promise<R>;
15
15
  remoteUpdate<R>(args: any): Promise<R>;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Copyright 2022 Agendize All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at.
7
+ *
8
+ * Http://www.apache.org/licenses/LICENSE-2.0.
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { IndexedDb } from '@/db';
17
+ import { QUERY_RESULT, Repository } from "@/repository";
18
+ import { AuthenticationSecuredService } from "@/service/secured/authenticationSecuredService";
19
+ import { Logger } from "@/utils/logger";
20
+ import { AvailabilityEntity, AvailabilityFilterOptions } from "@/data/scheduling/Availabilities";
21
+ interface Args {
22
+ filterOptions: AvailabilityFilterOptions;
23
+ account: string;
24
+ serviceId: string;
25
+ }
26
+ export declare class AvailabilitySecuredRepository extends Repository<AvailabilityEntity, Args> {
27
+ private indexedDb;
28
+ private service;
29
+ constructor(authenticationSecuredService: AuthenticationSecuredService, indexedDb: IndexedDb, baseURL: string, logger?: Logger);
30
+ getAvailabilities(bearer: string, account: string, serviceIdOrExternalId: string, filterOptions: AvailabilityFilterOptions): Promise<QUERY_RESULT<AvailabilityEntity>>;
31
+ protected remoteGet(bearer: string, args: Args): Promise<AvailabilityEntity>;
32
+ protected remoteList(bearer: string, args: any): Promise<AvailabilityEntity[]>;
33
+ protected remoteCreate(bearer: string, args: Args, item: AvailabilityEntity): Promise<AvailabilityEntity>;
34
+ protected remoteUpdate(bearer: string, args: Args, item: AvailabilityEntity): Promise<AvailabilityEntity>;
35
+ protected remoteDelete(bearer: string, args: Args): Promise<void>;
36
+ protected localBulkSave(args: Args, items: AvailabilityEntity[]): Promise<void>;
37
+ protected localGet(args: Args): Promise<AvailabilityEntity>;
38
+ protected localList(args: Args): Promise<AvailabilityEntity[]>;
39
+ protected localDelete(args: Args): Promise<void>;
40
+ protected localBulkDelete(items: AvailabilityEntity[]): Promise<void>;
41
+ }
42
+ export {};
@@ -8,6 +8,7 @@ interface Args {
8
8
  account: string;
9
9
  companyId: string;
10
10
  serviceId?: string;
11
+ lang?: string;
11
12
  }
12
13
  export declare class ServiceSecuredRepository extends Repository<ServiceSecuredEntity, Args> {
13
14
  private serviceDb;
@@ -1,5 +1,5 @@
1
1
  import { QUERY_PAGINATED_RESULT, Repository } from "@/repository";
2
- import { ShortPollingNotificationEntity } from "@/data/ShortPollingNotification";
2
+ import { ShortPollingNotificationEntity, ShortPollingNotificationPingEntity } from "@/data/ShortPollingNotification";
3
3
  import { ShortPollingNotificationScope } from "@/service/secured/shortPollingNotificationSecuredService";
4
4
  import { AuthenticationSecuredService } from "@/service/secured/authenticationSecuredService";
5
5
  import { IndexedDb } from "@/db";
@@ -15,6 +15,7 @@ export declare class ShortPollingNotificationSecuredRepository extends Repositor
15
15
  private notificationSecuredService;
16
16
  constructor(authenticationSecuredService: AuthenticationSecuredService, indexedDb: IndexedDb, baseURL: string, logger?: Logger);
17
17
  getAllNotifications(bearer: string, account: string, syncToken?: number, scope?: ShortPollingNotificationScope[]): Promise<QUERY_PAGINATED_RESULT<ShortPollingNotificationEntity>>;
18
+ pingNewNotifications(bearer: string, account: string, syncToken?: number, scope?: ShortPollingNotificationScope[]): Promise<ShortPollingNotificationPingEntity>;
18
19
  getLocalNotifications(): Promise<ShortPollingNotificationEntity[]>;
19
20
  protected remoteCreate(bearer: string, args: Args, item: ShortPollingNotificationEntity): Promise<ShortPollingNotificationEntity>;
20
21
  protected remoteDelete(bearer: string, args: Args): Promise<void>;
@@ -16,5 +16,5 @@
16
16
  import HttpClient from '@/service/index';
17
17
  import { AccountPublicDto } from "@/data/Account";
18
18
  export declare class AccountPublicService extends HttpClient {
19
- getAccount(userId: string, locale?: string): Promise<AccountPublicDto>;
19
+ getAccount(userId: string, locale?: string, params?: string): Promise<AccountPublicDto>;
20
20
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright 2022 Agendize All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at.
7
+ *
8
+ * Http://www.apache.org/licenses/LICENSE-2.0.
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import HttpClient from '@/service/index';
17
+ import { AvailabilityDto, AvailabilityFilterOptions } from "@/data/scheduling/Availabilities";
18
+ export declare class AvailabilityPublicService extends HttpClient {
19
+ getAvailabilities(account: string, serviceExternalId: string, filterOptions: AvailabilityFilterOptions): Promise<AvailabilityDto>;
20
+ }
@@ -2,4 +2,5 @@ import { CompanyPublicDto } from "@/data/Company";
2
2
  import HttpClient from "@/service/index";
3
3
  export declare class CompanyPublicService extends HttpClient {
4
4
  getById(companyId: string, companySelector?: boolean): Promise<CompanyPublicDto>;
5
+ getAllCompaniesConsiderTemplate(accountId: string, serviceId?: string, location?: string, cipherParams?: string): Promise<CompanyPublicDto[]>;
5
6
  }
@@ -20,10 +20,10 @@ export declare class EventPublicService extends HttpClient {
20
20
  updateEventStatus(accountId: string, companyId: string, eventId: string, securityKey: string, status: {
21
21
  status?: string;
22
22
  customStatus?: string;
23
- }, locale?: string): Promise<EventPublicDto>;
24
- updateEventNotes(accountId: string, eventId: string, securityKey: string, notes: string, locale?: string): Promise<EventPublicDto>;
23
+ }, locale?: string, widgetType?: string): Promise<EventPublicDto>;
24
+ updateEventNotes(accountId: string, eventId: string, securityKey: string, notes: string, locale?: string, widgetType?: string): Promise<EventPublicDto>;
25
25
  rescheduleEvent(companyId: string, eventId: string, securityKey: string, startDate: {
26
26
  timeZone: string;
27
27
  dateTime: string;
28
- }, locale?: string): Promise<EventPublicDto>;
28
+ }, locale?: string, widgetType?: string): Promise<EventPublicDto>;
29
29
  }
@@ -17,5 +17,5 @@ import HttpClient from '@/service/index';
17
17
  import { ServicePublicDto, ServicesListPublicDto } from "@/data/Service";
18
18
  export declare class ServicePublicService extends HttpClient {
19
19
  getById(companyId: string, serviceId: string): Promise<ServicePublicDto>;
20
- getList(companyId?: string, accountId?: string, serviceId?: string, serviceGroupId?: string, staffId?: string, staffGroupId?: string, ignoreError?: boolean): Promise<ServicesListPublicDto>;
20
+ getList(companyId?: string, accountId?: string, serviceId?: string, serviceGroupId?: string, staffId?: string, staffGroupId?: string, ignoreError?: boolean, showPrivateServices?: boolean): Promise<ServicesListPublicDto>;
21
21
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright 2022 Agendize All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at.
7
+ *
8
+ * Http://www.apache.org/licenses/LICENSE-2.0.
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import HttpClient from '@/service/index';
17
+ import { AvailabilityDto, AvailabilityFilterOptions } from "@/data/scheduling/Availabilities";
18
+ export declare class AvailabilitiesSecuredService extends HttpClient {
19
+ getAvailabilities(bearer: string, account: string, serviceExternalId: string, filterOptions: AvailabilityFilterOptions): Promise<AvailabilityDto>;
20
+ }
@@ -1,9 +1,10 @@
1
1
  import HttpClient from "@/service/index";
2
- import { ShortPollingNotificationContainerDto } from "@/data/ShortPollingNotification";
2
+ import { ShortPollingNotificationContainerDto, ShortPollingNotificationPingDto } from "@/data/ShortPollingNotification";
3
3
  export declare enum ShortPollingNotificationScope {
4
4
  APPOINTMENT = "appointment",
5
5
  REPORT = "report"
6
6
  }
7
7
  export declare class ShortPollingNotificationSecuredService extends HttpClient {
8
8
  getNotifications(bearer: string, account: string, syncToken?: number, scope?: ShortPollingNotificationScope[]): Promise<ShortPollingNotificationContainerDto>;
9
+ pingNewNotifications(bearer: string, account: string, syncToken?: number, scope?: ShortPollingNotificationScope[]): Promise<ShortPollingNotificationPingDto>;
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agendize/js-agendize-api",
3
- "version": "1.30.0",
3
+ "version": "1.32.0",
4
4
  "description": "JavaScript wrapper for call Agendize API",
5
5
  "private": false,
6
6
  "keywords": [