@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
@@ -32,7 +32,7 @@ import { SettingsWorkingDayEntity } from "@/data/WorkingHours";
32
32
  import { RightsEntity } from "@/data/Rights";
33
33
  import { ActivityEntity } from "@/data/Activity";
34
34
  import { NoteEntity } from "@/data/Note";
35
- import { ShortPollingNotificationEntity } from "@/data/ShortPollingNotification";
35
+ import { ShortPollingNotificationEntity, ShortPollingNotificationPingEntity } from "@/data/ShortPollingNotification";
36
36
  import { FormBuilderEntity, WidgetFormEntity } from "@/data/Form";
37
37
  import { QueueEntity } from "@/data/Queue";
38
38
  import { FormResultEntity } from "@/data/FormResult";
@@ -77,6 +77,7 @@ import { LoginRealmEntity } from "@/data/LoginRealm";
77
77
  import { CompanySettingsEntity } from "@/data/CompanySettings";
78
78
  import { PermissionEntity } from "@/data/account/Permission";
79
79
  import { ShareLinkEntity, ShareLinkResponseItemEntity } from "@/data/action/ShareLink";
80
+ import { AvailabilityFilterOptions } from "@/data/scheduling/Availabilities";
80
81
  export interface ApiOptions {
81
82
  baseURL: string;
82
83
  widgetBaseURL: string;
@@ -89,6 +90,8 @@ export declare class AgendizeApi {
89
90
  private batchService;
90
91
  private accountSecuredRepository;
91
92
  private accountPublicRepository;
93
+ private availabilityPublicRepository;
94
+ private availabilitySecuredRepository;
92
95
  private calendarSecuredRepository;
93
96
  private companySecuredRepository;
94
97
  private companyPublicRepository;
@@ -190,6 +193,7 @@ export declare class AgendizeApi {
190
193
  refreshUserStorage(allUsers: UserEntity[] | undefined, meInOrganisation: UserEntity): Promise<void>;
191
194
  clearAfterAccountSwitch(): Promise<void>;
192
195
  logout(): Promise<void>;
196
+ clearLocalDB(): Promise<void>;
193
197
  getSchedulingRights(organisation: string): Promise<SchedulingRightsEntity[]>;
194
198
  getSchedulingRightsById(organisation: string, userId: string): Promise<SchedulingRightsEntity | undefined>;
195
199
  updateSchedulingRights(organisation: string, userId: string, rights: SchedulingRightsEntity): Promise<SchedulingRightsEntity>;
@@ -199,7 +203,7 @@ export declare class AgendizeApi {
199
203
  */
200
204
  cipherUrl(companyId: string, urlToCipher: string, domaine?: string, shortener?: boolean): Promise<WidgetUrlCipherEntity>;
201
205
  cipher(organisation: string, companyId: string, params: WidgetUrlCipherInputEntity): Promise<WidgetUrlCipherEntity>;
202
- getAccount(account?: string, crossAccount?: boolean, locale?: string): Promise<{
206
+ getAccount(account?: string, crossAccount?: boolean, locale?: string, params?: string): Promise<{
203
207
  result: AccountEntity | undefined;
204
208
  local: boolean;
205
209
  }>;
@@ -209,12 +213,13 @@ export declare class AgendizeApi {
209
213
  results: CompanyEntity[] | undefined;
210
214
  local: boolean;
211
215
  }>;
216
+ getAllCompaniesConsiderTemplate(accountId: string, serviceId?: string, location?: string, cipherParams?: string): Promise<CompanyEntity[]>;
212
217
  getCompanyById(companyId: string, account?: string, companySelector?: boolean, mode?: QUERY_TYPE): Promise<{
213
218
  result: CompanyEntity | undefined;
214
219
  local: boolean;
215
220
  }>;
216
221
  createCompany(account: string, company: CompanyEntity): Promise<CompanyEntity>;
217
- cloneCompany(clonedCompanyId: string, company: CompanyEntity): Promise<CompanyEntity>;
222
+ cloneCompany(account: string, clonedCompanyId: string, company: CompanyEntity): Promise<CompanyEntity>;
218
223
  updateCompany(companyId: string, company: CompanyEntity): Promise<CompanyEntity>;
219
224
  deleteCompany(companyId: string): Promise<void>;
220
225
  getUserById(organisation: string, userId: string, mode?: QUERY_TYPE): Promise<{
@@ -259,7 +264,7 @@ export declare class AgendizeApi {
259
264
  results: ServiceEntity[] | undefined;
260
265
  local: boolean;
261
266
  }>;
262
- getAllServicesAndGroups(companyId?: string, accountId?: string, serviceId?: string, serviceGroupId?: string, staffId?: string, staffGroupId?: string, ignoreError?: boolean, mode?: QUERY_TYPE): Promise<ServicesListEntity | undefined>;
267
+ getAllServicesAndGroups(companyId?: string, accountId?: string, serviceId?: string, serviceGroupId?: string, staffId?: string, staffGroupId?: string, ignoreError?: boolean, showPrivate?: boolean): Promise<ServicesListEntity | undefined>;
263
268
  getServiceById(companyId: string, serviceId: string, account?: string, mode?: QUERY_TYPE): Promise<{
264
269
  result: ServiceEntity | undefined;
265
270
  local: boolean;
@@ -314,6 +319,7 @@ export declare class AgendizeApi {
314
319
  locale?: string;
315
320
  securityKey: string;
316
321
  timeZone?: string;
322
+ widgetType?: string;
317
323
  }): Promise<import("@/data/Event").EventPublicEntity>;
318
324
  updateEvent(companyId: string, event: EventEntity, timeZone?: string, force?: boolean): Promise<EventEntity>;
319
325
  updateEventStatus(account: string, companyId: string, eventId: string, status: string | {
@@ -322,12 +328,14 @@ export declare class AgendizeApi {
322
328
  }, option?: {
323
329
  locale?: string;
324
330
  securityKey: string;
331
+ widgetType?: string;
325
332
  }): Promise<EventEntity>;
326
333
  updateEventsToStatus(organisation: string, events: EventSearchEntity[], status: string | CustomStatusEntity): Promise<EventEntity[]>;
327
334
  updateEventCustomStatus(companyId: string, eventId: string, customStatus: CustomStatusEntity): Promise<EventEntity>;
328
335
  updateEventNotes(account: string, eventId: string, notes: string, option?: {
329
336
  locale?: string;
330
337
  securityKey: string;
338
+ widgetType?: string;
331
339
  }): Promise<EventEntity>;
332
340
  searchEvents(organisation: string, searchBody: EventSearchBodyEntity, options?: EventSearchOption): Promise<EventSearchPageEntity>;
333
341
  countAppointmentConflict(organisation: string, searchBody: EventSearchBodyEntity): Promise<number>;
@@ -517,6 +525,7 @@ export declare class AgendizeApi {
517
525
  deleteConferenceTag(organisationEmail: string, tagId: string): Promise<void>;
518
526
  getAllUsersOfDirectory(organisationEmail: string, mode?: QUERY_TYPE): Promise<QUERY_RESULTS<UserEntity>>;
519
527
  getCRMSettings(organisationEmail: string, mode?: QUERY_TYPE): Promise<QUERY_RESULT<CRMSettingsEntity>>;
528
+ pingNewNotifications(organisationEmail: string, syncToken?: number, scope?: ShortPollingNotificationScope[]): Promise<ShortPollingNotificationPingEntity>;
520
529
  getAllNotifications(organisationEmail: string, syncToken?: number, scope?: ShortPollingNotificationScope[]): Promise<QUERY_PAGINATED_RESULT<ShortPollingNotificationEntity>>;
521
530
  getAllNotificationsLocally(): Promise<ShortPollingNotificationEntity[]>;
522
531
  getOrganisationSettings(organisationEmail: string, mode?: QUERY_TYPE): Promise<QUERY_RESULT<import(".").SettingsEntity>>;
@@ -531,5 +540,6 @@ export declare class AgendizeApi {
531
540
  getUserPermission(organisationEmail: string, userId: string, withLastActivity?: boolean): Promise<QUERY_RESULT<PermissionEntity>>;
532
541
  updateUserPermission(organisationEmail: string, userId: string, permission: PermissionEntity): Promise<PermissionEntity>;
533
542
  deleteUserPermission(organisationEmail: string, userId: string): Promise<void>;
543
+ getAvailabilities(organisationEmail: string, serviceIdOrExternalId: string, filter: AvailabilityFilterOptions): Promise<QUERY_RESULT<import("@/data/scheduling/Availabilities").AvailabilityEntity>>;
534
544
  shareALink(organisationEmail: string, shareLinkQuery: ShareLinkEntity): Promise<ShareLinkResponseItemEntity[]>;
535
545
  }
@@ -17,7 +17,9 @@ export declare enum StorageKeys {
17
17
  AGENDAS_TEAM_REMOVED = "agendasTeamRemoved",
18
18
  AGENDAS_ENABLED = "agendasEnabled",
19
19
  LOGGER_ORGANISATION_ID = "widgetOrganisationId",
20
- REALM = "realm"
20
+ USERS_COLORS = "usersColors",
21
+ REALM = "realm",
22
+ API_BASE_URI = "api_base_uri"
21
23
  }
22
24
  export declare class BrowserStorage {
23
25
  private readonly logger?;
@@ -21,11 +21,25 @@ export type AccountEntity<Type = EntityType> = Type extends SecuredEntity ? Acco
21
21
  export declare class AccountPublicEntity extends PublicBodyEntity {
22
22
  id: string;
23
23
  whiteLabel?: WhiteLabelSettingsPublicEntity;
24
+ properties?: AccountPropertiesEntity;
25
+ style?: {
26
+ lite: boolean;
27
+ };
28
+ filters?: AccountWidgetFiltersPublicEntity;
24
29
  static fromDto(dto: AccountPublicDto): AccountPublicEntity;
25
30
  }
31
+ export declare class AccountPropertiesEntity {
32
+ companyTemplate?: string;
33
+ static fromDto(dto: AccountPropertiesDto): AccountPropertiesEntity;
34
+ }
26
35
  export declare class AccountPublicDto {
27
36
  id: string;
28
37
  whiteLabel?: WhiteLabelSettingsPublicDto;
38
+ properties?: AccountPropertiesDto;
39
+ style?: {
40
+ lite: boolean;
41
+ };
42
+ filters?: AccountWidgetFiltersPublicDto;
29
43
  }
30
44
  export declare class WhiteLabelSettingsPublicEntity {
31
45
  accountName?: string;
@@ -46,6 +60,26 @@ export interface WhiteLabelSettingsPublicDto {
46
60
  favicon?: ImageEntity;
47
61
  logo?: ImageEntity;
48
62
  }
63
+ export declare class AccountWidgetFiltersPublicEntity {
64
+ company?: string[];
65
+ service?: string[];
66
+ serviceGroup?: string[];
67
+ staff?: string[];
68
+ staffGroup?: string[];
69
+ location?: string[];
70
+ static fromDto(dto: AccountWidgetFiltersPublicDto): AccountWidgetFiltersPublicEntity;
71
+ }
72
+ export declare class AccountWidgetFiltersPublicDto {
73
+ company?: string[];
74
+ service?: string[];
75
+ serviceGroup?: string[];
76
+ staff?: string[];
77
+ staffGroup?: string[];
78
+ location?: string[];
79
+ }
80
+ export interface AccountPropertiesDto {
81
+ companyTemplate?: string;
82
+ }
49
83
  export declare class AccountSecuredEntity extends SecuredBodyEntity {
50
84
  id: string;
51
85
  firstName?: string;
@@ -81,6 +115,7 @@ export declare class ProfileSettingsEntity {
81
115
  }[];
82
116
  realm?: string;
83
117
  hasVisio?: boolean;
118
+ onlyOwnedNotification?: boolean;
84
119
  }
85
120
  export declare class CalendarSettingsEntity {
86
121
  minTime?: string;
@@ -106,6 +141,7 @@ export declare class AccountSettingsEntity {
106
141
  email?: string;
107
142
  logo?: ImageEntity;
108
143
  primaryColor?: string;
144
+ companyTemplate?: string;
109
145
  }
110
146
  export declare class AccountDto {
111
147
  id: string;
@@ -124,6 +160,7 @@ export declare class AccountDto {
124
160
  accountName?: string;
125
161
  betaNh?: boolean;
126
162
  hasSyncModule?: boolean;
163
+ onlyOwnedNotification?: boolean;
127
164
  externalLinks?: {
128
165
  label: string;
129
166
  link: string;
@@ -173,6 +210,7 @@ export declare class AccountDto {
173
210
  email?: string;
174
211
  logo?: ImageEntity;
175
212
  primaryColor?: string;
213
+ companyTemplate?: string;
176
214
  };
177
215
  defaultAccount?: string;
178
216
  directories?: string[];
@@ -45,6 +45,7 @@ export declare enum AppointmentActivitySourceType {
45
45
  BACKOFFICE_WIDGET = "backofficeWidget",
46
46
  API_MOBILE = "mobile",
47
47
  FACEBOOK = "facebook",
48
+ INTERNAL_WIDGET = "internalWidget",
48
49
  USER = "user"
49
50
  }
50
51
  export declare class AppointmentActivityEntity extends ActivityEntity {
@@ -26,6 +26,7 @@ export declare enum CompanyContactMatchingType {
26
26
  export declare class CompanyPublicEntity extends PublicBodyEntity {
27
27
  id?: string;
28
28
  name: string;
29
+ photo?: ImageEntity;
29
30
  picture?: ImageEntity;
30
31
  address?: AddressEntity;
31
32
  phone?: string;
@@ -42,6 +43,7 @@ export declare class CompanyPublicEntity extends PublicBodyEntity {
42
43
  symbol?: string;
43
44
  };
44
45
  workingHours?: SettingsWorkingDayEntity[];
46
+ pmrAccess?: boolean;
45
47
  headerBackgroundColor?: string;
46
48
  displayPrice?: boolean;
47
49
  randomStaff?: boolean;
@@ -57,6 +59,7 @@ export declare class CompanyPublicDto {
57
59
  id?: string;
58
60
  name: string;
59
61
  address?: AddressDto;
62
+ photo?: ImageEntity;
60
63
  picture?: ImageEntity;
61
64
  phone?: string;
62
65
  email?: string;
@@ -79,6 +82,7 @@ export declare class CompanyPublicDto {
79
82
  websiteLink?: string;
80
83
  timeZone?: string;
81
84
  workingHours?: SettingsWorkingDayDto[];
85
+ pmrAccess?: boolean;
82
86
  extendedProperties?: Map<string, any>;
83
87
  enableWhiteLabel?: boolean;
84
88
  accountId: string;
@@ -45,7 +45,7 @@ export declare class EventPublicEntity extends PublicBodyEntity {
45
45
  form?: FormItemEntity[];
46
46
  histories?: AppointmentActivityEntity[];
47
47
  source?: string;
48
- sourceType?: 'manual' | 'widget' | 'external' | 'manualPhone' | 'api' | 'backofficeWidget' | 'mobile' | 'facebook' | '' | undefined;
48
+ sourceType?: 'manual' | 'widget' | 'external' | 'manualPhone' | 'api' | 'backofficeWidget' | 'mobile' | 'facebook' | 'internalWidget' | '' | undefined;
49
49
  onlineMeeting?: {
50
50
  link: string;
51
51
  };
@@ -76,7 +76,7 @@ export declare class EventPublicDto {
76
76
  form?: FormItemDto[];
77
77
  histories?: ActivityDto[];
78
78
  source?: string;
79
- sourceType?: 'manual' | 'widget' | 'external' | 'manualPhone' | 'api' | 'backofficeWidget' | 'mobile' | 'facebook' | '' | undefined;
79
+ sourceType?: 'manual' | 'widget' | 'external' | 'manualPhone' | 'api' | 'backofficeWidget' | 'mobile' | 'facebook' | 'internalWidget' | '' | undefined;
80
80
  onlineMeeting?: {
81
81
  link: string;
82
82
  };
@@ -88,6 +88,8 @@ export declare class ReportingExportBodyFieldAppointmentEntity {
88
88
  status?: boolean;
89
89
  notes?: boolean;
90
90
  customFields?: boolean;
91
+ sourceInterface?: boolean;
92
+ source?: boolean;
91
93
  id?: boolean;
92
94
  constructor();
93
95
  static toReportingExportBodyFieldAppointmentDto(entity: ReportingExportBodyFieldAppointmentEntity): ReportingExportBodyFieldAppointmentDto;
@@ -166,5 +168,7 @@ export declare class ReportingExportBodyFieldAppointmentDto {
166
168
  status?: boolean;
167
169
  notes?: boolean;
168
170
  customFields?: boolean;
171
+ sourceInterface?: boolean;
172
+ source?: boolean;
169
173
  id?: boolean;
170
174
  }
@@ -7,9 +7,14 @@ export declare enum ExportStatus {
7
7
  export declare class ReportingExportResponseEntity {
8
8
  id?: string;
9
9
  status?: ExportStatus;
10
+ requested?: Date;
10
11
  static fromReportingDto(dto: ReportingExportResponseDto): ReportingExportResponseEntity;
11
12
  }
12
13
  export declare class ReportingExportResponseDto {
13
14
  id?: string;
14
15
  status?: ExportStatus;
16
+ requested?: {
17
+ dateTime: string;
18
+ timeZone: string;
19
+ };
15
20
  }
@@ -32,6 +32,7 @@ export declare class ServicePublicEntity extends PublicBodyEntity {
32
32
  locationCustom?: string;
33
33
  staffs?: string[];
34
34
  maxCancellationDelay?: number;
35
+ externalId?: string;
35
36
  extendedProperties?: Map<string, any>;
36
37
  static fromDto(dto: ServicePublicDto): ServicePublicEntity;
37
38
  }
@@ -53,6 +54,7 @@ export declare class ServicePublicDto {
53
54
  locations: ('companyAddress' | 'videoconference' | 'phone' | 'custom')[];
54
55
  locationCustom?: string;
55
56
  staffs?: string[];
57
+ externalId?: string;
56
58
  extendedProperties?: Map<string, any>;
57
59
  }
58
60
  export declare class ServicesListPublicDto {
@@ -3,10 +3,12 @@ export declare class SettingsEntity {
3
3
  calendar: {
4
4
  useMandatoryFieldsForFreeMode: boolean;
5
5
  };
6
+ internalAppointmentTitles?: string[];
6
7
  static fromSettingsDto(organisation: string, dto: SettingsDto): SettingsEntity;
7
8
  }
8
9
  export declare class SettingsDto {
9
10
  calendar: {
10
11
  useMandatoryFieldsForFreeMode: boolean;
11
12
  };
13
+ internalAppointmentTitles?: string[];
12
14
  }
@@ -1,4 +1,5 @@
1
1
  import { ShortPollingNotificationObject, ShortPollingNotificationObjectDb } from "./shortPollingNotification/ShortPollingNotificationObject";
2
+ import { ShortPollingNotificationScope } from "@/service/secured/shortPollingNotificationSecuredService";
2
3
  export type ShortPollingNotificationType = 'event' | 'report';
3
4
  export type ShortPollingNotificationSubType = 'new' | 'update' | 'delete' | 'accept' | 'decline' | 'fail';
4
5
  export declare class ShortPollingNotificationEntity {
@@ -9,6 +10,11 @@ export declare class ShortPollingNotificationEntity {
9
10
  date: Date;
10
11
  static fromNotificationDto(dto: ShortPollingNotificationDto, messageOutputType?: ShortPollingNotificationSubType): ShortPollingNotificationEntity;
11
12
  }
13
+ export declare class ShortPollingNotificationPingEntity {
14
+ pingScopes?: ShortPollingNotificationScope[];
15
+ nextSyncToken: number;
16
+ static fromDto(dto: ShortPollingNotificationPingDto): ShortPollingNotificationPingEntity;
17
+ }
12
18
  export declare class ShortPollingNotificationDto {
13
19
  type: ShortPollingNotificationType;
14
20
  notificationObject: ShortPollingNotificationObjectDb;
@@ -23,3 +29,7 @@ export declare class ShortPollingNotificationContainerDto {
23
29
  totalItems: number;
24
30
  nextSyncToken: number;
25
31
  }
32
+ export declare class ShortPollingNotificationPingDto {
33
+ pingScopes?: ShortPollingNotificationScope[];
34
+ nextSyncToken: number;
35
+ }
@@ -0,0 +1,102 @@
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
+ export declare class AvailabilityEntity {
17
+ days: AvailabilityDaysEntity;
18
+ context?: AvailabilityContextEntity;
19
+ static fromDto(dto: AvailabilityDto): AvailabilityEntity;
20
+ }
21
+ export declare class AvailabilityContextEntity {
22
+ service: {
23
+ id: string;
24
+ duration: number;
25
+ };
26
+ timeZone?: string;
27
+ organization: string;
28
+ companies?: string[];
29
+ timeInterval: number;
30
+ maxAvailabilitiesPerSlots: number;
31
+ maxCheckPerSlots: number;
32
+ static fromDto(dto?: AvailabilityContextDto): AvailabilityContextEntity;
33
+ }
34
+ export declare type AvailabilityDaysRecordEntity = {
35
+ [key: string]: AvailabilityDaySlotEntity;
36
+ };
37
+ export declare class AvailabilityDaysEntity {
38
+ static fromDto(dto: AvailabilityDaysDto, timeZone?: string): AvailabilityDaysEntity;
39
+ }
40
+ export declare class AvailabilityDaySlotEntity {
41
+ day: string;
42
+ slots?: AvailabilityDaySlotItemEntity[];
43
+ static fromDto(dto: AvailabilityDaySlotDto, timeZone?: string): AvailabilityDaySlotEntity;
44
+ }
45
+ export declare class AvailabilityDaySlotItemEntity {
46
+ start: Date;
47
+ end?: Date;
48
+ locations?: AvailabilityDaySlotItemLocationEntity[];
49
+ static fromDto(dto: AvailabilityDaySlotItemDto, day: string, timeZone?: string): AvailabilityDaySlotItemEntity;
50
+ }
51
+ export declare class AvailabilityDaySlotItemLocationEntity {
52
+ companyId: string;
53
+ serviceId: string;
54
+ static fromDto(dto: AvailabilityDaySlotItemLocationDto): AvailabilityDaySlotItemLocationEntity;
55
+ }
56
+ declare type AvailabilityDaysRecordDto = {
57
+ [key: string]: AvailabilityDaySlotDto;
58
+ };
59
+ interface AvailabilityDaysDto extends AvailabilityDaysRecordDto {
60
+ }
61
+ export interface AvailabilityDto {
62
+ days: AvailabilityDaysRecordDto;
63
+ context?: AvailabilityContextDto;
64
+ }
65
+ interface AvailabilityContextDto {
66
+ service: {
67
+ id: string;
68
+ duration: number;
69
+ };
70
+ timeZone?: string;
71
+ organization: string;
72
+ companies?: string[];
73
+ timeInterval: number;
74
+ maxAvailabilitiesPerSlots: number;
75
+ maxCheckPerSlots: number;
76
+ }
77
+ interface AvailabilityDaySlotItemDto {
78
+ start: string;
79
+ end?: string;
80
+ locations?: AvailabilityDaySlotItemLocationEntity[];
81
+ }
82
+ interface AvailabilityDaySlotItemLocationDto {
83
+ companyId: string;
84
+ serviceId: string;
85
+ }
86
+ interface AvailabilityDaySlotDto {
87
+ day: string;
88
+ slots?: AvailabilityDaySlotItemDto[];
89
+ }
90
+ export interface AvailabilityFilterOptions {
91
+ day: string;
92
+ timeZone?: string;
93
+ staffId?: string;
94
+ staffGroupId?: string;
95
+ minAppointmentDate?: string;
96
+ maxAppointmentDate?: string;
97
+ preparationDuration?: number;
98
+ bufferDuration?: number;
99
+ companyId?: string;
100
+ location?: string;
101
+ }
102
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CalendarWorkingDayEntity, CalendarWorkingHourEntity, SettingsPeriodWorkingDayEntity, SettingsPeriodWorkingEntity, SettingsWorkingDayEntity, SettingsWorkingHoursEntity } from "./data/WorkingHours";
2
- import { AccountEntity, AccountPublicEntity, AccountSecuredEntity, AccountSettingsEntity, AclEntity, CalendarSettingsEntity, ProfileSettingsEntity, WhiteLabelSettingsPublicEntity } from './data/Account';
2
+ import { AccountEntity, AccountPublicEntity, AccountSecuredEntity, AccountSettingsEntity, AclEntity, CalendarSettingsEntity, ProfileSettingsEntity, WhiteLabelSettingsPublicEntity, AccountPropertiesEntity, AccountWidgetFiltersPublicEntity } from './data/Account';
3
3
  import { AddressEntity } from './data/Address';
4
4
  import { ImageEntity } from './data/Image';
5
5
  import { LinkEntity } from "@/data/Link";
@@ -27,7 +27,7 @@ import { WidgetError } from "@/service/public/WidgetError";
27
27
  import { ClientRight, ConferenceRight, FormRight, GlobalRight, PlanningRight, QueueRight, ReportRight, RightObject, RightsEntity, SchedulingRight, SettingsRight, WhiteLabelRight, WorkflowRight, WorkingPlanningRight } from './data/Rights';
28
28
  import { CompanySchedulingRightsEntity, SchedulingRightsEntity } from "./data/scheduling/SchedulingRights";
29
29
  import { NoteEntity } from "./data/Note";
30
- import { ShortPollingNotificationEntity } from "./data/ShortPollingNotification";
30
+ import { ShortPollingNotificationEntity, ShortPollingNotificationPingEntity } from "./data/ShortPollingNotification";
31
31
  import { NotificationStatusEntity } from "./data/NotificationStatus";
32
32
  import { FORM_FILE_EXTENSIONS, FORM_FILE_MAX_SIZE, FormBuilderEntity, FormBuilderPublicEntity, FormBuilderSecuredEntity, FormItemEntity, FormValueEntity, PagePublicEntity, WidgetFormEntity } from "./data/Form";
33
33
  import { QueueEntity, QueuePublicEntity, QueueSecuredEntity } from "./data/Queue";
@@ -82,13 +82,15 @@ import { ConferenceRegistrationResponseEntity, PrivacyConsentEntity, WidgetEntit
82
82
  import { LoginRealmEntity } from "./data/LoginRealm";
83
83
  import { NotificationEntity } from "./data/Notification";
84
84
  import { CompanySettingsEntity, CompanySettingsWidgetEntity } from "./data/CompanySettings";
85
+ import { AvailabilityEntity, AvailabilityDaySlotEntity, AvailabilityContextEntity, AvailabilityDaysEntity, AvailabilityDaySlotItemEntity, AvailabilityDaySlotItemLocationEntity } from "./data/scheduling/Availabilities";
86
+ import type { AvailabilityFilterOptions } from "./data/scheduling/Availabilities";
85
87
  import { setLang } from "@/service";
86
88
  export { AgendizeApi } from './agendizeApi';
87
89
  export { QUERY_TYPE } from '@/repository';
88
90
  export * from './utils/logger';
89
91
  import { PermissionEntity, PermissionRightEntity } from "@/data/account/Permission";
90
92
  import { ShareLinkResponseEntity, ShareLinkResponseItemEntity, ShareLinkEntity, ShareLinkRecipientEntity } from "@/data/action/ShareLink";
91
- export { setLang, AccountSettingsEntity, AclEntity, ProfileSettingsEntity, CalendarSettingsEntity, CalendarTeamEntity, AddressEntity, ImageEntity, CalendarEntity, ServiceTypeEntity, ContactEntity, ContactPhoneNumberEntity, ContactEmailAddressEntity, ContactAdditionalFieldEntity, ContactTagEntity, ContactAdvancedSearchEntity, type EventEntity, EventSecuredEntity, EventPublicEntity, EventType, EventStatus, FormItemEntity, FormValueEntity, FormResultStatusEntity, FORM_FILE_MAX_SIZE, FORM_FILE_EXTENSIONS, EventUpdateEntity, ApiErrors, AgendizeError, UserEntity, CalendarCompanyEntity, CalendarWorkingDayEntity, CalendarWorkingHourEntity, SettingsWorkingDayEntity, SettingsWorkingHoursEntity, SettingsPeriodWorkingEntity, SettingsPeriodWorkingDayEntity, FreeSlotItemSecuredEntity, PrivacyPolicyEntity, ServiceResourceEntity, StaffFormsEntity, RightsEntity, type SchedulingRight, type SettingsRight, type RightObject, type ReportRight, type QueueRight, type FormRight, type ClientRight, type WorkflowRight, type WorkingPlanningRight, type ConferenceRight, type PlanningRight, GlobalRight, CompanySchedulingRightsEntity, SchedulingRightsEntity, ActivityEntity, NoteEntity, ShortPollingNotificationEntity, NotificationStatusEntity, BrowserStorage, StorageKeys, BrowserStorageItemValue, EmployeeEntity, QueueRegistrationStatus, ResultStatusValues, ShortPollingNotificationEvent, ShortPollingNotificationReport, AppointmentActivityEntity, AppointmentUpdateStaffActivityEntity, AppointmentUpdateFormActivityEntity, AppointmentDeletionActivityEntity, AppointmentCreationActivityEntity, AppointmentUpdateDatesActivityEntity, AppointmentUpdateEndActivityEntity, AppointmentUpdateLocationActivityEntity, AppointmentUpdateNoteActivityEntity, AppointmentUpdateResourceActivityEntity, AppointmentUpdateServiceActivityEntity, AppointmentUpdateStartActivityEntity, AppointmentUpdateStatusActivityEntity, AppointmentUpdateClientActivityEntity, AppointmentChangeTypes, AppointmentActivityType, AppointmentActivitySourceType, TextMessageNotificationActivityEntity, EmailNotificationActivityEntity, FormResultActivityEntity, NoteActivityEntity, ConsentActivityEntity, CommonEnum, Gender, Title, Language, NotificationType, AdditionalFieldsEntity, WidgetUrlCipherEntity, DayProperty, PlanningEntity, PlanningWeekEntity, PlanningDayEntity, PlanningHourEntity, PromoteFieldEntity, PromoteFieldKey, EventFields, ReportsEntity, ReportDashboardEntity, ReportDashboardFilter, CompanyPerformanceEntity, UserSchedulesEntity, CompanyScheduleEntity, ScheduleWorkingDayEntity, ScheduleWorkingHourEntity, valuePromoteFieldFromContact, applyValueToField, getDefaultEventField, jsDateToYYYYMMDD, LogEntity, Action, ActionType, WorkingPlanningEntity, WorkingPlanningDayEntity, StaffWorkingPlanningEntity, OccupancyRateEntity, PeriodWithOccupancy, ChangelogEntity, ChangeEntity, ReportingExportResponseEntity, ReportingExportBodyEntity, ExportStatus, ShortenerEntity, type ConferenceEntity, ConferenceSecuredEntity, ConferenceLocationEntity, type ConferenceTagEntity, ConferenceTagSecuredEntity, ConferenceSubscriptionRulesEntity, type ConferenceSessionEntity, ConferenceSessionSecuredEntity, type ConferenceInviteeEntity, ConferenceInviteeSecuredEntity, type ConferenceSpeakerEntity, ConferenceSpeakerSecuredEntity, type ConferenceFormEntity, type ConferenceRegistrationEntity, ConferenceRegistrationPublicEntity, ConferenceClientEntity, ConferenceRegistrationResponseEntity, PrivacyConsentEntity, AccountLightEntity, ConferenceLightEntity, ConferenceMergedTagEntity, WidgetEntity, getApiErrorValueFromName, type ConferenceRegistrationCancelEntity, ConferenceRegistrationCancelSecuredEntity, ConferenceRegistrationCancelPublicEntity, CustomStatusEntity, ConferenceSessionSearchEntity, ConferenceSessionsSearchEntity, ConferenceSessionsSearchBodyEntity, EventSearchEntity, EventSearchLocationEntity, EventSearchCompanyEntity, EventSearchContactEntity, EventSearchServiceEntity, EventSearchStaffEntity, EventSearchPageEntity, EventSearchBodyEntity, EventSearchStatusEntity, type EventSearchOption, EventSearchBodyCompanyEntity, EventSearchConflictEntity, EventSearchConflictReason, EventSearchConflictSource, ShortPollingNotificationScope, SettingsEntity, IntegrationEntity, ConnectorEntity, DashboardStructureEntity, DashboardWidgetEntity, DashboardType, DashboardKey, ContactMatchingType, CRMSettingsEntity, CRMSettingsSyncEntity, HelpEntity, HelpDataEntity, LoginProviderEntity, WidgetUrlCipherInputEntity, WidgetFormEntity, WidgetFormFieldsAPIProperties, type CompanyEntity, CompanySecuredEntity, CompanyPublicEntity, type StaffEntity, StaffSecuredEntity, StaffPublicEntity, type StaffGroupEntity, StaffGroupSecuredEntity, StaffGroupPublicEntity, type ServiceEntity, ServiceSecuredEntity, ServicePublicEntity, type ServicesListEntity, ServicesListSecuredEntity, ServicesListPublicEntity, type ServiceGroupEntity, ServiceGroupPublicEntity, ServiceGroupSecuredEntity, type QueueEntity, QueueSecuredEntity, QueuePublicEntity, type QueueRegistrationEntity, QueueRegistrationSecuredEntity, QueueRegistrationPublicEntity, type QueueRegistrationResultEntity, QueueRegistrationResultSecuredEntity, QueueRegistrationResultPublicEntity, type FormBuilderEntity, FormBuilderPublicEntity, FormBuilderSecuredEntity, type FormResultEntity, FormResultPublicEntity, FormResultSecuredEntity, type AccountEntity, AccountPublicEntity, AccountSecuredEntity, type FreeSlotEntity, FreeSlotSecuredEntity, FreeSlotPublicEntity, FreeSlotMapPublicEntity, type FreeSlotsRecord, FreeSlotsFilterOptions, LinkEntity, WhiteLabelSettingsPublicEntity, PagePublicEntity, type WhiteLabelRight, LoginRealmEntity, WidgetError, NotificationEntity, CompanySettingsEntity, CompanySettingsWidgetEntity, PermissionEntity, PermissionRightEntity, ShareLinkResponseEntity, ShareLinkResponseItemEntity, ShareLinkEntity, ShareLinkRecipientEntity };
93
+ export { setLang, AccountSettingsEntity, AclEntity, ProfileSettingsEntity, CalendarSettingsEntity, CalendarTeamEntity, AddressEntity, ImageEntity, CalendarEntity, ServiceTypeEntity, ContactEntity, ContactPhoneNumberEntity, ContactEmailAddressEntity, ContactAdditionalFieldEntity, ContactTagEntity, ContactAdvancedSearchEntity, type EventEntity, EventSecuredEntity, EventPublicEntity, EventType, EventStatus, FormItemEntity, FormValueEntity, FormResultStatusEntity, FORM_FILE_MAX_SIZE, FORM_FILE_EXTENSIONS, EventUpdateEntity, ApiErrors, AgendizeError, UserEntity, CalendarCompanyEntity, CalendarWorkingDayEntity, CalendarWorkingHourEntity, SettingsWorkingDayEntity, SettingsWorkingHoursEntity, SettingsPeriodWorkingEntity, SettingsPeriodWorkingDayEntity, FreeSlotItemSecuredEntity, PrivacyPolicyEntity, ServiceResourceEntity, StaffFormsEntity, RightsEntity, type SchedulingRight, type SettingsRight, type RightObject, type ReportRight, type QueueRight, type FormRight, type ClientRight, type WorkflowRight, type WorkingPlanningRight, type ConferenceRight, type PlanningRight, GlobalRight, CompanySchedulingRightsEntity, SchedulingRightsEntity, ActivityEntity, NoteEntity, ShortPollingNotificationEntity, ShortPollingNotificationPingEntity, NotificationStatusEntity, BrowserStorage, StorageKeys, BrowserStorageItemValue, EmployeeEntity, QueueRegistrationStatus, ResultStatusValues, ShortPollingNotificationEvent, ShortPollingNotificationReport, AppointmentActivityEntity, AppointmentUpdateStaffActivityEntity, AppointmentUpdateFormActivityEntity, AppointmentDeletionActivityEntity, AppointmentCreationActivityEntity, AppointmentUpdateDatesActivityEntity, AppointmentUpdateEndActivityEntity, AppointmentUpdateLocationActivityEntity, AppointmentUpdateNoteActivityEntity, AppointmentUpdateResourceActivityEntity, AppointmentUpdateServiceActivityEntity, AppointmentUpdateStartActivityEntity, AppointmentUpdateStatusActivityEntity, AppointmentUpdateClientActivityEntity, AppointmentChangeTypes, AppointmentActivityType, AppointmentActivitySourceType, TextMessageNotificationActivityEntity, EmailNotificationActivityEntity, FormResultActivityEntity, NoteActivityEntity, ConsentActivityEntity, CommonEnum, Gender, Title, Language, NotificationType, AdditionalFieldsEntity, WidgetUrlCipherEntity, DayProperty, PlanningEntity, PlanningWeekEntity, PlanningDayEntity, PlanningHourEntity, PromoteFieldEntity, PromoteFieldKey, EventFields, ReportsEntity, ReportDashboardEntity, ReportDashboardFilter, CompanyPerformanceEntity, UserSchedulesEntity, CompanyScheduleEntity, ScheduleWorkingDayEntity, ScheduleWorkingHourEntity, valuePromoteFieldFromContact, applyValueToField, getDefaultEventField, jsDateToYYYYMMDD, LogEntity, Action, ActionType, WorkingPlanningEntity, WorkingPlanningDayEntity, StaffWorkingPlanningEntity, OccupancyRateEntity, PeriodWithOccupancy, ChangelogEntity, ChangeEntity, ReportingExportResponseEntity, ReportingExportBodyEntity, ExportStatus, ShortenerEntity, type ConferenceEntity, ConferenceSecuredEntity, ConferenceLocationEntity, type ConferenceTagEntity, ConferenceTagSecuredEntity, ConferenceSubscriptionRulesEntity, type ConferenceSessionEntity, ConferenceSessionSecuredEntity, type ConferenceInviteeEntity, ConferenceInviteeSecuredEntity, type ConferenceSpeakerEntity, ConferenceSpeakerSecuredEntity, type ConferenceFormEntity, type ConferenceRegistrationEntity, ConferenceRegistrationPublicEntity, ConferenceClientEntity, ConferenceRegistrationResponseEntity, PrivacyConsentEntity, AccountLightEntity, ConferenceLightEntity, ConferenceMergedTagEntity, WidgetEntity, getApiErrorValueFromName, type ConferenceRegistrationCancelEntity, ConferenceRegistrationCancelSecuredEntity, ConferenceRegistrationCancelPublicEntity, CustomStatusEntity, ConferenceSessionSearchEntity, ConferenceSessionsSearchEntity, ConferenceSessionsSearchBodyEntity, EventSearchEntity, EventSearchLocationEntity, EventSearchCompanyEntity, EventSearchContactEntity, EventSearchServiceEntity, EventSearchStaffEntity, EventSearchPageEntity, EventSearchBodyEntity, EventSearchStatusEntity, type EventSearchOption, EventSearchBodyCompanyEntity, EventSearchConflictEntity, EventSearchConflictReason, EventSearchConflictSource, ShortPollingNotificationScope, SettingsEntity, IntegrationEntity, ConnectorEntity, DashboardStructureEntity, DashboardWidgetEntity, DashboardType, DashboardKey, ContactMatchingType, CRMSettingsEntity, CRMSettingsSyncEntity, HelpEntity, HelpDataEntity, LoginProviderEntity, WidgetUrlCipherInputEntity, WidgetFormEntity, WidgetFormFieldsAPIProperties, type CompanyEntity, CompanySecuredEntity, CompanyPublicEntity, type StaffEntity, StaffSecuredEntity, StaffPublicEntity, type StaffGroupEntity, StaffGroupSecuredEntity, StaffGroupPublicEntity, type ServiceEntity, ServiceSecuredEntity, ServicePublicEntity, type ServicesListEntity, ServicesListSecuredEntity, ServicesListPublicEntity, type ServiceGroupEntity, ServiceGroupPublicEntity, ServiceGroupSecuredEntity, type QueueEntity, QueueSecuredEntity, QueuePublicEntity, type QueueRegistrationEntity, QueueRegistrationSecuredEntity, QueueRegistrationPublicEntity, type QueueRegistrationResultEntity, QueueRegistrationResultSecuredEntity, QueueRegistrationResultPublicEntity, type FormBuilderEntity, FormBuilderPublicEntity, FormBuilderSecuredEntity, type FormResultEntity, FormResultPublicEntity, FormResultSecuredEntity, type AccountEntity, AccountPublicEntity, AccountSecuredEntity, type FreeSlotEntity, FreeSlotSecuredEntity, FreeSlotPublicEntity, FreeSlotMapPublicEntity, type FreeSlotsRecord, FreeSlotsFilterOptions, LinkEntity, WhiteLabelSettingsPublicEntity, AccountWidgetFiltersPublicEntity, PagePublicEntity, type WhiteLabelRight, LoginRealmEntity, WidgetError, NotificationEntity, CompanySettingsEntity, CompanySettingsWidgetEntity, PermissionEntity, PermissionRightEntity, AvailabilityEntity, AvailabilityDaySlotEntity, AvailabilityContextEntity, AvailabilityDaysEntity, AvailabilityDaySlotItemEntity, AvailabilityDaySlotItemLocationEntity, AvailabilityFilterOptions, AccountPropertiesEntity, ShareLinkResponseEntity, ShareLinkResponseItemEntity, ShareLinkEntity, ShareLinkRecipientEntity };
92
94
  export type { SecuredEntity, PublicEntity } from './data/Common';
93
95
  export { BodyEntity, SecuredBodyEntity, PublicBodyEntity } from './data/Common';
94
96
  export type { ResultStatus } from "./data/FormResultStatus";