@blazeo.com/appointment-client 1.0.5 → 1.0.6
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/blazeo.com-appointment-client-1.0.6.tgz +0 -0
- package/dist/calendar/blazeoCalendarRelationMethods.d.ts +4 -36
- package/dist/calendar/blazeoCalendarRelationMethods.js +0 -1
- package/dist/calendar/buildUnifiedCalendarView.d.ts +31 -0
- package/dist/calendar/buildUnifiedCalendarView.js +265 -0
- package/dist/calendar/calendarCreation.d.ts +27 -0
- package/dist/calendar/calendarCreation.js +167 -0
- package/dist/calendar/calendarCreationFacade.d.ts +4 -13
- package/dist/calendar/calendarCreationFacade.js +3 -5
- package/dist/calendar/createCalendar.d.ts +67 -37
- package/dist/calendar/createCalendar.js +1 -3
- package/dist/calendar/fetchCalendarDetails.d.ts +73 -18
- package/dist/calendar/fetchCalendarDetails.js +192 -51
- package/dist/calendar/fetchCalendarWithOpeningHours.d.ts +34 -21
- package/dist/calendar/fetchCalendarWithOpeningHours.js +95 -75
- package/dist/calendar/getAllParticipantOpeningHours.d.ts +19 -0
- package/dist/calendar/getAllParticipantOpeningHours.js +17 -0
- package/dist/calendar/getOpeningHours.d.ts +5 -0
- package/dist/calendar/getOpeningHours.js +9 -0
- package/dist/calendar/getParticipantOpeningHours.d.ts +37 -0
- package/dist/calendar/getParticipantOpeningHours.js +43 -0
- package/dist/calendar/getParticipants.d.ts +4 -0
- package/dist/calendar/getParticipants.js +8 -0
- package/dist/calendar/mapCalendarBoToBlazeoSnapshot.d.ts +9 -9
- package/dist/calendar/mapCalendarBoToBlazeoSnapshot.js +43 -43
- package/dist/calendar/mapCalendarToBlazeoSnapshot.d.ts +22 -3
- package/dist/calendar/mapCalendarToBlazeoSnapshot.js +0 -1
- package/dist/config/applyBlazeoClientConfig.d.ts +2 -2
- package/dist/config/applyBlazeoClientConfig.js +13 -13
- package/dist/config/applyBlazeoDefaults.d.ts +0 -1
- package/dist/config/applyBlazeoDefaults.js +0 -1
- package/dist/config/blazeo.config.d.ts +10 -10
- package/dist/config/blazeo.config.js +10 -10
- package/dist/config/blazeoClientDefaults.d.ts +1 -2
- package/dist/config/blazeoClientDefaults.js +0 -1
- package/dist/config/initializeAppointmentClient.d.ts +4 -28
- package/dist/config/initializeAppointmentClient.js +5 -24
- package/dist/events/appointmentEventFacade.d.ts +55 -32
- package/dist/events/appointmentEventFacade.js +5 -10
- package/dist/events/mapAppointmentToEventSnapshot.d.ts +1 -4
- package/dist/events/mapAppointmentToEventSnapshot.js +0 -1
- package/dist/exampleData.d.ts +114 -10
- package/dist/exampleData.js +4 -5
- package/dist/facade/calendarCreationFacade.d.ts +39 -39
- package/dist/facade/calendarCreationFacade.js +95 -95
- package/dist/facade/mapCalendarBOToSnapshot.d.ts +9 -9
- package/dist/facade/mapCalendarBOToSnapshot.js +43 -43
- package/dist/facades/index.d.ts +11 -11
- package/dist/facades/index.js +11 -11
- package/dist/index.d.ts +23 -82
- package/dist/index.js +21 -33
- package/dist/models/CalendarRootModel.d.ts +36 -11
- package/dist/models/CalendarRootModel.js +22 -5
- package/dist/models/CalendarSlotModel.d.ts +8 -8
- package/dist/models/CalendarSlotModel.js +7 -7
- package/dist/models/EventModel.d.ts +10 -10
- package/dist/models/EventModel.js +9 -9
- package/dist/models/ParticipantModel.d.ts +8 -8
- package/dist/models/ParticipantModel.js +7 -7
- package/dist/models/index.d.ts +4 -4
- package/dist/models/index.js +4 -4
- package/dist/types/appointment.d.ts +27 -27
- package/dist/types/appointment.js +5 -5
- package/dist/types/calendar.d.ts +51 -51
- package/dist/types/calendar.js +5 -5
- package/dist/types/calendarBo.d.ts +61 -61
- package/dist/types/calendarBo.js +5 -5
- package/package.json +8 -2
- package/sample/build_error.txt +0 -0
- package/sample/demo.js +70 -0
- package/sample/package-lock.json +5 -2
- package/sample/package.json +3 -1
- package/sample/scripts/getInfoByCalendar.mjs +36 -0
- package/sample/scripts/getParticipantOpeningHours.mjs +48 -0
- package/sample/src/AllParticipantOpeningHoursTab.jsx +73 -0
- package/sample/src/App2.jsx +39 -2
- package/sample/src/BlazeoConnectionSettings.jsx +1 -1
- package/sample/src/FetchCalendarTab.jsx +70 -20
- package/sample/src/OpeningHoursTab.jsx +78 -0
- package/sample/src/ParticipantInfoTab.jsx +72 -0
- package/sample/src/ParticipantOpeningHoursTab.jsx +88 -0
- package/sample/src/ParticipantTab.jsx +2 -2
- package/src/calendar/blazeoCalendarRelationMethods.ts +19 -0
- package/src/calendar/buildUnifiedCalendarView.ts +322 -0
- package/src/calendar/calendarCreation.ts +179 -0
- package/src/calendar/createCalendar.ts +243 -0
- package/src/calendar/fetchCalendarDetails.ts +226 -0
- package/src/calendar/fetchCalendarWithOpeningHours.ts +99 -0
- package/src/calendar/getAllParticipantOpeningHours.ts +22 -0
- package/src/calendar/getOpeningHours.ts +10 -0
- package/src/calendar/getParticipantOpeningHours.ts +46 -0
- package/src/calendar/getParticipants.ts +9 -0
- package/src/calendar/mapCalendarToBlazeoSnapshot.ts +46 -0
- package/src/config/applyBlazeoDefaults.ts +13 -0
- package/src/config/blazeoClientDefaults.ts +11 -0
- package/src/config/initializeAppointmentClient.ts +18 -0
- package/src/events/appointmentEventFacade.ts +148 -0
- package/src/events/mapAppointmentToEventSnapshot.ts +65 -0
- package/src/exampleData.ts +79 -0
- package/src/index.ts +45 -0
- package/src/models/CalendarRootModel.ts +60 -0
- package/tsconfig.json +16 -0
- package/blazeo.com-appointment-client-1.0.5.tgz +0 -0
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
/** Default enum values aligned with ApexFlows / Blazeo (`AssignmentMethod`, `Unit`). */
|
|
2
|
-
const DEFAULT_ASSIGNMENT_METHOD = 1;
|
|
3
|
-
const DEFAULT_UNIT_MINUTES = 1;
|
|
4
|
-
/**
|
|
5
|
-
* For Blazeo `Calendar` MST: `types.optional(types.number)` accepts `undefined` (uses default)
|
|
6
|
-
* but not `null`. Coerce null/absent to `undefined`.
|
|
7
|
-
*/
|
|
8
|
-
function optionalNumber(v) {
|
|
9
|
-
return v == null ? undefined : v;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Maps Apex `CalendarBO`-shaped input to a snapshot for
|
|
13
|
-
* {@link CalendarModel.create} from `@blazeo.com/calendar-client`.
|
|
14
|
-
*
|
|
15
|
-
* Only fields that exist on Blazeo's `Calendar` model are included so MST does not receive
|
|
16
|
-
* unknown keys or invalid `null`s on optional numbers.
|
|
17
|
-
*/
|
|
18
|
-
export function mapCalendarBOToSnapshot(bo) {
|
|
19
|
-
const calendarId = bo.calendarId ?? bo.thirdPartyCalendarId ?? "new";
|
|
20
|
-
return {
|
|
21
|
-
id: bo.serverId == null ? undefined : bo.serverId,
|
|
22
|
-
companyKey: bo.companyKey ?? null,
|
|
23
|
-
calendarId,
|
|
24
|
-
name: bo.name ?? null,
|
|
25
|
-
timeZoneId: bo.timeZoneId ?? null,
|
|
26
|
-
purpose: bo.purpose ?? bo.bookingPageTitle ?? "",
|
|
27
|
-
description: bo.description ?? null,
|
|
28
|
-
assignmentMethod: bo.assignmentMethod ?? bo.assignmentType ?? DEFAULT_ASSIGNMENT_METHOD,
|
|
29
|
-
duration: optionalNumber(bo.duration) ?? 30,
|
|
30
|
-
durationUnit: optionalNumber(bo.durationUnit) ?? DEFAULT_UNIT_MINUTES,
|
|
31
|
-
minimumBookingNotice: optionalNumber(bo.minimumBookingNotice) ?? 0,
|
|
32
|
-
minimumBookingNoticeUnit: optionalNumber(bo.minimumBookingNoticeUnit) ?? DEFAULT_UNIT_MINUTES,
|
|
33
|
-
minimumCancelationNotice: optionalNumber(bo.minimumCancelationNotice) ?? 0,
|
|
34
|
-
minimumCancelationNoticeUnit: optionalNumber(bo.minimumCancelationNoticeUnit) ?? DEFAULT_UNIT_MINUTES,
|
|
35
|
-
futureLimit: optionalNumber(bo.futureLimit) ?? 0,
|
|
36
|
-
futureLimitUnit: optionalNumber(bo.futureLimitUnit) ?? 3,
|
|
37
|
-
bufferTime: optionalNumber(bo.bufferTime),
|
|
38
|
-
bufferTimeUnit: optionalNumber(bo.bufferTimeUnit) ?? DEFAULT_UNIT_MINUTES,
|
|
39
|
-
bookingLimit: optionalNumber(bo.bookingLimit),
|
|
40
|
-
createdOn: bo.createdOn ?? null,
|
|
41
|
-
modifiedOn: bo.modifiedOn ?? null,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
1
|
+
/** Default enum values aligned with ApexFlows / Blazeo (`AssignmentMethod`, `Unit`). */
|
|
2
|
+
const DEFAULT_ASSIGNMENT_METHOD = 1;
|
|
3
|
+
const DEFAULT_UNIT_MINUTES = 1;
|
|
4
|
+
/**
|
|
5
|
+
* For Blazeo `Calendar` MST: `types.optional(types.number)` accepts `undefined` (uses default)
|
|
6
|
+
* but not `null`. Coerce null/absent to `undefined`.
|
|
7
|
+
*/
|
|
8
|
+
function optionalNumber(v) {
|
|
9
|
+
return v == null ? undefined : v;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Maps Apex `CalendarBO`-shaped input to a snapshot for
|
|
13
|
+
* {@link CalendarModel.create} from `@blazeo.com/calendar-client`.
|
|
14
|
+
*
|
|
15
|
+
* Only fields that exist on Blazeo's `Calendar` model are included so MST does not receive
|
|
16
|
+
* unknown keys or invalid `null`s on optional numbers.
|
|
17
|
+
*/
|
|
18
|
+
export function mapCalendarBOToSnapshot(bo) {
|
|
19
|
+
const calendarId = bo.calendarId ?? bo.thirdPartyCalendarId ?? "new";
|
|
20
|
+
return {
|
|
21
|
+
id: bo.serverId == null ? undefined : bo.serverId,
|
|
22
|
+
companyKey: bo.companyKey ?? null,
|
|
23
|
+
calendarId,
|
|
24
|
+
name: bo.name ?? null,
|
|
25
|
+
timeZoneId: bo.timeZoneId ?? null,
|
|
26
|
+
purpose: bo.purpose ?? bo.bookingPageTitle ?? "",
|
|
27
|
+
description: bo.description ?? null,
|
|
28
|
+
assignmentMethod: bo.assignmentMethod ?? bo.assignmentType ?? DEFAULT_ASSIGNMENT_METHOD,
|
|
29
|
+
duration: optionalNumber(bo.duration) ?? 30,
|
|
30
|
+
durationUnit: optionalNumber(bo.durationUnit) ?? DEFAULT_UNIT_MINUTES,
|
|
31
|
+
minimumBookingNotice: optionalNumber(bo.minimumBookingNotice) ?? 0,
|
|
32
|
+
minimumBookingNoticeUnit: optionalNumber(bo.minimumBookingNoticeUnit) ?? DEFAULT_UNIT_MINUTES,
|
|
33
|
+
minimumCancelationNotice: optionalNumber(bo.minimumCancelationNotice) ?? 0,
|
|
34
|
+
minimumCancelationNoticeUnit: optionalNumber(bo.minimumCancelationNoticeUnit) ?? DEFAULT_UNIT_MINUTES,
|
|
35
|
+
futureLimit: optionalNumber(bo.futureLimit) ?? 0,
|
|
36
|
+
futureLimitUnit: optionalNumber(bo.futureLimitUnit) ?? 3,
|
|
37
|
+
bufferTime: optionalNumber(bo.bufferTime),
|
|
38
|
+
bufferTimeUnit: optionalNumber(bo.bufferTimeUnit) ?? DEFAULT_UNIT_MINUTES,
|
|
39
|
+
bookingLimit: optionalNumber(bo.bookingLimit),
|
|
40
|
+
createdOn: bo.createdOn ?? null,
|
|
41
|
+
modifiedOn: bo.modifiedOn ?? null,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
44
|
//# sourceMappingURL=mapCalendarBOToSnapshot.js.map
|
package/dist/facades/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public facade surface for `appointment-client`.
|
|
3
|
-
*
|
|
4
|
-
* Call {@link initializeAppointmentClient} from `../config/initializeAppointmentClient.js`
|
|
5
|
-
* before using these APIs in a host application.
|
|
6
|
-
*/
|
|
7
|
-
export { createCalendarAsync, updateCalendarAsync, deleteCalendarAsync, resolveBlazeoConnection, type BlazeoCalendarCreateResponse, type CreateCalendarOptions, type CreateCalendarResult, } from "../calendar/createCalendar.js";
|
|
8
|
-
export { CalendarCreationFacade, createCalendarWithRelationsAsync, updateCalendarWithRelationsAsync, resolveParticipantIdForOpeningHour, type CalendarWithRelationsResult, type CalendarWithRelationsSuccess, } from "../calendar/calendarCreationFacade.js";
|
|
9
|
-
export { addParticipantToCalendar, removeParticipantFromCalendar, saveCalendarOpeningHour, saveCalendarOpeningHoursBatch, type BlazeoCalendarForRelations, type BlazeoCalendarRelationResponse, } from "../calendar/blazeoCalendarRelationMethods.js";
|
|
10
|
-
export { createAppointmentEventAsync, rescheduleAppointmentEventAsync, cancelAppointmentEventAsync, type AppointmentEventOptions, type AppointmentEventResult, type AppointmentEventSuccess, type AppointmentEventFailure, type BlazeoEventApiResponse, } from "../events/appointmentEventFacade.js";
|
|
11
|
-
export { mapAppointmentToEventSnapshot, type AppointmentEventMappingMode, } from "../events/mapAppointmentToEventSnapshot.js";
|
|
1
|
+
/**
|
|
2
|
+
* Public facade surface for `appointment-client`.
|
|
3
|
+
*
|
|
4
|
+
* Call {@link initializeAppointmentClient} from `../config/initializeAppointmentClient.js`
|
|
5
|
+
* before using these APIs in a host application.
|
|
6
|
+
*/
|
|
7
|
+
export { createCalendarAsync, updateCalendarAsync, deleteCalendarAsync, resolveBlazeoConnection, type BlazeoCalendarCreateResponse, type CreateCalendarOptions, type CreateCalendarResult, } from "../calendar/createCalendar.js";
|
|
8
|
+
export { CalendarCreationFacade, createCalendarWithRelationsAsync, updateCalendarWithRelationsAsync, resolveParticipantIdForOpeningHour, type CalendarWithRelationsResult, type CalendarWithRelationsSuccess, } from "../calendar/calendarCreationFacade.js";
|
|
9
|
+
export { addParticipantToCalendar, removeParticipantFromCalendar, saveCalendarOpeningHour, saveCalendarOpeningHoursBatch, type BlazeoCalendarForRelations, type BlazeoCalendarRelationResponse, } from "../calendar/blazeoCalendarRelationMethods.js";
|
|
10
|
+
export { createAppointmentEventAsync, rescheduleAppointmentEventAsync, cancelAppointmentEventAsync, type AppointmentEventOptions, type AppointmentEventResult, type AppointmentEventSuccess, type AppointmentEventFailure, type BlazeoEventApiResponse, } from "../events/appointmentEventFacade.js";
|
|
11
|
+
export { mapAppointmentToEventSnapshot, type AppointmentEventMappingMode, } from "../events/mapAppointmentToEventSnapshot.js";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/facades/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public facade surface for `appointment-client`.
|
|
3
|
-
*
|
|
4
|
-
* Call {@link initializeAppointmentClient} from `../config/initializeAppointmentClient.js`
|
|
5
|
-
* before using these APIs in a host application.
|
|
6
|
-
*/
|
|
7
|
-
export { createCalendarAsync, updateCalendarAsync, deleteCalendarAsync, resolveBlazeoConnection, } from "../calendar/createCalendar.js";
|
|
8
|
-
export { CalendarCreationFacade, createCalendarWithRelationsAsync, updateCalendarWithRelationsAsync, resolveParticipantIdForOpeningHour, } from "../calendar/calendarCreationFacade.js";
|
|
9
|
-
export { addParticipantToCalendar, removeParticipantFromCalendar, saveCalendarOpeningHour, saveCalendarOpeningHoursBatch, } from "../calendar/blazeoCalendarRelationMethods.js";
|
|
10
|
-
export { createAppointmentEventAsync, rescheduleAppointmentEventAsync, cancelAppointmentEventAsync, } from "../events/appointmentEventFacade.js";
|
|
11
|
-
export { mapAppointmentToEventSnapshot, } from "../events/mapAppointmentToEventSnapshot.js";
|
|
1
|
+
/**
|
|
2
|
+
* Public facade surface for `appointment-client`.
|
|
3
|
+
*
|
|
4
|
+
* Call {@link initializeAppointmentClient} from `../config/initializeAppointmentClient.js`
|
|
5
|
+
* before using these APIs in a host application.
|
|
6
|
+
*/
|
|
7
|
+
export { createCalendarAsync, updateCalendarAsync, deleteCalendarAsync, resolveBlazeoConnection, } from "../calendar/createCalendar.js";
|
|
8
|
+
export { CalendarCreationFacade, createCalendarWithRelationsAsync, updateCalendarWithRelationsAsync, resolveParticipantIdForOpeningHour, } from "../calendar/calendarCreationFacade.js";
|
|
9
|
+
export { addParticipantToCalendar, removeParticipantFromCalendar, saveCalendarOpeningHour, saveCalendarOpeningHoursBatch, } from "../calendar/blazeoCalendarRelationMethods.js";
|
|
10
|
+
export { createAppointmentEventAsync, rescheduleAppointmentEventAsync, cancelAppointmentEventAsync, } from "../events/appointmentEventFacade.js";
|
|
11
|
+
export { mapAppointmentToEventSnapshot, } from "../events/mapAppointmentToEventSnapshot.js";
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,94 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
* `@blazeo.com/appointment-client` — Blazeo calendar / appointment facades.
|
|
3
|
-
*
|
|
4
|
-
* In a host app, call {@link initializeAppointmentClient} once with your API `baseUrl`
|
|
5
|
-
* (and optional `consumer`) before using any facade that performs HTTP calls.
|
|
6
|
-
* File-based defaults (`blazeoClientConfig`) are optional; use {@link applyBlazeoClientConfig}
|
|
7
|
-
* if you keep defaults in `blazeoClientDefaults.ts` and want them applied after import.
|
|
8
|
-
*/
|
|
9
|
-
import { initializeAppointmentClient, isAppointmentClientConfigured, type AppointmentClientConnectOptions } from "./config/initializeAppointmentClient.js";
|
|
10
|
-
export declare const packageName = "appointment-client";
|
|
11
|
-
export { initializeAppointmentClient, isAppointmentClientConfigured, type AppointmentClientConnectOptions, };
|
|
12
|
-
export { applyBlazeoClientConfig } from "./config/applyBlazeoDefaults.js";
|
|
1
|
+
export { initializeAppointmentClient, isAppointmentClientConfigured } from "./config/initializeAppointmentClient.js";
|
|
13
2
|
export { blazeoClientConfig } from "./config/blazeoClientDefaults.js";
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export {
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
|
|
26
|
-
export {
|
|
3
|
+
export { applyBlazeoClientConfig } from "./config/applyBlazeoDefaults.js";
|
|
4
|
+
export { createCalendarRoot, CalendarRootModel, CalendarSlotModel, EventModel, ParticipantModel } from "./models/CalendarRootModel.js";
|
|
5
|
+
export { fetchCalendarDetails, fetchCalendarBundle, normalizeOpeningHours } from "./calendar/fetchCalendarDetails.js";
|
|
6
|
+
export { buildUnifiedCalendarView, type UnifiedCalendarMember, type UnifiedCalendarView, type UnifiedOpeningHourRow, type UnifiedParticipantWithHours, } from "./calendar/buildUnifiedCalendarView.js";
|
|
7
|
+
export { fetchCalendarWithOpeningHours, unwrapCalendarGetData, pickOpeningHoursArrayFromCalendarPayload, normalizeParticipantOpeningHoursResponse } from "./calendar/fetchCalendarWithOpeningHours.js";
|
|
8
|
+
export { getOpeningHours } from "./calendar/getOpeningHours.js";
|
|
9
|
+
export { getParticipantOpeningHours } from "./calendar/getParticipantOpeningHours.js";
|
|
10
|
+
export { getAllParticipantOpeningHours } from "./calendar/getAllParticipantOpeningHours.js";
|
|
11
|
+
export { getParticipants } from "./calendar/getParticipants.js";
|
|
12
|
+
export { getExampleSlots, getExampleEvents, getExampleParticipants, getExampleCalendarRoot, getExampleCalendarRootSnapshot } from "./exampleData.js";
|
|
13
|
+
export { createCalendarAsync, updateCalendarAsync, deleteCalendarAsync, resolveBlazeoConnection } from "./calendar/createCalendar.js";
|
|
14
|
+
export { CalendarCreation, createCalendarWithRelationsAsync, updateCalendarWithRelationsAsync, resolveParticipantIdForOpeningHour } from "./calendar/calendarCreation.js";
|
|
15
|
+
export { addParticipantToCalendar, removeParticipantFromCalendar, saveCalendarOpeningHour, saveCalendarOpeningHoursBatch } from "./calendar/blazeoCalendarRelationMethods.js";
|
|
16
|
+
export { createAppointmentEventAsync, rescheduleAppointmentEventAsync, cancelAppointmentEventAsync } from "./events/appointmentEventFacade.js";
|
|
17
|
+
export { mapAppointmentToEventSnapshot } from "./events/mapAppointmentToEventSnapshot.js";
|
|
18
|
+
export { CalendarModel, EventModel as CoreEventModel, ParticipantModel as CoreParticipantModel, CalendarParticipantModel, configure, getConfig } from "@blazeo.com/calendar-client";
|
|
19
|
+
export declare const packageName = "@blazeo.com/appointment-client";
|
|
27
20
|
export declare class CalendarClient {
|
|
28
|
-
|
|
29
|
-
/** Same as {@link initializeAppointmentClient} — sugar for class-style apps. */
|
|
30
|
-
connect(options: AppointmentClientConnectOptions): void;
|
|
21
|
+
name: string;
|
|
31
22
|
getExampleSlots(): (import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
32
23
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
33
|
-
title: import("mobx-state-tree").ISimpleType<string
|
|
24
|
+
title: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
34
25
|
start: import("mobx-state-tree").ISimpleType<string>;
|
|
35
26
|
end: import("mobx-state-tree").ISimpleType<string>;
|
|
27
|
+
isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
36
28
|
}> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
37
29
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
38
|
-
title: import("mobx-state-tree").ISimpleType<string
|
|
30
|
+
title: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
39
31
|
start: import("mobx-state-tree").ISimpleType<string>;
|
|
40
32
|
end: import("mobx-state-tree").ISimpleType<string>;
|
|
33
|
+
isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
41
34
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
|
|
42
|
-
getExampleRoot(): import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
43
|
-
slots: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
44
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
45
|
-
title: import("mobx-state-tree").ISimpleType<string>;
|
|
46
|
-
start: import("mobx-state-tree").ISimpleType<string>;
|
|
47
|
-
end: import("mobx-state-tree").ISimpleType<string>;
|
|
48
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
49
|
-
events: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
50
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
51
|
-
title: import("mobx-state-tree").ISimpleType<string>;
|
|
52
|
-
calendarId: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
53
|
-
startsAt: import("mobx-state-tree").ISimpleType<string>;
|
|
54
|
-
endsAt: import("mobx-state-tree").ISimpleType<string>;
|
|
55
|
-
participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
56
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
57
|
-
participants: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
58
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
59
|
-
name: import("mobx-state-tree").ISimpleType<string>;
|
|
60
|
-
email: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
61
|
-
role: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
62
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
63
|
-
}> & {
|
|
64
|
-
removeSlot(id: string): void;
|
|
65
|
-
removeEvent(id: string): void;
|
|
66
|
-
removeParticipant(id: string): void;
|
|
67
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
68
|
-
slots: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
69
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
70
|
-
title: import("mobx-state-tree").ISimpleType<string>;
|
|
71
|
-
start: import("mobx-state-tree").ISimpleType<string>;
|
|
72
|
-
end: import("mobx-state-tree").ISimpleType<string>;
|
|
73
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
74
|
-
events: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
75
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
76
|
-
title: import("mobx-state-tree").ISimpleType<string>;
|
|
77
|
-
calendarId: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
78
|
-
startsAt: import("mobx-state-tree").ISimpleType<string>;
|
|
79
|
-
endsAt: import("mobx-state-tree").ISimpleType<string>;
|
|
80
|
-
participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
81
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
82
|
-
participants: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
83
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
84
|
-
name: import("mobx-state-tree").ISimpleType<string>;
|
|
85
|
-
email: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
86
|
-
role: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
87
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
88
|
-
}, {
|
|
89
|
-
removeSlot(id: string): void;
|
|
90
|
-
removeEvent(id: string): void;
|
|
91
|
-
removeParticipant(id: string): void;
|
|
92
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
93
35
|
}
|
|
94
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,39 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* In a host app, call {@link initializeAppointmentClient} once with your API `baseUrl`
|
|
5
|
-
* (and optional `consumer`) before using any facade that performs HTTP calls.
|
|
6
|
-
* File-based defaults (`blazeoClientConfig`) are optional; use {@link applyBlazeoClientConfig}
|
|
7
|
-
* if you keep defaults in `blazeoClientDefaults.ts` and want them applied after import.
|
|
8
|
-
*/
|
|
9
|
-
import { initializeAppointmentClient, isAppointmentClientConfigured, } from "./config/initializeAppointmentClient.js";
|
|
10
|
-
import { getExampleCalendarRoot, getExampleSlots } from "./exampleData.js";
|
|
11
|
-
export const packageName = "appointment-client";
|
|
12
|
-
export { initializeAppointmentClient, isAppointmentClientConfigured, };
|
|
13
|
-
export { applyBlazeoClientConfig } from "./config/applyBlazeoDefaults.js";
|
|
1
|
+
import { getExampleSlots } from "./exampleData.js";
|
|
2
|
+
export { initializeAppointmentClient, isAppointmentClientConfigured } from "./config/initializeAppointmentClient.js";
|
|
14
3
|
export { blazeoClientConfig } from "./config/blazeoClientDefaults.js";
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export {
|
|
19
|
-
export { fetchCalendarWithOpeningHours,
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
|
|
25
|
-
export
|
|
4
|
+
export { applyBlazeoClientConfig } from "./config/applyBlazeoDefaults.js";
|
|
5
|
+
export { createCalendarRoot, CalendarRootModel, CalendarSlotModel, EventModel, ParticipantModel } from "./models/CalendarRootModel.js";
|
|
6
|
+
export { fetchCalendarDetails, fetchCalendarBundle, normalizeOpeningHours } from "./calendar/fetchCalendarDetails.js";
|
|
7
|
+
export { buildUnifiedCalendarView, } from "./calendar/buildUnifiedCalendarView.js";
|
|
8
|
+
export { fetchCalendarWithOpeningHours, unwrapCalendarGetData, pickOpeningHoursArrayFromCalendarPayload, normalizeParticipantOpeningHoursResponse } from "./calendar/fetchCalendarWithOpeningHours.js";
|
|
9
|
+
export { getOpeningHours } from "./calendar/getOpeningHours.js";
|
|
10
|
+
export { getParticipantOpeningHours } from "./calendar/getParticipantOpeningHours.js";
|
|
11
|
+
export { getAllParticipantOpeningHours } from "./calendar/getAllParticipantOpeningHours.js";
|
|
12
|
+
export { getParticipants } from "./calendar/getParticipants.js";
|
|
13
|
+
export { getExampleSlots, getExampleEvents, getExampleParticipants, getExampleCalendarRoot, getExampleCalendarRootSnapshot } from "./exampleData.js";
|
|
14
|
+
// Re-export core models from calendar-client for convenience
|
|
15
|
+
export { createCalendarAsync, updateCalendarAsync, deleteCalendarAsync, resolveBlazeoConnection } from "./calendar/createCalendar.js";
|
|
16
|
+
export { CalendarCreation, createCalendarWithRelationsAsync, updateCalendarWithRelationsAsync, resolveParticipantIdForOpeningHour } from "./calendar/calendarCreation.js";
|
|
17
|
+
export { addParticipantToCalendar, removeParticipantFromCalendar, saveCalendarOpeningHour, saveCalendarOpeningHoursBatch } from "./calendar/blazeoCalendarRelationMethods.js";
|
|
18
|
+
export { createAppointmentEventAsync, rescheduleAppointmentEventAsync, cancelAppointmentEventAsync } from "./events/appointmentEventFacade.js";
|
|
19
|
+
export { mapAppointmentToEventSnapshot } from "./events/mapAppointmentToEventSnapshot.js";
|
|
20
|
+
export { CalendarModel, EventModel as CoreEventModel, ParticipantModel as CoreParticipantModel, CalendarParticipantModel, configure, getConfig } from "@blazeo.com/calendar-client";
|
|
21
|
+
export const packageName = "@blazeo.com/appointment-client";
|
|
26
22
|
export class CalendarClient {
|
|
27
|
-
name =
|
|
28
|
-
/** Same as {@link initializeAppointmentClient} — sugar for class-style apps. */
|
|
29
|
-
connect(options) {
|
|
30
|
-
initializeAppointmentClient(options);
|
|
31
|
-
}
|
|
23
|
+
name = "CalendarClient";
|
|
32
24
|
getExampleSlots() {
|
|
33
25
|
return getExampleSlots();
|
|
34
26
|
}
|
|
35
|
-
getExampleRoot() {
|
|
36
|
-
return getExampleCalendarRoot();
|
|
37
|
-
}
|
|
38
27
|
}
|
|
39
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,31 +1,56 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Instance, SnapshotIn, SnapshotOut } from "mobx-state-tree";
|
|
2
|
+
export declare const CalendarSlotModel: import("mobx-state-tree").IModelType<{
|
|
3
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
4
|
+
title: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
5
|
+
start: import("mobx-state-tree").ISimpleType<string>;
|
|
6
|
+
end: import("mobx-state-tree").ISimpleType<string>;
|
|
7
|
+
isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
8
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
9
|
+
export declare const EventModel: import("mobx-state-tree").IModelType<{
|
|
10
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
11
|
+
title: import("mobx-state-tree").ISimpleType<string>;
|
|
12
|
+
calendarId: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
13
|
+
startsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
14
|
+
endsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
15
|
+
participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
16
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
17
|
+
export declare const ParticipantModel: import("mobx-state-tree").IModelType<{
|
|
18
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
19
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
20
|
+
email: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
21
|
+
role: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
22
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
2
23
|
export declare const CalendarRootModel: import("mobx-state-tree").IModelType<{
|
|
3
24
|
slots: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
4
25
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
5
|
-
title: import("mobx-state-tree").ISimpleType<string
|
|
26
|
+
title: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
6
27
|
start: import("mobx-state-tree").ISimpleType<string>;
|
|
7
28
|
end: import("mobx-state-tree").ISimpleType<string>;
|
|
29
|
+
isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
8
30
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
9
31
|
events: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
10
32
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
11
33
|
title: import("mobx-state-tree").ISimpleType<string>;
|
|
12
|
-
calendarId: import("mobx-state-tree").
|
|
13
|
-
startsAt: import("mobx-state-tree").ISimpleType<string
|
|
14
|
-
endsAt: import("mobx-state-tree").ISimpleType<string
|
|
34
|
+
calendarId: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
35
|
+
startsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
36
|
+
endsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
15
37
|
participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
16
38
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
17
39
|
participants: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
18
40
|
id: import("mobx-state-tree").ISimpleType<string>;
|
|
19
41
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
20
|
-
email: import("mobx-state-tree").
|
|
21
|
-
role: import("mobx-state-tree").
|
|
42
|
+
email: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
43
|
+
role: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
|
|
22
44
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
23
45
|
}, {
|
|
24
46
|
removeSlot(id: string): void;
|
|
25
47
|
removeEvent(id: string): void;
|
|
26
48
|
removeParticipant(id: string): void;
|
|
27
49
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
export
|
|
31
|
-
|
|
50
|
+
export interface ICalendarRoot extends Instance<typeof CalendarRootModel> {
|
|
51
|
+
}
|
|
52
|
+
export interface ICalendarRootSnapshotIn extends SnapshotIn<typeof CalendarRootModel> {
|
|
53
|
+
}
|
|
54
|
+
export interface ICalendarRootSnapshotOut extends SnapshotOut<typeof CalendarRootModel> {
|
|
55
|
+
}
|
|
56
|
+
export declare function createCalendarRoot(snapshot?: ICalendarRootSnapshotIn): ICalendarRoot;
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
import { types
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { types } from "mobx-state-tree";
|
|
2
|
+
export const CalendarSlotModel = types.model("CalendarSlot", {
|
|
3
|
+
id: types.identifier,
|
|
4
|
+
title: types.maybeNull(types.string),
|
|
5
|
+
start: types.string,
|
|
6
|
+
end: types.string,
|
|
7
|
+
isAvailable: types.optional(types.boolean, true),
|
|
8
|
+
});
|
|
9
|
+
export const EventModel = types.model("Event", {
|
|
10
|
+
id: types.identifier,
|
|
11
|
+
title: types.string,
|
|
12
|
+
calendarId: types.maybeNull(types.string),
|
|
13
|
+
startsAt: types.maybeNull(types.string),
|
|
14
|
+
endsAt: types.maybeNull(types.string),
|
|
15
|
+
participantIds: types.optional(types.array(types.string), []),
|
|
16
|
+
});
|
|
17
|
+
export const ParticipantModel = types.model("Participant", {
|
|
18
|
+
id: types.identifier,
|
|
19
|
+
name: types.string,
|
|
20
|
+
email: types.maybeNull(types.string),
|
|
21
|
+
role: types.maybeNull(types.string),
|
|
22
|
+
});
|
|
5
23
|
export const CalendarRootModel = types
|
|
6
24
|
.model("CalendarRoot", {
|
|
7
25
|
slots: types.array(CalendarSlotModel),
|
|
@@ -34,4 +52,3 @@ export function createCalendarRoot(snapshot) {
|
|
|
34
52
|
participants: [],
|
|
35
53
|
});
|
|
36
54
|
}
|
|
37
|
-
//# sourceMappingURL=CalendarRootModel.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type Instance } from "mobx-state-tree";
|
|
2
|
-
export declare const CalendarSlotModel: import("mobx-state-tree").IModelType<{
|
|
3
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
4
|
-
title: import("mobx-state-tree").ISimpleType<string>;
|
|
5
|
-
start: import("mobx-state-tree").ISimpleType<string>;
|
|
6
|
-
end: import("mobx-state-tree").ISimpleType<string>;
|
|
7
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
8
|
-
export type CalendarSlot = Instance<typeof CalendarSlotModel>;
|
|
1
|
+
import { type Instance } from "mobx-state-tree";
|
|
2
|
+
export declare const CalendarSlotModel: import("mobx-state-tree").IModelType<{
|
|
3
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
4
|
+
title: import("mobx-state-tree").ISimpleType<string>;
|
|
5
|
+
start: import("mobx-state-tree").ISimpleType<string>;
|
|
6
|
+
end: import("mobx-state-tree").ISimpleType<string>;
|
|
7
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
8
|
+
export type CalendarSlot = Instance<typeof CalendarSlotModel>;
|
|
9
9
|
//# sourceMappingURL=CalendarSlotModel.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { types } from "mobx-state-tree";
|
|
2
|
-
export const CalendarSlotModel = types.model("CalendarSlot", {
|
|
3
|
-
id: types.identifier,
|
|
4
|
-
title: types.string,
|
|
5
|
-
start: types.string,
|
|
6
|
-
end: types.string,
|
|
7
|
-
});
|
|
1
|
+
import { types } from "mobx-state-tree";
|
|
2
|
+
export const CalendarSlotModel = types.model("CalendarSlot", {
|
|
3
|
+
id: types.identifier,
|
|
4
|
+
title: types.string,
|
|
5
|
+
start: types.string,
|
|
6
|
+
end: types.string,
|
|
7
|
+
});
|
|
8
8
|
//# sourceMappingURL=CalendarSlotModel.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type Instance } from "mobx-state-tree";
|
|
2
|
-
export declare const EventModel: import("mobx-state-tree").IModelType<{
|
|
3
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
4
|
-
title: import("mobx-state-tree").ISimpleType<string>;
|
|
5
|
-
calendarId: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
6
|
-
startsAt: import("mobx-state-tree").ISimpleType<string>;
|
|
7
|
-
endsAt: import("mobx-state-tree").ISimpleType<string>;
|
|
8
|
-
participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
9
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
10
|
-
export type Event = Instance<typeof EventModel>;
|
|
1
|
+
import { type Instance } from "mobx-state-tree";
|
|
2
|
+
export declare const EventModel: import("mobx-state-tree").IModelType<{
|
|
3
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
4
|
+
title: import("mobx-state-tree").ISimpleType<string>;
|
|
5
|
+
calendarId: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
6
|
+
startsAt: import("mobx-state-tree").ISimpleType<string>;
|
|
7
|
+
endsAt: import("mobx-state-tree").ISimpleType<string>;
|
|
8
|
+
participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
9
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
10
|
+
export type Event = Instance<typeof EventModel>;
|
|
11
11
|
//# sourceMappingURL=EventModel.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { types } from "mobx-state-tree";
|
|
2
|
-
export const EventModel = types.model("Event", {
|
|
3
|
-
id: types.identifier,
|
|
4
|
-
title: types.string,
|
|
5
|
-
calendarId: types.optional(types.string, ""),
|
|
6
|
-
startsAt: types.string,
|
|
7
|
-
endsAt: types.string,
|
|
8
|
-
participantIds: types.optional(types.array(types.string), []),
|
|
9
|
-
});
|
|
1
|
+
import { types } from "mobx-state-tree";
|
|
2
|
+
export const EventModel = types.model("Event", {
|
|
3
|
+
id: types.identifier,
|
|
4
|
+
title: types.string,
|
|
5
|
+
calendarId: types.optional(types.string, ""),
|
|
6
|
+
startsAt: types.string,
|
|
7
|
+
endsAt: types.string,
|
|
8
|
+
participantIds: types.optional(types.array(types.string), []),
|
|
9
|
+
});
|
|
10
10
|
//# sourceMappingURL=EventModel.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type Instance } from "mobx-state-tree";
|
|
2
|
-
export declare const ParticipantModel: import("mobx-state-tree").IModelType<{
|
|
3
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
4
|
-
name: import("mobx-state-tree").ISimpleType<string>;
|
|
5
|
-
email: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
6
|
-
role: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
7
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
8
|
-
export type Participant = Instance<typeof ParticipantModel>;
|
|
1
|
+
import { type Instance } from "mobx-state-tree";
|
|
2
|
+
export declare const ParticipantModel: import("mobx-state-tree").IModelType<{
|
|
3
|
+
id: import("mobx-state-tree").ISimpleType<string>;
|
|
4
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
5
|
+
email: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
6
|
+
role: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
7
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
8
|
+
export type Participant = Instance<typeof ParticipantModel>;
|
|
9
9
|
//# sourceMappingURL=ParticipantModel.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { types } from "mobx-state-tree";
|
|
2
|
-
export const ParticipantModel = types.model("Participant", {
|
|
3
|
-
id: types.identifier,
|
|
4
|
-
name: types.string,
|
|
5
|
-
email: types.optional(types.string, ""),
|
|
6
|
-
role: types.optional(types.string, "Participant"),
|
|
7
|
-
});
|
|
1
|
+
import { types } from "mobx-state-tree";
|
|
2
|
+
export const ParticipantModel = types.model("Participant", {
|
|
3
|
+
id: types.identifier,
|
|
4
|
+
name: types.string,
|
|
5
|
+
email: types.optional(types.string, ""),
|
|
6
|
+
role: types.optional(types.string, "Participant"),
|
|
7
|
+
});
|
|
8
8
|
//# sourceMappingURL=ParticipantModel.js.map
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CalendarRootModel, createCalendarRoot, type CalendarRoot, type CalendarRootSnapshotIn, } from "./CalendarRootModel.js";
|
|
2
|
-
export { CalendarSlotModel, type CalendarSlot, } from "./CalendarSlotModel.js";
|
|
3
|
-
export { EventModel, type Event } from "./EventModel.js";
|
|
4
|
-
export { ParticipantModel, type Participant, } from "./ParticipantModel.js";
|
|
1
|
+
export { CalendarRootModel, createCalendarRoot, type CalendarRoot, type CalendarRootSnapshotIn, } from "./CalendarRootModel.js";
|
|
2
|
+
export { CalendarSlotModel, type CalendarSlot, } from "./CalendarSlotModel.js";
|
|
3
|
+
export { EventModel, type Event } from "./EventModel.js";
|
|
4
|
+
export { ParticipantModel, type Participant, } from "./ParticipantModel.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/models/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { CalendarRootModel, createCalendarRoot, } from "./CalendarRootModel.js";
|
|
2
|
-
export { CalendarSlotModel, } from "./CalendarSlotModel.js";
|
|
3
|
-
export { EventModel } from "./EventModel.js";
|
|
4
|
-
export { ParticipantModel, } from "./ParticipantModel.js";
|
|
1
|
+
export { CalendarRootModel, createCalendarRoot, } from "./CalendarRootModel.js";
|
|
2
|
+
export { CalendarSlotModel, } from "./CalendarSlotModel.js";
|
|
3
|
+
export { EventModel } from "./EventModel.js";
|
|
4
|
+
export { ParticipantModel, } from "./ParticipantModel.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|