@fayz-ai/admin 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/dist/{CommandPalette-U7MMA2WH.js → CommandPalette-XY3VOEAV.js} +23 -13
  2. package/dist/CommandPalette-XY3VOEAV.js.map +1 -0
  3. package/dist/{ScheduleEditor-S3QI5MHO.js → ScheduleEditor-A3SX6AYD.js} +4 -4
  4. package/dist/{ScheduleEditor-S3QI5MHO.js.map → ScheduleEditor-A3SX6AYD.js.map} +1 -1
  5. package/dist/SubscriptionPage-FE2B5ZXF.js +7 -0
  6. package/dist/{SubscriptionPage-4KP7DKA2.js.map → SubscriptionPage-FE2B5ZXF.js.map} +1 -1
  7. package/dist/app/AdminShell.d.ts +11 -1
  8. package/dist/app/AdminShell.d.ts.map +1 -1
  9. package/dist/app/admin-app.d.ts.map +1 -1
  10. package/dist/app/bottom-nav.d.ts +24 -0
  11. package/dist/app/bottom-nav.d.ts.map +1 -0
  12. package/dist/app/config.d.ts +34 -3
  13. package/dist/app/config.d.ts.map +1 -1
  14. package/dist/app/core-entities.d.ts.map +1 -1
  15. package/dist/app/derive-contract.d.ts.map +1 -1
  16. package/dist/app/scaffold.d.ts.map +1 -1
  17. package/dist/{chunk-B6NVEKAJ.js → chunk-IPWXA46H.js} +3 -3
  18. package/dist/{chunk-B6NVEKAJ.js.map → chunk-IPWXA46H.js.map} +1 -1
  19. package/dist/{chunk-PNAJODZM.js → chunk-OB7ZSTQD.js} +13 -3
  20. package/dist/chunk-OB7ZSTQD.js.map +1 -0
  21. package/dist/{chunk-OI7RYSTM.js → chunk-OOWP6W2I.js} +33 -7
  22. package/dist/chunk-OOWP6W2I.js.map +1 -0
  23. package/dist/components/AskAI.d.ts +71 -0
  24. package/dist/components/AskAI.d.ts.map +1 -0
  25. package/dist/components/RightRail.d.ts +10 -2
  26. package/dist/components/RightRail.d.ts.map +1 -1
  27. package/dist/components/RightRailPage.d.ts +30 -0
  28. package/dist/components/RightRailPage.d.ts.map +1 -0
  29. package/dist/components/chat/AgentAvatar.d.ts +43 -0
  30. package/dist/components/chat/AgentAvatar.d.ts.map +1 -0
  31. package/dist/components/chat/AgentIntro.d.ts +25 -0
  32. package/dist/components/chat/AgentIntro.d.ts.map +1 -0
  33. package/dist/components/chat/AssistantActivityBar.d.ts +7 -2
  34. package/dist/components/chat/AssistantActivityBar.d.ts.map +1 -1
  35. package/dist/components/chat/AssistantRecordingView.d.ts +16 -0
  36. package/dist/components/chat/AssistantRecordingView.d.ts.map +1 -0
  37. package/dist/components/chat/ChatAttachments.d.ts +12 -1
  38. package/dist/components/chat/ChatAttachments.d.ts.map +1 -1
  39. package/dist/components/chat/ChatComposer.d.ts +5 -4
  40. package/dist/components/chat/ChatComposer.d.ts.map +1 -1
  41. package/dist/components/chat/ChatConversation.d.ts +1 -1
  42. package/dist/components/chat/ChatConversation.d.ts.map +1 -1
  43. package/dist/components/chat/ChatFab.d.ts +1 -5
  44. package/dist/components/chat/ChatFab.d.ts.map +1 -1
  45. package/dist/components/chat/ChatHistory.d.ts.map +1 -1
  46. package/dist/components/chat/ChatMessages.d.ts +1 -1
  47. package/dist/components/chat/ChatMessages.d.ts.map +1 -1
  48. package/dist/components/chat/ChatSuggestions.d.ts.map +1 -1
  49. package/dist/components/chat/ChoiceCard.d.ts +23 -0
  50. package/dist/components/chat/ChoiceCard.d.ts.map +1 -0
  51. package/dist/components/chat/ConnectorSuggestionCard.d.ts +3 -0
  52. package/dist/components/chat/ConnectorSuggestionCard.d.ts.map +1 -1
  53. package/dist/components/chat/RecordChip.d.ts.map +1 -1
  54. package/dist/components/chat/StaffHireView.d.ts +21 -0
  55. package/dist/components/chat/StaffHireView.d.ts.map +1 -0
  56. package/dist/components/chat/StaffPitchCard.d.ts +15 -0
  57. package/dist/components/chat/StaffPitchCard.d.ts.map +1 -0
  58. package/dist/components/chat/StaffSwitcher.d.ts +23 -0
  59. package/dist/components/chat/StaffSwitcher.d.ts.map +1 -0
  60. package/dist/components/chat/activity-icons.d.ts +16 -0
  61. package/dist/components/chat/activity-icons.d.ts.map +1 -0
  62. package/dist/components/chat/index.d.ts +2 -0
  63. package/dist/components/chat/index.d.ts.map +1 -1
  64. package/dist/components/connect/ConnectConsentPage.d.ts.map +1 -1
  65. package/dist/components/connect/ConnectorDetail.d.ts.map +1 -1
  66. package/dist/components/connect/ConnectorRuns.d.ts.map +1 -1
  67. package/dist/components/connect/ConnectorsPanel.d.ts.map +1 -1
  68. package/dist/components/connect/ConnectorsTab.d.ts.map +1 -1
  69. package/dist/components/connect/connector-map.generated.d.ts.map +1 -1
  70. package/dist/components/connect/index.d.ts +3 -0
  71. package/dist/components/connect/index.d.ts.map +1 -1
  72. package/dist/components/connect/model.d.ts +55 -0
  73. package/dist/components/connect/model.d.ts.map +1 -1
  74. package/dist/components/connect/useConnectors.d.ts.map +1 -1
  75. package/dist/components/layout/CommandPalette.d.ts.map +1 -1
  76. package/dist/components/organization/PermissionMatrixEditor.d.ts.map +1 -1
  77. package/dist/components/organization/PermissionProfilesTab.d.ts.map +1 -1
  78. package/dist/components/organization/TeamTab.d.ts.map +1 -1
  79. package/dist/components/organization/index.d.ts +0 -2
  80. package/dist/components/organization/index.d.ts.map +1 -1
  81. package/dist/components/plugins/PluginSettingsPanel.d.ts +1 -2
  82. package/dist/components/plugins/PluginSettingsPanel.d.ts.map +1 -1
  83. package/dist/components/plugins/SettingsTabs.d.ts +33 -0
  84. package/dist/components/plugins/SettingsTabs.d.ts.map +1 -0
  85. package/dist/components/rail-pages.d.ts +17 -0
  86. package/dist/components/rail-pages.d.ts.map +1 -0
  87. package/dist/components/right-rail.d.ts +95 -1
  88. package/dist/components/right-rail.d.ts.map +1 -1
  89. package/dist/components/settings/ConnectedCompanySettings.d.ts.map +1 -1
  90. package/dist/components/settings/ConnectedUserProfile.d.ts.map +1 -1
  91. package/dist/components/settings/LocationsCrudPage.d.ts.map +1 -1
  92. package/dist/components/settings/MyRecordPanel.d.ts +3 -0
  93. package/dist/components/settings/MyRecordPanel.d.ts.map +1 -0
  94. package/dist/components/settings/MyWorkspaceCard.d.ts +3 -0
  95. package/dist/components/settings/MyWorkspaceCard.d.ts.map +1 -0
  96. package/dist/components/settings/SettingsPage.d.ts +9 -1
  97. package/dist/components/settings/SettingsPage.d.ts.map +1 -1
  98. package/dist/components/shared/ContactPicker.d.ts +26 -12
  99. package/dist/components/shared/ContactPicker.d.ts.map +1 -1
  100. package/dist/components/shared/RecordPickerModal.d.ts.map +1 -1
  101. package/dist/crud/CrudAgentSurface.d.ts +27 -0
  102. package/dist/crud/CrudAgentSurface.d.ts.map +1 -0
  103. package/dist/crud/CrudDetailPage.d.ts +19 -1
  104. package/dist/crud/CrudDetailPage.d.ts.map +1 -1
  105. package/dist/crud/CrudFormPage.d.ts +43 -2
  106. package/dist/crud/CrudFormPage.d.ts.map +1 -1
  107. package/dist/crud/CrudListView.d.ts +32 -14
  108. package/dist/crud/CrudListView.d.ts.map +1 -1
  109. package/dist/crud/CrudPage.d.ts +13 -2
  110. package/dist/crud/CrudPage.d.ts.map +1 -1
  111. package/dist/crud/CrudRecordModal.d.ts +17 -3
  112. package/dist/crud/CrudRecordModal.d.ts.map +1 -1
  113. package/dist/crud/CrudSkeletons.d.ts +7 -3
  114. package/dist/crud/CrudSkeletons.d.ts.map +1 -1
  115. package/dist/crud/LookupCreateInline.d.ts +15 -0
  116. package/dist/crud/LookupCreateInline.d.ts.map +1 -0
  117. package/dist/crud/archetype-lookup.d.ts +19 -6
  118. package/dist/crud/archetype-lookup.d.ts.map +1 -1
  119. package/dist/crud/archetypes/AddressesTab.d.ts.map +1 -1
  120. package/dist/crud/archetypes/LocationDetailTabs.d.ts +3 -2
  121. package/dist/crud/archetypes/LocationDetailTabs.d.ts.map +1 -1
  122. package/dist/crud/archetypes/OrderDetailView.d.ts +13 -1
  123. package/dist/crud/archetypes/OrderDetailView.d.ts.map +1 -1
  124. package/dist/crud/archetypes/OrderFormView.d.ts +13 -2
  125. package/dist/crud/archetypes/OrderFormView.d.ts.map +1 -1
  126. package/dist/crud/archetypes/PersonDetailTabs.d.ts +2 -1
  127. package/dist/crud/archetypes/PersonDetailTabs.d.ts.map +1 -1
  128. package/dist/crud/archetypes/PersonFormLayout.d.ts.map +1 -1
  129. package/dist/crud/archetypes/PersonPicker.d.ts.map +1 -1
  130. package/dist/crud/createCrudPage.d.ts +4 -1
  131. package/dist/crud/createCrudPage.d.ts.map +1 -1
  132. package/dist/crud/index.d.ts +2 -0
  133. package/dist/crud/index.d.ts.map +1 -1
  134. package/dist/crud/useLookupCreate.d.ts +30 -0
  135. package/dist/crud/useLookupCreate.d.ts.map +1 -0
  136. package/dist/crud/write-errors.d.ts +24 -0
  137. package/dist/crud/write-errors.d.ts.map +1 -0
  138. package/dist/data/client.d.ts +10 -0
  139. package/dist/data/client.d.ts.map +1 -1
  140. package/dist/hooks/useAITools.d.ts +1 -0
  141. package/dist/hooks/useAITools.d.ts.map +1 -1
  142. package/dist/hooks/useAppConfig.d.ts +20 -0
  143. package/dist/hooks/useAppConfig.d.ts.map +1 -0
  144. package/dist/hooks/useChat.d.ts.map +1 -1
  145. package/dist/hooks/useLayout.d.ts +1 -0
  146. package/dist/hooks/useLayout.d.ts.map +1 -1
  147. package/dist/hooks/useTenantPlugins.d.ts.map +1 -1
  148. package/dist/index.d.ts +31 -8
  149. package/dist/index.d.ts.map +1 -1
  150. package/dist/index.js +15914 -8099
  151. package/dist/index.js.map +1 -1
  152. package/dist/lib/agent-staff.d.ts +117 -0
  153. package/dist/lib/agent-staff.d.ts.map +1 -0
  154. package/dist/lib/agent-surface.d.ts +4 -0
  155. package/dist/lib/agent-surface.d.ts.map +1 -1
  156. package/dist/lib/agent-threads.d.ts +15 -0
  157. package/dist/lib/agent-threads.d.ts.map +1 -0
  158. package/dist/lib/ai-tool-handlers.d.ts.map +1 -1
  159. package/dist/lib/assistant-activity.d.ts +47 -4
  160. package/dist/lib/assistant-activity.d.ts.map +1 -1
  161. package/dist/lib/assistant-invite.d.ts +20 -1
  162. package/dist/lib/assistant-invite.d.ts.map +1 -1
  163. package/dist/lib/assistant-text.d.ts +9 -0
  164. package/dist/lib/assistant-text.d.ts.map +1 -0
  165. package/dist/lib/attachments.d.ts +34 -0
  166. package/dist/lib/attachments.d.ts.map +1 -1
  167. package/dist/lib/chat-upload.d.ts +12 -0
  168. package/dist/lib/chat-upload.d.ts.map +1 -0
  169. package/dist/lib/choice-cards.d.ts +16 -0
  170. package/dist/lib/choice-cards.d.ts.map +1 -0
  171. package/dist/lib/core-ai-tools.d.ts +17 -0
  172. package/dist/lib/core-ai-tools.d.ts.map +1 -1
  173. package/dist/lib/fayz-agent.d.ts +9 -0
  174. package/dist/lib/fayz-agent.d.ts.map +1 -1
  175. package/dist/lib/fayz-events.d.ts.map +1 -1
  176. package/dist/lib/reveal-page.d.ts +19 -0
  177. package/dist/lib/reveal-page.d.ts.map +1 -0
  178. package/dist/lib/staff-cards.d.ts +11 -0
  179. package/dist/lib/staff-cards.d.ts.map +1 -0
  180. package/dist/lib/unit-ai-handlers.d.ts +2 -0
  181. package/dist/lib/unit-ai-handlers.d.ts.map +1 -0
  182. package/dist/lib/unit-ai-tools.d.ts +3 -0
  183. package/dist/lib/unit-ai-tools.d.ts.map +1 -0
  184. package/dist/onboarding/GettingStartedWidget.d.ts +13 -0
  185. package/dist/onboarding/GettingStartedWidget.d.ts.map +1 -0
  186. package/dist/onboarding/WorkspaceSetupFlow.d.ts +24 -0
  187. package/dist/onboarding/WorkspaceSetupFlow.d.ts.map +1 -0
  188. package/dist/onboarding/WorkspaceSetupGate.d.ts +25 -0
  189. package/dist/onboarding/WorkspaceSetupGate.d.ts.map +1 -0
  190. package/dist/onboarding/analyze-site.d.ts +23 -0
  191. package/dist/onboarding/analyze-site.d.ts.map +1 -0
  192. package/dist/onboarding/backend.d.ts +44 -0
  193. package/dist/onboarding/backend.d.ts.map +1 -0
  194. package/dist/onboarding/checklist.d.ts +55 -0
  195. package/dist/onboarding/checklist.d.ts.map +1 -0
  196. package/dist/onboarding/connector-options.d.ts +52 -0
  197. package/dist/onboarding/connector-options.d.ts.map +1 -0
  198. package/dist/onboarding/decide.d.ts +36 -0
  199. package/dist/onboarding/decide.d.ts.map +1 -0
  200. package/dist/onboarding/index.d.ts +19 -0
  201. package/dist/onboarding/index.d.ts.map +1 -0
  202. package/dist/onboarding/infer-vertical.d.ts +2 -0
  203. package/dist/onboarding/infer-vertical.d.ts.map +1 -0
  204. package/dist/onboarding/packs/beauty.d.ts +4 -0
  205. package/dist/onboarding/packs/beauty.d.ts.map +1 -0
  206. package/dist/onboarding/packs/food.d.ts +4 -0
  207. package/dist/onboarding/packs/food.d.ts.map +1 -0
  208. package/dist/onboarding/packs/index.d.ts +17 -0
  209. package/dist/onboarding/packs/index.d.ts.map +1 -0
  210. package/dist/onboarding/packs/retail.d.ts +8 -0
  211. package/dist/onboarding/packs/retail.d.ts.map +1 -0
  212. package/dist/onboarding/questions.d.ts +41 -0
  213. package/dist/onboarding/questions.d.ts.map +1 -0
  214. package/dist/onboarding/resolve.d.ts +12 -0
  215. package/dist/onboarding/resolve.d.ts.map +1 -0
  216. package/dist/onboarding/steps.d.ts +31 -0
  217. package/dist/onboarding/steps.d.ts.map +1 -0
  218. package/dist/onboarding/store.d.ts +17 -0
  219. package/dist/onboarding/store.d.ts.map +1 -0
  220. package/dist/onboarding/submit.d.ts +25 -0
  221. package/dist/onboarding/submit.d.ts.map +1 -0
  222. package/dist/onboarding/tasks.d.ts +28 -0
  223. package/dist/onboarding/tasks.d.ts.map +1 -0
  224. package/dist/onboarding/types.d.ts +39 -0
  225. package/dist/onboarding/types.d.ts.map +1 -0
  226. package/dist/onboarding/useWorkspaceSetupGate.d.ts +36 -0
  227. package/dist/onboarding/useWorkspaceSetupGate.d.ts.map +1 -0
  228. package/dist/org/context.d.ts +10 -0
  229. package/dist/org/context.d.ts.map +1 -1
  230. package/dist/org/index.js +2 -2
  231. package/dist/org/self.d.ts +50 -0
  232. package/dist/org/self.d.ts.map +1 -0
  233. package/dist/plugins/ModuleActionBar.d.ts +16 -9
  234. package/dist/plugins/ModuleActionBar.d.ts.map +1 -1
  235. package/dist/plugins/PageActions.d.ts +16 -0
  236. package/dist/plugins/PageActions.d.ts.map +1 -0
  237. package/dist/plugins/QuickActionsButton.d.ts.map +1 -1
  238. package/dist/plugins/header-actions.d.ts +11 -0
  239. package/dist/plugins/header-actions.d.ts.map +1 -0
  240. package/dist/stores/app-config.store.d.ts +27 -0
  241. package/dist/stores/app-config.store.d.ts.map +1 -0
  242. package/dist/stores/chat.store.d.ts +194 -3
  243. package/dist/stores/chat.store.d.ts.map +1 -1
  244. package/dist/tasks/TasksRailPanel.d.ts +4 -0
  245. package/dist/tasks/TasksRailPanel.d.ts.map +1 -0
  246. package/dist/tasks/components/TaskCard.d.ts +11 -0
  247. package/dist/tasks/components/TaskCard.d.ts.map +1 -0
  248. package/dist/tasks/components/TaskDetail.d.ts +5 -0
  249. package/dist/tasks/components/TaskDetail.d.ts.map +1 -0
  250. package/dist/tasks/components/TaskLabelBadge.d.ts +9 -0
  251. package/dist/tasks/components/TaskLabelBadge.d.ts.map +1 -0
  252. package/dist/tasks/components/TaskPriorityBadge.d.ts +7 -0
  253. package/dist/tasks/components/TaskPriorityBadge.d.ts.map +1 -0
  254. package/dist/tasks/components/TaskQuickAdd.d.ts +5 -0
  255. package/dist/tasks/components/TaskQuickAdd.d.ts.map +1 -0
  256. package/dist/tasks/components/TaskSourceBadge.d.ts +5 -0
  257. package/dist/tasks/components/TaskSourceBadge.d.ts.map +1 -0
  258. package/dist/tasks/components/TaskStatusGroup.d.ts +17 -0
  259. package/dist/tasks/components/TaskStatusGroup.d.ts.map +1 -0
  260. package/dist/tasks/components/TasksFilterBar.d.ts +3 -0
  261. package/dist/tasks/components/TasksFilterBar.d.ts.map +1 -0
  262. package/dist/tasks/components/TasksPanel.d.ts +14 -0
  263. package/dist/tasks/components/TasksPanel.d.ts.map +1 -0
  264. package/dist/tasks/data/mock.d.ts +3 -0
  265. package/dist/tasks/data/mock.d.ts.map +1 -0
  266. package/dist/tasks/data/supabase.d.ts +3 -0
  267. package/dist/tasks/data/supabase.d.ts.map +1 -0
  268. package/dist/tasks/entity.d.ts +11 -0
  269. package/dist/tasks/entity.d.ts.map +1 -0
  270. package/dist/tasks/index.d.ts +17 -0
  271. package/dist/tasks/index.d.ts.map +1 -0
  272. package/dist/tasks/registry.d.ts +3 -0
  273. package/dist/tasks/registry.d.ts.map +1 -0
  274. package/dist/tasks/store.d.ts +34 -0
  275. package/dist/tasks/store.d.ts.map +1 -0
  276. package/dist/tasks/types.d.ts +89 -0
  277. package/dist/tasks/types.d.ts.map +1 -0
  278. package/dist/theme/index.d.ts +1 -1
  279. package/dist/theme/index.d.ts.map +1 -1
  280. package/dist/theme/utils.d.ts +14 -0
  281. package/dist/theme/utils.d.ts.map +1 -1
  282. package/dist/timeline/PersonTimeline.d.ts.map +1 -1
  283. package/dist/types/crud.d.ts +10 -0
  284. package/dist/types/crud.d.ts.map +1 -1
  285. package/dist/types/index.d.ts +0 -1
  286. package/dist/types/index.d.ts.map +1 -1
  287. package/dist/types/plugins.d.ts +3 -0
  288. package/dist/types/plugins.d.ts.map +1 -1
  289. package/dist/units/MemberAccessRailPage.d.ts +19 -0
  290. package/dist/units/MemberAccessRailPage.d.ts.map +1 -0
  291. package/dist/units/MemberUnitsCell.d.ts +11 -0
  292. package/dist/units/MemberUnitsCell.d.ts.map +1 -0
  293. package/dist/units/PersonUnitsTab.d.ts +5 -0
  294. package/dist/units/PersonUnitsTab.d.ts.map +1 -0
  295. package/dist/units/UnitMembersTab.d.ts +5 -0
  296. package/dist/units/UnitMembersTab.d.ts.map +1 -0
  297. package/dist/units/UnitMenuSection.d.ts +15 -0
  298. package/dist/units/UnitMenuSection.d.ts.map +1 -0
  299. package/dist/units/UnitModeCard.d.ts +3 -0
  300. package/dist/units/UnitModeCard.d.ts.map +1 -0
  301. package/dist/units/UnitRailPage.d.ts +10 -0
  302. package/dist/units/UnitRailPage.d.ts.map +1 -0
  303. package/dist/units/UnitSwitcher.d.ts +5 -0
  304. package/dist/units/UnitSwitcher.d.ts.map +1 -0
  305. package/dist/units/UnitsSettingsPage.d.ts +3 -0
  306. package/dist/units/UnitsSettingsPage.d.ts.map +1 -0
  307. package/dist/units/cache.d.ts +26 -0
  308. package/dist/units/cache.d.ts.map +1 -0
  309. package/dist/units/data.d.ts +118 -0
  310. package/dist/units/data.d.ts.map +1 -0
  311. package/dist/units/device.d.ts +26 -0
  312. package/dist/units/device.d.ts.map +1 -0
  313. package/dist/units/entry.d.ts +52 -0
  314. package/dist/units/entry.d.ts.map +1 -0
  315. package/dist/units/geo.d.ts +18 -0
  316. package/dist/units/geo.d.ts.map +1 -0
  317. package/dist/units/index.d.ts +18 -0
  318. package/dist/units/index.d.ts.map +1 -0
  319. package/dist/units/store.d.ts +32 -0
  320. package/dist/units/store.d.ts.map +1 -0
  321. package/dist/units/useUnitBootstrap.d.ts +10 -0
  322. package/dist/units/useUnitBootstrap.d.ts.map +1 -0
  323. package/package.json +7 -7
  324. package/dist/CommandPalette-U7MMA2WH.js.map +0 -1
  325. package/dist/SubscriptionPage-4KP7DKA2.js +0 -7
  326. package/dist/chunk-OI7RYSTM.js.map +0 -1
  327. package/dist/chunk-PNAJODZM.js.map +0 -1
  328. package/dist/components/organization/OrgInitializer.d.ts +0 -7
  329. package/dist/components/organization/OrgInitializer.d.ts.map +0 -1
  330. package/dist/components/organization/OrgSwitcher.d.ts +0 -7
  331. package/dist/components/organization/OrgSwitcher.d.ts.map +0 -1
  332. package/dist/components/organization/TenantOnboarding.d.ts +0 -9
  333. package/dist/components/organization/TenantOnboarding.d.ts.map +0 -1
  334. package/dist/components/shared/create-person.d.ts +0 -20
  335. package/dist/components/shared/create-person.d.ts.map +0 -1
  336. package/dist/types/entity-lookup.d.ts +0 -27
  337. package/dist/types/entity-lookup.d.ts.map +0 -1
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ import type { WizardMedia } from '@fayz-ai/ui';
3
+ import type { SetupMode } from './resolve';
4
+ export interface WorkspaceSetupGateProps {
5
+ mode: SetupMode;
6
+ verticalId?: string;
7
+ timezone?: string;
8
+ currency?: string;
9
+ locale?: string;
10
+ logo?: React.ReactNode;
11
+ media?: Record<string, WizardMedia>;
12
+ /** Held on screen while we do not yet know if this account has a workspace. */
13
+ fallback?: React.ReactNode;
14
+ children: React.ReactNode;
15
+ }
16
+ /**
17
+ * Puts the setup flow in front of the shell when it applies, and gets out of the
18
+ * way when it does not.
19
+ *
20
+ * Mounted inside the AuthGate but outside the chrome, for the same reason the
21
+ * consent screen is: a sidebar around "name your business" invites someone to
22
+ * wander off before they have a business to wander around in.
23
+ */
24
+ export declare function WorkspaceSetupGate({ mode, verticalId, timezone, currency, locale, logo, media, fallback, children, }: WorkspaceSetupGateProps): React.JSX.Element;
25
+ //# sourceMappingURL=WorkspaceSetupGate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceSetupGate.d.ts","sourceRoot":"","sources":["../../src/onboarding/WorkspaceSetupGate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAG9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAE1C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,SAAS,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAC9E,EAAE,uBAAuB,qBA4BzB"}
@@ -0,0 +1,23 @@
1
+ import type { WizardStepDef, WizardValues } from '@fayz-ai/ui';
2
+ export interface SiteAnalyzerOptions {
3
+ /** `VITE_FAYZ_API_BASE_URL`, in either of its two spellings. */
4
+ apiBaseUrl?: string;
5
+ /**
6
+ * The whole flow, so the questions go out and the answers come back typed.
7
+ *
8
+ * A getter rather than the array, because the field that triggers this lives
9
+ * inside the steps it needs — taking them lazily is what keeps the flow to a
10
+ * single build instead of one pass to read the questions and another to attach
11
+ * the handler.
12
+ */
13
+ steps: () => ReadonlyArray<WizardStepDef>;
14
+ locale?: string;
15
+ fetcher?: typeof fetch;
16
+ }
17
+ /**
18
+ * Returns null — never throws — when there is nothing to offer. Every caller is
19
+ * a user mid-form who has no use for the difference between a dead site and a
20
+ * dead network.
21
+ */
22
+ export declare function createSiteAnalyzer({ apiBaseUrl, steps, locale, fetcher, }: SiteAnalyzerOptions): (url: string) => Promise<WizardValues | null>;
23
+ //# sourceMappingURL=analyze-site.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze-site.d.ts","sourceRoot":"","sources":["../../src/onboarding/analyze-site.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAsB9D,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,aAAa,CAAC,aAAa,CAAC,CAAA;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;CACvB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,UAAU,EACV,KAAK,EACL,MAAM,EACN,OAAO,GACR,EAAE,mBAAmB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAmCrE"}
@@ -0,0 +1,44 @@
1
+ import { type SetupSource } from './types';
2
+ import type { WizardValues } from '@fayz-ai/ui';
3
+ /**
4
+ * Upload the workspace logo BEFORE the tenant exists.
5
+ *
6
+ * Every other logo path in the shell keys storage by tenant id, which is not an
7
+ * option here — the tenant is created at the end of the flow. Keyed by user
8
+ * instead, in the same bucket the branding screen already writes to, so the file
9
+ * ends up where the rest of the app looks for it.
10
+ */
11
+ export declare function createLogoUploader(userId: string): (file: File) => Promise<string>;
12
+ /**
13
+ * Re-host a logo we read off someone else's site.
14
+ *
15
+ * The site import hands back whatever URL the page served its logo from — a CDN
16
+ * we do not control, or an inline `data:` URI. Storing either on the tenant row
17
+ * means the workspace's logo breaks the day they redesign, so it is copied into
18
+ * our own bucket before it is saved.
19
+ *
20
+ * Returns null on any failure, and the caller keeps the original URL: a logo
21
+ * that might break later still beats no logo at all.
22
+ */
23
+ export declare function importLogoFromUrl(userId: string, url: string): Promise<string | null>;
24
+ /**
25
+ * Is this handle free? Falls back to "yes" whenever we cannot ask — the unique
26
+ * constraint on `tenants.slug` is the real guard, and a failed probe must not
27
+ * stop someone from continuing.
28
+ */
29
+ export declare function checkSlugAvailable(slug: string): Promise<boolean>;
30
+ export interface RecordResponseInput {
31
+ tenantId: string;
32
+ userId: string;
33
+ verticalId?: string;
34
+ source: SetupSource;
35
+ heardFrom?: string;
36
+ values: WizardValues;
37
+ }
38
+ /**
39
+ * Persist what they told us. Deliberately swallows its own failures: the caller
40
+ * has just created a workspace, and losing a questionnaire row is not a reason
41
+ * to tell someone their business was not created.
42
+ */
43
+ export declare function recordOnboardingResponse(input: RecordResponseInput): Promise<boolean>;
44
+ //# sourceMappingURL=backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/onboarding/backend.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyD,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AACjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAM/C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAgBlF;AAKD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwB3F;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAMvE;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,WAAW,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,YAAY,CAAA;CACrB;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAoB3F"}
@@ -0,0 +1,55 @@
1
+ import type { OnboardingStepInput } from '@fayz-ai/ui';
2
+ import type { Task, TaskPriority } from '../tasks/types';
3
+ /**
4
+ * The getting-started checklist.
5
+ *
6
+ * The split this file rests on: THE DATABASE HOLDS STATE, CODE HOLDS BEHAVIOUR,
7
+ * joined by `source_key`. A route cannot live in a row without pinning the app's
8
+ * routing to data; a title must, because it is what the Tasks panel shows to
9
+ * somebody who has never seen this catalog. So the row carries title, status and
10
+ * assignee, and this array carries the route, the icon and the sensor.
11
+ *
12
+ * `key` becomes `tasks.source_key` and is the idempotency key for re-seeding.
13
+ * REWORDING A TITLE IS FREE. CHANGING A KEY IS A DUPLICATE ROW.
14
+ */
15
+ export interface OnboardingTaskSeed {
16
+ key: string;
17
+ title: string;
18
+ description?: string;
19
+ icon?: string;
20
+ /** Where the step's action goes. Never stored. */
21
+ route?: string;
22
+ priority?: TaskPriority;
23
+ dueInDays?: number;
24
+ /**
25
+ * Optional sensor: "is this already true of the data?". Must be cheap — it
26
+ * runs once per open step per shell mount. Absent means the only way to
27
+ * complete the step is to tick the task.
28
+ */
29
+ check?: () => Promise<boolean>;
30
+ }
31
+ /**
32
+ * The steps for a vertical. An unknown or absent vertical returns the base set
33
+ * rather than nothing — the same call the question packs make.
34
+ */
35
+ export declare function onboardingChecklist(verticalId?: string): OnboardingTaskSeed[];
36
+ /** A due date `dueInDays` from now, as the `date` column wants it. */
37
+ export declare function dueDateFor(seed: OnboardingTaskSeed, from?: Date): string | null;
38
+ export interface MergeContext {
39
+ /** Called when a sensor fires on a step whose row is still open. */
40
+ onComplete?: (sourceKey: string) => void;
41
+ }
42
+ /**
43
+ * Rows + catalog → what the sidebar renders.
44
+ *
45
+ * The reconciliation is a MONOTONIC OR: neither source can un-complete the
46
+ * other. `useOnboardingProgress` gives `done` precedence over `check`, so
47
+ * handing it both would make the sensor dead code — instead a closed row
48
+ * resolves to `done: true` and never probes, and an open row falls through to
49
+ * the sensor exactly as it did before any of this was persisted.
50
+ *
51
+ * Pure on purpose: this is the part worth testing, and it needs neither React
52
+ * nor a database to say what it does.
53
+ */
54
+ export declare function mergeOnboardingSteps(catalog: OnboardingTaskSeed[], rows: Task[], ctx?: MergeContext): OnboardingStepInput[];
55
+ //# sourceMappingURL=checklist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist.d.ts","sourceRoot":"","sources":["../../src/onboarding/checklist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAExD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CAC/B;AAmED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAI7E;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,IAAI,EAAE,kBAAkB,EAAE,IAAI,OAAa,GAAG,MAAM,GAAG,IAAI,CAKrF;AAED,MAAM,WAAW,YAAY;IAC3B,oEAAoE;IACpE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,kBAAkB,EAAE,EAC7B,IAAI,EAAE,IAAI,EAAE,EACZ,GAAG,GAAE,YAAiB,GACrB,mBAAmB,EAAE,CA4BvB"}
@@ -0,0 +1,52 @@
1
+ import * as React from 'react';
2
+ import type { SelectableOption } from '@fayz-ai/ui';
3
+ import { type SdkIntegration } from '../components/connect/connector-map.generated';
4
+ /** The value the "not on this list" option carries. Packs key their follow-up text field off it. */
5
+ export declare const OTHER_CONNECTOR = "other";
6
+ export interface ConnectorOptionsFilter {
7
+ /** Connector categories, e.g. `['payments']` or `['marketplace']`. */
8
+ categories?: string[];
9
+ /** Which module brings it — `'shop'`, `'financial'`, `'orders'`. */
10
+ moduleIds?: string[];
11
+ /**
12
+ * Include connectors declared but not implemented yet. On by default: someone
13
+ * telling us what they use today is telling us about THEIR world, not about
14
+ * what we happen to have built.
15
+ */
16
+ includeSoon?: boolean;
17
+ /** Options appended before "other" — providers with no connector of ours. */
18
+ extras?: ReadonlyArray<{
19
+ value: string;
20
+ label: string;
21
+ }>;
22
+ /** Append an "other" card that reveals a free-text follow-up. Default true. */
23
+ other?: boolean;
24
+ otherLabel?: string;
25
+ }
26
+ /**
27
+ * The catalogue rows for a filter, deduped by slug.
28
+ *
29
+ * `SDK_INTEGRATIONS` carries one row per (slug, module) pair — Stripe appears
30
+ * under both Financeiro and Loja. As a question about which provider someone
31
+ * uses, that is one answer, so the implemented row wins and the rest collapse.
32
+ */
33
+ export declare function connectorRows(filter: ConnectorOptionsFilter): SdkIntegration[];
34
+ /**
35
+ * One provider's logo, for a hand-written option that happens to name a real app
36
+ * — "só no iFood", "Google Agenda".
37
+ *
38
+ * People recognise a logo before they finish reading the label, and a list of
39
+ * apps they use should look like the apps they use. Returns undefined for a slug
40
+ * we carry no mark for, so the option simply renders without one.
41
+ */
42
+ export declare function brandMark(slug: string): React.ReactNode | undefined;
43
+ /**
44
+ * A choice list of real providers, with their brand marks — for onboarding
45
+ * questions like "which gateway do you use today?" or "which apps do your
46
+ * orders come from?".
47
+ *
48
+ * Runs with no tenant and no database on purpose: it is asked while the
49
+ * workspace is still being created.
50
+ */
51
+ export declare function connectorOptions(filter: ConnectorOptionsFilter): SelectableOption[];
52
+ //# sourceMappingURL=connector-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector-options.d.ts","sourceRoot":"","sources":["../../src/onboarding/connector-options.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,+CAA+C,CAAA;AAErG,oGAAoG;AACpG,eAAO,MAAM,eAAe,UAAU,CAAA;AAEtC,MAAM,WAAW,sBAAsB;IACrC,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,aAAa,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACxD,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,sBAAsB,GAAG,cAAc,EAAE,CAe9E;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,GAAG,SAAS,CAInE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,gBAAgB,EAAE,CAoBnF"}
@@ -0,0 +1,36 @@
1
+ import type { SetupSource } from './types';
2
+ export interface SetupDecisionInput {
3
+ /** `org.setup === 'wizard'`. */
4
+ enabled: boolean;
5
+ /** A signed-in account exists. */
6
+ hasUser: boolean;
7
+ /** The org provider is mounted. */
8
+ hasTenant: boolean;
9
+ /** The bootstrap has finished FOR THIS ACCOUNT. */
10
+ settled: boolean;
11
+ /** An org is on screen (from cache or from the network). */
12
+ hasOrg: boolean;
13
+ /** How many workspaces this account belongs to. */
14
+ orgCount: number;
15
+ /** Someone asked for the flow: the switcher, or the route. */
16
+ requested: SetupSource | null;
17
+ onRoute: boolean;
18
+ }
19
+ export interface SetupDecision {
20
+ active: boolean;
21
+ /** Hold the screen: we do not know yet whether this account has a workspace. */
22
+ deciding: boolean;
23
+ source: SetupSource;
24
+ /** Deliberate entry can be backed out of; a first workspace cannot. */
25
+ exitable: boolean;
26
+ }
27
+ /**
28
+ * Whether the setup flow takes the screen — as a function, so the one state
29
+ * that matters can be tested without a browser.
30
+ *
31
+ * The rule that keeps breaking is the middle one. "No org" and "no answer yet"
32
+ * look identical from the outside, and treating the second as the first is what
33
+ * flashed the setup flow over the app on every login.
34
+ */
35
+ export declare function decideWorkspaceSetup(input: SetupDecisionInput): SetupDecision;
36
+ //# sourceMappingURL=decide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decide.d.ts","sourceRoot":"","sources":["../../src/onboarding/decide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,mCAAmC;IACnC,SAAS,EAAE,OAAO,CAAA;IAClB,mDAAmD;IACnD,OAAO,EAAE,OAAO,CAAA;IAChB,4DAA4D;IAC5D,MAAM,EAAE,OAAO,CAAA;IACf,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB,8DAA8D;IAC9D,SAAS,EAAE,WAAW,GAAG,IAAI,CAAA;IAC7B,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,gFAAgF;IAChF,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,WAAW,CAAA;IACnB,uEAAuE;IACvE,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAiB7E"}
@@ -0,0 +1,19 @@
1
+ export { WorkspaceSetupFlow, type WorkspaceSetupFlowProps } from './WorkspaceSetupFlow';
2
+ export { WorkspaceSetupGate, type WorkspaceSetupGateProps } from './WorkspaceSetupGate';
3
+ export { resolveSetupMode, type SetupMode } from './resolve';
4
+ export { decideWorkspaceSetup, type SetupDecision, type SetupDecisionInput } from './decide';
5
+ export { useWorkspaceSetupGate, useWorkspaceSetupBusy, WORKSPACE_SETUP_ROUTE, type WorkspaceSetupGateState, } from './useWorkspaceSetupGate';
6
+ export { useWorkspaceSetupStore } from './store';
7
+ export { buildWorkspaceSetupSteps, slugify } from './steps';
8
+ export { inferVerticalId } from './infer-vertical';
9
+ export { brandMark, connectorOptions, connectorRows, OTHER_CONNECTOR, type ConnectorOptionsFilter } from './connector-options';
10
+ export { getQuestionPack, resolveVerticalId, QUESTION_PACKS, beautyPack, foodPack, retailPack } from './packs';
11
+ export { submitWorkspaceSetup, type SubmitWorkspaceSetupInput } from './submit';
12
+ export { checkSlugAvailable, createLogoUploader, importLogoFromUrl, recordOnboardingResponse } from './backend';
13
+ export { createSiteAnalyzer, type SiteAnalyzerOptions } from './analyze-site';
14
+ export { GettingStartedWidget } from './GettingStartedWidget';
15
+ export { onboardingChecklist, mergeOnboardingSteps, dueDateFor, type OnboardingTaskSeed, type MergeContext, } from './checklist';
16
+ export { seedOnboardingTasks, listOnboardingTasks, completeOnboardingTask } from './tasks';
17
+ export { toQuestionSpecs, coerceAnswers, type QuestionSpec, type QuestionType } from './questions';
18
+ export { WORKSPACE_SETUP_FLOW_ID, WORKSPACE_SETUP_FLOW_VERSION, type QuestionPack, type SetupAnswers, type SetupContext, type SetupSource, } from './types';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/onboarding/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,EAAE,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC5F,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,wBAAwB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAC9H,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAC9G,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AAC/G,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EACL,mBAAmB,EAAE,oBAAoB,EAAE,UAAU,EACrD,KAAK,kBAAkB,EAAE,KAAK,YAAY,GAC3C,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAC1F,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAClG,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,SAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function inferVerticalId(pluginIds: ReadonlyArray<string>): string | undefined;
2
+ //# sourceMappingURL=infer-vertical.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infer-vertical.d.ts","sourceRoot":"","sources":["../../src/onboarding/infer-vertical.ts"],"names":[],"mappings":"AA4BA,wBAAgB,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAQpF"}
@@ -0,0 +1,4 @@
1
+ import type { QuestionPack } from '../types';
2
+ /** Salons, barbershops, studios, clinics — everyone who sells appointments. */
3
+ export declare const beautyPack: QuestionPack;
4
+ //# sourceMappingURL=beauty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beauty.d.ts","sourceRoot":"","sources":["../../../src/onboarding/packs/beauty.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C,+EAA+E;AAC/E,eAAO,MAAM,UAAU,EAAE,YA6GxB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { QuestionPack } from '../types';
2
+ /** Restaurants, bars and anything that plates food. */
3
+ export declare const foodPack: QuestionPack;
4
+ //# sourceMappingURL=food.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"food.d.ts","sourceRoot":"","sources":["../../../src/onboarding/packs/food.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAO5C,uDAAuD;AACvD,eAAO,MAAM,QAAQ,EAAE,YAmJtB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { QuestionPack } from '../types';
2
+ import { beautyPack } from './beauty';
3
+ import { foodPack } from './food';
4
+ import { retailPack } from './retail';
5
+ /**
6
+ * Packs are keyed by `VerticalId` — the value that lands on `tenants.vertical_id`
7
+ * and gates plugins at runtime.
8
+ */
9
+ export declare const QUESTION_PACKS: Record<string, QuestionPack>;
10
+ export declare function resolveVerticalId(verticalId: string | undefined): string | undefined;
11
+ /**
12
+ * The domain questions for a vertical. An unknown or absent vertical returns an
13
+ * empty pack, so the flow is the base steps only rather than nothing at all.
14
+ */
15
+ export declare function getQuestionPack(verticalId: string | undefined): QuestionPack;
16
+ export { beautyPack, foodPack, retailPack };
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/onboarding/packs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAIvD,CAAA;AAeD,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAIpF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAG5E;AAED,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { QuestionPack } from '../types';
2
+ /**
3
+ * Retail / ecommerce. Reword freely — every answer lands in the `answers` jsonb
4
+ * under its field id, so changing a question costs nothing but a stale id in old
5
+ * rows (which is why the flow version is stamped alongside).
6
+ */
7
+ export declare const retailPack: QuestionPack;
8
+ //# sourceMappingURL=retail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retail.d.ts","sourceRoot":"","sources":["../../../src/onboarding/packs/retail.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,YAkKxB,CAAA"}
@@ -0,0 +1,41 @@
1
+ import type { WizardStepDef, WizardValues } from '@fayz-ai/ui';
2
+ /**
3
+ * Turning the flow into something a stranger can answer, and turning what comes
4
+ * back into something the flow can hold.
5
+ *
6
+ * Both directions are pure functions of the step list, so the platform never
7
+ * learns what this questionnaire asks and rewording a question stays what it has
8
+ * always been: editing a list.
9
+ */
10
+ /** The coarse shape a caller outside this package can reason about. */
11
+ export type QuestionType = 'text' | 'choice' | 'boolean';
12
+ export interface QuestionSpec {
13
+ id: string;
14
+ label: string;
15
+ hint?: string;
16
+ type: QuestionType;
17
+ multi?: boolean;
18
+ options?: Array<{
19
+ value: string;
20
+ label: string;
21
+ }>;
22
+ }
23
+ /**
24
+ * Every question in the flow, including the ones on steps the current answers
25
+ * keep hidden — the vertical has not been picked when this runs, so all the
26
+ * packs' questions go out together and the reply picks the vertical AND answers
27
+ * it in one round trip.
28
+ */
29
+ export declare function toQuestionSpecs(steps: ReadonlyArray<WizardStepDef>): QuestionSpec[];
30
+ /**
31
+ * Second pass over answers the server already checked.
32
+ *
33
+ * Not redundant: the server validates against the questions it was SENT, this
34
+ * validates against the fields that actually exist here — and it is the only
35
+ * place that can apply a field's own `normalize` and `validate`, which is what
36
+ * turns 14 digits into a formatted CNPJ and rejects one whose digits do not add
37
+ * up. Anything that fails is dropped rather than corrected: a blank field is
38
+ * obviously still the user's turn, a wrong one is not.
39
+ */
40
+ export declare function coerceAnswers(steps: ReadonlyArray<WizardStepDef>, raw: Record<string, unknown> | undefined): WizardValues;
41
+ //# sourceMappingURL=questions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../src/onboarding/questions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG9E;;;;;;;GAOG;AAEH,uEAAuE;AACvE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAClD;AAqCD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,YAAY,EAAE,CA0CnF;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,EACnC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACvC,YAAY,CA0Bd"}
@@ -0,0 +1,12 @@
1
+ import type { OrgConfig } from '../app/config';
2
+ export type SetupMode = 'wizard' | 'auto' | 'off';
3
+ /**
4
+ * Which first-run behaviour an app gets.
5
+ *
6
+ * `setup` is the field; `autoCreate` is what apps written before it used, and it
7
+ * only ever meant "invent an org, or do nothing". An app that explicitly turned
8
+ * it off asked for no org to appear on its own — honour that as `'off'` rather
9
+ * than surprising it with a wizard.
10
+ */
11
+ export declare function resolveSetupMode(org: OrgConfig | undefined): SetupMode;
12
+ //# sourceMappingURL=resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/onboarding/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAA;AAEjD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAItE"}
@@ -0,0 +1,31 @@
1
+ import type { WizardStepDef } from '@fayz-ai/ui';
2
+ import type { SetupContext } from './types';
3
+ /**
4
+ * A workspace handle: lowercase, no accents, hyphen-joined. Mirrors the shape
5
+ * `tenant_slug_available` enforces, so what passes here is what the DB accepts.
6
+ *
7
+ * Derived from the name at submit, never asked. "Your address on Fayz" is a
8
+ * question about our URL scheme, and someone naming their business has no
9
+ * opinion about it yet — the products that do need a public link let them set
10
+ * it later, next to the page it actually addresses.
11
+ */
12
+ export declare function slugify(raw: string): string;
13
+ /** Answers the flow lifts into columns of their own when it writes the row. */
14
+ export declare const HEARD_FROM_FIELD = "meta.heardFrom";
15
+ export declare const VERTICAL_FIELD = "meta.vertical";
16
+ export declare const NAME_FIELD = "workspace.name";
17
+ export declare const LOGO_FIELD = "workspace.logoUrl";
18
+ /** Brand palette, read from their site. Never asked cold — see the field below. */
19
+ export declare const BRAND_COLORS_FIELD = "workspace.brandColors";
20
+ /** Their EXISTING site, not ours — the seed for learning about the business. */
21
+ export declare const SITE_FIELD = "workspace.existingSite";
22
+ /** BR company registration. The other seed, and the qualification signal. */
23
+ export declare const TAX_ID_FIELD = "workspace.taxId";
24
+ export declare const HAS_TAX_ID_FIELD = "workspace.hasTaxId";
25
+ /**
26
+ * The base flow: identity, contact, what they use today, then the vertical's own
27
+ * questions, then acquisition, then confirm. Everything is data — the only React
28
+ * here is the summary card on the last step.
29
+ */
30
+ export declare function buildWorkspaceSetupSteps(ctx: SetupContext): WizardStepDef[];
31
+ //# sourceMappingURL=steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../src/onboarding/steps.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,aAAa,CAAA;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ3C;AAOD,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,mBAAmB,CAAA;AAChD,eAAO,MAAM,cAAc,kBAAkB,CAAA;AAC7C,eAAO,MAAM,UAAU,mBAAmB,CAAA;AAC1C,eAAO,MAAM,UAAU,sBAAsB,CAAA;AAC7C,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,0BAA0B,CAAA;AACzD,gFAAgF;AAChF,eAAO,MAAM,UAAU,2BAA2B,CAAA;AAClD,6EAA6E;AAC7E,eAAO,MAAM,YAAY,oBAAoB,CAAA;AAC7C,eAAO,MAAM,gBAAgB,uBAAuB,CAAA;AAqDpD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,YAAY,GAAG,aAAa,EAAE,CA0S3E"}
@@ -0,0 +1,17 @@
1
+ import type { SetupSource } from './types';
2
+ interface WorkspaceSetupStore {
3
+ /** Non-null while the flow is open on purpose (the switcher's "new workspace"). */
4
+ requested: SetupSource | null;
5
+ open: (source?: SetupSource) => void;
6
+ close: () => void;
7
+ }
8
+ /**
9
+ * Opening the setup flow from anywhere in the shell.
10
+ *
11
+ * The first-workspace case needs none of this — it is derived from "this account
12
+ * belongs to no org". This store is only for the deliberate case, where someone
13
+ * who already has a workspace asks for another one.
14
+ */
15
+ export declare const useWorkspaceSetupStore: import("zustand").UseBoundStore<import("zustand").StoreApi<WorkspaceSetupStore>>;
16
+ export {};
17
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/onboarding/store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,UAAU,mBAAmB;IAC3B,mFAAmF;IACnF,SAAS,EAAE,WAAW,GAAG,IAAI,CAAA;IAC7B,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IACpC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,kFAIhC,CAAA"}
@@ -0,0 +1,25 @@
1
+ import type { Organization, OrgAdapter } from '@fayz-ai/core';
2
+ import type { WizardValues } from '@fayz-ai/ui';
3
+ import type { SetupSource } from './types';
4
+ export interface SubmitWorkspaceSetupInput {
5
+ adapter: OrgAdapter;
6
+ userId: string;
7
+ /** Display name of the person running the flow — the checklist's assignee. */
8
+ userName?: string;
9
+ values: WizardValues;
10
+ source: SetupSource;
11
+ /** Fixed by the app; when absent the flow asked for it. */
12
+ verticalId?: string;
13
+ timezone?: string;
14
+ currency?: string;
15
+ locale?: string;
16
+ }
17
+ /**
18
+ * Turn the answers into a workspace.
19
+ *
20
+ * Order matters: the org first, because everything else is decoration on top of
21
+ * a tenant that must exist. The logo is a second call (`create_tenant_with_owner`
22
+ * takes no logo), and the questionnaire row is a third that is allowed to fail.
23
+ */
24
+ export declare function submitWorkspaceSetup({ adapter, userId, userName, values, source, verticalId, timezone, currency, locale, }: SubmitWorkspaceSetupInput): Promise<Organization>;
25
+ //# sourceMappingURL=submit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"submit.d.ts","sourceRoot":"","sources":["../../src/onboarding/submit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAQ/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,UAAU,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,WAAW,CAAA;IACnB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAyDD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAClF,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAoEnD"}
@@ -0,0 +1,28 @@
1
+ import { type Task } from '../tasks/types';
2
+ import { type OnboardingTaskSeed } from './checklist';
3
+ /**
4
+ * The getting-started checklist's read/write seam.
5
+ *
6
+ * Same contract as its neighbour `backend.ts`: every function swallows its own
7
+ * failures and returns a benign value. The caller has just created a workspace,
8
+ * and a lost checklist is not a reason to tell someone their business was not
9
+ * created.
10
+ *
11
+ * These are plain inserts rather than the entity provider on purpose:
12
+ * `createSupabaseProvider` strips `ownerId`/`createdBy` from writes (the
13
+ * triggers' job), and seeding runs before the new tenant is the active one, so
14
+ * nothing that reads `getActiveTenantId()` would aim at the right rows.
15
+ */
16
+ export interface SeedOnboardingTasksInput {
17
+ tenantId: string;
18
+ /** Whoever ran the wizard. This is the only place that is reliably known. */
19
+ userId: string;
20
+ userName?: string;
21
+ items: OnboardingTaskSeed[];
22
+ }
23
+ export declare function seedOnboardingTasks(input: SeedOnboardingTasksInput): Promise<boolean>;
24
+ /** `[]` when Supabase is absent, when nothing was seeded, or on any error. */
25
+ export declare function listOnboardingTasks(tenantId: string): Promise<Task[]>;
26
+ /** The latch. Fire-and-forget; never throws. */
27
+ export declare function completeOnboardingTask(tenantId: string, sourceKey: string): Promise<void>;
28
+ //# sourceMappingURL=tasks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/onboarding/tasks.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAc,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAMjE;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,kBAAkB,EAAE,CAAA;CAC5B;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CAiC3F;AAUD,8EAA8E;AAC9E,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAsB3E;AAED,gDAAgD;AAChD,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/F"}
@@ -0,0 +1,39 @@
1
+ import type { WizardMedia, WizardStepDef, WizardValues } from '@fayz-ai/ui';
2
+ /** Which questionnaire, and which revision of it, gets stamped on every answer row. */
3
+ export declare const WORKSPACE_SETUP_FLOW_ID = "workspace-setup";
4
+ export declare const WORKSPACE_SETUP_FLOW_VERSION = 1;
5
+ /** Why the flow is open. Same questions, different intent — and it is stored. */
6
+ export type SetupSource = 'signup' | 'switcher';
7
+ export interface SetupContext {
8
+ /** The app's vertical when it has one. Absent means the flow asks. */
9
+ verticalId?: string;
10
+ /** Upload handler for the logo step. Absent hides the logo field entirely. */
11
+ uploadLogo?: (file: File) => Promise<string>;
12
+ /** Slug availability probe. Absent skips the check and lets submit surface a clash. */
13
+ checkSlug?: (slug: string) => Promise<boolean>;
14
+ /** Per-step artwork, keyed by step id. This is where an app plugs its own images in. */
15
+ media?: Record<string, WizardMedia>;
16
+ /**
17
+ * ISO country of the operation, which decides the locale-specific questions.
18
+ * `'BR'` is what turns on CNPJ — asking a US salon for one is noise.
19
+ */
20
+ country?: string;
21
+ /**
22
+ * Reads the website the user already has and answers what it supports.
23
+ * Absent leaves the site field as a plain question, which is what happens when
24
+ * the app has no platform URL configured.
25
+ */
26
+ analyzeSite?: (url: string) => Promise<WizardValues | null>;
27
+ }
28
+ /**
29
+ * A vertical's questions. A plain function of context returning steps, so
30
+ * rewording is editing a list — no component, no key registry, no migration.
31
+ */
32
+ export type QuestionPack = (ctx: SetupContext) => WizardStepDef[];
33
+ /** Shape written to `plg_onboarding_responses`. */
34
+ export interface SetupAnswers {
35
+ values: WizardValues;
36
+ verticalId?: string;
37
+ heardFrom?: string;
38
+ }
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/onboarding/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE3E,uFAAuF;AACvF,eAAO,MAAM,uBAAuB,oBAAoB,CAAA;AACxD,eAAO,MAAM,4BAA4B,IAAI,CAAA;AAE7C,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE/C,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC5C,uFAAuF;IACvF,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC9C,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAA;CAC5D;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,YAAY,KAAK,aAAa,EAAE,CAAA;AAEjE,mDAAmD;AACnD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
@@ -0,0 +1,36 @@
1
+ import type { SetupSource } from './types';
2
+ /** Linkable entry point, so the browser's back button behaves inside the flow. */
3
+ export declare const WORKSPACE_SETUP_ROUTE = "/workspaces/new";
4
+ export interface WorkspaceSetupGateState {
5
+ /** Render the flow instead of the shell. */
6
+ active: boolean;
7
+ /**
8
+ * We do not know yet whether this account has a workspace. The shell must not
9
+ * be handed over in this state — it renders fully, then gets yanked away the
10
+ * moment the membership request lands, which is the flash.
11
+ */
12
+ deciding: boolean;
13
+ source: SetupSource;
14
+ /** Absent on the first workspace — there is nothing behind the flow to return to. */
15
+ onExit?: () => void;
16
+ }
17
+ /**
18
+ * Decides whether the setup flow takes over the screen.
19
+ *
20
+ * Two ways in, and they behave differently on the way out. A signed-in account
21
+ * with no workspace has nowhere else to be, so the flow IS the app and there is
22
+ * no exit. Someone adding a second workspace came from a working shell, so they
23
+ * can always back out to it.
24
+ */
25
+ export declare function useWorkspaceSetupGate(enabled: boolean): WorkspaceSetupGateState;
26
+ /**
27
+ * "The app is not usable yet" — the setup flow owns the screen, or we are still
28
+ * working out whether it will.
29
+ *
30
+ * For chrome mounted ABOVE the shell by the providers, which the gate cannot
31
+ * hide by not rendering: the assistant FAB floating over "name your business"
32
+ * offers help with a product the account does not have yet, and floating over
33
+ * the boot screen offers it before there is anything to help with.
34
+ */
35
+ export declare function useWorkspaceSetupBusy(enabled: boolean): boolean;
36
+ //# sourceMappingURL=useWorkspaceSetupGate.d.ts.map