@fayz-ai/plugin-agenda 0.8.0 → 0.8.3
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/dist/{chunk-LFUELUIT.cjs → chunk-3KWNHV5A.cjs} +60 -2
- package/dist/chunk-3KWNHV5A.cjs.map +1 -0
- package/dist/{chunk-DRZF6CV2.js → chunk-YQO6B4G3.js} +60 -3
- package/dist/chunk-YQO6B4G3.js.map +1 -0
- package/dist/components/AgendaGeneralSettings.d.ts.map +1 -1
- package/dist/components/AppointmentModal.d.ts.map +1 -1
- package/dist/components/CalendarToolbar.d.ts.map +1 -1
- package/dist/data/supabase.d.ts +5 -1
- package/dist/data/supabase.d.ts.map +1 -1
- package/dist/index.cjs +1071 -766
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +914 -609
- package/dist/index.js.map +1 -1
- package/dist/integrations/google-calendar/components/CalendarColorDot.d.ts +6 -0
- package/dist/integrations/google-calendar/components/CalendarColorDot.d.ts.map +1 -0
- package/dist/integrations/google-calendar/components/ChannelMappingList.d.ts +9 -0
- package/dist/integrations/google-calendar/components/ChannelMappingList.d.ts.map +1 -0
- package/dist/integrations/google-calendar/components/ImportEventsWizard.d.ts +12 -0
- package/dist/integrations/google-calendar/components/ImportEventsWizard.d.ts.map +1 -0
- package/dist/integrations/google-calendar/components/useAgendaLookups.d.ts +26 -0
- package/dist/integrations/google-calendar/components/useAgendaLookups.d.ts.map +1 -0
- package/dist/integrations/google-calendar/connectorDef.d.ts.map +1 -1
- package/dist/integrations/google-calendar/data/supabase.d.ts +33 -1
- package/dist/integrations/google-calendar/data/supabase.d.ts.map +1 -1
- package/dist/integrations/google-calendar/data/tables.d.ts +6 -0
- package/dist/integrations/google-calendar/data/tables.d.ts.map +1 -0
- package/dist/integrations/google-calendar/index.d.ts +1 -1
- package/dist/integrations/google-calendar/index.d.ts.map +1 -1
- package/dist/integrations/google-calendar/mapping.d.ts +56 -4
- package/dist/integrations/google-calendar/mapping.d.ts.map +1 -1
- package/dist/integrations/google-calendar/types.d.ts +101 -0
- package/dist/integrations/google-calendar/types.d.ts.map +1 -1
- package/dist/locales/en.d.ts.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/migrations/index.d.ts +11 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/public/BookingWidget.d.ts.map +1 -1
- package/dist/public/context.d.ts +3 -1
- package/dist/public/context.d.ts.map +1 -1
- package/dist/public/createPublicBookingPlugin.d.ts +7 -1
- package/dist/public/createPublicBookingPlugin.d.ts.map +1 -1
- package/dist/public/data.d.ts +6 -0
- package/dist/public/data.d.ts.map +1 -1
- package/dist/public/data.supabase.d.ts.map +1 -1
- package/dist/public/format.d.ts +22 -1
- package/dist/public/format.d.ts.map +1 -1
- package/dist/public/hooks.d.ts.map +1 -1
- package/dist/public/index.cjs +31 -63
- package/dist/public/index.cjs.map +1 -1
- package/dist/public/index.d.ts +1 -1
- package/dist/public/index.d.ts.map +1 -1
- package/dist/public/index.js +27 -61
- package/dist/public/index.js.map +1 -1
- package/dist/public/steps/ContactStep.d.ts +4 -2
- package/dist/public/steps/ContactStep.d.ts.map +1 -1
- package/dist/public/types.d.ts +16 -0
- package/dist/public/types.d.ts.map +1 -1
- package/dist/views/CalendarView.d.ts.map +1 -1
- package/package.json +6 -5
- package/src/components/AgendaGeneralSettings.tsx +38 -16
- package/src/components/AppointmentModal.tsx +50 -108
- package/src/components/CalendarToolbar.tsx +10 -7
- package/src/data/supabase.ts +67 -13
- package/src/index.ts +56 -8
- package/src/integrations/google-calendar/components/CalendarColorDot.tsx +23 -0
- package/src/integrations/google-calendar/components/ChannelMappingList.tsx +329 -0
- package/src/integrations/google-calendar/components/ImportEventsWizard.tsx +215 -0
- package/src/integrations/google-calendar/components/useAgendaLookups.ts +100 -0
- package/src/integrations/google-calendar/connectorDef.tsx +123 -40
- package/src/integrations/google-calendar/data/supabase.ts +109 -13
- package/src/integrations/google-calendar/data/tables.ts +12 -0
- package/src/integrations/google-calendar/index.ts +10 -1
- package/src/integrations/google-calendar/integration.test.ts +126 -1
- package/src/integrations/google-calendar/mapping.ts +149 -9
- package/src/integrations/google-calendar/migrations/001_google_calendar.sql +9 -6
- package/src/integrations/google-calendar/migrations/002_smart_sync.sql +517 -0
- package/src/integrations/google-calendar/migrations/003_plg_rename.sql +273 -0
- package/src/integrations/google-calendar/types.ts +111 -0
- package/src/locales/en.ts +1 -0
- package/src/locales/pt-BR.ts +1 -0
- package/src/migrations/003_public_client_kind.sql +175 -0
- package/src/migrations/004_public_booking_assignee.sql +176 -0
- package/src/migrations/005_agent_rpcs.sql +168 -0
- package/src/migrations/006_agent_rpc_localtime.sql +181 -0
- package/src/migrations/007_schedule_exception_precedence.sql +290 -0
- package/src/migrations/008_agent_rpc_exception_precedence.sql +172 -0
- package/src/migrations/009_public_booking_location.sql +162 -0
- package/src/migrations/010_public_service_curation.sql +31 -0
- package/src/migrations/011_default_assignee.sql +167 -0
- package/src/migrations/012_drop_legacy_booking_overload.sql +29 -0
- package/src/migrations/013_normalize_v_appointments.sql +161 -0
- package/src/migrations/index.ts +1746 -1
- package/src/public/BookingWidget.tsx +10 -1
- package/src/public/context.tsx +3 -0
- package/src/public/createPublicBookingPlugin.ts +14 -1
- package/src/public/data.supabase.ts +3 -0
- package/src/public/data.ts +6 -0
- package/src/public/format.ts +36 -1
- package/src/public/hooks.ts +7 -2
- package/src/public/index.ts +1 -0
- package/src/public/steps/ContactStep.tsx +10 -5
- package/src/public/types.ts +21 -0
- package/src/views/CalendarView.tsx +15 -1
- package/dist/chunk-3LJKZQK4.js +0 -12
- package/dist/chunk-3LJKZQK4.js.map +0 -1
- package/dist/chunk-DRZF6CV2.js.map +0 -1
- package/dist/chunk-LFUELUIT.cjs.map +0 -1
- package/dist/chunk-SYDBDI3Q.cjs +0 -15
- package/dist/chunk-SYDBDI3Q.cjs.map +0 -1
- package/dist/components/SearchCombobox.d.ts +0 -38
- package/dist/components/SearchCombobox.d.ts.map +0 -1
- package/dist/tenant-222EHYUC.cjs +0 -16
- package/dist/tenant-222EHYUC.cjs.map +0 -1
- package/dist/tenant-LAUWVUYB.js +0 -3
- package/dist/tenant-LAUWVUYB.js.map +0 -1
- package/src/components/SearchCombobox.tsx +0 -216
package/dist/public/index.d.ts
CHANGED
|
@@ -16,5 +16,5 @@ export { DefaultSidebarExtras } from './components/SidebarExtras';
|
|
|
16
16
|
export { DefaultStepRailItem } from './components/StepRailItem';
|
|
17
17
|
export { DefaultSuccessPanel } from './components/SuccessPanel';
|
|
18
18
|
export { useFormatters, formatSlotRange, DAY_NAMES, WEEK_ORDER } from './format';
|
|
19
|
-
export type { PublicService, ContactInfo, BookingWindow, PublicBookingLabels, WorkingHours, PaymentConfig, ResolvedPayment, BookingBrand, ResolvedBookingBrand, BookingHighlight, BookingFormatters, BookingComponents, BrandHeaderProps, ServiceCardProps, SidebarExtrasProps, SuccessPanelProps, StepRailItemProps, StepState, } from './types';
|
|
19
|
+
export type { PublicService, ContactInfo, BookingWindow, PublicBookingLabels, WorkingHours, PaymentConfig, ResolvedPayment, PhoneVerificationMode, BookingBrand, ResolvedBookingBrand, BookingHighlight, BookingFormatters, BookingComponents, BrandHeaderProps, ServiceCardProps, SidebarExtrasProps, SuccessPanelProps, StepRailItemProps, StepState, } from './types';
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/public/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAC5F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACvD,YAAY,EAAE,yBAAyB,EA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Y,EACZ,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,MAAM,SAAS,CAAA"}
|
package/dist/public/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { createMockAgendaProvider } from '../chunk-
|
|
1
|
+
import { createMockAgendaProvider, createSupabasePublicBookingProvider } from '../chunk-YQO6B4G3.js';
|
|
2
|
+
export { createSupabasePublicBookingProvider } from '../chunk-YQO6B4G3.js';
|
|
2
3
|
import { createContext, useState, useEffect, useMemo, useContext, useRef, createElement } from 'react';
|
|
3
4
|
import { ChevronLeft, ShieldCheck, Clock, ChevronRight, User, Check, Calendar, ChevronDown, Loader2, CreditCard, Plus, QrCode, CalendarCheck, Copy, Video } from 'lucide-react';
|
|
4
|
-
import { DEFAULT_COUNTRY, getCountry, maskPhone, unmaskPhone, getSupabaseClientOptional, getFayzCloudClient, COUNTRIES } from '@fayz-ai/core';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
import { DEFAULT_COUNTRY, getCountry, maskPhone, unmaskPhone, COUNTRIES } from '@fayz-ai/core';
|
|
6
7
|
|
|
7
8
|
// src/public/data.ts
|
|
8
9
|
function createMockPublicBookingProvider(options) {
|
|
@@ -47,58 +48,6 @@ function createMockPublicBookingProvider(options) {
|
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
function getClient() {
|
|
51
|
-
return getSupabaseClientOptional() ?? getFayzCloudClient();
|
|
52
|
-
}
|
|
53
|
-
function toPhoneDigits(phone) {
|
|
54
|
-
return (phone ?? "").replace(/\D/g, "");
|
|
55
|
-
}
|
|
56
|
-
function createSupabasePublicBookingProvider(options) {
|
|
57
|
-
const { tenantId } = options;
|
|
58
|
-
return {
|
|
59
|
-
async getServices() {
|
|
60
|
-
const { data, error } = await getClient().from("v_public_services").select("id, name, description, price, currency, duration_minutes, sort_order").eq("tenant_id", tenantId).order("sort_order", { ascending: true });
|
|
61
|
-
if (error) throw new Error(`[plugin-agenda/public] getServices: ${error.message}`);
|
|
62
|
-
return (data ?? []).map((row) => ({
|
|
63
|
-
id: String(row.id),
|
|
64
|
-
name: String(row.name),
|
|
65
|
-
description: row.description ?? void 0,
|
|
66
|
-
price: Number(row.price ?? 0),
|
|
67
|
-
durationMinutes: Number(row.duration_minutes ?? 30)
|
|
68
|
-
}));
|
|
69
|
-
},
|
|
70
|
-
async getAvailableSlots(query) {
|
|
71
|
-
const { data, error } = await getClient().rpc("get_available_slots", {
|
|
72
|
-
p_tenant_id: tenantId,
|
|
73
|
-
p_assignee_id: query.assigneeId,
|
|
74
|
-
p_date: query.date,
|
|
75
|
-
p_duration_minutes: query.durationMinutes,
|
|
76
|
-
p_slot_interval: query.slotInterval
|
|
77
|
-
});
|
|
78
|
-
if (error) throw new Error(`[plugin-agenda/public] getAvailableSlots: ${error.message}`);
|
|
79
|
-
return (data ?? []).map((row) => ({
|
|
80
|
-
start: row.slot_start,
|
|
81
|
-
end: row.slot_end
|
|
82
|
-
}));
|
|
83
|
-
},
|
|
84
|
-
async createBooking(input) {
|
|
85
|
-
const phone = toPhoneDigits(input.contact.phone);
|
|
86
|
-
const { data, error } = await getClient().rpc("create_public_booking", {
|
|
87
|
-
p_tenant_id: tenantId,
|
|
88
|
-
p_service_id: input.serviceId,
|
|
89
|
-
p_starts_at: input.startsAt,
|
|
90
|
-
p_name: input.contact.name.trim(),
|
|
91
|
-
p_phone: phone,
|
|
92
|
-
p_email: input.contact.email?.trim() || null,
|
|
93
|
-
p_notes: input.contact.notes?.trim() || null
|
|
94
|
-
});
|
|
95
|
-
if (error) throw new Error(`[plugin-agenda/public] createBooking: ${error.message}`);
|
|
96
|
-
const row = Array.isArray(data) ? data[0] : data;
|
|
97
|
-
if (!row) throw new Error("[plugin-agenda/public] createBooking: empty RPC response");
|
|
98
|
-
return { bookingId: row.booking_id, startsAt: row.starts_at, endsAt: row.ends_at };
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
51
|
var PublicBookingContext = createContext(null);
|
|
103
52
|
function BookingProvider({ base, staticServices, children }) {
|
|
104
53
|
const [fetched, setFetched] = useState(null);
|
|
@@ -171,7 +120,7 @@ function useAvailableSlots(params) {
|
|
|
171
120
|
return { slots, loading, error };
|
|
172
121
|
}
|
|
173
122
|
function useCreateBooking() {
|
|
174
|
-
const { provider } = useBooking();
|
|
123
|
+
const { provider, professionalId } = useBooking();
|
|
175
124
|
const [submitting, setSubmitting] = useState(false);
|
|
176
125
|
const [error, setError] = useState(null);
|
|
177
126
|
const [done, setDone] = useState(false);
|
|
@@ -179,7 +128,10 @@ function useCreateBooking() {
|
|
|
179
128
|
setSubmitting(true);
|
|
180
129
|
setError(null);
|
|
181
130
|
try {
|
|
182
|
-
const result = await provider.createBooking(
|
|
131
|
+
const result = await provider.createBooking({
|
|
132
|
+
...input,
|
|
133
|
+
assigneeId: input.assigneeId ?? professionalId ?? null
|
|
134
|
+
});
|
|
183
135
|
setDone(true);
|
|
184
136
|
return result;
|
|
185
137
|
} catch (err) {
|
|
@@ -395,6 +347,7 @@ function ContactStep({
|
|
|
395
347
|
contact,
|
|
396
348
|
onContactChange,
|
|
397
349
|
contactStep,
|
|
350
|
+
phoneVerification,
|
|
398
351
|
country,
|
|
399
352
|
onCountryChange,
|
|
400
353
|
code,
|
|
@@ -449,7 +402,7 @@ function ContactStep({
|
|
|
449
402
|
}
|
|
450
403
|
)
|
|
451
404
|
] }),
|
|
452
|
-
/* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: labels.phoneHint })
|
|
405
|
+
/* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: phoneVerification === "none" ? labels.phoneHintNoVerification : labels.phoneHint })
|
|
453
406
|
] }),
|
|
454
407
|
/* @__PURE__ */ jsx(
|
|
455
408
|
"button",
|
|
@@ -457,7 +410,7 @@ function ContactStep({
|
|
|
457
410
|
type: "submit",
|
|
458
411
|
disabled: unmaskPhone(contact.phone).length < 8,
|
|
459
412
|
className: "mt-5 w-full rounded-xl bg-primary py-3 font-semibold text-primary-foreground transition-opacity hover:opacity-90 disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
460
|
-
children: labels.sendCodeCta
|
|
413
|
+
children: phoneVerification === "none" ? labels.phoneContinueCta : labels.sendCodeCta
|
|
461
414
|
}
|
|
462
415
|
)
|
|
463
416
|
] }) : null,
|
|
@@ -470,7 +423,7 @@ function ContactStep({
|
|
|
470
423
|
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-sm text-foreground", children: [
|
|
471
424
|
/* @__PURE__ */ jsx(ShieldCheck, { className: "h-4 w-4 text-primary" }),
|
|
472
425
|
" ",
|
|
473
|
-
labels.phoneVerified,
|
|
426
|
+
phoneVerification === "none" ? labels.phoneLabel : labels.phoneVerified,
|
|
474
427
|
" \xB7 ",
|
|
475
428
|
country.flag,
|
|
476
429
|
" ",
|
|
@@ -807,6 +760,7 @@ function BookingWidget() {
|
|
|
807
760
|
businessHours,
|
|
808
761
|
payment,
|
|
809
762
|
paymentProvider,
|
|
763
|
+
phoneVerification,
|
|
810
764
|
onIdentityVerified,
|
|
811
765
|
labels,
|
|
812
766
|
brand,
|
|
@@ -903,6 +857,11 @@ function BookingWidget() {
|
|
|
903
857
|
}
|
|
904
858
|
function sendCode() {
|
|
905
859
|
if (unmaskPhone(contact.phone).length < 8) return;
|
|
860
|
+
if (phoneVerification === "none") {
|
|
861
|
+
emitIdentity();
|
|
862
|
+
setContactStep("details");
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
906
865
|
setCode("");
|
|
907
866
|
setCodeError(false);
|
|
908
867
|
setContactStep("code");
|
|
@@ -1040,6 +999,7 @@ function BookingWidget() {
|
|
|
1040
999
|
setCode(v);
|
|
1041
1000
|
setCodeError(false);
|
|
1042
1001
|
},
|
|
1002
|
+
phoneVerification,
|
|
1043
1003
|
codeError,
|
|
1044
1004
|
onSendCode: sendCode,
|
|
1045
1005
|
onConfirmCode: confirmCode,
|
|
@@ -1246,6 +1206,8 @@ var DEFAULT_LABELS = {
|
|
|
1246
1206
|
phoneLabel: "Celular",
|
|
1247
1207
|
phoneHint: "Enviaremos um c\xF3digo para confirmar que o n\xFAmero de telefone \xE9 seu. Usaremos este n\xFAmero para associar as suas informa\xE7\xF5es \xE0 sua conta.",
|
|
1248
1208
|
sendCodeCta: "Enviar c\xF3digo via WhatsApp",
|
|
1209
|
+
phoneHintNoVerification: "Usaremos este n\xFAmero para confirmar seu agendamento pelo WhatsApp.",
|
|
1210
|
+
phoneContinueCta: "Continuar",
|
|
1249
1211
|
codeTitle: "Insira o c\xF3digo",
|
|
1250
1212
|
codeBody: "Enviamos um c\xF3digo via WhatsApp para voc\xEA confirmar seu n\xFAmero.",
|
|
1251
1213
|
codeInvalid: "C\xF3digo inv\xE1lido. Para testar, use 0000.",
|
|
@@ -1262,7 +1224,9 @@ var DEFAULT_LABELS = {
|
|
|
1262
1224
|
notesPlaceholder: "Use esse espa\xE7o para deixar uma observa\xE7\xE3o sobre este agendamento",
|
|
1263
1225
|
saveAndContinueCta: "Salvar e continuar",
|
|
1264
1226
|
submitError: "N\xE3o foi poss\xEDvel concluir o agendamento. Tente novamente.",
|
|
1265
|
-
|
|
1227
|
+
// Rendered ONLY when the payment step is off — so it must not promise a
|
|
1228
|
+
// payment method the flow never shows.
|
|
1229
|
+
noChargeNote: "Sem cobran\xE7a agora \xB7 o pagamento \xE9 feito no atendimento",
|
|
1266
1230
|
// right rail
|
|
1267
1231
|
railTitle: "Passos para agendar",
|
|
1268
1232
|
railWaitingPayment: "Aguardando pagamento",
|
|
@@ -1319,6 +1283,7 @@ function createPublicBookingPlugin(options) {
|
|
|
1319
1283
|
const locale = options.locale ?? "pt-BR";
|
|
1320
1284
|
const hours = options.workingHours ?? DEFAULT_HOURS;
|
|
1321
1285
|
const staticServices = options.services ?? null;
|
|
1286
|
+
const phoneVerification = options.phoneVerification ?? "none";
|
|
1322
1287
|
const payment = options.payment?.enabled ? {
|
|
1323
1288
|
reservationFeePercent: options.payment.reservationFeePercent ?? 100,
|
|
1324
1289
|
method: options.payment.method ?? "pix"
|
|
@@ -1358,6 +1323,7 @@ function createPublicBookingPlugin(options) {
|
|
|
1358
1323
|
professionalId,
|
|
1359
1324
|
professionalName,
|
|
1360
1325
|
businessHours: hours,
|
|
1326
|
+
phoneVerification,
|
|
1361
1327
|
payment,
|
|
1362
1328
|
paymentProvider: options.paymentProvider ?? null,
|
|
1363
1329
|
onIdentityVerified: options.onIdentityVerified ?? null,
|
|
@@ -1397,6 +1363,6 @@ function createPublicBookingPlugin(options) {
|
|
|
1397
1363
|
return { manifest, Provider, dataProvider: provider };
|
|
1398
1364
|
}
|
|
1399
1365
|
|
|
1400
|
-
export { BookingProvider, BookingWidget, DAY_NAMES, DEFAULT_BOOKING_COMPONENTS, DefaultBrandHeader, DefaultServiceCard, DefaultSidebarExtras, DefaultStepRailItem, DefaultSuccessPanel, WEEK_ORDER, createMockPublicBookingProvider, createPublicBookingPlugin,
|
|
1366
|
+
export { BookingProvider, BookingWidget, DAY_NAMES, DEFAULT_BOOKING_COMPONENTS, DefaultBrandHeader, DefaultServiceCard, DefaultSidebarExtras, DefaultStepRailItem, DefaultSuccessPanel, WEEK_ORDER, createMockPublicBookingProvider, createPublicBookingPlugin, formatSlotRange, useAvailableSlots, useBooking, useCreateBooking, useFormatters, usePublicServices, useServices };
|
|
1401
1367
|
//# sourceMappingURL=index.js.map
|
|
1402
1368
|
//# sourceMappingURL=index.js.map
|