@blazeo.com/appointment-client 1.0.13 → 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 (135) 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/src/calendar/calendarCreation.ts +62 -15
  5. package/src/events/getAppointmentsByFilter.ts +98 -0
  6. package/src/index.ts +15 -4
  7. package/blazeo.com-appointment-client-1.0.11.tgz +0 -0
  8. package/blazeo.com-appointment-client-1.0.13.tgz +0 -0
  9. package/dist/calendar/blazeoCalendarRelationMethods.d.ts +0 -8
  10. package/dist/calendar/blazeoCalendarRelationMethods.d.ts.map +0 -1
  11. package/dist/calendar/blazeoCalendarRelationMethods.js +0 -16
  12. package/dist/calendar/blazeoCalendarRelationMethods.js.map +0 -1
  13. package/dist/calendar/buildUnifiedCalendarView.d.ts +0 -39
  14. package/dist/calendar/buildUnifiedCalendarView.js +0 -301
  15. package/dist/calendar/calendarCreation.d.ts +0 -27
  16. package/dist/calendar/calendarCreation.js +0 -191
  17. package/dist/calendar/calendarCreationFacade.d.ts +0 -27
  18. package/dist/calendar/calendarCreationFacade.d.ts.map +0 -1
  19. package/dist/calendar/calendarCreationFacade.js +0 -167
  20. package/dist/calendar/calendarCreationFacade.js.map +0 -1
  21. package/dist/calendar/createCalendar.d.ts +0 -81
  22. package/dist/calendar/createCalendar.d.ts.map +0 -1
  23. package/dist/calendar/createCalendar.js +0 -206
  24. package/dist/calendar/createCalendar.js.map +0 -1
  25. package/dist/calendar/fetchCalendarDetails.d.ts +0 -41
  26. package/dist/calendar/fetchCalendarDetails.js +0 -265
  27. package/dist/calendar/fetchCalendarWithOpeningHours.d.ts +0 -25
  28. package/dist/calendar/fetchCalendarWithOpeningHours.js +0 -114
  29. package/dist/calendar/getAllParticipantOpeningHours.d.ts +0 -22
  30. package/dist/calendar/getAllParticipantOpeningHours.js +0 -22
  31. package/dist/calendar/getCalendarsByCompany.d.ts +0 -9
  32. package/dist/calendar/getCalendarsByCompany.js +0 -62
  33. package/dist/calendar/getOpeningHours.d.ts +0 -8
  34. package/dist/calendar/getOpeningHours.js +0 -9
  35. package/dist/calendar/getParticipantOpeningHours.d.ts +0 -37
  36. package/dist/calendar/getParticipantOpeningHours.js +0 -48
  37. package/dist/calendar/getParticipants.d.ts +0 -7
  38. package/dist/calendar/getParticipants.js +0 -13
  39. package/dist/calendar/mapCalendarBoToBlazeoSnapshot.d.ts +0 -10
  40. package/dist/calendar/mapCalendarBoToBlazeoSnapshot.d.ts.map +0 -1
  41. package/dist/calendar/mapCalendarBoToBlazeoSnapshot.js +0 -44
  42. package/dist/calendar/mapCalendarBoToBlazeoSnapshot.js.map +0 -1
  43. package/dist/calendar/mapCalendarToBlazeoSnapshot.d.ts +0 -29
  44. package/dist/calendar/mapCalendarToBlazeoSnapshot.d.ts.map +0 -1
  45. package/dist/calendar/mapCalendarToBlazeoSnapshot.js +0 -44
  46. package/dist/calendar/mapCalendarToBlazeoSnapshot.js.map +0 -1
  47. package/dist/calendar/mapToDesiredResponse.d.ts +0 -56
  48. package/dist/calendar/mapToDesiredResponse.js +0 -111
  49. package/dist/config/applyBlazeoClientConfig.d.ts +0 -3
  50. package/dist/config/applyBlazeoClientConfig.d.ts.map +0 -1
  51. package/dist/config/applyBlazeoClientConfig.js +0 -14
  52. package/dist/config/applyBlazeoClientConfig.js.map +0 -1
  53. package/dist/config/applyBlazeoDefaults.d.ts +0 -2
  54. package/dist/config/applyBlazeoDefaults.d.ts.map +0 -1
  55. package/dist/config/applyBlazeoDefaults.js +0 -14
  56. package/dist/config/applyBlazeoDefaults.js.map +0 -1
  57. package/dist/config/blazeo.config.d.ts +0 -11
  58. package/dist/config/blazeo.config.d.ts.map +0 -1
  59. package/dist/config/blazeo.config.js +0 -11
  60. package/dist/config/blazeo.config.js.map +0 -1
  61. package/dist/config/blazeoClientDefaults.d.ts +0 -11
  62. package/dist/config/blazeoClientDefaults.d.ts.map +0 -1
  63. package/dist/config/blazeoClientDefaults.js +0 -11
  64. package/dist/config/blazeoClientDefaults.js.map +0 -1
  65. package/dist/config/ensureBlazeoHttpReady.d.ts +0 -17
  66. package/dist/config/ensureBlazeoHttpReady.js +0 -31
  67. package/dist/config/initializeAppointmentClient.d.ts +0 -11
  68. package/dist/config/initializeAppointmentClient.d.ts.map +0 -1
  69. package/dist/config/initializeAppointmentClient.js +0 -15
  70. package/dist/config/initializeAppointmentClient.js.map +0 -1
  71. package/dist/config/syncBlazeoConnection.d.ts +0 -6
  72. package/dist/config/syncBlazeoConnection.js +0 -18
  73. package/dist/events/appointmentEventFacade.d.ts +0 -67
  74. package/dist/events/appointmentEventFacade.d.ts.map +0 -1
  75. package/dist/events/appointmentEventFacade.js +0 -124
  76. package/dist/events/appointmentEventFacade.js.map +0 -1
  77. package/dist/events/mapAppointmentToEventSnapshot.d.ts +0 -5
  78. package/dist/events/mapAppointmentToEventSnapshot.d.ts.map +0 -1
  79. package/dist/events/mapAppointmentToEventSnapshot.js +0 -57
  80. package/dist/events/mapAppointmentToEventSnapshot.js.map +0 -1
  81. package/dist/exampleData.d.ts +0 -119
  82. package/dist/exampleData.d.ts.map +0 -1
  83. package/dist/exampleData.js +0 -71
  84. package/dist/exampleData.js.map +0 -1
  85. package/dist/facade/calendarCreationFacade.d.ts +0 -40
  86. package/dist/facade/calendarCreationFacade.d.ts.map +0 -1
  87. package/dist/facade/calendarCreationFacade.js +0 -96
  88. package/dist/facade/calendarCreationFacade.js.map +0 -1
  89. package/dist/facade/mapCalendarBOToSnapshot.d.ts +0 -10
  90. package/dist/facade/mapCalendarBOToSnapshot.d.ts.map +0 -1
  91. package/dist/facade/mapCalendarBOToSnapshot.js +0 -44
  92. package/dist/facade/mapCalendarBOToSnapshot.js.map +0 -1
  93. package/dist/facades/index.d.ts +0 -12
  94. package/dist/facades/index.d.ts.map +0 -1
  95. package/dist/facades/index.js +0 -12
  96. package/dist/facades/index.js.map +0 -1
  97. package/dist/index.d.ts +0 -79
  98. package/dist/index.d.ts.map +0 -1
  99. package/dist/index.js +0 -39
  100. package/dist/index.js.map +0 -1
  101. package/dist/lead/fetchLeadDetails.d.ts +0 -56
  102. package/dist/lead/fetchLeadDetails.js +0 -61
  103. package/dist/models/CalendarRootModel.d.ts +0 -56
  104. package/dist/models/CalendarRootModel.d.ts.map +0 -1
  105. package/dist/models/CalendarRootModel.js +0 -54
  106. package/dist/models/CalendarRootModel.js.map +0 -1
  107. package/dist/models/CalendarSlotModel.d.ts +0 -9
  108. package/dist/models/CalendarSlotModel.d.ts.map +0 -1
  109. package/dist/models/CalendarSlotModel.js +0 -8
  110. package/dist/models/CalendarSlotModel.js.map +0 -1
  111. package/dist/models/EventModel.d.ts +0 -11
  112. package/dist/models/EventModel.d.ts.map +0 -1
  113. package/dist/models/EventModel.js +0 -10
  114. package/dist/models/EventModel.js.map +0 -1
  115. package/dist/models/ParticipantModel.d.ts +0 -9
  116. package/dist/models/ParticipantModel.d.ts.map +0 -1
  117. package/dist/models/ParticipantModel.js +0 -8
  118. package/dist/models/ParticipantModel.js.map +0 -1
  119. package/dist/models/index.d.ts +0 -5
  120. package/dist/models/index.d.ts.map +0 -1
  121. package/dist/models/index.js +0 -5
  122. package/dist/models/index.js.map +0 -1
  123. package/dist/types/appointment.d.ts +0 -28
  124. package/dist/types/appointment.d.ts.map +0 -1
  125. package/dist/types/appointment.js +0 -6
  126. package/dist/types/appointment.js.map +0 -1
  127. package/dist/types/calendar.d.ts +0 -52
  128. package/dist/types/calendar.d.ts.map +0 -1
  129. package/dist/types/calendar.js +0 -6
  130. package/dist/types/calendar.js.map +0 -1
  131. package/dist/types/calendarBo.d.ts +0 -62
  132. package/dist/types/calendarBo.d.ts.map +0 -1
  133. package/dist/types/calendarBo.js +0 -6
  134. package/dist/types/calendarBo.js.map +0 -1
  135. package/sample/package-lock.json +0 -1778
@@ -1 +0,0 @@
1
- {"version":3,"file":"exampleData.js","source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E,IAAI,EAAE,UAAU,EAAE;IAChF,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,UAAU,EAAE;CAC9E,CAAC;AAEF,0CAA0C;AAC1C,MAAM,UAAU,eAAe;IAC7B,OAAO,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,2BAA2B;AAC3B,MAAM,UAAU,gBAAgB;IAC9B,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,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,4BAA4B,CAAC;AAEhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAuCvE,SAAS,eAAe,CAAC,GAAiC;IACxD,OAAO,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC;AAC9D,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,uBAAuB,CAAC,UAAiC,EAAE;IAIzE,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;IACxB,MAAM,YAAY,GAAG,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC5E,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;IAE7D,MAAM,OAAO,GACX,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QAC3C,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QACjC,CAAC,YAAY,IAAI,SAAS,CAAC,CAAC;IAE9B,MAAM,QAAQ,GACZ,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE;QACxB,GAAG,EAAE,QAAQ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,SAAS,CAAC,MAAM,CAAC,CAAC;YACzB,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,GAAG,IAAI,wBAAwB;gBACtC,WAAW,EAAE,MAAM;aACpB,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IACnE,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,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"}
@@ -1,44 +0,0 @@
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
- //# sourceMappingURL=mapCalendarBOToSnapshot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapCalendarBOToSnapshot.js","sourceRoot":"","sources":["../../src/facade/mapCalendarBOToSnapshot.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,MAAM,yBAAyB,GAAG,CAAC,CAAC;AACpC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAE/B;;;GAGG;AACH,SAAS,cAAc,CAAC,CAA4B;IAClD,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,EAAmB;IAEnB,MAAM,UAAU,GACd,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,oBAAoB,IAAI,KAAK,CAAC;IAEpD,OAAO;QACL,EAAE,EAAE,EAAE,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ;QACjD,UAAU,EAAE,EAAE,CAAC,UAAU,IAAI,IAAI;QACjC,UAAU;QACV,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI;QACrB,UAAU,EAAE,EAAE,CAAC,UAAU,IAAI,IAAI;QACjC,OAAO,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,gBAAgB,IAAI,EAAE;QAChD,WAAW,EAAE,EAAE,CAAC,WAAW,IAAI,IAAI;QACnC,gBAAgB,EACd,EAAE,CAAC,gBAAgB,IAAI,EAAE,CAAC,cAAc,IAAI,yBAAyB;QACvE,QAAQ,EAAE,cAAc,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE;QAC3C,YAAY,EAAE,cAAc,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,oBAAoB;QACrE,oBAAoB,EAAE,cAAc,CAAC,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC;QAClE,wBAAwB,EACtB,cAAc,CAAC,EAAE,CAAC,wBAAwB,CAAC,IAAI,oBAAoB;QACrE,wBAAwB,EAAE,cAAc,CAAC,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC;QAC1E,4BAA4B,EAC1B,cAAc,CAAC,EAAE,CAAC,4BAA4B,CAAC,IAAI,oBAAoB;QACzE,WAAW,EAAE,cAAc,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC;QAChD,eAAe,EAAE,cAAc,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC;QACxD,UAAU,EAAE,cAAc,CAAC,EAAE,CAAC,UAAU,CAAC;QACzC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,IAAI,oBAAoB;QACzE,YAAY,EAAE,cAAc,CAAC,EAAE,CAAC,YAAY,CAAC;QAC7C,SAAS,EAAE,EAAE,CAAC,SAAS,IAAI,IAAI;QAC/B,UAAU,EAAE,EAAE,CAAC,UAAU,IAAI,IAAI;KAClC,CAAC;AACJ,CAAC"}
@@ -1,12 +0,0 @@
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
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/facades/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,GAClC,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,uBAAuB,EACvB,6BAA6B,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,GACpC,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,2BAA2B,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,6BAA6B,EAC7B,KAAK,2BAA2B,GACjC,MAAM,4CAA4C,CAAC"}
@@ -1,12 +0,0 @@
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
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/facades/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,GAIxB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,GAGnC,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,uBAAuB,EACvB,6BAA6B,GAG9B,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,2BAA2B,GAM5B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,6BAA6B,GAE9B,MAAM,4CAA4C,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,79 +0,0 @@
1
- export { initializeAppointmentClient, isAppointmentClientConfigured, } from "./config/initializeAppointmentClient.js";
2
- export { syncBlazeoConnection } from "./config/syncBlazeoConnection.js";
3
- export { ensureBlazeoHttpReady } from "./config/ensureBlazeoHttpReady.js";
4
- export type { EnsureBlazeoHttpOptions } from "./config/ensureBlazeoHttpReady.js";
5
- export { blazeoClientConfig } from "./config/blazeoClientDefaults.js";
6
- export { applyBlazeoClientConfig } from "./config/applyBlazeoDefaults.js";
7
- export { createCalendarRoot, CalendarRootModel, CalendarSlotModel, EventModel, ParticipantModel } from "./models/CalendarRootModel.js";
8
- export { fetchCalendarBundle, normalizeOpeningHours } from "./calendar/fetchCalendarDetails.js";
9
- export { buildUnifiedCalendarView, type UnifiedCalendarMember, type UnifiedCalendarView, type UnifiedOpeningHourRow, type UnifiedParticipantWithHours, } from "./calendar/buildUnifiedCalendarView.js";
10
- export { fetchCalendarWithOpeningHours, unwrapCalendarGetData, pickOpeningHoursArrayFromCalendarPayload, normalizeParticipantOpeningHoursResponse } from "./calendar/fetchCalendarWithOpeningHours.js";
11
- export { getOpeningHours } from "./calendar/getOpeningHours.js";
12
- export { getParticipantOpeningHours } from "./calendar/getParticipantOpeningHours.js";
13
- export { getAllParticipantOpeningHours } from "./calendar/getAllParticipantOpeningHours.js";
14
- export { getParticipants } from "./calendar/getParticipants.js";
15
- export { getExampleSlots, getExampleEvents, getExampleParticipants, getExampleCalendarRoot, getExampleCalendarRootSnapshot } from "./exampleData.js";
16
- export { createCalendarAsync, updateCalendarAsync, deleteCalendarAsync, resolveBlazeoConnection } from "./calendar/createCalendar.js";
17
- export { CalendarCreation, createCalendarWithRelationsAsync, updateCalendarWithRelationsAsync, resolveParticipantIdForOpeningHour } from "./calendar/calendarCreation.js";
18
- export { addParticipantToCalendar, removeParticipantFromCalendar, saveCalendarOpeningHour, saveCalendarOpeningHoursBatch } from "./calendar/blazeoCalendarRelationMethods.js";
19
- export { createAppointmentEventAsync, rescheduleAppointmentEventAsync, cancelAppointmentEventAsync } from "./events/appointmentEventFacade.js";
20
- export { mapAppointmentToEventSnapshot } from "./events/mapAppointmentToEventSnapshot.js";
21
- import { getCalendarsByCompany } from "./calendar/getCalendarsByCompany.js";
22
- import { fetchCalendarDetails } from "./calendar/fetchCalendarDetails.js";
23
- export { getCalendarsByCompany, fetchCalendarDetails };
24
- import { EventModel as CoreEventModel, ParticipantModel as CoreParticipantModel, CalendarParticipantModel as CoreCalendarParticipantModel, configure, getConfig } from "@blazeo.com/calendar-client";
25
- export declare const CalendarModel: {
26
- getCalendarsByCompany: typeof getCalendarsByCompany;
27
- fetchCalendarDetails: typeof fetchCalendarDetails;
28
- get(calendarId: string): Promise<unknown>;
29
- getRaw(calendarId: string): Promise<{
30
- status: string;
31
- data?: unknown;
32
- message?: string;
33
- }>;
34
- getByCompany(companyKey: string, opts?: {
35
- skip?: number;
36
- take?: number;
37
- sortBy?: string;
38
- sortOrder?: "ASC" | "DESC" | "asc" | "desc" | string;
39
- sort?: string;
40
- sort_column?: string;
41
- sort_dir?: "asc" | "desc" | string;
42
- page?: number;
43
- page_size?: number;
44
- }): Promise<{
45
- calendars: unknown[];
46
- totalCount: number;
47
- } | null>;
48
- getTimeZones(): Promise<unknown>;
49
- getTimeZone(timezoneId: string): Promise<unknown>;
50
- getParticipants(calendarId: string): Promise<unknown>;
51
- getAllParticipantOpeningHours(calendarId: string): Promise<unknown[] | null>;
52
- getCalendarParticipant(calendarId: string): Promise<unknown>;
53
- getParticipantsInfo(calendarId: string): Promise<unknown>;
54
- getMonth(calendarId: string, year: number, month: number): Promise<unknown>;
55
- getEvents(calendarId: string): Promise<unknown>;
56
- createWithParticipants(name: string, companyKey: string, participantIds: string[], description: string, calendarId?: string): Promise<unknown>;
57
- editWithParticipants(calendarId: string, name: string, participantIds: string[], description: string): Promise<unknown>;
58
- create(snapshot: object, options?: {
59
- env?: object;
60
- }): unknown;
61
- };
62
- export { CoreEventModel as CoreEventModel, CoreParticipantModel as CoreParticipantModel, CoreCalendarParticipantModel as CalendarParticipantModel, configure, getConfig };
63
- export declare const packageName = "@blazeo.com/appointment-client";
64
- export declare class CalendarClient {
65
- name: string;
66
- getExampleSlots(): (import("mobx-state-tree").ModelInstanceTypeProps<{
67
- id: import("mobx-state-tree").ISimpleType<string>;
68
- title: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
69
- start: import("mobx-state-tree").ISimpleType<string>;
70
- end: import("mobx-state-tree").ISimpleType<string>;
71
- isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
72
- }> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
73
- id: import("mobx-state-tree").ISimpleType<string>;
74
- title: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
75
- start: import("mobx-state-tree").ISimpleType<string>;
76
- end: import("mobx-state-tree").ISimpleType<string>;
77
- isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
78
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>)[];
79
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,KAAK,+BAA+B,EACrC,MAAM,yCAAyC,CAAC;AAGjD,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAEhD,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,KAAK,+BAA+B,GACrC,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,6DAA6D;AAC7D,cAAc,oBAAoB,CAAC;AAEnC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,YAAY,EACV,aAAa,IAAI,eAAe,EAChC,aAAa,EACb,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EACL,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,mGAAmG;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,qBAAa,cAAc;IACzB,QAAQ,CAAC,IAAI,wBAAe;IAE5B,gFAAgF;IAChF,OAAO,CAAC,OAAO,EAAE,+BAA+B,GAAG,IAAI;IAIvD,eAAe;;;;;;;;;;;IAIf,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGf"}
package/dist/index.js DELETED
@@ -1,39 +0,0 @@
1
- import { getExampleSlots } from "./exampleData.js";
2
- export { initializeAppointmentClient, isAppointmentClientConfigured, } from "./config/initializeAppointmentClient.js";
3
- export { syncBlazeoConnection } from "./config/syncBlazeoConnection.js";
4
- export { ensureBlazeoHttpReady } from "./config/ensureBlazeoHttpReady.js";
5
- export { blazeoClientConfig } from "./config/blazeoClientDefaults.js";
6
- export { applyBlazeoClientConfig } from "./config/applyBlazeoDefaults.js";
7
- export { createCalendarRoot, CalendarRootModel, CalendarSlotModel, EventModel, ParticipantModel } from "./models/CalendarRootModel.js";
8
- export { fetchCalendarBundle, normalizeOpeningHours } from "./calendar/fetchCalendarDetails.js";
9
- export { buildUnifiedCalendarView, } from "./calendar/buildUnifiedCalendarView.js";
10
- export { fetchCalendarWithOpeningHours, unwrapCalendarGetData, pickOpeningHoursArrayFromCalendarPayload, normalizeParticipantOpeningHoursResponse } from "./calendar/fetchCalendarWithOpeningHours.js";
11
- export { getOpeningHours } from "./calendar/getOpeningHours.js";
12
- export { getParticipantOpeningHours } from "./calendar/getParticipantOpeningHours.js";
13
- export { getAllParticipantOpeningHours } from "./calendar/getAllParticipantOpeningHours.js";
14
- export { getParticipants } from "./calendar/getParticipants.js";
15
- export { getExampleSlots, getExampleEvents, getExampleParticipants, getExampleCalendarRoot, getExampleCalendarRootSnapshot } from "./exampleData.js";
16
- // Re-export core models from calendar-client for convenience
17
- export { createCalendarAsync, updateCalendarAsync, deleteCalendarAsync, resolveBlazeoConnection } from "./calendar/createCalendar.js";
18
- export { CalendarCreation, createCalendarWithRelationsAsync, updateCalendarWithRelationsAsync, resolveParticipantIdForOpeningHour } from "./calendar/calendarCreation.js";
19
- export { addParticipantToCalendar, removeParticipantFromCalendar, saveCalendarOpeningHour, saveCalendarOpeningHoursBatch } from "./calendar/blazeoCalendarRelationMethods.js";
20
- export { createAppointmentEventAsync, rescheduleAppointmentEventAsync, cancelAppointmentEventAsync } from "./events/appointmentEventFacade.js";
21
- export { mapAppointmentToEventSnapshot } from "./events/mapAppointmentToEventSnapshot.js";
22
- import { getCalendarsByCompany } from "./calendar/getCalendarsByCompany.js";
23
- import { fetchCalendarDetails } from "./calendar/fetchCalendarDetails.js";
24
- export { getCalendarsByCompany, fetchCalendarDetails };
25
- import { CalendarModel as CoreCalendarModel, EventModel as CoreEventModel, ParticipantModel as CoreParticipantModel, CalendarParticipantModel as CoreCalendarParticipantModel, configure, getConfig } from "@blazeo.com/calendar-client";
26
- // Enriched CalendarModel
27
- export const CalendarModel = {
28
- ...CoreCalendarModel,
29
- getCalendarsByCompany,
30
- fetchCalendarDetails
31
- };
32
- export { CoreEventModel as CoreEventModel, CoreParticipantModel as CoreParticipantModel, CoreCalendarParticipantModel as CalendarParticipantModel, configure, getConfig };
33
- export const packageName = "@blazeo.com/appointment-client";
34
- export class CalendarClient {
35
- name = "CalendarClient";
36
- getExampleSlots() {
37
- return getExampleSlots();
38
- }
39
- }
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,GAE9B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE3E,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAEhD,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,GAE9B,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,6DAA6D;AAC7D,cAAc,oBAAoB,CAAC;AAEnC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AASpF,OAAO,EACL,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,mGAAmG;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,MAAM,OAAO,cAAc;IAChB,IAAI,GAAG,WAAW,CAAC;IAE5B,gFAAgF;IAChF,OAAO,CAAC,OAAwC;QAC9C,2BAA2B,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,eAAe;QACb,OAAO,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,cAAc;QACZ,OAAO,sBAAsB,EAAE,CAAC;IAClC,CAAC;CACF"}
@@ -1,56 +0,0 @@
1
- export type BlazeoLeadConnection = {
2
- baseUrl?: string;
3
- consumer?: string;
4
- };
5
- /** Paging / sort options forwarded to `LeadModel.getByCompany` → `GET /lead/company/get`. */
6
- export type LeadsByCompanyListOpts = {
7
- skip?: number;
8
- take?: number;
9
- sortBy?: string;
10
- sortOrder?: "ASC" | "DESC" | "asc" | "desc" | string;
11
- sort?: string;
12
- sort_column?: string;
13
- sort_dir?: "asc" | "desc" | string;
14
- page?: number;
15
- page_size?: number;
16
- searchColumn?: string;
17
- search_column?: string;
18
- searchText?: string;
19
- search_text?: string;
20
- search?: string;
21
- };
22
- /**
23
- * Lead by id: `LeadModel.getRaw` / `get` → `GET /lead/get?lead_id=…`.
24
- * Returns the mapped MST snapshot when successful, plus the raw API envelope from `getRaw`.
25
- */
26
- export declare function fetchLeadDetails(leadId: string, connection?: BlazeoLeadConnection): Promise<{
27
- ok: true;
28
- lead: Record<string, unknown> | null;
29
- rawGet: unknown;
30
- } | {
31
- ok: false;
32
- reason: "missing_base_url";
33
- detail: string;
34
- }>;
35
- /**
36
- * Single lead by email + company: `GET /lead/getbyemail`.
37
- */
38
- export declare function fetchLeadByEmail(email: string, companyKey: string, connection?: BlazeoLeadConnection): Promise<{
39
- ok: true;
40
- lead: Record<string, unknown> | null;
41
- } | {
42
- ok: false;
43
- reason: "missing_base_url";
44
- detail: string;
45
- }>;
46
- /**
47
- * Paged list: `LeadModel.getByCompany` → `GET /lead/company/get`.
48
- */
49
- export declare function fetchLeadsByCompany(companyKey: string, listOpts?: LeadsByCompanyListOpts, connection?: BlazeoLeadConnection): Promise<{
50
- ok: true;
51
- leads: Record<string, unknown>[];
52
- } | {
53
- ok: false;
54
- reason: "missing_base_url";
55
- detail: string;
56
- }>;
@@ -1,61 +0,0 @@
1
- import { LeadModel } from "@blazeo.com/calendar-client";
2
- import { getSnapshot, isStateTreeNode } from "mobx-state-tree";
3
- import { ensureBlazeoHttpReady } from "../config/ensureBlazeoHttpReady.js";
4
- function leadToPlain(lead) {
5
- if (lead == null)
6
- return null;
7
- if (isStateTreeNode(lead)) {
8
- return getSnapshot(lead);
9
- }
10
- if (typeof lead === "object")
11
- return lead;
12
- return null;
13
- }
14
- function leadsToPlain(list) {
15
- if (!Array.isArray(list))
16
- return [];
17
- return list.map((x) => leadToPlain(x)).filter((x) => x != null);
18
- }
19
- /**
20
- * Lead by id: `LeadModel.getRaw` / `get` → `GET /lead/get?lead_id=…`.
21
- * Returns the mapped MST snapshot when successful, plus the raw API envelope from `getRaw`.
22
- */
23
- export async function fetchLeadDetails(leadId, connection = {}) {
24
- const ready = ensureBlazeoHttpReady(connection);
25
- if (!ready.ok) {
26
- return { ok: false, reason: "missing_base_url", detail: ready.error };
27
- }
28
- const id = String(leadId ?? "").trim();
29
- if (!id) {
30
- return {
31
- ok: true,
32
- lead: null,
33
- rawGet: { status: "failure", message: "leadId is empty" },
34
- };
35
- }
36
- const rawGet = await LeadModel.getRaw(id);
37
- const model = await LeadModel.get(id);
38
- return { ok: true, lead: leadToPlain(model), rawGet };
39
- }
40
- /**
41
- * Single lead by email + company: `GET /lead/getbyemail`.
42
- */
43
- export async function fetchLeadByEmail(email, companyKey, connection = {}) {
44
- const ready = ensureBlazeoHttpReady(connection);
45
- if (!ready.ok) {
46
- return { ok: false, reason: "missing_base_url", detail: ready.error };
47
- }
48
- const model = await LeadModel.getByEmail(String(email).trim(), String(companyKey).trim());
49
- return { ok: true, lead: leadToPlain(model) };
50
- }
51
- /**
52
- * Paged list: `LeadModel.getByCompany` → `GET /lead/company/get`.
53
- */
54
- export async function fetchLeadsByCompany(companyKey, listOpts = {}, connection = {}) {
55
- const ready = ensureBlazeoHttpReady(connection);
56
- if (!ready.ok) {
57
- return { ok: false, reason: "missing_base_url", detail: ready.error };
58
- }
59
- const models = await LeadModel.getByCompany(String(companyKey).trim(), listOpts);
60
- return { ok: true, leads: leadsToPlain(models ?? []) };
61
- }
@@ -1,56 +0,0 @@
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>;
23
- export declare const CalendarRootModel: import("mobx-state-tree").IModelType<{
24
- slots: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
25
- id: import("mobx-state-tree").ISimpleType<string>;
26
- title: import("mobx-state-tree").IMaybeNull<import("mobx-state-tree").ISimpleType<string>>;
27
- start: import("mobx-state-tree").ISimpleType<string>;
28
- end: import("mobx-state-tree").ISimpleType<string>;
29
- isAvailable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
30
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
31
- events: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
32
- id: import("mobx-state-tree").ISimpleType<string>;
33
- title: 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>>;
37
- participantIds: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
38
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
39
- participants: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
40
- id: import("mobx-state-tree").ISimpleType<string>;
41
- name: import("mobx-state-tree").ISimpleType<string>;
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>>;
44
- }, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
45
- }, {
46
- removeSlot(id: string): void;
47
- removeEvent(id: string): void;
48
- removeParticipant(id: string): void;
49
- }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
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 +0,0 @@
1
- {"version":3,"file":"CalendarRootModel.d.ts","sourceRoot":"","sources":["../../src/models/CalendarRootModel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EAEhB,MAAM,iBAAiB,CAAC;AAKzB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;mBAOX,MAAM;oBAIL,MAAM;0BAIA,MAAM;sFAI3B,CAAC;AAEN,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE9D,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE1E,wBAAgB,kBAAkB,CAChC,QAAQ,CAAC,EAAE,sBAAsB,GAChC,YAAY,CAQd"}
@@ -1,54 +0,0 @@
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
- });
23
- export const CalendarRootModel = types
24
- .model("CalendarRoot", {
25
- slots: types.array(CalendarSlotModel),
26
- events: types.array(EventModel),
27
- participants: types.array(ParticipantModel),
28
- })
29
- .actions((self) => ({
30
- removeSlot(id) {
31
- const i = self.slots.findIndex((s) => s.id === id);
32
- if (i >= 0)
33
- self.slots.splice(i, 1);
34
- },
35
- removeEvent(id) {
36
- const i = self.events.findIndex((e) => e.id === id);
37
- if (i >= 0)
38
- self.events.splice(i, 1);
39
- },
40
- removeParticipant(id) {
41
- const i = self.participants.findIndex((p) => p.id === id);
42
- if (i >= 0)
43
- self.participants.splice(i, 1);
44
- },
45
- }));
46
- export function createCalendarRoot(snapshot) {
47
- return snapshot
48
- ? CalendarRootModel.create(snapshot)
49
- : CalendarRootModel.create({
50
- slots: [],
51
- events: [],
52
- participants: [],
53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