@icure/cardinal-sdk 2.7.0 → 2.8.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.
@@ -1,5 +1,6 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, FilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
2
  import { CalendarItem, EncryptedCalendarItem } from '../model/CalendarItem.mjs';
3
+ import { CalendarItemOccupancy } from '../model/CalendarItemOccupancy.mjs';
3
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
4
5
  import { EntitySubscription } from '../subscription/EntitySubscription.mjs';
5
6
  import { EntitySubscriptionConfiguration } from '../subscription/EntitySubscriptionConfiguration.mjs';
@@ -57,6 +58,41 @@ export interface CalendarItemBasicApi {
57
58
  * @return an iterator that iterates over all calendarItems matching the provided filter.
58
59
  */
59
60
  filterCalendarItemsBySorted(filter: BaseSortableFilterOptions<CalendarItem>): Promise<PaginatedListIterator<EncryptedCalendarItem>>;
61
+ /**
62
+ *
63
+ * Computes the concurrent-occupancy histogram of the calendar items for the current data owner over the
64
+ * period [startDate]..[endDate] (fuzzy date-times, either bound may be null = open).
65
+ *
66
+ * Only calendar items whose whole interval fits within the search range are considered. By default, the
67
+ * range is exactly [startDate]..[endDate], so items starting before [startDate] or ending after [endDate]
68
+ * are ignored. Pass [extensionInDays] to widen the range by that many days on each side, which lets items
69
+ * that start shortly before [startDate] (contributing to the occupancy baseline) or end shortly after
70
+ * [endDate] be taken into account. Items reaching beyond the extended range are still ignored.
71
+ */
72
+ getCalendarItemsOccupancyByPeriodForSelf(startDate: number, endDate: number, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
73
+ /**
74
+ *
75
+ * Computes the concurrent-occupancy histogram of the calendar items of [hcPartyId] over the
76
+ * period [startDate]..[endDate] (fuzzy date-times, either bound may be null = open).
77
+ *
78
+ * Only calendar items whose whole interval fits within the search range are considered. By default, the
79
+ * range is exactly [startDate]..[endDate], so items starting before [startDate] or ending after [endDate]
80
+ * are ignored. Pass [extensionInDays] to widen the range by that many days on each side, which lets items
81
+ * that start shortly before [startDate] (contributing to the occupancy baseline) or end shortly after
82
+ * [endDate] be taken into account. Items reaching beyond the extended range are still ignored.
83
+ */
84
+ getCalendarItemsOccupancyByPeriodForHealthcareParty(startDate: number, endDate: number, hcPartyId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
85
+ /**
86
+ *
87
+ * Computes the concurrent-occupancy histogram of the calendar items of the agenda [agendaId] over the
88
+ * period [startDate]..[endDate] (fuzzy date-times, either bound may be null = open).
89
+ *
90
+ * Only calendar items whose whole interval fits within the search range are considered. By default, the range
91
+ * is exactly [startDate]..[endDate], you can pass a non-null [extensionInDays] to widen it by that many days on each side (e.g.
92
+ * to include items that start before [startDate] but are still open during the period). Items reaching beyond
93
+ * the extended range are ignored.
94
+ */
95
+ getCalendarItemsOccupancyByPeriodAndAgendaId(startDate: number, endDate: number, agendaId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
60
96
  /**
61
97
  *
62
98
  * Deletes a calendarItem. If you don't have write access to the calendarItem the method will fail.
@@ -1,5 +1,6 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
2
  import { CalendarItem, EncryptedCalendarItem } from '../model/CalendarItem.mjs';
3
+ import { CalendarItemOccupancy } from '../model/CalendarItemOccupancy.mjs';
3
4
  import { GroupScoped } from '../model/GroupScoped.mjs';
4
5
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
5
6
  export interface CalendarItemBasicInGroupApi {
@@ -23,6 +24,21 @@ export interface CalendarItemBasicInGroupApi {
23
24
  * In-group version of [CalendarItemBasicApi.filterCalendarItemsBySorted]
24
25
  */
25
26
  filterCalendarItemsBySorted(groupId: string, filter: BaseSortableFilterOptions<CalendarItem>): Promise<PaginatedListIterator<GroupScoped<EncryptedCalendarItem>>>;
27
+ /**
28
+ *
29
+ * In-group version of [getCalendarItemsOccupancyByPeriodForSelf].
30
+ */
31
+ getCalendarItemsOccupancyByPeriodForSelf(groupId: string, startDate: number, endDate: number, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
32
+ /**
33
+ *
34
+ * In-group version of [getCalendarItemsOccupancyByPeriodForHealthcareParty].
35
+ */
36
+ getCalendarItemsOccupancyByPeriodForHealthcareParty(groupId: string, startDate: number, endDate: number, hcPartyId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
37
+ /**
38
+ *
39
+ * In-group version of [getCalendarItemsOccupancyByPeriodAndAgendaId].
40
+ */
41
+ getCalendarItemsOccupancyByPeriodAndAgendaId(groupId: string, startDate: number, endDate: number, agendaId: string, extensionInDays: number | undefined): Promise<Array<CalendarItemOccupancy>>;
26
42
  /**
27
43
  *
28
44
  * In-group version of [CalendarItemBasicFlavourlessApi.deleteCalendarItemById]