@blazeo.com/appointment-client 1.0.11 → 1.0.14

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 (138) hide show
  1. package/blazeo.com-appointment-client-1.0.14.tgz +0 -0
  2. package/package.json +3 -2
  3. package/sample/src/EventTab.jsx +435 -395
  4. package/sample/src/FetchCalendarTab.jsx +19 -33
  5. package/sample/src/LeadTab.jsx +335 -0
  6. package/src/calendar/calendarCreation.ts +62 -15
  7. package/src/calendar/fetchCalendarDetails.ts +10 -2
  8. package/src/calendar/getCalendarsByCompany.ts +17 -64
  9. package/src/calendar/mapToDesiredResponse.ts +31 -17
  10. package/src/events/getAppointmentsByFilter.ts +98 -0
  11. package/src/index.ts +23 -14
  12. package/src/lead/fetchLeadDetails.ts +106 -0
  13. package/blazeo.com-appointment-client-1.0.11.tgz +0 -0
  14. package/dist/calendar/blazeoCalendarRelationMethods.d.ts +0 -8
  15. package/dist/calendar/blazeoCalendarRelationMethods.d.ts.map +0 -1
  16. package/dist/calendar/blazeoCalendarRelationMethods.js +0 -16
  17. package/dist/calendar/blazeoCalendarRelationMethods.js.map +0 -1
  18. package/dist/calendar/buildUnifiedCalendarView.d.ts +0 -39
  19. package/dist/calendar/buildUnifiedCalendarView.js +0 -301
  20. package/dist/calendar/calendarCreation.d.ts +0 -27
  21. package/dist/calendar/calendarCreation.js +0 -191
  22. package/dist/calendar/calendarCreationFacade.d.ts +0 -27
  23. package/dist/calendar/calendarCreationFacade.d.ts.map +0 -1
  24. package/dist/calendar/calendarCreationFacade.js +0 -167
  25. package/dist/calendar/calendarCreationFacade.js.map +0 -1
  26. package/dist/calendar/createCalendar.d.ts +0 -81
  27. package/dist/calendar/createCalendar.d.ts.map +0 -1
  28. package/dist/calendar/createCalendar.js +0 -206
  29. package/dist/calendar/createCalendar.js.map +0 -1
  30. package/dist/calendar/fetchCalendarDetails.d.ts +0 -41
  31. package/dist/calendar/fetchCalendarDetails.js +0 -262
  32. package/dist/calendar/fetchCalendarWithOpeningHours.d.ts +0 -25
  33. package/dist/calendar/fetchCalendarWithOpeningHours.js +0 -114
  34. package/dist/calendar/getAllParticipantOpeningHours.d.ts +0 -22
  35. package/dist/calendar/getAllParticipantOpeningHours.js +0 -22
  36. package/dist/calendar/getCalendarsByCompany.d.ts +0 -9
  37. package/dist/calendar/getCalendarsByCompany.js +0 -107
  38. package/dist/calendar/getOpeningHours.d.ts +0 -8
  39. package/dist/calendar/getOpeningHours.js +0 -9
  40. package/dist/calendar/getParticipantOpeningHours.d.ts +0 -37
  41. package/dist/calendar/getParticipantOpeningHours.js +0 -48
  42. package/dist/calendar/getParticipants.d.ts +0 -7
  43. package/dist/calendar/getParticipants.js +0 -13
  44. package/dist/calendar/mapCalendarBoToBlazeoSnapshot.d.ts +0 -10
  45. package/dist/calendar/mapCalendarBoToBlazeoSnapshot.d.ts.map +0 -1
  46. package/dist/calendar/mapCalendarBoToBlazeoSnapshot.js +0 -44
  47. package/dist/calendar/mapCalendarBoToBlazeoSnapshot.js.map +0 -1
  48. package/dist/calendar/mapCalendarToBlazeoSnapshot.d.ts +0 -29
  49. package/dist/calendar/mapCalendarToBlazeoSnapshot.d.ts.map +0 -1
  50. package/dist/calendar/mapCalendarToBlazeoSnapshot.js +0 -44
  51. package/dist/calendar/mapCalendarToBlazeoSnapshot.js.map +0 -1
  52. package/dist/calendar/mapToDesiredResponse.d.ts +0 -70
  53. package/dist/calendar/mapToDesiredResponse.js +0 -99
  54. package/dist/config/applyBlazeoClientConfig.d.ts +0 -3
  55. package/dist/config/applyBlazeoClientConfig.d.ts.map +0 -1
  56. package/dist/config/applyBlazeoClientConfig.js +0 -14
  57. package/dist/config/applyBlazeoClientConfig.js.map +0 -1
  58. package/dist/config/applyBlazeoDefaults.d.ts +0 -2
  59. package/dist/config/applyBlazeoDefaults.d.ts.map +0 -1
  60. package/dist/config/applyBlazeoDefaults.js +0 -14
  61. package/dist/config/applyBlazeoDefaults.js.map +0 -1
  62. package/dist/config/blazeo.config.d.ts +0 -11
  63. package/dist/config/blazeo.config.d.ts.map +0 -1
  64. package/dist/config/blazeo.config.js +0 -11
  65. package/dist/config/blazeo.config.js.map +0 -1
  66. package/dist/config/blazeoClientDefaults.d.ts +0 -11
  67. package/dist/config/blazeoClientDefaults.d.ts.map +0 -1
  68. package/dist/config/blazeoClientDefaults.js +0 -11
  69. package/dist/config/blazeoClientDefaults.js.map +0 -1
  70. package/dist/config/ensureBlazeoHttpReady.d.ts +0 -17
  71. package/dist/config/ensureBlazeoHttpReady.js +0 -31
  72. package/dist/config/initializeAppointmentClient.d.ts +0 -11
  73. package/dist/config/initializeAppointmentClient.d.ts.map +0 -1
  74. package/dist/config/initializeAppointmentClient.js +0 -15
  75. package/dist/config/initializeAppointmentClient.js.map +0 -1
  76. package/dist/config/syncBlazeoConnection.d.ts +0 -6
  77. package/dist/config/syncBlazeoConnection.js +0 -18
  78. package/dist/events/appointmentEventFacade.d.ts +0 -67
  79. package/dist/events/appointmentEventFacade.d.ts.map +0 -1
  80. package/dist/events/appointmentEventFacade.js +0 -124
  81. package/dist/events/appointmentEventFacade.js.map +0 -1
  82. package/dist/events/mapAppointmentToEventSnapshot.d.ts +0 -5
  83. package/dist/events/mapAppointmentToEventSnapshot.d.ts.map +0 -1
  84. package/dist/events/mapAppointmentToEventSnapshot.js +0 -57
  85. package/dist/events/mapAppointmentToEventSnapshot.js.map +0 -1
  86. package/dist/exampleData.d.ts +0 -119
  87. package/dist/exampleData.d.ts.map +0 -1
  88. package/dist/exampleData.js +0 -71
  89. package/dist/exampleData.js.map +0 -1
  90. package/dist/facade/calendarCreationFacade.d.ts +0 -40
  91. package/dist/facade/calendarCreationFacade.d.ts.map +0 -1
  92. package/dist/facade/calendarCreationFacade.js +0 -96
  93. package/dist/facade/calendarCreationFacade.js.map +0 -1
  94. package/dist/facade/mapCalendarBOToSnapshot.d.ts +0 -10
  95. package/dist/facade/mapCalendarBOToSnapshot.d.ts.map +0 -1
  96. package/dist/facade/mapCalendarBOToSnapshot.js +0 -44
  97. package/dist/facade/mapCalendarBOToSnapshot.js.map +0 -1
  98. package/dist/facades/index.d.ts +0 -12
  99. package/dist/facades/index.d.ts.map +0 -1
  100. package/dist/facades/index.js +0 -12
  101. package/dist/facades/index.js.map +0 -1
  102. package/dist/index.d.ts +0 -40
  103. package/dist/index.d.ts.map +0 -1
  104. package/dist/index.js +0 -39
  105. package/dist/index.js.map +0 -1
  106. package/dist/models/CalendarRootModel.d.ts +0 -56
  107. package/dist/models/CalendarRootModel.d.ts.map +0 -1
  108. package/dist/models/CalendarRootModel.js +0 -54
  109. package/dist/models/CalendarRootModel.js.map +0 -1
  110. package/dist/models/CalendarSlotModel.d.ts +0 -9
  111. package/dist/models/CalendarSlotModel.d.ts.map +0 -1
  112. package/dist/models/CalendarSlotModel.js +0 -8
  113. package/dist/models/CalendarSlotModel.js.map +0 -1
  114. package/dist/models/EventModel.d.ts +0 -11
  115. package/dist/models/EventModel.d.ts.map +0 -1
  116. package/dist/models/EventModel.js +0 -10
  117. package/dist/models/EventModel.js.map +0 -1
  118. package/dist/models/ParticipantModel.d.ts +0 -9
  119. package/dist/models/ParticipantModel.d.ts.map +0 -1
  120. package/dist/models/ParticipantModel.js +0 -8
  121. package/dist/models/ParticipantModel.js.map +0 -1
  122. package/dist/models/index.d.ts +0 -5
  123. package/dist/models/index.d.ts.map +0 -1
  124. package/dist/models/index.js +0 -5
  125. package/dist/models/index.js.map +0 -1
  126. package/dist/types/appointment.d.ts +0 -28
  127. package/dist/types/appointment.d.ts.map +0 -1
  128. package/dist/types/appointment.js +0 -6
  129. package/dist/types/appointment.js.map +0 -1
  130. package/dist/types/calendar.d.ts +0 -52
  131. package/dist/types/calendar.d.ts.map +0 -1
  132. package/dist/types/calendar.js +0 -6
  133. package/dist/types/calendar.js.map +0 -1
  134. package/dist/types/calendarBo.d.ts +0 -62
  135. package/dist/types/calendarBo.d.ts.map +0 -1
  136. package/dist/types/calendarBo.js +0 -6
  137. package/dist/types/calendarBo.js.map +0 -1
  138. package/sample/package-lock.json +0 -1778
@@ -1,67 +0,0 @@
1
- /**
2
- * Creates an appointment event — `Event.create()` → `POST /event/create`
3
- * (aligned with `AppointmentAPIAdapter.Create`).
4
- */
5
- export declare function createAppointmentEventAsync(input: any, options?: any): Promise<{
6
- ok: boolean;
7
- error: string;
8
- event?: undefined;
9
- apiResponse?: undefined;
10
- } | {
11
- ok: boolean;
12
- event: any;
13
- error?: undefined;
14
- apiResponse?: undefined;
15
- } | {
16
- ok: boolean;
17
- error: any;
18
- apiResponse: any;
19
- event?: undefined;
20
- } | {
21
- ok: boolean;
22
- event: any;
23
- apiResponse: any;
24
- error?: undefined;
25
- }>;
26
- /**
27
- * Reschedules an appointment — `Event.reschedule()` → `POST /event/reschedule`
28
- * (aligned with `AppointmentAPIAdapter.Reschedule`).
29
- */
30
- export declare function rescheduleAppointmentEventAsync(input: any, options?: any): Promise<{
31
- ok: boolean;
32
- error: string;
33
- event?: undefined;
34
- apiResponse?: undefined;
35
- } | {
36
- ok: boolean;
37
- event: any;
38
- error?: undefined;
39
- apiResponse?: undefined;
40
- } | {
41
- ok: boolean;
42
- error: any;
43
- apiResponse: any;
44
- event?: undefined;
45
- } | {
46
- ok: boolean;
47
- event: any;
48
- apiResponse: any;
49
- error?: undefined;
50
- }>;
51
- /**
52
- * Cancels an appointment — `EventModel.cancel` → `GET /event/cancel`
53
- * (aligned with `AppointmentAPIAdapter.Cancel`).
54
- */
55
- export declare function cancelAppointmentEventAsync(appointmentEventId: string, options?: any): Promise<{
56
- ok: boolean;
57
- error: string;
58
- apiResponse?: undefined;
59
- } | {
60
- ok: boolean;
61
- error: any;
62
- apiResponse: any;
63
- } | {
64
- ok: boolean;
65
- apiResponse: any;
66
- error?: undefined;
67
- }>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"appointmentEventFacade.d.ts","sourceRoot":"","sources":["../../src/events/appointmentEventFacade.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA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/calendar-client";
2
- import { buildModelEnv, resolveBlazeoConnection } from "../calendar/createCalendar.js";
3
- import { mapAppointmentToEventSnapshot } from "./mapAppointmentToEventSnapshot.js";
4
- function isFailureStatus(res) {
5
- return res.status !== "success" && res.status !== "Success";
6
- }
7
- function ensureConfigure(resolvedBase, resolvedConsumer) {
8
- if (resolvedBase) {
9
- configure({
10
- baseUrl: resolvedBase,
11
- ...(resolvedConsumer ? { consumer: resolvedConsumer } : {}),
12
- });
13
- }
14
- }
15
- async function runEventMutation(input, mode, options) {
16
- const { baseUrl: resolvedBase, consumer: resolvedConsumer } = resolveBlazeoConnection(options);
17
- ensureConfigure(resolvedBase, resolvedConsumer);
18
- const baseUrl = resolvedBase;
19
- const consumer = resolvedConsumer;
20
- if (!options.localOnly && !baseUrl) {
21
- return {
22
- ok: false,
23
- error: "baseUrl is missing. Set `blazeoClientConfig.baseUrl` in `appointment-client/src/config/blazeoClientDefaults.ts` or call `configure({ baseUrl })`.",
24
- };
25
- }
26
- const snapshot = mapAppointmentToEventSnapshot(input, mode);
27
- const eventIdForApi = snapshot.eventId;
28
- if (mode === "reschedule" && (!eventIdForApi || eventIdForApi === "new")) {
29
- return {
30
- ok: false,
31
- error: "thirdPartyAppointmentId is required for reschedule (existing Blazeo event id).",
32
- };
33
- }
34
- const env = buildModelEnv(baseUrl, consumer, Boolean(options.localOnly));
35
- if (!options.localOnly && env.baseUrl == null) {
36
- return {
37
- ok: false,
38
- error: "Model env requires baseUrl. Set `blazeoClientConfig` or pass `baseUrl` in options.",
39
- };
40
- }
41
- const eventNode = EventModel.create(snapshot, env);
42
- if (options.localOnly) {
43
- return { ok: true, event: eventNode };
44
- }
45
- const offset = options.offsetMinutes;
46
- const apiRes = mode === "create" ? await eventNode.create(offset) : await eventNode.reschedule(offset);
47
- if (isFailureStatus(apiRes)) {
48
- const msg = apiRes.message ??
49
- (typeof apiRes.data === "string" ? apiRes.data : undefined) ??
50
- JSON.stringify(apiRes);
51
- return {
52
- ok: false,
53
- error: mode === "create" ? msg || "Event create failed" : msg || "Event reschedule failed",
54
- apiResponse: apiRes,
55
- };
56
- }
57
- return { ok: true, event: eventNode, apiResponse: apiRes };
58
- }
59
- /**
60
- * Creates an appointment event — `Event.create()` → `POST /event/create`
61
- * (aligned with `AppointmentAPIAdapter.Create`).
62
- */
63
- export async function createAppointmentEventAsync(input, options = {}) {
64
- try {
65
- return await runEventMutation(input, "create", options);
66
- }
67
- catch (err) {
68
- const message = err instanceof Error ? err.message : String(err);
69
- return { ok: false, error: message };
70
- }
71
- }
72
- /**
73
- * Reschedules an appointment — `Event.reschedule()` → `POST /event/reschedule`
74
- * (aligned with `AppointmentAPIAdapter.Reschedule`).
75
- */
76
- export async function rescheduleAppointmentEventAsync(input, options = {}) {
77
- try {
78
- return await runEventMutation(input, "reschedule", options);
79
- }
80
- catch (err) {
81
- const message = err instanceof Error ? err.message : String(err);
82
- return { ok: false, error: message };
83
- }
84
- }
85
- /**
86
- * Cancels an appointment — `EventModel.cancel` → `GET /event/cancel`
87
- * (aligned with `AppointmentAPIAdapter.Cancel`).
88
- */
89
- export async function cancelAppointmentEventAsync(appointmentEventId, options = {}) {
90
- try {
91
- const id = appointmentEventId.trim();
92
- if (!id) {
93
- return { ok: false, error: "appointmentEventId is required for cancel." };
94
- }
95
- const { baseUrl: resolvedBase, consumer: resolvedConsumer } = resolveBlazeoConnection(options);
96
- ensureConfigure(resolvedBase, resolvedConsumer);
97
- const baseUrl = resolvedBase;
98
- if (!options.localOnly && !baseUrl) {
99
- return {
100
- ok: false,
101
- error: "baseUrl is missing. Set `blazeoClientConfig.baseUrl` in `appointment-client/src/config/blazeoClientDefaults.ts` or call `configure({ baseUrl })`.",
102
- };
103
- }
104
- if (options.localOnly) {
105
- return { ok: true, apiResponse: undefined };
106
- }
107
- const apiRes = await EventModel.cancel(id);
108
- if (isFailureStatus(apiRes)) {
109
- const msg = apiRes.message ??
110
- (typeof apiRes.data === "string" ? apiRes.data : undefined) ??
111
- JSON.stringify(apiRes);
112
- return {
113
- ok: false,
114
- error: msg || "Event cancel failed",
115
- apiResponse: apiRes,
116
- };
117
- }
118
- return { ok: true, apiResponse: apiRes };
119
- }
120
- catch (err) {
121
- const message = err instanceof Error ? err.message : String(err);
122
- return { ok: false, error: message };
123
- }
124
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"appointmentEventFacade.js","sourceRoot":"","sources":["../../src/events/appointmentEventFacade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,EACL,aAAa,EACb,uBAAuB,GAExB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,6BAA6B,GAE9B,MAAM,oCAAoC,CAAC;AAgC5C,SAAS,eAAe,CAAC,GAA2B;IAClD,OAAO,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC;AAC9D,CAAC;AAOD,SAAS,eAAe,CACtB,YAAgC,EAChC,gBAAoC;IAEpC,IAAI,YAAY,EAAE,CAAC;QACjB,SAAS,CAAC;YACR,OAAO,EAAE,YAAY;YACrB,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5D,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,KAAK,UAAU,gBAAgB,CAC7B,KAA2B,EAC3B,IAAiC,EACjC,OAAgC;IAEhC,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GACzD,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAEnC,eAAe,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAEhD,MAAM,OAAO,GAAG,YAAY,CAAC;IAC7B,MAAM,QAAQ,GAAG,gBAAgB,CAAC;IAElC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,CAAC;QAC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gBACnC,WAAW,EAAE,MAAM;aACpB,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IACvC,CAAC;AACH,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Maps Apex appointment input to a Blazeo `Event` MST snapshot for
3
- * {@link EventModel.create} from `@blazeo.com/calendar-client`.
4
- */
5
- export declare function mapAppointmentToEventSnapshot(input: any, mode: "create" | "reschedule"): any;
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapAppointmentToEventSnapshot.d.ts","sourceRoot":"","sources":["../../src/events/mapAppointmentToEventSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAqBpE,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG,YAAY,CAAC;AAElE;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,oBAAoB,EAC3B,IAAI,EAAE,2BAA2B,GAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4CzB"}
@@ -1,57 +0,0 @@
1
- function parseDate(value) {
2
- const d = value instanceof Date ? value : new Date(value);
3
- if (Number.isNaN(d.getTime())) {
4
- throw new Error("Invalid startDate or endDate");
5
- }
6
- return d;
7
- }
8
- function formatYmd(d) {
9
- const y = d.getFullYear();
10
- const m = String(d.getMonth() + 1).padStart(2, "0");
11
- const day = String(d.getDate()).padStart(2, "0");
12
- return `${y}-${m}-${day}`;
13
- }
14
- function normalizeParticipantId(id) {
15
- return id.trim().replace(/^\{|\}$/g, "");
16
- }
17
- /**
18
- * Maps Apex appointment input to a Blazeo `Event` MST snapshot for
19
- * {@link EventModel.create} from `@blazeo.com/calendar-client`.
20
- */
21
- export function mapAppointmentToEventSnapshot(input, mode) {
22
- const start = parseDate(input.startDate);
23
- const end = parseDate(input.endDate);
24
- const description = mode === "create"
25
- ? (input.description ?? null)
26
- : (input.description ?? input.notes ?? null);
27
- const eventIdRaw = input.thirdPartyAppointmentId?.trim();
28
- const eventId = eventIdRaw && eventIdRaw !== "new" ? eventIdRaw : "new";
29
- const email = input.email ?? input.visitorEmail ?? null;
30
- const phone = input.phone ?? input.visitorPhone ?? null;
31
- const visitorName = input.visitorName?.trim() || null;
32
- const snap = {
33
- eventId,
34
- calendarId: input.thirdPartyCalendarId?.trim() ?? "",
35
- participantId: normalizeParticipantId(input.participantId),
36
- title: input.title ?? null,
37
- description,
38
- startDate: formatYmd(start),
39
- endDate: formatYmd(end),
40
- startHour: start.getHours(),
41
- startMinute: start.getMinutes(),
42
- endHour: end.getHours(),
43
- endMinute: end.getMinutes(),
44
- visitorName,
45
- visitorEmail: email,
46
- visitorPhone: phone,
47
- rescheduleLink: input.rescheduleUrl ?? null,
48
- cancelLink: input.cancelUrl ?? null,
49
- timeZone: input.timeZone ?? null,
50
- };
51
- if (mode === "create") {
52
- const now = new Date().toISOString();
53
- snap.createdOn = now;
54
- snap.modifiedOn = now;
55
- }
56
- return snap;
57
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapAppointmentToEventSnapshot.js","sourceRoot":"","sources":["../../src/events/mapAppointmentToEventSnapshot.ts"],"names":[],"mappings":"AAEA,SAAS,SAAS,CAAC,KAAoB;IACrC,MAAM,CAAC,GAAG,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1D,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CA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-state-tree").ModelInstanceTypeProps<{
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").IStateTreeNode<import("mobx-state-tree").IModelType<{
9
- id: import("mobx-state-tree").ISimpleType<string>;
10
- title: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
11
- start: import("mobx-state-tree").ISimpleType<string>;
12
- end: import("mobx-state-tree").ISimpleType<string>;
13
- isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
14
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
15
- /** Example event nodes. */
16
- export declare function getExampleEvents(): (import("mobx-state-tree").ModelInstanceTypeProps<{
17
- id: import("mobx-state-tree").ISimpleType<string>;
18
- title: import("mobx-state-tree").ISimpleType<string>;
19
- calendarId: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
20
- startsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
21
- endsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
22
- participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
23
- }> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
24
- id: import("mobx-state-tree").ISimpleType<string>;
25
- title: import("mobx-state-tree").ISimpleType<string>;
26
- calendarId: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
27
- startsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
28
- endsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
29
- participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
30
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
31
- /** Example participant nodes. */
32
- export declare function getExampleParticipants(): (import("mobx-state-tree").ModelInstanceTypeProps<{
33
- id: import("mobx-state-tree").ISimpleType<string>;
34
- name: import("mobx-state-tree").ISimpleType<string>;
35
- email: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
36
- role: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
37
- }> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
38
- id: import("mobx-state-tree").ISimpleType<string>;
39
- name: import("mobx-state-tree").ISimpleType<string>;
40
- email: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
41
- role: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
42
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
43
- /** Full root store snapshot suitable for `createCalendarRoot(snapshot)`. */
44
- export declare function getExampleCalendarRootSnapshot(): {
45
- slots: {
46
- id: string;
47
- title: string;
48
- start: string;
49
- end: string;
50
- }[];
51
- events: {
52
- id: string;
53
- title: string;
54
- calendarId: string;
55
- startsAt: string;
56
- endsAt: string;
57
- participantIds: string[];
58
- }[];
59
- participants: {
60
- id: string;
61
- name: string;
62
- email: string;
63
- role: string;
64
- }[];
65
- };
66
- /** Root store with example slots, events, and participants. */
67
- export declare function getExampleCalendarRoot(): import("mobx-state-tree").ModelInstanceTypeProps<{
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").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
71
- start: import("mobx-state-tree").ISimpleType<string>;
72
- end: import("mobx-state-tree").ISimpleType<string>;
73
- isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
74
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
75
- events: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
76
- id: import("mobx-state-tree").ISimpleType<string>;
77
- title: import("mobx-state-tree").ISimpleType<string>;
78
- calendarId: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
79
- startsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
80
- endsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
81
- participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
82
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
83
- participants: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
84
- id: import("mobx-state-tree").ISimpleType<string>;
85
- name: import("mobx-state-tree").ISimpleType<string>;
86
- email: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
87
- role: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
88
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
89
- }> & {
90
- removeSlot(id: string): void;
91
- removeEvent(id: string): void;
92
- removeParticipant(id: string): void;
93
- } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
94
- slots: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
95
- id: import("mobx-state-tree").ISimpleType<string>;
96
- title: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
97
- start: import("mobx-state-tree").ISimpleType<string>;
98
- end: import("mobx-state-tree").ISimpleType<string>;
99
- isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
100
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
101
- events: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
102
- id: import("mobx-state-tree").ISimpleType<string>;
103
- title: import("mobx-state-tree").ISimpleType<string>;
104
- calendarId: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
105
- startsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
106
- endsAt: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
107
- participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
108
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
109
- participants: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
110
- id: import("mobx-state-tree").ISimpleType<string>;
111
- name: import("mobx-state-tree").ISimpleType<string>;
112
- email: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
113
- role: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
114
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
115
- }, {
116
- removeSlot(id: string): void;
117
- removeEvent(id: string): void;
118
- removeParticipant(id: string): void;
119
- }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"exampleData.d.ts","sourceRoot":"","sources":["../src/exampleData.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AAgDtC,0CAA0C;AAC1C,wBAAgB,eAAe,IAAI,YAAY,EAAE,CAEhD;AAED,2BAA2B;AAC3B,wBAAgB,gBAAgB,IAAI,KAAK,EAAE,CAE1C;AAED,iCAAiC;AACjC,wBAAgB,sBAAsB,IAAI,WAAW,EAAE,CAEtD;AAED,4EAA4E;AAC5E,wBAAgB,8BAA8B,IAAI,sBAAsB,CAMvE;AAED,+DAA+D;AAC/D,wBAAgB,sBAAsB,IAAI,YAAY,CAErD"}
@@ -1,71 +0,0 @@
1
- import { CalendarSlotModel } from "./models/CalendarRootModel.js";
2
- import { CalendarRootModel } from "./models/CalendarRootModel.js";
3
- import { EventModel } from "./models/CalendarRootModel.js";
4
- import { ParticipantModel } from "./models/CalendarRootModel.js";
5
- const EXAMPLE_SLOT_SNAPSHOTS = [
6
- {
7
- id: "slot-1",
8
- title: "Team standup",
9
- start: "09:00",
10
- end: "09:15",
11
- },
12
- {
13
- id: "slot-2",
14
- title: "Focus block",
15
- start: "10:00",
16
- end: "12:00",
17
- },
18
- {
19
- id: "slot-3",
20
- title: "1:1 with design",
21
- start: "14:00",
22
- end: "14:30",
23
- },
24
- ];
25
- const EXAMPLE_EVENT_SNAPSHOTS = [
26
- {
27
- id: "ev-1",
28
- title: "Product roadmap review",
29
- calendarId: "cal-eng",
30
- startsAt: "2026-04-02T15:00:00.000Z",
31
- endsAt: "2026-04-02T16:00:00.000Z",
32
- participantIds: ["p-1", "p-2"],
33
- },
34
- {
35
- id: "ev-2",
36
- title: "Customer onboarding call",
37
- calendarId: "cal-sales",
38
- startsAt: "2026-04-03T10:30:00.000Z",
39
- endsAt: "2026-04-03T11:00:00.000Z",
40
- participantIds: ["p-3"],
41
- },
42
- ];
43
- const EXAMPLE_PARTICIPANT_SNAPSHOTS = [
44
- { id: "p-1", name: "Alex Morgan", email: "alex@example.com", role: "Organizer" },
45
- { id: "p-2", name: "Jordan Lee", email: "jordan@example.com", role: "Required" },
46
- { id: "p-3", name: "Sam Rivera", email: "sam@example.com", role: "Optional" },
47
- ];
48
- /** Example slot nodes (MST instances). */
49
- export function getExampleSlots() {
50
- return EXAMPLE_SLOT_SNAPSHOTS.map((s) => CalendarSlotModel.create(s));
51
- }
52
- /** Example event nodes. */
53
- export function getExampleEvents() {
54
- return EXAMPLE_EVENT_SNAPSHOTS.map((s) => EventModel.create(s));
55
- }
56
- /** Example participant nodes. */
57
- export function getExampleParticipants() {
58
- return EXAMPLE_PARTICIPANT_SNAPSHOTS.map((s) => ParticipantModel.create(s));
59
- }
60
- /** Full root store snapshot suitable for `createCalendarRoot(snapshot)`. */
61
- export function getExampleCalendarRootSnapshot() {
62
- return {
63
- slots: EXAMPLE_SLOT_SNAPSHOTS,
64
- events: EXAMPLE_EVENT_SNAPSHOTS,
65
- participants: EXAMPLE_PARTICIPANT_SNAPSHOTS,
66
- };
67
- }
68
- /** Root store with example slots, events, and participants. */
69
- export function getExampleCalendarRoot() {
70
- return CalendarRootModel.create(getExampleCalendarRootSnapshot());
71
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"exampleData.js","sourceRoot":"","sources":["../src/exampleData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAqB,MAAM,+BAA+B,CAAC;AACrF,OAAO,EACL,iBAAiB,GAGlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAc,MAAM,wBAAwB,CAAC;AAChE,OAAO,EACL,gBAAgB,GAEjB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,sBAAsB,GAA2C;IACrE;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,OAAO;KACb;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,aAAa;QACpB,KAAK,E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,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,sBAAsB;IACpC,OAAO,6BAA6B,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9E,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,KAAK,EAAE,sBAAsB;QAC7B,MAAM,EAAE,uBAAuB;QAC/B,YAAY,EAAE,6BAA6B;KAC5C,CAAC;AACJ,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,sBAAsB;IACpC,OAAO,iBAAiB,CAAC,MAAM,CAAC,8BAA8B,EAAE,CAAC,CAAC;AACpE,CAAC"}
@@ -1,40 +0,0 @@
1
- import type { IStateTreeNode } from "mobx-state-tree";
2
- import type { CalendarBOInput } from "../types/calendarBo.js";
3
- export type CreateCalendarOptions = {
4
- /** Overrides `blazeo.config` / global `configure` when set. */
5
- baseUrl?: string;
6
- consumer?: string;
7
- /**
8
- * When true, only builds the MST `Calendar` node (no HTTP).
9
- * Default false: calls `calendar.create()` → POST `/Calendar/Create`.
10
- */
11
- localOnly?: boolean;
12
- };
13
- /** Typical Blazeo `reqPost` / `calendar.create()` result shape. */
14
- export type BlazeoCalendarCreateResponse = {
15
- status: string;
16
- message?: string;
17
- data?: unknown;
18
- };
19
- export type CreateCalendarSuccess = {
20
- ok: true;
21
- calendar: IStateTreeNode;
22
- apiResponse?: BlazeoCalendarCreateResponse;
23
- };
24
- export type CreateCalendarFailure = {
25
- ok: false;
26
- error: string;
27
- apiResponse?: BlazeoCalendarCreateResponse;
28
- };
29
- export type CreateCalendarResult = CreateCalendarSuccess | CreateCalendarFailure;
30
- /** Merge per-call options with global Blazeo config (file + `configure`). */
31
- export declare function resolveBlazeoConnection(options?: CreateCalendarOptions): {
32
- baseUrl?: string;
33
- consumer?: string;
34
- };
35
- /**
36
- * Uses {@link resolveBlazeoConnection} (config file + `configure` + optional overrides),
37
- * then `CalendarModel.create` and `calendar.create()` unless `localOnly`.
38
- */
39
- export declare function createCalendarAsync(calendar: CalendarBOInput, options?: CreateCalendarOptions): Promise<CreateCalendarResult>;
40
- //# sourceMappingURL=calendarCreationFacade.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"calendarCreationFacade.d.ts","sourceRoot":"","sources":["../../src/facade/calendarCreationFacade.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAQ9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,IAAI,CAAC;IACT,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,CAAC,EAAE,4BAA4B,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,4BAA4B,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;AAMjF,6EAA6E;AAC7E,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,qBAA0B,GAAG;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAgBA;AAkCD;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,eAAe,EACzB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,oBAAoB,CAAC,CA8D/B"}
@@ -1,96 +0,0 @@
1
- import { CalendarModel, configure, getConfig } from "@blazeo.com/calendar-client";
2
- import { blazeoClientConfig } from "../config/blazeo.config.js";
3
- import { mapCalendarBOToSnapshot } from "./mapCalendarBOToSnapshot.js";
4
- function isFailureStatus(res) {
5
- return res.status !== "success" && res.status !== "Success";
6
- }
7
- /** Merge per-call options with global Blazeo config (file + `configure`). */
8
- export function resolveBlazeoConnection(options = {}) {
9
- const cfg = getConfig();
10
- const fromFileBase = blazeoClientConfig.baseUrl?.trim().replace(/\/+$/, "");
11
- const fromFileConsumer = blazeoClientConfig.consumer?.trim();
12
- const baseUrl = options.baseUrl?.trim().replace(/\/+$/, "") ||
13
- cfg?.baseUrl?.replace(/\/+$/, "") ||
14
- (fromFileBase || undefined);
15
- const consumer = options.consumer?.trim() ||
16
- cfg?.consumer ||
17
- (fromFileConsumer || undefined);
18
- return { baseUrl, consumer };
19
- }
20
- function buildModelEnv(baseUrl, consumer, forLocalOnly) {
21
- if (forLocalOnly && !baseUrl) {
22
- return {};
23
- }
24
- const cfg = getConfig();
25
- const env = {};
26
- if (baseUrl) {
27
- env.baseUrl = baseUrl;
28
- }
29
- else if (cfg?.baseUrl) {
30
- env.baseUrl = cfg.baseUrl;
31
- }
32
- if (consumer) {
33
- env.consumer = consumer;
34
- }
35
- else if (cfg?.consumer) {
36
- env.consumer = cfg.consumer;
37
- }
38
- if (cfg?.fetch != null)
39
- env.fetch = cfg.fetch;
40
- if (cfg?.getDefaultOffset != null) {
41
- env.getDefaultOffset = cfg.getDefaultOffset;
42
- }
43
- return env;
44
- }
45
- /**
46
- * Uses {@link resolveBlazeoConnection} (config file + `configure` + optional overrides),
47
- * then `CalendarModel.create` and `calendar.create()` unless `localOnly`.
48
- */
49
- export async function createCalendarAsync(calendar, options = {}) {
50
- try {
51
- const { baseUrl: resolvedBase, consumer: resolvedConsumer } = resolveBlazeoConnection(options);
52
- if (resolvedBase) {
53
- configure({
54
- baseUrl: resolvedBase,
55
- ...(resolvedConsumer ? { consumer: resolvedConsumer } : {}),
56
- });
57
- }
58
- const baseUrl = resolvedBase;
59
- const consumer = resolvedConsumer;
60
- if (!options.localOnly && !baseUrl) {
61
- return {
62
- ok: false,
63
- error: "baseUrl is missing. Set `blazeoClientConfig.baseUrl` in `appointment-client/src/config/blazeo.config.ts` or call `configure({ baseUrl })`.",
64
- };
65
- }
66
- const snapshot = mapCalendarBOToSnapshot(calendar);
67
- const env = buildModelEnv(baseUrl, consumer, Boolean(options.localOnly));
68
- if (!options.localOnly && env.baseUrl == null) {
69
- return {
70
- ok: false,
71
- error: "Model env requires baseUrl. Set `blazeoClientConfig` or pass `baseUrl` in options.",
72
- };
73
- }
74
- const calendarNode = CalendarModel.create(snapshot, env);
75
- if (options.localOnly) {
76
- return { ok: true, calendar: calendarNode };
77
- }
78
- const apiRes = await calendarNode.create();
79
- if (isFailureStatus(apiRes)) {
80
- const msg = apiRes.message ??
81
- (typeof apiRes.data === "string" ? apiRes.data : undefined) ??
82
- JSON.stringify(apiRes);
83
- return {
84
- ok: false,
85
- error: msg || "Calendar create failed",
86
- apiResponse: apiRes,
87
- };
88
- }
89
- return { ok: true, calendar: calendarNode, apiResponse: apiRes };
90
- }
91
- catch (err) {
92
- const message = err instanceof Error ? err.message : String(err);
93
- return { ok: false, error: message };
94
- }
95
- }
96
- //# sourceMappingURL=calendarCreationFacade.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"calendarCreationFacade.js","sourceRoot":"","sources":["../../src/facade/calendarCreationFacade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAElF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BA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AAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IACvC,CAAC;AACH,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { CalendarBOInput } from "../types/calendarBo.js";
2
- /**
3
- * Maps Apex `CalendarBO`-shaped input to a snapshot for
4
- * {@link CalendarModel.create} from `@blazeo.com/calendar-client`.
5
- *
6
- * Only fields that exist on Blazeo's `Calendar` model are included so MST does not receive
7
- * unknown keys or invalid `null`s on optional numbers.
8
- */
9
- export declare function mapCalendarBOToSnapshot(bo: CalendarBOInput): Record<string, unknown>;
10
- //# sourceMappingURL=mapCalendarBOToSnapshot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapCalendarBOToSnapshot.d.ts","sourceRoot":"","sources":["../../src/facade/mapCalendarBOToSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAc9D;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,EAAE,EAAE,eAAe,GAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA8BzB"}